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