@oomol-lab/open-flow 0.1.0-beta.25 → 0.1.0-beta.26
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-DNgEsFmG.js → createResourceDialog-BwI2JmPE.js} +1 -1
- package/dist/browser/flow-change.d.ts +14 -0
- package/dist/browser/flow-change.js +38 -17
- package/dist/browser/{flowChanges-CfvUDu1U.js → flowChanges-BqPtWEI9.js} +2209 -2290
- package/dist/browser/{flowWorkspace-BsMrs6KT.js → flowWorkspace-CpMGzmfz.js} +31856 -31817
- package/dist/browser/{inputValues-BXC9GGGa.js → inputValues-CeeJw_G8.js} +1 -1
- package/dist/browser/{switch-Db5aHXHa.js → switch-CyZ96-UF.js} +835 -512
- package/dist/browser/theme.css +22 -0
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +340 -340
- package/dist/browser/{workbenchSelect-CXeaZhuN.js → workbenchSelect-BUu7CjUA.js} +127 -104
- package/dist/common/control-api-conformance.js +1 -1
- package/dist/common/control-api.d.ts +2 -0
- package/dist/common/control-api.js +1783 -1742
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-graph.d.ts +25 -3
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1460 -1374
- package/dist/common/mcp.js +283 -243
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.js +98 -128
- package/package.json +1 -1
package/dist/common/mcp.js
CHANGED
|
@@ -4913,7 +4913,30 @@ j(P([...new Map(Object.entries(Bc).map(([e, t]) => [e, t instanceof E ? t : M({
|
|
|
4913
4913
|
kind: L(e),
|
|
4914
4914
|
...t
|
|
4915
4915
|
})])).values()])).min(1);
|
|
4916
|
-
|
|
4916
|
+
//#endregion
|
|
4917
|
+
//#region src/flow/common/change.ts
|
|
4918
|
+
var Vc = /* @__PURE__ */ new Set([
|
|
4919
|
+
"const",
|
|
4920
|
+
"enum",
|
|
4921
|
+
"exclusiveMaximum",
|
|
4922
|
+
"exclusiveMinimum",
|
|
4923
|
+
"maximum",
|
|
4924
|
+
"maxItems",
|
|
4925
|
+
"maxLength",
|
|
4926
|
+
"maxProperties",
|
|
4927
|
+
"minimum",
|
|
4928
|
+
"minItems",
|
|
4929
|
+
"minLength",
|
|
4930
|
+
"minProperties",
|
|
4931
|
+
"multipleOf",
|
|
4932
|
+
"pattern",
|
|
4933
|
+
"required",
|
|
4934
|
+
"type"
|
|
4935
|
+
]);
|
|
4936
|
+
function Hc(e) {
|
|
4937
|
+
return Vc.has(e);
|
|
4938
|
+
}
|
|
4939
|
+
function Uc(e) {
|
|
4917
4940
|
let t = e.trim();
|
|
4918
4941
|
if (t.length == 0) return "empty";
|
|
4919
4942
|
if (t.length > 80) return "tooLong";
|
|
@@ -4925,23 +4948,23 @@ function Vc(e) {
|
|
|
4925
4948
|
}
|
|
4926
4949
|
//#endregion
|
|
4927
4950
|
//#region src/control/common/resultQuery.ts
|
|
4928
|
-
var
|
|
4951
|
+
var Wc = N({
|
|
4929
4952
|
pointer: D().max(4096).default(""),
|
|
4930
4953
|
offset: k().int().nonnegative().default(0),
|
|
4931
4954
|
limit: k().int().min(1).max(100).default(20),
|
|
4932
4955
|
maxBytes: k().int().min(1).max(1048576).default(15e3)
|
|
4933
|
-
}),
|
|
4956
|
+
}), Gc = D().min(1).max(256), Kc = D().regex(/^[a-z][a-z0-9_.]{0,127}$/), qc = D().trim().min(1).max(128), Jc = N({
|
|
4934
4957
|
version: L(1),
|
|
4935
|
-
sourceId:
|
|
4958
|
+
sourceId: Gc,
|
|
4936
4959
|
revision: fs().positive(),
|
|
4937
|
-
name:
|
|
4960
|
+
name: qc,
|
|
4938
4961
|
provider: I(["feishu", "feishu_app_bot"]),
|
|
4939
|
-
appId:
|
|
4940
|
-
tenantKey:
|
|
4941
|
-
connectionId:
|
|
4942
|
-
teamId:
|
|
4962
|
+
appId: Gc,
|
|
4963
|
+
tenantKey: Gc,
|
|
4964
|
+
connectionId: Gc,
|
|
4965
|
+
teamId: Gc.nullable(),
|
|
4943
4966
|
enabled: A(),
|
|
4944
|
-
eventTypes: j(
|
|
4967
|
+
eventTypes: j(Kc),
|
|
4945
4968
|
manageSubscriptions: A(),
|
|
4946
4969
|
verificationTokenConfigured: A(),
|
|
4947
4970
|
encryptKeyConfigured: A(),
|
|
@@ -4950,22 +4973,22 @@ var Hc = N({
|
|
|
4950
4973
|
lastReceivedAt: D().nullable(),
|
|
4951
4974
|
updatedAt: D(),
|
|
4952
4975
|
consumers: j(N({
|
|
4953
|
-
flowId:
|
|
4976
|
+
flowId: Gc,
|
|
4954
4977
|
flowName: D(),
|
|
4955
|
-
triggerNodeId:
|
|
4978
|
+
triggerNodeId: Gc
|
|
4956
4979
|
}))
|
|
4957
4980
|
});
|
|
4958
|
-
function
|
|
4959
|
-
return
|
|
4981
|
+
function Yc(e) {
|
|
4982
|
+
return Jc.parse(e);
|
|
4960
4983
|
}
|
|
4961
|
-
function
|
|
4984
|
+
function Xc(e) {
|
|
4962
4985
|
return N({
|
|
4963
4986
|
version: L(1),
|
|
4964
|
-
sources: j(
|
|
4965
|
-
teamId:
|
|
4987
|
+
sources: j(Jc),
|
|
4988
|
+
teamId: Gc.nullable().optional()
|
|
4966
4989
|
}).parse(e);
|
|
4967
4990
|
}
|
|
4968
|
-
var
|
|
4991
|
+
var Zc = new Map([
|
|
4969
4992
|
"en",
|
|
4970
4993
|
"zh-CN",
|
|
4971
4994
|
"zh-TW",
|
|
@@ -4974,8 +4997,8 @@ var Yc = new Map([
|
|
|
4974
4997
|
"ru",
|
|
4975
4998
|
"fr"
|
|
4976
4999
|
].map((e) => [e.toLowerCase(), e]));
|
|
4977
|
-
function
|
|
4978
|
-
return typeof e == "string" &&
|
|
5000
|
+
function Qc(e) {
|
|
5001
|
+
return typeof e == "string" && Zc.get(e.toLowerCase()) == e;
|
|
4979
5002
|
}
|
|
4980
5003
|
//#endregion
|
|
4981
5004
|
//#region src/control/common/errors.ts
|
|
@@ -5022,7 +5045,7 @@ var H = {
|
|
|
5022
5045
|
variableNotFound: "variable.not-found"
|
|
5023
5046
|
};
|
|
5024
5047
|
H.eventSourceInvalid, H.eventSourceIdentityUnavailable, H.eventSourceNotFound, H.eventSourceConflict, H.authenticationRequired, H.authorizationDenied, H.bindingUnresolved, H.connectorActionNotFound, H.connectorUnconfigured, H.connectorUnavailable, H.connectorConsoleUnconfigured, H.engineUnavailable, H.engineUnsupported, H.flowInvalid, H.flowNotFound, H.flowBusy, H.flowConflict, H.flowPresentationConflict, H.flowRevisionConflict, H.liveConflict, H.liveNotFound, H.pageInvalidCursor, H.publicationConflict, H.publicationNotFound, H.publicationUnsupported, H.publishOperationNotFound, H.routeNotFound, H.runConflict, H.runEventsExpired, H.runInvalid, H.runNotFound, H.runNotTerminal, H.runOverloaded, H.runWaitNotFound, H.triggerKeyInvalid, H.triggerKeyNotFound, H.triggerNotFound, H.variableInvalid, H.variableLimitReached, H.variableNotFound;
|
|
5025
|
-
var
|
|
5048
|
+
var $c = class extends Error {
|
|
5026
5049
|
constructor(e, t, n) {
|
|
5027
5050
|
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
5028
5051
|
}
|
|
@@ -5030,7 +5053,7 @@ var Zc = class extends Error {
|
|
|
5030
5053
|
//#endregion
|
|
5031
5054
|
//#region src/control/common/decoding.ts
|
|
5032
5055
|
function U() {
|
|
5033
|
-
throw new
|
|
5056
|
+
throw new $c(502, "response.invalid", "The Control API returned an invalid response.");
|
|
5034
5057
|
}
|
|
5035
5058
|
function W(e) {
|
|
5036
5059
|
return typeof e != "object" || !e || Array.isArray(e) ? U() : e;
|
|
@@ -5051,12 +5074,12 @@ function J(e) {
|
|
|
5051
5074
|
let t = W(e);
|
|
5052
5075
|
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, J(t)]));
|
|
5053
5076
|
}
|
|
5054
|
-
function
|
|
5077
|
+
function el(e) {
|
|
5055
5078
|
if (e != null) return G(e);
|
|
5056
5079
|
}
|
|
5057
5080
|
//#endregion
|
|
5058
5081
|
//#region src/control/common/triggerDecoders.ts
|
|
5059
|
-
function
|
|
5082
|
+
function tl(e) {
|
|
5060
5083
|
let t = W(e), n = t.type;
|
|
5061
5084
|
return n != "integration" && n != "poll" ? U() : {
|
|
5062
5085
|
description: typeof t.description == "string" ? t.description : U(),
|
|
@@ -5067,8 +5090,8 @@ function $c(e) {
|
|
|
5067
5090
|
type: n
|
|
5068
5091
|
};
|
|
5069
5092
|
}
|
|
5070
|
-
function
|
|
5071
|
-
let t = W(e), n =
|
|
5093
|
+
function nl(e) {
|
|
5094
|
+
let t = W(e), n = tl(t), r = {
|
|
5072
5095
|
configSchema: J(t.configSchema),
|
|
5073
5096
|
definitionVersion: q(t.definitionVersion),
|
|
5074
5097
|
description: n.description,
|
|
@@ -5111,18 +5134,18 @@ function el(e) {
|
|
|
5111
5134
|
type: "integration"
|
|
5112
5135
|
};
|
|
5113
5136
|
}
|
|
5114
|
-
var
|
|
5137
|
+
var rl = /* @__PURE__ */ new Set([
|
|
5115
5138
|
"cron",
|
|
5116
5139
|
"integration",
|
|
5117
5140
|
"poll",
|
|
5118
5141
|
"webhook"
|
|
5119
|
-
]),
|
|
5142
|
+
]), il = /* @__PURE__ */ new Set([
|
|
5120
5143
|
"failed",
|
|
5121
5144
|
"healthy",
|
|
5122
5145
|
"initializing",
|
|
5123
5146
|
"needs_reauth",
|
|
5124
5147
|
"suspended"
|
|
5125
|
-
]),
|
|
5148
|
+
]), al = /* @__PURE__ */ new Set([
|
|
5126
5149
|
"delivery.failed",
|
|
5127
5150
|
"health.failed",
|
|
5128
5151
|
"health.needs_reauth",
|
|
@@ -5131,11 +5154,11 @@ var tl = /* @__PURE__ */ new Set([
|
|
|
5131
5154
|
"operator.paused",
|
|
5132
5155
|
"operator.resumed"
|
|
5133
5156
|
]);
|
|
5134
|
-
function
|
|
5157
|
+
function ol(e) {
|
|
5135
5158
|
let t = W(e), n = t.health, r = t.listener == null ? void 0 : W(t.listener);
|
|
5136
5159
|
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return U();
|
|
5137
5160
|
let i = t.kind, a = t.operatorState, o = q(t.runtimeVersion);
|
|
5138
|
-
return t.version != 1 || typeof n != "string" || !
|
|
5161
|
+
return t.version != 1 || typeof n != "string" || !il.has(n) || typeof i != "string" || !rl.has(i) || a != "active" && a != "paused" || o <= 0 ? U() : {
|
|
5139
5162
|
...t.currentPublicationId == null ? {} : { currentPublicationId: G(t.currentPublicationId) },
|
|
5140
5163
|
...t.currentRevisionId == null ? {} : { currentRevisionId: G(t.currentRevisionId) },
|
|
5141
5164
|
...t.endpointUrl == null ? {} : { endpointUrl: G(t.endpointUrl) },
|
|
@@ -5154,17 +5177,17 @@ function il(e) {
|
|
|
5154
5177
|
version: 1
|
|
5155
5178
|
};
|
|
5156
5179
|
}
|
|
5157
|
-
function
|
|
5180
|
+
function sl(e) {
|
|
5158
5181
|
let t = W(e);
|
|
5159
5182
|
return t.version == 1 ? {
|
|
5160
|
-
binding:
|
|
5183
|
+
binding: ol(t.binding),
|
|
5161
5184
|
version: 1
|
|
5162
5185
|
} : U();
|
|
5163
5186
|
}
|
|
5164
|
-
function
|
|
5187
|
+
function cl(e) {
|
|
5165
5188
|
let t = W(e), n = t.kind;
|
|
5166
|
-
if (typeof n != "string" || !
|
|
5167
|
-
let r =
|
|
5189
|
+
if (typeof n != "string" || !al.has(n)) return U();
|
|
5190
|
+
let r = el(t.errorCode), i = el(t.errorMessage);
|
|
5168
5191
|
return i != null && i.length > 512 ? U() : {
|
|
5169
5192
|
activityId: G(t.activityId),
|
|
5170
5193
|
createdAt: G(t.createdAt),
|
|
@@ -5173,15 +5196,15 @@ function ol(e) {
|
|
|
5173
5196
|
kind: n
|
|
5174
5197
|
};
|
|
5175
5198
|
}
|
|
5176
|
-
function
|
|
5177
|
-
let t = W(e), n =
|
|
5199
|
+
function ll(e) {
|
|
5200
|
+
let t = W(e), n = el(t.nextCursor);
|
|
5178
5201
|
return t.version != 1 || !Array.isArray(t.activities) ? U() : {
|
|
5179
|
-
activities: t.activities.map(
|
|
5202
|
+
activities: t.activities.map(cl),
|
|
5180
5203
|
...n == null ? {} : { nextCursor: n },
|
|
5181
5204
|
version: 1
|
|
5182
5205
|
};
|
|
5183
5206
|
}
|
|
5184
|
-
function
|
|
5207
|
+
function ul(e) {
|
|
5185
5208
|
let t = W(e), n = q(t.filtered);
|
|
5186
5209
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? U() : {
|
|
5187
5210
|
events: t.events.map((e) => {
|
|
@@ -5195,15 +5218,15 @@ function cl(e) {
|
|
|
5195
5218
|
}
|
|
5196
5219
|
//#endregion
|
|
5197
5220
|
//#region src/control/common/triggerCatalog.ts
|
|
5198
|
-
function
|
|
5221
|
+
function dl(e) {
|
|
5199
5222
|
let t = W(e);
|
|
5200
5223
|
if (K(t, [
|
|
5201
5224
|
"version",
|
|
5202
5225
|
"locale",
|
|
5203
5226
|
"definitions",
|
|
5204
5227
|
"display"
|
|
5205
|
-
]), t.version != 1 || !
|
|
5206
|
-
let n = t.definitions.map(
|
|
5228
|
+
]), t.version != 1 || !Qc(t.locale) || !Array.isArray(t.definitions)) return U();
|
|
5229
|
+
let n = t.definitions.map(nl), r = W(t.display), i = new Set(n.map((e) => e.key));
|
|
5207
5230
|
if (i.size != n.length || Object.keys(r).length != i.size) return U();
|
|
5208
5231
|
let a = Object.fromEntries(n.map(({ key: e }) => {
|
|
5209
5232
|
let t = W(r[e]);
|
|
@@ -5221,7 +5244,7 @@ function ll(e) {
|
|
|
5221
5244
|
}
|
|
5222
5245
|
//#endregion
|
|
5223
5246
|
//#region src/control/common/results.ts
|
|
5224
|
-
var
|
|
5247
|
+
var fl = rc(), pl = N({
|
|
5225
5248
|
pointer: D(),
|
|
5226
5249
|
type: I([
|
|
5227
5250
|
"object",
|
|
@@ -5233,12 +5256,12 @@ var ul = rc(), dl = N({
|
|
|
5233
5256
|
]),
|
|
5234
5257
|
length: k().int().nonnegative().optional(),
|
|
5235
5258
|
complete: A(),
|
|
5236
|
-
value:
|
|
5237
|
-
}),
|
|
5259
|
+
value: fl.optional()
|
|
5260
|
+
}), ml = pl.extend({
|
|
5238
5261
|
offset: k().int().nonnegative(),
|
|
5239
5262
|
nextOffset: k().int().positive().optional(),
|
|
5240
|
-
entries: j(
|
|
5241
|
-
}),
|
|
5263
|
+
entries: j(pl).optional()
|
|
5264
|
+
}), hl = N({
|
|
5242
5265
|
resultId: D().min(1),
|
|
5243
5266
|
callId: D().min(1),
|
|
5244
5267
|
toolId: D().min(1),
|
|
@@ -5249,42 +5272,59 @@ var ul = rc(), dl = N({
|
|
|
5249
5272
|
bytes: k().int().nonnegative(),
|
|
5250
5273
|
digest: D().regex(/^[a-f0-9]{64}$/),
|
|
5251
5274
|
createdAt: D().datetime()
|
|
5252
|
-
}),
|
|
5275
|
+
}), gl = N({
|
|
5253
5276
|
version: L(1),
|
|
5254
5277
|
runId: D(),
|
|
5255
|
-
results: j(
|
|
5278
|
+
results: j(hl),
|
|
5256
5279
|
nextAfter: D().optional()
|
|
5257
|
-
}),
|
|
5280
|
+
}), _l = N({
|
|
5258
5281
|
version: L(1),
|
|
5259
5282
|
runId: D(),
|
|
5260
|
-
result:
|
|
5261
|
-
page:
|
|
5283
|
+
result: hl,
|
|
5284
|
+
page: ml
|
|
5262
5285
|
});
|
|
5263
|
-
function
|
|
5264
|
-
return
|
|
5286
|
+
function vl(e) {
|
|
5287
|
+
return gl.parse(e);
|
|
5265
5288
|
}
|
|
5266
|
-
function
|
|
5267
|
-
return
|
|
5289
|
+
function yl(e) {
|
|
5290
|
+
return _l.parse(e);
|
|
5268
5291
|
}
|
|
5269
5292
|
new TextEncoder();
|
|
5270
5293
|
//#endregion
|
|
5271
5294
|
//#region src/control/common/checkDecoders.ts
|
|
5272
|
-
function
|
|
5295
|
+
function bl(e) {
|
|
5296
|
+
return Array.isArray(e) ? e.map((e) => typeof e == "string" || Number.isSafeInteger(e) ? e : U()) : U();
|
|
5297
|
+
}
|
|
5298
|
+
function xl(e) {
|
|
5299
|
+
let t = W(e), n = G(t.kind);
|
|
5300
|
+
return n == "artifact" || n == "binary" || n == "nullable" ? { kind: n } : n == "schema" ? {
|
|
5301
|
+
kind: n,
|
|
5302
|
+
path: t.path == null ? void 0 : bl(t.path)
|
|
5303
|
+
} : n != "keyword" || typeof t.keyword != "string" || !Hc(t.keyword) ? U() : {
|
|
5304
|
+
kind: n,
|
|
5305
|
+
keyword: t.keyword,
|
|
5306
|
+
path: bl(t.path),
|
|
5307
|
+
source: t.source === void 0 ? void 0 : J(t.source),
|
|
5308
|
+
target: t.target === void 0 ? void 0 : J(t.target)
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5311
|
+
function Sl(e) {
|
|
5273
5312
|
let t = W(e), n = t.values == null ? void 0 : W(t.values);
|
|
5274
5313
|
return {
|
|
5275
5314
|
code: G(t.code),
|
|
5276
5315
|
column: q(t.column),
|
|
5277
5316
|
line: q(t.line),
|
|
5278
5317
|
message: G(t.message),
|
|
5318
|
+
mismatch: t.mismatch == null ? void 0 : xl(t.mismatch),
|
|
5279
5319
|
path: typeof t.path == "string" ? t.path : U(),
|
|
5280
5320
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : U()])) }
|
|
5281
5321
|
};
|
|
5282
5322
|
}
|
|
5283
|
-
function
|
|
5323
|
+
function Cl(e) {
|
|
5284
5324
|
let t = W(e);
|
|
5285
5325
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? U() : {
|
|
5286
5326
|
closureDigest: G(t.closureDigest),
|
|
5287
|
-
diagnostics: t.diagnostics.map(
|
|
5327
|
+
diagnostics: t.diagnostics.map(Sl),
|
|
5288
5328
|
engineContract: G(t.engineContract),
|
|
5289
5329
|
flowId: G(t.flowId),
|
|
5290
5330
|
modelVersion: q(t.modelVersion),
|
|
@@ -5296,7 +5336,7 @@ function yl(e) {
|
|
|
5296
5336
|
}
|
|
5297
5337
|
//#endregion
|
|
5298
5338
|
//#region src/control/common/connectorDecoders.ts
|
|
5299
|
-
function
|
|
5339
|
+
function wl(e) {
|
|
5300
5340
|
let t = W(e);
|
|
5301
5341
|
if (K(t, [
|
|
5302
5342
|
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
@@ -5320,7 +5360,7 @@ function bl(e) {
|
|
|
5320
5360
|
status: n
|
|
5321
5361
|
};
|
|
5322
5362
|
}
|
|
5323
|
-
function
|
|
5363
|
+
function Tl(e, t = !1) {
|
|
5324
5364
|
let n = W(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
5325
5365
|
return K(n, [
|
|
5326
5366
|
"jsonSchema",
|
|
@@ -5334,13 +5374,13 @@ function xl(e, t = !1) {
|
|
|
5334
5374
|
...i ? { value: J(n.value) } : {}
|
|
5335
5375
|
};
|
|
5336
5376
|
}
|
|
5337
|
-
function
|
|
5338
|
-
return
|
|
5377
|
+
function El(e) {
|
|
5378
|
+
return Tl(e, !0);
|
|
5339
5379
|
}
|
|
5340
|
-
function
|
|
5380
|
+
function Dl(e, t) {
|
|
5341
5381
|
return Object.fromEntries(Object.entries(W(e)).map(([e, n]) => [e, t(n)]));
|
|
5342
5382
|
}
|
|
5343
|
-
function
|
|
5383
|
+
function Ol(e) {
|
|
5344
5384
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5345
5385
|
return K(t, [
|
|
5346
5386
|
"actionId",
|
|
@@ -5365,23 +5405,23 @@ function wl(e) {
|
|
|
5365
5405
|
description: typeof t.description == "string" ? t.description : U(),
|
|
5366
5406
|
...n == null ? {} : { homepageUrl: n },
|
|
5367
5407
|
...r == null ? {} : { icon: r },
|
|
5368
|
-
inputs:
|
|
5408
|
+
inputs: Dl(t.inputs, El),
|
|
5369
5409
|
name: G(t.name),
|
|
5370
|
-
outputs:
|
|
5410
|
+
outputs: Dl(t.outputs, Tl),
|
|
5371
5411
|
serviceId: G(t.serviceId),
|
|
5372
5412
|
serviceName: G(t.serviceName)
|
|
5373
5413
|
};
|
|
5374
5414
|
}
|
|
5375
|
-
function
|
|
5376
|
-
let { defaultConnection: t, ...n } = W(e), r =
|
|
5415
|
+
function kl(e) {
|
|
5416
|
+
let { defaultConnection: t, ...n } = W(e), r = Ol(n);
|
|
5377
5417
|
if (t == null) return r;
|
|
5378
|
-
let i =
|
|
5418
|
+
let i = wl(t);
|
|
5379
5419
|
return i.serviceId != r.serviceId || i.status != "active" ? U() : {
|
|
5380
5420
|
...r,
|
|
5381
5421
|
defaultConnection: i
|
|
5382
5422
|
};
|
|
5383
5423
|
}
|
|
5384
|
-
function
|
|
5424
|
+
function Al(e) {
|
|
5385
5425
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5386
5426
|
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (K(t, [
|
|
5387
5427
|
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
@@ -5399,8 +5439,8 @@ function El(e) {
|
|
|
5399
5439
|
}
|
|
5400
5440
|
//#endregion
|
|
5401
5441
|
//#region src/control/common/connectorQueries.ts
|
|
5402
|
-
var
|
|
5403
|
-
function
|
|
5442
|
+
var jl = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
5443
|
+
function Ml(e, t) {
|
|
5404
5444
|
let n = new URLSearchParams({
|
|
5405
5445
|
...e == null ? {} : { flowId: e },
|
|
5406
5446
|
...t == null ? {} : { locale: t }
|
|
@@ -5409,11 +5449,11 @@ function Ol(e, t) {
|
|
|
5409
5449
|
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
5410
5450
|
decode: (e) => {
|
|
5411
5451
|
let t = W(e);
|
|
5412
|
-
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(
|
|
5452
|
+
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(Al);
|
|
5413
5453
|
}
|
|
5414
5454
|
};
|
|
5415
5455
|
}
|
|
5416
|
-
function
|
|
5456
|
+
function Nl(e, t, n) {
|
|
5417
5457
|
let r = new URLSearchParams({
|
|
5418
5458
|
...t == null ? {} : { flowId: t },
|
|
5419
5459
|
...n == null ? {} : { locale: n }
|
|
@@ -5422,35 +5462,35 @@ function kl(e, t, n) {
|
|
|
5422
5462
|
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
5423
5463
|
decode: (e) => {
|
|
5424
5464
|
let t = W(e);
|
|
5425
|
-
return K(t, ["action", "version"]), t.version == 1 ?
|
|
5465
|
+
return K(t, ["action", "version"]), t.version == 1 ? kl(t.action) : U();
|
|
5426
5466
|
}
|
|
5427
5467
|
};
|
|
5428
5468
|
}
|
|
5429
|
-
function
|
|
5469
|
+
function Pl(e) {
|
|
5430
5470
|
return {
|
|
5431
|
-
path: `/v1/connector/connections${
|
|
5471
|
+
path: `/v1/connector/connections${jl(e)}`,
|
|
5432
5472
|
decode: (e) => {
|
|
5433
5473
|
let t = W(e);
|
|
5434
|
-
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(
|
|
5474
|
+
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(wl);
|
|
5435
5475
|
}
|
|
5436
5476
|
};
|
|
5437
5477
|
}
|
|
5438
|
-
function
|
|
5478
|
+
function Fl(e, t) {
|
|
5439
5479
|
return {
|
|
5440
|
-
path: `/v1/connector/connections/${encodeURIComponent(e)}${
|
|
5480
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${jl(t)}`,
|
|
5441
5481
|
decode: (t) => {
|
|
5442
5482
|
let n = W(t);
|
|
5443
5483
|
return K(n, [
|
|
5444
5484
|
"connections",
|
|
5445
5485
|
"serviceId",
|
|
5446
5486
|
"version"
|
|
5447
|
-
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
5487
|
+
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(wl);
|
|
5448
5488
|
}
|
|
5449
5489
|
};
|
|
5450
5490
|
}
|
|
5451
5491
|
//#endregion
|
|
5452
5492
|
//#region src/control/common/flowDecoders.ts
|
|
5453
|
-
function
|
|
5493
|
+
function Il(e) {
|
|
5454
5494
|
let t = W(e), n = t.status;
|
|
5455
5495
|
if (t.version != 1 || n != "active" && n != "retiring") return U();
|
|
5456
5496
|
let r = t.live == null ? void 0 : W(t.live);
|
|
@@ -5469,18 +5509,18 @@ function Ml(e) {
|
|
|
5469
5509
|
version: 1
|
|
5470
5510
|
};
|
|
5471
5511
|
}
|
|
5472
|
-
function
|
|
5512
|
+
function Ll(e) {
|
|
5473
5513
|
let t = W(e);
|
|
5474
5514
|
if (t.version != 1 || !Array.isArray(t.flows)) return U();
|
|
5475
5515
|
let n = t.nextCursor, r = t.total;
|
|
5476
5516
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5477
5517
|
...n == null ? {} : { nextCursor: n },
|
|
5478
|
-
flows: t.flows.map(
|
|
5518
|
+
flows: t.flows.map(Il),
|
|
5479
5519
|
...r == null ? {} : { total: r },
|
|
5480
5520
|
version: 1
|
|
5481
5521
|
};
|
|
5482
5522
|
}
|
|
5483
|
-
function
|
|
5523
|
+
function Rl(e) {
|
|
5484
5524
|
let t = W(e);
|
|
5485
5525
|
if (K(t, [
|
|
5486
5526
|
"name",
|
|
@@ -5503,7 +5543,7 @@ function Pl(e) {
|
|
|
5503
5543
|
}
|
|
5504
5544
|
//#endregion
|
|
5505
5545
|
//#region src/control/common/publicationDecoders.ts
|
|
5506
|
-
function
|
|
5546
|
+
function zl(e) {
|
|
5507
5547
|
let t = W(e), n = t.operation, r = t.sourcePublicationId;
|
|
5508
5548
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? U() : {
|
|
5509
5549
|
actorId: G(t.actorId),
|
|
@@ -5520,7 +5560,7 @@ function Fl(e) {
|
|
|
5520
5560
|
version: 1
|
|
5521
5561
|
};
|
|
5522
5562
|
}
|
|
5523
|
-
function
|
|
5563
|
+
function Bl(e) {
|
|
5524
5564
|
let t = W(e), n = t.status, r = {
|
|
5525
5565
|
createdAt: G(t.createdAt),
|
|
5526
5566
|
flowId: G(t.flowId),
|
|
@@ -5586,33 +5626,33 @@ function Il(e) {
|
|
|
5586
5626
|
default: return U();
|
|
5587
5627
|
}
|
|
5588
5628
|
}
|
|
5589
|
-
function
|
|
5629
|
+
function Vl(e) {
|
|
5590
5630
|
let t = W(e), n = t.status, r = t.publication;
|
|
5591
5631
|
return t.version != 1 || typeof t.hasUnpublishedChanges != "boolean" || n != "not-published" && n != "runnable" && n != "suspended" || n == "not-published" && r !== null || n != "not-published" && r === null ? U() : {
|
|
5592
5632
|
flowId: G(t.flowId),
|
|
5593
5633
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
5594
|
-
publication: r === null ? null :
|
|
5634
|
+
publication: r === null ? null : zl(r),
|
|
5595
5635
|
revision: q(t.revision),
|
|
5596
5636
|
status: n,
|
|
5597
5637
|
version: 1
|
|
5598
5638
|
};
|
|
5599
5639
|
}
|
|
5600
|
-
function
|
|
5640
|
+
function Hl(e) {
|
|
5601
5641
|
let t = W(e), n = t.nextCursor, r = t.total;
|
|
5602
5642
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5603
5643
|
...n == null ? {} : { nextCursor: n },
|
|
5604
|
-
publications: t.publications.map(
|
|
5644
|
+
publications: t.publications.map(zl),
|
|
5605
5645
|
...r == null ? {} : { total: r },
|
|
5606
5646
|
version: 1
|
|
5607
5647
|
};
|
|
5608
5648
|
}
|
|
5609
5649
|
new TextEncoder();
|
|
5610
|
-
var
|
|
5650
|
+
var Ul = F(D(), _s()), Wl = M({
|
|
5611
5651
|
jsonSchema: _s(),
|
|
5612
5652
|
nullable: A(),
|
|
5613
5653
|
value: _s().optional(),
|
|
5614
5654
|
description: D().optional()
|
|
5615
|
-
}).strict(),
|
|
5655
|
+
}).strict(), Gl = F(D(), Wl), Kl = P([M({
|
|
5616
5656
|
kind: L("value"),
|
|
5617
5657
|
value: _s()
|
|
5618
5658
|
}).strict(), M({
|
|
@@ -5622,36 +5662,36 @@ var zl = F(D(), _s()), Bl = M({
|
|
|
5622
5662
|
nodeId: D(),
|
|
5623
5663
|
output: D()
|
|
5624
5664
|
}).strict())
|
|
5625
|
-
}).strict()]),
|
|
5665
|
+
}).strict()]), ql = {
|
|
5626
5666
|
name: D().optional(),
|
|
5627
5667
|
description: D().optional(),
|
|
5628
5668
|
icon: D().optional()
|
|
5629
|
-
},
|
|
5669
|
+
}, Jl = P([
|
|
5630
5670
|
M({
|
|
5631
|
-
...
|
|
5671
|
+
...ql,
|
|
5632
5672
|
kind: L("cron"),
|
|
5633
5673
|
cronTimes: j(_s())
|
|
5634
5674
|
}).strict(),
|
|
5635
5675
|
M({
|
|
5636
|
-
...
|
|
5676
|
+
...ql,
|
|
5637
5677
|
kind: L("manual")
|
|
5638
5678
|
}).strict(),
|
|
5639
5679
|
M({
|
|
5640
|
-
...
|
|
5680
|
+
...ql,
|
|
5641
5681
|
kind: L("task"),
|
|
5642
5682
|
concurrency: L(1).optional(),
|
|
5643
|
-
inputs: F(D(),
|
|
5683
|
+
inputs: F(D(), Kl),
|
|
5644
5684
|
task: M({
|
|
5645
5685
|
name: D(),
|
|
5646
5686
|
moduleId: D(),
|
|
5647
|
-
inputs:
|
|
5648
|
-
outputs: F(D(),
|
|
5687
|
+
inputs: Gl,
|
|
5688
|
+
outputs: F(D(), Wl.omit({ value: !0 }))
|
|
5649
5689
|
}).strict()
|
|
5650
5690
|
}).strict()
|
|
5651
5691
|
]);
|
|
5652
5692
|
M({
|
|
5653
5693
|
name: D(),
|
|
5654
|
-
graph: M({ nodes: F(D(),
|
|
5694
|
+
graph: M({ nodes: F(D(), Jl) }).strict()
|
|
5655
5695
|
}).strict(), M({
|
|
5656
5696
|
kind: L("open-flow-project-revision"),
|
|
5657
5697
|
version: L(1),
|
|
@@ -5662,15 +5702,15 @@ M({
|
|
|
5662
5702
|
imports: j(D())
|
|
5663
5703
|
}).strict()),
|
|
5664
5704
|
document: M({
|
|
5665
|
-
bindings:
|
|
5666
|
-
flows:
|
|
5667
|
-
subflows:
|
|
5668
|
-
tasks:
|
|
5705
|
+
bindings: Ul,
|
|
5706
|
+
flows: Ul,
|
|
5707
|
+
subflows: Ul,
|
|
5708
|
+
tasks: Ul
|
|
5669
5709
|
}).strict()
|
|
5670
5710
|
}).strict();
|
|
5671
5711
|
//#endregion
|
|
5672
5712
|
//#region src/control/common/revisionDecoders.ts
|
|
5673
|
-
function
|
|
5713
|
+
function Yl(e) {
|
|
5674
5714
|
let t = W(e), n = t.parentRevisionId;
|
|
5675
5715
|
return t.version != 1 || n !== null && typeof n != "string" ? U() : {
|
|
5676
5716
|
actorId: G(t.actorId),
|
|
@@ -5683,18 +5723,18 @@ function Gl(e) {
|
|
|
5683
5723
|
version: 1
|
|
5684
5724
|
};
|
|
5685
5725
|
}
|
|
5686
|
-
function
|
|
5726
|
+
function Xl(e) {
|
|
5687
5727
|
let t = W(e);
|
|
5688
5728
|
try {
|
|
5689
5729
|
return {
|
|
5690
|
-
...
|
|
5730
|
+
...Yl(t),
|
|
5691
5731
|
content: zc(t.content)
|
|
5692
5732
|
};
|
|
5693
5733
|
} catch {
|
|
5694
5734
|
return U();
|
|
5695
5735
|
}
|
|
5696
5736
|
}
|
|
5697
|
-
function
|
|
5737
|
+
function Zl(e) {
|
|
5698
5738
|
let t = W(e);
|
|
5699
5739
|
return K(t, [
|
|
5700
5740
|
"revision",
|
|
@@ -5708,28 +5748,28 @@ function ql(e) {
|
|
|
5708
5748
|
version: 1
|
|
5709
5749
|
};
|
|
5710
5750
|
}
|
|
5711
|
-
function
|
|
5751
|
+
function Ql(e) {
|
|
5712
5752
|
let t = W(e);
|
|
5713
5753
|
return t.version == 1 ? {
|
|
5714
|
-
revision:
|
|
5754
|
+
revision: Yl(t.revision),
|
|
5715
5755
|
version: 1
|
|
5716
5756
|
} : U();
|
|
5717
5757
|
}
|
|
5718
|
-
function
|
|
5758
|
+
function $l(e) {
|
|
5719
5759
|
let t = W(e);
|
|
5720
5760
|
return t.version != 1 || t.kind != "snapshot" ? U() : {
|
|
5721
|
-
draft:
|
|
5761
|
+
draft: Xl(t.draft),
|
|
5722
5762
|
kind: "snapshot",
|
|
5723
5763
|
version: 1
|
|
5724
5764
|
};
|
|
5725
5765
|
}
|
|
5726
5766
|
//#endregion
|
|
5727
5767
|
//#region src/control/common/runDecoders.ts
|
|
5728
|
-
var
|
|
5729
|
-
function
|
|
5730
|
-
return typeof e == "string" &&
|
|
5768
|
+
var eu = new Set(oc);
|
|
5769
|
+
function tu(e) {
|
|
5770
|
+
return typeof e == "string" && eu.has(e) ? e : U();
|
|
5731
5771
|
}
|
|
5732
|
-
function
|
|
5772
|
+
function nu(e) {
|
|
5733
5773
|
let t = W(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
5734
5774
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || i != null && typeof i != "string" ? U() : {
|
|
5735
5775
|
createdAt: G(t.createdAt),
|
|
@@ -5739,11 +5779,11 @@ function Ql(e) {
|
|
|
5739
5779
|
runId: G(t.runId),
|
|
5740
5780
|
source: n,
|
|
5741
5781
|
...r == null ? {} : { startedAt: r },
|
|
5742
|
-
status:
|
|
5782
|
+
status: tu(t.status),
|
|
5743
5783
|
version: 1
|
|
5744
5784
|
};
|
|
5745
5785
|
}
|
|
5746
|
-
function
|
|
5786
|
+
function ru(e) {
|
|
5747
5787
|
let t = W(e);
|
|
5748
5788
|
K(t, [
|
|
5749
5789
|
"actions",
|
|
@@ -5763,10 +5803,10 @@ function $l(e) {
|
|
|
5763
5803
|
waitingSince: G(t.waitingSince)
|
|
5764
5804
|
};
|
|
5765
5805
|
}
|
|
5766
|
-
function
|
|
5767
|
-
let t = W(e), n =
|
|
5806
|
+
function iu(e) {
|
|
5807
|
+
let t = W(e), n = nu(t), r = t.eventsExpiresAt;
|
|
5768
5808
|
if (r != null && typeof r != "string" || t.waiting !== void 0 || !Array.isArray(t.waits)) return U();
|
|
5769
|
-
let i = t.waits.map(
|
|
5809
|
+
let i = t.waits.map(ru);
|
|
5770
5810
|
if (new Set(i.map((e) => e.waitId)).size != i.length || n.status == "waiting" && i.length == 0 || [
|
|
5771
5811
|
"completed",
|
|
5772
5812
|
"failed",
|
|
@@ -5805,17 +5845,17 @@ function eu(e) {
|
|
|
5805
5845
|
};
|
|
5806
5846
|
}
|
|
5807
5847
|
}
|
|
5808
|
-
function
|
|
5848
|
+
function au(e) {
|
|
5809
5849
|
let t = W(e), n = t.nextCursor;
|
|
5810
5850
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? U() : {
|
|
5811
5851
|
flowId: G(t.flowId),
|
|
5812
5852
|
...n == null ? {} : { nextCursor: n },
|
|
5813
|
-
runs: t.runs.map(
|
|
5853
|
+
runs: t.runs.map(nu),
|
|
5814
5854
|
version: 1
|
|
5815
5855
|
};
|
|
5816
5856
|
}
|
|
5817
|
-
function
|
|
5818
|
-
let t = W(e), n =
|
|
5857
|
+
function ou(e) {
|
|
5858
|
+
let t = W(e), n = tu(t.status);
|
|
5819
5859
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? U() : {
|
|
5820
5860
|
cancelAccepted: t.cancelAccepted,
|
|
5821
5861
|
runId: G(t.runId),
|
|
@@ -5823,7 +5863,7 @@ function nu(e) {
|
|
|
5823
5863
|
version: 1
|
|
5824
5864
|
};
|
|
5825
5865
|
}
|
|
5826
|
-
function
|
|
5866
|
+
function su(e) {
|
|
5827
5867
|
let t = W(e);
|
|
5828
5868
|
K(t, [
|
|
5829
5869
|
"action",
|
|
@@ -5840,12 +5880,12 @@ function ru(e) {
|
|
|
5840
5880
|
resolutionAccepted: t.resolutionAccepted,
|
|
5841
5881
|
resolvedAt: r,
|
|
5842
5882
|
runId: G(t.runId),
|
|
5843
|
-
status:
|
|
5883
|
+
status: tu(t.status),
|
|
5844
5884
|
version: 1,
|
|
5845
5885
|
waitId: G(t.waitId)
|
|
5846
5886
|
};
|
|
5847
5887
|
}
|
|
5848
|
-
function
|
|
5888
|
+
function cu(e) {
|
|
5849
5889
|
let t = W(e), n = t.status;
|
|
5850
5890
|
if (t.version != 1) return U();
|
|
5851
5891
|
let r = {
|
|
@@ -5888,7 +5928,7 @@ function iu(e) {
|
|
|
5888
5928
|
}
|
|
5889
5929
|
//#endregion
|
|
5890
5930
|
//#region src/control/common/random.ts
|
|
5891
|
-
function
|
|
5931
|
+
function lu() {
|
|
5892
5932
|
let e = globalThis.crypto;
|
|
5893
5933
|
if (e != null) {
|
|
5894
5934
|
try {
|
|
@@ -5905,7 +5945,7 @@ function au() {
|
|
|
5905
5945
|
}
|
|
5906
5946
|
//#endregion
|
|
5907
5947
|
//#region src/control/common/api.ts
|
|
5908
|
-
function
|
|
5948
|
+
function uu(e) {
|
|
5909
5949
|
let t = W(e), n = q(t.sequence);
|
|
5910
5950
|
if (n < 0) return U();
|
|
5911
5951
|
let r = {
|
|
@@ -5933,7 +5973,7 @@ function ou(e) {
|
|
|
5933
5973
|
payload: {
|
|
5934
5974
|
flowId: G(i.flowId),
|
|
5935
5975
|
scopeId: G(i.scopeId),
|
|
5936
|
-
progress:
|
|
5976
|
+
progress: du(i.progress)
|
|
5937
5977
|
}
|
|
5938
5978
|
};
|
|
5939
5979
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -6041,7 +6081,7 @@ function ou(e) {
|
|
|
6041
6081
|
kind: a,
|
|
6042
6082
|
payload: {
|
|
6043
6083
|
...e,
|
|
6044
|
-
progress:
|
|
6084
|
+
progress: du(i.progress)
|
|
6045
6085
|
}
|
|
6046
6086
|
};
|
|
6047
6087
|
case "node.artifact": {
|
|
@@ -6067,14 +6107,14 @@ function ou(e) {
|
|
|
6067
6107
|
default: return U();
|
|
6068
6108
|
}
|
|
6069
6109
|
}
|
|
6070
|
-
function
|
|
6110
|
+
function du(e) {
|
|
6071
6111
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : U();
|
|
6072
6112
|
}
|
|
6073
|
-
function
|
|
6113
|
+
function fu(e) {
|
|
6074
6114
|
let t = W(e), n = t.eventsExpiresAt, r = q(t.nextAfter);
|
|
6075
6115
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? U() : {
|
|
6076
6116
|
done: t.done,
|
|
6077
|
-
events: t.events.map(
|
|
6117
|
+
events: t.events.map(uu),
|
|
6078
6118
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
6079
6119
|
historyComplete: t.historyComplete,
|
|
6080
6120
|
nextAfter: r,
|
|
@@ -6083,10 +6123,10 @@ function cu(e) {
|
|
|
6083
6123
|
};
|
|
6084
6124
|
}
|
|
6085
6125
|
var Y = encodeURIComponent;
|
|
6086
|
-
function
|
|
6087
|
-
return `${e}-${
|
|
6126
|
+
function pu(e) {
|
|
6127
|
+
return `${e}-${lu()}`;
|
|
6088
6128
|
}
|
|
6089
|
-
var
|
|
6129
|
+
var mu = class {
|
|
6090
6130
|
constructor(e) {
|
|
6091
6131
|
this.requestControl = e;
|
|
6092
6132
|
}
|
|
@@ -6094,23 +6134,23 @@ var uu = class {
|
|
|
6094
6134
|
let t = new URLSearchParams();
|
|
6095
6135
|
e.cursor != null && t.set("cursor", e.cursor), e.limit != null && t.set("limit", String(e.limit)), e.includeTotal != null && t.set("includeTotal", String(e.includeTotal));
|
|
6096
6136
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
6097
|
-
return
|
|
6137
|
+
return Ll(await this.request(`/v1/flows${n}`));
|
|
6098
6138
|
}
|
|
6099
6139
|
async listEventSources(e, t) {
|
|
6100
|
-
return
|
|
6140
|
+
return Xc(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${Y(e)}`), { signal: t }));
|
|
6101
6141
|
}
|
|
6102
6142
|
async listEventSourceConnections(e, t) {
|
|
6103
6143
|
let n = W(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${Y(e)}`}`, { signal: t }));
|
|
6104
|
-
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
6144
|
+
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(wl);
|
|
6105
6145
|
}
|
|
6106
6146
|
async createEventSource(e) {
|
|
6107
|
-
return
|
|
6147
|
+
return Yc(await this.request("/v1/event-sources", {
|
|
6108
6148
|
method: "POST",
|
|
6109
6149
|
body: JSON.stringify(e)
|
|
6110
6150
|
}));
|
|
6111
6151
|
}
|
|
6112
6152
|
async updateEventSource(e, t) {
|
|
6113
|
-
return
|
|
6153
|
+
return Yc(await this.request(`/v1/event-sources/${Y(e)}`, {
|
|
6114
6154
|
method: "PUT",
|
|
6115
6155
|
body: JSON.stringify(t)
|
|
6116
6156
|
}));
|
|
@@ -6127,15 +6167,15 @@ var uu = class {
|
|
|
6127
6167
|
async listVariables() {
|
|
6128
6168
|
let e = W(await this.request("/v1/variables"));
|
|
6129
6169
|
return K(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? U() : {
|
|
6130
|
-
variables: e.variables.map(
|
|
6170
|
+
variables: e.variables.map(Rl),
|
|
6131
6171
|
version: 1
|
|
6132
6172
|
};
|
|
6133
6173
|
}
|
|
6134
6174
|
async getVariable(e) {
|
|
6135
|
-
return
|
|
6175
|
+
return Rl(await this.request(`/v1/variables/${Y(e)}`));
|
|
6136
6176
|
}
|
|
6137
6177
|
async putVariable(e, t) {
|
|
6138
|
-
return
|
|
6178
|
+
return Rl(await this.request(`/v1/variables/${Y(e)}`, {
|
|
6139
6179
|
body: JSON.stringify({ value: t }),
|
|
6140
6180
|
method: "PUT"
|
|
6141
6181
|
}));
|
|
@@ -6144,8 +6184,8 @@ var uu = class {
|
|
|
6144
6184
|
let t = W(await this.request(`/v1/variables/${Y(e)}`, { method: "DELETE" }));
|
|
6145
6185
|
if (K(t, ["version"]), t.version != 1) return U();
|
|
6146
6186
|
}
|
|
6147
|
-
async createFlow(e, t = `flow-${
|
|
6148
|
-
return
|
|
6187
|
+
async createFlow(e, t = `flow-${lu()}`) {
|
|
6188
|
+
return Il(await this.request("/v1/flows", {
|
|
6149
6189
|
body: JSON.stringify({
|
|
6150
6190
|
name: e,
|
|
6151
6191
|
version: 1
|
|
@@ -6155,10 +6195,10 @@ var uu = class {
|
|
|
6155
6195
|
}));
|
|
6156
6196
|
}
|
|
6157
6197
|
async getFlow(e) {
|
|
6158
|
-
return
|
|
6198
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`));
|
|
6159
6199
|
}
|
|
6160
6200
|
async renameFlow(e, t) {
|
|
6161
|
-
return
|
|
6201
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`, {
|
|
6162
6202
|
body: JSON.stringify({
|
|
6163
6203
|
name: t,
|
|
6164
6204
|
version: 1
|
|
@@ -6167,15 +6207,15 @@ var uu = class {
|
|
|
6167
6207
|
}));
|
|
6168
6208
|
}
|
|
6169
6209
|
async deleteFlow(e) {
|
|
6170
|
-
return
|
|
6210
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`, { method: "DELETE" }));
|
|
6171
6211
|
}
|
|
6172
6212
|
async listTriggerKeys(e, t) {
|
|
6173
6213
|
let n = W(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
6174
|
-
return n.version != 1 || !Array.isArray(n.keys) ? U() : n.keys.map(
|
|
6214
|
+
return n.version != 1 || !Array.isArray(n.keys) ? U() : n.keys.map(tl);
|
|
6175
6215
|
}
|
|
6176
6216
|
async listTriggerDefinitions(e) {
|
|
6177
6217
|
let t = W(await this.request("/v1/trigger-keys/catalog", { signal: e }));
|
|
6178
|
-
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(
|
|
6218
|
+
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(nl);
|
|
6179
6219
|
}
|
|
6180
6220
|
async readCatalog(e, t, n) {
|
|
6181
6221
|
let r = new Headers();
|
|
@@ -6204,41 +6244,41 @@ var uu = class {
|
|
|
6204
6244
|
...t,
|
|
6205
6245
|
etag: i.headers.get("etag")?.trim() || t.etag
|
|
6206
6246
|
} : {
|
|
6207
|
-
data:
|
|
6247
|
+
data: dl(await i.json()),
|
|
6208
6248
|
etag: i.headers.get("etag")?.trim() || null
|
|
6209
6249
|
};
|
|
6210
6250
|
}
|
|
6211
6251
|
async getTriggerKey(e, t) {
|
|
6212
6252
|
let n = W(await this.request(`/v1/trigger-keys/${Y(e)}`, { signal: t }));
|
|
6213
|
-
return n.version == 1 ?
|
|
6253
|
+
return n.version == 1 ? nl(n.definition) : U();
|
|
6214
6254
|
}
|
|
6215
6255
|
async listFlowTriggerBindings(e, t) {
|
|
6216
6256
|
let n = W(await this.request(`/v1/flows/${Y(e)}/triggers`, { signal: t }));
|
|
6217
|
-
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map(
|
|
6257
|
+
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map(ol);
|
|
6218
6258
|
}
|
|
6219
6259
|
async getFlowTriggerBinding(e, t) {
|
|
6220
|
-
return
|
|
6260
|
+
return sl(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}`));
|
|
6221
6261
|
}
|
|
6222
6262
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
6223
6263
|
let r = new URLSearchParams();
|
|
6224
6264
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
6225
6265
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6226
|
-
return
|
|
6266
|
+
return ll(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/activities${i}`));
|
|
6227
6267
|
}
|
|
6228
6268
|
async pauseFlowTrigger(e, t) {
|
|
6229
|
-
return
|
|
6269
|
+
return ol(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/pause`, {
|
|
6230
6270
|
body: JSON.stringify({ version: 1 }),
|
|
6231
6271
|
method: "POST"
|
|
6232
6272
|
}));
|
|
6233
6273
|
}
|
|
6234
6274
|
async resumeFlowTrigger(e, t) {
|
|
6235
|
-
return
|
|
6275
|
+
return ol(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/resume`, {
|
|
6236
6276
|
body: JSON.stringify({ version: 1 }),
|
|
6237
6277
|
method: "POST"
|
|
6238
6278
|
}));
|
|
6239
6279
|
}
|
|
6240
6280
|
async testFlowPollTrigger(e, t) {
|
|
6241
|
-
return
|
|
6281
|
+
return ul(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/test`, {
|
|
6242
6282
|
body: JSON.stringify({ version: 1 }),
|
|
6243
6283
|
method: "POST"
|
|
6244
6284
|
}));
|
|
@@ -6253,25 +6293,25 @@ var uu = class {
|
|
|
6253
6293
|
"version"
|
|
6254
6294
|
]), t.version != 1) return U();
|
|
6255
6295
|
let n = {
|
|
6256
|
-
flow:
|
|
6257
|
-
draft:
|
|
6258
|
-
live:
|
|
6259
|
-
presentation:
|
|
6296
|
+
flow: Il(t.flow),
|
|
6297
|
+
draft: Xl(t.draft),
|
|
6298
|
+
live: Vl(t.live),
|
|
6299
|
+
presentation: Zl(t.presentation),
|
|
6260
6300
|
version: 1
|
|
6261
6301
|
};
|
|
6262
6302
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? U() : n;
|
|
6263
6303
|
}
|
|
6264
6304
|
async getPresentation(e) {
|
|
6265
|
-
return
|
|
6305
|
+
return Zl(await this.request(`/v1/flows/${Y(e)}/presentation`));
|
|
6266
6306
|
}
|
|
6267
6307
|
async getDraft(e) {
|
|
6268
|
-
return
|
|
6308
|
+
return Xl(await this.request(`/v1/flows/${Y(e)}/draft`));
|
|
6269
6309
|
}
|
|
6270
6310
|
async syncDraft(e) {
|
|
6271
|
-
return
|
|
6311
|
+
return $l(await this.request(`/v1/flows/${Y(e)}/draft/sync`));
|
|
6272
6312
|
}
|
|
6273
6313
|
async getRevision(e, t) {
|
|
6274
|
-
return
|
|
6314
|
+
return Xl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}`));
|
|
6275
6315
|
}
|
|
6276
6316
|
async listTriggerConfigOptions(e, t, n, r) {
|
|
6277
6317
|
let i = W(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/options/${Y(n)}`, { signal: r }));
|
|
@@ -6294,7 +6334,7 @@ var uu = class {
|
|
|
6294
6334
|
});
|
|
6295
6335
|
}
|
|
6296
6336
|
async listConnectorProviders(e, t, n) {
|
|
6297
|
-
let r =
|
|
6337
|
+
let r = Ml(t, n);
|
|
6298
6338
|
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
6299
6339
|
}
|
|
6300
6340
|
async listConnectorActions(e, t, n, r) {
|
|
@@ -6312,15 +6352,15 @@ var uu = class {
|
|
|
6312
6352
|
}, t);
|
|
6313
6353
|
}
|
|
6314
6354
|
async getConnectorAction(e, t, n, r, i = !1) {
|
|
6315
|
-
let a =
|
|
6355
|
+
let a = Nl(e, n, r);
|
|
6316
6356
|
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
6317
6357
|
}
|
|
6318
6358
|
async listAllConnectorConnections(e, t, n = !1) {
|
|
6319
|
-
let r =
|
|
6359
|
+
let r = Pl(t);
|
|
6320
6360
|
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
6321
6361
|
}
|
|
6322
6362
|
async listConnectorConnections(e, t, n, r = !1) {
|
|
6323
|
-
let i =
|
|
6363
|
+
let i = Fl(e, n);
|
|
6324
6364
|
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
6325
6365
|
}
|
|
6326
6366
|
async createConnectorConnectionPage(e, t, n) {
|
|
@@ -6338,8 +6378,8 @@ var uu = class {
|
|
|
6338
6378
|
return U();
|
|
6339
6379
|
}
|
|
6340
6380
|
}
|
|
6341
|
-
async changeDraft(e, t, n, r =
|
|
6342
|
-
return
|
|
6381
|
+
async changeDraft(e, t, n, r = pu("change")) {
|
|
6382
|
+
return Ql(await this.request(`/v1/flows/${Y(e)}/draft/changes`, {
|
|
6343
6383
|
body: JSON.stringify({
|
|
6344
6384
|
expectedRevisionId: t,
|
|
6345
6385
|
operations: n,
|
|
@@ -6350,51 +6390,51 @@ var uu = class {
|
|
|
6350
6390
|
}));
|
|
6351
6391
|
}
|
|
6352
6392
|
async checkFlow(e, t) {
|
|
6353
|
-
return
|
|
6393
|
+
return Cl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/check`, {
|
|
6354
6394
|
body: JSON.stringify({
|
|
6355
|
-
engineContract: "open-flow-engine/
|
|
6395
|
+
engineContract: "open-flow-engine/v4",
|
|
6356
6396
|
version: 1
|
|
6357
6397
|
}),
|
|
6358
6398
|
method: "POST"
|
|
6359
6399
|
}));
|
|
6360
6400
|
}
|
|
6361
6401
|
async getLive(e, t) {
|
|
6362
|
-
return
|
|
6402
|
+
return Vl(await this.request(`/v1/flows/${Y(e)}/live`, { signal: t }));
|
|
6363
6403
|
}
|
|
6364
6404
|
async listPublications(e, t = {}, n) {
|
|
6365
6405
|
let r = new URLSearchParams();
|
|
6366
6406
|
t.cursor != null && r.set("cursor", t.cursor), t.limit != null && r.set("limit", String(t.limit)), t.includeTotal != null && r.set("includeTotal", String(t.includeTotal));
|
|
6367
6407
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6368
|
-
return
|
|
6408
|
+
return Hl(await this.request(`/v1/flows/${Y(e)}/publications${i}`, { signal: n }));
|
|
6369
6409
|
}
|
|
6370
6410
|
async createDraftRun(e, t, n) {
|
|
6371
|
-
let r =
|
|
6411
|
+
let r = iu(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/runs`, {
|
|
6372
6412
|
body: JSON.stringify({
|
|
6373
|
-
engineContract: "open-flow-engine/
|
|
6413
|
+
engineContract: "open-flow-engine/v4",
|
|
6374
6414
|
inputs: n.inputs ?? {},
|
|
6375
6415
|
trigger: n.trigger,
|
|
6376
6416
|
version: 1
|
|
6377
6417
|
}),
|
|
6378
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
6418
|
+
headers: { "idempotency-key": n.idempotencyKey ?? pu("run") },
|
|
6379
6419
|
method: "POST"
|
|
6380
6420
|
}));
|
|
6381
6421
|
return r.source == "draft" ? r : U();
|
|
6382
6422
|
}
|
|
6383
6423
|
async createLiveRun(e, t) {
|
|
6384
|
-
let n =
|
|
6424
|
+
let n = iu(await this.request("/v1/runs", {
|
|
6385
6425
|
body: JSON.stringify({
|
|
6386
6426
|
inputs: t.inputs ?? {},
|
|
6387
6427
|
trigger: t.trigger,
|
|
6388
6428
|
publicationId: e,
|
|
6389
6429
|
version: 1
|
|
6390
6430
|
}),
|
|
6391
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
6431
|
+
headers: { "idempotency-key": t.idempotencyKey ?? pu("run") },
|
|
6392
6432
|
method: "POST"
|
|
6393
6433
|
}));
|
|
6394
6434
|
return n.source == "live" ? n : U();
|
|
6395
6435
|
}
|
|
6396
6436
|
async setFlowEnabled(e, t, n) {
|
|
6397
|
-
return
|
|
6437
|
+
return Il(await this.request(`/v1/flows/${Y(e)}/enabled`, {
|
|
6398
6438
|
method: "PUT",
|
|
6399
6439
|
body: JSON.stringify({
|
|
6400
6440
|
enabled: n,
|
|
@@ -6404,65 +6444,65 @@ var uu = class {
|
|
|
6404
6444
|
}));
|
|
6405
6445
|
}
|
|
6406
6446
|
async publishFlow(e, t, n, r = {}) {
|
|
6407
|
-
return
|
|
6447
|
+
return Bl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/publications`, {
|
|
6408
6448
|
body: JSON.stringify({
|
|
6409
|
-
engineContract: "open-flow-engine/
|
|
6449
|
+
engineContract: "open-flow-engine/v4",
|
|
6410
6450
|
expectedLivePublicationId: n,
|
|
6411
6451
|
version: 1
|
|
6412
6452
|
}),
|
|
6413
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6453
|
+
headers: { "idempotency-key": r.idempotencyKey ?? pu("publication") },
|
|
6414
6454
|
method: "POST"
|
|
6415
6455
|
}));
|
|
6416
6456
|
}
|
|
6417
6457
|
async getPublishOperation(e, t, n) {
|
|
6418
|
-
return
|
|
6458
|
+
return Bl(await this.request(`/v1/flows/${Y(e)}/publish-operations/${Y(t)}`, { signal: n }));
|
|
6419
6459
|
}
|
|
6420
6460
|
async rollbackFlow(e, t, n, r = {}) {
|
|
6421
|
-
return
|
|
6461
|
+
return zl(await this.request(`/v1/flows/${Y(e)}/publications/${Y(t)}/rollback`, {
|
|
6422
6462
|
body: JSON.stringify({
|
|
6423
6463
|
expectedLivePublicationId: n,
|
|
6424
6464
|
version: 1
|
|
6425
6465
|
}),
|
|
6426
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6466
|
+
headers: { "idempotency-key": r.idempotencyKey ?? pu("publication") },
|
|
6427
6467
|
method: "POST"
|
|
6428
6468
|
}));
|
|
6429
6469
|
}
|
|
6430
6470
|
async getRun(e, t) {
|
|
6431
|
-
return
|
|
6471
|
+
return iu(await this.request(`/v1/runs/${Y(e)}`, { signal: t }));
|
|
6432
6472
|
}
|
|
6433
6473
|
async listRuns(e, t = {}) {
|
|
6434
6474
|
let n = new URLSearchParams();
|
|
6435
6475
|
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status), t.pendingWait != null && n.set("pendingWait", String(t.pendingWait));
|
|
6436
6476
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
6437
|
-
return
|
|
6477
|
+
return au(await this.request(`/v1/flows/${Y(e)}/runs${r}`));
|
|
6438
6478
|
}
|
|
6439
6479
|
async getRunEvents(e, t = {}, n) {
|
|
6440
6480
|
let r = new URLSearchParams();
|
|
6441
6481
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
6442
6482
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6443
|
-
return
|
|
6483
|
+
return fu(await this.request(`/v1/runs/${Y(e)}/events${i}`, { signal: n }));
|
|
6444
6484
|
}
|
|
6445
6485
|
async listRunResults(e, t, n) {
|
|
6446
|
-
return
|
|
6486
|
+
return vl(await this.request(`/v1/runs/${Y(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
6447
6487
|
}
|
|
6448
6488
|
async readRunResult(e, t, n = {}, r) {
|
|
6449
6489
|
let i = new URLSearchParams(Object.entries(n).map(([e, t]) => [e, String(t)]));
|
|
6450
|
-
return
|
|
6490
|
+
return yl(await this.request(`/v1/runs/${Y(e)}/results/${Y(t)}?${i}`, { signal: r }));
|
|
6451
6491
|
}
|
|
6452
6492
|
async downloadRunResult(e, t, n) {
|
|
6453
6493
|
return (await this.response(`/v1/runs/${Y(e)}/results/${Y(t)}/content`, { signal: n })).blob();
|
|
6454
6494
|
}
|
|
6455
6495
|
async getRunResult(e, t) {
|
|
6456
|
-
return
|
|
6496
|
+
return cu(await this.request(`/v1/runs/${Y(e)}/result`, { signal: t }));
|
|
6457
6497
|
}
|
|
6458
6498
|
async cancelRun(e) {
|
|
6459
|
-
return
|
|
6499
|
+
return ou(await this.request(`/v1/runs/${Y(e)}/cancel`, {
|
|
6460
6500
|
body: JSON.stringify({ version: 1 }),
|
|
6461
6501
|
method: "POST"
|
|
6462
6502
|
}));
|
|
6463
6503
|
}
|
|
6464
6504
|
async resolveRunWait(e, t, n) {
|
|
6465
|
-
return
|
|
6505
|
+
return su(await this.request(`/v1/runs/${Y(e)}/waits/${Y(t)}/resolve`, {
|
|
6466
6506
|
body: JSON.stringify({
|
|
6467
6507
|
action: n,
|
|
6468
6508
|
version: 1
|
|
@@ -6474,7 +6514,7 @@ var uu = class {
|
|
|
6474
6514
|
let n = Object.entries(e).map(([e, t]) => `${Y(e)}=${Y(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
6475
6515
|
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
6476
6516
|
let t = W(e);
|
|
6477
|
-
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(
|
|
6517
|
+
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(kl);
|
|
6478
6518
|
});
|
|
6479
6519
|
}
|
|
6480
6520
|
async connectorRequest(e, t, n, r, i = !1) {
|
|
@@ -6495,7 +6535,7 @@ var uu = class {
|
|
|
6495
6535
|
return U();
|
|
6496
6536
|
}
|
|
6497
6537
|
let t = W(e).error, n = t == null ? void 0 : W(t);
|
|
6498
|
-
throw new
|
|
6538
|
+
throw new $c(i.status, typeof n?.code == "string" ? n.code : "request.failed", typeof n?.message == "string" ? n.message : `Request failed with status ${i.status}.`);
|
|
6499
6539
|
}
|
|
6500
6540
|
return i;
|
|
6501
6541
|
}
|
|
@@ -6513,13 +6553,13 @@ var uu = class {
|
|
|
6513
6553
|
function X(e, t) {
|
|
6514
6554
|
if (!e) throw Error(t);
|
|
6515
6555
|
}
|
|
6516
|
-
async function
|
|
6556
|
+
async function hu(e, t, n) {
|
|
6517
6557
|
let r = await e.request(new Request(new URL("/v1/mcp", e.origin), {
|
|
6518
6558
|
method: "POST",
|
|
6519
6559
|
headers: {
|
|
6520
6560
|
"content-type": "application/json",
|
|
6521
6561
|
accept: "application/json, text/event-stream",
|
|
6522
|
-
"mcp-protocol-version":
|
|
6562
|
+
"mcp-protocol-version": _u,
|
|
6523
6563
|
"mcp-method": t,
|
|
6524
6564
|
...t == "tools/call" ? { "mcp-name": String(n?.name) } : {}
|
|
6525
6565
|
},
|
|
@@ -6530,7 +6570,7 @@ async function du(e, t, n) {
|
|
|
6530
6570
|
params: {
|
|
6531
6571
|
...n,
|
|
6532
6572
|
_meta: {
|
|
6533
|
-
"io.modelcontextprotocol/protocolVersion":
|
|
6573
|
+
"io.modelcontextprotocol/protocolVersion": _u,
|
|
6534
6574
|
"io.modelcontextprotocol/clientCapabilities": {}
|
|
6535
6575
|
}
|
|
6536
6576
|
}
|
|
@@ -6540,13 +6580,13 @@ async function du(e, t, n) {
|
|
|
6540
6580
|
let i = await r.text(), a = r.headers.get("content-type")?.includes("text/event-stream") ? JSON.parse(i.split("\n").findLast((e) => e.startsWith("data:"))?.slice(5) ?? "null") : JSON.parse(i);
|
|
6541
6581
|
return X(a != null && a.error == null, `MCP ${t} failed: ${JSON.stringify(a)}.`), a.result;
|
|
6542
6582
|
}
|
|
6543
|
-
var
|
|
6583
|
+
var gu = [
|
|
6544
6584
|
{
|
|
6545
6585
|
name: "publishes the public MCP catalog, input schemas and annotations",
|
|
6546
6586
|
async verify(e) {
|
|
6547
|
-
let t = await
|
|
6548
|
-
X(Array.isArray(t.tools), "MCP tools must be an array."), X(t.tools.length == Object.keys(
|
|
6549
|
-
for (let [e, n] of Object.entries(
|
|
6587
|
+
let t = await hu(e, "tools/list");
|
|
6588
|
+
X(Array.isArray(t.tools), "MCP tools must be an array."), X(t.tools.length == Object.keys(Cu).length, "MCP tool count differs from the public contract.");
|
|
6589
|
+
for (let [e, n] of Object.entries(Cu)) {
|
|
6550
6590
|
let r = t.tools.find((t) => t.name == e);
|
|
6551
6591
|
X(r != null, `Missing MCP tool ${e}.`), X(r.description == n.description, `${e} description differs.`), X(ac(r.annotations, n.annotations), `${e} annotations differ.`);
|
|
6552
6592
|
let { $schema: i, ...a } = n.inputSchema["~standard"].jsonSchema.input(), { $schema: o, ...s } = r.inputSchema;
|
|
@@ -6557,7 +6597,7 @@ var fu = [
|
|
|
6557
6597
|
{
|
|
6558
6598
|
name: "shares Run pagination, status filters and cancellation between MCP and REST",
|
|
6559
6599
|
async verify(e) {
|
|
6560
|
-
let t = new
|
|
6600
|
+
let t = new mu((t, n) => e.request(new Request(new URL(t, e.origin), n))), n = await t.createFlow("MCP Run listing"), r = await t.changeDraft(n.flowId, n.draftRevisionId, [{
|
|
6561
6601
|
kind: "graph.node.create",
|
|
6562
6602
|
target: { kind: "flow" },
|
|
6563
6603
|
nodeId: "start",
|
|
@@ -6575,7 +6615,7 @@ var fu = [
|
|
|
6575
6615
|
}
|
|
6576
6616
|
}, a = [];
|
|
6577
6617
|
for (let t = 0; t < 2; t++) {
|
|
6578
|
-
let t = (await
|
|
6618
|
+
let t = (await hu(e, "tools/call", {
|
|
6579
6619
|
name: "flow_run",
|
|
6580
6620
|
arguments: {
|
|
6581
6621
|
...i,
|
|
@@ -6584,7 +6624,7 @@ var fu = [
|
|
|
6584
6624
|
})).structuredContent;
|
|
6585
6625
|
X(typeof t.runId == "string", "MCP must return an accepted Run ID."), a.push(t.runId);
|
|
6586
6626
|
}
|
|
6587
|
-
let o = (await
|
|
6627
|
+
let o = (await hu(e, "tools/call", {
|
|
6588
6628
|
name: "run_list",
|
|
6589
6629
|
arguments: {
|
|
6590
6630
|
flowId: n.flowId,
|
|
@@ -6598,24 +6638,24 @@ var fu = [
|
|
|
6598
6638
|
});
|
|
6599
6639
|
X(s.runs.length == 1 && s.runs[0]?.runId != o.runs[0]?.runId, "REST must continue the MCP Run cursor without duplicates.");
|
|
6600
6640
|
let c = await t.listRuns(n.flowId, { limit: 1 });
|
|
6601
|
-
X(ac((await
|
|
6641
|
+
X(ac((await hu(e, "tools/call", {
|
|
6602
6642
|
name: "run_list",
|
|
6603
6643
|
arguments: {
|
|
6604
6644
|
flowId: n.flowId,
|
|
6605
6645
|
cursor: c.nextCursor,
|
|
6606
6646
|
limit: 1
|
|
6607
6647
|
}
|
|
6608
|
-
})).structuredContent, s), "MCP must continue the REST Run cursor."), await
|
|
6648
|
+
})).structuredContent, s), "MCP must continue the REST Run cursor."), await hu(e, "tools/call", {
|
|
6609
6649
|
name: "run_cancel",
|
|
6610
6650
|
arguments: { runId: a[0] }
|
|
6611
|
-
}), X(ac((await
|
|
6651
|
+
}), X(ac((await hu(e, "tools/call", {
|
|
6612
6652
|
name: "run_list",
|
|
6613
6653
|
arguments: {
|
|
6614
6654
|
flowId: n.flowId,
|
|
6615
6655
|
status: "canceled"
|
|
6616
6656
|
}
|
|
6617
6657
|
})).structuredContent, await t.listRuns(n.flowId, { status: "canceled" })), "MCP and REST status filters differ.");
|
|
6618
|
-
let l = await
|
|
6658
|
+
let l = await hu(e, "tools/call", {
|
|
6619
6659
|
name: "run_list",
|
|
6620
6660
|
arguments: {
|
|
6621
6661
|
flowId: (await t.createFlow("Other Run scope")).flowId,
|
|
@@ -6631,7 +6671,7 @@ var fu = [
|
|
|
6631
6671
|
let t = {
|
|
6632
6672
|
name: "MCP conformance",
|
|
6633
6673
|
idempotencyKey: crypto.randomUUID()
|
|
6634
|
-
}, n = () =>
|
|
6674
|
+
}, n = () => hu(e, "tools/call", {
|
|
6635
6675
|
name: "flow_create",
|
|
6636
6676
|
arguments: t
|
|
6637
6677
|
}), r = await n();
|
|
@@ -6640,7 +6680,7 @@ var fu = [
|
|
|
6640
6680
|
X(typeof i.flowId == "string", "MCP did not return a Flow ID."), X(ac((await n()).structuredContent, i), "MCP mutation replay changed identity.");
|
|
6641
6681
|
let a = await e.request(new Request(new URL(`/v1/flows/${encodeURIComponent(i.flowId)}/draft`, e.origin)));
|
|
6642
6682
|
X(a.ok, "REST cannot read the Flow created through MCP."), X((await a.json()).revisionId == i.draftRevisionId, "MCP and REST disagree on the Draft head.");
|
|
6643
|
-
let o = await
|
|
6683
|
+
let o = await hu(e, "tools/call", {
|
|
6644
6684
|
name: "flow_create",
|
|
6645
6685
|
arguments: {
|
|
6646
6686
|
...t,
|
|
@@ -6650,7 +6690,7 @@ var fu = [
|
|
|
6650
6690
|
X(o.isError == 1, "MCP must reject a changed idempotent replay."), X(o.structuredContent.error.code == "flow.conflict", "MCP must preserve the Control error code.");
|
|
6651
6691
|
}
|
|
6652
6692
|
}
|
|
6653
|
-
],
|
|
6693
|
+
], _u = "2026-07-28", vu = rc(), Z = D().min(1), yu = Z.max(256).describe("Stable identity for this mutation. Retry with the same key and identical arguments, even after a lost response."), bu = fs().min(1).max(100).default(50), Q = Z.describe("Exact Flow ID returned by flow_list or flow_create."), xu = Z.describe("Exact Run ID returned by flow_run or run_list."), Su = "Use flow_list and flow_get to inspect a Flow. Use flow_schema to learn atomic edit operations, then flow_apply with the observed expectedRevisionId and a stable idempotencyKey. Use flow_check before flow_run. Select an explicit Trigger node ID and fixed revision or publication. A new Flow has no Trigger until you add one. Use flow_publish to publish a fixed Revision, then poll flow_publish_status until succeeded or failed. Use flow_set_enabled to enable or disable the observed Live publication. flow_run returns an accepted Run, not its final result. Find Runs with run_list, poll run_get and use run_result after terminal. Resolve a waiting Run only with an explicit run_resolve_wait action allowed by run_get. Use run_results and run_result_read to inspect stored Agent tool results; these are separate from the terminal Run result. Retry flow_create, flow_apply, flow_publish and flow_run only with identical arguments and the same idempotencyKey; a new key can execute the Flow again. Other mutations use the same resource identity and arguments when retrying. Cancel a Run explicitly with run_cancel. Use nextCursor and nextAfter to read subsequent pages. Connector-backed deployments may require a Team; inspect connector_teams before creating a Flow.";
|
|
6654
6694
|
function $(e, t, n) {
|
|
6655
6695
|
return {
|
|
6656
6696
|
description: e,
|
|
@@ -6677,23 +6717,23 @@ function $(e, t, n) {
|
|
|
6677
6717
|
} }
|
|
6678
6718
|
};
|
|
6679
6719
|
}
|
|
6680
|
-
var
|
|
6720
|
+
var Cu = {
|
|
6681
6721
|
flow_list: $("List Flows in this deployment. Continue with nextCursor; cursors are compatible with the Control API.", N({
|
|
6682
6722
|
cursor: Z.optional(),
|
|
6683
|
-
limit:
|
|
6723
|
+
limit: bu
|
|
6684
6724
|
}), !0),
|
|
6685
6725
|
flow_get: $("Read Flow metadata, the full Draft and current Live publication. Use draft.revisionId as the base of an edit.", N({ flowId: Q }), !0),
|
|
6686
6726
|
flow_schema: $("Get the JSON Schema for atomic change operations, optionally one operation kind. Node titles must be non-empty and unique within a graph.", N({ kind: Z.optional() }), !0),
|
|
6687
6727
|
flow_create: $("Create an empty Flow. If this deployment uses OOMOL Connector, choose a teamId from connector_teams. Keep the key and arguments stable when retrying.", N({
|
|
6688
|
-
name: Z.refine((e) => e == e.trim() &&
|
|
6689
|
-
idempotencyKey:
|
|
6728
|
+
name: Z.refine((e) => e == e.trim() && Uc(e) == null, "Flow name is invalid."),
|
|
6729
|
+
idempotencyKey: yu,
|
|
6690
6730
|
teamId: Z.optional()
|
|
6691
6731
|
}), !1),
|
|
6692
6732
|
flow_apply: $("Apply ordered atomic changes. Read flow_schema first. A stale expectedRevisionId is a conflict; reread the Draft before deciding on a new edit.", N({
|
|
6693
6733
|
flowId: Q,
|
|
6694
6734
|
expectedRevisionId: Z,
|
|
6695
|
-
idempotencyKey:
|
|
6696
|
-
operations: j(
|
|
6735
|
+
idempotencyKey: yu,
|
|
6736
|
+
operations: j(vu).min(1).describe("Change operations defined by flow_schema. Explicit IDs and before values refer to the base Revision.")
|
|
6697
6737
|
}), !1),
|
|
6698
6738
|
flow_check: $("Validate a fixed Revision and return diagnostics. Get its revisionId from flow_get or flow_apply.", N({
|
|
6699
6739
|
flowId: Q,
|
|
@@ -6703,7 +6743,7 @@ var yu = {
|
|
|
6703
6743
|
flowId: Q,
|
|
6704
6744
|
revisionId: Z,
|
|
6705
6745
|
expectedLivePublicationId: Z.nullable(),
|
|
6706
|
-
idempotencyKey:
|
|
6746
|
+
idempotencyKey: yu
|
|
6707
6747
|
}), !1),
|
|
6708
6748
|
flow_publish_status: $("Read a publish operation. Only succeeded confirms publication; failed includes the failure details. Keep polling while pending.", N({
|
|
6709
6749
|
flowId: Q,
|
|
@@ -6721,35 +6761,35 @@ var yu = {
|
|
|
6721
6761
|
publicationId: Z.optional(),
|
|
6722
6762
|
trigger: N({
|
|
6723
6763
|
nodeId: Z,
|
|
6724
|
-
payload:
|
|
6764
|
+
payload: vu
|
|
6725
6765
|
}),
|
|
6726
|
-
inputs: F(D(), F(D(),
|
|
6727
|
-
idempotencyKey:
|
|
6766
|
+
inputs: F(D(), F(D(), vu)).default({}),
|
|
6767
|
+
idempotencyKey: yu
|
|
6728
6768
|
}), !1),
|
|
6729
6769
|
run_list: $("List Runs for a Flow, optionally filtered by status. Continue with nextCursor; cursors are compatible with the Control API.", N({
|
|
6730
6770
|
flowId: Q,
|
|
6731
6771
|
pendingWait: A().optional(),
|
|
6732
6772
|
status: I(oc).optional(),
|
|
6733
6773
|
cursor: Z.optional(),
|
|
6734
|
-
limit:
|
|
6774
|
+
limit: bu
|
|
6735
6775
|
}), !0),
|
|
6736
|
-
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", N({ runId:
|
|
6776
|
+
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", N({ runId: xu }), !0),
|
|
6737
6777
|
run_events: $("Read one page of Run events. Continue with nextAfter. Events can expire independently of the terminal result.", N({
|
|
6738
|
-
runId:
|
|
6778
|
+
runId: xu,
|
|
6739
6779
|
after: fs().min(0).default(0),
|
|
6740
|
-
limit:
|
|
6780
|
+
limit: bu
|
|
6741
6781
|
}), !0),
|
|
6742
|
-
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", N({ runId:
|
|
6782
|
+
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", N({ runId: xu }), !0),
|
|
6743
6783
|
run_results: $("List stored Agent tool result metadata for a Run, including Connector and code results. Continue with nextAfter as after. Use run_result_read to inspect content.", N({
|
|
6744
|
-
runId:
|
|
6784
|
+
runId: xu,
|
|
6745
6785
|
after: Z.optional()
|
|
6746
6786
|
}), !0),
|
|
6747
|
-
run_result_read: $("Read a bounded page of a stored Agent tool result. Select a JSON Pointer with pointer and continue with nextOffset as offset at the same pointer. A complete value contains all data at that pointer.",
|
|
6748
|
-
runId:
|
|
6787
|
+
run_result_read: $("Read a bounded page of a stored Agent tool result. Select a JSON Pointer with pointer and continue with nextOffset as offset at the same pointer. A complete value contains all data at that pointer.", Wc.extend({
|
|
6788
|
+
runId: xu,
|
|
6749
6789
|
resultId: Z
|
|
6750
6790
|
}), !0),
|
|
6751
6791
|
run_resolve_wait: $("Explicitly resolve the waitId observed in run_get with one of its allowed actions. The first decision wins; inspect resolutionAccepted and action. Resume the same Run and poll run_get; do not create a replacement Run.", N({
|
|
6752
|
-
runId:
|
|
6792
|
+
runId: xu,
|
|
6753
6793
|
waitId: Z,
|
|
6754
6794
|
action: I([
|
|
6755
6795
|
"approve",
|
|
@@ -6757,7 +6797,7 @@ var yu = {
|
|
|
6757
6797
|
"reject"
|
|
6758
6798
|
])
|
|
6759
6799
|
}), !1),
|
|
6760
|
-
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", N({ runId:
|
|
6800
|
+
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", N({ runId: xu }), !1),
|
|
6761
6801
|
connector_teams: $("List OOMOL Teams available for Flow creation. An unconfigured or custom Connector may not provide Teams.", N({}), !0),
|
|
6762
6802
|
connector_list: $("List Connector providers available in the Flow scope.", N({ flowId: Q.optional() }), !0),
|
|
6763
6803
|
connector_search: $("Search Connector actions in the Flow scope.", N({
|
|
@@ -6776,4 +6816,4 @@ var yu = {
|
|
|
6776
6816
|
trigger_get: $("Read a provider Trigger definition before creating its node.", N({ key: Z }), !0)
|
|
6777
6817
|
};
|
|
6778
6818
|
//#endregion
|
|
6779
|
-
export {
|
|
6819
|
+
export { gu as mcpConformanceCases, Su as mcpInstructions, _u as mcpProtocolVersion, Cu as mcpTools };
|