botmux-workflow-core 3.56.0 → 3.57.1
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/cjs/control.cjs +9 -0
- package/dist/cjs/control.cjs.map +2 -2
- package/dist/cjs/engine.cjs.map +2 -2
- package/dist/cjs/gate-policy.cjs.map +1 -1
- package/dist/cjs/index.cjs +44 -1
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/cjs/runtime.cjs +2028 -356
- package/dist/cjs/runtime.cjs.map +4 -4
- package/dist/cjs/schema.cjs +35 -1
- package/dist/cjs/schema.cjs.map +2 -2
- package/dist/esm/control.js +9 -0
- package/dist/esm/control.js.map +2 -2
- package/dist/esm/engine.js.map +2 -2
- package/dist/esm/gate-policy.js.map +1 -1
- package/dist/esm/index.js +44 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/runtime.js +2033 -352
- package/dist/esm/runtime.js.map +4 -4
- package/dist/esm/schema.js +35 -1
- package/dist/esm/schema.js.map +2 -2
- package/dist/types/src/workflows/v3/dag.d.ts +16 -0
- package/dist/types/src/workflows/v3/event-contract.d.ts +263 -0
- package/package.json +1 -1
package/dist/cjs/schema.cjs
CHANGED
|
@@ -342,6 +342,12 @@ function validateDag(raw) {
|
|
|
342
342
|
if (n.bot !== void 0) problems.push(`host node "${id}".bot is not supported \u2014 host nodes do not spawn a CLI`);
|
|
343
343
|
if (n.override !== void 0) problems.push(`host node "${id}".override is not supported`);
|
|
344
344
|
if (n.revisitTo !== void 0) problems.push(`host node "${id}".revisitTo is not supported`);
|
|
345
|
+
if (n.checkpoint !== void 0) {
|
|
346
|
+
problems.push(`host node "${id}".checkpoint is not supported \u2014 only goal nodes can be checkpoints`);
|
|
347
|
+
}
|
|
348
|
+
if (n.placement !== void 0) {
|
|
349
|
+
problems.push(`host node "${id}".placement is not supported \u2014 host nodes are executed by the main bot, never handed off`);
|
|
350
|
+
}
|
|
345
351
|
if (n.resultSchema !== void 0) {
|
|
346
352
|
problems.push(`host node "${id}".resultSchema is not supported \u2014 host output uses the trusted executor result contract`);
|
|
347
353
|
}
|
|
@@ -413,6 +419,8 @@ function validateDag(raw) {
|
|
|
413
419
|
const humanGate = normHumanGate(n.humanGate, `node "${id}"`, problems);
|
|
414
420
|
const override = normOverride(n.override, `node "${id}"`, problems);
|
|
415
421
|
const revisitTo = normRevisitTo(n.revisitTo, id, problems);
|
|
422
|
+
const checkpoint = normCheckpoint(n.checkpoint, `goal node "${id}"`, problems);
|
|
423
|
+
const placement = normPlacement(n.placement, `goal node "${id}"`, problems);
|
|
416
424
|
if (schemaVersion !== 2 && n.outputs !== void 0) {
|
|
417
425
|
problems.push(`goal node "${id}".outputs requires schemaVersion 2`);
|
|
418
426
|
}
|
|
@@ -430,7 +438,9 @@ function validateDag(raw) {
|
|
|
430
438
|
timeoutSec,
|
|
431
439
|
humanGate,
|
|
432
440
|
resultSchema,
|
|
433
|
-
...revisitTo ? { revisitTo } : {}
|
|
441
|
+
...revisitTo ? { revisitTo } : {},
|
|
442
|
+
...checkpoint ? { checkpoint } : {},
|
|
443
|
+
...placement ? { placement } : {}
|
|
434
444
|
});
|
|
435
445
|
}
|
|
436
446
|
for (const node of nodes) {
|
|
@@ -800,6 +810,18 @@ function normTimeoutSec(v, where, problems) {
|
|
|
800
810
|
}
|
|
801
811
|
return v;
|
|
802
812
|
}
|
|
813
|
+
function normPlacement(v, where, problems) {
|
|
814
|
+
if (v === void 0 || v === "topic") return void 0;
|
|
815
|
+
if (v === "main") return "main";
|
|
816
|
+
problems.push(`${where}.placement must be "topic" or "main"`);
|
|
817
|
+
return void 0;
|
|
818
|
+
}
|
|
819
|
+
function normCheckpoint(v, where, problems) {
|
|
820
|
+
if (v === void 0 || v === false) return void 0;
|
|
821
|
+
if (v === true) return true;
|
|
822
|
+
problems.push(`${where}.checkpoint must be a boolean`);
|
|
823
|
+
return void 0;
|
|
824
|
+
}
|
|
803
825
|
function normRevisitTo(v, id, problems) {
|
|
804
826
|
if (v === void 0) return void 0;
|
|
805
827
|
if (!Array.isArray(v)) {
|
|
@@ -868,6 +890,12 @@ function normLoopFields(n, id, problems, schemaVersion) {
|
|
|
868
890
|
if (n.override !== void 0) {
|
|
869
891
|
problems.push(`${where}.override is not supported \u2014 a loop composite never spawns a worker; set override on body nodes instead`);
|
|
870
892
|
}
|
|
893
|
+
if (n.checkpoint !== void 0) {
|
|
894
|
+
problems.push(`${where}.checkpoint is not supported \u2014 mark a goal node outside the loop instead`);
|
|
895
|
+
}
|
|
896
|
+
if (n.placement !== void 0) {
|
|
897
|
+
problems.push(`${where}.placement is not supported \u2014 a loop's body nodes always run in node topics`);
|
|
898
|
+
}
|
|
871
899
|
let maxIterations;
|
|
872
900
|
if (typeof n.maxIterations !== "number" || !Number.isInteger(n.maxIterations) || n.maxIterations < 1) {
|
|
873
901
|
problems.push(`${where}.maxIterations must be a positive integer`);
|
|
@@ -914,6 +942,12 @@ function normLoopFields(n, id, problems, schemaVersion) {
|
|
|
914
942
|
if (b.triggerRule !== void 0) {
|
|
915
943
|
problems.push(`${where}.body node "${bid}".triggerRule is not supported inside a loop body (first cut)`);
|
|
916
944
|
}
|
|
945
|
+
if (b.checkpoint !== void 0) {
|
|
946
|
+
problems.push(`${where}.body node "${bid}".checkpoint is not supported inside a loop body (first cut)`);
|
|
947
|
+
}
|
|
948
|
+
if (b.placement !== void 0) {
|
|
949
|
+
problems.push(`${where}.body node "${bid}".placement is not supported \u2014 loop body nodes always run in node topics`);
|
|
950
|
+
}
|
|
917
951
|
const bdepends = normDepends(b.depends, `${where}.body node "${bid}"`, problems);
|
|
918
952
|
const bFromList = bdepends.map((d) => d.from);
|
|
919
953
|
if (bFromList.includes(bid)) problems.push(`${where}.body node "${bid}" depends on itself`);
|