import type { Message } from '../types/messages.js'; export interface CompactionSummaryCacheOptions { /** Maximum distinct summaries retained in memory (default: 32). Must be a positive integer. */ capacity?: number | undefined; /** Time a successful summary remains reusable (default: 1 hour). Must be finite and > 0. */ ttlMs?: number | undefined; } /** Non-semantic summarizer results that must never become durable cache hits. */ export declare const PLACEHOLDER_SUMMARIES: Readonly<{ empty: "(empty)"; emptySummary: "(empty summary)"; }>; export declare function isPlaceholderSummary(value: string): boolean; /** * Small, process-local cache for isolated compaction summaries. * * Auto-compaction and overflow recovery can race or retry against the same * pre-compaction history. Without a shared cache each path pays for the same * secondary-model request. The cache is deliberately bounded and TTL-based: * long-running agents cannot accumulate one entry per compaction forever. */ export declare class CompactionSummaryCache { private readonly entries; private readonly pending; private readonly ttlMs; private generation; constructor(opts?: CompactionSummaryCacheOptions); get(key: string): string | undefined; set(key: string, value: string): void; /** Clear entries and invalidate pending creators so their results cannot repopulate the cache. */ clear(): void; /** Reuse both completed results and an identical call already in flight. */ getOrCreate(key: string, create: () => Promise): Promise; } /** Process-wide default with a 32-entry capacity and 1-hour TTL. */ export declare const defaultCompactionSummaryCache: CompactionSummaryCache; /** Stable key for a summary request; transient estimator and provider metadata are excluded. */ export declare function compactionSummaryKey(model: string, prompt: string, messages: readonly Message[]): string; //# sourceMappingURL=compaction-summary-cache.d.ts.map