Skip to main content

Interface: GraphStep<TInput, TOutput>

Defined in: packages/core/src/graph/types.ts:141

Internal step shape the graph runner drives. The fluent API transparently wraps every Processable / plain function into one of these; custom transforms (join, aggregate, filter) produce them directly with custom combine.

Type Parameters

TInput

TInput = unknown

TOutput

TOutput = unknown

Properties

combine?

optional combine?: (predecessors) => TInput

Defined in: packages/core/src/graph/types.ts:146

Combine outputs from zero-or-more predecessors into this step's input. Default (when omitted): align-by-source-row — if exactly one predecessor, unwrap its output; if multiple, return { byLabel, byId, order, sourceRowId } aligned on a common sourceRowId. See the Provenance Invariant.

Parameters

predecessors

PredecessorOutputs

Returns

TInput


run

run: (input, ctx) => Promise<TOutput>

Defined in: packages/core/src/graph/types.ts:151

Execute the step. A Processable satisfies this shape directly — its .process is the run. Transform steps (join, aggregate, filter) supply a pure-function run that reshapes data without calling an LLM.

Parameters

input

TInput

ctx

NodeContext

Returns

Promise<TOutput>