@hexabot-ai/agentic 3.1.0-alpha.0 → 3.1.2-alpha.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
CHANGED
|
@@ -17,7 +17,7 @@ pnpm add @hexabot-ai/agentic
|
|
|
17
17
|
npm install @hexabot-ai/agentic
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Requires Node.js >= 20.
|
|
20
|
+
Requires Node.js >= 20.19.0.
|
|
21
21
|
|
|
22
22
|
The package ships both ESM (`import`) and CommonJS (`require`) entrypoints plus browser-safe internals, so you can run workflows in Node.js or bundle them for the client.
|
|
23
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hexabot-ai/agentic",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-alpha.0",
|
|
4
4
|
"description": "Schemas and utilities for the Hexabot agentic workflow DSL.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"*.{ts}": "eslint --fix --config eslint.config-staged.cjs"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": ">=20.
|
|
46
|
+
"node": ">=20.19.0"
|
|
47
47
|
},
|
|
48
48
|
"license": "FCL-1.0-ALv2",
|
|
49
49
|
"scripts": {
|
|
@@ -220,6 +220,54 @@ describe('rebuildSuspension', () => {
|
|
|
220
220
|
expect(deps.executeFlow).toHaveBeenCalledWith(compiled.flow, state, [], 1);
|
|
221
221
|
});
|
|
222
222
|
|
|
223
|
+
it('continues outer flow after resuming a suspension inside a conditional branch', async () => {
|
|
224
|
+
const branchTask = createTask('branch_task');
|
|
225
|
+
const afterTask = createTask('after_task');
|
|
226
|
+
const branchStep: CompiledStep = {
|
|
227
|
+
type: StepType.Task,
|
|
228
|
+
id: '0.branch.0.0:branch_task',
|
|
229
|
+
label: 'branch_task',
|
|
230
|
+
taskName: 'branch_task',
|
|
231
|
+
};
|
|
232
|
+
const conditionalStep: CompiledStep = {
|
|
233
|
+
type: StepType.Conditional,
|
|
234
|
+
id: '0:conditional',
|
|
235
|
+
label: 'conditional',
|
|
236
|
+
branches: [{ id: '0:branch_0', steps: [branchStep] }],
|
|
237
|
+
};
|
|
238
|
+
const outerStep: CompiledStep = {
|
|
239
|
+
type: StepType.Task,
|
|
240
|
+
id: '1:after_task',
|
|
241
|
+
label: 'after_task',
|
|
242
|
+
taskName: 'after_task',
|
|
243
|
+
};
|
|
244
|
+
const compiled = createCompiledWorkflow([conditionalStep, outerStep], {
|
|
245
|
+
branch_task: branchTask,
|
|
246
|
+
after_task: afterTask,
|
|
247
|
+
});
|
|
248
|
+
const state: ExecutionState = {
|
|
249
|
+
input: {},
|
|
250
|
+
output: {},
|
|
251
|
+
iterationStack: [],
|
|
252
|
+
};
|
|
253
|
+
const deps = createDeps(compiled);
|
|
254
|
+
deps.executeFlow = jest
|
|
255
|
+
.fn()
|
|
256
|
+
.mockResolvedValue(undefined) as SuspensionRebuilderDeps['executeFlow'];
|
|
257
|
+
|
|
258
|
+
const suspension = rebuildSuspension(deps, {
|
|
259
|
+
state,
|
|
260
|
+
stepId: '0.branch.0.0:branch_task',
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
await suspension?.continue({ reply: 'ok' });
|
|
264
|
+
|
|
265
|
+
expect(deps.captureTaskOutput).toHaveBeenCalledWith(branchTask, state, {
|
|
266
|
+
reply: 'ok',
|
|
267
|
+
});
|
|
268
|
+
expect(deps.executeFlow).toHaveBeenCalledWith(compiled.flow, state, [], 1);
|
|
269
|
+
});
|
|
270
|
+
|
|
223
271
|
it('rebuilds a parallel suspension and continues remaining siblings when needed', async () => {
|
|
224
272
|
const firstTask = createTask('child_a');
|
|
225
273
|
const secondTask = createTask('child_b');
|