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

    Interface AgentSession

    Native in-process and capability-negotiated subprocess image input.

    interface AgentSession {
        sessionId: string;
        cancel(cause: TurnCancelCause, by: string): void;
        close(): void | Promise<void>;
        prompt(
            text: string,
            images?: readonly NativeImageInput[],
        ): Promise<AgentPromptResult>;
        promptAudioParts?(
            parts: readonly NativeAudioPart[],
        ): Promise<AgentPromptResult>;
        promptParts?(parts: readonly NativeInputPart[]): Promise<AgentPromptResult>;
        readEvents(): readonly EvidenceEvent[];
        release?(): void | Promise<void>;
    }

    Hierarchy

    Index
    sessionId: string
    • Parameters

      • cause: TurnCancelCause
      • by: string

      Returns void

    • Seals the session. Safe to call more than once.

      Returns void | Promise<void>

    • Run one prompt to completion. Rejects a second while one is in flight.

      Parameters

      Returns Promise<AgentPromptResult>

    • This session's committed rows.

      Exposed because the log is the only signed record of what a prompt did, so a caller that must report progress reads rows rather than being handed a second, unsigned narration of the same events.

      Returns readonly EvidenceEvent[]

    • Explicit signed handoff at an idle boundary; ordinary close still seals.

      Returns void | Promise<void>