Optionalsignal: AbortSignalSnapshot actions currently tracked as in-flight.
Attach and drive one transport endpoint.
The returned status covers the stream startup handshake. The session keeps pumping it afterwards; await done for connection-wide completion.
Await all actions observed during the wait and aggregate their failures.
OptionaltimeoutMs: numberRequest cancellation of every action without waiting for teardown.
Resolve, acknowledge, and start one inbound registered action call.
Apply a received fragment, including reserved action-status nodes.
Dispatch every action and fragment in one validated inbound message.
Await full cleanup and receive the session's terminal status.
Whether either endpoint has ended the session for new work.
Whether every attached stream has completed and state is fully quiescent.
Queue a message on a named stream or round-robin across active streams.
Replace the registry and rebind active actions for later name resolution. Prefer configuring it before dispatch so one operation does not observe registrations from different registry versions.
Snapshot the streams currently attached to this session.
StaticcreateCreate an open session and start deadline/no-stream supervision.
Connection-scoped runtime that turns wire traffic into agent work.
A session owns a shared NodeMap, optional ActionRegistry, one or more WireStreams, and every action running across them. Incoming WireMessages are split into action calls and node fragments; bounded, per-stream pumps preserve backpressure while handlers run asynchronously. Outgoing messages may target a stream explicitly or use round-robin routing.
The session starts open. halfClose stops new sends/actions and asks every transport to drain normally. abort cancels actions and carries a structured failure to peers. The promise returned by done resolves only after all attached stream state has been removed;
isClosed()can therefore become true beforeisDone().