@oomol-lab/open-flow 0.1.0-beta.11 → 0.1.0-beta.12
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/{createResourceDialog-DhIU-HYW.js → createResourceDialog-2pESP2wA.js} +11 -11
- package/dist/browser/{esm-C64_h7HF.js → esm-BPZ0P6x4.js} +1 -1
- package/dist/browser/flow-authoring.js +88 -74
- package/dist/browser/flow-change-schema.d.ts +4 -1
- package/dist/browser/flow-change.js +1408 -1390
- package/dist/browser/{flowChanges-BINNGoug.js → flowChanges-CHPdBmZb.js} +953 -937
- package/dist/browser/{flowWorkspace-Dp_b8KXF.js → flowWorkspace-BLGcgnHj.js} +25733 -25724
- package/dist/browser/host-conformance.d.ts +7 -0
- package/dist/browser/host-conformance.js +33 -0
- package/dist/browser/{select-CbQHq-GM.js → select-Dn3vpjGC.js} +506 -485
- package/dist/browser/{waitNotificationInputs-fzyKN6mk.js → waitNotificationInputs-BFbQUOyp.js} +1 -1
- package/dist/browser/workbench.js +67 -61
- package/dist/browser/{workbenchSelect-BjbJjlNd.js → workbenchSelect-DzF8oik9.js} +7 -7
- package/dist/common/control-api-conformance.d.ts +6 -0
- package/dist/common/control-api-conformance.js +67 -1
- package/dist/common/control-api.js +5117 -434
- package/dist/common/control-requests.d.ts +68 -0
- package/dist/common/control-requests.js +4913 -0
- package/dist/common/flow-encoding.d.ts +3 -1
- package/dist/common/flow-encoding.js +4755 -59
- package/dist/common/flow-json.d.ts +2 -0
- package/dist/common/flow-semantics.js +1121 -1107
- package/dist/common/mcp-conformance.d.ts +2 -0
- package/dist/common/mcp.d.ts +545 -0
- package/dist/common/mcp.js +4964 -0
- package/dist/common/scheduler.js +513 -499
- package/package.json +13 -1
package/dist/browser/{waitNotificationInputs-fzyKN6mk.js → waitNotificationInputs-BFbQUOyp.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as e } from "./dist-C46JByB-.js";
|
|
2
2
|
import { s as t } from "./main-DmjVyuWr.js";
|
|
3
3
|
import { n, t as r } from "./flowRunInputEditorStore-NPGePkvP.js";
|
|
4
|
-
import { n as i } from "./flowWorkspace-
|
|
4
|
+
import { n as i } from "./flowWorkspace-BLGcgnHj.js";
|
|
5
5
|
import { useEffect as a, useState as o } from "react";
|
|
6
6
|
import { jsx as s } from "react/jsx-runtime";
|
|
7
7
|
//#region src/workbench/browser/runtime/designer/waitNotificationInputs.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
|
|
2
2
|
import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
|
|
3
|
-
import { $ as s, A as c, B as l, C as u, D as d, E as f, F as p, H as m, I as h, J as g, K as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, U as T, V as E, W as D, X as O, Y as ee, Z as k, _ as A, a as j, at as te, b as M, c as N, ct as ne, d as re, dt as ie, et as ae, f as oe, ft as P, g as se, gt as F, h as ce, ht as le, i as ue, it as de, j as I, l as fe, lt as pe, m as me, mt as L, n as R, nt as he, o as ge, ot as _e, p as ve, pt as ye, q as be, rt as xe, s as Se, st as Ce, t as we, tt as z, u as Te, ut as Ee, v as De, w as Oe, x as ke, y as Ae, z as je } from "./flowChanges-
|
|
3
|
+
import { $ as s, A as c, B as l, C as u, D as d, E as f, F as p, H as m, I as h, J as g, K as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, U as T, V as E, W as D, X as O, Y as ee, Z as k, _ as A, a as j, at as te, b as M, c as N, ct as ne, d as re, dt as ie, et as ae, f as oe, ft as P, g as se, gt as F, h as ce, ht as le, i as ue, it as de, j as I, l as fe, lt as pe, m as me, mt as L, n as R, nt as he, o as ge, ot as _e, p as ve, pt as ye, q as be, rt as xe, s as Se, st as Ce, t as we, tt as z, u as Te, ut as Ee, v as De, w as Oe, x as ke, y as Ae, z as je } from "./flowChanges-CHPdBmZb.js";
|
|
4
4
|
import { Ot as Me, Un as Ne, Vn as B, jt as V } from "./getPseudoElementBounds-Dfqo78k7.js";
|
|
5
|
-
import { C as Pe, S as Fe,
|
|
5
|
+
import { C as Pe, S as Fe, T as Ie, _ as Le, b as Re, c as H, h as U, l as ze, m as Be, w as Ve } from "./select-Dn3vpjGC.js";
|
|
6
6
|
import { _ as He, c as Ue, f as We, s as Ge, u as Ke } from "./DesignerIcon-ckcKnxxJ.js";
|
|
7
7
|
import { i as qe, n as Je, r as Ye, t as Xe } from "./languages-i3Xmpt6S.js";
|
|
8
|
-
import { a as Ze, c as Qe, i as $e, n as et, o as tt, r as nt, s as rt, t as it } from "./workbenchSelect-
|
|
8
|
+
import { a as Ze, c as Qe, i as $e, n as et, o as tt, r as nt, s as rt, t as it } from "./workbenchSelect-DzF8oik9.js";
|
|
9
9
|
import { Suspense as at, lazy as ot, useEffect as W, useRef as G, useState as K } from "react";
|
|
10
10
|
import { Fragment as st, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
11
11
|
import * as ct from "effect/Cause";
|
|
@@ -96,7 +96,7 @@ function ft(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
99
|
-
var pt = ot(() => import("./createResourceDialog-
|
|
99
|
+
var pt = ot(() => import("./createResourceDialog-2pESP2wA.js")), mt = qe.map((e) => ({
|
|
100
100
|
label: Ye[e],
|
|
101
101
|
value: e
|
|
102
102
|
}));
|
|
@@ -196,7 +196,7 @@ function gt({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
196
196
|
className: "resource-status",
|
|
197
197
|
title: m("resource.publishFirst"),
|
|
198
198
|
children: "—"
|
|
199
|
-
}) : /* @__PURE__ */ J(
|
|
199
|
+
}) : /* @__PURE__ */ J(Ie, {
|
|
200
200
|
className: "resource-enable",
|
|
201
201
|
title: m("resource.enabledHint"),
|
|
202
202
|
children: [/* @__PURE__ */ q(Ge, {
|
|
@@ -255,10 +255,10 @@ function gt({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
255
255
|
onSubmit: (e) => void w(e),
|
|
256
256
|
children: [
|
|
257
257
|
/* @__PURE__ */ q(rt, { children: /* @__PURE__ */ q(Qe, { children: m("sidebar.renameFlow", { name: n.name }) }) }),
|
|
258
|
-
/* @__PURE__ */ J(
|
|
258
|
+
/* @__PURE__ */ J(Re, {
|
|
259
259
|
"data-invalid": _.length > 0 && C != null,
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */ q(
|
|
261
|
+
/* @__PURE__ */ q(Ve, {
|
|
262
262
|
htmlFor: `rename-flow-${n.flowId}`,
|
|
263
263
|
children: m("resource.flowName")
|
|
264
264
|
}),
|
|
@@ -273,7 +273,7 @@ function gt({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
273
273
|
required: !0,
|
|
274
274
|
value: _
|
|
275
275
|
}),
|
|
276
|
-
_.length > 0 && C != null && /* @__PURE__ */ q(
|
|
276
|
+
_.length > 0 && C != null && /* @__PURE__ */ q(Fe, {
|
|
277
277
|
id: `rename-error-${n.flowId}`,
|
|
278
278
|
children: m(`resource.nameIssue.${C}`, { max: 80 })
|
|
279
279
|
})
|
|
@@ -1007,8 +1007,8 @@ var jt = class {
|
|
|
1007
1007
|
function Nt(e) {
|
|
1008
1008
|
switch (e.kind) {
|
|
1009
1009
|
case "condition": return { [e.node.input.handle]: e.node.input };
|
|
1010
|
-
case "subflow": return
|
|
1011
|
-
case "task": return
|
|
1010
|
+
case "subflow": return Be(e.definition?.inputs ?? []);
|
|
1011
|
+
case "task": return Be(e.definition?.inputs ?? []);
|
|
1012
1012
|
case "value": return {};
|
|
1013
1013
|
case "wait": return { [e.node.input.handle]: e.node.input };
|
|
1014
1014
|
}
|
|
@@ -1813,7 +1813,7 @@ var Xt = class {
|
|
|
1813
1813
|
for (let e of this.#o) try {
|
|
1814
1814
|
t = R(t, e.changes), n.push(e);
|
|
1815
1815
|
} catch (t) {
|
|
1816
|
-
if (!(t instanceof
|
|
1816
|
+
if (!(t instanceof ze)) throw t;
|
|
1817
1817
|
e.active = !1;
|
|
1818
1818
|
}
|
|
1819
1819
|
return this.#o = n, t;
|
|
@@ -2238,13 +2238,14 @@ var an = class {
|
|
|
2238
2238
|
for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
|
|
2239
2239
|
this.#e.dispose(), this.#t.dispose();
|
|
2240
2240
|
}
|
|
2241
|
+
}, on = {
|
|
2242
|
+
x: 40,
|
|
2243
|
+
y: 40
|
|
2241
2244
|
};
|
|
2242
|
-
|
|
2243
|
-
//#region src/workbench/browser/runtime/stores/workspaceStore.ts
|
|
2244
|
-
function on(e, t) {
|
|
2245
|
+
function sn(e, t) {
|
|
2245
2246
|
if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
|
|
2246
2247
|
}
|
|
2247
|
-
var
|
|
2248
|
+
var cn = class {
|
|
2248
2249
|
#e;
|
|
2249
2250
|
#t;
|
|
2250
2251
|
#n = new m();
|
|
@@ -2499,37 +2500,42 @@ var sn = class {
|
|
|
2499
2500
|
nodes: ue(e, t, this.#l.value.selectedNodeIds)
|
|
2500
2501
|
};
|
|
2501
2502
|
}
|
|
2502
|
-
async pasteNodes(e) {
|
|
2503
|
+
async pasteNodes(e, t = on) {
|
|
2503
2504
|
if (!await this.saveModuleEditor()) return;
|
|
2504
|
-
let
|
|
2505
|
-
if (
|
|
2506
|
-
let
|
|
2505
|
+
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2506
|
+
if (n == null || r == null || this.#p == null) return;
|
|
2507
|
+
let i = Se(n, r, this.#p.nodes, this.#i), a = i.changes.length == 0 ? void 0 : this.#T(i.changes), o = this.#p.comments.map((e) => ({
|
|
2507
2508
|
...e,
|
|
2508
2509
|
nodeId: this.#i()
|
|
2509
2510
|
}));
|
|
2510
|
-
if (
|
|
2511
|
-
let
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2511
|
+
if (i.nodeIds.length == 0 && o.length == 0) return;
|
|
2512
|
+
let s = new Map(this.#N().nodes.map((e) => [e.id, e])), c = /* @__PURE__ */ new Set([...i.nodeIds, ...o.map((e) => e.nodeId)]), l = new Set([...s].filter(([e]) => !c.has(e)).map(([, e]) => `${e.position.x}\0${e.position.y}`)), u = [...i.sourceIds.map((t) => e?.[t] ?? s.get(t)?.position ?? {
|
|
2513
|
+
x: 80,
|
|
2514
|
+
y: 80
|
|
2515
|
+
}), ...o.map((e) => e.position)], d = 1;
|
|
2516
|
+
if (t.x != 0 || t.y != 0) for (; u.some((e) => l.has(`${e.x + t.x * d}\0${e.y + t.y * d}`));) d += 1;
|
|
2517
|
+
let f = Object.fromEntries(i.sourceIds.map((n, r) => {
|
|
2518
|
+
let a = e?.[n] ?? s.get(n)?.position;
|
|
2519
|
+
return [i.nodeIds[r], {
|
|
2520
|
+
x: (a?.x ?? 80) + t.x * d,
|
|
2521
|
+
y: (a?.y ?? 80) + t.y * d
|
|
2516
2522
|
}];
|
|
2517
|
-
})),
|
|
2518
|
-
let
|
|
2519
|
-
for (let e of
|
|
2523
|
+
})), p = this.#O((e) => {
|
|
2524
|
+
let n = y(e, r, f);
|
|
2525
|
+
for (let e of o) n = I(n, r, e.nodeId, {
|
|
2520
2526
|
content: e.content,
|
|
2521
2527
|
position: {
|
|
2522
|
-
x: e.position.x +
|
|
2523
|
-
y: e.position.y +
|
|
2528
|
+
x: e.position.x + t.x * d,
|
|
2529
|
+
y: e.position.y + t.y * d
|
|
2524
2530
|
},
|
|
2525
2531
|
title: this.#r.t("addNode.commentCopy", { title: e.title })
|
|
2526
2532
|
});
|
|
2527
|
-
return
|
|
2533
|
+
return n;
|
|
2528
2534
|
});
|
|
2529
|
-
this.selectNodes([...
|
|
2535
|
+
this.selectNodes([...i.nodeIds, ...o.map((e) => e.nodeId)]), (a == null || await a != null) && await p;
|
|
2530
2536
|
}
|
|
2531
|
-
async duplicateSelectedNodes(e) {
|
|
2532
|
-
this.copySelectedNodes(), await this.pasteNodes(e);
|
|
2537
|
+
async duplicateSelectedNodes(e, t) {
|
|
2538
|
+
this.copySelectedNodes(), await this.pasteNodes(e, t);
|
|
2533
2539
|
}
|
|
2534
2540
|
async saveNodeSettings(e, t) {
|
|
2535
2541
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
@@ -2906,7 +2912,7 @@ var sn = class {
|
|
|
2906
2912
|
return b(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
|
|
2907
2913
|
}
|
|
2908
2914
|
#P(e) {
|
|
2909
|
-
let t = C(e), n =
|
|
2915
|
+
let t = C(e), n = sn(t, this.#l.value.target);
|
|
2910
2916
|
return {
|
|
2911
2917
|
revision: t,
|
|
2912
2918
|
selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
|
|
@@ -2945,13 +2951,13 @@ var sn = class {
|
|
|
2945
2951
|
};
|
|
2946
2952
|
//#endregion
|
|
2947
2953
|
//#region src/workbench/browser/runtime/stores/workbenchStore.ts
|
|
2948
|
-
function
|
|
2954
|
+
function ln(e) {
|
|
2949
2955
|
return new Map(e.nodes.map((e) => [e.id, e]));
|
|
2950
2956
|
}
|
|
2951
|
-
function
|
|
2957
|
+
function un(e, t) {
|
|
2952
2958
|
return e == null || t == null ? [] : C(e).designerInputs(t);
|
|
2953
2959
|
}
|
|
2954
|
-
function
|
|
2960
|
+
function dn(e, t, n, r, i) {
|
|
2955
2961
|
if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
|
|
2956
2962
|
let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
|
|
2957
2963
|
return typeof a == "string" ? new Map(r.flatMap((t) => {
|
|
@@ -2959,7 +2965,7 @@ function un(e, t, n, r, i) {
|
|
|
2959
2965
|
return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
|
|
2960
2966
|
})) : /* @__PURE__ */ new Map();
|
|
2961
2967
|
}
|
|
2962
|
-
var
|
|
2968
|
+
var fn = { openExternalPage: async () => !1 }, pn = class {
|
|
2963
2969
|
#e;
|
|
2964
2970
|
#t;
|
|
2965
2971
|
#n;
|
|
@@ -2971,7 +2977,7 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
2971
2977
|
#c;
|
|
2972
2978
|
#l;
|
|
2973
2979
|
#u;
|
|
2974
|
-
constructor(r, i, a = F, o = P(), s =
|
|
2980
|
+
constructor(r, i, a = F, o = P(), s = fn, c = !0) {
|
|
2975
2981
|
this.#t = new m(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = !0, this.#u = !1, this.provideAddNodeOptions = async (e, t) => await this.#d([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => {
|
|
2976
2982
|
let t = await Promise.all([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]);
|
|
2977
2983
|
if (!(e.aborted || this.#u)) return t.flatMap((e) => e ?? []);
|
|
@@ -2981,7 +2987,7 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
2981
2987
|
let l = (e) => {
|
|
2982
2988
|
this.#u || this.#r.set(e);
|
|
2983
2989
|
};
|
|
2984
|
-
this.runs = new h(r, l, o), this.workspace = new
|
|
2990
|
+
this.runs = new h(r, l, o), this.workspace = new cn(r, l, Dt, o, (e) => {
|
|
2985
2991
|
e.kind == "run.created" ? this.#f(r, e) : this.runs.changed(e.runId);
|
|
2986
2992
|
}), this.connectors = new Ut(r, this.workspace, l, s, o), this.triggers = new Jt(r, this.workspace, l, s, o), this.publications = new jt(r, this.workspace, l, i, a, o), this.runRequests = new It(r, this.runs, l, async (e) => {
|
|
2987
2993
|
if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#u || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
|
|
@@ -2999,7 +3005,7 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
2999
3005
|
let t = e(this.workspace.$.draft);
|
|
3000
3006
|
f != t?.flowId && (d.clear(), f = t?.flowId);
|
|
3001
3007
|
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), p = e(this.runs.$.events), m = e(this.#a), h = e(this.#o), g = e(this.#s), _ = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
|
|
3002
|
-
...
|
|
3008
|
+
...un(t, n),
|
|
3003
3009
|
r == null || n == null ? void 0 : x(r, n),
|
|
3004
3010
|
i,
|
|
3005
3011
|
a,
|
|
@@ -3018,7 +3024,7 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
3018
3024
|
graph: S,
|
|
3019
3025
|
inputs: v
|
|
3020
3026
|
}), S;
|
|
3021
|
-
}), g = e(p,
|
|
3027
|
+
}), g = e(p, ln);
|
|
3022
3028
|
this.$ = {
|
|
3023
3029
|
busy: n((e) => {
|
|
3024
3030
|
let t = e(this.workspace.$.busy);
|
|
@@ -3034,7 +3040,7 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
3034
3040
|
designer: p,
|
|
3035
3041
|
designerNodeById: g,
|
|
3036
3042
|
notice: this.#r,
|
|
3037
|
-
runEventNodes: n((e) =>
|
|
3043
|
+
runEventNodes: n((e) => dn(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(g))),
|
|
3038
3044
|
selectedDesignerNode: n((e) => {
|
|
3039
3045
|
let t = e(this.workspace.$.selectedNodeIds);
|
|
3040
3046
|
return t.length == 1 ? e(g).get(t[0]) : void 0;
|
|
@@ -3142,8 +3148,8 @@ var dn = { openExternalPage: async () => !1 }, fn = class {
|
|
|
3142
3148
|
return;
|
|
3143
3149
|
}
|
|
3144
3150
|
}
|
|
3145
|
-
},
|
|
3146
|
-
function
|
|
3151
|
+
}, mn = ot(() => import("./flowWorkspace-BLGcgnHj.js").then((e) => e.t));
|
|
3152
|
+
function hn({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: c }) {
|
|
3147
3153
|
let l = s != null && c != null && i != null, u = s ?? "", d = /* @__PURE__ */ J(st, { children: [
|
|
3148
3154
|
/* @__PURE__ */ q("div", {
|
|
3149
3155
|
"aria-hidden": "true",
|
|
@@ -3175,10 +3181,10 @@ function mn({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
3175
3181
|
children: t
|
|
3176
3182
|
})]
|
|
3177
3183
|
}),
|
|
3178
|
-
l && /* @__PURE__ */ q(
|
|
3184
|
+
l && /* @__PURE__ */ q(Pe, { children: /* @__PURE__ */ J(Re, {
|
|
3179
3185
|
"data-invalid": n != null,
|
|
3180
3186
|
children: [
|
|
3181
|
-
/* @__PURE__ */ q(
|
|
3187
|
+
/* @__PURE__ */ q(Ve, {
|
|
3182
3188
|
htmlFor: "session-token",
|
|
3183
3189
|
children: c
|
|
3184
3190
|
}),
|
|
@@ -3201,19 +3207,19 @@ function mn({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
3201
3207
|
type: "password",
|
|
3202
3208
|
value: u
|
|
3203
3209
|
}),
|
|
3204
|
-
n != null && /* @__PURE__ */ q(
|
|
3210
|
+
n != null && /* @__PURE__ */ q(Fe, { children: n })
|
|
3205
3211
|
]
|
|
3206
3212
|
}) }),
|
|
3207
3213
|
e != null && r != null && /* @__PURE__ */ J(B, {
|
|
3208
3214
|
disabled: a || l && u.length == 0,
|
|
3209
3215
|
size: "lg",
|
|
3210
3216
|
type: "submit",
|
|
3211
|
-
children: [a && /* @__PURE__ */ q(
|
|
3217
|
+
children: [a && /* @__PURE__ */ q(Le, {
|
|
3212
3218
|
"aria-label": e,
|
|
3213
3219
|
"data-icon": "inline-start"
|
|
3214
3220
|
}), e]
|
|
3215
3221
|
}),
|
|
3216
|
-
a && e == null && /* @__PURE__ */ q(
|
|
3222
|
+
a && e == null && /* @__PURE__ */ q(Le, { "aria-label": t })
|
|
3217
3223
|
] }), f = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
|
|
3218
3224
|
return /* @__PURE__ */ q("main", {
|
|
3219
3225
|
className: "open-flow-workbench",
|
|
@@ -3232,11 +3238,11 @@ function mn({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
3232
3238
|
})
|
|
3233
3239
|
});
|
|
3234
3240
|
}
|
|
3235
|
-
function
|
|
3241
|
+
function gn({ host: e, store: t }) {
|
|
3236
3242
|
let n = a(t.$.notice);
|
|
3237
3243
|
return W(() => e.notify(n), [e, n]), W(() => () => e.notify(void 0), [e]), null;
|
|
3238
3244
|
}
|
|
3239
|
-
function
|
|
3245
|
+
function _n({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
|
|
3240
3246
|
let g = a(m.workspace.$.flowId);
|
|
3241
3247
|
return /* @__PURE__ */ q("div", {
|
|
3242
3248
|
className: "app-shell",
|
|
@@ -3262,7 +3268,7 @@ function gn({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3262
3268
|
"aria-busy": "true",
|
|
3263
3269
|
className: "workspace"
|
|
3264
3270
|
}),
|
|
3265
|
-
children: /* @__PURE__ */ q(
|
|
3271
|
+
children: /* @__PURE__ */ q(mn, {
|
|
3266
3272
|
hostAction: s,
|
|
3267
3273
|
hostTitle: c,
|
|
3268
3274
|
hrefFor: o,
|
|
@@ -3275,11 +3281,11 @@ function gn({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3275
3281
|
})
|
|
3276
3282
|
});
|
|
3277
3283
|
}
|
|
3278
|
-
function
|
|
3284
|
+
function vn({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: p, onLanguageChange: m, onNavigate: h, preferences: g, theme: _, variables: v = !0 }) {
|
|
3279
3285
|
let y = G(h);
|
|
3280
3286
|
y.current = h;
|
|
3281
3287
|
let [{ i18n: b, navigation: x, store: S }] = K(() => {
|
|
3282
|
-
let e = P(u), t = new
|
|
3288
|
+
let e = P(u), t = new pn(new ye((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), g, F, e, a, v);
|
|
3283
3289
|
return {
|
|
3284
3290
|
i18n: e,
|
|
3285
3291
|
navigation: new dt(t, d, (e, t) => y.current(e, t)),
|
|
@@ -3305,10 +3311,10 @@ function _n({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3305
3311
|
children: /* @__PURE__ */ J("div", {
|
|
3306
3312
|
className: "open-flow-theme open-flow-workbench",
|
|
3307
3313
|
"data-theme": _,
|
|
3308
|
-
children: [/* @__PURE__ */ q(
|
|
3314
|
+
children: [/* @__PURE__ */ q(gn, {
|
|
3309
3315
|
host: a,
|
|
3310
3316
|
store: S
|
|
3311
|
-
}), /* @__PURE__ */ q(
|
|
3317
|
+
}), /* @__PURE__ */ q(_n, {
|
|
3312
3318
|
catalogWidth: e,
|
|
3313
3319
|
createFlow: t,
|
|
3314
3320
|
createFlowDisabled: n,
|
|
@@ -3328,8 +3334,8 @@ function _n({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3328
3334
|
})
|
|
3329
3335
|
});
|
|
3330
3336
|
}
|
|
3331
|
-
function
|
|
3332
|
-
return /* @__PURE__ */ q(
|
|
3337
|
+
function yn({ sessionKey: e, ...t }) {
|
|
3338
|
+
return /* @__PURE__ */ q(vn, { ...t }, e);
|
|
3333
3339
|
}
|
|
3334
3340
|
//#endregion
|
|
3335
|
-
export {
|
|
3341
|
+
export { hn as OpenFlowSessionGate, yn as OpenFlowWorkbench, Xe as isWorkbenchLanguage, Je as resolveWorkbenchLanguage, Ye as workbenchLanguageNames, qe as workbenchLanguages };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as e, B as t, Ct as n, H as r, I as i, In as a, K as o, Kn as s, L as c, Mt as l, On as u, P as d, Pt as f, Qn as p, Rt as m, Tt as h, U as g, Un as _, V as v, Vn as y, Zt as b, _ as x, dt as S, en as C, f as w, g as T, h as E, it as D, kn as ee, m as te, nt as ne, sr as O, tr as k, w as A, z as j } from "./getPseudoElementBounds-Dfqo78k7.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as M, n as N, o as P, r as F, s as re, t as ie, v as I } from "./select-Dn3vpjGC.js";
|
|
3
3
|
import * as L from "react";
|
|
4
4
|
import { jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/DialogRootContext.js
|
|
@@ -369,7 +369,7 @@ function he({ children: e, className: t, closeLabel: n = "Close", container: r,
|
|
|
369
369
|
size: "icon-sm",
|
|
370
370
|
variant: "ghost"
|
|
371
371
|
}),
|
|
372
|
-
children: [/* @__PURE__ */ R(
|
|
372
|
+
children: [/* @__PURE__ */ R(I, {}), /* @__PURE__ */ R("span", {
|
|
373
373
|
className: "sr-only",
|
|
374
374
|
children: n
|
|
375
375
|
})]
|
|
@@ -408,22 +408,22 @@ function ye({ className: e, ...t }) {
|
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region src/workbench/browser/runtime/shell/workbenchSelect.tsx
|
|
410
410
|
function be({ ariaLabel: e, className: t, disabled: n = !1, id: r, onValueChange: i, options: a, portalRoot: o, value: s }) {
|
|
411
|
-
return /* @__PURE__ */ z(
|
|
411
|
+
return /* @__PURE__ */ z(ie, {
|
|
412
412
|
disabled: n,
|
|
413
413
|
onValueChange: (e) => {
|
|
414
414
|
e != null && i(e);
|
|
415
415
|
},
|
|
416
416
|
value: s,
|
|
417
|
-
children: [/* @__PURE__ */ R(
|
|
417
|
+
children: [/* @__PURE__ */ R(P, {
|
|
418
418
|
"aria-label": e,
|
|
419
419
|
className: _("min-w-32", t),
|
|
420
420
|
id: r,
|
|
421
|
-
children: /* @__PURE__ */ R(
|
|
422
|
-
}), /* @__PURE__ */ R(
|
|
421
|
+
children: /* @__PURE__ */ R(re, { children: a.find((e) => e.value == s)?.label ?? s })
|
|
422
|
+
}), /* @__PURE__ */ R(N, {
|
|
423
423
|
align: "end",
|
|
424
424
|
alignItemWithTrigger: !1,
|
|
425
425
|
container: o,
|
|
426
|
-
children: /* @__PURE__ */ R(
|
|
426
|
+
children: /* @__PURE__ */ R(F, { children: a.map((e) => /* @__PURE__ */ R(M, {
|
|
427
427
|
disabled: e.disabled,
|
|
428
428
|
value: e.value,
|
|
429
429
|
children: e.label
|
|
@@ -12,3 +12,9 @@ export declare const controlApiConformanceCases: readonly ControlApiConformanceC
|
|
|
12
12
|
export declare const publicationControlApiConformanceCases: readonly ControlApiConformanceCase[];
|
|
13
13
|
export declare const triggerControlApiConformanceCases: readonly ControlApiConformanceCase[];
|
|
14
14
|
export declare const connectorControlApiConformanceCases: readonly ControlApiConformanceCase[];
|
|
15
|
+
export declare const controlRecoveryConformanceCases: readonly {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
verify(harness: ControlApiConformanceHarness & {
|
|
18
|
+
restart(): Promise<void>;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
}[];
|
|
@@ -154,6 +154,66 @@ function b(e, t, n) {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
var x = [
|
|
157
|
+
{
|
|
158
|
+
name: "admits simultaneous retries as one Run and preserves its Trigger identity",
|
|
159
|
+
async verify(e) {
|
|
160
|
+
let t = await f(e, "Concurrent Run", "concurrent-run-flow"), r = s(t.flowId, "Flow ID"), d = await h(e, r, s(t.draftRevisionId, "Revision ID")), p = (t = {}) => u(e, `/v1/flows/${r}/revisions/${d}/runs`, {
|
|
161
|
+
method: "POST",
|
|
162
|
+
headers: { "idempotency-key": "concurrent-run" },
|
|
163
|
+
body: JSON.stringify({
|
|
164
|
+
engineContract: n,
|
|
165
|
+
inputs: {},
|
|
166
|
+
trigger: {
|
|
167
|
+
nodeId: "start",
|
|
168
|
+
payload: t
|
|
169
|
+
},
|
|
170
|
+
version: 1
|
|
171
|
+
})
|
|
172
|
+
}), m = await Promise.all([
|
|
173
|
+
p(),
|
|
174
|
+
p(),
|
|
175
|
+
p(),
|
|
176
|
+
p()
|
|
177
|
+
]);
|
|
178
|
+
i(m.map((e) => e.status).toSorted(), [
|
|
179
|
+
200,
|
|
180
|
+
200,
|
|
181
|
+
200,
|
|
182
|
+
202
|
|
183
|
+
], "One Run is admitted");
|
|
184
|
+
let g = await Promise.all(m.map((e) => e.json())), _ = s(a(g[0], "Run").runId, "Run ID");
|
|
185
|
+
for (let e of g) i(a(e, "Run").runId, _, "Concurrent Run identity");
|
|
186
|
+
await l(await p({ changed: !0 }), 409, "run.conflict", "Reject changed Trigger replay"), i(o((await c(await u(e, `/v1/flows/${r}/runs`), 200, "List admitted Runs")).runs, "Runs").length, 1, "No duplicate Run");
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "deduplicates simultaneous creation and lost-response retries",
|
|
191
|
+
async verify(e) {
|
|
192
|
+
let t = await Promise.all(Array.from({ length: 4 }, () => d(e, "Concurrent Flow", "concurrent-create")));
|
|
193
|
+
i(t.map((e) => e.status).toSorted(), [
|
|
194
|
+
200,
|
|
195
|
+
200,
|
|
196
|
+
200,
|
|
197
|
+
201
|
|
198
|
+
], "One creation commits");
|
|
199
|
+
let n = await Promise.all(t.map((e) => e.json()));
|
|
200
|
+
for (let e of n) i(e, n[0], "Concurrent replay identity");
|
|
201
|
+
i(await c(await d(e, "Concurrent Flow", "concurrent-create"), 200, "Retry lost creation response"), n[0], "Lost-response replay"), await l(await d(e, "Different Flow", "concurrent-create"), 409, "flow.conflict", "Reject changed retry");
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "commits one concurrent Draft change and replays the winning key",
|
|
206
|
+
async verify(e) {
|
|
207
|
+
let t = await f(e, "Concurrent Draft", "concurrent-draft"), n = s(t.flowId, "Flow ID"), o = s(t.draftRevisionId, "Revision ID"), d = await Promise.all([m(e, n, o, "left", "concurrent-left"), m(e, n, o, "right", "concurrent-right")]);
|
|
208
|
+
i(d.map((e) => e.status).toSorted(), [200, 412], "One Draft CAS commits");
|
|
209
|
+
let p = d.findIndex((e) => e.status == 200), h = await c(d[p] ?? r("Missing winning response"), 200, "Winning Draft change");
|
|
210
|
+
await l(d[1 - p] ?? r("Missing losing response"), 412, "flow.revision-conflict", "Losing Draft change");
|
|
211
|
+
let g = p == 0 ? "left" : "right";
|
|
212
|
+
i(await c(await m(e, n, o, g, `concurrent-${g}`), 200, "Replay winning change"), h, "Replay precedes stale Revision check");
|
|
213
|
+
let _ = a(a(a((await c(await u(e, `/v1/flows/${n}/draft`), 200, "Read authoritative Draft")).content, "Content").document, "Document").graph, "Graph").nodes;
|
|
214
|
+
i(Object.keys(a(_, "Nodes")), [g], "No partial losing edit");
|
|
215
|
+
}
|
|
216
|
+
},
|
|
157
217
|
{
|
|
158
218
|
name: "manages deployment Variables with stable limits and exact-case identity",
|
|
159
219
|
async verify(e) {
|
|
@@ -646,6 +706,12 @@ var x = [
|
|
|
646
706
|
async verify(e) {
|
|
647
707
|
await l(await u(e, "/v1/connector/actions?service=mail&q=send"), 400, "flow.invalid", "Conflicting Connector query"), await l(await u(e, "/v1/connector/actions?q=%20%20"), 400, "flow.invalid", "Empty Connector query"), await l(await u(e, `/v1/connector/connections/${"a".repeat(257)}`), 400, "flow.invalid", "Oversized Connector service"), await l(await u(e, "/v1/connector/actions/conformance.missing"), 404, "connector.action-not-found", "Missing Connector Action");
|
|
648
708
|
}
|
|
709
|
+
}], T = [{
|
|
710
|
+
name: "preserves committed mutations and idempotency receipts after restart",
|
|
711
|
+
async verify(e) {
|
|
712
|
+
let t = await f(e, "Recovery", "recovery-create"), n = s(t.flowId, "Flow ID"), r = s(t.draftRevisionId, "Revision ID"), o = await c(await m(e, n, r, "marker", "recovery-change"), 200, "Commit change");
|
|
713
|
+
await e.restart(), i((await c(await d(e, "Recovery", "recovery-create"), 200, "Replay creation after restart")).flowId, n, "Durable creation identity"), i(await c(await m(e, n, r, "marker", "recovery-change"), 200, "Replay change after restart"), o, "Durable change receipt"), i((await c(await u(e, `/v1/flows/${n}/draft`), 200, "Recovered Draft")).revisionId, a(o.revision, "Revision").revisionId, "Recovered head");
|
|
714
|
+
}
|
|
649
715
|
}];
|
|
650
716
|
//#endregion
|
|
651
|
-
export { w as connectorControlApiConformanceCases, x as controlApiConformanceCases, S as publicationControlApiConformanceCases, C as triggerControlApiConformanceCases };
|
|
717
|
+
export { w as connectorControlApiConformanceCases, x as controlApiConformanceCases, T as controlRecoveryConformanceCases, S as publicationControlApiConformanceCases, C as triggerControlApiConformanceCases };
|