/** * Returns an ISO-8601 timestamp with millisecond precision that is * STRICTLY GREATER than any previous timestamp returned for the same * `orderingKey` within this process. * * Formula: `Math.max(baseMs, lastMs + 1, floorMs)` where `floorMs` is * `notBeforeMs + 1` when a finite `notBeforeMs` is supplied (else 0), and: * - baseMs = parsed agentClock if provided (and valid), else Date.now() * - lastMs = previously-emitted ms for this orderingKey (or 0 if first) * * `agentClock` ANCHORS the timestamp when provided. This is the load-bearing * behavior for agy's transcript replay: agy emits events with their original * `created_at` even during a backfill (so subscription clients see them in * logical order, not in replay-arrival order). For hook-driven plugins * (claude/codex/gemini), `agentClock` is left undefined and baseMs = wallMs. * * Memory: bounded LRU with cap=MAX_LRU_KEYS. Eviction order is least- * recently-touched, so active orderingKeys are never evicted. Resets on * process restart (correct: restart is a new lifecycle). */ export declare function prepareEventTimestamp(opts: { orderingKey: string; agentClock?: string; notBeforeMs?: number; }): string; /** * Test-only: clear the per-key map. Used by jest/vitest to reset state * between tests. Not exported from the package root. */ export declare function _resetPrepareEventTimestampForTesting(): void;