Agent Maturity Compass API - v1.2.0
    Preparing search index...

    Interface AgentSessionInit

    One AMC session, many prompts (plan P7.1a).

    WHY THIS EXISTS. runComposedTurn (../kernel/agentLoopRunner.ts) constructs a SessionService, opens it, and closes it in its own finally. 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 under src/kernel/**. That is not a formality: @amc/cordis is 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 installed amc cannot 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. AgentDriver is serial, and whenIdle() 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.

    interface AgentSessionInit {
        additionalCapabilities?: readonly NativeToolCapability[];
        agentId: string;
        bindTools?: (
            context: { session: SessionService; toolset: AgentToolset | null },
        ) => AgentToolSeam;
        compositionDigest: string;
        expectedToolsDigest?: string;
        harnessVersion: string;
        makeLlm: (session: SessionService) => LoopLlm;
        maxSteps?: number;
        policyDigest: string;
        route: LoopRoute;
        sessionId?: string;
        systemPrompt: string;
        tools?: "none" | "workspace";
        validation?: NativeValidationPlan;
        workspace: string;
    }
    Index
    additionalCapabilities?: readonly NativeToolCapability[]

    Server-composed, reviewed mounts; not a browser or wire-provided capability grant.

    agentId: string
    bindTools?: (
        context: { session: SessionService; toolset: AgentToolset | null },
    ) => AgentToolSeam

    Bind approvals/extensions to the real owning session and its existing pipeline.

    compositionDigest: string
    expectedToolsDigest?: string
    harnessVersion: string
    makeLlm: (session: SessionService) => LoopLlm
    maxSteps?: number
    policyDigest: string
    route: LoopRoute
    sessionId?: string

    Minted when absent, so a caller that has no id of its own need not invent one.

    systemPrompt: string
    tools?: "none" | "workspace"

    ACP explicitly defaults to none; existing direct callers retain workspace tools.

    validation?: NativeValidationPlan
    workspace: string