experimental/web_socket library

Experimental ACP WebSocket client APIs.

These APIs may change before a stable release. Browser WebSocket uses the browser cookie jar and cannot attach caller-provided handshake headers.

Classes

AcpAffinityCookieStore
Minimal URI-scoped storage for server-issued ACP routing-affinity cookies.
AcpHttpHeaders
Immutable, case-insensitive HTTP headers with preserved repeated values.
AcpRemoteDiagnostic
A safe diagnostic emitted while parsing a remote transport.
AcpWebSocketAdapter
Platform boundary used by the experimental WebSocket client.
AcpWebSocketBinaryFrame
One unsupported binary frame.
AcpWebSocketChannel
One connected WebSocket channel.
AcpWebSocketClientTransport
Experimental ACP client transport over WebSocket text frames.
AcpWebSocketConnectRequest
Immutable request to open a WebSocket.
AcpWebSocketFrame
One inbound WebSocket frame.
AcpWebSocketTextFrame
One UTF-8 text frame.

Enums

AcpHttpCookiePolicy
Whether a remote HTTP adapter should use its platform cookie facilities.

Functions

acpApplicationStream(AcpDuplexStream<JsonRpcWireMessage> stream, {JsonRpcCodec codec = const JsonRpcCodec()}) AcpDuplexStream<Object?>
Adapts a typed remote wire stream for an ACP agent or client application.
createPlatformWebSocketAdapter() AcpWebSocketAdapter
Creates the WebSocket adapter for the current platform.

Typedefs

AcpAffinityCookieDomainPolicy = bool Function(Uri responseUri, String cookieDomain)
Decides whether an explicit server Domain attribute may widen cookie scope beyond the response origin.
AcpRemoteDiagnosticHandler = void Function(AcpRemoteDiagnostic diagnostic)
Receives redacted remote-transport diagnostics.

Exceptions / Errors

AcpWebSocketTransportException
Safe failure from the experimental WebSocket transport.