Skip to main content
handleCall(opts): Promise<HandleCallResult>
Dispatch one RPC with NO connection — the transportless counterpart of a socket call frame, for front-door encoders (e.g. the HTTP handler in the agent-http subpath) whose requests each carry exactly one call. The call passes every connection gate, in bootstrap order: onConnect (when configured; a rejection answers as the close it chose), authorize (when configured; a rejected credential answers the connection-level unauthorized error frame), onAttach (when configured; a veto answers as its close), then the "rpc" claim gate (a call-correlated unauthorized) and the same method dispatch as a socket call — the same codes for reserved / private / unknown methods, faults, and unserializable results. Unlike a connection it never reads snapshot sources, is never admitted as a watcher, and receives no broadcasts. Parameters Returns Promise<HandleCallResult> The answer frame, or the gate close that refused the call — never a rejection.

HandleCallOptions

One transportless RPC for handleCall. Properties args?
optional args?: readonly unknown[]
Positional arguments, like a socket call frame’s args.
id
id: string
Correlation id stamped on the answer frame.
method
method: string
The public method name to dispatch (same rules as a socket call frame).
req?
optional req?: Request
The caller’s request; the connection gates and authorize receive it.
token?
optional token?: string
The caller’s credential, resolved through authorize when configured.

HandleCallResult

HandleCallResult = { frame: AnyKnownFrame; } | { closed: { code: number; reason: string; }; }
The answer to a transportless call (AgentSocketServer.handleCall): either frame — the same result / error frame a socket caller would receive for this call — or closed, the close code/reason an application gate (onConnect rejection, onAttach veto) refused the call with instead of a frame, exactly as it would have closed a socket.