Connects this agent app directly to a client app.
This is useful for tests and in-process examples that do not need a transport.
Connects this agent app to a transport stream for the lifetime of op.
The callback receives an AgentContext for calling client-side methods.
When op resolves or rejects, the connection is closed.
Connects this agent app directly to a client app for the lifetime of op.
Registers a handler that runs when this agent app opens a connection.
Use this for connection-scoped work that needs to call client-side ACP methods outside an inbound request handler.
Registers a 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.
Registers a 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.
Registers a 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.
Registers a 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.
Agent-side app builder.
Methods on this class register typed request or notification handlers and return
this, so apps can be built with a fluent chain. Handler params are parsed with the generated ACP schemas before your handler runs, and thrown errors are converted to JSON-RPC errors by the connection layer.