Skip to content

@caoergou/windows-xp / index / XPScenarioApi

Interface: XPScenarioApi ​

Defined in: src/components/XPBridge.tsx:128

Rehearsal / deterministic seek (#207) — the author's iteration-loop unlock. Replays the scenario's canonical walkthrough prefix through the headless solver to jump to any beat's exact state in a second, without replaying events onto the bus (so no external side effects). Requires the scenario to declare a rehearsal.walkthrough; the methods no-op / return false otherwise.

Properties ​

exitRehearsal ​

> exitRehearsal: () => void

Defined in: src/components/XPBridge.tsx:138

Leave rehearsal and restore the pre-rehearsal live save.

Returns ​

void


getDebugState ​

> getDebugState: () => ScenarioDebugState

Defined in: src/components/XPBridge.tsx:144

Inspect live flags, trigger fire budgets, and condition traces.

Returns ​

ScenarioDebugState


getState ​

> getState: () => RehearsalState

Defined in: src/components/XPBridge.tsx:140

The current rehearsal cursor (active flag, index, tape length, named beats).

Returns ​

RehearsalState


seekTo ​

> seekTo: (beat) => boolean

Defined in: src/components/XPBridge.tsx:130

Jump to a named beat's state. Returns false if the beat / walkthrough is unknown.

Parameters ​

beat ​

string

Returns ​

boolean


seekToIndex ​

> seekToIndex: (index) => void

Defined in: src/components/XPBridge.tsx:132

Jump to a tape index (clamped; −1 = pristine start).

Parameters ​

index ​

number

Returns ​

void


setFlag ​

> setFlag: (flag, value) => boolean

Defined in: src/components/XPBridge.tsx:142

Set one flag through the live scenario runtime. Returns false without a scenario.

Parameters ​

flag ​

string

value ​

FlagValue

Returns ​

boolean


stepBack ​

> stepBack: () => void

Defined in: src/components/XPBridge.tsx:134

Step one beat back (re-solve the shorter prefix).

Returns ​

void


stepForward ​

> stepForward: () => void

Defined in: src/components/XPBridge.tsx:136

Step one beat forward.

Returns ​

void