UNPKG

@ai-capabilities-suite/mcp-debugger-core

Version:

Core debugging engine for Node.js and TypeScript applications. Provides Inspector Protocol integration, breakpoint management, variable inspection, execution control, profiling, hang detection, and source map support.

62 lines (61 loc) 1.73 kB
import { DebugSession, DebugSessionConfig } from './debug-session'; import { AuditLogger } from './audit-logger'; /** * Manages multiple concurrent debug sessions * Provides session isolation and lifecycle management */ export declare class SessionManager { private sessions; private auditLogger; constructor(auditLogger?: AuditLogger); /** * Generate a unique session ID */ private generateSessionId; /** * Create a new debug session * @param config Session configuration * @returns The created debug session */ createSession(config: DebugSessionConfig): Promise<DebugSession>; /** * Get a session by ID * @param sessionId Session identifier * @returns The debug session or undefined if not found */ getSession(sessionId: string): DebugSession | undefined; /** * Get all active sessions * @returns Array of all debug sessions */ getAllSessions(): DebugSession[]; /** * Check if a session exists * @param sessionId Session identifier * @returns True if session exists */ hasSession(sessionId: string): boolean; /** * Remove and cleanup a session * @param sessionId Session identifier * @returns True if session was found and removed */ removeSession(sessionId: string): Promise<boolean>; /** * Cleanup all sessions */ cleanupAll(): Promise<void>; /** * Get the number of active sessions */ getSessionCount(): number; /** * Get the audit logger * @returns The audit logger instance */ getAuditLogger(): AuditLogger; /** * Remove terminated sessions */ pruneTerminatedSessions(): void; }