/** * Simple debug logger for troubleshooting * Writes to .cdp-tools/logs/debug.log when enabled */ interface StartupMetrics { totalMs: number; importMs: number; portReservationMs: number; portAttempts: number; serverCreationMs: number; toolRegistrationMs: number; transportMs: number; capturedAt: string; } /** * Store startup metrics for later logging */ export declare function setStartupMetrics(metrics: StartupMetrics): void; /** * Get stored startup metrics */ export declare function getStartupMetrics(): StartupMetrics | null; /** * Enable debug logging */ export declare function enableDebugLogging(): Promise; /** * Disable debug logging */ export declare function disableDebugLogging(): void; /** * Check if debug logging is enabled */ export declare function isDebugEnabled(): boolean; /** * Enable history logging (can be enabled independently of debug logging) */ export declare function enableHistoryLogging(): void; /** * Disable history logging */ export declare function disableHistoryLogging(): void; /** * Check if history logging is enabled */ export declare function isHistoryLogEnabled(): boolean; /** * Write a debug log entry (only if debug logging is enabled) * Format: [TIMESTAMP] [MODULE] message */ export declare function debugLog(module: string, message: string): Promise; /** * Write a command to history.log in replay-compatible format (only if history logging is enabled) * Each line is a JSON object matching RecordedCommand: { tool, params } * New commands are prepended (newest first) so line 1 is always the most recent command */ export declare function logToHistoryFile(entry: string): Promise; /** * Get the path to the history log file */ export declare function getHistoryFilePath(): string; /** * Read a specific line from the history log file (1-indexed) * Returns the parsed command or null if line doesn't exist */ export declare function readHistoryLine(lineNumber: number): Promise<{ tool: string; params: Record; } | null>; /** * Read multiple lines from the history log file (1-indexed) * Returns array of parsed commands */ export declare function readHistoryLines(lineNumbers: number[]): Promise; } | { line: number; error: string; }>>; export {}; //# sourceMappingURL=debug-logger.d.ts.map