@oomol-lab/open-flow 0.1.0-beta.22 → 0.1.0-beta.23

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 (46) hide show
  1. package/dist/browser/{createResourceDialog-CjuJryCv.js → createResourceDialog-PKbMMpEk.js} +29 -29
  2. package/dist/browser/event-sources.d.ts +30 -0
  3. package/dist/browser/{flowChanges-Tg1duLry.js → flowChanges-BUlMz4iC.js} +4236 -3019
  4. package/dist/browser/{flowWorkspace-CoK10XHY.js → flowWorkspace-DLArN17T.js} +49585 -42617
  5. package/dist/browser/{i18n-CVBh0Ni1.js → input-group-C2frNYAx.js} +1801 -75
  6. package/dist/browser/{inputValues-CDiBMKu8.js → inputValues-CcGVt51C.js} +10 -10
  7. package/dist/browser/licenses.md +60 -0
  8. package/dist/browser/lite-Cy6aeiL6.js +8538 -0
  9. package/dist/browser/{markdownContent-BBgH9ZIV.js → markdownContent-SIlWuHve.js} +17 -17
  10. package/dist/browser/theme.css +45 -5
  11. package/dist/browser/ui.css +1 -1
  12. package/dist/browser/ui.d.ts +23 -1
  13. package/dist/browser/ui.js +59 -27
  14. package/dist/browser/workbench-contract.d.ts +19 -0
  15. package/dist/browser/workbench.css +1 -1
  16. package/dist/browser/workbench.d.ts +1 -0
  17. package/dist/browser/workbench.js +1176 -734
  18. package/dist/browser/workbenchSelect-CPRUXKbf.js +6088 -0
  19. package/dist/common/control-api-conformance.js +273 -232
  20. package/dist/common/control-api-errors.d.ts +20 -0
  21. package/dist/common/control-api.d.ts +50 -10
  22. package/dist/common/control-api.js +899 -661
  23. package/dist/common/control-requests.d.ts +23 -0
  24. package/dist/common/control-requests.js +377 -351
  25. package/dist/common/event-sources.d.ts +50 -0
  26. package/dist/common/feishu-events.d.ts +20 -0
  27. package/dist/common/feishu-subscriptions.d.ts +10 -0
  28. package/dist/common/fr-iv1541dF.js +93 -0
  29. package/dist/common/integration-trigger.d.ts +4 -0
  30. package/dist/common/ja-Bq-ZDOD4.js +93 -0
  31. package/dist/common/ko-Z-k9R2c6.js +93 -0
  32. package/dist/common/localization.d.ts +2 -0
  33. package/dist/common/localization.js +37 -1
  34. package/dist/common/mcp.js +615 -382
  35. package/dist/common/poll-trigger.d.ts +2 -0
  36. package/dist/common/provider-triggers.d.ts +4 -0
  37. package/dist/common/provider-triggers.js +3225 -2692
  38. package/dist/common/ru-B4gFecYZ.js +93 -0
  39. package/dist/common/trigger-catalog.d.ts +17 -0
  40. package/dist/common/trigger-config-options.d.ts +13 -0
  41. package/dist/common/trigger-localization.d.ts +7 -0
  42. package/dist/common/zh-CN-ByQ6nYam.js +93 -0
  43. package/dist/common/zh-TW-QjIarvX9.js +93 -0
  44. package/package.json +1 -1
  45. package/dist/browser/useValueChanged-BY05Usw-.js +0 -2944
  46. package/dist/browser/workbenchSelect-DEmv7SLW.js +0 -11666
@@ -4336,54 +4336,42 @@ function Ws(e) {
4336
4336
  ]));
4337
4337
  return t;
4338
4338
  }
4339
- cs({
4340
- pointer: E().max(4096).default(""),
4341
- offset: O().int().nonnegative().default(0),
4342
- limit: O().int().min(1).max(100).default(20),
4343
- maxBytes: O().int().min(1).max(1048576).default(15e3)
4344
- });
4345
4339
  //#endregion
4346
- //#region src/control/common/results.ts
4347
- var Gs = Ws(), Ks = cs({
4348
- pointer: E(),
4349
- type: P([
4350
- "object",
4351
- "array",
4352
- "string",
4353
- "number",
4354
- "boolean",
4355
- "null"
4356
- ]),
4357
- length: O().int().nonnegative().optional(),
4358
- complete: k(),
4359
- value: Gs.optional()
4360
- }), qs = Ks.extend({
4361
- offset: O().int().nonnegative(),
4362
- nextOffset: O().int().positive().optional(),
4363
- entries: A(Ks).optional()
4364
- }), Js = cs({
4365
- resultId: E().min(1),
4366
- callId: E().min(1),
4367
- toolId: E().min(1),
4368
- source: ds("kind", [cs({
4369
- kind: F("connector"),
4370
- action: E().min(1)
4371
- }), cs({ kind: F("code") })]),
4372
- bytes: O().int().nonnegative(),
4373
- digest: E().regex(/^[a-f0-9]{64}$/),
4374
- createdAt: E().datetime()
4375
- });
4340
+ //#region src/control/common/eventSources.ts
4341
+ var Gs = E().min(1).max(256), Ks = E().regex(/^[a-z][a-z0-9_.]{0,127}$/), qs = E().trim().min(1).max(128);
4376
4342
  cs({
4377
4343
  version: F(1),
4378
- runId: E(),
4379
- results: A(Js),
4380
- nextAfter: E().optional()
4381
- }), cs({
4382
- version: F(1),
4383
- runId: E(),
4384
- result: Js,
4385
- page: qs
4386
- }), new TextEncoder();
4344
+ sourceId: Gs,
4345
+ revision: Qo().positive(),
4346
+ name: qs,
4347
+ provider: P(["feishu", "feishu_app_bot"]),
4348
+ appId: Gs,
4349
+ tenantKey: Gs,
4350
+ connectionId: Gs,
4351
+ teamId: Gs.nullable(),
4352
+ enabled: k(),
4353
+ eventTypes: A(Ks),
4354
+ manageSubscriptions: k(),
4355
+ verificationTokenConfigured: k(),
4356
+ encryptKeyConfigured: k(),
4357
+ endpointUrl: E().nullable(),
4358
+ verifiedAt: E().nullable(),
4359
+ lastReceivedAt: E().nullable(),
4360
+ updatedAt: E(),
4361
+ consumers: A(cs({
4362
+ flowId: Gs,
4363
+ flowName: E(),
4364
+ triggerNodeId: Gs
4365
+ }))
4366
+ }), new Map([
4367
+ "en",
4368
+ "zh-CN",
4369
+ "zh-TW",
4370
+ "ja",
4371
+ "ko",
4372
+ "ru",
4373
+ "fr"
4374
+ ].map((e) => [e.toLowerCase(), e]));
4387
4375
  //#endregion
4388
4376
  //#region src/control/common/errors.ts
4389
4377
  var I = {
@@ -4393,8 +4381,13 @@ var I = {
4393
4381
  connectorActionNotFound: "connector.action-not-found",
4394
4382
  connectorUnconfigured: "connector.unconfigured",
4395
4383
  connectorUnavailable: "connector.unavailable",
4384
+ connectorConsoleUnconfigured: "connector.console-unconfigured",
4396
4385
  engineUnavailable: "engine.unavailable",
4397
4386
  engineUnsupported: "engine.unsupported",
4387
+ eventSourceInvalid: "event-source.invalid",
4388
+ eventSourceIdentityUnavailable: "event-source.identity-unavailable",
4389
+ eventSourceNotFound: "event-source.not-found",
4390
+ eventSourceConflict: "event-source.conflict",
4398
4391
  flowInvalid: "flow.invalid",
4399
4392
  flowNotFound: "flow.not-found",
4400
4393
  flowBusy: "flow.busy",
@@ -4423,8 +4416,8 @@ var I = {
4423
4416
  variableLimitReached: "variable.limit-reached",
4424
4417
  variableNotFound: "variable.not-found"
4425
4418
  };
4426
- I.authenticationRequired, I.authorizationDenied, I.bindingUnresolved, I.connectorActionNotFound, I.connectorUnconfigured, I.connectorUnavailable, I.engineUnavailable, I.engineUnsupported, I.flowInvalid, I.flowNotFound, I.flowBusy, I.flowConflict, I.flowPresentationConflict, I.flowRevisionConflict, I.liveConflict, I.liveNotFound, I.pageInvalidCursor, I.publicationConflict, I.publicationNotFound, I.publicationUnsupported, I.publishOperationNotFound, I.routeNotFound, I.runConflict, I.runEventsExpired, I.runInvalid, I.runNotFound, I.runNotTerminal, I.runOverloaded, I.runWaitNotFound, I.triggerKeyInvalid, I.triggerKeyNotFound, I.triggerNotFound, I.variableInvalid, I.variableLimitReached, I.variableNotFound;
4427
- var Ys = class extends Error {
4419
+ I.eventSourceInvalid, I.eventSourceIdentityUnavailable, I.eventSourceNotFound, I.eventSourceConflict, I.authenticationRequired, I.authorizationDenied, I.bindingUnresolved, I.connectorActionNotFound, I.connectorUnconfigured, I.connectorUnavailable, I.connectorConsoleUnconfigured, I.engineUnavailable, I.engineUnsupported, I.flowInvalid, I.flowNotFound, I.flowBusy, I.flowConflict, I.flowPresentationConflict, I.flowRevisionConflict, I.liveConflict, I.liveNotFound, I.pageInvalidCursor, I.publicationConflict, I.publicationNotFound, I.publicationUnsupported, I.publishOperationNotFound, I.routeNotFound, I.runConflict, I.runEventsExpired, I.runInvalid, I.runNotFound, I.runNotTerminal, I.runOverloaded, I.runWaitNotFound, I.triggerKeyInvalid, I.triggerKeyNotFound, I.triggerNotFound, I.variableInvalid, I.variableLimitReached, I.variableNotFound;
4420
+ var Js = class extends Error {
4428
4421
  constructor(e, t, n) {
4429
4422
  super(n), this.code = t, this.name = "ApiError", this.status = e;
4430
4423
  }
@@ -4432,57 +4425,105 @@ var Ys = class extends Error {
4432
4425
  //#endregion
4433
4426
  //#region src/control/common/decoding.ts
4434
4427
  function L() {
4435
- throw new Ys(502, "response.invalid", "The Control API returned an invalid response.");
4428
+ throw new Js(502, "response.invalid", "The Control API returned an invalid response.");
4436
4429
  }
4437
- function Xs(e) {
4430
+ function Ys(e) {
4438
4431
  return typeof e != "object" || !e || Array.isArray(e) ? L() : e;
4439
4432
  }
4440
4433
  function R(e) {
4441
4434
  return typeof e == "string" && e.length > 0 ? e : L();
4442
4435
  }
4443
- function Zs(e) {
4436
+ function Xs(e) {
4444
4437
  return Number.isSafeInteger(e) ? e : L();
4445
4438
  }
4446
- function Qs(e) {
4439
+ function Zs(e) {
4447
4440
  if (e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e)) return e;
4448
- if (Array.isArray(e)) return e.map(Qs);
4449
- let t = Xs(e);
4450
- return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Qs(t)]));
4441
+ if (Array.isArray(e)) return e.map(Zs);
4442
+ let t = Ys(e);
4443
+ return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Zs(t)]));
4451
4444
  }
4445
+ cs({
4446
+ pointer: E().max(4096).default(""),
4447
+ offset: O().int().nonnegative().default(0),
4448
+ limit: O().int().min(1).max(100).default(20),
4449
+ maxBytes: O().int().min(1).max(1048576).default(15e3)
4450
+ });
4451
+ //#endregion
4452
+ //#region src/control/common/results.ts
4453
+ var Qs = Ws(), $s = cs({
4454
+ pointer: E(),
4455
+ type: P([
4456
+ "object",
4457
+ "array",
4458
+ "string",
4459
+ "number",
4460
+ "boolean",
4461
+ "null"
4462
+ ]),
4463
+ length: O().int().nonnegative().optional(),
4464
+ complete: k(),
4465
+ value: Qs.optional()
4466
+ }), ec = $s.extend({
4467
+ offset: O().int().nonnegative(),
4468
+ nextOffset: O().int().positive().optional(),
4469
+ entries: A($s).optional()
4470
+ }), tc = cs({
4471
+ resultId: E().min(1),
4472
+ callId: E().min(1),
4473
+ toolId: E().min(1),
4474
+ source: ds("kind", [cs({
4475
+ kind: F("connector"),
4476
+ action: E().min(1)
4477
+ }), cs({ kind: F("code") })]),
4478
+ bytes: O().int().nonnegative(),
4479
+ digest: E().regex(/^[a-f0-9]{64}$/),
4480
+ createdAt: E().datetime()
4481
+ });
4482
+ cs({
4483
+ version: F(1),
4484
+ runId: E(),
4485
+ results: A(tc),
4486
+ nextAfter: E().optional()
4487
+ }), cs({
4488
+ version: F(1),
4489
+ runId: E(),
4490
+ result: tc,
4491
+ page: ec
4492
+ }), new TextEncoder();
4452
4493
  //#endregion
4453
4494
  //#region src/flow/common/changeSchema.ts
4454
- var z = E(), B = Ws(), $s = A(z), ec = j({
4495
+ var z = E(), B = Ws(), nc = A(z), rc = j({
4455
4496
  description: z.optional(),
4456
4497
  jsonSchema: B,
4457
4498
  nullable: k(),
4458
4499
  handle: z
4459
- }), V = ec.extend({ value: B.optional() }), tc = j({
4500
+ }), V = rc.extend({ value: B.optional() }), ic = j({
4460
4501
  collapsed: k().optional(),
4461
4502
  group: z
4462
- }), nc = j({
4503
+ }), ac = j({
4463
4504
  kind: F("node"),
4464
4505
  nodeId: z,
4465
4506
  output: z
4466
- }), rc = j({
4507
+ }), oc = j({
4467
4508
  kind: F("flow"),
4468
4509
  input: z
4469
- }), ic = M([
4470
- nc,
4471
- rc,
4510
+ }), sc = M([
4511
+ ac,
4512
+ oc,
4472
4513
  j({
4473
4514
  kind: F("binding"),
4474
4515
  bindingId: z
4475
4516
  })
4476
- ]), ac = M([j({
4517
+ ]), cc = M([j({
4477
4518
  kind: F("value"),
4478
4519
  value: B
4479
4520
  }), j({
4480
4521
  kind: F("sources"),
4481
- sources: A(ic)
4482
- })]), oc = N(z, ac), sc = {
4483
- inputs: A(M([V, tc])),
4484
- outputs: A(M([ec, tc]))
4485
- }, cc = j({
4522
+ sources: A(sc)
4523
+ })]), lc = N(z, cc), uc = {
4524
+ inputs: A(M([V, ic])),
4525
+ outputs: A(M([rc, ic]))
4526
+ }, dc = j({
4486
4527
  kind: F("connector"),
4487
4528
  action: z,
4488
4529
  connectionId: z.optional(),
@@ -4490,19 +4531,19 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4490
4531
  connectionId: z,
4491
4532
  alias: z.optional()
4492
4533
  }))
4493
- }), lc = j({
4494
- ...sc,
4534
+ }), fc = j({
4535
+ ...uc,
4495
4536
  name: z,
4496
4537
  moduleId: z,
4497
- capabilities: A(cc).optional()
4498
- }), uc = M([j({
4538
+ capabilities: A(dc).optional()
4539
+ }), pc = M([j({
4499
4540
  kind: F("value"),
4500
4541
  value: B
4501
4542
  }), j({
4502
4543
  kind: F("input"),
4503
4544
  input: z
4504
- })]), dc = M([uc, j({ kind: F("model") })]), fc = j({
4505
- ...sc,
4545
+ })]), mc = M([pc, j({ kind: F("model") })]), hc = j({
4546
+ ...uc,
4506
4547
  name: z,
4507
4548
  executor: M([
4508
4549
  j({
@@ -4518,7 +4559,7 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4518
4559
  kind: F("agent"),
4519
4560
  code: k().optional(),
4520
4561
  model: z,
4521
- prompt: uc,
4562
+ prompt: pc,
4522
4563
  system: z,
4523
4564
  maxRounds: O(),
4524
4565
  tools: A(j({
@@ -4528,16 +4569,16 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4528
4569
  action: z,
4529
4570
  connectionId: z.optional(),
4530
4571
  approval: k(),
4531
- inputs: A(V.extend({ source: dc }))
4572
+ inputs: A(V.extend({ source: mc }))
4532
4573
  })),
4533
4574
  notification: j({
4534
4575
  taskId: z,
4535
4576
  messageHandle: z,
4536
- inputs: N(z, uc)
4577
+ inputs: N(z, pc)
4537
4578
  }).optional()
4538
4579
  })
4539
4580
  ])
4540
- }), pc = {
4581
+ }), gc = {
4541
4582
  input: V,
4542
4583
  cases: A(j({
4543
4584
  output: z,
@@ -4570,25 +4611,25 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4570
4611
  }))
4571
4612
  })),
4572
4613
  defaultOutput: z.optional()
4573
- }, mc = {
4614
+ }, _c = {
4574
4615
  actions: M([hs([F("continue")]), hs([F("approve"), F("reject")])]),
4575
4616
  prompt: z,
4576
4617
  notification: j({
4577
- inputs: oc,
4618
+ inputs: lc,
4578
4619
  messageHandle: z,
4579
4620
  taskId: z
4580
4621
  }).optional()
4581
- }, hc = {
4622
+ }, vc = {
4582
4623
  inputsDef: A(V),
4583
4624
  options: j({
4584
- allowedMethods: $s.optional(),
4585
- allowedOrigins: $s.optional(),
4625
+ allowedMethods: nc.optional(),
4626
+ allowedOrigins: nc.optional(),
4586
4627
  noResponseBody: k().optional(),
4587
4628
  responseData: z.optional(),
4588
4629
  responseHeaders: N(z, z).optional(),
4589
4630
  responseStatusCode: O().optional()
4590
4631
  }).optional()
4591
- }, gc = A(M([j({
4632
+ }, yc = A(M([j({
4592
4633
  type: F("cron"),
4593
4634
  expression: z,
4594
4635
  timezone: z
@@ -4602,7 +4643,7 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4602
4643
  "week"
4603
4644
  ]),
4604
4645
  value: O()
4605
- })])), _c = {
4646
+ })])), bc = {
4606
4647
  configSchema: B,
4607
4648
  definitionVersion: O(),
4608
4649
  description: z,
@@ -4611,7 +4652,7 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4611
4652
  name: z,
4612
4653
  payloadSchema: B,
4613
4654
  provider: z
4614
- }, vc = j({
4655
+ }, xc = j({
4615
4656
  body: j({
4616
4657
  allowArray: k(),
4617
4658
  allowEmpty: k(),
@@ -4631,129 +4672,129 @@ var z = E(), B = Ws(), $s = A(z), ec = j({
4631
4672
  "PUT"
4632
4673
  ])),
4633
4674
  successStatus: O()
4634
- }), yc = {
4675
+ }), Sc = {
4635
4676
  name: z,
4636
4677
  description: z.optional(),
4637
4678
  icon: z.optional()
4638
- }, bc = {
4639
- inputs: oc,
4679
+ }, Cc = {
4680
+ inputs: lc,
4640
4681
  name: z.optional(),
4641
4682
  description: z.optional(),
4642
4683
  icon: z.optional(),
4643
4684
  timeoutMs: O().optional()
4644
- }, xc = M([
4685
+ }, wc = M([
4645
4686
  j({
4646
- ...bc,
4687
+ ...Cc,
4647
4688
  kind: F("condition"),
4648
- ...pc
4689
+ ...gc
4649
4690
  }),
4650
4691
  j({
4651
- ...bc,
4692
+ ...Cc,
4652
4693
  inputs: rs().transform(() => ({})).default({}),
4653
4694
  kind: F("value"),
4654
4695
  values: A(V)
4655
4696
  }),
4656
4697
  j({
4657
- ...bc,
4698
+ ...Cc,
4658
4699
  kind: F("subflow"),
4659
4700
  subflowId: z
4660
4701
  }),
4661
4702
  j({
4662
- ...bc,
4703
+ ...Cc,
4663
4704
  kind: F("task"),
4664
- task: lc,
4705
+ task: fc,
4665
4706
  additionalInputs: A(V).optional()
4666
4707
  }),
4667
4708
  j({
4668
- ...bc,
4709
+ ...Cc,
4669
4710
  kind: F("task"),
4670
4711
  taskId: z,
4671
4712
  additionalInputs: A(V).optional()
4672
4713
  }),
4673
4714
  j({
4674
- ...bc,
4715
+ ...Cc,
4675
4716
  kind: F("wait"),
4676
4717
  input: V,
4677
- ...mc
4718
+ ..._c
4678
4719
  }).omit({ timeoutMs: !0 }),
4679
4720
  j({
4680
- ...yc,
4721
+ ...Sc,
4681
4722
  kind: F("manual")
4682
4723
  }),
4683
4724
  j({
4684
- ...yc,
4725
+ ...Sc,
4685
4726
  kind: F("webhook"),
4686
- ...hc
4727
+ ...vc
4687
4728
  }),
4688
4729
  j({
4689
- ...yc,
4730
+ ...Sc,
4690
4731
  kind: F("cron"),
4691
- cronTimes: gc
4732
+ cronTimes: yc
4692
4733
  }),
4693
4734
  j({
4694
- ...yc,
4735
+ ...Sc,
4695
4736
  kind: F("poll"),
4696
4737
  bindingId: z,
4697
4738
  config: N(z, B),
4698
4739
  definition: j({
4699
- ..._c,
4740
+ ...bc,
4700
4741
  type: F("poll")
4701
4742
  }),
4702
- pollTimes: gc
4743
+ pollTimes: yc
4703
4744
  }),
4704
4745
  j({
4705
- ...yc,
4746
+ ...Sc,
4706
4747
  kind: F("integration"),
4707
4748
  bindingId: z,
4708
4749
  config: N(z, B),
4709
4750
  definition: j({
4710
- ..._c,
4751
+ ...bc,
4711
4752
  type: F("integration"),
4712
- endpoint: vc
4753
+ endpoint: xc
4713
4754
  })
4714
4755
  })
4715
- ]), Sc = M([j({ kind: F("flow") }), j({
4756
+ ]), Tc = M([j({ kind: F("flow") }), j({
4716
4757
  kind: F("subflow"),
4717
4758
  id: z
4718
- })]), Cc = j({
4759
+ })]), Ec = j({
4719
4760
  source: z,
4720
4761
  target: z,
4721
4762
  sourceHandle: z.optional()
4722
4763
  }), H = {
4723
4764
  nodeId: z,
4724
- target: Sc
4725
- }, wc = j({
4765
+ target: Tc
4766
+ }, Dc = j({
4726
4767
  name: z,
4727
4768
  inputs: A(V),
4728
- outputs: A(ec.extend({ sources: A(M([nc, rc])) }))
4729
- }), Tc = j({
4730
- nodes: N(z, xc),
4731
- edges: A(Cc).default([])
4732
- }), Ec = j({
4769
+ outputs: A(rc.extend({ sources: A(M([ac, oc])) }))
4770
+ }), Oc = j({
4771
+ nodes: N(z, wc),
4772
+ edges: A(Ec).default([])
4773
+ }), kc = j({
4733
4774
  kind: P(["connection", "variable"]),
4734
4775
  target: z
4735
- }), Dc = j({
4776
+ }), Ac = j({
4736
4777
  name: z,
4737
- imports: $s,
4778
+ imports: nc,
4738
4779
  source: z
4739
- }), Oc = j({
4740
- bindings: N(z, Ec),
4741
- graph: Tc,
4742
- subflows: N(z, wc.extend({ graph: Tc })),
4743
- tasks: N(z, fc)
4780
+ }), jc = j({
4781
+ bindings: N(z, kc),
4782
+ graph: Oc,
4783
+ subflows: N(z, Dc.extend({ graph: Oc })),
4784
+ tasks: N(z, hc)
4744
4785
  });
4745
4786
  j({
4746
4787
  modelVersion: F(1),
4747
- document: Oc,
4748
- modules: N(z, Dc)
4788
+ document: jc,
4789
+ modules: N(z, Ac)
4749
4790
  }).extend({
4750
4791
  kind: F("open-flow-flow-revision"),
4751
4792
  version: F(1)
4752
4793
  });
4753
- var kc = {
4794
+ var Mc = {
4754
4795
  "binding.create": {
4755
4796
  bindingId: z,
4756
- binding: Ec
4797
+ binding: kc
4757
4798
  },
4758
4799
  "binding.delete": { bindingId: z },
4759
4800
  "binding.target.set": {
@@ -4762,16 +4803,16 @@ var kc = {
4762
4803
  value: z
4763
4804
  },
4764
4805
  "graph.edge.connect": {
4765
- target: Sc,
4766
- edge: Cc
4806
+ target: Tc,
4807
+ edge: Ec
4767
4808
  },
4768
4809
  "graph.edge.disconnect": {
4769
- target: Sc,
4770
- edge: Cc
4810
+ target: Tc,
4811
+ edge: Ec
4771
4812
  },
4772
4813
  "graph.node.create": {
4773
4814
  ...H,
4774
- node: xc
4815
+ node: wc
4775
4816
  },
4776
4817
  "graph.node.delete": H,
4777
4818
  "graph.node.field.set": M([j({
@@ -4794,8 +4835,8 @@ var kc = {
4794
4835
  "graph.node.input.set": {
4795
4836
  ...H,
4796
4837
  handle: z,
4797
- before: ac.optional(),
4798
- value: ac.optional()
4838
+ before: cc.optional(),
4839
+ value: cc.optional()
4799
4840
  },
4800
4841
  "graph.node.additional-inputs.set": {
4801
4842
  ...H,
@@ -4804,8 +4845,8 @@ var kc = {
4804
4845
  },
4805
4846
  "graph.node.condition.set": {
4806
4847
  ...H,
4807
- before: j(pc),
4808
- value: j(pc)
4848
+ before: j(gc),
4849
+ value: j(gc)
4809
4850
  },
4810
4851
  "graph.node.values.set": {
4811
4852
  ...H,
@@ -4815,19 +4856,19 @@ var kc = {
4815
4856
  "graph.node.wait.set": {
4816
4857
  ...H,
4817
4858
  target: j({ kind: F("flow") }),
4818
- before: j(mc),
4819
- value: j(mc)
4859
+ before: j(_c),
4860
+ value: j(_c)
4820
4861
  },
4821
4862
  "graph.node.webhook.set": {
4822
4863
  ...H,
4823
4864
  target: j({ kind: F("flow") }),
4824
- before: j(hc),
4825
- value: j(hc)
4865
+ before: j(vc),
4866
+ value: j(vc)
4826
4867
  },
4827
4868
  "graph.node.task.ports.set": {
4828
4869
  ...H,
4829
- before: j(sc),
4830
- value: j(sc)
4870
+ before: j(uc),
4871
+ value: j(uc)
4831
4872
  },
4832
4873
  "graph.node.task.name.set": {
4833
4874
  ...H,
@@ -4836,8 +4877,8 @@ var kc = {
4836
4877
  },
4837
4878
  "graph.node.task.capabilities.set": {
4838
4879
  ...H,
4839
- before: A(cc).optional(),
4840
- value: A(cc).optional()
4880
+ before: A(dc).optional(),
4881
+ value: A(dc).optional()
4841
4882
  },
4842
4883
  "graph.trigger.config.set": {
4843
4884
  nodeId: z,
@@ -4847,12 +4888,12 @@ var kc = {
4847
4888
  },
4848
4889
  "graph.trigger.schedule.set": {
4849
4890
  nodeId: z,
4850
- before: gc,
4851
- value: gc
4891
+ before: yc,
4892
+ value: yc
4852
4893
  },
4853
4894
  "module.create": {
4854
4895
  moduleId: z,
4855
- module: Dc
4896
+ module: Ac
4856
4897
  },
4857
4898
  "module.delete": { moduleId: z },
4858
4899
  "module.rename": {
@@ -4862,24 +4903,24 @@ var kc = {
4862
4903
  },
4863
4904
  "module.source.replace": {
4864
4905
  moduleId: z,
4865
- beforeImports: $s,
4906
+ beforeImports: nc,
4866
4907
  beforeSource: z,
4867
- imports: $s,
4908
+ imports: nc,
4868
4909
  source: z
4869
4910
  },
4870
4911
  "subflow.create": {
4871
4912
  subflowId: z,
4872
- subflow: wc.extend({ graph: Tc })
4913
+ subflow: Dc.extend({ graph: Oc })
4873
4914
  },
4874
4915
  "subflow.definition.set": {
4875
4916
  subflowId: z,
4876
- before: wc,
4877
- definition: wc
4917
+ before: Dc,
4918
+ definition: Dc
4878
4919
  },
4879
4920
  "subflow.delete": { subflowId: z },
4880
4921
  "task.create": {
4881
4922
  taskId: z,
4882
- task: fc
4923
+ task: hc
4883
4924
  },
4884
4925
  "task.delete": { taskId: z },
4885
4926
  "task.connector.connection.set": {
@@ -4889,8 +4930,8 @@ var kc = {
4889
4930
  },
4890
4931
  "task.agent.set": {
4891
4932
  taskId: z,
4892
- before: fc,
4893
- value: fc
4933
+ before: hc,
4934
+ value: hc
4894
4935
  },
4895
4936
  "task.llm.mode.set": {
4896
4937
  taskId: z,
@@ -4903,16 +4944,16 @@ var kc = {
4903
4944
  value: z
4904
4945
  }
4905
4946
  };
4906
- A(M([...new Map(Object.entries(kc).map(([e, t]) => [e, t instanceof T ? t : j({
4947
+ A(M([...new Map(Object.entries(Mc).map(([e, t]) => [e, t instanceof T ? t : j({
4907
4948
  kind: F(e),
4908
4949
  ...t
4909
4950
  })])).values()])).min(1), new TextEncoder();
4910
- var Ac = N(E(), rs()), jc = j({
4951
+ var Nc = N(E(), rs()), Pc = j({
4911
4952
  jsonSchema: rs(),
4912
4953
  nullable: k(),
4913
4954
  value: rs().optional(),
4914
4955
  description: E().optional()
4915
- }).strict(), Mc = N(E(), jc), Nc = M([j({
4956
+ }).strict(), Fc = N(E(), Pc), Ic = M([j({
4916
4957
  kind: F("value"),
4917
4958
  value: rs()
4918
4959
  }).strict(), j({
@@ -4922,36 +4963,36 @@ var Ac = N(E(), rs()), jc = j({
4922
4963
  nodeId: E(),
4923
4964
  output: E()
4924
4965
  }).strict())
4925
- }).strict()]), Pc = {
4966
+ }).strict()]), Lc = {
4926
4967
  name: E().optional(),
4927
4968
  description: E().optional(),
4928
4969
  icon: E().optional()
4929
- }, Fc = M([
4970
+ }, Rc = M([
4930
4971
  j({
4931
- ...Pc,
4972
+ ...Lc,
4932
4973
  kind: F("cron"),
4933
4974
  cronTimes: A(rs())
4934
4975
  }).strict(),
4935
4976
  j({
4936
- ...Pc,
4977
+ ...Lc,
4937
4978
  kind: F("manual")
4938
4979
  }).strict(),
4939
4980
  j({
4940
- ...Pc,
4981
+ ...Lc,
4941
4982
  kind: F("task"),
4942
4983
  concurrency: F(1).optional(),
4943
- inputs: N(E(), Nc),
4984
+ inputs: N(E(), Ic),
4944
4985
  task: j({
4945
4986
  name: E(),
4946
4987
  moduleId: E(),
4947
- inputs: Mc,
4948
- outputs: N(E(), jc.omit({ value: !0 }))
4988
+ inputs: Fc,
4989
+ outputs: N(E(), Pc.omit({ value: !0 }))
4949
4990
  }).strict()
4950
4991
  }).strict()
4951
4992
  ]);
4952
4993
  j({
4953
4994
  name: E(),
4954
- graph: j({ nodes: N(E(), Fc) }).strict()
4995
+ graph: j({ nodes: N(E(), Rc) }).strict()
4955
4996
  }).strict(), j({
4956
4997
  kind: F("open-flow-project-revision"),
4957
4998
  version: F(1),
@@ -4962,21 +5003,21 @@ j({
4962
5003
  imports: A(E())
4963
5004
  }).strict()),
4964
5005
  document: j({
4965
- bindings: Ac,
4966
- flows: Ac,
4967
- subflows: Ac,
4968
- tasks: Ac
5006
+ bindings: Nc,
5007
+ flows: Nc,
5008
+ subflows: Nc,
5009
+ tasks: Nc
4969
5010
  }).strict()
4970
5011
  }).strict();
4971
5012
  //#endregion
4972
5013
  //#region src/control/common/api.ts
4973
- function Ic(e) {
4974
- let t = Xs(e), n = Zs(t.sequence);
5014
+ function zc(e) {
5015
+ let t = Ys(e), n = Xs(t.sequence);
4975
5016
  if (n < 0) return L();
4976
5017
  let r = {
4977
5018
  createdAt: R(t.createdAt),
4978
5019
  sequence: n
4979
- }, i = Xs(t.payload), a = t.kind;
5020
+ }, i = Ys(t.payload), a = t.kind;
4980
5021
  switch (a) {
4981
5022
  case "run.queued": return {
4982
5023
  ...r,
@@ -4998,7 +5039,7 @@ function Ic(e) {
4998
5039
  payload: {
4999
5040
  flowId: R(i.flowId),
5000
5041
  scopeId: R(i.scopeId),
5001
- progress: Lc(i.progress)
5042
+ progress: Bc(i.progress)
5002
5043
  }
5003
5044
  };
5004
5045
  case "run.waiting": return {
@@ -5029,12 +5070,12 @@ function Ic(e) {
5029
5070
  case "run.indeterminate": return {
5030
5071
  ...r,
5031
5072
  kind: a,
5032
- payload: { result: Qs(i.result) }
5073
+ payload: { result: Zs(i.result) }
5033
5074
  };
5034
5075
  case "run.events-truncated": return {
5035
5076
  ...r,
5036
5077
  kind: a,
5037
- payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e, Qs(t)]))
5078
+ payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e, Zs(t)]))
5038
5079
  };
5039
5080
  case "node.started":
5040
5081
  case "node.completed":
@@ -5067,11 +5108,11 @@ function Ic(e) {
5067
5108
  kind: a,
5068
5109
  payload: {
5069
5110
  ...e,
5070
- outputs: Object.fromEntries(Object.entries(Xs(i.outputs)).map(([e, t]) => [e, Qs(t)]))
5111
+ outputs: Object.fromEntries(Object.entries(Ys(i.outputs)).map(([e, t]) => [e, Zs(t)]))
5071
5112
  }
5072
5113
  };
5073
5114
  case "node.failed": {
5074
- let t = Xs(i.error);
5115
+ let t = Ys(i.error);
5075
5116
  return {
5076
5117
  ...r,
5077
5118
  kind: a,
@@ -5101,11 +5142,11 @@ function Ic(e) {
5101
5142
  kind: a,
5102
5143
  payload: {
5103
5144
  ...e,
5104
- progress: Lc(i.progress)
5145
+ progress: Bc(i.progress)
5105
5146
  }
5106
5147
  };
5107
5148
  case "node.artifact": {
5108
- let t = Xs(i.artifact), n = Zs(t.size), o = R(t.digest);
5149
+ let t = Ys(i.artifact), n = Xs(t.size), o = R(t.digest);
5109
5150
  return t.kind != "artifact" || n < 0 || !/^sha256:[0-9a-f]{64}$/.test(o) ? L() : {
5110
5151
  ...r,
5111
5152
  kind: a,
@@ -5127,7 +5168,7 @@ function Ic(e) {
5127
5168
  default: return L();
5128
5169
  }
5129
5170
  }
5130
- function Lc(e) {
5171
+ function Bc(e) {
5131
5172
  return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : L();
5132
5173
  }
5133
5174
  //#endregion
@@ -5164,7 +5205,7 @@ function Z(e, t, n = {}) {
5164
5205
  headers: r
5165
5206
  }));
5166
5207
  }
5167
- function Rc(e, t, n) {
5208
+ function Vc(e, t, n) {
5168
5209
  return Z(e, "/v1/flows", {
5169
5210
  body: JSON.stringify({
5170
5211
  name: t,
@@ -5175,9 +5216,9 @@ function Rc(e, t, n) {
5175
5216
  });
5176
5217
  }
5177
5218
  async function Q(e, t, n) {
5178
- return Y(await Rc(e, t, n), 201, "Create Flow");
5219
+ return Y(await Vc(e, t, n), 201, "Create Flow");
5179
5220
  }
5180
- function zc(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
5221
+ function Hc(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
5181
5222
  return Z(e, `/v1/flows/${encodeURIComponent(t)}/draft/changes`, {
5182
5223
  body: JSON.stringify({
5183
5224
  expectedRevisionId: n,
@@ -5189,7 +5230,7 @@ function zc(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
5189
5230
  });
5190
5231
  }
5191
5232
  function $(e, t, n, r = "marker", i) {
5192
- return zc(e, t, n, [{
5233
+ return Hc(e, t, n, [{
5193
5234
  kind: "graph.node.create",
5194
5235
  node: {
5195
5236
  inputs: {},
@@ -5206,8 +5247,8 @@ function $(e, t, n, r = "marker", i) {
5206
5247
  target: { kind: "flow" }
5207
5248
  }], i);
5208
5249
  }
5209
- async function Bc(e, t, n) {
5210
- return Vc(await Y(await zc(e, t, n, [{
5250
+ async function Uc(e, t, n) {
5251
+ return Wc(await Y(await Hc(e, t, n, [{
5211
5252
  kind: "graph.node.create",
5212
5253
  node: {
5213
5254
  kind: "manual",
@@ -5217,10 +5258,10 @@ async function Bc(e, t, n) {
5217
5258
  target: { kind: "flow" }
5218
5259
  }]), 200, "Add manual trigger"), "Manual trigger Revision");
5219
5260
  }
5220
- function Vc(e, t) {
5261
+ function Wc(e, t) {
5221
5262
  return J(K(e.revision, `${t} revision`).revisionId, `${t} revisionId`);
5222
5263
  }
5223
- function Hc(e, t, n, r, i) {
5264
+ function Gc(e, t, n, r, i) {
5224
5265
  return Z(e, `/v1/flows/${encodeURIComponent(t)}/revisions/${encodeURIComponent(n)}/publications`, {
5225
5266
  body: JSON.stringify({
5226
5267
  engineContract: U,
@@ -5231,7 +5272,7 @@ function Hc(e, t, n, r, i) {
5231
5272
  method: "POST"
5232
5273
  });
5233
5274
  }
5234
- async function Uc(e, t, n, r) {
5275
+ async function Kc(e, t, n, r) {
5235
5276
  let i = await Y(t, n, r), a = J(i.operationId, `${r} operationId`);
5236
5277
  for (let t = 0; i.status == "pending" && t < 100; t += 1) await new Promise((e) => setTimeout(e, 10)), i = await Y(await Z(e, `/v1/flows/${J(i.flowId, `${r} flowId`)}/publish-operations/${a}`), 200, `${r} operation`);
5237
5278
  G(i.status, "succeeded", `${r} terminal status`);
@@ -5241,7 +5282,7 @@ async function Uc(e, t, n, r) {
5241
5282
  publication: s
5242
5283
  };
5243
5284
  }
5244
- function Wc(e, t, n, r, i) {
5285
+ function qc(e, t, n, r, i) {
5245
5286
  return Z(e, `/v1/flows/${encodeURIComponent(t)}/publications/${encodeURIComponent(n)}/rollback`, {
5246
5287
  body: JSON.stringify({
5247
5288
  expectedLivePublicationId: r,
@@ -5251,7 +5292,7 @@ function Wc(e, t, n, r, i) {
5251
5292
  method: "POST"
5252
5293
  });
5253
5294
  }
5254
- function Gc(e, t, n) {
5295
+ function Jc(e, t, n) {
5255
5296
  return Z(e, "/v1/runs", {
5256
5297
  body: JSON.stringify({
5257
5298
  inputs: {},
@@ -5266,11 +5307,11 @@ function Gc(e, t, n) {
5266
5307
  method: "POST"
5267
5308
  });
5268
5309
  }
5269
- var Kc = [
5310
+ var Yc = [
5270
5311
  {
5271
5312
  name: "admits simultaneous retries as one Run and preserves its Trigger identity",
5272
5313
  async verify(e) {
5273
- let t = await Q(e, "Concurrent Run", "concurrent-run-flow"), n = J(t.flowId, "Flow ID"), r = await Bc(e, n, J(t.draftRevisionId, "Revision ID")), i = (t = {}) => Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
5314
+ let t = await Q(e, "Concurrent Run", "concurrent-run-flow"), n = J(t.flowId, "Flow ID"), r = await Uc(e, n, J(t.draftRevisionId, "Revision ID")), i = (t = {}) => Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
5274
5315
  method: "POST",
5275
5316
  headers: { "idempotency-key": "concurrent-run" },
5276
5317
  body: JSON.stringify({
@@ -5302,7 +5343,7 @@ var Kc = [
5302
5343
  {
5303
5344
  name: "deduplicates simultaneous creation and lost-response retries",
5304
5345
  async verify(e) {
5305
- let t = await Promise.all(Array.from({ length: 4 }, () => Rc(e, "Concurrent Flow", "concurrent-create")));
5346
+ let t = await Promise.all(Array.from({ length: 4 }, () => Vc(e, "Concurrent Flow", "concurrent-create")));
5306
5347
  G(t.map((e) => e.status).toSorted(), [
5307
5348
  200,
5308
5349
  200,
@@ -5311,7 +5352,7 @@ var Kc = [
5311
5352
  ], "One creation commits");
5312
5353
  let n = await Promise.all(t.map((e) => e.json()));
5313
5354
  for (let e of n) G(e, n[0], "Concurrent replay identity");
5314
- G(await Y(await Rc(e, "Concurrent Flow", "concurrent-create"), 200, "Retry lost creation response"), n[0], "Lost-response replay"), await X(await Rc(e, "Different Flow", "concurrent-create"), 409, "flow.conflict", "Reject changed retry");
5355
+ G(await Y(await Vc(e, "Concurrent Flow", "concurrent-create"), 200, "Retry lost creation response"), n[0], "Lost-response replay"), await X(await Vc(e, "Different Flow", "concurrent-create"), 409, "flow.conflict", "Reject changed retry");
5315
5356
  }
5316
5357
  },
5317
5358
  {
@@ -5370,7 +5411,7 @@ var Kc = [
5370
5411
  name: "creates, replays, lists, reads, renames, and retires a Flow",
5371
5412
  async verify(e) {
5372
5413
  let t = await Q(e, "Control flow", "flow-lifecycle"), n = J(t.flowId, "Created Flow flowId"), r = J(t.draftRevisionId, "Created Flow draftRevisionId");
5373
- G(t.name, "Control flow", "Created Flow name"), G(t.status, "active", "Created Flow status"), G(await Y(await Rc(e, "Control flow", "flow-lifecycle"), 200, "Replay Flow"), t, "Replayed Flow"), await X(await Rc(e, "Different flow", "flow-lifecycle"), 409, "flow.conflict", "Conflicting Flow"), G(await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow"), t, "Read Flow");
5414
+ G(t.name, "Control flow", "Created Flow name"), G(t.status, "active", "Created Flow status"), G(await Y(await Vc(e, "Control flow", "flow-lifecycle"), 200, "Replay Flow"), t, "Replayed Flow"), await X(await Vc(e, "Different flow", "flow-lifecycle"), 409, "flow.conflict", "Conflicting Flow"), G(await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow"), t, "Read Flow");
5374
5415
  let i = await Y(await Z(e, "/v1/flows?includeTotal=true"), 200, "List Flows");
5375
5416
  G(i.flows, [t], "Listed Flows"), G(i.total, 1, "Flow total");
5376
5417
  let a = await Q(e, "Second control flow", "flow-lifecycle-second"), o = await Y(await Z(e, "/v1/flows?limit=1"), 200, "List first Flow page");
@@ -5388,8 +5429,8 @@ var Kc = [
5388
5429
  {
5389
5430
  name: "commits immutable Draft Revisions for one Flow",
5390
5431
  async verify(e) {
5391
- let t = await Q(e, "Draft flow", "draft-flow"), n = J(t.flowId, "Draft Flow flowId"), r = J(t.draftRevisionId, "Draft Flow revisionId"), i = await Y(await $(e, n, r, "marker", "draft-change"), 200, "Change Draft"), a = Vc(i, "Changed Draft");
5392
- G(K(i.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), G(await Y(await $(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), i, "Replayed Draft change"), await X(await $(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await X(await $(e, n, a, "marker"), 400, "flow.invalid", "Duplicate Draft Node", "A Node with this ID already exists"), await X(await zc(e, n, a, [{
5432
+ let t = await Q(e, "Draft flow", "draft-flow"), n = J(t.flowId, "Draft Flow flowId"), r = J(t.draftRevisionId, "Draft Flow revisionId"), i = await Y(await $(e, n, r, "marker", "draft-change"), 200, "Change Draft"), a = Wc(i, "Changed Draft");
5433
+ G(K(i.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), G(await Y(await $(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), i, "Replayed Draft change"), await X(await $(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await X(await $(e, n, a, "marker"), 400, "flow.invalid", "Duplicate Draft Node", "A Node with this ID already exists"), await X(await Hc(e, n, a, [{
5393
5434
  before: [{
5394
5435
  handle: "ready",
5395
5436
  jsonSchema: { type: "boolean" },
@@ -5424,7 +5465,7 @@ var Kc = [
5424
5465
  version: 1
5425
5466
  })
5426
5467
  }), 200, "Update editor Presentation"), a = await Y(await Z(e, `/v1/flows/${n}/editor`), 200, "Read editor");
5427
- G(a.version, 1, "Editor version"), G(K(a.flow, "Editor Flow").draftRevisionId, Vc(r, "Editor change"), "Editor Draft head");
5468
+ G(a.version, 1, "Editor version"), G(K(a.flow, "Editor Flow").draftRevisionId, Wc(r, "Editor change"), "Editor Draft head");
5428
5469
  for (let t of [
5429
5470
  "flow",
5430
5471
  "draft",
@@ -5474,7 +5515,7 @@ var Kc = [
5474
5515
  {
5475
5516
  name: "admits a Draft entry while unrelated branches remain invalid",
5476
5517
  async verify(e) {
5477
- let t = await Q(e, "Partial Draft", "partial-draft"), n = J(t.flowId, "Partial Flow identity"), r = Vc(await Y(await zc(e, n, await Bc(e, n, J(t.draftRevisionId, "Partial Draft identity")), [
5518
+ let t = await Q(e, "Partial Draft", "partial-draft"), n = J(t.flowId, "Partial Flow identity"), r = Wc(await Y(await Hc(e, n, await Uc(e, n, J(t.draftRevisionId, "Partial Draft identity")), [
5478
5519
  {
5479
5520
  kind: "graph.node.create",
5480
5521
  nodeId: "other",
@@ -5530,13 +5571,13 @@ var Kc = [
5530
5571
  version: 1
5531
5572
  })
5532
5573
  });
5533
- await Y(await a("start"), 202, "Run valid entry"), await X(await a("other"), 400, "flow.invalid", "Reject invalid entry branch"), await X(await Hc(e, n, r, null, "partial-publish"), 400, "flow.invalid", "Reject incomplete publication");
5574
+ await Y(await a("start"), 202, "Run valid entry"), await X(await a("other"), 400, "flow.invalid", "Reject invalid entry branch"), await X(await Gc(e, n, r, null, "partial-publish"), 400, "flow.invalid", "Reject incomplete publication");
5534
5575
  }
5535
5576
  },
5536
5577
  {
5537
5578
  name: "validates, admits, lists, and cancels one Draft Run",
5538
5579
  async verify(e) {
5539
- let t = await Q(e, "Run flow", "run-flow"), n = J(t.flowId, "Run Flow flowId"), r = await Bc(e, n, J(t.draftRevisionId, "Run Flow revisionId"));
5580
+ let t = await Q(e, "Run flow", "run-flow"), n = J(t.flowId, "Run Flow flowId"), r = await Uc(e, n, J(t.draftRevisionId, "Run Flow revisionId"));
5540
5581
  G((await Y(await Z(e, `/v1/flows/${n}/revisions/${r}/check`, {
5541
5582
  body: JSON.stringify({
5542
5583
  engineContract: U,
@@ -5619,7 +5660,7 @@ var Kc = [
5619
5660
  name: "pauses, resolves, resumes, and cancels waiting Draft Runs",
5620
5661
  runtime: !0,
5621
5662
  async verify(e) {
5622
- let t = await Q(e, "Wait flow", "wait-flow"), n = J(t.flowId, "Wait Flow flowId"), r = `/v1/flows/${n}/revisions/${Vc(await Y(await zc(e, n, await Bc(e, n, J(t.draftRevisionId, "Wait Flow revisionId")), [{
5663
+ let t = await Q(e, "Wait flow", "wait-flow"), n = J(t.flowId, "Wait Flow flowId"), r = `/v1/flows/${n}/revisions/${Wc(await Y(await Hc(e, n, await Uc(e, n, J(t.draftRevisionId, "Wait Flow revisionId")), [{
5623
5664
  kind: "graph.node.create",
5624
5665
  node: {
5625
5666
  actions: ["approve", "reject"],
@@ -5666,7 +5707,7 @@ var Kc = [
5666
5707
  let l = J(c.waitId, "Wait id");
5667
5708
  G(q((await Y(await Z(e, `/v1/flows/${n}/runs?status=waiting`), 200, "List waiting Runs")).runs, "Waiting Runs").map((e) => K(e, "Waiting Run").runId), [o], "Waiting Run list");
5668
5709
  let u = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read waiting Run events");
5669
- for (let e of q(u.events, "Run events")) Ic(e);
5710
+ for (let e of q(u.events, "Run events")) zc(e);
5670
5711
  G(u.done, !1, "Waiting events done"), q(u.events, "Waiting events").some((e) => K(e, "Waiting event").kind == "run.waiting") || W("Waiting Run must contain run.waiting."), await X(await Z(e, `/v1/runs/${o}/result`), 409, "run.not-terminal", "Read waiting Run result");
5671
5712
  let d = `/v1/runs/${o}/waits/${l}/resolve`, f = (t) => Z(e, d, {
5672
5713
  body: JSON.stringify({
@@ -5685,7 +5726,7 @@ var Kc = [
5685
5726
  let ee = await Y(await f("approve"), 200, "Replay approved Wait");
5686
5727
  G(ee.resolutionAccepted, !0, "Replayed resolution"), G(ee.status, "completed", "Replayed terminal status");
5687
5728
  let te = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read resumed Run events");
5688
- for (let e of q(te.events, "Run events")) Ic(e);
5729
+ for (let e of q(te.events, "Run events")) zc(e);
5689
5730
  G(q(te.events, "Completed events").filter((e) => K(e, "Completed event").kind == "run.resolved").length, 1, "Resolved event count");
5690
5731
  let ne = await i("wait-run-cancel", "Create cancelable Wait Run"), re = J(ne.runId, "Cancelable Wait Run id"), ie = ne;
5691
5732
  for (let t = 0; ie.status != "waiting" && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), ie = await Y(await Z(e, `/v1/runs/${re}`), 200, "Read cancelable Wait Run");
@@ -5740,11 +5781,11 @@ var Kc = [
5740
5781
  await X(await c(o, "unsupported-engine/v1", "unsupported-run"), 409, "engine.unsupported", "Run unsupported Engine"), await X(await c(n, U, "missing-revision-run"), 404, "flow.not-found", "Run missing Revision");
5741
5782
  }
5742
5783
  }
5743
- ], qc = [
5784
+ ], Xc = [
5744
5785
  {
5745
5786
  name: "controls Live admission independently from publishing and Draft testing",
5746
5787
  async verify(e) {
5747
- let t = await Q(e, "Enabled flow", "enabled-flow"), n = J(t.flowId, "Flow id"), r = await Bc(e, n, J(t.draftRevisionId, "Draft id")), i = (t, r) => Z(e, `/v1/flows/${n}/enabled`, {
5788
+ let t = await Q(e, "Enabled flow", "enabled-flow"), n = J(t.flowId, "Flow id"), r = await Uc(e, n, J(t.draftRevisionId, "Draft id")), i = (t, r) => Z(e, `/v1/flows/${n}/enabled`, {
5748
5789
  method: "PUT",
5749
5790
  body: JSON.stringify({
5750
5791
  enabled: t,
@@ -5753,12 +5794,12 @@ var Kc = [
5753
5794
  })
5754
5795
  });
5755
5796
  await X(await i(!0, "missing"), 409, "flow.conflict", "Cannot enable unpublished Flow");
5756
- let a = J((await Uc(e, await Hc(e, n, r, null, "enable-first"), 202, "Publish")).publication.publicationId, "Publication id"), o = await Y(await i(!1, a), 200, "Disable");
5797
+ let a = J((await Kc(e, await Gc(e, n, r, null, "enable-first"), 202, "Publish")).publication.publicationId, "Publication id"), o = await Y(await i(!1, a), 200, "Disable");
5757
5798
  G(o.live, {
5758
5799
  enabled: !1,
5759
5800
  publicationId: a,
5760
5801
  revisionId: r
5761
- }, "Disabled summary"), G((await Y(await Z(e, "/v1/flows"), 200, "List disabled Flow")).flows, [o], "List includes Live state"), G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status"), await X(await Gc(e, a, "disabled-run"), 412, "live.conflict", "Disabled Live rejects Run"), await Y(await Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
5802
+ }, "Disabled summary"), G((await Y(await Z(e, "/v1/flows"), 200, "List disabled Flow")).flows, [o], "List includes Live state"), G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status"), await X(await Jc(e, a, "disabled-run"), 412, "live.conflict", "Disabled Live rejects Run"), await Y(await Z(e, `/v1/flows/${n}/revisions/${r}/runs`, {
5762
5803
  method: "POST",
5763
5804
  headers: { "idempotency-key": "disabled-draft" },
5764
5805
  body: JSON.stringify({
@@ -5771,17 +5812,17 @@ var Kc = [
5771
5812
  version: 1
5772
5813
  })
5773
5814
  }), 202, "Disabled Flow permits Draft test");
5774
- let s = J((await Uc(e, await Hc(e, n, r, a, "enable-next"), 202, "Publish disabled Flow")).publication.publicationId, "Next Publication id");
5775
- G(K((await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow")).live, "Live").enabled, !1, "Publish preserves disabled state"), await X(await i(!0, a), 409, "flow.conflict", "Stale switch rejects"), await Y(await i(!0, s), 200, "Enable"), await Y(await Gc(e, s, "enabled-run"), 202, "Enabled Live accepts Run");
5815
+ let s = J((await Kc(e, await Gc(e, n, r, a, "enable-next"), 202, "Publish disabled Flow")).publication.publicationId, "Next Publication id");
5816
+ G(K((await Y(await Z(e, `/v1/flows/${n}`), 200, "Read Flow")).live, "Live").enabled, !1, "Publish preserves disabled state"), await X(await i(!0, a), 409, "flow.conflict", "Stale switch rejects"), await Y(await i(!0, s), 200, "Enable"), await Y(await Jc(e, s, "enabled-run"), 202, "Enabled Live accepts Run");
5776
5817
  }
5777
5818
  },
5778
5819
  {
5779
5820
  name: "publishes one immutable Flow with idempotent Live CAS",
5780
5821
  async verify(e) {
5781
- let t = await Q(e, "Publication flow", "publication-flow"), n = J(t.flowId, "Publication Flow flowId"), r = await Bc(e, n, J(t.draftRevisionId, "Publication Flow revisionId"));
5822
+ let t = await Q(e, "Publication flow", "publication-flow"), n = J(t.flowId, "Publication Flow flowId"), r = await Uc(e, n, J(t.draftRevisionId, "Publication Flow revisionId"));
5782
5823
  G((await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Read Live")).status, "not-published", "Initial Live status");
5783
- let i = () => Hc(e, n, r, null, "publication-first"), a = await Uc(e, await i(), 202, "Publish Flow"), o = a.publication, s = J(o.publicationId, "Publication id");
5784
- G(await Y(await i(), 202, "Replay Publish"), a.operation, "Replayed Publish operation"), await X(await Hc(e, n, r, s, "publication-first"), 409, "publication.conflict", "Conflicting replay");
5824
+ let i = () => Gc(e, n, r, null, "publication-first"), a = await Kc(e, await i(), 202, "Publish Flow"), o = a.publication, s = J(o.publicationId, "Publication id");
5825
+ G(await Y(await i(), 202, "Replay Publish"), a.operation, "Replayed Publish operation"), await X(await Gc(e, n, r, s, "publication-first"), 409, "publication.conflict", "Conflicting replay");
5785
5826
  let c = await Y(await Z(e, `/v1/flows/${n}/live`), 200, "Read published Live");
5786
5827
  G(c.publication, o, "Live Publication"), G((await Y(await Z(e, `/v1/flows/${n}/editor`), 200, "Read published editor")).live, c, "Published editor Live projection");
5787
5828
  let l = await Y(await Z(e, `/v1/flows/${n}/publications?includeTotal=true`), 200, "List Publications");
@@ -5793,21 +5834,21 @@ var Kc = [
5793
5834
  }),
5794
5835
  headers: { "idempotency-key": "unsupported-publication" },
5795
5836
  method: "POST"
5796
- }), 409, "engine.unsupported", "Publish unsupported Engine"), await X(await Hc(e, n, "00000000-0000-7000-8000-000000000002", s, "missing-revision-publication"), 404, "flow.not-found", "Publish missing Revision"), await X(await Wc(e, n, "00000000-0000-7000-8000-000000000004", s, "missing-rollback"), 404, "publication.not-found", "Rollback missing Publication"), await X(await Gc(e, "00000000-0000-7000-8000-000000000004", "missing-publication-run"), 404, "publication.not-found", "Run missing Publication");
5837
+ }), 409, "engine.unsupported", "Publish unsupported Engine"), await X(await Gc(e, n, "00000000-0000-7000-8000-000000000002", s, "missing-revision-publication"), 404, "flow.not-found", "Publish missing Revision"), await X(await qc(e, n, "00000000-0000-7000-8000-000000000004", s, "missing-rollback"), 404, "publication.not-found", "Rollback missing Publication"), await X(await Jc(e, "00000000-0000-7000-8000-000000000004", "missing-publication-run"), 404, "publication.not-found", "Run missing Publication");
5797
5838
  }
5798
5839
  },
5799
5840
  {
5800
5841
  name: "rolls back immutable history and fixes a Live Run target",
5801
5842
  async verify(e) {
5802
- let t = await Q(e, "Rollback flow", "rollback-flow"), n = J(t.flowId, "Rollback Flow flowId"), r = await Bc(e, n, J(t.draftRevisionId, "Rollback Flow revisionId")), i = (await Uc(e, await Hc(e, n, r, null, "publish-first"), 202, "Publish first Revision")).publication, a = J(i.publicationId, "First Publication"), o = (await Uc(e, await Hc(e, n, Vc(await Y(await $(e, n, r), 200, "Change Draft"), "Second Revision"), a, "publish-second"), 202, "Publish second Revision")).publication, s = J(o.publicationId, "Second Publication");
5803
- await X(await Gc(e, a, "stale-live-run"), 412, "live.conflict", "Run stale Publication");
5804
- let c = () => Wc(e, n, a, s, "rollback-first"), l = await Y(await c(), 201, "Rollback Flow"), u = J(l.publicationId, "Rollback Publication");
5843
+ let t = await Q(e, "Rollback flow", "rollback-flow"), n = J(t.flowId, "Rollback Flow flowId"), r = await Uc(e, n, J(t.draftRevisionId, "Rollback Flow revisionId")), i = (await Kc(e, await Gc(e, n, r, null, "publish-first"), 202, "Publish first Revision")).publication, a = J(i.publicationId, "First Publication"), o = (await Kc(e, await Gc(e, n, Wc(await Y(await $(e, n, r), 200, "Change Draft"), "Second Revision"), a, "publish-second"), 202, "Publish second Revision")).publication, s = J(o.publicationId, "Second Publication");
5844
+ await X(await Jc(e, a, "stale-live-run"), 412, "live.conflict", "Run stale Publication");
5845
+ let c = () => qc(e, n, a, s, "rollback-first"), l = await Y(await c(), 201, "Rollback Flow"), u = J(l.publicationId, "Rollback Publication");
5805
5846
  G(l.operation, "rollback", "Rollback operation"), G(l.sourcePublicationId, a, "Rollback source"), G(await Y(await c(), 200, "Replay Rollback"), l, "Replayed Rollback");
5806
- let d = await Y(await Gc(e, u, "rollback-run"), 202, "Create Live Run");
5807
- G(d.flowId, n, "Live Run flowId"), G(d.revisionId, r, "Live Run revisionId"), await Y(await Z(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await X(await Gc(e, u, "retired-run"), 409, "flow.busy", "Run retired Flow");
5847
+ let d = await Y(await Jc(e, u, "rollback-run"), 202, "Create Live Run");
5848
+ G(d.flowId, n, "Live Run flowId"), G(d.revisionId, r, "Live Run revisionId"), await Y(await Z(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await X(await Jc(e, u, "retired-run"), 409, "flow.busy", "Run retired Flow");
5808
5849
  }
5809
5850
  }
5810
- ], Jc = [{
5851
+ ], Zc = [{
5811
5852
  name: "exposes one deployment-scoped Trigger Key catalog",
5812
5853
  async verify(e) {
5813
5854
  let t = await Y(await Z(e, "/v1/trigger-keys"), 200, "List Trigger Keys"), n = await Y(await Z(e, "/v1/trigger-keys/catalog"), 200, "List Trigger definitions"), r = q(t.keys, "Trigger Keys").map((e) => K(e, "Trigger Key")), i = q(n.definitions, "Trigger definitions").map((e) => K(e, "Trigger definition"));
@@ -5821,7 +5862,7 @@ var Kc = [
5821
5862
  }, {
5822
5863
  name: "operates and retires one Live Trigger binding",
5823
5864
  async verify(e) {
5824
- let t = await Q(e, "Trigger flow", "trigger-flow"), n = J(t.flowId, "Trigger Flow flowId"), r = Vc(await Y(await zc(e, n, J(t.draftRevisionId, "Trigger Flow revisionId"), [{
5865
+ let t = await Q(e, "Trigger flow", "trigger-flow"), n = J(t.flowId, "Trigger Flow flowId"), r = Wc(await Y(await Hc(e, n, J(t.draftRevisionId, "Trigger Flow revisionId"), [{
5825
5866
  kind: "graph.node.create",
5826
5867
  node: {
5827
5868
  cronTimes: [{
@@ -5843,7 +5884,7 @@ var Kc = [
5843
5884
  },
5844
5885
  nodeId: "webhook",
5845
5886
  target: { kind: "flow" }
5846
- }]), 200, "Create Trigger nodes"), "Trigger Revision"), i = (await Uc(e, await Hc(e, n, r, null, "trigger-publication"), 202, "Publish Trigger Flow")).publication, a = J(i.publicationId, "Trigger Publication"), o = `/v1/flows/${n}/triggers`, s = q((await Y(await Z(e, o), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => K(e, "Trigger binding"));
5887
+ }]), 200, "Create Trigger nodes"), "Trigger Revision"), i = (await Kc(e, await Gc(e, n, r, null, "trigger-publication"), 202, "Publish Trigger Flow")).publication, a = J(i.publicationId, "Trigger Publication"), o = `/v1/flows/${n}/triggers`, s = q((await Y(await Z(e, o), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => K(e, "Trigger binding"));
5847
5888
  G(s.map((e) => e.triggerNodeId), ["cron", "webhook"], "Trigger binding order");
5848
5889
  for (let e of s) G(e.currentPublicationId, a, "Trigger Publication");
5849
5890
  let c = `${o}/webhook`, l = J(K((await Y(await Z(e, c), 200, "Read Webhook")).binding, "Webhook").endpointUrl, "Webhook endpoint"), u = (t) => Z(e, `${c}/${t}`, {
@@ -5859,13 +5900,13 @@ var Kc = [
5859
5900
  version: 1
5860
5901
  })
5861
5902
  });
5862
- await Y(await d(!1), 200, "Disable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Disabled Flow blocks callback"), await Y(await u("pause"), 200, "Pause binding while Flow disabled"), await Y(await d(!0), 200, "Enable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Enabling preserves binding pause"), await Y(await u("resume"), 200, "Resume binding after enabling Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 200, "Enabled Flow permits callback"), await Uc(e, await Hc(e, n, Vc(await Y(await zc(e, n, r, [{
5903
+ await Y(await d(!1), 200, "Disable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Disabled Flow blocks callback"), await Y(await u("pause"), 200, "Pause binding while Flow disabled"), await Y(await d(!0), 200, "Enable Trigger Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 404, "Enabling preserves binding pause"), await Y(await u("resume"), 200, "Resume binding after enabling Flow"), G((await e.request(new Request(l, { method: "POST" }))).status, 200, "Enabled Flow permits callback"), await Kc(e, await Gc(e, n, Wc(await Y(await Hc(e, n, r, [{
5863
5904
  kind: "graph.node.delete",
5864
5905
  nodeId: "webhook",
5865
5906
  target: { kind: "flow" }
5866
5907
  }]), 200, "Delete Webhook"), "Retired Trigger Revision"), a, "retire-trigger"), 202, "Publish retired Trigger"), G(K((await Y(await Z(e, c), 200, "Read retired Webhook")).binding, "Retired Webhook").currentPublicationId, void 0, "Retired Publication");
5867
5908
  }
5868
- }], Yc = [{
5909
+ }], Qc = [{
5869
5910
  name: "projects the deployment Connector catalog and authorized Connections",
5870
5911
  async verify(e) {
5871
5912
  let t = q((await Y(await Z(e, "/v1/connector/providers"), 200, "List Connector Providers")).providers, "Connector Providers").map((e) => K(e, "Connector Provider")), n = q((await Y(await Z(e, "/v1/connector/actions"), 200, "List Connector Actions")).actions, "Connector Actions").map((e) => K(e, "Connector Action"));
@@ -5885,12 +5926,12 @@ var Kc = [
5885
5926
  async verify(e) {
5886
5927
  await X(await Z(e, "/v1/connector/actions?service=mail&q=send"), 400, "flow.invalid", "Conflicting Connector query"), await X(await Z(e, "/v1/connector/actions?q=%20%20"), 400, "flow.invalid", "Empty Connector query"), await X(await Z(e, `/v1/connector/connections/${"a".repeat(257)}`), 400, "flow.invalid", "Oversized Connector service"), await X(await Z(e, "/v1/connector/actions/conformance.missing"), 404, "connector.action-not-found", "Missing Connector Action");
5887
5928
  }
5888
- }], Xc = [{
5929
+ }], $c = [{
5889
5930
  name: "preserves committed mutations and idempotency receipts after restart",
5890
5931
  async verify(e) {
5891
5932
  let t = await Q(e, "Recovery", "recovery-create"), n = J(t.flowId, "Flow ID"), r = J(t.draftRevisionId, "Revision ID"), i = await Y(await $(e, n, r, "marker", "recovery-change"), 200, "Commit change");
5892
- await e.restart(), G((await Y(await Rc(e, "Recovery", "recovery-create"), 200, "Replay creation after restart")).flowId, n, "Durable creation identity"), G(await Y(await $(e, n, r, "marker", "recovery-change"), 200, "Replay change after restart"), i, "Durable change receipt"), G((await Y(await Z(e, `/v1/flows/${n}/draft`), 200, "Recovered Draft")).revisionId, K(i.revision, "Revision").revisionId, "Recovered head");
5933
+ await e.restart(), G((await Y(await Vc(e, "Recovery", "recovery-create"), 200, "Replay creation after restart")).flowId, n, "Durable creation identity"), G(await Y(await $(e, n, r, "marker", "recovery-change"), 200, "Replay change after restart"), i, "Durable change receipt"), G((await Y(await Z(e, `/v1/flows/${n}/draft`), 200, "Recovered Draft")).revisionId, K(i.revision, "Revision").revisionId, "Recovered head");
5893
5934
  }
5894
5935
  }];
5895
5936
  //#endregion
5896
- export { Yc as connectorControlApiConformanceCases, Kc as controlApiConformanceCases, Xc as controlRecoveryConformanceCases, qc as publicationControlApiConformanceCases, Jc as triggerControlApiConformanceCases };
5937
+ export { Qc as connectorControlApiConformanceCases, Yc as controlApiConformanceCases, $c as controlRecoveryConformanceCases, Xc as publicationControlApiConformanceCases, Zc as triggerControlApiConformanceCases };