/** API connection config — shared by all engines via EngineBaseConfig. */ export interface ApiConfig { /** Platform API URL. */ url: string; /** API key for authentication (token is derived internally). */ apiKey: string; /** Enable execution + node status tracking (default: true). */ tracking?: boolean; /** Request timeout in ms (default: 30000). */ timeout?: number; /** Custom headers merged into every API request. */ headers?: Record; } /** Common config shared by all engines. */ export interface EngineBaseConfig { /** Connect to the platform API for registration, tracking, and spec resolution. */ api?: ApiConfig; /** Scoped npm registry config for dynamic spec resolution. Only needed for private registries. */ registries?: Record; } export { NodeExecutionStatus } from '@nullplatform/workflow-types'; export type { RetryStrategy, RetryPolicy, TimeoutPolicy, ConnectionSlot, ConnectionConstraints, NodeSpecDefinition, ExecuteResult, Logger, HttpClient, HttpRequestOptions, HttpResponse, ExecutionContext, ScheduleHandle, ScheduleOptions, Scheduler, TriggerContext, NodeSpecification, } from '@nullplatform/workflow-types'; import type { RetryPolicy, TimeoutPolicy, NodeSpecification } from '@nullplatform/workflow-types'; export interface NodeSpecReference { name: string; package?: string; } export interface SerializableGraphNode { key: string; spec: NodeSpecReference; label?: string; input: unknown; retryPolicy?: RetryPolicy; timeoutPolicy?: TimeoutPolicy; onFailure?: 'fail' | 'skip' | 'fallback'; compensation?: { spec: NodeSpecReference; input: unknown; retryPolicy?: RetryPolicy; timeoutPolicy?: TimeoutPolicy; }; outputSchema?: unknown; /** Spec-level default retry policy (for 4-level policy cascade). */ specDefaultRetryPolicy?: RetryPolicy; /** Spec-level default timeout policy (for 4-level policy cascade). */ specDefaultTimeoutPolicy?: TimeoutPolicy; /** Resolved task queue from execution target (for per-node routing). */ taskQueue?: string; /** In-process only: inline handler for code-defined tasks. Not serializable over the wire. */ handler?: (stepContext: Record) => HandlerResult | Promise; } export interface SerializableGraphEdge { sourceNodeKey: string; sourceOutput: string; targetNodeKey: string; targetInput: string; priority?: number; } export interface SerializableWorkflowGraph { name: string; nodes: SerializableGraphNode[]; edges: SerializableGraphEdge[]; defaultRetryPolicy?: RetryPolicy; defaultTimeoutPolicy?: TimeoutPolicy; } export interface SerializedInterpreterInput { executionId: string; workflowId: string; workflowVersionId: string; graph: SerializableWorkflowGraph; input: unknown; callbackBaseUrl: string; } /** Return type for inline handlers on code-defined workflow nodes. */ export interface HandlerResult { output: unknown; route?: string; } export interface GraphNode { key: string; spec: NodeSpecification; label?: string; input: unknown; retryPolicy?: RetryPolicy; timeoutPolicy?: TimeoutPolicy; onFailure?: 'fail' | 'skip' | 'fallback'; compensation?: { spec: NodeSpecification; input: unknown; /** In-process only: inline handler for code-defined compensations. */ handler?: () => void | Promise; }; outputSchema?: unknown; /** In-process only: inline handler for code-defined tasks. Not serializable. */ handler?: (stepContext: Record) => HandlerResult | Promise; } export interface GraphEdge { sourceNodeKey: string; sourceOutput: string; targetNodeKey: string; targetInput: string; priority?: number; } export interface WorkflowGraph { name: string; nodes: GraphNode[]; edges: GraphEdge[]; defaultRetryPolicy?: RetryPolicy; defaultTimeoutPolicy?: TimeoutPolicy; } export interface NodeExecutionResult { output: unknown; route?: string; waitingForHuman?: boolean; humanTimeoutMs?: number | null; } export interface HumanTaskResolution { status: 'completed' | 'failed'; output?: unknown; error?: NodeError | null; } export interface NodeError { code: string; message: string; details?: unknown; } export interface InterpreterResult { output: unknown; status: 'completed' | 'failed' | 'cancelled'; error?: NodeError; } //# sourceMappingURL=types.d.ts.map