@oomol-lab/open-flow 0.1.0-beta.85 → 0.1.0-beta.86
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/browser/{FlowCanvas-CZoHhB1y.js → FlowCanvas-CHIaMaBv.js} +3 -3
- package/dist/browser/{createResourceDialog-Bi4fUnbD.js → createResourceDialog-C0E5yPe6.js} +3 -3
- package/dist/browser/{dialog-BzoSxhXQ.js → dialog-b3hsdu8i.js} +291 -143
- package/dist/browser/{exportPng-CXVWVlLc.js → exportPng-DGHcejgy.js} +2 -2
- package/dist/browser/{flowChanges-C567g-Pc.js → flowChanges-BvSWezEb.js} +375 -83
- package/dist/browser/{flowWorkspace-BNdBKtla.js → flowWorkspace-BKnMRClO.js} +1619 -475
- package/dist/browser/fr-CNTSedYU.js +593 -0
- package/dist/browser/ja-CxQBHr2J.js +593 -0
- package/dist/browser/ko-D1Exiv1h.js +593 -0
- package/dist/browser/licenses.md +1 -1
- package/dist/browser/{markdownContent-DF39sd9T.js → markdownContent-BR9-1ikU.js} +1 -1
- package/dist/browser/preview.css +181 -181
- package/dist/browser/preview.js +1994 -623
- package/dist/browser/ru-BzLZv0B7.js +593 -0
- package/dist/browser/{tooltip-DGj5pudg.js → tooltip-DSBF3bRw.js} +55 -23
- package/dist/browser/workbench.css +181 -181
- package/dist/browser/workbench.js +86 -17
- package/dist/browser/{workbenchSelect-BIaEVTx6.js → workbenchSelect-Di1Bm_-d.js} +2 -2
- package/dist/browser/{wrapLayout-C4moMKgb.js → wrapLayout-B0AT8_-i.js} +1 -1
- package/dist/browser/zh-CN-Dg_xSGde.js +593 -0
- package/dist/browser/zh-TW-oxuLwsV0.js +593 -0
- package/dist/command/index.js +61 -57
- package/dist/command/licenses.md +28 -4
- package/dist/common/authoring.d.ts +5 -5
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +41 -4
- package/dist/common/catalogCache.d.ts +46 -0
- package/dist/common/connector-action.js +13 -10
- package/dist/common/connector-proxy.d.ts +96 -0
- package/dist/common/connector-proxy.js +5209 -0
- package/dist/common/control-api-conformance.js +312 -46
- package/dist/common/control-api.d.ts +12 -1
- package/dist/common/control-api.js +303 -41
- package/dist/common/control-requests.d.ts +4 -3
- package/dist/common/control-requests.js +14111 -171
- package/dist/common/engine-contract.d.ts +3 -2
- package/dist/common/event-source.js +55 -23
- package/dist/common/flow-authoring-node.d.ts +2 -0
- package/dist/common/flow-authoring.js +6936 -6781
- package/dist/common/flow-change-schema.d.ts +1 -1
- package/dist/common/flow-change.d.ts +2 -2
- package/dist/common/flow-change.js +91 -36
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.js +93 -38
- package/dist/common/flow-requestParameters.d.ts +34 -0
- package/dist/common/flow-semantics.js +9429 -9236
- package/dist/common/flow-state.js +55 -23
- package/dist/common/flow-workflowFile.d.ts +3 -1
- package/dist/common/http-request.d.ts +6 -11
- package/dist/common/http-request.js +192 -141
- package/dist/common/licenses.md +1 -1
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +303 -41
- package/dist/common/run-events.js +1 -0
- package/dist/common/runtime-contract.js +10 -4
- package/dist/common/runtime-nodejs-compat.js +55 -23
- package/dist/common/scheduler-checkpoint.d.ts +3 -3
- package/dist/common/scheduler-dependencies.d.ts +22 -28
- package/dist/common/scheduler-node-execution.d.ts +1 -0
- package/dist/common/scheduler.d.ts +8 -2
- package/dist/common/scheduler.js +274 -95
- package/dist/common/workflow.js +51 -19
- package/dist/common/workflowAuthoring.d.ts +411 -0
- package/dist/render/browser/licenses.md +1 -1
- package/dist/render/browser/runtime.js +180 -48
- package/dist/render/node/index.js +85 -30
- package/dist/render/node/licenses.md +1 -1
- package/package.json +1 -1
- package/skills/open-flow/references/flow-authoring.md +14 -13
- package/src/base/common/jsonSchema.ts +11 -0
- package/src/connector/common/actionSchema.ts +4 -11
- package/src/connector/common/proxy.ts +152 -0
- package/src/control/common/api.ts +99 -3
- package/src/control/common/authoring.ts +23 -9
- package/src/control/common/authoringExamples.ts +9 -0
- package/src/control/common/authoringSchema.ts +21 -12
- package/src/control/common/catalogCache.ts +145 -0
- package/src/control/common/conformance.ts +9 -3
- package/src/control/common/connectorQueries.ts +17 -2
- package/src/control/common/requests.ts +1 -0
- package/src/control/common/workflowAuthoring.ts +120 -0
- package/src/execution/common/checkpoint.ts +18 -12
- package/src/execution/common/dependencies.ts +132 -15
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +22 -15
- package/src/execution/common/scheduler.ts +20 -31
- package/src/flow/common/change.ts +2 -1
- package/src/flow/common/changeSchema.ts +11 -1
- package/src/flow/common/connectionUsage.ts +4 -2
- package/src/flow/common/errorHandling.ts +3 -1
- package/src/flow/common/nodeChanges.ts +35 -18
- package/src/flow/common/requestParameters.ts +120 -0
- package/src/flow/common/semantics.ts +51 -1
- package/src/flow/common/sourceField.ts +3 -2
- package/src/flow/common/workflowFile.ts +2 -2
- package/src/http/common/httpRequest.ts +28 -78
- package/src/runtime/common/engineContract.ts +6 -3
|
@@ -23,8 +23,8 @@ function dequal(foo, bar) {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/runtime/common/engineContract.ts
|
|
26
|
-
/**
|
|
27
|
-
var currentEngineContract = "open-flow-engine/
|
|
26
|
+
/** v11 adds Provider API requests through Connector Proxy. */
|
|
27
|
+
var currentEngineContract = "open-flow-engine/v11";
|
|
28
28
|
/** The published v8 Node compatibility contract, retained for existing Publications and Runs. */
|
|
29
29
|
var nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
|
|
30
30
|
var platformSource = (contract) => `export const engineContract = ${JSON.stringify(contract)}
|
|
@@ -74,13 +74,19 @@ var v9Contract = {
|
|
|
74
74
|
codeFetch: true,
|
|
75
75
|
platformSource: platformSource("open-flow-engine/v9")
|
|
76
76
|
};
|
|
77
|
-
var
|
|
77
|
+
var v10Contract = {
|
|
78
78
|
...v9Contract,
|
|
79
79
|
flowState: true,
|
|
80
|
+
platformSource: platformSource("open-flow-engine/v10")
|
|
81
|
+
};
|
|
82
|
+
var currentContract = {
|
|
83
|
+
...v10Contract,
|
|
84
|
+
connectorProxy: true,
|
|
80
85
|
platformSource: platformSource(currentEngineContract)
|
|
81
86
|
};
|
|
82
87
|
function findEngineContract(contract) {
|
|
83
|
-
if (contract == "open-flow-engine/
|
|
88
|
+
if (contract == "open-flow-engine/v11") return currentContract;
|
|
89
|
+
if (contract == "open-flow-engine/v10") return v10Contract;
|
|
84
90
|
if (contract == "open-flow-engine/v9") return v9Contract;
|
|
85
91
|
if (contract == "open-flow-engine/v8") return v8Contract;
|
|
86
92
|
if (contract == "open-flow-engine/v8/nodejs-compat-v1") return nodejsContract;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
1
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
|
|
2
2
|
function getEnumValues(entries) {
|
|
3
3
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
4
4
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -305,6 +305,17 @@ function prefixIssues(path, issues) {
|
|
|
305
305
|
function unwrapMessage(message) {
|
|
306
306
|
return typeof message === "string" ? message : message?.message;
|
|
307
307
|
}
|
|
308
|
+
/** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
|
|
309
|
+
function sizeCaps(defChecks) {
|
|
310
|
+
const caps = [];
|
|
311
|
+
for (const ch of defChecks ?? []) {
|
|
312
|
+
const d = ch._zod.def;
|
|
313
|
+
if (!/_(length|size)$|_equals$/.test(d.check)) break;
|
|
314
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
315
|
+
if (max >= 0) caps.push([max, ch]);
|
|
316
|
+
}
|
|
317
|
+
return caps;
|
|
318
|
+
}
|
|
308
319
|
function attachSchema(issues, start, inst) {
|
|
309
320
|
var _a;
|
|
310
321
|
for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
|
|
@@ -521,7 +532,7 @@ function constantCatch(value) {
|
|
|
521
532
|
return fn;
|
|
522
533
|
}
|
|
523
534
|
//#endregion
|
|
524
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
535
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
|
|
525
536
|
var _a$1;
|
|
526
537
|
var _zodDesc = {
|
|
527
538
|
value: void 0,
|
|
@@ -627,7 +638,7 @@ function config(newConfig) {
|
|
|
627
638
|
return globalConfig;
|
|
628
639
|
}
|
|
629
640
|
//#endregion
|
|
630
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
641
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
|
|
631
642
|
function _getMessage() {
|
|
632
643
|
const internals = this._zod;
|
|
633
644
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -743,7 +754,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
743
754
|
return fieldErrors;
|
|
744
755
|
}
|
|
745
756
|
//#endregion
|
|
746
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
757
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
|
|
747
758
|
function finalizeParams(callee, params) {
|
|
748
759
|
return {
|
|
749
760
|
callee: params?.callee ?? callee,
|
|
@@ -946,7 +957,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
946
957
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
947
958
|
};
|
|
948
959
|
//#endregion
|
|
949
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
960
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/regexes.js
|
|
950
961
|
/**
|
|
951
962
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
952
963
|
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
@@ -1017,7 +1028,7 @@ var boolean$1 = /^(?:true|false)$/i;
|
|
|
1017
1028
|
var lowercase = /^[^A-Z]*$/;
|
|
1018
1029
|
var uppercase = /^[^a-z]*$/;
|
|
1019
1030
|
//#endregion
|
|
1020
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
1031
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/checks.js
|
|
1021
1032
|
var $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
1022
1033
|
var _a;
|
|
1023
1034
|
inst._zod ?? (inst._zod = {});
|
|
@@ -1313,7 +1324,7 @@ var $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst,
|
|
|
1313
1324
|
};
|
|
1314
1325
|
});
|
|
1315
1326
|
//#endregion
|
|
1316
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
1327
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/doc.js
|
|
1317
1328
|
var Doc = class {
|
|
1318
1329
|
constructor(args = [], closed = {}) {
|
|
1319
1330
|
this.content = [];
|
|
@@ -1347,14 +1358,14 @@ var Doc = class {
|
|
|
1347
1358
|
}
|
|
1348
1359
|
};
|
|
1349
1360
|
//#endregion
|
|
1350
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
1361
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/versions.js
|
|
1351
1362
|
var version = {
|
|
1352
1363
|
major: 4,
|
|
1353
1364
|
minor: 6,
|
|
1354
|
-
patch:
|
|
1365
|
+
patch: 7
|
|
1355
1366
|
};
|
|
1356
1367
|
//#endregion
|
|
1357
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
1368
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/schemas.js
|
|
1358
1369
|
var $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1359
1370
|
var _a;
|
|
1360
1371
|
inst ?? (inst = {});
|
|
@@ -1851,6 +1862,26 @@ var $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
|
1851
1862
|
return payload;
|
|
1852
1863
|
};
|
|
1853
1864
|
});
|
|
1865
|
+
function capSize(inst, size) {
|
|
1866
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1867
|
+
if (!caps.length) return;
|
|
1868
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1869
|
+
const parse = inst._zod.parse;
|
|
1870
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1871
|
+
const n = size(payload.value);
|
|
1872
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1873
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) {
|
|
1874
|
+
const start = payload.issues.length;
|
|
1875
|
+
ch._zod.check(payload);
|
|
1876
|
+
payload.issues[start].continue = false;
|
|
1877
|
+
attachSchema(payload.issues, start, inst);
|
|
1878
|
+
return payload;
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
return parse(payload, ctx);
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
var arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1854
1885
|
function handleArrayResult(result, final, index) {
|
|
1855
1886
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1856
1887
|
final.value[index] = result.value;
|
|
@@ -1888,6 +1919,7 @@ var $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
|
1888
1919
|
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
1889
1920
|
return payload;
|
|
1890
1921
|
};
|
|
1922
|
+
capSize(inst, arraySize);
|
|
1891
1923
|
});
|
|
1892
1924
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1893
1925
|
const isPresent = key in input;
|
|
@@ -1996,7 +2028,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
1996
2028
|
}
|
|
1997
2029
|
return propValues;
|
|
1998
2030
|
});
|
|
1999
|
-
const isObject$
|
|
2031
|
+
const isObject$1 = isObject;
|
|
2000
2032
|
const catchall = def.catchall;
|
|
2001
2033
|
let value;
|
|
2002
2034
|
const memo = globalConfig.memoizer;
|
|
@@ -2004,7 +2036,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
2004
2036
|
inst._zod.parse = (payload, ctx) => {
|
|
2005
2037
|
value ?? (value = _normalized.value);
|
|
2006
2038
|
const input = payload.value;
|
|
2007
|
-
if (!isObject$
|
|
2039
|
+
if (!isObject$1(input)) {
|
|
2008
2040
|
payload.issues.push({
|
|
2009
2041
|
expected: "object",
|
|
2010
2042
|
code: "invalid_type",
|
|
@@ -2134,7 +2166,7 @@ var $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
2134
2166
|
return doc.compile();
|
|
2135
2167
|
};
|
|
2136
2168
|
let fastpass;
|
|
2137
|
-
const isObject$
|
|
2169
|
+
const isObject$2 = isObject;
|
|
2138
2170
|
const jit = !globalConfig.jitless;
|
|
2139
2171
|
const fastEnabled = jit && allowsEval.value;
|
|
2140
2172
|
const catchall = def.catchall;
|
|
@@ -2142,7 +2174,7 @@ var $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
2142
2174
|
inst._zod.parse = (payload, ctx) => {
|
|
2143
2175
|
value ?? (value = _normalized.value);
|
|
2144
2176
|
const input = payload.value;
|
|
2145
|
-
if (!isObject$
|
|
2177
|
+
if (!isObject$2(input)) {
|
|
2146
2178
|
payload.issues.push({
|
|
2147
2179
|
expected: "object",
|
|
2148
2180
|
code: "invalid_type",
|
|
@@ -2764,7 +2796,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2764
2796
|
}
|
|
2765
2797
|
}
|
|
2766
2798
|
//#endregion
|
|
2767
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
2799
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
|
|
2768
2800
|
var $ZodCyclicError = class extends Error {
|
|
2769
2801
|
constructor() {
|
|
2770
2802
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -3017,7 +3049,7 @@ function isBackEdge(ctx, value) {
|
|
|
3017
3049
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
3018
3050
|
}
|
|
3019
3051
|
//#endregion
|
|
3020
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
3052
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
|
|
3021
3053
|
var error = () => {
|
|
3022
3054
|
const Sizable = {
|
|
3023
3055
|
string: {
|
|
@@ -3125,7 +3157,7 @@ function en_default() {
|
|
|
3125
3157
|
return { localeError: error() };
|
|
3126
3158
|
}
|
|
3127
3159
|
//#endregion
|
|
3128
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
3160
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
|
|
3129
3161
|
var _a;
|
|
3130
3162
|
var $ZodRegistry = class {
|
|
3131
3163
|
constructor() {
|
|
@@ -3172,7 +3204,7 @@ function registry() {
|
|
|
3172
3204
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
3173
3205
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
3174
3206
|
//#endregion
|
|
3175
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
3207
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
|
|
3176
3208
|
function snapshotChecks(def) {
|
|
3177
3209
|
if (def.checks) def.checks = [...def.checks];
|
|
3178
3210
|
return def;
|
|
@@ -3681,7 +3713,7 @@ function _check(fn, params) {
|
|
|
3681
3713
|
return ch;
|
|
3682
3714
|
}
|
|
3683
3715
|
//#endregion
|
|
3684
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
3716
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
|
|
3685
3717
|
function assignProps(target, ...sources) {
|
|
3686
3718
|
for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
|
|
3687
3719
|
return target;
|
|
@@ -4125,7 +4157,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
4125
4157
|
return finalize(ctx, schema);
|
|
4126
4158
|
};
|
|
4127
4159
|
//#endregion
|
|
4128
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
4160
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
|
|
4129
4161
|
var narrowMin = (agg, key, value) => {
|
|
4130
4162
|
if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
|
|
4131
4163
|
};
|
|
@@ -4524,7 +4556,7 @@ var optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
4524
4556
|
seen.ref = def.innerType;
|
|
4525
4557
|
};
|
|
4526
4558
|
//#endregion
|
|
4527
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
4559
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/errors.js
|
|
4528
4560
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
4529
4561
|
function _lazyMethod(proto, key, make) {
|
|
4530
4562
|
Object.defineProperty(proto, key, {
|
|
@@ -4574,7 +4606,7 @@ var initializer = (inst, issues) => {
|
|
|
4574
4606
|
};
|
|
4575
4607
|
var ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
4576
4608
|
//#endregion
|
|
4577
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
4609
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/parse.js
|
|
4578
4610
|
var parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
4579
4611
|
var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
4580
4612
|
var safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -4588,7 +4620,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
4588
4620
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
4589
4621
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
4590
4622
|
//#endregion
|
|
4591
|
-
//#region ../../node_modules/.bun/zod@4.6.
|
|
4623
|
+
//#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
|
|
4592
4624
|
function _ensureDefaultLocale() {
|
|
4593
4625
|
if (!globalConfig.localeError) config(en_default());
|
|
4594
4626
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Graph, JsonValue } from './flow-change.js';
|
|
2
2
|
import type { AgentCheckpoint } from './runtime-contract.js';
|
|
3
|
-
import type { DependenciesCheckpoint } from './scheduler-dependencies.js';
|
|
3
|
+
import type { Dependencies, DependenciesCheckpoint } from './scheduler-dependencies.js';
|
|
4
4
|
import type { ExecutableNode } from './scheduler-node-execution.js';
|
|
5
5
|
export interface PendingWait {
|
|
6
6
|
readonly jobId: string;
|
|
@@ -27,7 +27,7 @@ export interface FlowRunCheckpoint {
|
|
|
27
27
|
}>>;
|
|
28
28
|
readonly counts: Readonly<Record<string, Readonly<Record<string, number>>>>;
|
|
29
29
|
readonly dependencies: DependenciesCheckpoint;
|
|
30
|
-
readonly version:
|
|
30
|
+
readonly version: 7;
|
|
31
31
|
readonly waits: readonly PendingWait[];
|
|
32
32
|
readonly agents: Readonly<Record<string, {
|
|
33
33
|
readonly invocationId: string;
|
|
@@ -39,4 +39,4 @@ export interface FlowRunCheckpoint {
|
|
|
39
39
|
export declare function decodeFlowRunCheckpoint(input: unknown): FlowRunCheckpoint;
|
|
40
40
|
export declare function validateCheckpoint(target: {
|
|
41
41
|
readonly graph: Graph;
|
|
42
|
-
}, checkpoint: FlowRunCheckpoint, resolveInputs: (nodeId: string, node: ExecutableNode) => Readonly<Record<string, JsonValue>>): void;
|
|
42
|
+
}, checkpoint: FlowRunCheckpoint, dependencies: Dependencies, resolveInputs: (nodeId: string, node: ExecutableNode) => Readonly<Record<string, JsonValue>>): void;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import type { Graph, JsonValue } from './flow-change.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
export interface DependenciesCheckpoint {
|
|
3
|
+
nextId: number;
|
|
4
|
+
iterations: Record<string, number>;
|
|
5
|
+
nodes: Record<string, Omit<DependencyState, 'input' | 'output' | 'systemOutputs'> & {
|
|
6
|
+
input: number;
|
|
7
|
+
output?: number;
|
|
8
|
+
}>;
|
|
9
|
+
frames: readonly {
|
|
10
|
+
readonly parent?: number;
|
|
11
|
+
readonly input: Readonly<Record<string, number>>;
|
|
12
|
+
}[];
|
|
13
|
+
results: readonly {
|
|
14
|
+
readonly nodeId: string;
|
|
15
|
+
readonly execution: number;
|
|
16
|
+
readonly outputs: Readonly<Record<string, JsonValue>>;
|
|
17
|
+
readonly systemOutputs?: Readonly<Record<string, JsonValue>>;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
interface DependenciesState {
|
|
4
21
|
nextId: number;
|
|
5
22
|
iterations: Record<string, number>;
|
|
6
23
|
nodes: Record<string, DependencyState>;
|
|
@@ -20,35 +37,11 @@ interface DependencyState {
|
|
|
20
37
|
jobId?: string;
|
|
21
38
|
seeded: boolean;
|
|
22
39
|
}
|
|
23
|
-
type InputSnapshot =
|
|
24
|
-
export declare function
|
|
25
|
-
export declare const dependenciesSchema: z.ZodObject<{
|
|
26
|
-
nextId: z.ZodNumber;
|
|
27
|
-
iterations: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
28
|
-
nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
|
-
id: z.ZodNumber;
|
|
30
|
-
status: z.ZodEnum<{
|
|
31
|
-
completed: "completed";
|
|
32
|
-
pending: "pending";
|
|
33
|
-
running: "running";
|
|
34
|
-
skipped: "skipped";
|
|
35
|
-
}>;
|
|
36
|
-
input: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
37
|
-
execution: z.ZodNumber;
|
|
38
|
-
outputs: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
39
|
-
systemOutputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
40
|
-
}, z.core.$strict>>;
|
|
41
|
-
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
42
|
-
systemOutputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
43
|
-
previous: z.ZodArray<z.ZodString>;
|
|
44
|
-
released: z.ZodArray<z.ZodString>;
|
|
45
|
-
jobId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
seeded: z.ZodBoolean;
|
|
47
|
-
}, z.core.$strict>>;
|
|
48
|
-
}, z.core.$strict>;
|
|
40
|
+
type InputSnapshot = DependencyState['input'];
|
|
41
|
+
export declare function decodeDependenciesCheckpoint(input: unknown, version: 6 | 7): DependenciesCheckpoint;
|
|
49
42
|
/** Dependency completion belongs to an invocation, never to a Run-wide latest-result table. */
|
|
50
43
|
export declare class Dependencies {
|
|
51
|
-
readonly state:
|
|
44
|
+
readonly state: DependenciesState;
|
|
52
45
|
private readonly forward;
|
|
53
46
|
private readonly loops;
|
|
54
47
|
private readonly innerLoopsFirst;
|
|
@@ -58,6 +51,7 @@ export declare class Dependencies {
|
|
|
58
51
|
private readonly frames;
|
|
59
52
|
private readonly graph;
|
|
60
53
|
constructor(graph: Graph, saved?: DependenciesCheckpoint);
|
|
54
|
+
checkpoint(): DependenciesCheckpoint;
|
|
61
55
|
private fresh;
|
|
62
56
|
private validate;
|
|
63
57
|
start(nodeId: string, outputs: Readonly<Record<string, JsonValue>>): void;
|
|
@@ -11,6 +11,7 @@ interface NodeExecutionContext {
|
|
|
11
11
|
readonly createId: FlowRunOptions['createId'];
|
|
12
12
|
readonly emit: (event: SchedulerEvent) => Effect.Effect<void, Error>;
|
|
13
13
|
readonly invokeTask: FlowRunOptions['invokeTask'];
|
|
14
|
+
readonly admitTask?: FlowRunOptions['admitTask'];
|
|
14
15
|
readonly projectFailure: FlowRunOptions['projectFailure'];
|
|
15
16
|
}
|
|
16
17
|
export declare class PortValidationError extends Error {
|
|
@@ -33,7 +33,7 @@ export type SchedulerEvent = {
|
|
|
33
33
|
readonly inputs: Readonly<Record<string, JsonValue>>;
|
|
34
34
|
readonly jobId: string;
|
|
35
35
|
readonly nodeId: string;
|
|
36
|
-
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'decision' | 'javascript' | 'openapi' | 'http-request' | 'skip-duplicates' | 'llm' | 'value' | 'wait' | 'outputs' | 'workflow' | 'webhook-response';
|
|
36
|
+
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'connector-proxy' | 'decision' | 'javascript' | 'openapi' | 'http-request' | 'skip-duplicates' | 'llm' | 'value' | 'wait' | 'outputs' | 'workflow' | 'webhook-response';
|
|
37
37
|
readonly nodeTitle?: string;
|
|
38
38
|
readonly runId: string;
|
|
39
39
|
readonly type: 'node.started';
|
|
@@ -110,7 +110,6 @@ export interface WaitHost {
|
|
|
110
110
|
readonly create: (wait: WaitRequest) => Effect.Effect<JsonValue | undefined, Error>;
|
|
111
111
|
readonly resolutions: (waitIds: readonly string[], block: boolean) => Effect.Effect<Readonly<Record<string, WaitResolution>>, Error>;
|
|
112
112
|
}
|
|
113
|
-
export declare const waitRetentionMs = 120000;
|
|
114
113
|
export type FlowRunOutcome = FlowRunResult | {
|
|
115
114
|
readonly checkpoint: FlowRunCheckpoint;
|
|
116
115
|
readonly kind: 'waiting';
|
|
@@ -149,11 +148,18 @@ export interface SchedulerFailure {
|
|
|
149
148
|
readonly code: string;
|
|
150
149
|
readonly message: string;
|
|
151
150
|
}
|
|
151
|
+
export interface TaskAdmission {
|
|
152
|
+
readonly runId: string;
|
|
153
|
+
readonly nodeId: string;
|
|
154
|
+
readonly jobId: string;
|
|
155
|
+
}
|
|
152
156
|
export type FlowRunOptions = {
|
|
153
157
|
readonly createId: () => string;
|
|
154
158
|
readonly emit?: (event: SchedulerEvent) => Effect.Effect<void, Error>;
|
|
155
159
|
readonly flowId: string;
|
|
156
160
|
readonly invokeTask: (invocation: TaskInvocation) => Effect.Effect<unknown, Error>;
|
|
161
|
+
/** Deployment admission for each Task invocation; it completes before the node timeout starts. */
|
|
162
|
+
readonly admitTask?: (admission: TaskAdmission) => Effect.Effect<void, Error>;
|
|
157
163
|
readonly projectFailure?: (error: unknown) => SchedulerFailure;
|
|
158
164
|
readonly runId: string;
|
|
159
165
|
readonly waits?: WaitHost;
|