export type DebugLogLevel = "error" | "warn" | "info" | "debug" | "trace"; interface DebugLoggerOptions { enabled?: boolean; level?: DebugLogLevel; maxFileSize?: number; } declare class DebugLogger { private enabled; private level; private maxFileSize; private logPath; constructor(options?: DebugLoggerOptions); /** * Detect if debug logging is enabled from environment */ private detectEnabled; /** * Detect log level from environment */ private detectLevel; /** * Enable or disable logging at runtime */ setEnabled(enabled: boolean): void; /** * Set log level at runtime */ setLevel(level: DebugLogLevel): void; /** * Re-check environment variables (for when they change after initialization) */ refreshFromEnv(): void; /** * Check if a specific level is enabled */ private isLevelEnabled; /** * Write a log entry to file */ private writeLog; /** * Rotate log file if it exceeds max size */ private rotateIfNeeded; error(category: string, message: string, data?: unknown): void; warn(category: string, message: string, data?: unknown): void; info(category: string, message: string, data?: unknown): void; debug(category: string, message: string, data?: unknown): void; trace(category: string, message: string, data?: unknown): void; /** * Log AI provider request */ logProviderRequest(provider: string, model: string, request: unknown): void; /** * Log AI provider response chunk (for streaming) */ logProviderChunk(provider: string, model: string, chunk: unknown): void; /** * Log AI provider response (non-streaming) */ logProviderResponse(provider: string, model: string, response: unknown): void; /** * Log content parsing events */ logContentParse(operation: string, input: unknown, output?: unknown): void; /** * Log TUI rendering events */ logTUI(operation: string, details?: unknown): void; /** * Get the log file path */ getLogPath(): string; /** * Clear the log file */ clear(): void; } export declare function getDebugLogger(): DebugLogger; export declare function createDebugLogger(options: DebugLoggerOptions): DebugLogger; export declare const debug: { error: (category: string, message: string, data?: unknown) => void; warn: (category: string, message: string, data?: unknown) => void; info: (category: string, message: string, data?: unknown) => void; debug: (category: string, message: string, data?: unknown) => void; trace: (category: string, message: string, data?: unknown) => void; logProviderRequest: (provider: string, model: string, request: unknown) => void; logProviderChunk: (provider: string, model: string, chunk: unknown) => void; logProviderResponse: (provider: string, model: string, response: unknown) => void; logContentParse: (operation: string, input: unknown, output?: unknown) => void; getLogPath: () => string; clear: () => void; }; export {};