/** * TimelineScrubber — Step through orchestrator history at any sequence point. * * Wraps an OrchestratorEventBus and reconstructs state at any point by * loading the nearest snapshot and replaying events forward. Dashboard * clients can "drag a slider" to any sequence and get the state at that * moment. * * @module TimelineScrubber */ import type { OrchestratorEventBus, BusEvent } from './event-bus'; /** Reconstructed state at a given point in time */ export interface TimelineFrame { /** Sequence number this frame represents */ seq: number; /** ISO 8601 timestamp of the event at this seq */ timestamp: string; /** Base snapshot used (or null if before first snapshot) */ baseSnapshotSeq: number | null; /** Events applied on top of the snapshot to reach this state */ appliedEvents: BusEvent[]; /** Reconstructed blackboard state */ blackboard: Record; /** Reconstructed agent statuses */ agents: Record; /** Budget state if available */ budget?: Record; } /** Range info for the timeline */ export interface TimelineRange { /** Earliest available sequence number */ minSeq: number; /** Latest available sequence number */ maxSeq: number; /** Total events in the stream */ totalEvents: number; /** Number of snapshots available */ snapshotCount: number; /** Sequence numbers of all available snapshots */ snapshotSeqs: number[]; } /** * Reconstructs state at any point in the event stream. * * @example * ```ts * const scrubber = new TimelineScrubber(orchestrator.eventBus); * const frame = scrubber.frameAt(42); * // frame.blackboard — state of blackboard at seq 42 * // frame.agents — agent statuses at seq 42 * * const range = scrubber.getRange(); * // range.minSeq, range.maxSeq — slider bounds * ``` */ export declare class TimelineScrubber { private bus; constructor(bus: OrchestratorEventBus); /** * Reconstruct state at a specific sequence number. */ frameAt(seq: number): TimelineFrame; /** * Get a range of frames (e.g. for scrubbing a window). * Returns frames at evenly-spaced sequence numbers. */ frameRange(fromSeq: number, toSeq: number, maxFrames?: number): TimelineFrame[]; /** * Get the timeline range info (slider bounds). */ getRange(): TimelineRange; /** * Step forward from a given frame by N events. */ stepForward(currentSeq: number, steps?: number): TimelineFrame; /** * Step backward from a given frame by N events. */ stepBackward(currentSeq: number, steps?: number): TimelineFrame; } //# sourceMappingURL=timeline-scrubber.d.ts.map