/**
 * Session Manager - Scoped state per MCP session
 *
 * Each session tracks its own currentDatabase, userId, and active operations.
 * Stdio transport uses a default "local" session.
 *
 * CRITICAL: NEVER use console.log() - stdout is reserved for JSON-RPC protocol.
 *
 * @module server/transports/session-manager
 */
export interface SessionState {
    sessionId: string;
    currentDatabase: string | null;
    userId: string | null;
    activeOperations: number;
    createdAt: number;
    lastActivity: number;
    metadata: Record<string, unknown>;
}
export declare class SessionManager {
    private sessions;
    private static readonly LOCAL_SESSION_ID;
    /** Get or create session state */
    getSession(sessionId: string): SessionState;
    /** Get the local (stdio) session */
    getLocalSession(): SessionState;
    /** Remove a session */
    removeSession(sessionId: string): void;
    /** Set user for a session */
    setSessionUser(sessionId: string, userId: string): void;
    /** Get all active sessions */
    listSessions(): SessionState[];
    /** Get session count */
    getSessionCount(): number;
    /** Clean up expired sessions */
    cleanupExpired(ttlMs: number): number;
}
/** Singleton session manager */
export declare const sessionManager: SessionManager;
//# sourceMappingURL=session-manager.d.ts.map