Agent Client Protocol - v2.12.0
    Preparing search index...

    Interface ClientConnection

    Client-side connection returned by ClientApp.connect(...).

    Use agent to call agent-side ACP methods and session helpers for the lifetime of the connection.

    interface ClientConnection {
        signal: AbortSignal;
        closed: Promise<void>;
        close(error?: unknown): void;
        agent: ClientContext;
    }

    Hierarchy (View Summary)

    Index
    signal: AbortSignal

    AbortSignal that aborts when the connection closes.

    Unless close() closed the connection, notifications received before it closed can still reach their handlers after the signal aborts.

    closed: Promise<void>

    Promise that resolves when the connection closes.

    Unless close() closed the connection, notifications received before it closed can still reach their handlers after this resolves.

    Context for calling agent-side ACP methods.

    • Closes the connection and rejects pending requests. Messages received but not yet dispatched are dropped. Does nothing once the connection is closed.

      Parameters

      • Optionalerror: unknown

      Returns void