import { XPEvent } from '../events'; import { Action, FlagValue, Scenario } from './types'; /** A seed node for the solver's virtual filesystem. */ export interface SolveFsNode { path: string[]; locked?: boolean; content?: string; } export interface SolveOptions { /** Initial virtual filesystem for `exists`/`unlocked`/`contentContains` + FS actions. */ fs?: SolveFsNode[]; /** Cap on total processed events (guards against `emit` cycles). Default 10000. */ maxEvents?: number; } export interface SolveResult { /** Final flag values. */ flags: Record; /** The (bounded) event journal, matching the runtime. */ journal: XPEvent[]; /** Per-trigger fire counts, keyed by trigger id or index. */ fired: Record; /** Non-flag side-effecting actions, in order (each `notify`/`unlock`/`emit`/…). */ actions: Action[]; } /** * Run a scenario headlessly over an event sequence and return the final state. * `emit` actions feed back into the trigger loop (cascades), capped by * `maxEvents`. */ export declare const solveScenario: (scenario: Scenario, events: XPEvent[], opts?: SolveOptions) => SolveResult; /** Whether the solved run ran at least one action of the given kind (e.g. `'unlock'`). */ export declare const ranAction: (result: SolveResult, kind: string) => boolean;