@oomol-lab/open-flow 0.1.0-beta.64 → 0.1.0-beta.65
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/flow-authoring.js +21 -2
- package/dist/browser/{flowChanges-BAMkSaKF.js → flowChanges-DkvG5uDq.js} +1774 -1663
- package/dist/browser/{flowWorkspace-DxLc1Ybv.js → flowWorkspace-BEp-lxqF.js} +116 -1
- package/dist/browser/preview.css +8 -0
- package/dist/browser/preview.js +1870 -1663
- package/dist/browser/ui.css +8 -0
- package/dist/browser/workbench.css +8 -0
- package/dist/browser/workbench.js +31 -4
- package/dist/command/index.js +22 -22
- package/dist/common/connectorDecoders.d.ts +2 -1
- package/dist/common/control-api-conformance.js +19 -0
- package/dist/common/control-api.d.ts +7 -0
- package/dist/common/control-api.js +25 -0
- package/dist/common/control-requests.js +45 -5
- package/dist/common/flow-semantics.js +6 -0
- package/dist/common/mcp.js +3310 -3291
- package/dist/common/scheduler.d.ts +1 -0
- package/dist/common/scheduler.js +49 -3
- package/package.json +1 -1
|
@@ -59,11 +59,30 @@ function dequal(foo, bar) {
|
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/flow/common/edgeChanges.ts
|
|
61
61
|
function connect(content, edge) {
|
|
62
|
-
|
|
63
|
-
return [
|
|
62
|
+
const selected = content.document.graph;
|
|
63
|
+
if (selected?.edges.some((candidate) => dequal(candidate, edge))) return [];
|
|
64
|
+
const changes = [{
|
|
64
65
|
edge,
|
|
65
66
|
kind: "graph.edge.connect"
|
|
66
67
|
}];
|
|
68
|
+
const source = selected.nodes[edge.source];
|
|
69
|
+
const target = selected.nodes[edge.target];
|
|
70
|
+
if (edge.sourceHandle == "pending" && (source?.kind == "approval" || source?.kind == "wait") && target?.kind == "task" && "executor" in target.task && target.task.executor.kind == "connector" && target.task.executor.action == "leina.send_notification" && (target.inputs.message == null || target.inputs.message.kind == "unset")) changes.push({
|
|
71
|
+
kind: "graph.node.input.set",
|
|
72
|
+
nodeId: edge.target,
|
|
73
|
+
handle: "message",
|
|
74
|
+
before: target.inputs.message,
|
|
75
|
+
value: {
|
|
76
|
+
kind: "sources",
|
|
77
|
+
sources: [{
|
|
78
|
+
kind: "node",
|
|
79
|
+
nodeId: edge.source,
|
|
80
|
+
output: "pending",
|
|
81
|
+
field: "message"
|
|
82
|
+
}]
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return changes;
|
|
67
86
|
}
|
|
68
87
|
function disconnect(content, edge) {
|
|
69
88
|
if (!content.document.graph?.edges.some((candidate) => dequal(candidate, edge))) return [];
|