@xyne/workflow-sdk 3.2.5 → 3.2.7
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/dist/client/types.d.ts +7 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +3 -0
- package/dist/common/index.js.map +1 -1
- package/dist/engine/node-path.d.ts +46 -0
- package/dist/engine/node-path.d.ts.map +1 -0
- package/dist/engine/node-path.js +56 -0
- package/dist/engine/node-path.js.map +1 -0
- package/dist/engine/workflow-executor.d.ts +50 -22
- package/dist/engine/workflow-executor.d.ts.map +1 -1
- package/dist/engine/workflow-executor.js +337 -393
- package/dist/engine/workflow-executor.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/persistence/types.d.ts +7 -0
- package/dist/persistence/types.d.ts.map +1 -1
- package/dist/router/workflow-router.d.ts.map +1 -1
- package/dist/router/workflow-router.js +5 -0
- package/dist/router/workflow-router.js.map +1 -1
- package/dist/runtime/types.d.ts +8 -0
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.js +98 -13
- package/dist/runtime/workflow-runtime.js.map +1 -1
- package/dist/steps/base-step.d.ts +20 -4
- package/dist/steps/base-step.d.ts.map +1 -1
- package/dist/steps/base-step.js +17 -0
- package/dist/steps/base-step.js.map +1 -1
- package/dist/steps/builtin/loop.step.d.ts.map +1 -1
- package/dist/steps/builtin/loop.step.js +14 -20
- package/dist/steps/builtin/loop.step.js.map +1 -1
- package/dist/steps/builtin/parallel.step.d.ts +10 -31
- package/dist/steps/builtin/parallel.step.d.ts.map +1 -1
- package/dist/steps/builtin/parallel.step.js +32 -192
- package/dist/steps/builtin/parallel.step.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
*
|
|
11
11
|
* ## Pause handling (allSettled)
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
13
|
+
* Each branch runs in its own scope and persists its steps under node-path keys
|
|
14
|
+
* (`parallel_x:<branch>#0/<stepId>`). When a branch parks, its `walkBranch`
|
|
15
|
+
* throws `PauseStep`; PARALLEL collects which branches paused and, if any did,
|
|
16
|
+
* throws a single `PauseStep` so the whole step parks. There is no internal
|
|
17
|
+
* saved state — the per-branch step records ARE the durable state. On resume
|
|
18
|
+
* the executor re-enters PARALLEL, re-runs every branch via `walkBranch`:
|
|
19
|
+
* completed branch steps memo-skip from their records, the parked one(s) resume
|
|
20
|
+
* from theirs. Multiple branches can be paused simultaneously; each `resume()`
|
|
21
|
+
* targets one branch's gate by node-path. When the last paused branch
|
|
22
|
+
* completes, PARALLEL merges everything and returns.
|
|
23
23
|
*
|
|
24
24
|
* ## Output
|
|
25
25
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* race: { mode: 'race', winner: string, result: { output } }
|
|
31
31
|
*/
|
|
32
32
|
import { z } from 'zod';
|
|
33
|
-
import { BaseControlFlowStep, collectBranchSteps } from '../base-step.js';
|
|
33
|
+
import { BaseControlFlowStep, collectBranchSteps, cloneScope } from '../base-step.js';
|
|
34
34
|
import { BuiltinStepType } from '../../types/known-types.js';
|
|
35
35
|
import { PauseStep } from '../../engine/pause-step.js';
|
|
36
36
|
// ─── Config ───
|
|
@@ -110,93 +110,31 @@ export class ParallelStep extends BaseControlFlowStep {
|
|
|
110
110
|
}
|
|
111
111
|
// ─── Merge: allSettled ───
|
|
112
112
|
async executeAllSettled(branchEntries, ctx) {
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const branches = {
|
|
119
|
-
...savedState.completedBranches,
|
|
120
|
-
};
|
|
121
|
-
const remainingPaused = {
|
|
122
|
-
...savedState.pausedBranches,
|
|
123
|
-
};
|
|
124
|
-
const resumeName = Object.keys(remainingPaused)[0];
|
|
125
|
-
if (resumeName) {
|
|
126
|
-
const branchSteps = (branchEntries.find(([n]) => n === resumeName)?.[1] ?? []);
|
|
127
|
-
const resumePath = remainingPaused[resumeName]?.pausePath;
|
|
128
|
-
try {
|
|
129
|
-
const branchCtx = this.cloneContext(ctx.workflow);
|
|
130
|
-
await ctx.walkBranch(branchSteps, branchCtx, resumeName, resumePath);
|
|
131
|
-
branches[resumeName] = {
|
|
132
|
-
status: 'fulfilled',
|
|
133
|
-
steps: collectBranchSteps(branchSteps, branchCtx),
|
|
134
|
-
};
|
|
135
|
-
delete remainingPaused[resumeName];
|
|
136
|
-
}
|
|
137
|
-
catch (err) {
|
|
138
|
-
if (PauseStep.is(err)) {
|
|
139
|
-
// Paused again at a later WAIT — keep paused with the updated path.
|
|
140
|
-
const pe = err;
|
|
141
|
-
remainingPaused[resumeName] = {
|
|
142
|
-
reason: pe.message,
|
|
143
|
-
...(pe.externalRef !== undefined
|
|
144
|
-
? { externalRef: pe.externalRef }
|
|
145
|
-
: {}),
|
|
146
|
-
...(pe._pausePath && pe._pausePath.length > 0
|
|
147
|
-
? { pausePath: pe._pausePath }
|
|
148
|
-
: {}),
|
|
149
|
-
...(pe.statePatch ? { statePatch: pe.statePatch } : {}),
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
branches[resumeName] = {
|
|
154
|
-
status: 'rejected',
|
|
155
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
156
|
-
};
|
|
157
|
-
delete remainingPaused[resumeName];
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (Object.keys(remainingPaused).length > 0) {
|
|
162
|
-
this.throwParallelPause(branches, remainingPaused);
|
|
163
|
-
}
|
|
164
|
-
return { mode: 'allSettled', branches };
|
|
165
|
-
}
|
|
166
|
-
// ── First run: fan out all branches concurrently ──
|
|
167
|
-
const branches = {};
|
|
168
|
-
const promises = branchEntries.map(async ([name, steps]) => {
|
|
169
|
-
const branchCtx = this.cloneContext(ctx.workflow);
|
|
113
|
+
// Run every branch concurrently, each in its own scope. Completed branch
|
|
114
|
+
// steps memo-skip on resume; the parked one(s) resume — handled entirely by
|
|
115
|
+
// the executor's node-path records, so no saved state lives here.
|
|
116
|
+
const settled = await Promise.allSettled(branchEntries.map(async ([name, steps]) => {
|
|
117
|
+
const branchCtx = cloneScope(ctx.workflow);
|
|
170
118
|
await ctx.walkBranch(steps, branchCtx, name);
|
|
171
119
|
return {
|
|
172
|
-
name,
|
|
173
120
|
steps: collectBranchSteps(steps, branchCtx),
|
|
174
121
|
};
|
|
175
|
-
});
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
122
|
+
}));
|
|
123
|
+
const branches = {};
|
|
124
|
+
let pausedCount = 0;
|
|
125
|
+
let firstExternalRef;
|
|
179
126
|
for (let i = 0; i < branchEntries.length; i++) {
|
|
180
127
|
const name = branchEntries[i][0];
|
|
181
128
|
const entry = settled[i];
|
|
182
129
|
if (entry.status === 'fulfilled') {
|
|
183
|
-
branches[name] = {
|
|
184
|
-
status: 'fulfilled',
|
|
185
|
-
steps: entry.value.steps,
|
|
186
|
-
};
|
|
130
|
+
branches[name] = { status: 'fulfilled', steps: entry.value.steps };
|
|
187
131
|
}
|
|
188
132
|
else if (PauseStep.is(entry.reason)) {
|
|
133
|
+
pausedCount++;
|
|
189
134
|
const pe = entry.reason;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
? { externalRef: pe.externalRef }
|
|
194
|
-
: {}),
|
|
195
|
-
...(pe._pausePath && pe._pausePath.length > 0
|
|
196
|
-
? { pausePath: pe._pausePath }
|
|
197
|
-
: {}),
|
|
198
|
-
...(pe.statePatch ? { statePatch: pe.statePatch } : {}),
|
|
199
|
-
};
|
|
135
|
+
if (firstExternalRef === undefined && pe.externalRef !== undefined) {
|
|
136
|
+
firstExternalRef = pe.externalRef;
|
|
137
|
+
}
|
|
200
138
|
}
|
|
201
139
|
else {
|
|
202
140
|
branches[name] = {
|
|
@@ -207,37 +145,19 @@ export class ParallelStep extends BaseControlFlowStep {
|
|
|
207
145
|
};
|
|
208
146
|
}
|
|
209
147
|
}
|
|
210
|
-
|
|
211
|
-
|
|
148
|
+
// Any paused branch parks the whole step. The executor records PARALLEL as
|
|
149
|
+
// EXTERNAL_WAIT and re-enters it on resume; this throw discards the partial
|
|
150
|
+
// `branches` (the completed branches' outputs are durable in their records).
|
|
151
|
+
if (pausedCount > 0) {
|
|
152
|
+
const reason = pausedCount === 1 ? 'branch awaiting resume' : `${String(pausedCount)} branches paused`;
|
|
153
|
+
throw new PauseStep(reason, firstExternalRef !== undefined ? { externalRef: firstExternalRef } : undefined);
|
|
212
154
|
}
|
|
213
155
|
return { mode: 'allSettled', branches };
|
|
214
156
|
}
|
|
215
|
-
/** Save branch state and throw a PauseStep. Shared by first-run and resume. */
|
|
216
|
-
throwParallelPause(completedBranches, pausedBranches) {
|
|
217
|
-
const state = {
|
|
218
|
-
completedBranches,
|
|
219
|
-
pausedBranches,
|
|
220
|
-
};
|
|
221
|
-
const firstPaused = Object.values(pausedBranches)[0];
|
|
222
|
-
// Surface the next paused branch's own pause state (a plain per-branch
|
|
223
|
-
// approval) instead of a collective panel; fall back if none was saved.
|
|
224
|
-
const innerPauseState = firstPaused.statePatch?.pauseState;
|
|
225
|
-
const pauseState = innerPauseState ?? this.buildPauseState(pausedBranches);
|
|
226
|
-
const opts = {
|
|
227
|
-
statePatch: {
|
|
228
|
-
__parallelState: state,
|
|
229
|
-
pauseState, // UI reads this field to show pause details
|
|
230
|
-
},
|
|
231
|
-
};
|
|
232
|
-
if (firstPaused.externalRef !== undefined) {
|
|
233
|
-
opts.externalRef = firstPaused.externalRef;
|
|
234
|
-
}
|
|
235
|
-
throw new PauseStep(firstPaused.reason, opts);
|
|
236
|
-
}
|
|
237
157
|
// ─── Merge: race ───
|
|
238
158
|
async executeRace(branchEntries, ctx) {
|
|
239
159
|
const promises = branchEntries.map(async ([name, steps]) => {
|
|
240
|
-
const branchCtx =
|
|
160
|
+
const branchCtx = cloneScope(ctx.workflow);
|
|
241
161
|
await ctx.walkBranch(steps, branchCtx, name);
|
|
242
162
|
return {
|
|
243
163
|
name,
|
|
@@ -251,85 +171,5 @@ export class ParallelStep extends BaseControlFlowStep {
|
|
|
251
171
|
branches: { [winner.name]: { status: 'fulfilled', steps: winner.steps } },
|
|
252
172
|
};
|
|
253
173
|
}
|
|
254
|
-
// ─── Helpers ───
|
|
255
|
-
/**
|
|
256
|
-
* Build structured pause state for UI rendering.
|
|
257
|
-
* Shows which branches are paused and their nested depth.
|
|
258
|
-
*/
|
|
259
|
-
buildPauseState(pausedBranches) {
|
|
260
|
-
const branchCount = Object.keys(pausedBranches).length;
|
|
261
|
-
const branchNames = Object.keys(pausedBranches);
|
|
262
|
-
return {
|
|
263
|
-
reason: branchCount === 1
|
|
264
|
-
? `Branch "${branchNames[0]}" is paused`
|
|
265
|
-
: `${branchCount} branches are paused`,
|
|
266
|
-
category: 'approval',
|
|
267
|
-
prompt: branchCount === 1
|
|
268
|
-
? 'This branch is waiting for action.'
|
|
269
|
-
: 'Multiple branches are waiting. Resume each branch individually.',
|
|
270
|
-
display: branchNames.map(branchKey => {
|
|
271
|
-
const info = pausedBranches[branchKey];
|
|
272
|
-
const nestedDepth = info.pausePath?.length || 0;
|
|
273
|
-
return {
|
|
274
|
-
label: `Branch: ${branchKey}`,
|
|
275
|
-
value: {
|
|
276
|
-
status: 'paused',
|
|
277
|
-
reason: info.reason,
|
|
278
|
-
...(info.externalRef ? { externalRef: info.externalRef } : {}),
|
|
279
|
-
...(nestedDepth > 0 ? { nestedSteps: nestedDepth } : {}),
|
|
280
|
-
},
|
|
281
|
-
};
|
|
282
|
-
}),
|
|
283
|
-
actions: [
|
|
284
|
-
{
|
|
285
|
-
key: 'approve',
|
|
286
|
-
label: branchCount === 1 ? 'Resume Branch' : 'Resume Next Branch',
|
|
287
|
-
style: 'primary',
|
|
288
|
-
submitsForm: false,
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
key: 'reject',
|
|
292
|
-
label: 'Cancel Workflow',
|
|
293
|
-
style: 'danger',
|
|
294
|
-
abort: true,
|
|
295
|
-
},
|
|
296
|
-
],
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Load saved parallel state from a prior pause cycle.
|
|
301
|
-
*
|
|
302
|
-
* On resume, the executor hydrates `context.steps[stepId]` from the
|
|
303
|
-
* persisted step row (which includes our statePatch). We check for
|
|
304
|
-
* `__parallelState` in that entry to restore completed branch results.
|
|
305
|
-
*/
|
|
306
|
-
loadSavedState(ctx) {
|
|
307
|
-
if (!ctx.runtime.isResuming)
|
|
308
|
-
return null;
|
|
309
|
-
const stepId = ctx.runtime.stepId;
|
|
310
|
-
const entry = ctx.workflow.steps[stepId];
|
|
311
|
-
if (!entry)
|
|
312
|
-
return null;
|
|
313
|
-
const raw = entry['__parallelState'];
|
|
314
|
-
if (!raw || typeof raw !== 'object')
|
|
315
|
-
return null;
|
|
316
|
-
return raw;
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Create an isolated copy of the workflow context for a branch.
|
|
320
|
-
* Shares trigger and workflow identity, but each branch gets its own
|
|
321
|
-
* steps map so concurrent writes don't conflict.
|
|
322
|
-
*/
|
|
323
|
-
cloneContext(parent) {
|
|
324
|
-
const clone = {
|
|
325
|
-
workflow: parent.workflow,
|
|
326
|
-
trigger: parent.trigger,
|
|
327
|
-
steps: { ...parent.steps },
|
|
328
|
-
};
|
|
329
|
-
if (parent.__meta !== undefined) {
|
|
330
|
-
clone.__meta = parent.__meta;
|
|
331
|
-
}
|
|
332
|
-
return clone;
|
|
333
|
-
}
|
|
334
174
|
}
|
|
335
175
|
//# sourceMappingURL=parallel.step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallel.step.js","sourceRoot":"","sources":["../../../src/steps/builtin/parallel.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"parallel.step.js","sourceRoot":"","sources":["../../../src/steps/builtin/parallel.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,iBAAiB;AAEjB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,MAAM,CAChB,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CACtE,CAAC,QAAQ,CAAC,gGAAgG,CAAC;IAC5G,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,uFAAuF,CAAC;CAC9J,CAAC,CAAC;AAgCH,6DAA6D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IAAI,CACL,CAAC;YACF,OAAO;gBACL,IAAI;gBACJ,KAAK,EAAE,kBAAkB,CAAC,KAAwC,EAAE,SAAS,CAAC;aAC/E,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5C,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE;SAC1E,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyne/workflow-sdk",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "Workflow engine SDK — steps, triggers, executor, agents, and a framework-agnostic HTTP router.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"test": "vitest run",
|
|
85
85
|
"test:watch": "vitest",
|
|
86
86
|
"test:coverage": "vitest run --coverage",
|
|
87
|
-
"prepublishOnly": "npm run build"
|
|
87
|
+
"prepublishOnly": "npm run build && npm test"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"zod": "^3.25.76",
|