/** * Minimal WebSocket abstraction the data plane splices over. Kept as an injected interface so * the mux/data-plane code has NO hard dependency on the `ws` package (pure + unit-testable); * the composition root adapts a real `ws` socket to this shape. */ export interface WebSocketLike { send(data: Uint8Array): void close(code?: number): void onMessage(handler: (data: Uint8Array) => void): void onClose(handler: () => void): void }