Optional ReadonlyadditionalServer-composed, reviewed mounts; not a browser or wire-provided capability grant.
ReadonlyagentOptional ReadonlybindBind approvals/extensions to the real owning session and its existing pipeline.
ReadonlycompositionOptional ReadonlyexpectedReadonlyharnessReadonlymakeOptional ReadonlymaxReadonlypolicyReadonlyrouteOptional ReadonlysessionMinted when absent, so a caller that has no id of its own need not invent one.
ReadonlysystemOptional ReadonlytoolsACP explicitly defaults to none; existing direct callers retain workspace tools.
Optional ReadonlyvalidationReadonlyworkspace
One AMC session, many prompts (plan P7.1a).
WHY THIS EXISTS.
runComposedTurn(../kernel/agentLoopRunner.ts) constructs aSessionService, opens it, and closes it in its ownfinally. It takes no session parameter, so a protocol server calling it once per incoming prompt would mint a fresh session and a fresh hash chain every time: turn two would not see turn one. Any surface that tells a client it holds a CONVERSATION -- ACP among them -- needs a session that outlives a single prompt, and there was no composed entry point that offered one.IT IS DELIBERATELY KERNEL-FREE.
src/agent/imports no@amc/*package, and the architecture boundary permits Cordis only undersrc/kernel/**. That is not a formality:@amc/cordisis a workspace package absent from the published npm tarball, so anything routed through the kernel works only from a repository checkout. A server an editor spawns from an installedamccannot live there. Every seam composed below -- toolset, driver, session, llm -- is already outside the kernel, which is what makes this shippable.ONE PROMPT AT A TIME.
AgentDriveris serial, andwhenIdle()resolves when the driver is idle rather than when a particular prompt finished. Two overlapping prompts would therefore both observe the same idle edge and each be handed the other's work. The slot is claimed synchronously, before the first await, so two callers racing cannot both find it free.MODELLED ON
createDriverRunner(./subagentRunner.ts), which already does all of this for delegated children. The shape here is the same minus the delegation accounting: same composition, same fresh-text cursor, same refusal to hand back unsigned output.