/** * WebSocket JSON-RPC session adapter. * * Each `/jsonrpc` WebSocket connection gets one `JsonRpcWebSocketSession` * that binds the authenticated principal at upgrade time and reuses it * for every frame. The session: * - Parses incoming frames as single JSON-RPC requests (batches over * WS are rejected per stable operation-catalog contract). * - Dispatches `weft.workflows.subscribe` / `weft.workflows.unsubscribe` * as first-class session primitives against the `WorkflowEventFeed`. * - Delegates all other methods to the standard `dispatchJsonRpc`. * - Emits live envelopes as `weft.events.deliver` notifications keyed * by the assigned `subscriptionId`. * - Guarantees every active subscription is torn down on `close()` * (or socket disconnect at the transport layer). */ import type { JsonRpcWebSocketSession, JsonRpcWebSocketSessionOptions } from './json-rpc-websocket-types.ts'; export type { JsonRpcWebSocketEmitter, JsonRpcWebSocketSession, JsonRpcWebSocketSessionOptions, } from './json-rpc-websocket-types.ts'; export declare function createJsonRpcWebSocketSession(options: JsonRpcWebSocketSessionOptions): JsonRpcWebSocketSession;