import { XPEvent } from '../events'; import { FileNode } from '../types'; import { SolveFsNode, SolveResult } from './solver'; import { RehearsalPlan, Scenario } from './types'; /** The flattened event tape plus a beat-name → step-index lookup. */ export interface RehearsalTape { /** The walkthrough events, in order. */ events: XPEvent[]; /** beat name → index of the step that reaches it. */ beats: Record; } /** Flatten a plan into an event tape + beat index map (empty when no plan). */ export declare const buildTape: (plan: RehearsalPlan | undefined) => RehearsalTape; /** Resolve a beat name to its tape index, or −1 when unknown. */ export declare const beatIndex: (tape: RehearsalTape, beat: string) => number; /** The deterministic state of a seek, tagged with the tape index it lands on. */ export interface SeekResult extends SolveResult { /** The tape index this state corresponds to (−1 = before any step). */ index: number; } /** * Solve the scenario over the tape prefix ending at (and including) `index`. * `index < 0` yields the pristine initial state (no events processed). Every * journal entry is stamped `rehearsal: true` for provenance. `fs` seeds the * solver's filesystem model for FS-predicate gates. */ export declare const seekResult: (scenario: Scenario, tape: RehearsalTape, index: number, fs?: SolveFsNode[]) => SeekResult; /** * Walk a filesystem tree into the flat `{ path, locked, content }` seeds the * solver's FS model consumes, so seeking evaluates FS gates against the real * starting world rather than an empty disk. */ export declare const fsTreeToSolveNodes: (root: FileNode) => SolveFsNode[];