Skip to content

Interface: CommandNode<TIn, TOut, THandle> ​

Defined in: ast/command-node.ts:15

Passive AST node representing a deterministic TypeScript step command (P.command(id)).

Carries input/output Zod validation schemas, an optional partition extractor, and a passive callback fn invoked exclusively by the runtime's executeCommand NodeExecutor (zero .execute method on the node).

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated command input payload type.
TOutunknownValidated command output payload type.
THandleunknownRuntime handle type of the active isolation scope.

Properties ​

PropertyModifierTypeDescriptionDefined in
extractPartitions?readonlyBivariantCallback<[input: TIn], readonly string[]>Optional synchronous partition extractor mapping validated TIn to active partition IDs.ast/command-node.ts:25
fnreadonlyBivariantCallback<[input: TIn, ctx: ExecutionContext<THandle>], Promise<TOut>>Passive step callback invoked by the runtime's executeCommand executor.ast/command-node.ts:27
idreadonlystringUnique identifier of the command step.ast/command-node.ts:19
inputSchemareadonlyZodType<TIn>Zod schema validating step input before invoking fn.ast/command-node.ts:21
outputSchemareadonlyZodType<TOut>Zod schema validating step output returned by fn.ast/command-node.ts:23
typereadonly"harness:command"Discriminant identifying a deterministic command step AST node.ast/command-node.ts:17

Released under the MIT License.