/** * Global dashboard session registry. * Tracks ALL sessions (HTTP + STDIO) for dashboard visibility and GC. */ interface DashboardSessionInfo { mcpSessionId: string; threadId: number | null; transportType: "http" | "stdio"; status: "active" | "disconnected"; lastActivity: number; lastWaitCallAt: number | null; disconnectedAt: number | null; } /** Register a new session for dashboard tracking. */ export declare function registerDashboardSession(mcpSessionId: string, transportType: "http" | "stdio", threadId?: number | null): void; /** Update the last activity timestamp for a session. */ export declare function updateDashboardActivity(mcpSessionId: string): void; /** Update the threadId for a session (called after start_session resolves). */ export declare function updateDashboardThreadId(mcpSessionId: string, threadId: number | null): void; /** Record a wait_for_instructions heartbeat. */ export declare function updateLastWaitCall(mcpSessionId: string): void; /** Mark a session as disconnected. */ export declare function markDashboardSessionDisconnected(mcpSessionId: string): void; /** Remove a session from dashboard tracking entirely. */ export declare function removeDashboardSession(mcpSessionId: string): void; /** Get all dashboard-tracked sessions. */ export declare function getDashboardSessions(): DashboardSessionInfo[]; /** Grace period: a session is "truly alive" if lastWaitCallAt is within this. */ export declare const WAIT_LIVENESS_MS: number; /** * Thread IDs of sessions that are actively parked in wait_for_instructions * (status active + lastWaitCallAt within `withinMs`). Used by self-update to * know which agents are live enough to be expected to observe the maintenance * flag before the HTTP port is closed. */ export declare function getLiveWaitingThreadIds(withinMs?: number): number[]; export {}; //# sourceMappingURL=dashboard-registry.d.ts.map