/** * Static isolation (spec §2.2, "Overlap implies isolation"): decide, from the workflow's SHAPE alone, * which agent steps can run concurrently with a sibling — every `.parallel` arm, and every step inside * a `.foreach` whose concurrency exceeds 1 (including nested arbitrarily deep: branch arms, loop * bodies, nested workflows, further foreach/parallel constructs — once isolated, a subtree STAYS * isolated all the way down; nesting a concurrency-1 foreach inside a concurrency-3 one does not undo * the outer overlap). Decided once, here, at `.commit()` — never re-derived at run time from whatever * happens to be in flight. * * This is also where `.commit()` enforces spec §10.1's "Q&A-capable agent steps may not overlap": an * isolated step runs as a one-shot PI subagent (same mechanism as `background`, spec §12.2) with no * conversation to resume an answer into, so `asks: true` on one is rejected right here, in the same * walk that discovers isolation — the two are the same fact checked at the same place. A * **questionnaire** step is deliberately exempt — its questions come from a schema, not a * conversation, so it may block anywhere, fan-out included (spec §8.6's several-blocked-at-once case * needs this). * * `resolveIsolation` returns a NEW node tree with every isolated agent step tagged `isolated: true` * (`AgentStep.isolated`) rather than mutating the input: a step or a sub-workflow's `body` can be the * SAME object composed into more than one place (see test/isolation.test.ts's "one shared step * definition, placed in two different workflows" case) — isolation is a property of WHERE a step sits * in THIS tree, so tagging must clone every node it touches, never write through a shared reference. * `.commit()` (create-workflow.ts) calls this once and uses its result as the committed `nodes`; the * engine (`execute.ts`) then just reads `step.isolated` — no runtime walk, no shape-path lookup. */ import type { WorkflowNode } from "./types.ts"; /** Walk `nodes`, tag every isolated agent step, and reject `asks` wherever it overlaps (spec §2.2/§10.1). */ export declare function resolveIsolation(workflowName: string, nodes: readonly WorkflowNode[]): WorkflowNode[]; /** * A shared key becomes `.jsonl` on the host, so it carries a step name's ban on path syntax (spec §3). * * Exported because a per-execution key (`resumable` as a function) cannot be checked here — it does not * exist until the step runs — so `step-runner.ts` applies this same rule at resolution time. One * definition, so the two paths can never drift into accepting different filenames. */ export declare function isValidResumeKey(key: string): boolean; //# sourceMappingURL=isolation.d.ts.map