@oomol-lab/open-flow 0.1.0-beta.29 → 0.1.0-beta.30
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-C_8I3Fua.js → createResourceDialog-_y2xHaUA.js} +1 -1
- package/dist/browser/flow-authoring.js +60 -60
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +3 -2
- package/dist/browser/flow-change.js +943 -943
- package/dist/browser/{flowChanges-BBtkyUGd.js → flowChanges-AdN0Iqma.js} +1 -1
- package/dist/browser/{flowWorkspace-DNmBb3ZW.js → flowWorkspace-BrtzLKWB.js} +4 -4
- package/dist/browser/{inputValues-BbSVOWQP.js → inputValues-DJfFraxG.js} +1 -1
- package/dist/browser/workbench.js +4 -4
- package/dist/browser/{workbenchSelect-CQOvpteT.js → workbenchSelect-BDPIQxYK.js} +104 -104
- package/dist/common/control-api-conformance.js +73 -73
- package/dist/common/control-api.js +148 -148
- package/dist/common/control-requests.js +94 -94
- package/dist/common/flow-encoding.d.ts +2 -0
- package/dist/common/flow-encoding.js +1103 -947
- package/dist/common/flow-semantics.js +817 -757
- package/dist/common/mcp.js +257 -257
- package/dist/common/provider-triggers.js +1283 -1283
- package/dist/common/scheduler.js +566 -558
- package/package.json +1 -1
|
@@ -4645,16 +4645,16 @@ var Ys = k(M([A({
|
|
|
4645
4645
|
graph: xc,
|
|
4646
4646
|
subflows: N(z, bc.extend({ graph: xc })),
|
|
4647
4647
|
tasks: N(z, lc)
|
|
4648
|
-
})
|
|
4649
|
-
|
|
4650
|
-
modelVersion: F(2),
|
|
4648
|
+
}), Tc = A({
|
|
4649
|
+
modelVersion: M([F(2), F(3)]),
|
|
4651
4650
|
document: wc,
|
|
4652
4651
|
modules: N(z, Cc)
|
|
4653
|
-
})
|
|
4652
|
+
});
|
|
4653
|
+
Tc.extend({ modelVersion: F(3) }), Tc.extend({
|
|
4654
4654
|
kind: F("open-flow-flow-revision"),
|
|
4655
4655
|
version: F(1)
|
|
4656
4656
|
});
|
|
4657
|
-
var
|
|
4657
|
+
var Ec = {
|
|
4658
4658
|
"binding.create": {
|
|
4659
4659
|
bindingId: z,
|
|
4660
4660
|
binding: Sc
|
|
@@ -4817,16 +4817,16 @@ var Tc = {
|
|
|
4817
4817
|
value: z
|
|
4818
4818
|
}
|
|
4819
4819
|
};
|
|
4820
|
-
k(M([...new Map(Object.entries(
|
|
4820
|
+
k(M([...new Map(Object.entries(Ec).map(([e, t]) => [e, t instanceof w ? t : A({
|
|
4821
4821
|
kind: F(e),
|
|
4822
4822
|
...t
|
|
4823
4823
|
})])).values()])).min(1), new TextEncoder();
|
|
4824
|
-
var
|
|
4824
|
+
var Dc = N(T(), $o()), Oc = A({
|
|
4825
4825
|
jsonSchema: $o(),
|
|
4826
4826
|
nullable: O(),
|
|
4827
4827
|
value: $o().optional(),
|
|
4828
4828
|
description: T().optional()
|
|
4829
|
-
}).strict(),
|
|
4829
|
+
}).strict(), kc = N(T(), Oc), Ac = M([A({
|
|
4830
4830
|
kind: F("value"),
|
|
4831
4831
|
value: $o()
|
|
4832
4832
|
}).strict(), A({
|
|
@@ -4836,36 +4836,36 @@ var Ec = N(T(), $o()), Dc = A({
|
|
|
4836
4836
|
nodeId: T(),
|
|
4837
4837
|
output: T()
|
|
4838
4838
|
}).strict())
|
|
4839
|
-
}).strict()]),
|
|
4839
|
+
}).strict()]), jc = {
|
|
4840
4840
|
name: T().optional(),
|
|
4841
4841
|
description: T().optional(),
|
|
4842
4842
|
icon: T().optional()
|
|
4843
|
-
},
|
|
4843
|
+
}, Mc = M([
|
|
4844
4844
|
A({
|
|
4845
|
-
...
|
|
4845
|
+
...jc,
|
|
4846
4846
|
kind: F("cron"),
|
|
4847
4847
|
cronTimes: k($o())
|
|
4848
4848
|
}).strict(),
|
|
4849
4849
|
A({
|
|
4850
|
-
...
|
|
4850
|
+
...jc,
|
|
4851
4851
|
kind: F("manual")
|
|
4852
4852
|
}).strict(),
|
|
4853
4853
|
A({
|
|
4854
|
-
...
|
|
4854
|
+
...jc,
|
|
4855
4855
|
kind: F("task"),
|
|
4856
4856
|
concurrency: F(1).optional(),
|
|
4857
|
-
inputs: N(T(),
|
|
4857
|
+
inputs: N(T(), Ac),
|
|
4858
4858
|
task: A({
|
|
4859
4859
|
name: T(),
|
|
4860
4860
|
moduleId: T(),
|
|
4861
|
-
inputs:
|
|
4862
|
-
outputs: N(T(),
|
|
4861
|
+
inputs: kc,
|
|
4862
|
+
outputs: N(T(), Oc.omit({ value: !0 }))
|
|
4863
4863
|
}).strict()
|
|
4864
4864
|
}).strict()
|
|
4865
4865
|
]);
|
|
4866
4866
|
A({
|
|
4867
4867
|
name: T(),
|
|
4868
|
-
graph: A({ nodes: N(T(),
|
|
4868
|
+
graph: A({ nodes: N(T(), Mc) }).strict()
|
|
4869
4869
|
}).strict(), A({
|
|
4870
4870
|
kind: F("open-flow-project-revision"),
|
|
4871
4871
|
version: F(1),
|
|
@@ -4876,15 +4876,15 @@ A({
|
|
|
4876
4876
|
imports: k(T())
|
|
4877
4877
|
}).strict()),
|
|
4878
4878
|
document: A({
|
|
4879
|
-
bindings:
|
|
4880
|
-
flows:
|
|
4881
|
-
subflows:
|
|
4882
|
-
tasks:
|
|
4879
|
+
bindings: Dc,
|
|
4880
|
+
flows: Dc,
|
|
4881
|
+
subflows: Dc,
|
|
4882
|
+
tasks: Dc
|
|
4883
4883
|
}).strict()
|
|
4884
4884
|
}).strict();
|
|
4885
4885
|
//#endregion
|
|
4886
4886
|
//#region src/control/common/api.ts
|
|
4887
|
-
function
|
|
4887
|
+
function Nc(e) {
|
|
4888
4888
|
let t = Hs(e), n = Us(t.sequence);
|
|
4889
4889
|
if (n < 0) return L();
|
|
4890
4890
|
let r = {
|
|
@@ -4912,7 +4912,7 @@ function Mc(e) {
|
|
|
4912
4912
|
payload: {
|
|
4913
4913
|
flowId: R(i.flowId),
|
|
4914
4914
|
scopeId: R(i.scopeId),
|
|
4915
|
-
progress:
|
|
4915
|
+
progress: Pc(i.progress)
|
|
4916
4916
|
}
|
|
4917
4917
|
};
|
|
4918
4918
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -5020,7 +5020,7 @@ function Mc(e) {
|
|
|
5020
5020
|
kind: a,
|
|
5021
5021
|
payload: {
|
|
5022
5022
|
...e,
|
|
5023
|
-
progress:
|
|
5023
|
+
progress: Pc(i.progress)
|
|
5024
5024
|
}
|
|
5025
5025
|
};
|
|
5026
5026
|
case "node.artifact": {
|
|
@@ -5046,7 +5046,7 @@ function Mc(e) {
|
|
|
5046
5046
|
default: return L();
|
|
5047
5047
|
}
|
|
5048
5048
|
}
|
|
5049
|
-
function
|
|
5049
|
+
function Pc(e) {
|
|
5050
5050
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : L();
|
|
5051
5051
|
}
|
|
5052
5052
|
//#endregion
|
|
@@ -5083,7 +5083,7 @@ function Z(e, t, n = {}) {
|
|
|
5083
5083
|
headers: r
|
|
5084
5084
|
}));
|
|
5085
5085
|
}
|
|
5086
|
-
function
|
|
5086
|
+
function Fc(e, t, n) {
|
|
5087
5087
|
return Z(e, "/v1/flows", {
|
|
5088
5088
|
body: JSON.stringify({
|
|
5089
5089
|
name: t,
|
|
@@ -5094,9 +5094,9 @@ function Pc(e, t, n) {
|
|
|
5094
5094
|
});
|
|
5095
5095
|
}
|
|
5096
5096
|
async function Q(e, t, n) {
|
|
5097
|
-
return Y(await
|
|
5097
|
+
return Y(await Fc(e, t, n), 201, "Create Flow");
|
|
5098
5098
|
}
|
|
5099
|
-
function
|
|
5099
|
+
function Ic(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
|
|
5100
5100
|
return Z(e, `/v1/flows/${encodeURIComponent(t)}/draft/changes`, {
|
|
5101
5101
|
body: JSON.stringify({
|
|
5102
5102
|
expectedRevisionId: n,
|
|
@@ -5108,7 +5108,7 @@ function Fc(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
|
|
|
5108
5108
|
});
|
|
5109
5109
|
}
|
|
5110
5110
|
function $(e, t, n, r = "marker", i) {
|
|
5111
|
-
return
|
|
5111
|
+
return Ic(e, t, n, [{
|
|
5112
5112
|
kind: "graph.node.create",
|
|
5113
5113
|
node: {
|
|
5114
5114
|
inputs: {},
|
|
@@ -5125,8 +5125,8 @@ function $(e, t, n, r = "marker", i) {
|
|
|
5125
5125
|
target: { kind: "flow" }
|
|
5126
5126
|
}], i);
|
|
5127
5127
|
}
|
|
5128
|
-
async function
|
|
5129
|
-
return
|
|
5128
|
+
async function Lc(e, t, n) {
|
|
5129
|
+
return Rc(await Y(await Ic(e, t, n, [{
|
|
5130
5130
|
kind: "graph.node.create",
|
|
5131
5131
|
node: {
|
|
5132
5132
|
kind: "manual",
|
|
@@ -5136,10 +5136,10 @@ async function Ic(e, t, n) {
|
|
|
5136
5136
|
target: { kind: "flow" }
|
|
5137
5137
|
}]), 200, "Add manual trigger"), "Manual trigger Revision");
|
|
5138
5138
|
}
|
|
5139
|
-
function
|
|
5139
|
+
function Rc(e, t) {
|
|
5140
5140
|
return J(K(e.revision, `${t} revision`).revisionId, `${t} revisionId`);
|
|
5141
5141
|
}
|
|
5142
|
-
function
|
|
5142
|
+
function zc(e, t, n, r, i) {
|
|
5143
5143
|
return Z(e, `/v1/flows/${encodeURIComponent(t)}/revisions/${encodeURIComponent(n)}/publications`, {
|
|
5144
5144
|
body: JSON.stringify({
|
|
5145
5145
|
engineContract: U,
|
|
@@ -5150,7 +5150,7 @@ function Rc(e, t, n, r, i) {
|
|
|
5150
5150
|
method: "POST"
|
|
5151
5151
|
});
|
|
5152
5152
|
}
|
|
5153
|
-
async function
|
|
5153
|
+
async function Bc(e, t, n, r) {
|
|
5154
5154
|
let i = await Y(t, n, r), a = J(i.operationId, `${r} operationId`);
|
|
5155
5155
|
for (let t = 0; i.status == "pending" && t < 100; t += 1) await new Promise((e) => setTimeout(e, 10)), i = await Y(await Z(e, `/v1/flows/${J(i.flowId, `${r} flowId`)}/publish-operations/${a}`), 200, `${r} operation`);
|
|
5156
5156
|
G(i.status, "succeeded", `${r} terminal status`);
|
|
@@ -5160,7 +5160,7 @@ async function zc(e, t, n, r) {
|
|
|
5160
5160
|
publication: s
|
|
5161
5161
|
};
|
|
5162
5162
|
}
|
|
5163
|
-
function
|
|
5163
|
+
function Vc(e, t, n, r, i) {
|
|
5164
5164
|
return Z(e, `/v1/flows/${encodeURIComponent(t)}/publications/${encodeURIComponent(n)}/rollback`, {
|
|
5165
5165
|
body: JSON.stringify({
|
|
5166
5166
|
expectedLivePublicationId: r,
|
|
@@ -5170,7 +5170,7 @@ function Bc(e, t, n, r, i) {
|
|
|
5170
5170
|
method: "POST"
|
|
5171
5171
|
});
|
|
5172
5172
|
}
|
|
5173
|
-
function
|
|
5173
|
+
function Hc(e, t, n) {
|
|
5174
5174
|
return Z(e, "/v1/runs", {
|
|
5175
5175
|
body: JSON.stringify({
|
|
5176
5176
|
inputs: {},
|
|
@@ -5185,11 +5185,11 @@ function Vc(e, t, n) {
|
|
|
5185
5185
|
method: "POST"
|
|
5186
5186
|
});
|
|
5187
5187
|
}
|
|
5188
|
-
var
|
|
5188
|
+
var Uc = [
|
|
5189
5189
|
{
|
|
5190
5190
|
name: "admits simultaneous retries as one Run and preserves its Trigger identity",
|
|
5191
5191
|
async verify(e) {
|
|
5192
|
-
let t = await Q(e, "Concurrent Run", "concurrent-run-flow"), n = J(t.flowId, "Flow ID"), r = await
|
|
5192
|
+
let t = await Q(e, "Concurrent Run", "concurrent-run-flow"), n = J(t.flowId, "Flow ID"), r = await Lc(e, n, J(t.draftRevisionId, "Revision ID")), i = (t = {}) => Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
|
|
5193
5193
|
method: "POST",
|
|
5194
5194
|
headers: { "idempotency-key": "concurrent-run" },
|
|
5195
5195
|
body: JSON.stringify({
|
|
@@ -5221,7 +5221,7 @@ var Hc = [
|
|
|
5221
5221
|
{
|
|
5222
5222
|
name: "deduplicates simultaneous creation and lost-response retries",
|
|
5223
5223
|
async verify(e) {
|
|
5224
|
-
let t = await Promise.all(Array.from({ length: 4 }, () =>
|
|
5224
|
+
let t = await Promise.all(Array.from({ length: 4 }, () => Fc(e, "Concurrent Flow", "concurrent-create")));
|
|
5225
5225
|
G(t.map((e) => e.status).toSorted(), [
|
|
5226
5226
|
200,
|
|
5227
5227
|
200,
|
|
@@ -5230,7 +5230,7 @@ var Hc = [
|
|
|
5230
5230
|
], "One creation commits");
|
|
5231
5231
|
let n = await Promise.all(t.map((e) => e.json()));
|
|
5232
5232
|
for (let e of n) G(e, n[0], "Concurrent replay identity");
|
|
5233
|
-
G(await Y(await
|
|
5233
|
+
G(await Y(await Fc(e, "Concurrent Flow", "concurrent-create"), 200, "Retry lost creation response"), n[0], "Lost-response replay"), await X(await Fc(e, "Different Flow", "concurrent-create"), 409, "flow.conflict", "Reject changed retry");
|
|
5234
5234
|
}
|
|
5235
5235
|
},
|
|
5236
5236
|
{
|
|
@@ -5289,7 +5289,7 @@ var Hc = [
|
|
|
5289
5289
|
name: "creates, replays, lists, reads, renames, and retires a Flow",
|
|
5290
5290
|
async verify(e) {
|
|
5291
5291
|
let t = await Q(e, "Control flow", "flow-lifecycle"), n = J(t.flowId, "Created Flow flowId"), r = J(t.draftRevisionId, "Created Flow draftRevisionId");
|
|
5292
|
-
G(t.name, "Control flow", "Created Flow name"), G(t.status, "active", "Created Flow status"), G(await Y(await
|
|
5292
|
+
G(t.name, "Control flow", "Created Flow name"), G(t.status, "active", "Created Flow status"), G(await Y(await Fc(e, "Control flow", "flow-lifecycle"), 200, "Replay Flow"), t, "Replayed Flow"), await X(await Fc(e, "Different flow", "flow-lifecycle"), 409, "flow.conflict", "Conflicting Flow"), G(await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow"), t, "Read Flow");
|
|
5293
5293
|
let i = await Y(await Z(e, "/v1/flows?includeTotal=true"), 200, "List Flows");
|
|
5294
5294
|
G(i.flows, [t], "Listed Flows"), G(i.total, 1, "Flow total");
|
|
5295
5295
|
let a = await Q(e, "Second control flow", "flow-lifecycle-second"), o = await Y(await Z(e, "/v1/flows?limit=1"), 200, "List first Flow page");
|
|
@@ -5307,8 +5307,8 @@ var Hc = [
|
|
|
5307
5307
|
{
|
|
5308
5308
|
name: "commits immutable Draft Revisions for one Flow",
|
|
5309
5309
|
async verify(e) {
|
|
5310
|
-
let t = await Q(e, "Draft flow", "draft-flow"), n = J(t.flowId, "Draft Flow flowId"), r = J(t.draftRevisionId, "Draft Flow revisionId"), i = await Y(await $(e, n, r, "marker", "draft-change"), 200, "Change Draft"), a =
|
|
5311
|
-
G(K(i.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), G(await Y(await $(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), i, "Replayed Draft change"), await X(await $(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await X(await $(e, n, a, "marker"), 400, "flow.invalid", "Duplicate Draft Node", "A Node with this ID already exists"), await X(await
|
|
5310
|
+
let t = await Q(e, "Draft flow", "draft-flow"), n = J(t.flowId, "Draft Flow flowId"), r = J(t.draftRevisionId, "Draft Flow revisionId"), i = await Y(await $(e, n, r, "marker", "draft-change"), 200, "Change Draft"), a = Rc(i, "Changed Draft");
|
|
5311
|
+
G(K(i.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), G(await Y(await $(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), i, "Replayed Draft change"), await X(await $(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await X(await $(e, n, a, "marker"), 400, "flow.invalid", "Duplicate Draft Node", "A Node with this ID already exists"), await X(await Ic(e, n, a, [{
|
|
5312
5312
|
before: [{
|
|
5313
5313
|
handle: "ready",
|
|
5314
5314
|
jsonSchema: { type: "boolean" },
|
|
@@ -5343,7 +5343,7 @@ var Hc = [
|
|
|
5343
5343
|
version: 1
|
|
5344
5344
|
})
|
|
5345
5345
|
}), 200, "Update editor Presentation"), a = await Y(await Z(e, `/v1/flows/${n}/editor`), 200, "Read editor");
|
|
5346
|
-
G(a.version, 1, "Editor version"), G(K(a.flow, "Editor Flow").draftRevisionId,
|
|
5346
|
+
G(a.version, 1, "Editor version"), G(K(a.flow, "Editor Flow").draftRevisionId, Rc(r, "Editor change"), "Editor Draft head");
|
|
5347
5347
|
for (let t of [
|
|
5348
5348
|
"flow",
|
|
5349
5349
|
"draft",
|
|
@@ -5393,7 +5393,7 @@ var Hc = [
|
|
|
5393
5393
|
{
|
|
5394
5394
|
name: "admits a Draft entry while unrelated branches remain invalid",
|
|
5395
5395
|
async verify(e) {
|
|
5396
|
-
let t = await Q(e, "Partial Draft", "partial-draft"), n = J(t.flowId, "Partial Flow identity"), r =
|
|
5396
|
+
let t = await Q(e, "Partial Draft", "partial-draft"), n = J(t.flowId, "Partial Flow identity"), r = Rc(await Y(await Ic(e, n, await Lc(e, n, J(t.draftRevisionId, "Partial Draft identity")), [
|
|
5397
5397
|
{
|
|
5398
5398
|
kind: "graph.node.create",
|
|
5399
5399
|
nodeId: "other",
|
|
@@ -5454,13 +5454,13 @@ var Hc = [
|
|
|
5454
5454
|
version: 2
|
|
5455
5455
|
})
|
|
5456
5456
|
});
|
|
5457
|
-
await Y(await a("start"), 202, "Run valid entry"), await X(await a("other"), 400, "flow.invalid", "Reject invalid entry branch"), await X(await
|
|
5457
|
+
await Y(await a("start"), 202, "Run valid entry"), await X(await a("other"), 400, "flow.invalid", "Reject invalid entry branch"), await X(await zc(e, n, r, null, "partial-publish"), 400, "flow.invalid", "Reject incomplete publication");
|
|
5458
5458
|
}
|
|
5459
5459
|
},
|
|
5460
5460
|
{
|
|
5461
5461
|
name: "validates, admits, lists, and cancels one Draft Run",
|
|
5462
5462
|
async verify(e) {
|
|
5463
|
-
let t = await Q(e, "Run flow", "run-flow"), n = J(t.flowId, "Run Flow flowId"), r = await
|
|
5463
|
+
let t = await Q(e, "Run flow", "run-flow"), n = J(t.flowId, "Run Flow flowId"), r = await Lc(e, n, J(t.draftRevisionId, "Run Flow revisionId"));
|
|
5464
5464
|
G((await Y(await Z(e, `/v1/flows/${n}/revisions/${r}/check`, {
|
|
5465
5465
|
body: JSON.stringify({
|
|
5466
5466
|
engineContract: U,
|
|
@@ -5554,7 +5554,7 @@ var Hc = [
|
|
|
5554
5554
|
name: "pauses, resolves, resumes, and cancels waiting Draft Runs",
|
|
5555
5555
|
runtime: !0,
|
|
5556
5556
|
async verify(e) {
|
|
5557
|
-
let t = await Q(e, "Wait flow", "wait-flow"), n = J(t.flowId, "Wait Flow flowId"), r = `/v1/flows/${n}/revisions/${
|
|
5557
|
+
let t = await Q(e, "Wait flow", "wait-flow"), n = J(t.flowId, "Wait Flow flowId"), r = `/v1/flows/${n}/revisions/${Rc(await Y(await Ic(e, n, await Lc(e, n, J(t.draftRevisionId, "Wait Flow revisionId")), [{
|
|
5558
5558
|
kind: "graph.node.create",
|
|
5559
5559
|
node: {
|
|
5560
5560
|
input: {
|
|
@@ -5600,7 +5600,7 @@ var Hc = [
|
|
|
5600
5600
|
let l = J(c.waitId, "Wait id");
|
|
5601
5601
|
G(q((await Y(await Z(e, `/v1/flows/${n}/runs?pendingWait=true`), 200, "List waiting Runs")).runs, "Waiting Runs").map((e) => K(e, "Waiting Run").runId), [o], "Waiting Run list");
|
|
5602
5602
|
let u = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read waiting Run events");
|
|
5603
|
-
for (let e of q(u.events, "Run events"))
|
|
5603
|
+
for (let e of q(u.events, "Run events")) Nc(e);
|
|
5604
5604
|
G(u.done, !1, "Waiting events done"), q(u.events, "Waiting events").some((e) => K(e, "Waiting event").kind == "wait.created") || W("Waiting Run must contain wait.created."), await X(await Z(e, `/v1/runs/${o}/result`), 409, "run.not-terminal", "Read waiting Run result");
|
|
5605
5605
|
let d = `/v1/runs/${o}/waits/${l}/resolve`, f = (t) => Z(e, d, {
|
|
5606
5606
|
body: JSON.stringify({
|
|
@@ -5619,7 +5619,7 @@ var Hc = [
|
|
|
5619
5619
|
let te = await Y(await f("approve"), 200, "Replay approved Wait");
|
|
5620
5620
|
G(te.resolutionAccepted, !0, "Replayed resolution"), G(te.status, "completed", "Replayed terminal status");
|
|
5621
5621
|
let ne = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read resumed Run events");
|
|
5622
|
-
for (let e of q(ne.events, "Run events"))
|
|
5622
|
+
for (let e of q(ne.events, "Run events")) Nc(e);
|
|
5623
5623
|
G(q(ne.events, "Completed events").filter((e) => K(e, "Completed event").kind == "run.resolved").length, 1, "Resolved event count");
|
|
5624
5624
|
let re = await i("wait-run-cancel", "Create cancelable Wait Run"), ie = J(re.runId, "Cancelable Wait Run id"), ae = re;
|
|
5625
5625
|
for (let t = 0; q(ae.waits, "Waits").length == 0 && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), ae = await Y(await Z(e, `/v1/runs/${ie}`), 200, "Read cancelable Wait Run");
|
|
@@ -5674,11 +5674,11 @@ var Hc = [
|
|
|
5674
5674
|
await X(await c(o, "unsupported-engine/v1", "unsupported-run"), 409, "engine.unsupported", "Run unsupported Engine"), await X(await c(n, U, "missing-revision-run"), 404, "flow.not-found", "Run missing Revision");
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
],
|
|
5677
|
+
], Wc = [
|
|
5678
5678
|
{
|
|
5679
5679
|
name: "controls Live admission independently from publishing and Draft testing",
|
|
5680
5680
|
async verify(e) {
|
|
5681
|
-
let t = await Q(e, "Enabled flow", "enabled-flow"), n = J(t.flowId, "Flow id"), r = await
|
|
5681
|
+
let t = await Q(e, "Enabled flow", "enabled-flow"), n = J(t.flowId, "Flow id"), r = await Lc(e, n, J(t.draftRevisionId, "Draft id")), i = (t, r) => Z(e, `/v1/flows/${n}/enabled`, {
|
|
5682
5682
|
method: "PUT",
|
|
5683
5683
|
body: JSON.stringify({
|
|
5684
5684
|
enabled: t,
|
|
@@ -5687,12 +5687,12 @@ var Hc = [
|
|
|
5687
5687
|
})
|
|
5688
5688
|
});
|
|
5689
5689
|
await X(await i(!0, "missing"), 409, "flow.conflict", "Cannot enable unpublished Flow");
|
|
5690
|
-
let a = J((await
|
|
5690
|
+
let a = J((await Bc(e, await zc(e, n, r, null, "enable-first"), 202, "Publish")).publication.publicationId, "Publication id"), o = await Y(await i(!1, a), 200, "Disable");
|
|
5691
5691
|
G(o.live, {
|
|
5692
5692
|
enabled: !1,
|
|
5693
5693
|
publicationId: a,
|
|
5694
5694
|
revisionId: r
|
|
5695
|
-
}, "Disabled summary"), G((await Y(await Z(e, "/v1/flows"), 200, "List disabled Flow")).flows, [o], "List includes Live state"), G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status"), await X(await
|
|
5695
|
+
}, "Disabled summary"), G((await Y(await Z(e, "/v1/flows"), 200, "List disabled Flow")).flows, [o], "List includes Live state"), G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status"), await X(await Hc(e, a, "disabled-run"), 412, "live.conflict", "Disabled Live rejects Run"), await Y(await Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
|
|
5696
5696
|
method: "POST",
|
|
5697
5697
|
headers: { "idempotency-key": "disabled-draft" },
|
|
5698
5698
|
body: JSON.stringify({
|
|
@@ -5705,17 +5705,17 @@ var Hc = [
|
|
|
5705
5705
|
version: 2
|
|
5706
5706
|
})
|
|
5707
5707
|
}), 202, "Disabled Flow permits Draft test");
|
|
5708
|
-
let s = J((await
|
|
5709
|
-
G(K((await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow")).live, "Live").enabled, !1, "Publish preserves disabled state"), await X(await i(!0, a), 409, "flow.conflict", "Stale switch rejects"), await Y(await i(!0, s), 200, "Enable"), await Y(await
|
|
5708
|
+
let s = J((await Bc(e, await zc(e, n, r, a, "enable-next"), 202, "Publish disabled Flow")).publication.publicationId, "Next Publication id");
|
|
5709
|
+
G(K((await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow")).live, "Live").enabled, !1, "Publish preserves disabled state"), await X(await i(!0, a), 409, "flow.conflict", "Stale switch rejects"), await Y(await i(!0, s), 200, "Enable"), await Y(await Hc(e, s, "enabled-run"), 202, "Enabled Live accepts Run");
|
|
5710
5710
|
}
|
|
5711
5711
|
},
|
|
5712
5712
|
{
|
|
5713
5713
|
name: "publishes one immutable Flow with idempotent Live CAS",
|
|
5714
5714
|
async verify(e) {
|
|
5715
|
-
let t = await Q(e, "Publication flow", "publication-flow"), n = J(t.flowId, "Publication Flow flowId"), r = await
|
|
5715
|
+
let t = await Q(e, "Publication flow", "publication-flow"), n = J(t.flowId, "Publication Flow flowId"), r = await Lc(e, n, J(t.draftRevisionId, "Publication Flow revisionId"));
|
|
5716
5716
|
G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Read Live")).status, "not-published", "Initial Live status");
|
|
5717
|
-
let i = () =>
|
|
5718
|
-
G(await Y(await i(), 202, "Replay Publish"), a.operation, "Replayed Publish operation"), await X(await
|
|
5717
|
+
let i = () => zc(e, n, r, null, "publication-first"), a = await Bc(e, await i(), 202, "Publish Flow"), o = a.publication, s = J(o.publicationId, "Publication id");
|
|
5718
|
+
G(await Y(await i(), 202, "Replay Publish"), a.operation, "Replayed Publish operation"), await X(await zc(e, n, r, s, "publication-first"), 409, "publication.conflict", "Conflicting replay");
|
|
5719
5719
|
let c = await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Read published Live");
|
|
5720
5720
|
G(c.publication, o, "Live Publication"), G((await Y(await Z(e, `/v1/flows/${n}/editor`), 200, "Read published editor")).live, c, "Published editor Live projection");
|
|
5721
5721
|
let l = await Y(await Z(e, `/v1/flows/${n}/publications?includeTotal=true`), 200, "List Publications");
|
|
@@ -5727,21 +5727,21 @@ var Hc = [
|
|
|
5727
5727
|
}),
|
|
5728
5728
|
headers: { "idempotency-key": "unsupported-publication" },
|
|
5729
5729
|
method: "POST"
|
|
5730
|
-
}), 409, "engine.unsupported", "Publish unsupported Engine"), await X(await
|
|
5730
|
+
}), 409, "engine.unsupported", "Publish unsupported Engine"), await X(await zc(e, n, "00000000-0000-7000-8000-000000000002", s, "missing-revision-publication"), 404, "flow.not-found", "Publish missing Revision"), await X(await Vc(e, n, "00000000-0000-7000-8000-000000000004", s, "missing-rollback"), 404, "publication.not-found", "Rollback missing Publication"), await X(await Hc(e, "00000000-0000-7000-8000-000000000004", "missing-publication-run"), 404, "publication.not-found", "Run missing Publication");
|
|
5731
5731
|
}
|
|
5732
5732
|
},
|
|
5733
5733
|
{
|
|
5734
5734
|
name: "rolls back immutable history and fixes a Live Run target",
|
|
5735
5735
|
async verify(e) {
|
|
5736
|
-
let t = await Q(e, "Rollback flow", "rollback-flow"), n = J(t.flowId, "Rollback Flow flowId"), r = await
|
|
5737
|
-
await X(await
|
|
5738
|
-
let c = () =>
|
|
5736
|
+
let t = await Q(e, "Rollback flow", "rollback-flow"), n = J(t.flowId, "Rollback Flow flowId"), r = await Lc(e, n, J(t.draftRevisionId, "Rollback Flow revisionId")), i = (await Bc(e, await zc(e, n, r, null, "publish-first"), 202, "Publish first Revision")).publication, a = J(i.publicationId, "First Publication"), o = (await Bc(e, await zc(e, n, Rc(await Y(await $(e, n, r), 200, "Change Draft"), "Second Revision"), a, "publish-second"), 202, "Publish second Revision")).publication, s = J(o.publicationId, "Second Publication");
|
|
5737
|
+
await X(await Hc(e, a, "stale-live-run"), 412, "live.conflict", "Run stale Publication");
|
|
5738
|
+
let c = () => Vc(e, n, a, s, "rollback-first"), l = await Y(await c(), 201, "Rollback Flow"), u = J(l.publicationId, "Rollback Publication");
|
|
5739
5739
|
G(l.operation, "rollback", "Rollback operation"), G(l.sourcePublicationId, a, "Rollback source"), G(await Y(await c(), 200, "Replay Rollback"), l, "Replayed Rollback");
|
|
5740
|
-
let d = await Y(await
|
|
5741
|
-
G(d.flowId, n, "Live Run flowId"), G(d.revisionId, r, "Live Run revisionId"), await Y(await Z(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await X(await
|
|
5740
|
+
let d = await Y(await Hc(e, u, "rollback-run"), 202, "Create Live Run");
|
|
5741
|
+
G(d.flowId, n, "Live Run flowId"), G(d.revisionId, r, "Live Run revisionId"), await Y(await Z(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await X(await Hc(e, u, "retired-run"), 409, "flow.busy", "Run retired Flow");
|
|
5742
5742
|
}
|
|
5743
5743
|
}
|
|
5744
|
-
],
|
|
5744
|
+
], Gc = [{
|
|
5745
5745
|
name: "exposes one deployment-scoped Trigger Key catalog",
|
|
5746
5746
|
async verify(e) {
|
|
5747
5747
|
let t = await Y(await Z(e, "/v1/trigger-keys"), 200, "List Trigger Keys"), n = await Y(await Z(e, "/v1/trigger-keys/catalog"), 200, "List Trigger definitions"), r = q(t.keys, "Trigger Keys").map((e) => K(e, "Trigger Key")), i = q(n.definitions, "Trigger definitions").map((e) => K(e, "Trigger definition"));
|
|
@@ -5755,7 +5755,7 @@ var Hc = [
|
|
|
5755
5755
|
}, {
|
|
5756
5756
|
name: "operates and retires one Live Trigger binding",
|
|
5757
5757
|
async verify(e) {
|
|
5758
|
-
let t = await Q(e, "Trigger flow", "trigger-flow"), n = J(t.flowId, "Trigger Flow flowId"), r =
|
|
5758
|
+
let t = await Q(e, "Trigger flow", "trigger-flow"), n = J(t.flowId, "Trigger Flow flowId"), r = Rc(await Y(await Ic(e, n, J(t.draftRevisionId, "Trigger Flow revisionId"), [{
|
|
5759
5759
|
kind: "graph.node.create",
|
|
5760
5760
|
node: {
|
|
5761
5761
|
cronTimes: [{
|
|
@@ -5777,7 +5777,7 @@ var Hc = [
|
|
|
5777
5777
|
},
|
|
5778
5778
|
nodeId: "webhook",
|
|
5779
5779
|
target: { kind: "flow" }
|
|
5780
|
-
}]), 200, "Create Trigger nodes"), "Trigger Revision"), i = (await
|
|
5780
|
+
}]), 200, "Create Trigger nodes"), "Trigger Revision"), i = (await Bc(e, await zc(e, n, r, null, "trigger-publication"), 202, "Publish Trigger Flow")).publication, a = J(i.publicationId, "Trigger Publication"), o = `/v1/flows/${n}/triggers`, s = q((await Y(await Z(e, o), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => K(e, "Trigger binding"));
|
|
5781
5781
|
G(s.map((e) => e.triggerNodeId), ["cron", "webhook"], "Trigger binding order");
|
|
5782
5782
|
for (let e of s) G(e.currentPublicationId, a, "Trigger Publication");
|
|
5783
5783
|
let c = `${o}/webhook`, l = J(K((await Y(await Z(e, c), 200, "Read Webhook")).binding, "Webhook").endpointUrl, "Webhook endpoint"), u = (t) => Z(e, `${c}/${t}`, {
|
|
@@ -5793,13 +5793,13 @@ var Hc = [
|
|
|
5793
5793
|
version: 1
|
|
5794
5794
|
})
|
|
5795
5795
|
});
|
|
5796
|
-
await Y(await d(!1), 200, "Disable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Disabled Flow blocks callback"), await Y(await u("pause"), 200, "Pause binding while Flow disabled"), await Y(await d(!0), 200, "Enable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Enabling preserves binding pause"), await Y(await u("resume"), 200, "Resume binding after enabling Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 200, "Enabled Flow permits callback"), await
|
|
5796
|
+
await Y(await d(!1), 200, "Disable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Disabled Flow blocks callback"), await Y(await u("pause"), 200, "Pause binding while Flow disabled"), await Y(await d(!0), 200, "Enable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Enabling preserves binding pause"), await Y(await u("resume"), 200, "Resume binding after enabling Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 200, "Enabled Flow permits callback"), await Bc(e, await zc(e, n, Rc(await Y(await Ic(e, n, r, [{
|
|
5797
5797
|
kind: "graph.node.delete",
|
|
5798
5798
|
nodeId: "webhook",
|
|
5799
5799
|
target: { kind: "flow" }
|
|
5800
5800
|
}]), 200, "Delete Webhook"), "Retired Trigger Revision"), a, "retire-trigger"), 202, "Publish retired Trigger"), G(K((await Y(await Z(e, c), 200, "Read retired Webhook")).binding, "Retired Webhook").currentPublicationId, void 0, "Retired Publication");
|
|
5801
5801
|
}
|
|
5802
|
-
}],
|
|
5802
|
+
}], Kc = [{
|
|
5803
5803
|
name: "projects the deployment Connector catalog and authorized Connections",
|
|
5804
5804
|
async verify(e) {
|
|
5805
5805
|
let t = q((await Y(await Z(e, "/v1/connector/providers"), 200, "List Connector Providers")).providers, "Connector Providers").map((e) => K(e, "Connector Provider")), n = q((await Y(await Z(e, "/v1/connector/actions"), 200, "List Connector Actions")).actions, "Connector Actions").map((e) => K(e, "Connector Action"));
|
|
@@ -5819,12 +5819,12 @@ var Hc = [
|
|
|
5819
5819
|
async verify(e) {
|
|
5820
5820
|
await X(await Z(e, "/v1/connector/actions?service=mail&q=send"), 400, "flow.invalid", "Conflicting Connector query"), await X(await Z(e, "/v1/connector/actions?q=%20%20"), 400, "flow.invalid", "Empty Connector query"), await X(await Z(e, `/v1/connector/connections/${"a".repeat(257)}`), 400, "flow.invalid", "Oversized Connector service"), await X(await Z(e, "/v1/connector/actions/conformance.missing"), 404, "connector.action-not-found", "Missing Connector Action");
|
|
5821
5821
|
}
|
|
5822
|
-
}],
|
|
5822
|
+
}], qc = [{
|
|
5823
5823
|
name: "preserves committed mutations and idempotency receipts after restart",
|
|
5824
5824
|
async verify(e) {
|
|
5825
5825
|
let t = await Q(e, "Recovery", "recovery-create"), n = J(t.flowId, "Flow ID"), r = J(t.draftRevisionId, "Revision ID"), i = await Y(await $(e, n, r, "marker", "recovery-change"), 200, "Commit change");
|
|
5826
|
-
await e.restart(), G((await Y(await
|
|
5826
|
+
await e.restart(), G((await Y(await Fc(e, "Recovery", "recovery-create"), 200, "Replay creation after restart")).flowId, n, "Durable creation identity"), G(await Y(await $(e, n, r, "marker", "recovery-change"), 200, "Replay change after restart"), i, "Durable change receipt"), G((await Y(await Z(e, `/v1/flows/${n}/draft`), 200, "Recovered Draft")).revisionId, K(i.revision, "Revision").revisionId, "Recovered head");
|
|
5827
5827
|
}
|
|
5828
5828
|
}];
|
|
5829
5829
|
//#endregion
|
|
5830
|
-
export {
|
|
5830
|
+
export { Kc as connectorControlApiConformanceCases, Uc as controlApiConformanceCases, qc as controlRecoveryConformanceCases, Wc as publicationControlApiConformanceCases, Gc as triggerControlApiConformanceCases };
|