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/esm/schema.js
CHANGED
|
@@ -293,6 +293,12 @@ function validateDag(raw) {
|
|
|
293
293
|
if (n.bot !== void 0) problems.push(`host node "${id}".bot is not supported \u2014 host nodes do not spawn a CLI`);
|
|
294
294
|
if (n.override !== void 0) problems.push(`host node "${id}".override is not supported`);
|
|
295
295
|
if (n.revisitTo !== void 0) problems.push(`host node "${id}".revisitTo is not supported`);
|
|
296
|
+
if (n.checkpoint !== void 0) {
|
|
297
|
+
problems.push(`host node "${id}".checkpoint is not supported \u2014 only goal nodes can be checkpoints`);
|
|
298
|
+
}
|
|
299
|
+
if (n.placement !== void 0) {
|
|
300
|
+
problems.push(`host node "${id}".placement is not supported \u2014 host nodes are executed by the main bot, never handed off`);
|
|
301
|
+
}
|
|
296
302
|
if (n.resultSchema !== void 0) {
|
|
297
303
|
problems.push(`host node "${id}".resultSchema is not supported \u2014 host output uses the trusted executor result contract`);
|
|
298
304
|
}
|
|
@@ -364,6 +370,8 @@ function validateDag(raw) {
|
|
|
364
370
|
const humanGate = normHumanGate(n.humanGate, `node "${id}"`, problems);
|
|
365
371
|
const override = normOverride(n.override, `node "${id}"`, problems);
|
|
366
372
|
const revisitTo = normRevisitTo(n.revisitTo, id, problems);
|
|
373
|
+
const checkpoint = normCheckpoint(n.checkpoint, `goal node "${id}"`, problems);
|
|
374
|
+
const placement = normPlacement(n.placement, `goal node "${id}"`, problems);
|
|
367
375
|
if (schemaVersion !== 2 && n.outputs !== void 0) {
|
|
368
376
|
problems.push(`goal node "${id}".outputs requires schemaVersion 2`);
|
|
369
377
|
}
|
|
@@ -381,7 +389,9 @@ function validateDag(raw) {
|
|
|
381
389
|
timeoutSec,
|
|
382
390
|
humanGate,
|
|
383
391
|
resultSchema,
|
|
384
|
-
...revisitTo ? { revisitTo } : {}
|
|
392
|
+
...revisitTo ? { revisitTo } : {},
|
|
393
|
+
...checkpoint ? { checkpoint } : {},
|
|
394
|
+
...placement ? { placement } : {}
|
|
385
395
|
});
|
|
386
396
|
}
|
|
387
397
|
for (const node of nodes) {
|
|
@@ -751,6 +761,18 @@ function normTimeoutSec(v, where, problems) {
|
|
|
751
761
|
}
|
|
752
762
|
return v;
|
|
753
763
|
}
|
|
764
|
+
function normPlacement(v, where, problems) {
|
|
765
|
+
if (v === void 0 || v === "topic") return void 0;
|
|
766
|
+
if (v === "main") return "main";
|
|
767
|
+
problems.push(`${where}.placement must be "topic" or "main"`);
|
|
768
|
+
return void 0;
|
|
769
|
+
}
|
|
770
|
+
function normCheckpoint(v, where, problems) {
|
|
771
|
+
if (v === void 0 || v === false) return void 0;
|
|
772
|
+
if (v === true) return true;
|
|
773
|
+
problems.push(`${where}.checkpoint must be a boolean`);
|
|
774
|
+
return void 0;
|
|
775
|
+
}
|
|
754
776
|
function normRevisitTo(v, id, problems) {
|
|
755
777
|
if (v === void 0) return void 0;
|
|
756
778
|
if (!Array.isArray(v)) {
|
|
@@ -819,6 +841,12 @@ function normLoopFields(n, id, problems, schemaVersion) {
|
|
|
819
841
|
if (n.override !== void 0) {
|
|
820
842
|
problems.push(`${where}.override is not supported \u2014 a loop composite never spawns a worker; set override on body nodes instead`);
|
|
821
843
|
}
|
|
844
|
+
if (n.checkpoint !== void 0) {
|
|
845
|
+
problems.push(`${where}.checkpoint is not supported \u2014 mark a goal node outside the loop instead`);
|
|
846
|
+
}
|
|
847
|
+
if (n.placement !== void 0) {
|
|
848
|
+
problems.push(`${where}.placement is not supported \u2014 a loop's body nodes always run in node topics`);
|
|
849
|
+
}
|
|
822
850
|
let maxIterations;
|
|
823
851
|
if (typeof n.maxIterations !== "number" || !Number.isInteger(n.maxIterations) || n.maxIterations < 1) {
|
|
824
852
|
problems.push(`${where}.maxIterations must be a positive integer`);
|
|
@@ -865,6 +893,12 @@ function normLoopFields(n, id, problems, schemaVersion) {
|
|
|
865
893
|
if (b.triggerRule !== void 0) {
|
|
866
894
|
problems.push(`${where}.body node "${bid}".triggerRule is not supported inside a loop body (first cut)`);
|
|
867
895
|
}
|
|
896
|
+
if (b.checkpoint !== void 0) {
|
|
897
|
+
problems.push(`${where}.body node "${bid}".checkpoint is not supported inside a loop body (first cut)`);
|
|
898
|
+
}
|
|
899
|
+
if (b.placement !== void 0) {
|
|
900
|
+
problems.push(`${where}.body node "${bid}".placement is not supported \u2014 loop body nodes always run in node topics`);
|
|
901
|
+
}
|
|
868
902
|
const bdepends = normDepends(b.depends, `${where}.body node "${bid}"`, problems);
|
|
869
903
|
const bFromList = bdepends.map((d) => d.from);
|
|
870
904
|
if (bFromList.includes(bid)) problems.push(`${where}.body node "${bid}" depends on itself`);
|