/** * Session Management * * Manages client sessions with document state, * pending operations, and undo/redo stacks. */ import type { SessionData, ClientIdentity } from '../types.js'; /** * Session configuration */ export interface SessionConfig { /** Session timeout in milliseconds */ timeoutMs: number; /** Maximum sessions allowed */ maxSessions: number; /** Cleanup interval in milliseconds */ cleanupIntervalMs: number; /** Whether to enforce client identity binding */ enforceClientBinding: boolean; } /** * Default session configuration */ export declare const DEFAULT_SESSION_CONFIG: SessionConfig; /** * Session access result */ export interface SessionAccessResult { session?: SessionData; error?: string; } /** * Session manager for MCP connections */ export declare class SessionManager { private sessions; private config; private cleanupTimer?; constructor(config?: Partial); /** * Create a new session */ create(clientIdentity?: ClientIdentity): SessionData; /** * Get session by ID */ get(id: string): SessionData | undefined; /** * Get session with client identity validation * Returns an error if client identity doesn't match */ getWithValidation(id: string, clientIdentity?: ClientIdentity): SessionAccessResult; /** * Update session activity timestamp */ touch(id: string): void; /** * Delete a session */ delete(id: string): boolean; /** * Get all active sessions */ list(): SessionData[]; /** * Get session count */ get count(): number; /** * Start periodic cleanup of expired sessions */ private startCleanup; /** * Stop cleanup timer */ stop(): void; /** * Remove expired sessions */ private cleanupExpired; /** * Evict oldest session when at capacity */ private evictOldest; } //# sourceMappingURL=session.d.ts.map