import type { WebSocket } from "ws"; export type SnapshotRouteRegistration = "registered" | "duplicate" | "retry_due" | "collision" | "client_capacity_exceeded" | "capacity_exceeded"; export type SnapshotRouteResolution = { kind: "matched"; clientWs: WebSocket; } | { kind: "stale_proxy"; } | { kind: "tombstone"; } | { kind: "unmatched"; }; export interface PtySnapshotRouteRegistryOptions { maxEntries?: number; maxPendingPerClient?: number; retryForwardIntervalMs?: number; pendingTtlMs?: number; tombstoneTtlMs?: number; now?: () => number; } /** * Correlates a request-scoped PTY snapshot with the exact browser socket that requested it. * Entries are capacity- and TTL-bounded; tombstones retain no socket reference and ensure a * response arriving after disconnect is dropped rather than falling back to a broadcast. */ export declare class PtySnapshotRouteRegistry { private readonly routes; private readonly maxEntries; private readonly maxPendingPerClient; private readonly retryForwardIntervalMs; private readonly pendingTtlMs; private readonly tombstoneTtlMs; private readonly now; constructor(options?: PtySnapshotRouteRegistryOptions); register(proxyId: string, sessionId: string, requestId: string, clientWs: WebSocket, proxyWs: WebSocket): SnapshotRouteRegistration; resolve(proxyId: string, sessionId: string, requestId: string, proxyWs: WebSocket): SnapshotRouteResolution; abandonSocket(clientWs: WebSocket): void; clearProxy(proxyId: string): void; private pruneExpired; } //# sourceMappingURL=pty-snapshot-route-registry.d.ts.map