/**
 * Command Logger
 *
 * Logs all AI actions for security auditing.
 * Supports log rotation, secret redaction, and buffered writes.
 */
import { EventEmitter } from "events";
import type { CommandLogConfig, CommandLogEntry } from "./types.js";
/**
 * Logs all AI actions for security auditing
 */
export declare class CommandLogger extends EventEmitter {
    private config;
    private sessionId;
    private currentLogFile;
    private writeBuffer;
    private flushTimer;
    private compiledSecretPatterns;
    constructor(config?: Partial<CommandLogConfig>);
    /**
     * Ensure log directory exists
     */
    private ensureLogDirectory;
    /**
     * Compile secret redaction patterns
     */
    private compileSecretPatterns;
    /**
     * Get current log file path
     */
    private getLogFilePath;
    /**
     * Redact secrets from a string
     */
    private redactSecrets;
    /**
     * Redact secrets from an object
     */
    private redactObject;
    /**
     * Set session ID for logging
     */
    setSessionId(sessionId: string): void;
    /**
     * Log a command/action
     */
    log(entry: Omit<CommandLogEntry, "timestamp" | "sessionId">): void;
    /**
     * Log a tool call
     */
    logToolCall(toolName: string, args: Record<string, unknown>, result: {
        success: boolean;
        output?: string;
        error?: string;
    }, duration?: number): void;
    /**
     * Log a bash command
     */
    logBashCommand(command: string, result: {
        success: boolean;
        output?: string;
        error?: string;
        exitCode?: number;
    }, duration?: number): void;
    /**
     * Log a file edit
     */
    logFileEdit(filePath: string, operation: "edit" | "create" | "delete", success: boolean, error?: string): void;
    /**
     * Log user input (minimal, for audit trail)
     */
    logUserInput(inputLength: number): void;
    /**
     * Log assistant response (minimal, for audit trail)
     */
    logAssistantResponse(responseLength: number, toolCallCount: number): void;
    /**
     * Flush write buffer to disk
     */
    flush(): Promise<void>;
    /**
     * Check if log rotation is needed
     */
    private checkRotation;
    /**
     * Clean up old log files
     */
    private cleanupOldLogs;
    /**
     * Get log statistics
     */
    getStats(): {
        totalEntries: number;
        logSize: number;
        oldestLog: Date | null;
    };
    /**
     * Get configuration
     */
    getConfig(): CommandLogConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<CommandLogConfig>): void;
    /**
     * Dispose resources
     */
    dispose(): void;
}
