feat(studio): coordinate integrated AI activity and internal language services
Start project-owned language and authenticated MCP services when opening a project, reusing the embedded LSP backend without a desktop TCP listener. Keep editor overlays separate from saved-file MCP queries. Reserve conflicting editing before ACP prompt delivery and retain protection through native/tool termination, runtime cleanup and document refresh. Preserve drafts on rejected admission, provide cleanup/preparation recovery, distinguish terminal outcomes and redact permission previews. Add lifecycle, language parity, activity, composition and UI regressions and update the canonical Studio contracts. Keep distribution update alignment as the separate WRK-002A follow-up. Validation: complete make -C tooling verify PASSED in 20261127T035822Z-ec5d9266 (1172 unit, 131 compiler fixture, 31 headless tests). Opt-in real-model and native AI-view qualification are outside that gate. Work: WRK-0029; decision: DEC-0001.
This commit is contained in:
@@ -165,5 +165,6 @@ port as scaffold and DEV retry. Desktop composition MUST start the shared loopba
|
||||
server before project sessions become available; no external command or separate
|
||||
per-project desktop Run is required. Explicitly disabled integration MUST remain
|
||||
disabled. Preparation failure MUST remain visible in DEV readiness without blocking
|
||||
project use. Opening MUST NOT publish credentials or grant/acquire agent control.
|
||||
project use. Opening MUST publish authenticated project MCP access without granting task
|
||||
authority or reserving editing. Integrated activity admission follows specs 10 and 16.
|
||||
The coding client continues to own its configured stdio process and initial trust.
|
||||
|
||||
@@ -15,15 +15,18 @@ existing domain ownership.
|
||||
|
||||
## Purpose
|
||||
|
||||
Allow a developer to grant control of an open project to an external coding
|
||||
agent, observe managed operations and canonical runtime images, and explicitly
|
||||
reclaim control. Studio provides specialized project services through MCP, not
|
||||
an embedded agent or a second editor.
|
||||
Coordinate the integrated AI conversation with project editing, specialized MCP
|
||||
services and managed runtime work. Opening a project starts its internal language
|
||||
workspace and authenticated MCP access. Their availability does not reserve assets.
|
||||
Studio reserves conflicting editing only for the admitted AI activity and its
|
||||
actual finalization. Legacy external DEV grant/reclaim remains an explicit,
|
||||
separate compatibility flow.
|
||||
|
||||
## Authority and Normative Inputs
|
||||
|
||||
This specification implements accepted **DEC-0060**, including D1–D7 and B1–B9.
|
||||
PLN-0139 sequences its implementation; it does not redefine this contract.
|
||||
The shared operation/runtime contracts remain applicable to both integrated AI
|
||||
and the legacy external DEV workflow. Integrated activity admission below defines
|
||||
the current desktop flow; manual grant buttons belong only to the legacy flow.
|
||||
|
||||
- [Core and Adapter Architecture](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md): dependency direction, composition and shared operations.
|
||||
- [Shell and Workspace Layout](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md): workspace mounting and project lifetime.
|
||||
@@ -44,8 +47,8 @@ implement a parallel permission/build/pack/execution system.
|
||||
| --- | --- |
|
||||
| Studio API | Plain-Java contracts, identities, snapshots, typed outcomes, diagnostics and ports; no toolkit, framework or concrete wire DTOs |
|
||||
| Studio Core | Project/session authority, guards, operations, build/pack/runtime coordination and ordered cleanup; testable without JavaFX or Spring |
|
||||
| JavaFX DEV | Human grant/reclaim actions, presentation, localization, canvas, subscriptions and FX-thread projection |
|
||||
| Application/infrastructure | MCP HTTP transport, process supervision, runtime JSONL translation, existing project LSP client, lifecycle and packaging |
|
||||
| JavaFX | Integrated conversation and activity projection; legacy DEV grant/reclaim; localization and subscriptions |
|
||||
| Application/infrastructure | MCP HTTP transport, process supervision, runtime JSONL translation, internal language workspace, lifecycle and packaging |
|
||||
| Runtime | Firmware/VM execution, input sampling, logical frames, ticks, rendering, watchdogs and faults |
|
||||
| External coding client | Agent/chat, model/provider credentials, native file editing, budget, iterations and simple task stopping criteria |
|
||||
|
||||
@@ -65,17 +68,19 @@ HTTP connection or UI component. The agent MUST supply a project root; Studio
|
||||
MUST validate it against an open project and use explicit project identity.
|
||||
Window focus MUST NOT implicitly select a call's target.
|
||||
|
||||
Connection authentication, human project grant and task control identity MUST
|
||||
be separate checks. At most one task MAY own a project's grant. Acquisition
|
||||
without a prior human grant MUST fail. A task identity MUST be required for
|
||||
authorized work and MUST NOT be reusable for another project or revoked task.
|
||||
Connection authentication, activity admission and task identity MUST be separate
|
||||
checks. The project-owned ACP coordinator MUST reserve the Core editing lane
|
||||
before submitting a prompt. `studio_control_acquire` returns the admitted task
|
||||
idempotently during that activity. Outside an integrated activity, external
|
||||
acquisition still requires an explicit human DEV grant. A task MUST NOT be reused
|
||||
across projects, activities or project generations.
|
||||
|
||||
| State | Admission and permitted behavior | Exit |
|
||||
| --- | --- | --- |
|
||||
| Manual control | Human editing/Debug; grant only with no active Debug or conflicting managed work, and successful document handoff | Human grant enters waiting |
|
||||
| Waiting for agent | Grant already blocks conflicting manual work; authenticated agent can acquire; human can reclaim without an agent connection | Acquisition enters working; reclaim enters returning |
|
||||
| Agent working | One acquired task uses its valid identity; developer can inspect, navigate and reclaim | Explicit task release or human revoke enters returning |
|
||||
| Returning control | Prior authority is invalid; stop managed work and refresh documents; manual conflicting actions remain blocked | Manual control only after cleanup/handoff |
|
||||
| Manual control | Editing and Play are available; AI admission refuses dirty documents, active manual work or Play, without saving/discarding/stopping them | Integrated admission enters working; legacy grant enters waiting |
|
||||
| Waiting for agent | Legacy external grant already blocks conflicting editing | Legacy acquisition enters working; reclaim enters returning |
|
||||
| Agent working | Integrated activity protects assets through prompt, permission waits and tool work; chat selection, writing drafts and cancel remain available | Coordinator finalization enters returning; integrated model release alone retains protection |
|
||||
| Returning control | Prior task is invalid; wait for workers/runtime shutdown and refresh documents | Manual control only after successful cleanup; failure retains protection and explicit retry |
|
||||
|
||||
Grant and acquisition MUST be enforced atomically with conflicting operation
|
||||
admission. Concurrent acquisition MUST NOT create two owners. Project-local
|
||||
@@ -84,7 +89,8 @@ authority MUST NOT become a global Studio lock.
|
||||
Human Debug active MUST prevent grant. From grant onward, including waiting
|
||||
and silence, Studio MUST prevent manual editing, Debug, build and other
|
||||
conflicting project mutation. Guards MUST apply at service entry points as
|
||||
well as UI bindings. Navigation, inspection and monitoring remain available.
|
||||
well as UI bindings. The integrated shell MUST stay in the AI area while activity
|
||||
is admitted/finalizing. Conversation inspection and cancellation remain available.
|
||||
|
||||
An operation finishing, failing compilation, raising a guest fault or losing
|
||||
its runtime session MUST NOT release task authority. Silence, client
|
||||
@@ -97,15 +103,18 @@ Grant MUST cover Studio-owned unsaved buffers/drafts, including dirty asset
|
||||
editing surfaces; it MUST NOT assume that source files are the only editable
|
||||
project content.
|
||||
|
||||
If such content is dirty, DEV MUST offer **Save all and grant** or **Cancel**.
|
||||
Integrated admission MUST refuse dirty content and preserve it, requiring an
|
||||
explicit save or discard in its owning editor before retrying Send. It MUST NOT
|
||||
silently save or discard it. In the legacy external flow only, DEV MUST offer
|
||||
**Save all and grant** or **Cancel**.
|
||||
Grant MUST follow successful saves; user cancellation or save failure MUST NOT
|
||||
cede control. Clean projects do not require a code snapshot, clean Git tree or
|
||||
commit. Document participants MUST use neutral handoff contracts without moving
|
||||
presentation buffers or JavaFX types into Core.
|
||||
|
||||
The agent edits the actual project folder with native external tools. Build
|
||||
MUST use saved files, and the existing project LSP client MUST synchronize
|
||||
saved content before semantic queries. Studio MUST NOT claim to save external
|
||||
MUST use saved files. MCP language queries MUST use a saved-file view distinct
|
||||
from editor overlays, while sharing the existing language engine internally. Studio MUST NOT claim to save external
|
||||
unsaved buffers or protect against concurrent external writes.
|
||||
|
||||
On authority return, Studio MUST refresh open documents from disk and MUST NOT
|
||||
@@ -121,7 +130,13 @@ engineering delivery that prepared this integration.
|
||||
|
||||
## 4. Return, Revocation and Closure
|
||||
|
||||
Explicit release and human reclaim MUST follow this order:
|
||||
Integrated normal completion MUST await the active operation's actual termination
|
||||
before return. Cancellation, transport failure and project close MUST cancel
|
||||
managed work and await termination. An ACP response, model release, completed
|
||||
response Future or cancellation acknowledgement alone MUST NOT unlock editing.
|
||||
An integrated model release acknowledges completion intent without revoking the
|
||||
coordinator-owned reservation. The coordinator's return, or legacy explicit
|
||||
release/human reclaim, MUST follow this order:
|
||||
|
||||
1. Invalidate task authority and reject new or delayed calls under the old identity.
|
||||
2. Cancel/stop managed work and shut down owned runtime processes.
|
||||
@@ -134,7 +149,7 @@ document refresh is complete. Diagnostics MUST distinguish cleanup failure from
|
||||
a successful return; operation outcome and authorization state are not the same.
|
||||
|
||||
Reclaim MUST also work while waiting for an agent or after an operation failure.
|
||||
Another task MUST require a new human grant. Closing/hiding/switching DEV MUST
|
||||
Another task MUST require a newly admitted integrated activity or a fresh explicit legacy external grant. Closing/hiding/switching DEV MUST
|
||||
NOT release control. Closing the project or Studio MUST revoke authority and
|
||||
stop managed processes before teardown of their providers/executors. Reopening
|
||||
MUST start in manual control, even when restoring DEV as the selected workspace.
|
||||
@@ -313,17 +328,17 @@ specified in [MCP Tools and Project Knowledge Contract](11.%20MCP%20Tools%20and%
|
||||
|
||||
The desktop MUST host Streamable HTTP at `127.0.0.1:<OS-assigned-port>/mcp`.
|
||||
DEC-0061 adds Studio-owned stdio discovery and one-time preparation as specified
|
||||
in spec 11. Each human grant publishes a fresh project-scoped credential through
|
||||
in spec 11. Each project opening publishes a fresh project-scoped credential through
|
||||
the required lifecycle participant in spec 8. Authentication, project scope and
|
||||
task identity remain separate checks. There is no global credential bypass.
|
||||
Restart invalidates old access and requires a fresh human grant, while the native
|
||||
Restart invalidates old access and requires fresh project access and activity admission, while the native
|
||||
client's command/configuration remains unchanged. No remote binding, accounts or
|
||||
OAuth are introduced. Preparation never grants editing authority.
|
||||
|
||||
| Tool group | Required capabilities | Required authority |
|
||||
| --- | --- | --- |
|
||||
| Context/references | Project identity, languages, versions, capabilities and paginated references | Project credential; no acquired task required |
|
||||
| Control | Acquire task and release control | Prior human grant for acquisition; valid task identity for release |
|
||||
| Control | Acquire task and release control | Admitted integrated activity or prior legacy human grant; valid task identity for release |
|
||||
| Language | Existing LSP diagnostics/navigation and supported capabilities | Valid project/task identity |
|
||||
| Build | Compile and pack | Valid project/task identity |
|
||||
| Headless | Boot/reset, input, advance, capture, state/fault and shutdown | Valid project/task identity |
|
||||
@@ -364,7 +379,7 @@ pagination, not arbitrary paths. Documentation ownership remains with its
|
||||
language/SDK/library owner; packaging does not create parallel language semantics.
|
||||
|
||||
Connection guidance MUST describe: connect → consult current project/languages/
|
||||
references → acquire after human grant → work using saved files and validate
|
||||
references → obtain the admitted integrated task (or acquire after a legacy human grant) → work using saved files and validate
|
||||
through LSP/build → release. The agent need not know PBS in advance. Missing
|
||||
documentation or unsupported language MUST appear as explicit limitations;
|
||||
static copied instructions MUST NOT substitute for current project context.
|
||||
|
||||
@@ -23,7 +23,7 @@ initialization exchange negotiates that supported revision; no compatibility
|
||||
with other revisions or deprecated HTTP+SSE transport is claimed. An offered
|
||||
unsupported revision receives the supported revision in `InitializeResult`.
|
||||
|
||||
Each desktop start generates a new instance identity. Each human project grant
|
||||
Each desktop start generates a new instance identity. Each successful project opening
|
||||
publishes a fresh 256-bit bearer credential scoped to that canonical project root.
|
||||
Every HTTP request MUST include `Authorization: Bearer <credential>`; missing,
|
||||
wrong or revoked credentials return 401. Initialized HTTP sessions MUST be bound
|
||||
@@ -113,7 +113,7 @@ file/permissions, stale credentials/instance, catalog incompatibility and transp
|
||||
reconnection. Calls cannot wait indefinitely for a grant. No reconnect path may
|
||||
resubmit a tool call. An uncertain response MUST retain available clientRequestId
|
||||
correlation and instruct receipt lookup within the same authorized task. A new
|
||||
desktop/task has no old receipt registry and requires a fresh human grant.
|
||||
desktop/task has no old receipt registry and requires a fresh integrated activity or explicit legacy external grant.
|
||||
Connector-generated uncertain-outcome errors carry that correlation in
|
||||
`error.details.clientRequestId`, within the advertised output schema; the text
|
||||
content block MUST serialize the identical structured envelope.
|
||||
@@ -180,9 +180,9 @@ prove authorization.
|
||||
The authority levels in the packaged catalog are:
|
||||
|
||||
- `authenticated`: connection authentication only; project/context/reference reads
|
||||
need no acquired task. HTTP access still requires the project credential published by human grant. Offline catalog discovery returns no task token.
|
||||
- `granted`: acquisition validates the prior human grant and atomically creates
|
||||
the sole task identity. The transport session ID is not that identity.
|
||||
need no acquired task. HTTP access still requires the credential published for the open project. Offline catalog discovery returns no task token.
|
||||
- `granted`: acquisition returns the existing admitted integrated task, or validates
|
||||
a prior human external grant and atomically creates the sole external task identity. The transport session ID is not that identity.
|
||||
- `task`: `projectRoot` and `taskId` must identify the current acquired task.
|
||||
Revalidate before admission, lookup and deduplication, including read-only LSP.
|
||||
|
||||
@@ -241,8 +241,11 @@ SDK/library scope. No query applies filesystem edits.
|
||||
|
||||
### 3.1 Language Query Operations
|
||||
|
||||
`studio_language_query` uses the existing project's LSP server via a real client,
|
||||
not a parallel language implementation or a direct call into compiler semantics.
|
||||
`studio_language_query` uses the project-owned internal language workspace and
|
||||
existing embedded LSP implementation. It MUST NOT require a TCP endpoint,
|
||||
`.studio/lsp.json`, JSON-RPC launcher or parallel compiler implementation in the
|
||||
integrated desktop. Editor clients consume a neutral typed language port; LSP4j
|
||||
and compiler classes remain application/provider details.
|
||||
Its successful value is `{operation, result, limitations}`. `result` is the JSON
|
||||
projection of the existing LSP response (including null or an empty list when
|
||||
appropriate); LSP union wrappers are unwrapped. Provider classes remain inside
|
||||
@@ -306,26 +309,29 @@ with `prepareCallHierarchy(uri, position)`, then use a returned opaque `itemId`
|
||||
`incomingCalls` or `outgoingCalls`. Returned hierarchy items may supply new `itemId`
|
||||
values for further traversal. Item IDs cannot be invented from symbol names or URIs.
|
||||
|
||||
The application lifecycle supplies each open project's bound loopback LSP
|
||||
endpoint. Studio uses OS-assigned ports so different open projects do not compete
|
||||
for one fixed port. The public LSP configuration default remains unchanged for
|
||||
other hosts. A manifest language change requires reopening that project's server;
|
||||
the adapter MUST NOT send queries to a server bound to another language/root.
|
||||
Opening any desktop project, including the Play shell, MUST start its internal
|
||||
language workspace; close MUST stop it. A manifest language change requires
|
||||
reopening; root/language and generation MUST be checked before dispatch and
|
||||
publication. Closing/reopening or switching projects MUST fence late results and
|
||||
expire task/source/hierarchy handles. A standalone TCP host MAY retain its own
|
||||
transport; it is not part of the integrated composition.
|
||||
|
||||
Each query uses a short-lived client connection. For physical document requests, the
|
||||
adapter opens exactly the saved UTF-8 text and waits for that connection's
|
||||
published diagnostics before issuing the semantic query. Other dependency files
|
||||
are read from disk by the existing compiler bridge. A fresh connection prevents
|
||||
reuse of stale overlays from previous requests or the human editor. Unsaved or
|
||||
concurrent external writes remain the developer's responsibility.
|
||||
Each MCP request uses the saved UTF-8 document and dependencies. Editor queries
|
||||
use a separate snapshot of open versioned overlays, including imported documents;
|
||||
MCP task release MUST NOT clear editor buffers. Conflicting/obsolete versions and
|
||||
results from superseded editor snapshots MUST be rejected. Refactoring returns
|
||||
proposals without applying edits. Saved primary-file revision changes during a
|
||||
query MUST invalidate its result. No long-lived compiler cache is required;
|
||||
assets, dependency/configuration and saved-file changes are read by fresh analysis.
|
||||
|
||||
Queries require the current task, share the project's work admission/cancellation
|
||||
and DEV operation observation, and do not silently queue behind conflicting work.
|
||||
Return/reclaim invalidates the task immediately, waits for worker termination,
|
||||
then clears task-local hierarchy items before manual control is restored. Item
|
||||
IDs from another task or project cannot be used. Client sockets/listeners close
|
||||
on success, failure, timeout or cancellation; project-server shutdown closes its
|
||||
accepted sockets and executor. A lost client does not independently grant control.
|
||||
Queries require the current task, share the project's admission/cancellation and
|
||||
operation observation, and do not silently queue behind conflicting task work.
|
||||
Internal compiler execution MUST run outside FX, serialize per project and use
|
||||
bounded queues, execution and cleanup response budgets. A timeout/cancel response
|
||||
MUST NOT be interpreted as worker termination. Return waits for actual termination,
|
||||
then clears task-local hierarchy/source handles. Project close cancels requests,
|
||||
rejects queued work and retains incomplete cleanup for retry. Editor and saved
|
||||
views MUST NOT share mutable document maps or task authority.
|
||||
|
||||
The adapter bounds connect time to 2 seconds within the shared 10-second admission-relative execution budget, followed by a 2-second cleanup response window;
|
||||
Core bounds the request worker wait to 12 seconds. Documents are limited to 4 MiB
|
||||
@@ -424,7 +430,10 @@ the registry, replays an advance or recovers authorization.
|
||||
`TaskTools` is the neutral service surface; MCP only validates schemas and projects
|
||||
its results. The Core implementation admits work through `AutomationSession.submit`
|
||||
and the existing operation executor, sharing DEV's busy state and cancellation.
|
||||
Acquisition requires the prior human grant. Release reports `MANUAL` only after
|
||||
Integrated acquisition returns the coordinator-admitted task; external acquisition
|
||||
requires the prior human DEV grant. Integrated release does not independently
|
||||
unlock editing; the activity coordinator owns finalization. Legacy release reports
|
||||
`MANUAL` only after
|
||||
managed cleanup and document refresh succeed; cleanup failures remain explicit.
|
||||
|
||||
Admission and request registration are atomic per project. Deduplication uses the
|
||||
@@ -549,7 +558,7 @@ reference provider, not a Studio-maintained language specification.
|
||||
|
||||
`studio_project_context` resolves an exact, canonical root registered by an open
|
||||
project session. It does not use the focused window, accept a source-directory
|
||||
path as a project root, acquire a manual lease, or acquire task authority. The HTTP boundary separately requires the grant-published project credential. A session
|
||||
path as a project root, acquire a manual lease, or acquire task authority. The HTTP boundary separately requires the open-project credential. A session
|
||||
is discoverable only after successful opening and until closure begins.
|
||||
Unregistered/closed roots return `PROJECT_NOT_OPEN`.
|
||||
|
||||
@@ -620,7 +629,7 @@ IDs or hashes when created, modified or removed. Regeneration MUST remove
|
||||
previously copied transient resources. The installed example MUST remain
|
||||
compilable and packable outside the source checkout without a preexisting cache.
|
||||
|
||||
`studio_reference_read` is authenticated but does not require an acquired task; the transport still requires a grant-published project credential. It resolves the explicit open root and its current saved manifest selection
|
||||
`studio_reference_read` is authenticated but does not require an acquired task; the transport still requires a open-project credential. It resolves the explicit open root and its current saved manifest selection
|
||||
on every read. Changing SDK/target can invalidate previously advertised IDs.
|
||||
Only IDs in that project's installed index can be read, including when other
|
||||
languages/providers are installed globally. SDK and external-library texts remain
|
||||
@@ -739,7 +748,9 @@ port as scaffold and DEV retry. Desktop composition MUST start the shared loopba
|
||||
server before project sessions become available; no external command or separate
|
||||
per-project desktop Run is required. Explicitly disabled integration MUST remain
|
||||
disabled. Preparation failure MUST remain visible in DEV readiness without blocking
|
||||
project use. Opening MUST NOT publish credentials or grant/acquire agent control.
|
||||
project use. Opening MUST publish project-scoped MCP access independently of task authority.
|
||||
It MUST NOT reserve assets or start an AI task. Preparation/connection failure MUST
|
||||
remain observable and retryable without claiming ACP login implies tool readiness.
|
||||
The coding client continues to own its configured stdio process and initial trust.
|
||||
|
||||
|
||||
|
||||
@@ -89,14 +89,16 @@ controls MUST remain outside that split. Adjusting it MUST NOT change execution
|
||||
state or restart the runtime. The split is retained for the open view; it does not
|
||||
introduce persisted project settings or a restoration contract across reopening.
|
||||
|
||||
It MUST NOT initialize an AI client or editor/LSP infrastructure when opening for
|
||||
Opening MUST initialize project-owned internal language and MCP services. The
|
||||
integrated AI connection follows specification 16. This does not mount an editor
|
||||
or add compiler work to FX when opening for
|
||||
Play. Existing headless, MCP, evidence, tests and agent contracts remain available
|
||||
through their existing entry points and services. Their preservation takes
|
||||
precedence over interactive convenience.
|
||||
|
||||
Editors, functional agent integration, tuning during Play,
|
||||
breakpoints, hot reload, PMC builds and distribution/export are outside this
|
||||
slice. Future packaging belongs in Studio as a separate action; Play MUST NOT
|
||||
A full editor, tuning during Play, breakpoints, hot reload, PMC builds and
|
||||
distribution/export are outside this interactive slice. Integrated AI follows
|
||||
specifications 15–16. Future packaging belongs in Studio as a separate action; Play MUST NOT
|
||||
implicitly package a PMC or a distributable runtime.
|
||||
|
||||
## Project selection, creation and loading
|
||||
@@ -354,8 +356,8 @@ available for attribution, with concise visual forms permitted.
|
||||
|
||||
The UI uses static presentation controls with existing themes, text scale,
|
||||
English/Portuguese localization and accessible labels. It MUST NOT instantiate
|
||||
an editor, full-document view, edit/save actions, editorial LSP or unused future
|
||||
editor infrastructure. The legacy JavaFX frontend is not modified by this feature;
|
||||
an editor, full-document view or edit/save actions. Project-owned internal language
|
||||
services still start at project open, independently of this diagnostic view. The legacy JavaFX frontend is not modified by this feature;
|
||||
neutral API constructors remain compatible with its compilation.
|
||||
|
||||
## Verification and limits
|
||||
@@ -394,3 +396,12 @@ Windows/Linux, release performance, physical HiDPI pixel alignment, and human
|
||||
listening/IME/accessibility walkthroughs require separate evidence. Diagnostic runs
|
||||
and failures remain in Work evidence; a later passing run does not establish their
|
||||
unobserved cause.
|
||||
|
||||
|
||||
## AI activity exclusion
|
||||
|
||||
Play admission MUST use the shared Core editing/execution guard. Active or
|
||||
finalizing AI activity MUST disable conflicting Play/settings/navigation actions
|
||||
and keep the AI workspace selected. A running Play session MUST cause AI admission
|
||||
to refuse without stopping Play or discarding game data. Closing requires confirmed
|
||||
agent and managed worker/runtime cleanup before releasing project resources.
|
||||
|
||||
@@ -152,3 +152,25 @@ Codex connection, sending, streaming, explicit permissions and cancellation foll
|
||||
[specification 16](16.%20Codex%20ACP%20Integration%20Specification.md). Asset attachment
|
||||
and persisted chat resumption remain future capabilities. Integration MUST preserve
|
||||
shared-composer ownership, independent drafts and the project lifetime boundary.
|
||||
|
||||
|
||||
## Project activity and readiness
|
||||
|
||||
Send MUST require ACP readiness and current project tool preparation. Authentication
|
||||
success alone MUST NOT imply MCP readiness. Preparation failures MUST remain
|
||||
visible, preserve drafts and offer an explicit retry. Activity admission and cleanup
|
||||
MUST run off FX through the shared Core guard. Admission refuses unsaved project
|
||||
buffers and conflicting manual/Play work without silent saving or stopping.
|
||||
|
||||
During admitted/finalizing AI work, the shell MUST stay in the AI area and disable
|
||||
conflicting project editing/Play/settings entry points. Chat selection, independent
|
||||
conversation drafts, reading, explicit permissions and Cancel remain usable. Model
|
||||
completion MUST wait for actual tool workers/runtime cleanup and document refresh
|
||||
before editing becomes available. Cleanup failure MUST retain protection, show the
|
||||
failure and provide an explicit cleanup retry. Cancel acknowledgement is not proof
|
||||
of termination.
|
||||
|
||||
Terminal presentation MUST distinguish `end_turn`, `cancelled`, `max_tokens`,
|
||||
`max_turn_requests`, `refusal`, transport failure and unknown interruption. Limited,
|
||||
refused and interrupted turns MUST NOT be shown as successful completion. Preserve
|
||||
the supplied stop reason without inventing missing tool outcomes.
|
||||
|
||||
@@ -7,8 +7,8 @@ Status: Implemented initial conversation slice. Owner: `studio`.
|
||||
The Studio JavaFX 2 project shell MUST consume an asynchronous, JavaFX-free
|
||||
`AgentConnection` port in Studio API. The application MUST own the process adapter
|
||||
and composition. UI MUST NOT launch processes or parse ACP; Core MUST NOT depend
|
||||
on JavaFX. This extends specifications 8 and 15 and does not change runtime or MCP
|
||||
authority. Assets, model selection, persistent chat indexing and history resumption
|
||||
on JavaFX. This extends specifications 8 and 15; integrated MCP editing authority follows
|
||||
specification 10 and is coordinated by the project-owned agent decorator. Assets, model selection, persistent chat indexing and history resumption
|
||||
are outside this slice.
|
||||
|
||||
## Project connection and authentication
|
||||
@@ -106,7 +106,9 @@ NOT silently create a replacement session pretending to retain conversation cont
|
||||
|
||||
Each `session/request_permission` MUST require an explicit choice from its offered
|
||||
options. The owned, nonblocking dialog MUST identify the chat and requested action,
|
||||
with a bounded scrollable action preview when supplied. Closing/cancelling MUST
|
||||
with a bounded scrollable action preview when supplied. Known credential patterns
|
||||
MUST be masked in permission titles/previews with the same policy as tool output;
|
||||
permission correlation and option IDs MUST remain intact. Closing/cancelling MUST
|
||||
return cancelled; unknown options MUST NOT authorize. Cancellation, turn completion
|
||||
and project close MUST dismiss stale permission dialogs. UI callbacks MUST run on FX;
|
||||
protocol IO and process waits MUST run off FX.
|
||||
@@ -143,3 +145,21 @@ the actual settings, prompt, chat routing, permissions and project lifetime with
|
||||
controlled backend. The opt-in live smoke MUST use a disposable project and an
|
||||
existing ChatGPT login, request no tools or file changes, and await full shutdown.
|
||||
Live smoke MUST NOT run as part of ordinary unit tests.
|
||||
|
||||
|
||||
## Integrated activity qualification
|
||||
|
||||
Before the native prompt is submitted, Core MUST admit exactly one activity for
|
||||
that project. Dirty editor/asset buffers, manual work and Play MUST refuse admission
|
||||
without modifying them. The reservation MUST outlive model `studio_control_release`
|
||||
and the ACP prompt response until managed work terminates and refresh succeeds.
|
||||
Cancel, crash, close and late callbacks MUST preserve this ordering. A stale
|
||||
completion MUST NOT cancel or release a subsequent activity.
|
||||
|
||||
Controlled peers MUST qualify ACP/tool/context/return sequencing separately from
|
||||
a real-model run. Full-path live qualification MUST use a disposable project,
|
||||
existing allowed authentication and actual MCP discovery, context/reference and
|
||||
tool queries; it MUST NOT copy credentials into the project or engineering memory,
|
||||
start browser login automatically, or treat a controlled fixture/environmental
|
||||
refusal as real-model success. The existing no-tools live conversation smoke remains
|
||||
an independent narrower check.
|
||||
|
||||
@@ -124,7 +124,7 @@ The JavaFX module MUST NOT directly invoke compiler implementations, `p.packer`,
|
||||
|
||||
Spring Boot MUST be used only by `prometeu-app` for desktop composition and lifecycle. `WebApplicationType.NONE` remains a valid composition mode with an explicitly managed local HTTP adapter. Conformance MUST NOT impose an unconditional absence of a web server that would forbid the DEC-0060 MCP exception.
|
||||
|
||||
The sole accepted HTTP-server use is an in-process MCP Streamable HTTP endpoint at `127.0.0.1:<OS-assigned-port>/mcp`. The application/infrastructure adapter MUST own its transport dependencies and lifecycle. It MUST require a fresh grant-published project credential, validate project/session scope and Origin, and stop with Studio. Connection authentication MUST NOT grant project/task authority. Credentials MUST NOT be stored in versioned files. Restart requires a fresh human grant, while the stable client configuration remains unchanged.
|
||||
The sole accepted HTTP-server use is an in-process MCP Streamable HTTP endpoint at `127.0.0.1:<OS-assigned-port>/mcp`. The application/infrastructure adapter MUST own its transport dependencies and lifecycle. It MUST require a fresh open-project credential, validate project/session scope and Origin, and stop with Studio. Connection authentication MUST NOT grant project/task authority. Credentials MUST NOT be stored in versioned files. Restart requires fresh project access and a newly admitted activity, while the stable client configuration remains unchanged.
|
||||
|
||||
This exception does not authorize a web UI, remote binding, general-purpose web application, accounts or OAuth. DEC-0061 explicitly adds the Studio-owned stdio mode and local client preparation. HTTP/MCP dependencies MUST NOT enter API/Core or the JavaFX adapter. Spring Data, Spring AI and durable event infrastructure remain outside the accepted architecture.
|
||||
|
||||
@@ -149,7 +149,7 @@ A narrow consumer-owned gateway MUST be used when the available integration is c
|
||||
| JavaFX UI | Studio | Studio API only |
|
||||
| MCP adapter | Studio | Studio API only; transport DTO translation belongs to infrastructure |
|
||||
|
||||
The headless gateway MUST start `prometeu headless --stdio` from the configured runtime installation and map the runtime-owned JSONL contract to neutral results. It MUST NOT reuse the human DevTools connection, introduce a native Rust/Java binding, search/download another runtime, or redefine firmware/VM semantics. Runtime process supervision and the existing project LSP client belong to application/infrastructure adapters, not UI controls.
|
||||
The headless gateway MUST start `prometeu headless --stdio` from the configured runtime installation and map the runtime-owned JSONL contract to neutral results. It MUST NOT reuse the human DevTools connection, introduce a native Rust/Java binding, search/download another runtime, or redefine firmware/VM semantics. Runtime process supervision and the project-owned internal language workspace belong to application/infrastructure adapters, not UI controls.
|
||||
|
||||
`p.packer` remains an autonomous domain and MUST NOT depend on any `p.studio` package. Studio MUST NOT copy or assume ownership of Packer semantics.
|
||||
|
||||
@@ -367,3 +367,21 @@ Encoded guest messages MUST fit 256 UTF-8 bytes and stay within the unchanged
|
||||
runner drains every pending native page before another bounded advance. Native
|
||||
continuity alone cannot detect events dropped before ring insertion. No new guest
|
||||
ABI, formatting facility or increased execution/logging budget is introduced.
|
||||
|
||||
|
||||
## Internal project language and integrated activity
|
||||
|
||||
The application MUST compose one language workspace per open project, using the
|
||||
existing compiler bridge and embedded LSP services without a TCP listener. API
|
||||
exposes versioned document requests and JSON-compatible results; Core owns its
|
||||
lifecycle and editor document handoff through neutral ports. Editor overlays and
|
||||
MCP saved-file requests share the engine while keeping separate document views.
|
||||
Backend execution and bounded admission MUST remain outside FX. Project generation
|
||||
and document revisions fence results; shutdown waits for actual workers.
|
||||
|
||||
Core MUST reserve conflicting project editing before ACP prompt submission. A
|
||||
project-owned agent decorator coordinates admission, model completion, cancellation,
|
||||
managed worker/runtime finalization and refresh. MCP authentication is available
|
||||
at project open and never implies task authority. UI bindings project this guard;
|
||||
they MUST NOT be its authority. An integrated model release alone MUST NOT unlock
|
||||
editing. Failed cleanup retains the reservation and exposes an explicit retry.
|
||||
|
||||
Reference in New Issue
Block a user