export interface CachePolicy { enabled: boolean; ttlMs?: number; maxEntries?: number; bypass?: boolean; allowSessionHistory?: boolean; } export interface CacheEntry { key: string; createdAt: number; value: T; } export interface CacheKeyParts { prompt: string; model: string; role: string; strategy: string; policyVersion: string; systemPrompt?: string; apiKind?: string; endpoint?: string; mode?: string; stage?: string; } export declare function cacheKey(parts: CacheKeyParts): string; export declare function cacheKeyWhenEnabled(enabled: boolean, parts: CacheKeyParts): string | undefined; export declare class RunCache { private readonly directory; private readonly policy; private writesSincePrune; private pruning; constructor(directory: string, policy: CachePolicy); get(key: string): Promise; set(key: string, value: T): Promise; prune(force?: boolean): Promise; private pruneNow; }