@oomol-lab/open-flow 0.1.0-beta.30 → 0.1.0-beta.31

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.
@@ -522,6 +522,7 @@ export declare const mcpTools: {
522
522
  runId: string;
523
523
  waitId: string;
524
524
  action: "approve" | "continue" | "reject";
525
+ comment?: string | null | undefined;
525
526
  };
526
527
  } | {
527
528
  issues: {
@@ -4341,14 +4341,14 @@ var ec = [
4341
4341
  "running",
4342
4342
  "starting",
4343
4343
  "waiting"
4344
- ];
4345
- function tc(e, t = 0) {
4344
+ ], tc = D().trim().refine((e) => [...e].length <= 2e3, "Wait comment must contain at most 2,000 Unicode code points.").nullable().optional();
4345
+ function nc(e, t = 0) {
4346
4346
  if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
4347
- if (typeof e == "object" && e) for (let n of Object.values(e)) tc(n, t + 1);
4347
+ if (typeof e == "object" && e) for (let n of Object.values(e)) nc(n, t + 1);
4348
4348
  }
4349
4349
  //#endregion
4350
4350
  //#region src/flow/common/triggerScheduleSchema.ts
4351
- var nc = j(P([M({
4351
+ var rc = j(P([M({
4352
4352
  type: L("cron"),
4353
4353
  expression: D(),
4354
4354
  timezone: D()
@@ -4362,38 +4362,38 @@ var nc = j(P([M({
4362
4362
  "week"
4363
4363
  ]),
4364
4364
  value: k()
4365
- })])), R = D(), z = Zs(), rc = j(R), ic = M({
4365
+ })])), R = D(), z = Zs(), ic = j(R), ac = M({
4366
4366
  description: R.optional(),
4367
4367
  jsonSchema: z,
4368
4368
  nullable: A(),
4369
4369
  handle: R
4370
- }), B = ic.extend({ value: z.optional() }), ac = M({
4370
+ }), B = ac.extend({ value: z.optional() }), oc = M({
4371
4371
  collapsed: A().optional(),
4372
4372
  group: R
4373
- }), oc = M({
4373
+ }), sc = M({
4374
4374
  kind: L("node"),
4375
4375
  nodeId: R,
4376
4376
  output: R
4377
- }), sc = M({
4377
+ }), cc = M({
4378
4378
  kind: L("flow"),
4379
4379
  input: R
4380
- }), cc = P([
4381
- oc,
4380
+ }), lc = P([
4382
4381
  sc,
4382
+ cc,
4383
4383
  M({
4384
4384
  kind: L("binding"),
4385
4385
  bindingId: R
4386
4386
  })
4387
- ]), lc = P([M({
4387
+ ]), uc = P([M({
4388
4388
  kind: L("value"),
4389
4389
  value: z
4390
4390
  }), M({
4391
4391
  kind: L("sources"),
4392
- sources: j(cc)
4393
- })]), uc = F(R, lc), dc = {
4394
- inputs: j(P([B, ac])),
4395
- outputs: j(P([ic, ac]))
4396
- }, fc = M({
4392
+ sources: j(lc)
4393
+ })]), dc = F(R, uc), fc = {
4394
+ inputs: j(P([B, oc])),
4395
+ outputs: j(P([ac, oc]))
4396
+ }, pc = M({
4397
4397
  kind: L("connector"),
4398
4398
  action: R,
4399
4399
  connectionId: R.optional(),
@@ -4401,19 +4401,19 @@ var nc = j(P([M({
4401
4401
  connectionId: R,
4402
4402
  alias: R.optional()
4403
4403
  }))
4404
- }), pc = M({
4405
- ...dc,
4404
+ }), mc = M({
4405
+ ...fc,
4406
4406
  name: R,
4407
4407
  moduleId: R,
4408
- capabilities: j(fc).optional()
4409
- }), mc = P([M({
4408
+ capabilities: j(pc).optional()
4409
+ }), hc = P([M({
4410
4410
  kind: L("value"),
4411
4411
  value: z
4412
4412
  }), M({
4413
4413
  kind: L("input"),
4414
4414
  input: R
4415
- })]), hc = P([mc, M({ kind: L("model") })]), gc = M({
4416
- ...dc,
4415
+ })]), gc = P([hc, M({ kind: L("model") })]), _c = M({
4416
+ ...fc,
4417
4417
  name: R,
4418
4418
  executor: P([
4419
4419
  M({
@@ -4429,7 +4429,7 @@ var nc = j(P([M({
4429
4429
  kind: L("agent"),
4430
4430
  code: A().optional(),
4431
4431
  model: R,
4432
- prompt: mc,
4432
+ prompt: hc,
4433
4433
  system: R,
4434
4434
  maxRounds: k(),
4435
4435
  tools: j(M({
@@ -4439,16 +4439,16 @@ var nc = j(P([M({
4439
4439
  action: R,
4440
4440
  connectionId: R.optional(),
4441
4441
  approval: A(),
4442
- inputs: j(B.extend({ source: hc }))
4442
+ inputs: j(B.extend({ source: gc }))
4443
4443
  })),
4444
4444
  notification: M({
4445
4445
  taskId: R,
4446
4446
  messageHandle: R,
4447
- inputs: F(R, mc)
4447
+ inputs: F(R, hc)
4448
4448
  }).optional()
4449
4449
  })
4450
4450
  ])
4451
- }), _c = {
4451
+ }), vc = {
4452
4452
  input: B,
4453
4453
  cases: j(M({
4454
4454
  output: R,
@@ -4481,26 +4481,29 @@ var nc = j(P([M({
4481
4481
  }))
4482
4482
  })),
4483
4483
  defaultOutput: R.optional()
4484
- }, vc = { prompt: R }, yc = {
4484
+ }, yc = {
4485
+ inputDefinitions: j(B),
4486
+ prompt: R
4487
+ }, bc = {
4485
4488
  bodyFields: j(B),
4486
4489
  options: M({
4487
- allowedMethods: rc.optional(),
4488
- allowedOrigins: rc.optional(),
4490
+ allowedMethods: ic.optional(),
4491
+ allowedOrigins: ic.optional(),
4489
4492
  noResponseBody: A().optional(),
4490
4493
  responseData: R.optional(),
4491
4494
  responseHeaders: F(R, R).optional(),
4492
4495
  responseStatusCode: k().optional()
4493
4496
  }).optional()
4494
- }, bc = {
4497
+ }, xc = {
4495
4498
  configSchema: z,
4496
4499
  definitionVersion: L(2),
4497
4500
  description: R,
4498
4501
  displayName: R,
4499
4502
  key: R,
4500
4503
  name: R,
4501
- outputs: j(ic).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4504
+ outputs: j(ac).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4502
4505
  provider: R
4503
- }, xc = M({
4506
+ }, Sc = M({
4504
4507
  body: M({
4505
4508
  allowArray: A(),
4506
4509
  allowEmpty: A(),
@@ -4520,139 +4523,137 @@ var nc = j(P([M({
4520
4523
  "PUT"
4521
4524
  ])),
4522
4525
  successStatus: k()
4523
- }), Sc = {
4526
+ }), Cc = {
4524
4527
  name: R,
4525
4528
  description: R.optional(),
4526
4529
  icon: R.optional()
4527
- }, Cc = {
4530
+ }, wc = {
4528
4531
  maxExecutions: k().int().positive().max(2 ** 53 - 1).optional(),
4529
- inputs: uc,
4532
+ inputs: dc,
4530
4533
  name: R.optional(),
4531
4534
  description: R.optional(),
4532
4535
  icon: R.optional(),
4533
4536
  timeoutMs: k().optional()
4534
- }, wc = P([
4537
+ }, Tc = P([
4535
4538
  M({
4536
- ...Cc,
4539
+ ...wc,
4537
4540
  kind: L("condition"),
4538
- ..._c
4541
+ ...vc
4539
4542
  }),
4540
4543
  M({
4541
- ...Cc,
4544
+ ...wc,
4542
4545
  inputs: ps().transform(() => ({})).default({}),
4543
4546
  kind: L("value"),
4544
4547
  values: j(B)
4545
4548
  }),
4546
4549
  M({
4547
- ...Cc,
4550
+ ...wc,
4548
4551
  kind: L("subflow"),
4549
4552
  subflowId: R
4550
4553
  }),
4551
4554
  M({
4552
- ...Cc,
4555
+ ...wc,
4553
4556
  kind: L("task"),
4554
- task: pc,
4557
+ task: mc,
4555
4558
  additionalInputs: j(B).optional()
4556
4559
  }),
4557
4560
  M({
4558
- ...Cc,
4561
+ ...wc,
4559
4562
  kind: L("task"),
4560
4563
  taskId: R,
4561
4564
  additionalInputs: j(B).optional()
4562
4565
  }),
4563
4566
  N({
4564
- ...Cc,
4567
+ ...wc,
4565
4568
  kind: L("approval"),
4566
- input: B,
4567
- ...vc
4569
+ ...yc
4568
4570
  }).omit({ timeoutMs: !0 }),
4569
4571
  N({
4570
- ...Cc,
4572
+ ...wc,
4571
4573
  kind: L("wait"),
4572
- input: B,
4573
- ...vc
4574
+ ...yc
4574
4575
  }).omit({ timeoutMs: !0 }),
4575
4576
  M({
4576
- ...Sc,
4577
+ ...Cc,
4577
4578
  kind: L("manual")
4578
4579
  }),
4579
4580
  M({
4580
- ...Sc,
4581
+ ...Cc,
4581
4582
  kind: L("webhook"),
4582
- ...yc
4583
+ ...bc
4583
4584
  }),
4584
4585
  M({
4585
- ...Sc,
4586
+ ...Cc,
4586
4587
  kind: L("cron"),
4587
- cronTimes: nc
4588
+ cronTimes: rc
4588
4589
  }),
4589
4590
  M({
4590
- ...Sc,
4591
+ ...Cc,
4591
4592
  kind: L("poll"),
4592
4593
  bindingId: R,
4593
4594
  config: F(R, z),
4594
4595
  definition: M({
4595
- ...bc,
4596
+ ...xc,
4596
4597
  type: L("poll")
4597
4598
  }),
4598
- pollTimes: nc
4599
+ pollTimes: rc
4599
4600
  }),
4600
4601
  M({
4601
- ...Sc,
4602
+ ...Cc,
4602
4603
  kind: L("integration"),
4603
4604
  bindingId: R,
4604
4605
  config: F(R, z),
4605
4606
  definition: M({
4606
- ...bc,
4607
+ ...xc,
4607
4608
  type: L("integration"),
4608
- endpoint: xc
4609
+ endpoint: Sc
4609
4610
  })
4610
4611
  })
4611
- ]), Tc = P([M({ kind: L("flow") }), M({
4612
+ ]), Ec = P([M({ kind: L("flow") }), M({
4612
4613
  kind: L("subflow"),
4613
4614
  id: R
4614
- })]), Ec = M({
4615
+ })]), Dc = M({
4615
4616
  source: R,
4616
4617
  target: R,
4617
4618
  sourceHandle: R.optional()
4618
4619
  }), V = {
4619
4620
  nodeId: R,
4620
- target: Tc
4621
- }, Dc = M({
4621
+ target: Ec
4622
+ }, Oc = M({
4622
4623
  name: R,
4623
4624
  inputs: j(B),
4624
- outputs: j(ic.extend({ sources: j(P([oc, sc])) }))
4625
- }), Oc = M({
4626
- nodes: F(R, wc),
4627
- edges: j(Ec).default([])
4625
+ outputs: j(ac.extend({ sources: j(P([sc, cc])) }))
4628
4626
  }), kc = M({
4627
+ nodes: F(R, Tc),
4628
+ edges: j(Dc).default([])
4629
+ }), Ac = M({
4629
4630
  kind: I(["connection", "variable"]),
4630
4631
  target: R
4631
- }), Ac = M({
4632
+ }), jc = M({
4632
4633
  name: R,
4633
- imports: rc,
4634
+ imports: ic,
4634
4635
  source: R
4635
- }), jc = M({
4636
- bindings: F(R, kc),
4637
- graph: Oc,
4638
- subflows: F(R, Dc.extend({ graph: Oc })),
4639
- tasks: F(R, gc)
4640
4636
  }), Mc = M({
4637
+ bindings: F(R, Ac),
4638
+ graph: kc,
4639
+ subflows: F(R, Oc.extend({ graph: kc })),
4640
+ tasks: F(R, _c)
4641
+ }), Nc = M({
4641
4642
  modelVersion: P([L(2), L(3)]),
4642
- document: jc,
4643
- modules: F(R, Ac)
4644
- }), Nc = Mc.extend({ modelVersion: L(3) });
4645
- Mc.extend({
4643
+ document: Mc,
4644
+ modules: F(R, jc)
4645
+ });
4646
+ Nc.extend({
4646
4647
  kind: L("open-flow-flow-revision"),
4647
4648
  version: L(1)
4648
4649
  });
4649
4650
  function Pc(e) {
4650
- return tc(e), Nc.parse(e);
4651
+ return nc(e), Nc.parse(e);
4651
4652
  }
4652
4653
  var Fc = {
4653
4654
  "binding.create": {
4654
4655
  bindingId: R,
4655
- binding: kc
4656
+ binding: Ac
4656
4657
  },
4657
4658
  "binding.delete": { bindingId: R },
4658
4659
  "binding.target.set": {
@@ -4661,16 +4662,16 @@ var Fc = {
4661
4662
  value: R
4662
4663
  },
4663
4664
  "graph.edge.connect": {
4664
- target: Tc,
4665
- edge: Ec
4665
+ target: Ec,
4666
+ edge: Dc
4666
4667
  },
4667
4668
  "graph.edge.disconnect": {
4668
- target: Tc,
4669
- edge: Ec
4669
+ target: Ec,
4670
+ edge: Dc
4670
4671
  },
4671
4672
  "graph.node.create": {
4672
4673
  ...V,
4673
- node: wc
4674
+ node: Tc
4674
4675
  },
4675
4676
  "graph.node.delete": V,
4676
4677
  "graph.node.field.set": P([
@@ -4703,8 +4704,8 @@ var Fc = {
4703
4704
  "graph.node.input.set": {
4704
4705
  ...V,
4705
4706
  handle: R,
4706
- before: lc.optional(),
4707
- value: lc.optional()
4707
+ before: uc.optional(),
4708
+ value: uc.optional()
4708
4709
  },
4709
4710
  "graph.node.additional-inputs.set": {
4710
4711
  ...V,
@@ -4713,8 +4714,8 @@ var Fc = {
4713
4714
  },
4714
4715
  "graph.node.condition.set": {
4715
4716
  ...V,
4716
- before: M(_c),
4717
- value: M(_c)
4717
+ before: M(vc),
4718
+ value: M(vc)
4718
4719
  },
4719
4720
  "graph.node.values.set": {
4720
4721
  ...V,
@@ -4724,19 +4725,19 @@ var Fc = {
4724
4725
  "graph.node.resolution.set": {
4725
4726
  ...V,
4726
4727
  target: M({ kind: L("flow") }),
4727
- before: M(vc),
4728
- value: M(vc)
4728
+ before: M(yc),
4729
+ value: M(yc)
4729
4730
  },
4730
4731
  "graph.node.webhook.set": {
4731
4732
  ...V,
4732
4733
  target: M({ kind: L("flow") }),
4733
- before: M(yc),
4734
- value: M(yc)
4734
+ before: M(bc),
4735
+ value: M(bc)
4735
4736
  },
4736
4737
  "graph.node.task.ports.set": {
4737
4738
  ...V,
4738
- before: M(dc),
4739
- value: M(dc)
4739
+ before: M(fc),
4740
+ value: M(fc)
4740
4741
  },
4741
4742
  "graph.node.task.name.set": {
4742
4743
  ...V,
@@ -4745,8 +4746,8 @@ var Fc = {
4745
4746
  },
4746
4747
  "graph.node.task.capabilities.set": {
4747
4748
  ...V,
4748
- before: j(fc).optional(),
4749
- value: j(fc).optional()
4749
+ before: j(pc).optional(),
4750
+ value: j(pc).optional()
4750
4751
  },
4751
4752
  "graph.trigger.config.set": {
4752
4753
  nodeId: R,
@@ -4756,12 +4757,12 @@ var Fc = {
4756
4757
  },
4757
4758
  "graph.trigger.schedule.set": {
4758
4759
  nodeId: R,
4759
- before: nc,
4760
- value: nc
4760
+ before: rc,
4761
+ value: rc
4761
4762
  },
4762
4763
  "module.create": {
4763
4764
  moduleId: R,
4764
- module: Ac
4765
+ module: jc
4765
4766
  },
4766
4767
  "module.delete": { moduleId: R },
4767
4768
  "module.rename": {
@@ -4771,24 +4772,24 @@ var Fc = {
4771
4772
  },
4772
4773
  "module.source.replace": {
4773
4774
  moduleId: R,
4774
- beforeImports: rc,
4775
+ beforeImports: ic,
4775
4776
  beforeSource: R,
4776
- imports: rc,
4777
+ imports: ic,
4777
4778
  source: R
4778
4779
  },
4779
4780
  "subflow.create": {
4780
4781
  subflowId: R,
4781
- subflow: Dc.extend({ graph: Oc })
4782
+ subflow: Oc.extend({ graph: kc })
4782
4783
  },
4783
4784
  "subflow.definition.set": {
4784
4785
  subflowId: R,
4785
- before: Dc,
4786
- definition: Dc
4786
+ before: Oc,
4787
+ definition: Oc
4787
4788
  },
4788
4789
  "subflow.delete": { subflowId: R },
4789
4790
  "task.create": {
4790
4791
  taskId: R,
4791
- task: gc
4792
+ task: _c
4792
4793
  },
4793
4794
  "task.delete": { taskId: R },
4794
4795
  "task.connector.connection.set": {
@@ -4798,8 +4799,8 @@ var Fc = {
4798
4799
  },
4799
4800
  "task.agent.set": {
4800
4801
  taskId: R,
4801
- before: gc,
4802
- value: gc
4802
+ before: _c,
4803
+ value: _c
4803
4804
  },
4804
4805
  "task.llm.mode.set": {
4805
4806
  taskId: R,
@@ -5774,6 +5775,7 @@ function nu(e) {
5774
5775
  let t = W(e);
5775
5776
  K(t, [
5776
5777
  "action",
5778
+ "comment",
5777
5779
  "resolutionAccepted",
5778
5780
  "resolvedAt",
5779
5781
  "runId",
@@ -5782,8 +5784,9 @@ function nu(e) {
5782
5784
  "waitId"
5783
5785
  ]);
5784
5786
  let n = t.action, r = t.resolvedAt;
5785
- return t.version != 1 || typeof t.resolutionAccepted != "boolean" || n !== null && n != "approve" && n != "continue" && n != "reject" || r !== null && typeof r != "string" || n === null != (r === null) || t.resolutionAccepted && n === null ? U() : {
5787
+ return t.version != 1 || typeof t.resolutionAccepted != "boolean" || t.comment !== null && typeof t.comment != "string" || n !== null && n != "approve" && n != "continue" && n != "reject" || r !== null && typeof r != "string" || n === null != (r === null) || t.resolutionAccepted && n === null ? U() : {
5786
5788
  action: n,
5789
+ comment: t.comment,
5787
5790
  resolutionAccepted: t.resolutionAccepted,
5788
5791
  resolvedAt: r,
5789
5792
  runId: G(t.runId),
@@ -5900,11 +5903,12 @@ function au(e) {
5900
5903
  };
5901
5904
  case "run.resolved": {
5902
5905
  let e = i.action;
5903
- return e !== "approve" && e !== "continue" && e !== "reject" ? U() : {
5906
+ return e !== "approve" && e !== "continue" && e !== "reject" || i.comment !== null && typeof i.comment != "string" ? U() : {
5904
5907
  ...r,
5905
5908
  kind: a,
5906
5909
  payload: {
5907
5910
  action: e,
5911
+ comment: i.comment,
5908
5912
  resolvedAt: G(i.resolvedAt),
5909
5913
  waitId: G(i.waitId)
5910
5914
  }
@@ -6412,10 +6416,11 @@ var lu = class {
6412
6416
  method: "POST"
6413
6417
  }));
6414
6418
  }
6415
- async resolveRunWait(e, t, n) {
6419
+ async resolveRunWait(e, t, n, r) {
6416
6420
  return nu(await this.request(`/v1/runs/${Y(e)}/waits/${Y(t)}/resolve`, {
6417
6421
  body: JSON.stringify({
6418
6422
  action: n,
6423
+ comment: r,
6419
6424
  version: 1
6420
6425
  }),
6421
6426
  method: "POST"
@@ -6702,14 +6707,15 @@ var vu = {
6702
6707
  runId: gu,
6703
6708
  resultId: Z
6704
6709
  }), !0),
6705
- 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({
6710
+ run_resolve_wait: $("Explicitly resolve the waitId observed in run_get with one of its allowed actions. Optional comment records the reason (up to 2,000 Unicode code points). The first decision and comment win; inspect resolutionAccepted and action. Resume the same Run and poll run_get; do not create a replacement Run.", N({
6706
6711
  runId: gu,
6707
6712
  waitId: Z,
6708
6713
  action: I([
6709
6714
  "approve",
6710
6715
  "continue",
6711
6716
  "reject"
6712
- ])
6717
+ ]),
6718
+ comment: tc
6713
6719
  }), !1),
6714
6720
  run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", N({ runId: gu }), !1),
6715
6721
  connector_teams: $("List OOMOL Teams available for Flow creation. An unconfigured or custom Connector may not provide Teams.", N({}), !0),