export declare function readBridgeLockfile(uprojectPath: string | null): { port: number; pid: number; startedAt?: string; apiVersion?: number; } | null; export interface BridgeResponse { id: string; result?: unknown; error?: { code: number; message: string; }; } /** Minimal interface for tool handlers — enables mocking in tests. */ export interface IBridge { readonly isConnected: boolean; call(method: string, params?: Record, timeoutMs?: number): Promise; connect(timeoutMs?: number): Promise; } export declare class EditorBridge implements IBridge { host: string; port: number; private ws; private pending; private reconnectTimer; private connectInFlight; private idCounter; constructor(host?: string, port?: number); get isConnected(): boolean; ensureConnected(timeoutMs?: number): Promise; /** * #492: project context for resolving the per-project port lockfile. Set * by index.ts after the user's .uproject is loaded. Leaving this null * keeps the default-port-only behaviour for callers that don't have a * project context (CLI tools, tests). */ projectPathForLockfile: string | null; connect(timeoutMs?: number): Promise; startReconnecting(intervalMs?: number): void; stopReconnecting(): void; call(method: string, params?: Record, timeoutMs?: number): Promise; disconnect(): void; private setupListeners; }