ObjectStackObjectStack

Node Executor

Node Executor protocol schemas

@module automation/node-executor

Node Executor Plugin Protocol — Wait Node Pause/Resume

Defines the specification for node executor plugins, with a focus on the wait node executor that supports flow pause and external-event resume (signal, manual, webhook, condition).

The protocol covers:

  • WaitResumePayload: The payload delivered when a paused flow is resumed
  • WaitExecutorConfig: Configuration for the wait executor plugin
  • NodeExecutorDescriptor: Generic node executor plugin descriptor

Source: packages/spec/src/automation/node-executor.zod.ts

TypeScript Usage

import { ActionCategorySchema, ActionDescriptorSchema, ActionParadigmSchema, NodeExecutorDescriptorSchema, WaitEventTypeSchema, WaitExecutorConfigSchema, WaitResumePayloadSchema, WaitTimeoutBehaviorSchema } from '@objectstack/spec/automation';
import type { ActionCategory, ActionDescriptor, ActionParadigm, NodeExecutorDescriptor, WaitEventType, WaitExecutorConfig, WaitResumePayload, WaitTimeoutBehavior } from '@objectstack/spec/automation';

// Validate data
const result = ActionCategorySchema.parse(data);

ActionCategory

Action palette category

Allowed Values

  • logic
  • data
  • io
  • human
  • control
  • custom

ActionDescriptor

Canonical cross-paradigm action/node descriptor (ADR-0018)

Properties

PropertyTypeRequiredDescription
typestringRegistry action/node type (matches the executor type)
versionstringExecutor version (semver)
namestringDisplay label (or i18n key)
descriptionstringoptionalAction description
iconstringoptionalIcon id resolved by the designer
categoryEnum<'logic' | 'data' | 'io' | 'human' | 'control' | 'custom'>Palette category
paradigmsEnum<'flow' | 'approval'>[]Authoring surfaces that may offer this action
configSchemaanyoptionalJSON Schema for the node config (drives the designer form; undeclared keys are rejected at registration)
supportsPausebooleanSupports async pause/resume
supportsCancellationbooleanSupports cancellation
supportsRetrybooleanSupports retry on failure
needsOutboxbooleanDispatch via service-messaging outbox (retry/idempotency/dead-letter)
isAsyncneveroptional[REMOVED] ActionDescriptor.isAsync was removed in @objectstack/spec 17 (#6748, ADR-0049) — no execution path ever read it, so declaring it never made a node suspend and omitting it never stopped one. Delete the key. The live mechanism is two-part: an executor suspends by RETURNING suspend: true from execute(), and its descriptor must declare supportsPause: true (plus the resumeAuthority its pauses need) or the engine refuses that suspension (#6667). Declaring isAsync: true alongside supportsPause: true was always redundant; declaring it alone was always inert.
handlerContractEnum<'none' | 'pure'>Effect contract for author-supplied code this action invokes: 'none' (invokes none) or 'pure' (must not write — it returns a value and the flow graph persists it)
resumeAuthorityEnum<'any' | 'service'>optionalWho may resume a run this node suspended: 'any' (the generic resume route) or 'service' (only the owning service, e.g. approvals). Carries no schema default so an omission stays observable — and an omission is fail-CLOSED at run time, equivalent to 'service': a pausing node whose pause is open to the generic route must declare 'any' explicitly (#5561)
maturityEnum<'ga' | 'beta' | 'reserved'>Runtime maturity: ga (shipped), beta, or reserved (contract only — designers grey this out)
sourceEnum<'builtin' | 'plugin'>builtin = platform baseline; plugin = third-party contributed
deprecatedbooleanDeprecated alias kept for back-compat
aliasOfstringoptionalCanonical type this alias forwards to

ActionParadigm

Authoring paradigm that may offer this action

Allowed Values

  • flow
  • approval

NodeExecutorDescriptor

Node executor plugin descriptor

Properties

PropertyTypeRequiredDescription
idstringUnique executor plugin identifier
namestringDisplay name
nodeTypesstring[]FlowNodeAction types this executor handles
versionstringPlugin version (semver)
descriptionstringoptionalExecutor description
supportsPausebooleanWhether the executor supports async pause/resume
supportsCancellationbooleanWhether the executor supports mid-execution cancellation
supportsRetrybooleanWhether the executor supports retry on failure
configSchemaRefstringoptionalJSON Schema $ref for executor-specific config

WaitEventType

Wait event type determining how a paused flow is resumed

Allowed Values

  • timer
  • signal
  • webhook
  • manual
  • condition

WaitExecutorConfig

Wait node executor plugin configuration

Properties

PropertyTypeRequiredDescription
defaultTimeoutMsintegerDefault timeout in ms (default: 24 hours)
defaultTimeoutBehaviorEnum<'fail' | 'continue' | 'fallback'>Default behavior when wait timeout is exceeded
conditionPollIntervalMsintegerPolling interval for condition waits in ms (default: 30s)
conditionMaxPollsintegerMax polling attempts for condition waits (0 = unlimited)
webhookUrlPatternstringURL pattern for webhook resume endpoints
persistCheckpointsbooleanPersist wait checkpoints to durable storage
maxPausedExecutionsintegerMax concurrent paused executions (0 = unlimited)

WaitResumePayload

Payload for resuming a paused wait node

Properties

PropertyTypeRequiredDescription
executionIdstringExecution ID of the paused flow
checkpointIdstringCheckpoint ID to resume from
nodeIdstringWait node ID being resumed
eventTypeEnum<'timer' | 'signal' | 'webhook' | 'manual' | 'condition'>Event type that triggered resume
signalNamestringoptionalSignal name (when eventType is signal)
webhookPayloadRecord<string, any>optionalWebhook request payload (when eventType is webhook)
resumedBystringoptionalUser ID or system identifier that triggered resume
resumedAtstringISO 8601 timestamp of the resume event
variablesRecord<string, any>optionalVariables to merge into flow context upon resume

WaitTimeoutBehavior

Behavior when a wait node exceeds its timeout

Allowed Values

  • fail
  • continue
  • fallback

On this page