/**
 * LogRotation -- Size-based and age-based log file rotation.
 *
 * Prevents unbounded log growth by rotating files when they exceed
 * size or age thresholds. Supports gzip compression of archived logs.
 *
 * T-042: Log rotation for all file-based storage.
 *
 * @connexum/ai-governance
 */
export interface LogRotationConfig {
    /** Maximum file size in bytes before rotation (default: 10MB) */
    maxSizeBytes?: number;
    /** Maximum age in ms before rotation (default: 7 days) */
    maxAgeMs?: number;
    /** Maximum number of rotated files to keep (default: 10) */
    maxFiles?: number;
    /** Compress rotated files with gzip (default: true) */
    compress?: boolean;
}
export interface RotationResult {
    rotated: boolean;
    originalFile: string;
    archivedFile?: string;
    originalSizeBytes?: number;
    reason?: 'size' | 'age';
}
export declare class LogRotation {
    private config;
    constructor(config?: LogRotationConfig);
    /**
     * Check if a file needs rotation and rotate if so.
     */
    rotateIfNeeded(filePath: string): RotationResult;
    /**
     * Force rotation of a file regardless of thresholds.
     */
    rotate(filePath: string, reason?: 'size' | 'age'): RotationResult;
    /**
     * Rotate all matching files in a directory.
     */
    rotateDir(dir: string, pattern?: RegExp): RotationResult[];
    /**
     * Get rotation status for a file.
     */
    getStatus(filePath: string): {
        exists: boolean;
        sizeBytes: number;
        ageMs: number;
        needsRotation: boolean;
        reason?: 'size' | 'age';
    };
    private cleanup;
}
//# sourceMappingURL=log-rotation.d.ts.map