import { WebSocket } from 'ws'; import type { TuiFrame } from '../../tui/protocol.js'; export declare class TuiConnection { readonly conduitId: string; readonly ws: WebSocket; activeSessionId: string | null; activeProjectId: string; uiSubscriptions: Set; /** Active UiService subscription handles — closed on cleanup */ activeSubscriptions: Map; /** pending actions keyed by action id (triggerId suffix) */ pendingActions: Map; /** pending modal acks keyed by modal submit id */ pendingModalAcks: Map; private _closed; constructor(conduitId: string, ws: WebSocket, projectId: string); /** Encode and send a TuiFrame over the WebSocket. No-op if already closed. */ send(frame: TuiFrame): void; /** Close the WebSocket connection with an optional close code and reason. */ close(code?: number, reason?: string): void; /** True if the connection has been closed. */ get closed(): boolean; }