export interface CacheEntry {
    query: string;
    response: string;
    model: string;
    contextHash: string;
    timestamp: number;
    ttl: number;
    hits: number;
}
export interface CacheStats {
    totalEntries: number;
    totalHits: number;
    totalMisses: number;
    cacheSize: string;
    oldestEntry: Date | null;
    newestEntry: Date | null;
}
/**
 * Local response cache for identical queries
 * Saves tokens and provides instant responses for repeated questions
 */
export declare class ResponseCache {
    private cacheDir;
    private cacheFile;
    private cache;
    private stats;
    private maxEntries;
    private defaultTTL;
    private saveTimeout;
    private saveDebounceMs;
    private isLoaded;
    private loadPromise;
    constructor(options?: {
        maxEntries?: number;
        defaultTTL?: number;
    });
    private loadCache;
    /**
     * Schedule a debounced save to reduce I/O
     */
    private scheduleSave;
    private saveCache;
    /**
     * Generate a cache key from query and context
     */
    private generateKey;
    /**
     * Generate a hash of the current context (files in context)
     */
    generateContextHash(files: {
        path: string;
        content: string;
        mtime?: number;
    }[]): string;
    /**
     * Get cached response if available and valid
     */
    get(query: string, contextHash: string, model: string): string | null;
    /**
     * Store a response in the cache
     */
    set(query: string, response: string, contextHash: string, model: string, ttl?: number): void;
    /**
     * Evict oldest entries to make room
     */
    private evictOldest;
    /**
     * Clear the entire cache
     */
    clear(): void;
    /**
     * Invalidate cache entries related to a specific file
     */
    invalidateForFile(filePath: string): number;
    /**
     * Get cache statistics
     */
    getStats(): CacheStats;
    private formatBytes;
    /**
     * Format cache status for display
     */
    formatStatus(): string;
    /**
     * Dispose and flush pending saves
     */
    dispose(): Promise<void>;
}
export declare function getResponseCache(): ResponseCache;
export declare function resetResponseCache(): void;
