/**
 * ClockPort — virtualized wall-clock for deterministic replay.
 *
 * - RealClock: delegates to Date.now() for production use.
 * - RecordedClock: replays a fixed sequence of timestamps from an original run.
 *   Throws ClockExhaustedError when all recorded timestamps are consumed.
 *
 * Usage during replay:
 *   const clock = new RecordedClock(originalRun.timestamps);
 *   // Pass clock to the agent harness instead of RealClock.
 *   // Every clock.now() call returns the next recorded value in order.
 *
 * @module replay/clock
 */
/**
 * Abstract wall-clock port.
 * Inject a concrete implementation into the agent harness at boot time.
 */
export interface ClockPort {
    /** Returns the current time as Unix epoch milliseconds. */
    now(): number;
}
/**
 * Production implementation: delegates to Date.now().
 * Non-deterministic by design — do NOT use during replay.
 */
export declare class RealClock implements ClockPort {
    now(): number;
}
/**
 * Thrown by RecordedClock when the cursor exceeds the recorded timestamps array.
 * Signals that the replay agent made more clock calls than the original run —
 * a sign of non-deterministic branching in the agent code.
 */
export declare class ClockExhaustedError extends Error {
    constructor(recorded: number, requested: number);
}
/**
 * Replay implementation: replays timestamps from an original run in order.
 *
 * Each call to now() returns the next recorded timestamp.
 * Throws ClockExhaustedError if the replay makes more clock calls
 * than were recorded in the original run.
 *
 * Thread safety: not thread-safe — single-agent use only.
 */
export declare class RecordedClock implements ClockPort {
    private readonly recordedTs;
    private cursor;
    constructor(recordedTs: readonly number[]);
    now(): number;
    /** Returns the current cursor position (number of timestamps consumed). */
    getCursor(): number;
    /** Resets the cursor to zero so the same sequence can be replayed again. */
    reset(): void;
    /**
     * Returns a new RecordedClock that shares the same underlying timestamp array
     * and starts at the CURRENT cursor position. Advancing either clone or the
     * original advances only its own cursor — the arrays are shared (read-only),
     * but cursors are independent. Use for cross-cycle propagation where the child
     * cycle consumes the NEXT timestamps in the same sequence.
     *
     * Clone invariant: clone.now() returns the same value as `this.now()` would
     * at the moment clone() is called, and both consume subsequent timestamps
     * in the same order from the same array.
     */
    clone(): RecordedClock;
}
//# sourceMappingURL=clock.d.ts.map