Interface: LoopNode<TIn, TOut, THandle, TActStepId>
Defined in: ast/loop-node.ts:74
Passive AST node representing an iterative action-and-evaluation refinement loop (P.loop(id)).
Repeatedly executes actStep followed by evaluateStep up to maxIterations times until evaluateStep.acceptWhen returns true, optionally preserving the actor transcript and distilling lessons.
Type Parameters
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
actStep | readonly | LoopActStepConfig<TIn, TOut, THandle, TActStepId> | Action step configuration. | ast/loop-node.ts:99 |
distillLessons? | readonly | LessonsNode<unknown> | Optional LessonsNode receiving contrastive loop recovery pairs and active evaluator violations. | ast/loop-node.ts:97 |
evaluateStep | readonly | LoopEvaluateStepConfig<TIn, TOut, THandle> | Evaluation step configuration. | ast/loop-node.ts:101 |
extractPartitions? | readonly | BivariantCallback<[input: TIn], readonly string[]> | Optional synchronous partition extractor mapping TIn to active partition IDs. | ast/loop-node.ts:91 |
id | readonly | string | Unique identifier of the loop definition. | ast/loop-node.ts:83 |
inputSchema | readonly | ZodType<TIn> | Zod schema validating loop input. | ast/loop-node.ts:87 |
maxIterations | readonly | number | Maximum number of .act() -> .evaluate() iterations before failing the loop. | ast/loop-node.ts:93 |
outputSchema | readonly | ZodType<TOut> | Zod schema validating loop output. | ast/loop-node.ts:89 |
preserveActorSession | readonly | boolean | True when rejected iterations resume the .act() actor's existing conversation transcript. | ast/loop-node.ts:95 |
returnOutputFromStepId | readonly | TActStepId | Literal action step ID from which the loop projects its final accepted output. | ast/loop-node.ts:103 |
roleKey | readonly | string | Canonical role key of the inner .act() actor (actStep.actor.roleKey). | ast/loop-node.ts:85 |
type | readonly | "harness:loop" | Discriminant identifying an iterative refinement loop AST node. | ast/loop-node.ts:81 |