import type { ForeachNode, ParallelNode, ScopeFrame } from "../flow/types.ts"; import { type ExecOutcome, type NodeWalker, type Reentry, type RunState } from "./context.ts"; import { type NodePath } from "./node-path.ts"; import type { HostPort } from "./types.ts"; /** * Foreach: run the body once per selected item, with the item as input. Output is the per-item outputs * in order, regardless of completion order. Per-item checkpoint (spec §8.2): `state.foreachItemHistory` * (built once at resume start from `foreach-item-completed` events) lets THIS foreach — wherever it * sits in the tree — skip every item already recorded, whether resuming node-atomically (no `reentry`, * spec §8.2/§8.3) or re-entering a deeper block inside a still-in-flight item (spec §8.5). */ export declare function runForeachNode(walker: NodeWalker, node: ForeachNode, input: unknown, host: HostPort, state: RunState, signal: AbortSignal, parentPath: NodePath, frames: readonly ScopeFrame[], reentry?: Reentry): Promise; /** * Parallel: structural fan-out over independent steps, all run concurrently through the shared run-wide * gate (spec §3.6) — no local cap beyond the arm count itself. Output is keyed by each arm's own step * name, independent of completion order. Arms nest under the parallel's own path segment * (`parallelName/armName`), like a loop/foreach body — not peers, unlike branch arms. Re-entry (a * blocked arm being answered) mirrors the concurrent-foreach re-entry: recover completed siblings from * `stepOutputs`, leave still-blocked ones (`state.pendingBlocks`) untouched, resolve the target, and * report the next pending sibling (if any) rather than the whole construct's output. */ export declare function runParallelNode(walker: NodeWalker, node: ParallelNode, input: unknown, host: HostPort, state: RunState, signal: AbortSignal, parentPath: NodePath, frames: readonly ScopeFrame[], reentry?: Reentry): Promise; //# sourceMappingURL=concurrent-nodes.d.ts.map