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

    Class ClientApp

    Client-side app builder.

    Methods on this class register typed client handlers and return this, so apps can be built with a fluent chain. connectWith(...) is the usual entry point for clients because it provides a ClientContext for calling agent-side requests and session helpers.

    Index
    • Registers a client notification handler by ACP method name.

      Built-in method literals infer their params type from method. Pass a parser as the second argument to register custom extension notifications. Use "*" without a parser for a raw fallback after normal dispatch.

      The connection dispatches one message per event-loop task, in the order received, so handlers start in that order across all methods. It does not wait for an async handler to settle before dispatching the next message, so async handlers can run concurrently. To apply a session's session/update notifications in the order they are received, a handler that awaits before applying an update must serialize that work itself, for example by chaining it onto a per-session promise. ActiveSession already queues updates in arrival order.

      Parameters

      Returns this

    • Registers a client notification handler by ACP method name.

      Built-in method literals infer their params type from method. Pass a parser as the second argument to register custom extension notifications. Use "*" without a parser for a raw fallback after normal dispatch.

      The connection dispatches one message per event-loop task, in the order received, so handlers start in that order across all methods. It does not wait for an async handler to settle before dispatching the next message, so async handlers can run concurrently. To apply a session's session/update notifications in the order they are received, a handler that awaits before applying an update must serialize that work itself, for example by chaining it onto a per-session promise. ActiveSession already queues updates in arrival order.

      Type Parameters

      Parameters

      Returns this

    • Registers a client notification handler by ACP method name.

      Built-in method literals infer their params type from method. Pass a parser as the second argument to register custom extension notifications. Use "*" without a parser for a raw fallback after normal dispatch.

      The connection dispatches one message per event-loop task, in the order received, so handlers start in that order across all methods. It does not wait for an async handler to settle before dispatching the next message, so async handlers can run concurrently. To apply a session's session/update notifications in the order they are received, a handler that awaits before applying an update must serialize that work itself, for example by chaining it onto a per-session promise. ActiveSession already queues updates in arrival order.

      Type Parameters

      • Params

      Parameters

      Returns this