Agent Client Protocol - v1.0.0
    Preparing search index...

    Class ActiveSession

    Convenience wrapper for an active ACP session.

    An active session routes session/update notifications for one session ID into an async queue. Use prompt(...) to send user content, then read updates with nextUpdate() until a stop message is returned.

    Index

    Accessors

    • get sessionId(): string

      Session ID returned by session/new.

      Returns string

    • get meta(): { [key: string]: unknown } | null | undefined

      Metadata returned when the session was created.

      Returns { [key: string]: unknown } | null | undefined

    Methods

    • Reads text chunks until the current prompt turn stops.

      Only agent_message_chunk updates with text content are appended. Other update types are ignored by this helper; use nextUpdate() when you need tool calls, plans, or the final PromptResponse.

      Returns Promise<string>

    • Stops routing updates to this active-session helper.

      This does not close the ACP session on the agent. Use ClientContext session lifecycle methods when the protocol session itself should be closed or deleted.

      Returns void

    • Supports explicit resource management with using.

      Returns void