Interface: GuestEndpointHooks
Defined in: src/batteries/isolation/protocol.ts:407
Hooks GuestEndpoint invokes for the guest server (serve.ts) to react to.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
onCall? | (id: string, method: string, args: WireValue[], signal: AbortSignal) => void | A call envelope arrived — resolve/reject settle with the method's outcome. | src/batteries/isolation/protocol.ts:409 |
onEnvelope? | (dir: "in" | "out", envelope: WireEnvelope) => void | Any envelope was sent (dir: 'out') or received (dir: 'in') — for wire tracing. | src/batteries/isolation/protocol.ts:424 |
onHostResult? | (id: string, result: | { ok: true; value: string | WireValue; } | { error?: WireError; ok: false; value?: string; }) => void | A host capability result arrived. | src/batteries/isolation/protocol.ts:411 |
onShutdown? | () => void | A shutdown envelope arrived. | src/batteries/isolation/protocol.ts:422 |
onStreamCancel? | (id: string, reason?: WireValue) => void | A stream:cancel envelope arrived for an open stream id. | src/batteries/isolation/protocol.ts:420 |
onStreamStart? | (id: string, stream: string, args: WireValue[], signal: AbortSignal) => void | A stream:start envelope arrived — the handler pushes deltas via the returned sink. | src/batteries/isolation/protocol.ts:418 |