ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
69 lines • 1.97 kB
TypeScript
/**
* Memory-Aware Session Manager
* Wraps session management with memory optimization and automatic cleanup
*/
export interface SessionData {
sessionId: string;
browser?: any;
page?: any;
context?: any;
createdAt: number;
lastAccessed: number;
resourceCount: number;
[key: string]: any;
}
export declare class MemoryAwareSessionManager {
private sessions;
private memoryManager;
constructor();
/**
* Create a new session with memory tracking
*/
createSession(sessionId: string, initialData?: Partial<SessionData>): SessionData;
/**
* Get session with automatic access tracking
*/
getSession(sessionId: string): SessionData | undefined;
/**
* Update session data
*/
updateSession(sessionId: string, updates: Partial<SessionData>): boolean;
/**
* Add a resource to session (browser, page, etc.)
*/
addResource(sessionId: string, resourceType: string, resource: any, memoryMB?: number): boolean;
/**
* Remove a resource from session
*/
removeResource(sessionId: string, resourceType: string): Promise<boolean>;
/**
* Clean up a session and all its resources
*/
cleanupSession(sessionId: string): Promise<boolean>;
/**
* Get all active sessions
*/
getAllSessions(): SessionData[];
/**
* Get session count
*/
getSessionCount(): number;
/**
* Clean up expired sessions based on memory manager recommendations
*/
cleanupExpiredSessions(): Promise<string[]>;
/**
* Force cleanup of oldest sessions if memory pressure is detected
*/
performEmergencyCleanup(): Promise<void>;
/**
* Get memory usage report
*/
getMemoryReport(): {
sessionCount: number;
totalResources: number;
averageResourcesPerSession: number;
memoryStats: any;
};
}
//# sourceMappingURL=memory-aware-session-manager.d.ts.map