import type { ActiveProject, RemoteDeploymentMode, RemoteRiskLevel } from './protocol.js'; export interface ExtensionSession { sessionId: string; connectionId: string; mode: Exclude; extensionVersion: string; userId?: string; activeProject?: ActiveProject; connected: boolean; createdAt: Date; lastSeenAt: Date; expiresAt: Date; } export type SessionRouteResult = { ok: true; session: ExtensionSession; } | { ok: false; code: 'SESSION_UNPAIRED' | 'SESSION_DISCONNECTED' | 'SESSION_EXPIRED' | 'SESSION_AMBIGUOUS' | 'PROJECT_INACTIVE'; message: string; }; export declare class RemoteSessionRouter { private readonly now; private readonly makeId; private readonly sessions; private readonly pairings; constructor(now?: () => Date, makeId?: () => string); registerSession(input: { connectionId: string; mode: Exclude; extensionVersion: string; activeProject?: ActiveProject; ttlMs?: number; }): ExtensionSession; createPairingCode(input: { userId: string; sessionId?: string; ttlMs?: number; }): string; completePairing(input: { code: string; userId: string; sessionId: string; }): boolean; completePairingByCode(code: string, sessionId: string): boolean; private completePairingInternal; heartbeat(sessionId: string): boolean; updateActiveProject(sessionId: string, activeProject?: ActiveProject): boolean; disconnect(sessionId: string): boolean; resolve(input: { userId: string; riskLevel: RemoteRiskLevel; sessionId?: string; }): SessionRouteResult; getSession(sessionId: string): ExtensionSession | undefined; }