@hexabot-ai/agentic 3.4.0-beta.2 → 3.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +67 -15
  2. package/dist/cjs/action/abstract-action.js +13 -1
  3. package/dist/cjs/checkpoint.js +301 -0
  4. package/dist/cjs/context.js +11 -27
  5. package/dist/cjs/dsl.types.js +3 -0
  6. package/dist/cjs/errors.js +116 -9
  7. package/dist/cjs/index.js +15 -6
  8. package/dist/cjs/resume-payload.js +257 -0
  9. package/dist/cjs/runner-runtime-control.js +181 -306
  10. package/dist/cjs/step-executors/conditional-executor.js +27 -29
  11. package/dist/cjs/step-executors/loop-executor.js +53 -62
  12. package/dist/cjs/step-executors/parallel-executor.js +169 -102
  13. package/dist/cjs/step-executors/task-executor.js +180 -96
  14. package/dist/cjs/utils/clone.js +73 -0
  15. package/dist/cjs/workflow-fingerprint.js +138 -0
  16. package/dist/cjs/workflow-runner.js +220 -155
  17. package/dist/cjs/workflow.js +24 -12
  18. package/dist/esm/action/abstract-action.js +14 -2
  19. package/dist/esm/checkpoint.js +293 -0
  20. package/dist/esm/context.js +11 -27
  21. package/dist/esm/dsl.types.js +3 -0
  22. package/dist/esm/errors.js +105 -6
  23. package/dist/esm/index.js +3 -3
  24. package/dist/esm/resume-payload.js +250 -0
  25. package/dist/esm/runner-runtime-control.js +179 -303
  26. package/dist/esm/step-executors/conditional-executor.js +27 -29
  27. package/dist/esm/step-executors/loop-executor.js +53 -62
  28. package/dist/esm/step-executors/parallel-executor.js +165 -98
  29. package/dist/esm/step-executors/task-executor.js +181 -97
  30. package/dist/esm/utils/clone.js +67 -0
  31. package/dist/esm/workflow-fingerprint.js +134 -0
  32. package/dist/esm/workflow-runner.js +220 -155
  33. package/dist/esm/workflow.js +24 -12
  34. package/dist/types/action/abstract-action.d.ts.map +1 -1
  35. package/dist/types/action/action.types.d.ts +0 -14
  36. package/dist/types/action/action.types.d.ts.map +1 -1
  37. package/dist/types/checkpoint.d.ts +188 -0
  38. package/dist/types/checkpoint.d.ts.map +1 -0
  39. package/dist/types/context.d.ts +45 -11
  40. package/dist/types/context.d.ts.map +1 -1
  41. package/dist/types/dsl.types.d.ts.map +1 -1
  42. package/dist/types/errors.d.ts +77 -3
  43. package/dist/types/errors.d.ts.map +1 -1
  44. package/dist/types/index.d.ts +6 -7
  45. package/dist/types/index.d.ts.map +1 -1
  46. package/dist/types/resume-payload.d.ts +69 -0
  47. package/dist/types/resume-payload.d.ts.map +1 -0
  48. package/dist/types/runner-runtime-control.d.ts +63 -51
  49. package/dist/types/runner-runtime-control.d.ts.map +1 -1
  50. package/dist/types/step-executors/conditional-executor.d.ts +6 -3
  51. package/dist/types/step-executors/conditional-executor.d.ts.map +1 -1
  52. package/dist/types/step-executors/loop-executor.d.ts +6 -4
  53. package/dist/types/step-executors/loop-executor.d.ts.map +1 -1
  54. package/dist/types/step-executors/parallel-executor.d.ts +11 -3
  55. package/dist/types/step-executors/parallel-executor.d.ts.map +1 -1
  56. package/dist/types/step-executors/task-executor.d.ts +11 -4
  57. package/dist/types/step-executors/task-executor.d.ts.map +1 -1
  58. package/dist/types/step-executors/types.d.ts +21 -13
  59. package/dist/types/step-executors/types.d.ts.map +1 -1
  60. package/dist/types/utils/clone.d.ts +33 -0
  61. package/dist/types/utils/clone.d.ts.map +1 -0
  62. package/dist/types/workflow-event-emitter.d.ts +29 -5
  63. package/dist/types/workflow-event-emitter.d.ts.map +1 -1
  64. package/dist/types/workflow-fingerprint.d.ts +14 -0
  65. package/dist/types/workflow-fingerprint.d.ts.map +1 -0
  66. package/dist/types/workflow-runner.d.ts +83 -41
  67. package/dist/types/workflow-runner.d.ts.map +1 -1
  68. package/dist/types/workflow-types.d.ts +25 -54
  69. package/dist/types/workflow-types.d.ts.map +1 -1
  70. package/dist/types/workflow.d.ts +24 -9
  71. package/dist/types/workflow.d.ts.map +1 -1
  72. package/examples/defs-bindings-agent/bindings.ts +1 -1
  73. package/examples/defs-bindings-agent/workflow.ts +3 -2
  74. package/examples/full/actions/await-user-input.ts +3 -2
  75. package/examples/full/actions/call-llm.ts +18 -18
  76. package/examples/full/actions/create-ticket.ts +1 -2
  77. package/examples/full/actions/decision-router.ts +6 -2
  78. package/examples/full/actions/get-calendar-events.ts +1 -2
  79. package/examples/full/actions/get-user-profile.ts +1 -2
  80. package/examples/full/actions/query-memory.ts +1 -2
  81. package/examples/full/actions/search-web.ts +1 -2
  82. package/examples/full/actions/send-email.ts +3 -2
  83. package/examples/full/workflow.ts +3 -2
  84. package/examples/loop/actions/await-reply.ts +2 -7
  85. package/examples/loop/workflow.ts +4 -2
  86. package/examples/suspend-resume/actions/wait-for-user.ts +11 -9
  87. package/examples/suspend-resume/workflow.ts +51 -11
  88. package/package.json +3 -3
  89. package/src/__tests__/checkpoint.test.ts +2568 -0
  90. package/src/__tests__/resume-payload.test.ts +245 -0
  91. package/src/__tests__/runner-runtime-control.test.ts +265 -0
  92. package/src/__tests__/workflow-fingerprint.test.ts +165 -0
  93. package/src/__tests__/workflow-runner.test.ts +167 -144
  94. package/src/__tests__/workflow.test.ts +97 -6
  95. package/src/action/abstract-action.ts +21 -2
  96. package/src/action/action.types.ts +0 -12
  97. package/src/checkpoint.ts +561 -0
  98. package/src/context.ts +51 -41
  99. package/src/dsl.types.ts +3 -0
  100. package/src/errors.ts +161 -8
  101. package/src/index.ts +33 -14
  102. package/src/resume-payload.ts +326 -0
  103. package/src/runner-runtime-control.ts +222 -456
  104. package/src/step-executors/conditional-executor.test.ts +77 -46
  105. package/src/step-executors/conditional-executor.ts +47 -40
  106. package/src/step-executors/loop-executor.test.ts +106 -92
  107. package/src/step-executors/loop-executor.ts +84 -101
  108. package/src/step-executors/parallel-executor.test.ts +300 -89
  109. package/src/step-executors/parallel-executor.ts +243 -125
  110. package/src/step-executors/task-executor.test.ts +321 -51
  111. package/src/step-executors/task-executor.ts +232 -145
  112. package/src/step-executors/types.ts +23 -22
  113. package/src/utils/clone.ts +75 -0
  114. package/src/workflow-event-emitter.ts +32 -6
  115. package/src/workflow-fingerprint.ts +159 -0
  116. package/src/workflow-runner.ts +325 -209
  117. package/src/workflow-types.ts +25 -56
  118. package/src/workflow.ts +41 -34
  119. package/dist/cjs/step-executors/suspension-continuation.js +0 -27
  120. package/dist/cjs/suspension-rebuilder.js +0 -265
  121. package/dist/cjs/utils/deferred.js +0 -17
  122. package/dist/esm/step-executors/suspension-continuation.js +0 -24
  123. package/dist/esm/suspension-rebuilder.js +0 -260
  124. package/dist/esm/utils/deferred.js +0 -14
  125. package/dist/types/step-executors/suspension-continuation.d.ts +0 -10
  126. package/dist/types/step-executors/suspension-continuation.d.ts.map +0 -1
  127. package/dist/types/suspension-rebuilder.d.ts +0 -67
  128. package/dist/types/suspension-rebuilder.d.ts.map +0 -1
  129. package/dist/types/utils/deferred.d.ts +0 -7
  130. package/dist/types/utils/deferred.d.ts.map +0 -1
  131. package/src/__tests__/suspension-rebuilder.test.ts +0 -404
  132. package/src/step-executors/suspension-continuation.ts +0 -31
  133. package/src/suspension-rebuilder.ts +0 -446
  134. package/src/utils/deferred.ts +0 -23
@@ -3,16 +3,18 @@
3
3
  * Copyright (c) 2025 Hexastack.
4
4
  * Full terms: see LICENSE.md.
5
5
  */
6
+ import { assertFrameMatchesStep, CHECKPOINT_VERSION, collectWaits, selectWait, validateCheckpoint, } from './checkpoint';
6
7
  import { EWorkflowRunStatus, } from './context';
7
8
  import { throwIfAborted } from './errors';
9
+ import { checkResumePayload } from './resume-payload';
8
10
  import { RunnerRuntimeControl } from './runner-runtime-control';
9
11
  import { executeConditional as runConditionalExecutor } from './step-executors/conditional-executor';
10
12
  import { executeLoop as runLoopExecutor } from './step-executors/loop-executor';
11
13
  import { executeParallel as runParallelExecutor } from './step-executors/parallel-executor';
12
- import { wrapSuspensionContinuation } from './step-executors/suspension-continuation';
13
14
  import { executeTaskStep as runTaskExecutor } from './step-executors/task-executor';
14
- import { rebuildSuspension, } from './suspension-rebuilder';
15
+ import { cloneAsJson } from './utils/clone';
15
16
  import { StepType, } from './workflow-event-emitter';
17
+ import { fingerprintWorkflow } from './workflow-fingerprint';
16
18
  import { evaluateMapping } from './workflow-values';
17
19
  /**
18
20
  * Executes a compiled workflow definition, tracking state, suspensions, and event hooks.
@@ -78,20 +80,13 @@ export class WorkflowRunner {
78
80
  ]));
79
81
  }
80
82
  /**
81
- * Read the step currently being executed.
83
+ * Read the checkpoint of a suspended run: everything a host must persist to
84
+ * resume it later, in this process or another one. Treat it as read-only.
82
85
  *
83
- * @returns Metadata for the in-flight step, if any.
86
+ * @returns The checkpoint while the run is suspended, otherwise undefined.
84
87
  */
85
- getCurrentStep() {
86
- return this.currentStep;
87
- }
88
- /**
89
- * Access the last payload supplied to a resume call.
90
- *
91
- * @returns The most recent resume data, or undefined if none.
92
- */
93
- getLastResumeData() {
94
- return this.lastResumeData;
88
+ getCheckpoint() {
89
+ return this.checkpoint;
95
90
  }
96
91
  /**
97
92
  * Begin executing the workflow from the first step.
@@ -104,77 +99,139 @@ export class WorkflowRunner {
104
99
  this.status = EWorkflowRunStatus.RUNNING;
105
100
  this.snapshots = {};
106
101
  this.stepLog = {};
107
- this.suspension = undefined;
108
- this.lastResumeData = undefined;
109
- this.currentStep = undefined;
102
+ this.checkpoint = undefined;
110
103
  this.context = args.context;
111
104
  this.state = {
112
105
  input: this.compiled.inputParser.parse(args.inputData ?? {}),
113
106
  output: {},
114
107
  iterationStack: [],
115
108
  };
116
- this.runtimeControl = new RunnerRuntimeControl(this);
109
+ this.runtimeControl = new RunnerRuntimeControl();
117
110
  this.context.attachWorkflowRuntime(this.runtimeControl);
118
111
  this.emit('hook:workflow:start', { runId: this.runId });
119
- const state = this.state;
120
- if (!state) {
121
- throw new Error('Workflow state not initialized.');
122
- }
123
- const env = this.createExecutorEnv();
124
- return this.runExecution(() => this.executeFlow(this.compiled.flow, state, [], 0, env));
112
+ return this.runExecution(new Map());
125
113
  }
126
114
  /**
127
- * Resume a previously suspended workflow using the supplied resume data.
115
+ * Resume a suspended workflow by satisfying one of its open waits.
116
+ *
117
+ * Execution re-enters the checkpoint's frames: completed work is skipped,
118
+ * the resolved step re-runs its action body, and waits left untouched stay
119
+ * parked.
128
120
  *
129
- * @param args Data provided to resume the suspended step.
121
+ * A payload the wait does not accept is refused, first against the wait's
122
+ * `accepts` JSON Schema without running anything, then by the action body.
123
+ * Either way the result is suspended on the same waits and carries
124
+ * `rejection`, and the checkpoint, snapshot and step log are left as they
125
+ * were. Events a refusing body emitted are not withdrawn, and its side
126
+ * effects, including writes to context state, are not undone.
127
+ *
128
+ * @param args Resume payload and, when several waits are open, the wait it satisfies.
130
129
  * @returns Execution result including status and snapshot.
130
+ * @throws {WorkflowWaitNotFoundError} When `waitId` is not an open wait.
131
+ * @throws {WorkflowWaitAmbiguousError} When several waits are open and no
132
+ * `waitId` is given.
131
133
  */
132
134
  async resume(args) {
133
- if (this.status !== EWorkflowRunStatus.SUSPENDED || !this.suspension) {
135
+ if (this.status !== EWorkflowRunStatus.SUSPENDED || !this.checkpoint) {
134
136
  throw new Error('Cannot resume a workflow that is not suspended.');
135
137
  }
136
- if (!this.context || !this.state) {
138
+ if (!this.context) {
137
139
  throw new Error('Workflow state is not initialized.');
138
140
  }
141
+ const wait = selectWait(this.checkpoint.waits, args.waitId);
142
+ const payload = checkResumePayload(wait, args.resumeData);
143
+ const result = payload.ok
144
+ ? await this.resolveWait(wait, payload.value)
145
+ : this.keepWaiting(this.checkpoint, {
146
+ waitId: wait.waitId,
147
+ error: payload.error,
148
+ });
149
+ if (result.status === EWorkflowRunStatus.SUSPENDED && result.rejection) {
150
+ this.emit('hook:workflow:resume_rejected', {
151
+ runId: this.runId,
152
+ wait,
153
+ resumeData: args.resumeData,
154
+ error: result.rejection.error,
155
+ });
156
+ }
157
+ return result;
158
+ }
159
+ /**
160
+ * Run the pass that resolves one wait with an accepted payload.
161
+ *
162
+ * @param wait The wait being resolved.
163
+ * @param recorded The payload as the checkpoint records it.
164
+ * @returns Execution result including status and snapshot.
165
+ */
166
+ async resolveWait(wait, recorded) {
167
+ const checkpoint = this.checkpoint;
168
+ if (!checkpoint) {
169
+ throw new Error('Cannot resume a workflow that is not suspended.');
170
+ }
171
+ const report = {
172
+ state: this.state,
173
+ snapshots: { ...this.snapshots },
174
+ stepLog: { ...this.stepLog },
175
+ };
139
176
  this.status = EWorkflowRunStatus.RUNNING;
140
- this.lastResumeData = args.resumeData;
141
- const suspension = this.suspension;
142
- return this.runExecution(() => suspension.continue(args.resumeData));
177
+ this.context?.attachWorkflowRuntime(this.runtimeControl);
178
+ return this.runExecution(new Map([[wait.waitId, recorded]]), {
179
+ checkpoint,
180
+ report,
181
+ });
143
182
  }
144
183
  /**
145
- * Execute the provided workflow operation and normalize suspension, finish, and failure handling.
184
+ * Run the flow from the top, or from a checkpoint, and normalize
185
+ * suspension, finish, and failure handling.
146
186
  *
147
- * @param execute Function that advances workflow execution and may return a suspension.
187
+ * @param resolutions Resume payloads for the waits this pass satisfies.
188
+ * @param resumed Suspended run to resume from; omitted on start.
148
189
  * @returns Result of the execution attempt.
149
190
  */
150
- async runExecution(execute) {
191
+ async runExecution(resolutions, resumed) {
192
+ const pass = { resolutions };
151
193
  try {
152
- const suspension = await execute();
153
- if (suspension) {
154
- this.suspension = suspension;
194
+ // In-process and durable resumes start from the same detached JSON
195
+ // copy, so both see exactly what a host would have persisted.
196
+ const from = resumed ? cloneAsJson(resumed.checkpoint) : undefined;
197
+ if (from) {
198
+ this.state = {
199
+ input: from.input,
200
+ output: from.output,
201
+ iterationStack: [],
202
+ };
203
+ }
204
+ const state = this.state;
205
+ if (!state) {
206
+ throw new Error('Workflow state not initialized.');
207
+ }
208
+ const root = await this.executeFlow(this.compiled.flow, state, [], from?.root, this.createExecutorEnv(pass));
209
+ // Only the refusing step ran in this pass, and it did not complete, so
210
+ // the run is put back as the checkpoint it started from describes it.
211
+ if (pass.rejection && resumed) {
212
+ this.state = resumed.report.state;
213
+ this.snapshots = resumed.report.snapshots;
214
+ this.stepLog = resumed.report.stepLog;
215
+ return this.keepWaiting(resumed.checkpoint, pass.rejection);
216
+ }
217
+ if (root) {
218
+ const next = this.buildCheckpoint(state, root);
219
+ this.checkpoint = next;
155
220
  this.status = EWorkflowRunStatus.SUSPENDED;
156
221
  this.emit('hook:workflow:suspended', {
157
222
  runId: this.runId,
158
- step: suspension.step,
159
- reason: suspension.reason,
160
- data: suspension.data,
223
+ waits: next.waits,
161
224
  });
162
225
  return {
163
226
  status: EWorkflowRunStatus.SUSPENDED,
164
- step: suspension.step,
165
- reason: suspension.reason,
166
- data: suspension.data,
167
- stepExecId: suspension.stepExecId,
168
- suspendIndex: suspension.suspendIndex,
169
- suspendKey: suspension.suspendKey,
170
- awaitResults: suspension.awaitResults,
227
+ waits: next.waits,
228
+ checkpoint: next,
171
229
  snapshot: this.getSnapshot(),
172
230
  };
173
231
  }
174
232
  const output = await this.evaluateWorkflowOutputs();
175
233
  this.status = EWorkflowRunStatus.FINISHED;
176
- this.suspension = undefined;
177
- this.currentStep = undefined;
234
+ this.checkpoint = undefined;
178
235
  this.emit('hook:workflow:finish', { runId: this.runId, output });
179
236
  if (!this.context) {
180
237
  throw new Error('Workflow context is not attached.');
@@ -188,7 +245,7 @@ export class WorkflowRunner {
188
245
  }
189
246
  catch (error) {
190
247
  this.status = EWorkflowRunStatus.FAILED;
191
- this.currentStep = undefined;
248
+ this.checkpoint = undefined;
192
249
  this.emit('hook:workflow:failure', { runId: this.runId, error });
193
250
  this.context?.attachWorkflowRuntime(undefined);
194
251
  return {
@@ -199,47 +256,84 @@ export class WorkflowRunner {
199
256
  }
200
257
  }
201
258
  /**
202
- * Rebuild a runner from persisted state, allowing hosts to resume after restarts.
259
+ * Leave the run suspended on `checkpoint` after a resume payload was
260
+ * refused.
261
+ *
262
+ * @param checkpoint The checkpoint the run was suspended on.
263
+ * @param rejection The refused wait and why.
264
+ * @returns The suspended result, carrying the rejection.
265
+ */
266
+ keepWaiting(checkpoint, rejection) {
267
+ this.checkpoint = checkpoint;
268
+ this.status = EWorkflowRunStatus.SUSPENDED;
269
+ return {
270
+ status: EWorkflowRunStatus.SUSPENDED,
271
+ waits: checkpoint.waits,
272
+ checkpoint,
273
+ snapshot: this.getSnapshot(),
274
+ rejection,
275
+ };
276
+ }
277
+ /**
278
+ * Snapshot the suspended run as a detached JSON checkpoint.
279
+ *
280
+ * The checkpoint goes through the same JSON round trip a host applies when
281
+ * persisting it, so a resumed run sees the same values in process and
282
+ * after a restore.
283
+ *
284
+ * @param state Root execution state at suspension time.
285
+ * @param root Frame returned by the top-level flow.
286
+ * @returns The checkpoint to hand to the host.
287
+ * @throws When the run's state cannot be encoded as JSON.
288
+ */
289
+ buildCheckpoint(state, root) {
290
+ try {
291
+ return cloneAsJson({
292
+ version: CHECKPOINT_VERSION,
293
+ fingerprint: fingerprintWorkflow(this.compiled),
294
+ input: state.input,
295
+ output: state.output,
296
+ root,
297
+ waits: collectWaits(root),
298
+ });
299
+ }
300
+ catch (error) {
301
+ const reason = error instanceof Error ? error.message : String(error);
302
+ throw new Error(`Cannot checkpoint the suspended run: its state is not JSON-serializable (${reason}).`);
303
+ }
304
+ }
305
+ /**
306
+ * Restore a suspended run from its persisted checkpoint, typically in a
307
+ * different process than the one that suspended it.
203
308
  *
204
309
  * @param compiled The compiled workflow definition.
205
- * @param options Persisted state and metadata needed to rebuild the runner.
206
- * @returns A runner positioned to continue from the prior suspension or status.
310
+ * @param options.checkpoint Checkpoint returned when the run suspended.
311
+ * @param options.context Freshly hydrated workflow context.
312
+ * @param options.snapshot Persisted action snapshot, to keep reporting past steps.
313
+ * @param options.runId Run identifier propagated through events.
314
+ * @returns A suspended runner ready for {@link resume}.
315
+ * @throws {WorkflowResumeError} When the checkpoint cannot resume against `compiled`.
207
316
  */
208
- static async fromPersistedState(compiled, options) {
317
+ static fromCheckpoint(compiled, options) {
318
+ const validation = validateCheckpoint(compiled, options.checkpoint);
319
+ if (!validation.ok) {
320
+ throw validation.error;
321
+ }
322
+ const checkpoint = validation.checkpoint;
209
323
  const runner = new WorkflowRunner(compiled, {
210
324
  runId: options.runId,
211
325
  });
326
+ runner.checkpoint = checkpoint;
212
327
  runner.state = {
213
- input: options.state.input ?? {},
214
- output: options.state.output ?? {},
215
- iteration: options.state.iteration,
216
- accumulator: options.state.accumulator,
217
- iterationStack: [...(options.state.iterationStack ?? [])],
328
+ input: checkpoint.input,
329
+ output: checkpoint.output,
330
+ iterationStack: [],
218
331
  };
219
332
  runner.context = options.context;
220
- runner.snapshots = options.snapshot.actions ?? {};
221
- runner.stepLog = {};
222
- runner.status = options.snapshot.status ?? EWorkflowRunStatus.IDLE;
223
- runner.lastResumeData = options.lastResumeData;
224
- runner.runtimeControl = new RunnerRuntimeControl(runner);
333
+ runner.snapshots = { ...(options.snapshot?.actions ?? {}) };
334
+ runner.status = EWorkflowRunStatus.SUSPENDED;
335
+ runner.runtimeControl = new RunnerRuntimeControl();
225
336
  options.context.attachWorkflowRuntime(runner.runtimeControl);
226
- if (options.suspension) {
227
- const suspension = rebuildSuspension(runner.createSuspensionRebuilderDeps(), {
228
- state: runner.state,
229
- stepId: options.suspension.stepId,
230
- reason: options.suspension.reason ?? undefined,
231
- data: options.suspension.data,
232
- stepExecId: options.suspension.stepExecId,
233
- suspendIndex: options.suspension.suspendIndex,
234
- suspendKey: options.suspension.suspendKey,
235
- awaitResults: options.suspension.awaitResults,
236
- });
237
- if (!suspension) {
238
- throw new Error(`Unable to rebuild suspension for step ${options.suspension.stepId}`);
239
- }
240
- runner.suspension = suspension;
241
- runner.status = EWorkflowRunStatus.SUSPENDED;
242
- }
243
337
  return runner;
244
338
  }
245
339
  /**
@@ -333,103 +427,71 @@ export class WorkflowRunner {
333
427
  /**
334
428
  * Construct the environment object passed to step executors.
335
429
  *
430
+ * @param pass The execution pass, shared by every scope it forks.
431
+ * @param overrides Scope-specific replacements, e.g. for a parallel branch.
336
432
  * @returns A step executor environment bound to this runner.
337
- * @throws When the workflow context is missing.
433
+ * @throws When the workflow context or runtime control is missing.
338
434
  */
339
- createExecutorEnv(overrides = {}) {
435
+ createExecutorEnv(pass, overrides = {}) {
340
436
  const context = overrides.context ?? this.context;
341
437
  if (!context) {
342
438
  throw new Error('Workflow context is not attached.');
343
439
  }
440
+ const runtime = overrides.runtime ?? this.runtimeControl;
441
+ if (!runtime) {
442
+ throw new Error('Workflow runtime control is not initialized.');
443
+ }
344
444
  const signal = overrides.signal ?? new AbortController().signal;
345
- const setCurrentStep = overrides.setCurrentStep ??
346
- ((step) => {
347
- this.currentStep = step;
348
- });
349
- const captureTaskOutput = overrides.captureTaskOutput ??
350
- ((task, state, result) => this.captureTaskOutput(task, state, result));
351
445
  const executorEnv = {
352
446
  compiled: this.compiled,
353
447
  context,
354
448
  signal,
355
449
  runId: this.runId,
450
+ runtime,
451
+ resolutions: pass.resolutions,
452
+ rejectResume: (rejection) => {
453
+ pass.rejection = rejection;
454
+ },
356
455
  buildInstanceStepInfo: (step, iterationStack) => this.buildInstanceStepInfo(step, iterationStack),
357
456
  markSnapshot: (step, status, reason) => this.markSnapshot(step, status, reason),
358
457
  recordStepExecution: (step, update) => this.recordStepExecution(step, update),
359
458
  emit: (event, payload) => this.emit(event, payload),
360
- setCurrentStep,
361
- beginStepExecution: (stepId) => {
362
- if (!this.runtimeControl) {
363
- return `${stepId}#1`;
364
- }
365
- return this.runtimeControl.beginStepExecution(stepId);
366
- },
367
- waitForStepSuspension: (stepId) => {
368
- if (!this.runtimeControl) {
369
- throw new Error('Workflow runtime control is not initialized.');
370
- }
371
- return this.runtimeControl.waitForStepSuspension(stepId);
372
- },
373
- clearStepSuspensions: (stepId, error) => {
374
- this.runtimeControl?.clearStepSuspensions(stepId, error);
375
- },
376
- primeStepResumeData: (stepId, resumeData) => {
377
- this.runtimeControl?.primeStepResumeData(stepId, resumeData);
378
- },
379
- prepareStepReplay: (seed) => {
380
- this.runtimeControl?.prepareStepReplay(seed);
381
- },
382
- recordStepSuspendResult: (params) => {
383
- this.runtimeControl?.recordStepSuspendResult(params);
384
- },
385
- captureTaskOutput,
386
- executeFlow: (steps, state, path, startIndex) => this.executeFlow(steps, state, path, startIndex, executorEnv),
387
- executeStep: (step, state, path) => this.executeStep(step, state, path, executorEnv),
388
- fork: (forkOverrides) => this.createExecutorEnv({
459
+ captureTaskOutput: (task, state, result) => this.captureTaskOutput(task, state, result),
460
+ executeFlow: (steps, state, path, frame) => this.executeFlow(steps, state, path, frame, executorEnv),
461
+ executeStep: (step, state, path, frame) => this.executeStep(step, state, path, frame, executorEnv),
462
+ fork: (forkOverrides) => this.createExecutorEnv(pass, {
389
463
  context: forkOverrides.context ?? context,
390
464
  signal: forkOverrides.signal ?? signal,
391
- setCurrentStep: forkOverrides.setCurrentStep ?? setCurrentStep,
392
- captureTaskOutput: forkOverrides.captureTaskOutput ?? captureTaskOutput,
465
+ runtime: forkOverrides.runtime ?? runtime,
393
466
  }),
394
467
  };
395
468
  return executorEnv;
396
469
  }
397
470
  /**
398
- * Build dependencies used to reconstruct a suspension from persisted state.
399
- *
400
- * @returns Dependency bag for suspension rebuilders.
401
- */
402
- createSuspensionRebuilderDeps() {
403
- return {
404
- compiled: this.compiled,
405
- context: this.context,
406
- runId: this.runId,
407
- createExecutorEnv: () => this.createExecutorEnv(),
408
- buildInstanceStepInfo: (step, iterationStack) => this.buildInstanceStepInfo(step, iterationStack),
409
- captureTaskOutput: (task, state, result) => this.captureTaskOutput(task, state, result),
410
- markSnapshot: (step, status, reason) => this.markSnapshot(step, status, reason),
411
- emit: (event, payload) => this.emit(event, payload),
412
- executeFlow: (steps, state, path, startIndex) => this.executeFlow(steps, state, path, startIndex),
413
- };
414
- }
415
- /**
416
- * Walk a list of compiled steps, threading state and returning a suspension when encountered.
471
+ * Walk a list of compiled steps, threading state and returning a frame when
472
+ * one of them suspends.
417
473
  *
418
474
  * @param steps The steps to execute sequentially.
419
475
  * @param state Mutable execution state shared across steps.
420
476
  * @param path Path tokens leading to the current step for tracing.
421
- * @param startIndex Index to resume from within the flow.
422
- * @returns A suspension if execution pauses, otherwise void.
477
+ * @param frame Frame of a previous suspension within these steps.
478
+ * @param env Executor environment of the current scope.
479
+ * @returns A frame if execution pauses, otherwise void.
423
480
  */
424
- async executeFlow(steps, state, path, startIndex = 0, env = this.createExecutorEnv()) {
425
- // Walk the flow sequentially; if a step suspends, wrap its continuation so we resume at the same index.
426
- for (let index = startIndex; index < steps.length; index += 1) {
481
+ async executeFlow(steps, state, path, frame, env) {
482
+ if (frame) {
483
+ state.accumulator = frame.accumulator;
484
+ }
485
+ for (let index = frame?.index ?? 0; index < steps.length; index += 1) {
427
486
  throwIfAborted(env.signal);
428
- const step = steps[index];
429
- const stepPath = [...path, index];
430
- const suspension = await this.executeStep(step, state, stepPath, env);
431
- if (suspension) {
432
- return wrapSuspensionContinuation(suspension, () => this.executeFlow(steps, state, path, index + 1, env));
487
+ const child = await this.executeStep(steps[index], state, [...path, index], frame && index === frame.index ? frame.child : undefined, env);
488
+ if (child) {
489
+ return {
490
+ kind: 'sequence',
491
+ index,
492
+ accumulator: state.accumulator,
493
+ child,
494
+ };
433
495
  }
434
496
  }
435
497
  return undefined;
@@ -440,19 +502,22 @@ export class WorkflowRunner {
440
502
  * @param step The step to run.
441
503
  * @param state The shared execution state.
442
504
  * @param path Tokens describing the location of the step in the workflow.
443
- * @returns A suspension if the step pauses execution, otherwise void.
505
+ * @param frame Frame of a previous suspension of this step.
506
+ * @param env Executor environment of the current scope.
507
+ * @returns A frame if the step pauses execution, otherwise void.
444
508
  */
445
- async executeStep(step, state, path, env = this.createExecutorEnv()) {
509
+ async executeStep(step, state, path, frame, env) {
446
510
  throwIfAborted(env.signal);
511
+ assertFrameMatchesStep(frame, step, path);
447
512
  switch (step.type) {
448
513
  case StepType.Task:
449
- return runTaskExecutor(env, step, state, path);
514
+ return runTaskExecutor(env, step, state, path, frame);
450
515
  case StepType.Parallel:
451
- return runParallelExecutor(env, step, state, path);
516
+ return runParallelExecutor(env, step, state, path, frame);
452
517
  case StepType.Conditional:
453
- return runConditionalExecutor(env, step, state, path);
518
+ return runConditionalExecutor(env, step, state, path, frame);
454
519
  case StepType.Loop:
455
- return runLoopExecutor(env, step, state, path);
520
+ return runLoopExecutor(env, step, state, path, frame);
456
521
  }
457
522
  }
458
523
  /**
@@ -4,6 +4,7 @@
4
4
  * Full terms: see LICENSE.md.
5
5
  */
6
6
  import { stringify as stringifyYaml } from 'yaml';
7
+ import { validateCheckpoint, } from './checkpoint';
7
8
  import { EWorkflowRunStatus, } from './context';
8
9
  import { TASK_KIND, WorkflowDefinitionSchema, validateWorkflow, } from './dsl.types';
9
10
  import { safeRenameTaskInDefinition as renameTaskInDefinition } from './utils/workflow-definition';
@@ -14,12 +15,11 @@ export { compileWorkflow } from './workflow-compiler';
14
15
  export { WorkflowEventEmitter } from './workflow-event-emitter';
15
16
  export { WorkflowRunner } from './workflow-runner';
16
17
  class WorkflowRunSuspendedError extends Error {
17
- constructor(stepId, options) {
18
- super(`Workflow run suspended at step ${stepId}${options?.reason ? `: ${options.reason}` : ''}`);
18
+ constructor(waits) {
19
+ const steps = waits.map(({ step, reason }) => reason ? `${step.id} (${reason})` : step.id);
20
+ super(`Workflow run suspended at ${steps.join(', ')}`);
19
21
  this.name = 'WorkflowRunSuspendedError';
20
- this.stepId = stepId;
21
- this.reason = options?.reason;
22
- this.data = options?.data;
22
+ this.waits = waits;
23
23
  }
24
24
  }
25
25
  const getTaskNameFromStep = (step) => {
@@ -218,10 +218,7 @@ export class Workflow {
218
218
  : new Error(String(result.error));
219
219
  }
220
220
  context.attachWorkflowRuntime(undefined);
221
- throw new WorkflowRunSuspendedError(result.step.id, {
222
- reason: result.reason,
223
- data: result.data,
224
- });
221
+ throw new WorkflowRunSuspendedError(result.waits);
225
222
  }
226
223
  /**
227
224
  * Construct a runner without executing, allowing hosts to manage start/resume manually.
@@ -230,9 +227,24 @@ export class Workflow {
230
227
  return new WorkflowRunner(this.compiled, options);
231
228
  }
232
229
  /**
233
- * Rebuild a runner from persisted state and snapshot, useful after restarts.
230
+ * Decide whether a persisted checkpoint can resume against this workflow,
231
+ * without running anything. Call it before claiming a wait.
232
+ *
233
+ * @param checkpoint The checkpoint, as persisted.
234
+ * @param options.waitId Wait the caller is about to resume.
235
+ * @param options.resumeData Payload the caller is about to resume with,
236
+ * checked against what the wait accepts when the key is present.
237
+ * @returns The parsed checkpoint, or the typed reason it cannot resume.
238
+ */
239
+ validateCheckpoint(checkpoint, options) {
240
+ return validateCheckpoint(this.compiled, checkpoint, options);
241
+ }
242
+ /**
243
+ * Restore a suspended runner from its persisted checkpoint, useful after restarts.
244
+ *
245
+ * @throws {WorkflowResumeError} When the checkpoint cannot resume against this workflow.
234
246
  */
235
- async buildRunnerFromState(options) {
236
- return WorkflowRunner.fromPersistedState(this.compiled, options);
247
+ buildRunnerFromCheckpoint(options) {
248
+ return WorkflowRunner.fromCheckpoint(this.compiled, options);
237
249
  }
238
250
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-action.d.ts","sourceRoot":"","sources":["../../../src/action/abstract-action.ts"],"names":[],"mappings":"AAMA,OAAO,EAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAMjD,OAAO,EACL,MAAM,EACN,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAIxB;;GAEG;AACH,8BAAsB,cAAc,CAClC,CAAC,EACD,CAAC,EACD,CAAC,SAAS,mBAAmB,EAC7B,CAAC,EACD,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,YAAW,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAEhC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC,SAAgB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAExC,SAA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3
3
  import { BaseWorkflowContext } from '../context';
4
4
  import { Settings } from '../dsl.types';
5
- import { Deferred } from '../utils/deferred';
6
5
  export type RuntimeSettings<S = unknown> = Settings & S;
7
6
  export type AnyRuntimeBindings = InferWorkflowBindings;
8
7
  export interface ActionMetadata<I, O, S> {
@@ -40,17 +39,4 @@ export type InferActionContext<A extends Action> = InferActionArgs<A>['context']
40
39
  export type InferActionOutput<A extends Action> = Awaited<ReturnType<A['execute']>>;
41
40
  export type InferActionSettings<S extends Action> = InferActionArgs<S>['settings'];
42
41
  export type InferActionBindings<S extends Action> = InferActionArgs<S>['bindings'];
43
- export interface SuspensionNotice {
44
- stepId: string;
45
- reason?: string;
46
- data?: unknown;
47
- resume: Deferred<unknown>;
48
- }
49
- export type ActionExecutionOutcome<T> = {
50
- type: 'completed';
51
- value: T;
52
- } | {
53
- type: 'suspended';
54
- notice: SuspensionNotice;
55
- };
56
42
  //# sourceMappingURL=action.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.types.d.ts","sourceRoot":"","sources":["../../../src/action/action.types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,QAAQ,GAAG,CAAC,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAEvD,MAAM,WAAW,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,C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