/** * executePipeline — the `ExecutionPipeline` of north-star §5.8: the * convenience combinator over {@link scheduleUnits} (the bounded loop) and * {@link runWithTimeout} (the per-unit timeout/retry wrapper). * * A tool supplies only a `runOne` (the domain run) and an `onResult` mapper (turn * a classified `UnitRunOutcome` into its domain result + the stop decision); the * substrate owns the loop, concurrency, timeout/abort, retry, and stop policy. * `WorkflowExecutionOptions` (`timeout`/`maxParallel`/`stopOnFirstFailure`/`retry`) * therefore mean the same thing in every domain. * * Tools with a richer per-unit lifecycle (fitness threads memory profiling + * callbacks through its own `runOneCheck`) may compose `scheduleUnits` + * `runWithTimeout` directly instead; both routes are "on the substrate". */ import { type UnitRunOutcome } from './run-with-timeout.js'; import type { WorkflowExecutionOptions } from './options.js'; export interface ExecutePipelineOptions { readonly units: readonly Unit[]; readonly options: WorkflowExecutionOptions; /** The domain run for one unit, under the substrate's abort signal. */ readonly runOne: (unit: Unit, signal: AbortSignal) => Promise; /** Map a classified outcome to a domain result + whether to stop scheduling. */ readonly onResult: (unit: Unit, index: number, outcome: UnitRunOutcome) => { readonly shouldStop: boolean; } | Promise<{ readonly shouldStop: boolean; }>; /** Per-unit timeout override (falls back to `options.timeout`, then 30s). */ readonly timeoutFor?: (unit: Unit) => number | undefined; /** External abort check threaded into the scheduler. */ readonly shouldAbort?: () => boolean; } /** Run `units` on the substrate: scheduled, timed out, retried, and stop-policied. */ export declare function executePipeline(opts: ExecutePipelineOptions): Promise; //# sourceMappingURL=pipeline.d.ts.map