/** Minimal socket shape — avoids importing socket.io-client types here. */ interface MinimalSocket { connected: boolean; emit(event: string, ...args: unknown[]): unknown; } interface SessionFrame { stream: 'stdout' | 'stderr'; text: string; at: string; } export declare class SessionRelay { /** agentId → live socket (set on daemon connect, cleared on disconnect). */ private readonly sockets; /** sessionId → active session state. */ private readonly sessions; /** agentId → active sessionId (for watch:agent discovery). */ private readonly agentCurrent; registerSocket(agentId: string, socket: MinimalSocket): void; unregisterSocket(agentId: string): void; sessionStart(body: { sessionId: string; agentId: string; projectId?: string; taskId?: string; mode: 'run' | 'chat' | 'build'; model?: string | null; startedAt?: string; }): boolean; sessionOutput(body: { sessionId: string; stream: 'stdout' | 'stderr'; text: string; at: string; }): boolean; sessionEnd(body: { sessionId: string; exitCode?: number | null; }): boolean; current(agentId: string): string | null; replay(sessionId: string): SessionFrame[]; private flushSession; /** Emits pending frames if the socket is up; NEVER drops them while down. */ private emitFrames; private persist; } export {};