import { AftRpcClient } from "../shared/rpc-client"; export interface SocketNotification { id: number; type: string; payload: Record; sessionId?: string; } export interface StatusInvalidation { sessionId?: string; } export interface TuiSocketOptions { getDirectory: () => string | null | undefined; getSessionId: () => string | null; onNotification: (notification: SocketNotification) => boolean | Promise; } interface WebSocketLike { readyState: number; addEventListener(type: "open" | "message" | "close" | "error", listener: (event: unknown) => void): void; send(data: string): void; close(): void; } type WebSocketFactory = new (url: string) => WebSocketLike; type RpcClientLike = Pick; interface SocketDeps { createClient: (directory: string) => RpcClientLike; WebSocketCtor: WebSocketFactory | null; setTimeout: typeof setTimeout; clearTimeout: typeof clearTimeout; } export declare function startAftTuiSocket(options: TuiSocketOptions): void; export declare function stopAftTuiSocket(): void; export declare function refreshAftTuiSocketScope(): void; export declare function subscribeStatusInvalidations(listener: (event: StatusInvalidation) => void): () => void; export declare function createDebouncedStatusRefresh(refresh: () => void | Promise, delayMs: number): { schedule: () => void; dispose: () => void; }; export declare function __setAftTuiSocketDepsForTest(overrides: Partial): () => void; export declare function __resetAftTuiSocketForTest(): void; export {}; //# sourceMappingURL=notification-socket.d.ts.map