export interface BridgeRuntime { port: number; pid: number; startedAt: string; } export declare function runtimeFile(): string; /** Runtime file written by the daemon on start (stale entries are fine). */ export declare function writeRuntimeFile(entry: BridgeRuntime): void; export declare function readRuntimeFile(): BridgeRuntime | null; /** * Best arbiter base URL: explicit env override > runtime file > probe the * candidate ports once. Returns null when no daemon answers - callers must * fail open. */ export declare function discoverArbiter(): Promise; export type WsEventType = 'lock.waiting' | 'lock.granted' | 'lock.released' | 'build.start' | 'build.finish' | 'peer.ping' | 'presence.here' | 'worktree.created' | 'worktree.removed'; export interface WsEvent { type: WsEventType; /** ISO timestamp (filled automatically). */ ts?: string; dir?: string; agentId?: string; kind?: string; taskId?: string; note?: string; } /** Log always; relay to the daemon's SSE hub when reachable. Never throws. */ export declare function publishEvent(event: WsEvent): void; /** Convenience: did `file` appear recently (used by tests). */ export declare function arbitrationLogExists(): boolean;