export type LogLevel = "debug" | "info" | "warn" | "error";
export interface LogEntry {
    timestamp: string;
    level: LogLevel;
    category: string;
    message: string;
    data?: Record<string, unknown>;
}
export type LogListener = (entry: LogEntry) => void;
declare class Logger {
    private fileStream;
    private initialized;
    private minConsoleLevel;
    private currentDate;
    private logsDir;
    private listeners;
    private readonly retentionDays;
    private levelPriority;
    /**
     * Initialize file logging. Call once after profile is set.
     */
    init(): void;
    /**
     * Core log method.
     */
    log(level: LogLevel, category: string, message: string, data?: Record<string, unknown>): void;
    /**
     * Subscribe to log events produced by this logger.
     * Returns an unsubscribe function.
     */
    onLog(listener: LogListener): () => void;
    private writeConsole;
    private formatSubagentTag;
    private truncate;
    private rotateIfNeeded;
    private reopenForDate;
    private closeStream;
    private cleanupOldLogs;
    /**
     * Compress .jsonl files from days before `todayDate` into .jsonl.gz
     * archives, then delete the raw files.
     * Runs asynchronously in the background — errors are silently ignored.
     */
    private compressOldDays;
    /**
     * Gzip one or more files (concatenated in order) to the given output path.
     */
    private compressFiles;
    /** Safely convert an unknown data field to a display string. */
    private str;
    private formatLocalDate;
    private formatLocalIso;
    wake(trigger: string, messageCount: number): void;
    send(message: string): void;
    /**
     * Log a multimodal content block array being sent to the model.
     * Extracts text from text blocks and summarizes image/file blocks.
     */
    sendMultimodal(blocks: {
        type: string;
        text?: string;
        source?: {
            type: string;
            file_id?: string;
            url?: string;
        };
    }[]): void;
    /**
     * Emit a screenshot to SSE listeners only (not written to file or console
     * because the base64 payload is too large for persistent logs).
     */
    screenshot(base64: string): void;
    assistant(text: string): void;
    /**
     * Log a non-text content block received from the assistant (e.g. image in response).
     */
    assistantBlock(blockType: string, summary: string): void;
    toolCall(name: string, input: unknown, meta?: Record<string, unknown>): void;
    toolResult(name: string, output: string, meta?: Record<string, unknown>): void;
    result(turns: number, inputTokens: number, outputTokens: number, cost: string): void;
    channel(channelName: string, message: string): void;
    system(message: string): void;
    debug(message: string, data?: Record<string, unknown>): void;
    info(message: string, data?: Record<string, unknown>): void;
    warn(message: string, data?: Record<string, unknown>): void;
    err(message: string, data?: Record<string, unknown>): void;
}
export declare const logger: Logger;
export {};
//# sourceMappingURL=logger.d.ts.map