@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.
76 lines (75 loc) • 2.2 kB
TypeScript
/**
* Audit log entry
*/
export interface AuditLogEntry {
timestamp: Date;
sessionId: string;
operation: string;
details: Record<string, any>;
userId?: string;
success: boolean;
error?: string;
}
/**
* Audit logger for debugging operations
* Logs all debugging operations with timestamps and context
*/
export declare class AuditLogger {
private logs;
private maxLogs;
private logToConsole;
constructor(maxLogs?: number, logToConsole?: boolean);
/**
* Log a debugging operation
* @param sessionId Session identifier
* @param operation Operation name
* @param details Operation details
* @param success Whether the operation succeeded
* @param error Optional error message
* @param userId Optional user identifier
*/
log(sessionId: string, operation: string, details: Record<string, any>, success: boolean, error?: string, userId?: string): void;
/**
* Get all audit logs
* @returns Array of audit log entries
*/
getAllLogs(): AuditLogEntry[];
/**
* Get audit logs for a specific session
* @param sessionId Session identifier
* @returns Array of audit log entries for the session
*/
getSessionLogs(sessionId: string): AuditLogEntry[];
/**
* Get audit logs for a specific operation
* @param operation Operation name
* @returns Array of audit log entries for the operation
*/
getOperationLogs(operation: string): AuditLogEntry[];
/**
* Get failed operations
* @returns Array of audit log entries for failed operations
*/
getFailedOperations(): AuditLogEntry[];
/**
* Clear all audit logs
*/
clearLogs(): void;
/**
* Export logs as JSON
* @returns JSON string of all logs
*/
exportLogsAsJson(): string;
/**
* Get logs within a time range
* @param startTime Start time
* @param endTime End time
* @returns Array of audit log entries within the time range
*/
getLogsByTimeRange(startTime: Date, endTime: Date): AuditLogEntry[];
/**
* Get the number of logs
* @returns Number of logs
*/
getLogCount(): number;
}