/** * In-memory LRU sliding window of canonical hashes. Used to detect * replays of the same command within a TTL window. Pure local-process, * no disk persistence in v0.1.0. */ export interface ReplayEntry { hash: string; lastSeenAtMs: number; } export interface ReplayCheckResult { canonicalHash: string; isReplay: boolean; lastSeenAtMs?: number; windowSize: number; } export interface ReplayWindowOptions { capacity?: number; ttlMs?: number; /** * Clock injection for deterministic tests. Defaults to Date.now. */ now?: () => number; } export declare class ReplayWindow { private readonly capacity; private readonly ttlMs; private readonly now; /** Map preserves insertion order — used as LRU. */ private readonly entries; constructor(opts?: ReplayWindowOptions); size(): number; /** * Record a hash. Returns true if this hash was already present * (within TTL) — i.e. this call is a replay. */ record(hash: string): ReplayCheckResult; /** * Read-only check (does not refresh recency or insert). */ peek(hash: string): ReplayCheckResult; clear(): void; private evictExpired; private evictOverCapacity; } //# sourceMappingURL=replay.d.ts.map