import { type Command, type StampedTelemetry } from './protocol.js'; export interface BridgeStatus { running: boolean; port: number | null; /** Present only while running; the plugin needs it, nobody else does. */ token: string | null; projectPath: string | null; clients: number; authenticatedClients: number; buffered: number; droppedFrames: number; startedAt: string | null; handshakeFile: string | null; } /** * Start the bridge for a project. Starting an already-running bridge returns * its current status instead of throwing. `port` 0 asks the OS for a free * port, which is what the tests use. */ export declare function startBridge(projectPath: string, port?: number): Promise; /** Stop the bridge, drop every client and remove the handshake file. */ export declare function stopBridge(): Promise; export declare function statusBridge(): BridgeStatus; /** * Take telemetry out of the buffer. Draining is destructive by default so an * agent polling in a loop sees each frame once; pass `peek` to leave it in * place. `types` filters to specific frame types (e.g. only exceptions). */ export declare function drainTelemetry(opts?: { limit?: number; types?: string[]; peek?: boolean; }): StampedTelemetry[]; /** Send a command to every authenticated client. Returns how many got it. */ export declare function sendCommand(cmd: Command): number; /** * Send a command and wait for the frame carrying the same requestId. Rejects on * timeout rather than hanging a tool call forever. */ export declare function requestCommand(cmd: Omit, timeoutMs?: number): Promise;