Interface NodeExecutionResult

The normalised result returned by every NodeExecutor.execute() call regardless of which executor variant was dispatched.

The runtime inspects these fields to decide the next graph step:

  • success — whether the node completed without error.
  • output — arbitrary payload produced by the node (tool result, LLM response, etc.).
  • error — human-readable error message; only present when success is false.
  • routeTarget — next node id determined by a router or guardrail node.
  • scratchUpdate — partial object merged into GraphState.scratch by StateManager.
  • artifactsUpdate — partial object merged into GraphState.artifacts by StateManager.
  • events — additional GraphEvent values the executor wants the runtime to emit.
  • interrupt — when true, the runtime suspends the run and waits for human input.
interface NodeExecutionResult {
    success: boolean;
    output?: unknown;
    error?: string;
    routeTarget?: string;
    scratchUpdate?: Record<string, unknown>;
    artifactsUpdate?: Record<string, unknown>;
    events?: GraphEvent[];
    expansionRequests?: {
        trigger: MissionExpansionTrigger;
        reason: string;
        request: unknown;
        patch?: MissionGraphPatch;
    }[];
    interrupt?: boolean;
}

Properties

success: boolean

Whether the node completed successfully.

output?: unknown

Arbitrary output produced by the node.

error?: string

Human-readable error description; populated only when success is false.

routeTarget?: string

Target node id returned by router or guardrail rerouting.

scratchUpdate?: Record<string, unknown>

Partial update to merge into GraphState.scratch.

artifactsUpdate?: Record<string, unknown>

Partial update to merge into GraphState.artifacts.

events?: GraphEvent[]

Extra runtime events the executor wants to surface to callers.

expansionRequests?: {
    trigger: MissionExpansionTrigger;
    reason: string;
    request: unknown;
    patch?: MissionGraphPatch;
}[]

Mission graph expansion requests emitted by this node's tool usage.

Type declaration

interrupt?: boolean

When true, the runtime must suspend and await human resolution.