PlanPipeline
Defined in: pipeline/pipeline.ts:98
Chain multiple plans into a sequential pipeline with cross-plan lineage.
Static plans run directly. Factory steps receive the previous step’s output to dynamically build a plan. Execution is fail-fast: the first step failure aborts the pipeline.
Example
Section titled “Example”const result = await new PlanPipeline() .step('extract', extractPlan) .step('transform', (input) => buildTransformPlan(input)) .run()
if (result.ok) { console.log(result.value)}Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PlanPipeline():
PlanPipeline
Returns
Section titled “Returns”PlanPipeline
Methods
Section titled “Methods”run<
Out>(ctx?):Promise<PipelineResult<Out>>
Defined in: pipeline/pipeline.ts:141
Execute all steps sequentially.
Type Parameters
Section titled “Type Parameters”Out = unknown
Parameters
Section titled “Parameters”Optional run context (readFile, glob, registry)
Returns
Section titled “Returns”Promise<PipelineResult<Out>>
Pipeline result with cross-plan lineage
Example
Section titled “Example”const result = await pipeline.run()if (result.ok) { console.log('Final output:', result.value) // Inspect per-step lineage for (const [name, step] of result.pipelineLineage.steps) { console.log(`${name}: ${step.ok ? 'ok' : 'failed'}`) }}step()
Section titled “step()”step(
name,planOrFactory):this
Defined in: pipeline/pipeline.ts:115
Add a step to the pipeline.
Parameters
Section titled “Parameters”string
Unique name for this step (used in lineage)
planOrFactory
Section titled “planOrFactory”A compiled Plan or a factory function (previousOutput) => Plan
Plan<unknown> | (input) => Plan<unknown>
Returns
Section titled “Returns”this
this (for chaining)
Example
Section titled “Example”pipeline .step('load', loadPlan) .step('process', (data) => buildProcessPlan(data))