@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.
- package/README.md +67 -15
- package/dist/cjs/action/abstract-action.js +13 -1
- package/dist/cjs/checkpoint.js +301 -0
- package/dist/cjs/context.js +11 -27
- package/dist/cjs/dsl.types.js +3 -0
- package/dist/cjs/errors.js +116 -9
- package/dist/cjs/index.js +15 -6
- package/dist/cjs/resume-payload.js +257 -0
- package/dist/cjs/runner-runtime-control.js +181 -306
- package/dist/cjs/step-executors/conditional-executor.js +27 -29
- package/dist/cjs/step-executors/loop-executor.js +53 -62
- package/dist/cjs/step-executors/parallel-executor.js +169 -102
- package/dist/cjs/step-executors/task-executor.js +180 -96
- package/dist/cjs/utils/clone.js +73 -0
- package/dist/cjs/workflow-fingerprint.js +138 -0
- package/dist/cjs/workflow-runner.js +220 -155
- package/dist/cjs/workflow.js +24 -12
- package/dist/esm/action/abstract-action.js +14 -2
- package/dist/esm/checkpoint.js +293 -0
- package/dist/esm/context.js +11 -27
- package/dist/esm/dsl.types.js +3 -0
- package/dist/esm/errors.js +105 -6
- package/dist/esm/index.js +3 -3
- package/dist/esm/resume-payload.js +250 -0
- package/dist/esm/runner-runtime-control.js +179 -303
- package/dist/esm/step-executors/conditional-executor.js +27 -29
- package/dist/esm/step-executors/loop-executor.js +53 -62
- package/dist/esm/step-executors/parallel-executor.js +165 -98
- package/dist/esm/step-executors/task-executor.js +181 -97
- package/dist/esm/utils/clone.js +67 -0
- package/dist/esm/workflow-fingerprint.js +134 -0
- package/dist/esm/workflow-runner.js +220 -155
- package/dist/esm/workflow.js +24 -12
- package/dist/types/action/abstract-action.d.ts.map +1 -1
- package/dist/types/action/action.types.d.ts +0 -14
- package/dist/types/action/action.types.d.ts.map +1 -1
- package/dist/types/checkpoint.d.ts +188 -0
- package/dist/types/checkpoint.d.ts.map +1 -0
- package/dist/types/context.d.ts +45 -11
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/dsl.types.d.ts.map +1 -1
- package/dist/types/errors.d.ts +77 -3
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resume-payload.d.ts +69 -0
- package/dist/types/resume-payload.d.ts.map +1 -0
- package/dist/types/runner-runtime-control.d.ts +63 -51
- package/dist/types/runner-runtime-control.d.ts.map +1 -1
- package/dist/types/step-executors/conditional-executor.d.ts +6 -3
- package/dist/types/step-executors/conditional-executor.d.ts.map +1 -1
- package/dist/types/step-executors/loop-executor.d.ts +6 -4
- package/dist/types/step-executors/loop-executor.d.ts.map +1 -1
- package/dist/types/step-executors/parallel-executor.d.ts +11 -3
- package/dist/types/step-executors/parallel-executor.d.ts.map +1 -1
- package/dist/types/step-executors/task-executor.d.ts +11 -4
- package/dist/types/step-executors/task-executor.d.ts.map +1 -1
- package/dist/types/step-executors/types.d.ts +21 -13
- package/dist/types/step-executors/types.d.ts.map +1 -1
- package/dist/types/utils/clone.d.ts +33 -0
- package/dist/types/utils/clone.d.ts.map +1 -0
- package/dist/types/workflow-event-emitter.d.ts +29 -5
- package/dist/types/workflow-event-emitter.d.ts.map +1 -1
- package/dist/types/workflow-fingerprint.d.ts +14 -0
- package/dist/types/workflow-fingerprint.d.ts.map +1 -0
- package/dist/types/workflow-runner.d.ts +83 -41
- package/dist/types/workflow-runner.d.ts.map +1 -1
- package/dist/types/workflow-types.d.ts +25 -54
- package/dist/types/workflow-types.d.ts.map +1 -1
- package/dist/types/workflow.d.ts +24 -9
- package/dist/types/workflow.d.ts.map +1 -1
- package/examples/defs-bindings-agent/bindings.ts +1 -1
- package/examples/defs-bindings-agent/workflow.ts +3 -2
- package/examples/full/actions/await-user-input.ts +3 -2
- package/examples/full/actions/call-llm.ts +18 -18
- package/examples/full/actions/create-ticket.ts +1 -2
- package/examples/full/actions/decision-router.ts +6 -2
- package/examples/full/actions/get-calendar-events.ts +1 -2
- package/examples/full/actions/get-user-profile.ts +1 -2
- package/examples/full/actions/query-memory.ts +1 -2
- package/examples/full/actions/search-web.ts +1 -2
- package/examples/full/actions/send-email.ts +3 -2
- package/examples/full/workflow.ts +3 -2
- package/examples/loop/actions/await-reply.ts +2 -7
- package/examples/loop/workflow.ts +4 -2
- package/examples/suspend-resume/actions/wait-for-user.ts +11 -9
- package/examples/suspend-resume/workflow.ts +51 -11
- package/package.json +3 -3
- package/src/__tests__/checkpoint.test.ts +2568 -0
- package/src/__tests__/resume-payload.test.ts +245 -0
- package/src/__tests__/runner-runtime-control.test.ts +265 -0
- package/src/__tests__/workflow-fingerprint.test.ts +165 -0
- package/src/__tests__/workflow-runner.test.ts +167 -144
- package/src/__tests__/workflow.test.ts +97 -6
- package/src/action/abstract-action.ts +21 -2
- package/src/action/action.types.ts +0 -12
- package/src/checkpoint.ts +561 -0
- package/src/context.ts +51 -41
- package/src/dsl.types.ts +3 -0
- package/src/errors.ts +161 -8
- package/src/index.ts +33 -14
- package/src/resume-payload.ts +326 -0
- package/src/runner-runtime-control.ts +222 -456
- package/src/step-executors/conditional-executor.test.ts +77 -46
- package/src/step-executors/conditional-executor.ts +47 -40
- package/src/step-executors/loop-executor.test.ts +106 -92
- package/src/step-executors/loop-executor.ts +84 -101
- package/src/step-executors/parallel-executor.test.ts +300 -89
- package/src/step-executors/parallel-executor.ts +243 -125
- package/src/step-executors/task-executor.test.ts +321 -51
- package/src/step-executors/task-executor.ts +232 -145
- package/src/step-executors/types.ts +23 -22
- package/src/utils/clone.ts +75 -0
- package/src/workflow-event-emitter.ts +32 -6
- package/src/workflow-fingerprint.ts +159 -0
- package/src/workflow-runner.ts +325 -209
- package/src/workflow-types.ts +25 -56
- package/src/workflow.ts +41 -34
- package/dist/cjs/step-executors/suspension-continuation.js +0 -27
- package/dist/cjs/suspension-rebuilder.js +0 -265
- package/dist/cjs/utils/deferred.js +0 -17
- package/dist/esm/step-executors/suspension-continuation.js +0 -24
- package/dist/esm/suspension-rebuilder.js +0 -260
- package/dist/esm/utils/deferred.js +0 -14
- package/dist/types/step-executors/suspension-continuation.d.ts +0 -10
- package/dist/types/step-executors/suspension-continuation.d.ts.map +0 -1
- package/dist/types/suspension-rebuilder.d.ts +0 -67
- package/dist/types/suspension-rebuilder.d.ts.map +0 -1
- package/dist/types/utils/deferred.d.ts +0 -7
- package/dist/types/utils/deferred.d.ts.map +0 -1
- package/src/__tests__/suspension-rebuilder.test.ts +0 -404
- package/src/step-executors/suspension-continuation.ts +0 -31
- package/src/suspension-rebuilder.ts +0 -446
- 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 {
|
|
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
|
|
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
|
|
86
|
+
* @returns The checkpoint while the run is suspended, otherwise undefined.
|
|
84
87
|
*/
|
|
85
|
-
|
|
86
|
-
return this.
|
|
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.
|
|
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(
|
|
109
|
+
this.runtimeControl = new RunnerRuntimeControl();
|
|
117
110
|
this.context.attachWorkflowRuntime(this.runtimeControl);
|
|
118
111
|
this.emit('hook:workflow:start', { runId: this.runId });
|
|
119
|
-
|
|
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
|
|
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
|
-
*
|
|
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.
|
|
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
|
|
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.
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
*
|
|
184
|
+
* Run the flow from the top, or from a checkpoint, and normalize
|
|
185
|
+
* suspension, finish, and failure handling.
|
|
146
186
|
*
|
|
147
|
-
* @param
|
|
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(
|
|
191
|
+
async runExecution(resolutions, resumed) {
|
|
192
|
+
const pass = { resolutions };
|
|
151
193
|
try {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
159
|
-
reason: suspension.reason,
|
|
160
|
-
data: suspension.data,
|
|
223
|
+
waits: next.waits,
|
|
161
224
|
});
|
|
162
225
|
return {
|
|
163
226
|
status: EWorkflowRunStatus.SUSPENDED,
|
|
164
|
-
|
|
165
|
-
|
|
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.
|
|
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.
|
|
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
|
-
*
|
|
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
|
|
206
|
-
* @
|
|
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
|
|
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:
|
|
214
|
-
output:
|
|
215
|
-
|
|
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
|
|
221
|
-
runner.
|
|
222
|
-
runner.
|
|
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
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
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
|
-
|
|
392
|
-
captureTaskOutput: forkOverrides.captureTaskOutput ?? captureTaskOutput,
|
|
465
|
+
runtime: forkOverrides.runtime ?? runtime,
|
|
393
466
|
}),
|
|
394
467
|
};
|
|
395
468
|
return executorEnv;
|
|
396
469
|
}
|
|
397
470
|
/**
|
|
398
|
-
*
|
|
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
|
|
422
|
-
* @
|
|
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,
|
|
425
|
-
|
|
426
|
-
|
|
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
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
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
|
-
* @
|
|
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
|
|
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
|
/**
|
package/dist/esm/workflow.js
CHANGED
|
@@ -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(
|
|
18
|
-
|
|
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.
|
|
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.
|
|
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
|
-
*
|
|
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
|
-
|
|
236
|
-
return WorkflowRunner.
|
|
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;
|
|
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;AA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;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CACpE"}
|
|
@@ -2,7 +2,6 @@ import { ZodType } from 'zod';
|
|
|
2
2
|
import type { InferWorkflowBindings } from '../bindings/base-binding';
|
|
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,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