Skip to content

Interface: FlowStepConfigBuilder<TFlowIn, TStepIn, THandle, TReceipt, TCustomMetrics, TStepOutputs, TStepId> ​

Defined in: builders/flow-step-config-builder.ts:22

Fluent step configurator passed to flow.step(id, step, $s => ...) and subBranch.step(id, step, $s => ...).

Configures step input projection from (flowInput, priorSteps, scopeReceipt) and attaches step-level .onInterrupt() edge handlers.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TFlowInunknownEnclosing flow input payload type.
TStepInunknownTarget step input payload type.
THandleunknownIsolation scope handle type.
TReceiptunknownInspected scope receipt type.
TCustomMetrics extends Record<string, unknown>Record<string, unknown>Custom step telemetry metrics type.
TStepOutputs extends Record<string, unknown>Record<string, never>Accumulated step outputs map type.
TStepId extends stringstringLiteral step identifier string.

Methods ​

inputFrom() ​

ts
inputFrom(mapper): FlowStepConfigBuilder<TFlowIn, TStepIn, THandle, TReceipt, TCustomMetrics, TStepOutputs, TStepId>;

Defined in: builders/flow-step-config-builder.ts:40

Projects (flowInput, priorSteps, scopeReceipt) into the step's input payload TStepIn.

Invoked immediately before the step executes, after refreshing scopeReceipt = await scope.inspect(handle).

Parameters ​

ParameterTypeDescription
mapper(flowInput, priorSteps, scopeReceipt) => TStepInSynchronous step input mapper.

Returns ​

FlowStepConfigBuilder<TFlowIn, TStepIn, THandle, TReceipt, TCustomMetrics, TStepOutputs, TStepId>

New immutable step config builder.


onInterrupt() ​

ts
onInterrupt<TPayload>(interrupt, configure): FlowStepConfigBuilder<TFlowIn, TStepIn, THandle, TReceipt, TCustomMetrics, TStepOutputs, TStepId>;

Defined in: builders/flow-step-config-builder.ts:56

Binds a step-level interrupt handler overriding or supplementing actor-level handlers.

Step-level handlers take precedence over actor-level .onInterrupt() handlers for the same InterruptNode.

Type Parameters ​

Type ParameterDescription
TPayloadInterrupt payload type.

Parameters ​

ParameterTypeDescription
interruptMaybeBuilder<InterruptNode<TPayload>>Target interrupt node or builder.
configure($intr) => AstBuilder<InterruptHandlerNode<TFlowIn, TPayload, THandle>>Interrupt edge configurator.

Returns ​

FlowStepConfigBuilder<TFlowIn, TStepIn, THandle, TReceipt, TCustomMetrics, TStepOutputs, TStepId>

New immutable step config builder.


toAST() ​

ts
toAST(): FlowStepNode;

Defined in: ast/ast-builder.ts:20

Compiles the current builder configuration into a deeply frozen passive AST node.

Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.

Returns ​

FlowStepNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST

Released under the MIT License.