@oomol-lab/open-flow 0.1.0-beta.68 → 0.1.0-beta.69
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/{ContentIcon-Sx9bywU-.js → ContentIcon-CsECY5id.js} +14 -7
- package/dist/browser/{FlowCanvas-CXpaeurx.js → FlowCanvas-C5X22xQ7.js} +18 -18
- package/dist/browser/{createResourceDialog-BKmimKA_.js → createResourceDialog-Di5BBrQv.js} +2 -2
- package/dist/browser/{dialog-ZmfcwuMS.js → dialog-Bjo-r9B0.js} +85 -8
- package/dist/browser/event-sources.d.ts +4 -2
- package/dist/browser/{exportSvg-D4CqCcx2.js → exportSvg-Cj6Spxx-.js} +2 -2
- package/dist/browser/flow-authoring-node.d.ts +3 -1
- package/dist/browser/flow-authoring.js +68 -7
- package/dist/browser/flow-change-schema.d.ts +3 -1
- package/dist/browser/flow-change.d.ts +17 -2
- package/dist/browser/flow-change.js +82 -9
- package/dist/browser/{flowChanges-B5tZMcGr.js → flowChanges-Dp-rcEJ6.js} +737 -1180
- package/dist/browser/{flowWorkspace-zFBFtZPo.js → flowWorkspace-CB1QACku.js} +440 -70
- package/dist/browser/preview.css +49 -41
- package/dist/browser/preview.js +2229 -2359
- package/dist/browser/{typeScriptSession-D0bjYDeg.js → typeScriptSession-B0hC-C8y.js} +1 -1
- package/dist/browser/ui.css +8 -0
- package/dist/browser/workbench.css +53 -41
- package/dist/browser/workbench.js +74 -32
- package/dist/browser/{workbenchSelect-CChdgugI.js → workbenchSelect-C3hxUcYm.js} +1 -1
- package/dist/command/index.js +55 -51
- package/dist/common/authoring.d.ts +20 -0
- package/dist/common/authoringSchema.d.ts +243 -0
- package/dist/common/connector-proxy.d.ts +4 -0
- package/dist/common/control-api-conformance.js +147 -33
- package/dist/common/control-api.d.ts +14 -7
- package/dist/common/control-api.js +130 -15
- package/dist/common/control-requests.d.ts +32 -19
- package/dist/common/control-requests.js +2854 -152
- package/dist/common/decision.js +27 -3
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/event-source-definition.d.ts +34 -16
- package/dist/common/event-source.d.ts +63 -5
- package/dist/common/event-source.js +5744 -261
- package/dist/common/event-sources.d.ts +99 -6
- package/dist/common/flow-encoding.js +49 -10
- package/dist/common/flow-errorHandling.d.ts +36 -0
- package/dist/common/flow-graph.d.ts +4 -2
- package/dist/common/flow-retry.d.ts +19 -0
- package/dist/common/flow-semantics.js +94 -10
- package/dist/common/{fr-Du5gv3kM.js → fr-CNTSedYU.js} +259 -18
- package/dist/common/integration-trigger.d.ts +1 -1
- package/dist/common/integration-trigger.js +27 -3
- package/dist/common/{ja-D2wyPdTF.js → ja-CxQBHr2J.js} +259 -18
- package/dist/common/{ko-Cuu2AOaC.js → ko-D1Exiv1h.js} +259 -18
- package/dist/common/mcp.d.ts +30 -0
- package/dist/common/mcp.js +132 -17
- package/dist/common/openapi.js +27 -3
- package/dist/common/poll-trigger.js +27 -3
- package/dist/common/provider-triggers.d.ts +0 -2
- package/dist/common/provider-triggers.js +358 -155
- package/dist/common/{ru-BjI_JSsx.js → ru-BzLZv0B7.js} +259 -18
- package/dist/common/run-events.d.ts +2 -0
- package/dist/common/run-events.js +4 -2
- package/dist/common/runtime-contract.d.ts +1 -0
- package/dist/common/runtime-contract.js +4 -4
- package/dist/common/scheduler.d.ts +13 -2
- package/dist/common/scheduler.js +288 -98
- package/dist/common/webhook-trigger.js +27 -3
- package/dist/common/workflow.js +27 -3
- package/dist/common/{zh-CN-CnnXkzLh.js → zh-CN-Dg_xSGde.js} +259 -18
- package/dist/common/{zh-TW-CJnR2dgF.js → zh-TW-oxuLwsV0.js} +259 -18
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/common/event-source-feishu.d.ts +0 -3
- package/dist/common/feishu-events.d.ts +0 -19
- package/dist/common/feishu-subscriptions.d.ts +0 -6
|
@@ -8756,6 +8756,28 @@ function checkJsonDepth(value, depth = 0) {
|
|
|
8756
8756
|
if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
|
|
8757
8757
|
}
|
|
8758
8758
|
//#endregion
|
|
8759
|
+
//#region src/flow/common/retry.ts
|
|
8760
|
+
var retryNodeTypes = [
|
|
8761
|
+
"code",
|
|
8762
|
+
"connector",
|
|
8763
|
+
"openapi",
|
|
8764
|
+
"llm",
|
|
8765
|
+
"decision"
|
|
8766
|
+
];
|
|
8767
|
+
var nodeRetryLimits = {
|
|
8768
|
+
maxRetries: 5,
|
|
8769
|
+
minIntervalMs: 1e3,
|
|
8770
|
+
maxIntervalMs: 6e4,
|
|
8771
|
+
intervalStepMs: 1e3
|
|
8772
|
+
};
|
|
8773
|
+
var retryConfigurationSchema = strictObject({
|
|
8774
|
+
maxRetries: number().int().min(0).max(nodeRetryLimits.maxRetries),
|
|
8775
|
+
intervalMs: number().int().min(nodeRetryLimits.minIntervalMs).max(nodeRetryLimits.maxIntervalMs).multipleOf(nodeRetryLimits.intervalStepMs)
|
|
8776
|
+
});
|
|
8777
|
+
function supportsNodeRetry(node) {
|
|
8778
|
+
return node.kind == "task" && retryNodeTypes.some((type) => type == ("moduleId" in node.task ? "code" : node.task.executor.kind));
|
|
8779
|
+
}
|
|
8780
|
+
//#endregion
|
|
8759
8781
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
8760
8782
|
var triggerScheduleSchema = array(union([object({
|
|
8761
8783
|
type: literal("cron"),
|
|
@@ -8783,7 +8805,7 @@ var webhookMethods = [
|
|
|
8783
8805
|
];
|
|
8784
8806
|
//#endregion
|
|
8785
8807
|
//#region src/flow/common/changeSchema.ts
|
|
8786
|
-
var currentFlowModelVersion =
|
|
8808
|
+
var currentFlowModelVersion = 9;
|
|
8787
8809
|
var text = string();
|
|
8788
8810
|
var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
|
|
8789
8811
|
var json = json$1();
|
|
@@ -8804,6 +8826,7 @@ var source = union([object({
|
|
|
8804
8826
|
kind: literal("node"),
|
|
8805
8827
|
nodeId: text,
|
|
8806
8828
|
output: text,
|
|
8829
|
+
system: literal(true).optional(),
|
|
8807
8830
|
field: text.optional()
|
|
8808
8831
|
}), object({
|
|
8809
8832
|
kind: literal("binding"),
|
|
@@ -9062,7 +9085,9 @@ var base = {
|
|
|
9062
9085
|
name: text.optional(),
|
|
9063
9086
|
description: text.optional(),
|
|
9064
9087
|
icon: text.optional(),
|
|
9065
|
-
timeoutMs: number().optional()
|
|
9088
|
+
timeoutMs: number().optional(),
|
|
9089
|
+
retry: retryConfigurationSchema.optional(),
|
|
9090
|
+
onError: _enum(["stop", "error"]).optional()
|
|
9066
9091
|
};
|
|
9067
9092
|
var node = union([
|
|
9068
9093
|
strictObject({
|
|
@@ -9183,7 +9208,8 @@ var revision = object({
|
|
|
9183
9208
|
literal(5),
|
|
9184
9209
|
literal(6),
|
|
9185
9210
|
literal(7),
|
|
9186
|
-
literal(8)
|
|
9211
|
+
literal(8),
|
|
9212
|
+
literal(9)
|
|
9187
9213
|
]),
|
|
9188
9214
|
document,
|
|
9189
9215
|
modules: record$1(text, module)
|
|
@@ -9252,6 +9278,13 @@ var shapes = {
|
|
|
9252
9278
|
},
|
|
9253
9279
|
"graph.node.delete": at,
|
|
9254
9280
|
"graph.node.field.set": union([
|
|
9281
|
+
object({
|
|
9282
|
+
...at,
|
|
9283
|
+
kind: literal("graph.node.field.set"),
|
|
9284
|
+
field: literal("retry"),
|
|
9285
|
+
before: retryConfigurationSchema.optional(),
|
|
9286
|
+
value: retryConfigurationSchema.optional()
|
|
9287
|
+
}),
|
|
9255
9288
|
object({
|
|
9256
9289
|
...at,
|
|
9257
9290
|
kind: literal("graph.node.field.set"),
|
|
@@ -9265,7 +9298,8 @@ var shapes = {
|
|
|
9265
9298
|
field: _enum([
|
|
9266
9299
|
"description",
|
|
9267
9300
|
"icon",
|
|
9268
|
-
"name"
|
|
9301
|
+
"name",
|
|
9302
|
+
"onError"
|
|
9269
9303
|
]),
|
|
9270
9304
|
before: text.optional(),
|
|
9271
9305
|
value: text.optional()
|
|
@@ -9394,6 +9428,12 @@ function changeOperationsSchema(kind) {
|
|
|
9394
9428
|
return toJSONSchema(schema, { io: "input" });
|
|
9395
9429
|
}
|
|
9396
9430
|
function checkModelVersion(content) {
|
|
9431
|
+
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => "retry" in candidateNode && candidateNode.retry != null)) throw new TypeError("Node retries require Flow model version 9.");
|
|
9432
|
+
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => {
|
|
9433
|
+
if (candidateNode.onError != null) return true;
|
|
9434
|
+
if ([...Object.values("inputs" in candidateNode ? candidateNode.inputs : {}), ...Object.values(candidateNode.kind == "outputs" ? candidateNode.outputMappings : {})].some((candidateMapping) => candidateMapping.kind == "sources" && candidateMapping.sources.some((candidateSource) => candidateSource.kind == "node" && candidateSource.system))) return true;
|
|
9435
|
+
return candidateNode.kind == "condition" && candidateNode.cases.some((item) => item.groups.some((candidateGroup) => candidateGroup.expressions.some((expression) => [expression.left, expression.right].some((candidateOperand) => candidateOperand?.kind == "source" && candidateOperand.source.kind == "node" && candidateOperand.source.system))));
|
|
9436
|
+
})) throw new TypeError("Node error handling requires Flow model version 9.");
|
|
9397
9437
|
if (content.modelVersion < 8 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "outputs")) throw new TypeError("Workflow outputs require Flow model version 8.");
|
|
9398
9438
|
if (content.modelVersion < 7 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "start")) throw new TypeError("Start Triggers require Flow model version 7.");
|
|
9399
9439
|
if (content.modelVersion < 6 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task)) throw new TypeError("Node-owned managed Tasks require Flow model version 6.");
|
|
@@ -9456,6 +9496,37 @@ function setConditionInput(node, handle, mapping) {
|
|
|
9456
9496
|
};
|
|
9457
9497
|
}
|
|
9458
9498
|
//#endregion
|
|
9499
|
+
//#region src/flow/common/errorHandling.ts
|
|
9500
|
+
var nodeErrorSchema = {
|
|
9501
|
+
type: "object",
|
|
9502
|
+
additionalProperties: false,
|
|
9503
|
+
required: [
|
|
9504
|
+
"code",
|
|
9505
|
+
"message",
|
|
9506
|
+
"nodeId",
|
|
9507
|
+
"nodeName",
|
|
9508
|
+
"runId",
|
|
9509
|
+
"executionId"
|
|
9510
|
+
],
|
|
9511
|
+
properties: {
|
|
9512
|
+
code: { type: "string" },
|
|
9513
|
+
message: { type: "string" },
|
|
9514
|
+
nodeId: { type: "string" },
|
|
9515
|
+
nodeName: { type: "string" },
|
|
9516
|
+
runId: { type: "string" },
|
|
9517
|
+
executionId: { type: "string" }
|
|
9518
|
+
}
|
|
9519
|
+
};
|
|
9520
|
+
function supportsNodeErrorHandling(node) {
|
|
9521
|
+
return supportsNodeRetry(node);
|
|
9522
|
+
}
|
|
9523
|
+
function nodeSystemOutputPorts(node) {
|
|
9524
|
+
return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
|
|
9525
|
+
jsonSchema: nodeErrorSchema,
|
|
9526
|
+
nullable: true
|
|
9527
|
+
} } : {};
|
|
9528
|
+
}
|
|
9529
|
+
//#endregion
|
|
9459
9530
|
//#region src/flow/common/change.ts
|
|
9460
9531
|
var schemaKeywords = /* @__PURE__ */ new Set([
|
|
9461
9532
|
"const",
|
|
@@ -9627,10 +9698,10 @@ function upgradeRevisionContent(content) {
|
|
|
9627
9698
|
function upgradeDecodedRevisionContent(content) {
|
|
9628
9699
|
const graph = content.document.graph;
|
|
9629
9700
|
const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
|
|
9630
|
-
if (!hasManual && content.modelVersion ==
|
|
9701
|
+
if (!hasManual && content.modelVersion == 9) return content;
|
|
9631
9702
|
return {
|
|
9632
9703
|
...content,
|
|
9633
|
-
modelVersion:
|
|
9704
|
+
modelVersion: 9,
|
|
9634
9705
|
document: {
|
|
9635
9706
|
...content.document,
|
|
9636
9707
|
graph: hasManual ? {
|
|
@@ -9677,7 +9748,7 @@ function invalid(message) {
|
|
|
9677
9748
|
throw new FlowChangeError(message);
|
|
9678
9749
|
}
|
|
9679
9750
|
function applyFlowChanges(content, operations) {
|
|
9680
|
-
const source = content.modelVersion !=
|
|
9751
|
+
const source = content.modelVersion != 9 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
|
|
9681
9752
|
const document = { ...source.document };
|
|
9682
9753
|
const modules = { ...source.modules };
|
|
9683
9754
|
for (const operation of operations) switch (operation.kind) {
|
|
@@ -9849,6 +9920,8 @@ function applyFlowChanges(content, operations) {
|
|
|
9849
9920
|
const graph = document.graph;
|
|
9850
9921
|
const node = graph.nodes[operation.nodeId];
|
|
9851
9922
|
if (node == null) invalid("The Node does not exist in the target graph.");
|
|
9923
|
+
if (operation.field == "onError" && operation.value != null && (!supportsNodeErrorHandling(node) || !["stop", "error"].includes(String(operation.value)))) invalid("This node does not support this error handling setting.");
|
|
9924
|
+
if (operation.field == "retry" && operation.value != null && !supportsNodeRetry(node)) invalid("This node does not support retries.");
|
|
9852
9925
|
if (operation.field == "connectionId" && node.kind != "poll" && node.kind != "integration") invalid("Only provider Triggers select a node Connection.");
|
|
9853
9926
|
if (!dequal(Reflect.get(node, operation.field), operation.before)) invalid("The Node field changed before this operation was applied.");
|
|
9854
9927
|
const updated = { ...node };
|
|
@@ -10120,9 +10193,9 @@ function applyFlowChanges(content, operations) {
|
|
|
10120
10193
|
assertOpenApiAuthBindings(document);
|
|
10121
10194
|
return upgradeDecodedRevisionContent({
|
|
10122
10195
|
document,
|
|
10123
|
-
modelVersion:
|
|
10196
|
+
modelVersion: 9,
|
|
10124
10197
|
modules
|
|
10125
10198
|
});
|
|
10126
10199
|
}
|
|
10127
10200
|
//#endregion
|
|
10128
|
-
export { FlowChangeError, applyFlowChanges, changeOperationsSchema, currentFlowModelVersion, decodeChangeOperations, decodeConnectorCapabilities, fixedInputValue, inputValue, inputValues, isSchemaKeyword, isTriggerNode, nextNodeName, nodeNameIssue, normalizeNodeName, portsByHandle, resourceNameIssue, resourceNameMaxLength, upgradeManualTrigger, upgradeRevisionContent, validVariableName };
|
|
10201
|
+
export { FlowChangeError, applyFlowChanges, changeOperationsSchema, currentFlowModelVersion, decodeChangeOperations, decodeConnectorCapabilities, fixedInputValue, inputValue, inputValues, isSchemaKeyword, isTriggerNode, nextNodeName, nodeErrorSchema, nodeNameIssue, nodeSystemOutputPorts, normalizeNodeName, portsByHandle, resourceNameIssue, resourceNameMaxLength, supportsNodeErrorHandling, supportsNodeRetry, upgradeManualTrigger, upgradeRevisionContent, validVariableName };
|