/** * A drive script: the Harness's plan, written down before it drives, in a language small enough to * check. * * Journeys say WHAT to drive: replay a saved flow (deterministic, no model), act and wait on one * exact control, hand an open goal to the model, assert a consequence. Lanes say HOW: each lane is * one browser context driven in order, and lanes run side by side. A journey that needs another one * either follows it in the same lane (and inherits its page) or waits on it from a later lane (a * barrier: it starts once that journey passed, and is blocked if it failed). * * A checkpoint names a point a journey can come back to, and how: replay a flow up to a step. A * branch drives several cases from that point; every case after the first re-enters it first, so * each case starts from the same page and not from wherever the previous case left it. * * Daemon-side only: the HUD draws a plan from a flat view of it (`PlanView`), never this schema. */ import { z } from 'zod'; export declare const ScriptStepKind: { readonly REPLAY: "replay"; readonly ACT: "act"; readonly ASSERT: "assert"; readonly CHECKPOINT: "checkpoint"; readonly BRANCH: "branch"; }; /** How a journey of a plan was answered: its saved flows replayed (no model), or the model drove it. */ export declare const JourneyBy: { readonly REPLAY: "replay"; readonly MODEL: "model"; }; export type JourneyBy = (typeof JourneyBy)[keyof typeof JourneyBy]; export declare const ScriptSource: { readonly LOCAL: "local"; readonly PLATFORM: "platform"; }; /** How the journey a condition names must have ended for the conditional one to run. */ export declare const JourneyOutcome: { readonly PASSED: "passed"; readonly FAILED: "failed"; }; export type JourneyOutcome = (typeof JourneyOutcome)[keyof typeof JourneyOutcome]; declare const LeafStep: z.ZodUnion<[z.ZodObject<{ kind: z.ZodLiteral<"replay">; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>; export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{ kind: z.ZodLiteral<"replay">; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, z.ZodObject<{ kind: z.ZodLiteral<"checkpoint">; id: z.ZodString; /** How to get back here: replay this flow up to (not including) step `to`. */ reenter: z.ZodObject<{ flow: z.ZodString; to: z.ZodNumber; }, "strip", z.ZodTypeAny, { flow: string; to: number; }, { flow: string; to: number; }>; }, "strip", z.ZodTypeAny, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }>, z.ZodObject<{ kind: z.ZodLiteral<"branch">; /** The checkpoint every case starts from. */ at: z.ZodString; cases: z.ZodArray>; steps: z.ZodArray; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, "many">; }, "strip", z.ZodTypeAny, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }>]>; export declare const JourneySchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; persona: z.ZodOptional; dependsOn: z.ZodDefault>; /** * Run only when an earlier journey ended this way, else it is not taken: "if sign-in failed, the * error says why". Unlike `dependsOn` it is not blocked by a failure; a failure can be the point. */ when: z.ZodOptional; }, "strip", z.ZodTypeAny, { is: "passed" | "failed"; journey: string; }, { is: "passed" | "failed"; journey: string; }>>; steps: z.ZodArray; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, z.ZodObject<{ kind: z.ZodLiteral<"checkpoint">; id: z.ZodString; /** How to get back here: replay this flow up to (not including) step `to`. */ reenter: z.ZodObject<{ flow: z.ZodString; to: z.ZodNumber; }, "strip", z.ZodTypeAny, { flow: string; to: number; }, { flow: string; to: number; }>; }, "strip", z.ZodTypeAny, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }>, z.ZodObject<{ kind: z.ZodLiteral<"branch">; /** The checkpoint every case starts from. */ at: z.ZodString; cases: z.ZodArray>; steps: z.ZodArray; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, "many">; }, "strip", z.ZodTypeAny, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }>]>, "many">; /** * Replay first: when every replay in `steps` decides nothing (neither held nor failed), the model * drives this goal instead. A replay that failed is a regression and is never re-driven. An older * platform omits it. */ fallback: z.ZodOptional>; }, "strip", z.ZodTypeAny, { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; dependsOn: string[]; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; fallback?: { goal: string; } | undefined; }, { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; dependsOn?: string[] | undefined; fallback?: { goal: string; } | undefined; }>; export declare const LaneSchema: z.ZodObject<{ id: z.ZodString; /** Driven in this order, in one browser context. */ journeys: z.ZodArray; }, "strip", z.ZodTypeAny, { id: string; journeys: string[]; }, { id: string; journeys: string[]; }>; export declare const DriveScriptSchema: z.ZodObject<{ version: z.ZodLiteral<1>; source: z.ZodEnum<["local", "platform"]>; personas: z.ZodDefault, "many">>; journeys: z.ZodArray; dependsOn: z.ZodDefault>; /** * Run only when an earlier journey ended this way, else it is not taken: "if sign-in failed, the * error says why". Unlike `dependsOn` it is not blocked by a failure; a failure can be the point. */ when: z.ZodOptional; }, "strip", z.ZodTypeAny, { is: "passed" | "failed"; journey: string; }, { is: "passed" | "failed"; journey: string; }>>; steps: z.ZodArray; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, z.ZodObject<{ kind: z.ZodLiteral<"checkpoint">; id: z.ZodString; /** How to get back here: replay this flow up to (not including) step `to`. */ reenter: z.ZodObject<{ flow: z.ZodString; to: z.ZodNumber; }, "strip", z.ZodTypeAny, { flow: string; to: number; }, { flow: string; to: number; }>; }, "strip", z.ZodTypeAny, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }, { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; }>, z.ZodObject<{ kind: z.ZodLiteral<"branch">; /** The checkpoint every case starts from. */ at: z.ZodString; cases: z.ZodArray>; steps: z.ZodArray; flow: z.ZodString; /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */ at: z.ZodOptional; /** Stop before this step. Absent: the whole flow. */ to: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }, { kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; }>, z.ZodEffects; /** Exact: a target, an action and the consequence that must follow. */ target: z.ZodOptional>; action: z.ZodOptional; args: z.ZodOptional>; until: z.ZodOptional>; /** Open: what the model should accomplish, in plain words. */ goal: z.ZodOptional; maxSteps: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }, { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; }>, z.ZodObject<{ kind: z.ZodLiteral<"assert">; predicate: z.ZodType; }, "strip", z.ZodTypeAny, { kind: "assert"; predicate: import("../index.js").Predicate; }, { kind: "assert"; predicate: import("../index.js").Predicate; }>]>, "many">; }, "strip", z.ZodTypeAny, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }, { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }, { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; }>]>, "many">; /** * Replay first: when every replay in `steps` decides nothing (neither held nor failed), the model * drives this goal instead. A replay that failed is a regression and is never re-driven. An older * platform omits it. */ fallback: z.ZodOptional>; }, "strip", z.ZodTypeAny, { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; dependsOn: string[]; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; fallback?: { goal: string; } | undefined; }, { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; dependsOn?: string[] | undefined; fallback?: { goal: string; } | undefined; }>, "many">; lanes: z.ZodArray; }, "strip", z.ZodTypeAny, { id: string; journeys: string[]; }, { id: string; journeys: string[]; }>, "many">; /** At most this many lanes at once. Absent: as many as the browser pool can lease. */ maxParallel: z.ZodOptional; }, "strip", z.ZodTypeAny, { source: "local" | "platform"; version: 1; journeys: { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; dependsOn: string[]; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; fallback?: { goal: string; } | undefined; }[]; personas: { name: string; journey: string; }[]; lanes: { id: string; journeys: string[]; }[]; maxParallel?: number | undefined; }, { source: "local" | "platform"; version: 1; journeys: { steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; } | { kind: "checkpoint"; id: string; reenter: { flow: string; to: number; }; } | { kind: "branch"; at: string; cases: { label: string; steps: ({ kind: "replay"; flow: string; at?: number | undefined; to?: number | undefined; } | { kind: "act"; goal?: string | undefined; target?: Record | undefined; action?: string | undefined; args?: Record | undefined; until?: import("../index.js").Predicate | undefined; maxSteps?: number | undefined; } | { kind: "assert"; predicate: import("../index.js").Predicate; })[]; when?: import("../index.js").Predicate | undefined; }[]; })[]; id: string; title: string; persona?: string | undefined; when?: { is: "passed" | "failed"; journey: string; } | undefined; dependsOn?: string[] | undefined; fallback?: { goal: string; } | undefined; }[]; lanes: { id: string; journeys: string[]; }[]; personas?: { name: string; journey: string; }[] | undefined; maxParallel?: number | undefined; }>; export type ScriptStep = z.infer; export type ScriptLeafStep = z.infer; export type Journey = z.infer; export type Lane = z.infer; export type DriveScript = z.infer; /** * Every reason this script cannot run as written, or none. * * A dependency is honoured one of two ways: earlier in the same lane, or in an EARLIER lane (a * barrier). Pointing only backwards is what makes a script acyclic and a barrier unable to wait on * a lane that has not started, so no separate cycle check is needed. */ export declare function checkScript(script: DriveScript): string[]; /** The lane barrier a journey waits on: its dependencies that are not earlier in its own lane. */ export declare function barriersOf(script: DriveScript, laneId: string, journeyId: string): string[]; /** One line a person reads for a step: what it drives, in the plan's own words. */ export declare function stepLabel(step: ScriptStep): string; export {};