Skip to content
1 min read · 151 words

Interface: HostEndpointHooks

Defined in: src/batteries/isolation/protocol.ts:125

Callback surface for observing host-endpoint lifecycle and guest-originated events.

Remarks

Hooks are notifications only; dispatch and correlation remain owned by the endpoint.

Properties

PropertyTypeDescriptionDefined in
onEnvelope?(dir: "in" | "out", envelope: WireEnvelope) => voidAny envelope was sent (dir: 'out') or received (dir: 'in') — for wire tracing.src/batteries/isolation/protocol.ts:133
onEvent?(channel: string, payload: WireValue) => voidAn event envelope arrived for channel.src/batteries/isolation/protocol.ts:129
onHostcall?(id: string, method: string, args: WireValue[]) => voidA guest-to-host capability request arrived. It is deliberately independent of call.src/batteries/isolation/protocol.ts:131
onReady?(info: { encoderAvailable: boolean; }) => voidThe guest's ready envelope arrived.src/batteries/isolation/protocol.ts:127