/** * Minimal LRU (Least Recently Used) cache. * * Uses the insertion-order property of `Map` (oldest entry is the first * iterator) to evict the least-recently-used entry when the capacity is * reached. Reads and writes re-insert the entry so it becomes the newest, * matching LRU semantics. * * Designed for the permission-policy eval cache (P3 #17, before-release.md): * a plain `Map` with no eviction could grow without bound on an iteration * that evaluates thousands of unique tool+subject combinations. This wrapper * caps the size at a configurable maximum while preserving the `get`/`set`/ * `clear`/`has` API the policy already uses. * * Intentionally dependency-free and small (~30 lines) — not a general-purpose * LRU. If richer semantics are needed (TTL, size tracking, weighted entries), * bring a dedicated library. */ export declare class LruCache { private readonly store; private readonly capacity; constructor(capacity: number); get(key: K): V | undefined; set(key: K, value: V): void; has(key: K): boolean; clear(): void; get size(): number; } //# sourceMappingURL=lru-cache.d.ts.map