Function: executeCommand()
ts
function executeCommand<TIn, TOut, THandle>(
node,
input,
ctx
): Promise<TOut>;Defined in: runtime/step/execute-command.ts:19
Executes a passive CommandNode (P.command(id)) by validating input, invoking node.fn(validatedInput, ctx), and validating the returned output (SPEC.md §2.3 & §3.7).
Enforces Declarative Compilation Invariant 6 (node is a passive AST record with zero .execute method; execution occurs exclusively here).
Type Parameters
Parameters
| Parameter | Type | Description |
|---|---|---|
node | CommandNode<TIn, TOut, THandle> | Passive CommandNode AST definition. |
input | TIn | Raw or pre-mapped command input payload. |
ctx | StepExecutionContext<THandle> | Active step execution context. |
Returns
Promise<TOut>
Schema-validated command output payload.