ExperimentalExperimental
Connects this client app to a transport stream.
Experimental
Connects this client app directly to an agent app.
This is useful for tests and in-process examples that do not need a transport.
Experimental
Connects this client app to a stream or agent app for the lifetime of op.
The callback receives a ClientContext for calling agent-side methods.
When op resolves or rejects, the connection is closed.
Experimental
Registers a handler that runs when this client app opens a connection.
Use this for connection-scoped work that needs to call agent-side ACP methods outside an inbound request handler.
Experimental
Registers a client request handler by ACP method name.
Built-in method literals infer their params and response types from
method. Pass a parser as the second argument to register custom extension
methods.
Use "*" without a parser for a raw fallback after normal dispatch.
Experimental
Registers a client request handler by ACP method name.
Built-in method literals infer their params and response types from
method. Pass a parser as the second argument to register custom extension
methods.
Use "*" without a parser for a raw fallback after normal dispatch.
Experimental
Registers a client request handler by ACP method name.
Built-in method literals infer their params and response types from
method. Pass a parser as the second argument to register custom extension
methods.
Use "*" without a parser for a raw fallback after normal dispatch.
Experimental
Registers a client request handler by ACP method name.
Built-in method literals infer their params and response types from
method. Pass a parser as the second argument to register custom extension
methods.
Use "*" without a parser for a raw fallback after normal dispatch.
Experimental
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. ACP requires a session's
session/update notifications to be applied in the order they are
received, so a session/update 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.
Experimental
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. ACP requires a session's
session/update notifications to be applied in the order they are
received, so a session/update 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.
Experimental
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. ACP requires a session's
session/update notifications to be applied in the order they are
received, so a session/update 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.
Experimental
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. ACP requires a session's
session/update notifications to be applied in the order they are
received, so a session/update 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.
Client-side app builder for the experimental draft ACP v2 API.
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 aClientContextfor calling agent-side requests and session helpers.