pipeline
Call Signature
Section titled “Call Signature”pipeline<
Out>(s1):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:37
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,Out>(s1,s2):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:40
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,Out>(s1,s2,s3):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:44
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,Out>(s1,s2,s3,s4):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:49
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,D,Out>(s1,s2,s3,s4,s5):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:55
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
D
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, D>
Stage<D, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,D,E,Out>(s1,s2,s3,s4,s5,s6):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:62
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, D>
Stage<D, E>
Stage<E, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,D,E,F,Out>(s1,s2,s3,s4,s5,s6,s7):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:70
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, D>
Stage<D, E>
Stage<E, F>
Stage<F, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,D,E,F,G,Out>(s1,s2,s3,s4,s5,s6,s7,s8):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:79
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, D>
Stage<D, E>
Stage<E, F>
Stage<F, G>
Stage<G, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);Call Signature
Section titled “Call Signature”pipeline<
A,B,C,D,E,F,G,H,Out>(s1,s2,s3,s4,s5,s6,s7,s8,s9):Stage<PlanningInput,PipelineOutput<Out>>
Defined in: packages/engine/src/lib/planner/pipeline.ts:89
Composes stages into a Planner, feeding each stage’s output to the
next. The first stage takes PlanningInput, the last produces a
PlannerCandidate, and every adjacent pair must agree on the type in
between; a mismatch is a compile error at the offending argument. A last
stage that produces a wider PlannerOutput makes the result as wide,
as PipelineOutput describes: for example a ClarifyingPlanner
when it may ask for clarification.
Every stage receives the same StageContext, and runs wrapped by
its StageContext.instrument: once per request, just before it
runs, under the name given with named or stage-<index>. The
first Err
(a Deferred or an EngineError) stops the pipeline and is returned
unchanged. If the request’s signal aborts while a stage is running, the
next stage does not start and the pipeline returns a CancellationError.
Accepts one to nine stages.
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
Out extends PlannerOutput
Parameters
Section titled “Parameters”Stage<PlanningInput, A>
Stage<A, B>
Stage<B, C>
Stage<C, D>
Stage<D, E>
Stage<E, F>
Stage<F, G>
Stage<G, H>
Stage<H, Out>
Returns
Section titled “Returns”Stage<PlanningInput, PipelineOutput<Out>>
Example
Section titled “Example”const planner = pipeline(selectVessels, arrangeLayout);