/** * Built-in Plugin: LLM Response Cache * * Cache LLM responses for deterministic replay during testing. * Uses a content-addressable store keyed by model + messages hash. */ import type { AgentProbePlugin } from '../plugins'; export interface CacheConfig { /** Directory to store cached responses */ cacheDir?: string; /** TTL in milliseconds (default: 24h) */ ttlMs?: number; /** Maximum cache size in entries */ maxEntries?: number; /** Enable/disable cache */ enabled?: boolean; } export interface CacheEntry { key: string; model: string; response: any; timestamp: number; hits: number; } export interface CacheStats { entries: number; hits: number; misses: number; hitRate: number; sizeBytes: number; } export declare class LLMCache { private cache; private hits; private misses; readonly config: CacheConfig; constructor(config?: CacheConfig); private hash; get(model: string, messages: any): any | null; set(model: string, messages: any, response: any): void; has(model: string, messages: any): boolean; clear(): void; getStats(): CacheStats; /** Save cache to disk */ saveToDisk(dir?: string): void; /** Load cache from disk */ loadFromDisk(dir?: string): number; formatReport(): string; } /** * Create the cache plugin instance. */ export declare function createCachePlugin(config?: CacheConfig): AgentProbePlugin & { cache: LLMCache; }; export default createCachePlugin; //# sourceMappingURL=cache.d.ts.map