feat(studio): coordinate integrated AI activity and internal language services
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/head This commit looks good

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:
2026-11-27 09:58:57 +00:00
parent 802a13a6aa
commit e6542df56e
46 changed files with 1485 additions and 180 deletions
@@ -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.