@oomol-lab/open-flow 0.1.0-beta.85 → 0.1.0-beta.87

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 (102) hide show
  1. package/dist/browser/{FlowCanvas-CZoHhB1y.js → FlowCanvas-SqPUBqze.js} +3 -3
  2. package/dist/browser/{createResourceDialog-Bi4fUnbD.js → createResourceDialog-CB3eiK7e.js} +3 -3
  3. package/dist/browser/{dialog-BzoSxhXQ.js → dialog-Bi-MVTGj.js} +291 -143
  4. package/dist/browser/{exportPng-CXVWVlLc.js → exportPng-CLZKdNzR.js} +2 -2
  5. package/dist/browser/{flowChanges-C567g-Pc.js → flowChanges-azhepfr-.js} +375 -83
  6. package/dist/browser/{flowWorkspace-BNdBKtla.js → flowWorkspace-Cs2ZGBYK.js} +1619 -475
  7. package/dist/browser/fr-CNTSedYU.js +593 -0
  8. package/dist/browser/ja-CxQBHr2J.js +593 -0
  9. package/dist/browser/ko-D1Exiv1h.js +593 -0
  10. package/dist/browser/licenses.md +1 -1
  11. package/dist/browser/{markdownContent-DF39sd9T.js → markdownContent-D0BBrFcF.js} +1 -1
  12. package/dist/browser/preview.css +193 -191
  13. package/dist/browser/preview.js +1997 -624
  14. package/dist/browser/ru-BzLZv0B7.js +593 -0
  15. package/dist/browser/theme.css +3 -1
  16. package/dist/browser/{tooltip-DGj5pudg.js → tooltip-BZ6tpqnr.js} +58 -24
  17. package/dist/browser/ui.css +12 -10
  18. package/dist/browser/ui.d.ts +1 -0
  19. package/dist/browser/ui.js +110 -63
  20. package/dist/browser/workbench.css +193 -191
  21. package/dist/browser/workbench.js +86 -17
  22. package/dist/browser/{workbenchSelect-BIaEVTx6.js → workbenchSelect-CHOeceKA.js} +2 -2
  23. package/dist/browser/{wrapLayout-C4moMKgb.js → wrapLayout-BB_qwy3k.js} +1 -1
  24. package/dist/browser/zh-CN-Dg_xSGde.js +593 -0
  25. package/dist/browser/zh-TW-oxuLwsV0.js +593 -0
  26. package/dist/command/index.js +61 -57
  27. package/dist/command/licenses.md +28 -4
  28. package/dist/common/authoring.d.ts +5 -5
  29. package/dist/common/authoringExamples.d.ts +3 -2
  30. package/dist/common/authoringSchema.d.ts +41 -4
  31. package/dist/common/catalogCache.d.ts +46 -0
  32. package/dist/common/connector-action.js +13 -10
  33. package/dist/common/connector-proxy.d.ts +96 -0
  34. package/dist/common/connector-proxy.js +5209 -0
  35. package/dist/common/control-api-conformance.js +312 -46
  36. package/dist/common/control-api.d.ts +12 -1
  37. package/dist/common/control-api.js +303 -41
  38. package/dist/common/control-requests.d.ts +4 -3
  39. package/dist/common/control-requests.js +14111 -171
  40. package/dist/common/engine-contract.d.ts +3 -2
  41. package/dist/common/event-source.js +55 -23
  42. package/dist/common/flow-authoring-node.d.ts +2 -0
  43. package/dist/common/flow-authoring.js +6936 -6781
  44. package/dist/common/flow-change-schema.d.ts +1 -1
  45. package/dist/common/flow-change.d.ts +2 -2
  46. package/dist/common/flow-change.js +91 -36
  47. package/dist/common/flow-connectionUsage.d.ts +1 -1
  48. package/dist/common/flow-encoding.js +93 -38
  49. package/dist/common/flow-requestParameters.d.ts +34 -0
  50. package/dist/common/flow-semantics.js +9429 -9236
  51. package/dist/common/flow-state.js +55 -23
  52. package/dist/common/flow-workflowFile.d.ts +3 -1
  53. package/dist/common/http-request.d.ts +6 -11
  54. package/dist/common/http-request.js +192 -141
  55. package/dist/common/licenses.md +1 -1
  56. package/dist/common/mcp.d.ts +3 -3
  57. package/dist/common/mcp.js +303 -41
  58. package/dist/common/run-events.js +1 -0
  59. package/dist/common/runtime-contract.js +10 -4
  60. package/dist/common/runtime-nodejs-compat.js +55 -23
  61. package/dist/common/scheduler-checkpoint.d.ts +3 -3
  62. package/dist/common/scheduler-dependencies.d.ts +22 -28
  63. package/dist/common/scheduler-node-execution.d.ts +1 -0
  64. package/dist/common/scheduler.d.ts +8 -2
  65. package/dist/common/scheduler.js +274 -95
  66. package/dist/common/workflow.js +51 -19
  67. package/dist/common/workflowAuthoring.d.ts +411 -0
  68. package/dist/render/browser/licenses.md +1 -1
  69. package/dist/render/browser/runtime.css +12 -10
  70. package/dist/render/browser/runtime.js +183 -49
  71. package/dist/render/node/index.js +85 -30
  72. package/dist/render/node/licenses.md +1 -1
  73. package/package.json +1 -1
  74. package/skills/open-flow/references/flow-authoring.md +14 -13
  75. package/src/base/common/jsonSchema.ts +11 -0
  76. package/src/connector/common/actionSchema.ts +4 -11
  77. package/src/connector/common/proxy.ts +152 -0
  78. package/src/control/common/api.ts +99 -3
  79. package/src/control/common/authoring.ts +23 -9
  80. package/src/control/common/authoringExamples.ts +9 -0
  81. package/src/control/common/authoringSchema.ts +21 -12
  82. package/src/control/common/catalogCache.ts +145 -0
  83. package/src/control/common/conformance.ts +9 -3
  84. package/src/control/common/connectorQueries.ts +17 -2
  85. package/src/control/common/requests.ts +1 -0
  86. package/src/control/common/workflowAuthoring.ts +120 -0
  87. package/src/execution/common/checkpoint.ts +18 -12
  88. package/src/execution/common/dependencies.ts +132 -15
  89. package/src/execution/common/events.ts +3 -0
  90. package/src/execution/common/node-execution.ts +22 -15
  91. package/src/execution/common/scheduler.ts +20 -31
  92. package/src/flow/common/change.ts +2 -1
  93. package/src/flow/common/changeSchema.ts +11 -1
  94. package/src/flow/common/connectionUsage.ts +4 -2
  95. package/src/flow/common/errorHandling.ts +3 -1
  96. package/src/flow/common/nodeChanges.ts +35 -18
  97. package/src/flow/common/requestParameters.ts +120 -0
  98. package/src/flow/common/semantics.ts +51 -1
  99. package/src/flow/common/sourceField.ts +3 -2
  100. package/src/flow/common/workflowFile.ts +2 -2
  101. package/src/http/common/httpRequest.ts +28 -78
  102. package/src/runtime/common/engineContract.ts +6 -3
@@ -40257,6 +40257,7 @@ var cva = (base, config) => (props) => {
40257
40257
  //#region src/ui/browser/button.tsx
40258
40258
  var buttonVariants = cva("nodrag group/button relative inline-flex shrink-0 items-center justify-center rounded-[var(--ui-control-radius,calc(var(--ui-radius)_+_2px))] border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap no-underline transition-[color,background-color,border-color,box-shadow,opacity,transform] outline-none select-none before:absolute before:inset-0 before:content-[''] motion-reduce:transition-none focus-visible:border-border focus-visible:outline-2 focus-visible:outline-solid focus-visible:ring-0 focus-visible:aria-invalid:ring-0 focus-visible:outline-offset-1 focus-visible:outline-ring focus-visible:aria-invalid:outline-destructive active:not-aria-[haspopup]:not-data-[variant=field]:translate-y-px disabled:pointer-events-none disabled:opacity-[var(--ui-disabled-opacity,0.5)] aria-disabled:pointer-events-none aria-disabled:opacity-[var(--ui-disabled-opacity,0.5)] aria-invalid:border-destructive [&_svg]:pointer-events-none [&_i[aria-hidden=true]]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
40259
40259
  variants: {
40260
+ multiline: { true: "min-h-min whitespace-normal wrap-anywhere text-center" },
40260
40261
  variant: {
40261
40262
  "default": "bg-primary text-primary-foreground hover:bg-primary/80",
40262
40263
  "outline": "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-[var(--ui-disabled-background,color-mix(in_srgb,var(--ui-input)_50%,transparent))]",
@@ -40285,7 +40286,7 @@ var buttonVariants = cva("nodrag group/button relative inline-flex shrink-0 item
40285
40286
  size: "default"
40286
40287
  }
40287
40288
  });
40288
- var Button$1 = forwardRef(function Button({ className, variant = "default", size = "default", ...props }, ref) {
40289
+ var Button$1 = forwardRef(function Button({ className, variant = "default", size = "default", multiline, ...props }, ref) {
40289
40290
  return /* @__PURE__ */ jsx(Button$2, {
40290
40291
  ref,
40291
40292
  "data-slot": "button",
@@ -40294,6 +40295,7 @@ var Button$1 = forwardRef(function Button({ className, variant = "default", size
40294
40295
  className: cn$1(buttonVariants({
40295
40296
  variant,
40296
40297
  size,
40298
+ multiline,
40297
40299
  className
40298
40300
  })),
40299
40301
  ...props
@@ -48188,7 +48190,7 @@ function getAddItemId(dataTransfer) {
48188
48190
  return dataTransfer.getData(ADD_ITEM_KEY);
48189
48191
  }
48190
48192
  //#endregion
48191
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/util.js
48193
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
48192
48194
  function getEnumValues(entries) {
48193
48195
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
48194
48196
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -48214,7 +48216,7 @@ var Cached = class {
48214
48216
  return this._value;
48215
48217
  }
48216
48218
  };
48217
- function cached(getter) {
48219
+ function cached$1(getter) {
48218
48220
  return new Cached(getter);
48219
48221
  }
48220
48222
  function nullish(input) {
@@ -48328,7 +48330,7 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
48328
48330
  function isObject(data) {
48329
48331
  return typeof data === "object" && data !== null && !Array.isArray(data);
48330
48332
  }
48331
- var allowsEval = /* @__PURE__*/ cached(() => {
48333
+ var allowsEval = /* @__PURE__*/ cached$1(() => {
48332
48334
  if (globalConfig.jitless) return false;
48333
48335
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
48334
48336
  try {
@@ -48513,6 +48515,17 @@ function prefixIssues(path, issues) {
48513
48515
  function unwrapMessage(message) {
48514
48516
  return typeof message === "string" ? message : message?.message;
48515
48517
  }
48518
+ /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
48519
+ function sizeCaps(defChecks) {
48520
+ const caps = [];
48521
+ for (const ch of defChecks ?? []) {
48522
+ const d = ch._zod.def;
48523
+ if (!/_(length|size)$|_equals$/.test(d.check)) break;
48524
+ const max = d.maximum ?? d.length ?? d.size;
48525
+ if (max >= 0) caps.push([max, ch]);
48526
+ }
48527
+ return caps;
48528
+ }
48516
48529
  function attachSchema(issues, start, inst) {
48517
48530
  var _a;
48518
48531
  for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
@@ -48729,7 +48742,7 @@ function constantCatch(value) {
48729
48742
  return fn;
48730
48743
  }
48731
48744
  //#endregion
48732
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/core.js
48745
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
48733
48746
  var _a$1;
48734
48747
  var _zodDesc = {
48735
48748
  value: void 0,
@@ -48835,7 +48848,7 @@ function config(newConfig) {
48835
48848
  return globalConfig;
48836
48849
  }
48837
48850
  //#endregion
48838
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/errors.js
48851
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
48839
48852
  function _getMessage() {
48840
48853
  const internals = this._zod;
48841
48854
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -48951,7 +48964,7 @@ function formatError(error, mapper = (issue) => issue.message) {
48951
48964
  return fieldErrors;
48952
48965
  }
48953
48966
  //#endregion
48954
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/parse.js
48967
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
48955
48968
  function finalizeParams(callee, params) {
48956
48969
  return {
48957
48970
  callee: params?.callee ?? callee,
@@ -49154,7 +49167,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
49154
49167
  return _safeParseAsync(_Err)(schema, value, _ctx);
49155
49168
  };
49156
49169
  //#endregion
49157
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/regexes.js
49170
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/regexes.js
49158
49171
  /**
49159
49172
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
49160
49173
  * (timestamps embedded in the id). Use {@link cuid2} instead.
@@ -49227,7 +49240,7 @@ var _null$2 = /^null$/i;
49227
49240
  var lowercase = /^[^A-Z]*$/;
49228
49241
  var uppercase = /^[^a-z]*$/;
49229
49242
  //#endregion
49230
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/checks.js
49243
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/checks.js
49231
49244
  var $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
49232
49245
  var _a;
49233
49246
  inst._zod ?? (inst._zod = {});
@@ -49523,7 +49536,7 @@ var $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst,
49523
49536
  };
49524
49537
  });
49525
49538
  //#endregion
49526
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/doc.js
49539
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/doc.js
49527
49540
  var Doc = class {
49528
49541
  constructor(args = [], closed = {}) {
49529
49542
  this.content = [];
@@ -49557,14 +49570,14 @@ var Doc = class {
49557
49570
  }
49558
49571
  };
49559
49572
  //#endregion
49560
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/versions.js
49573
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/versions.js
49561
49574
  var version = {
49562
49575
  major: 4,
49563
49576
  minor: 6,
49564
- patch: 5
49577
+ patch: 7
49565
49578
  };
49566
49579
  //#endregion
49567
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/schemas.js
49580
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/schemas.js
49568
49581
  var $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
49569
49582
  var _a;
49570
49583
  inst ?? (inst = {});
@@ -50077,6 +50090,26 @@ var $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
50077
50090
  return payload;
50078
50091
  };
50079
50092
  });
50093
+ function capSize(inst, size) {
50094
+ const caps = sizeCaps(inst._zod.def.checks);
50095
+ if (!caps.length) return;
50096
+ const cap = Math.min(...caps.map((c) => c[0]));
50097
+ const parse = inst._zod.parse;
50098
+ inst._zod.parse = (payload, ctx) => {
50099
+ const n = size(payload.value);
50100
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
50101
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) {
50102
+ const start = payload.issues.length;
50103
+ ch._zod.check(payload);
50104
+ payload.issues[start].continue = false;
50105
+ attachSchema(payload.issues, start, inst);
50106
+ return payload;
50107
+ }
50108
+ }
50109
+ return parse(payload, ctx);
50110
+ };
50111
+ }
50112
+ var arraySize = (input) => Array.isArray(input) ? input.length : -1;
50080
50113
  function handleArrayResult(result, final, index) {
50081
50114
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
50082
50115
  final.value[index] = result.value;
@@ -50114,6 +50147,7 @@ var $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
50114
50147
  if (proms.length) return Promise.all(proms).then(() => payload);
50115
50148
  return payload;
50116
50149
  };
50150
+ capSize(inst, arraySize);
50117
50151
  });
50118
50152
  function handlePropertyResult(result, final, key, input, optin, optout) {
50119
50153
  const isPresent = key in input;
@@ -50208,7 +50242,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
50208
50242
  get.raw = sh;
50209
50243
  Object.defineProperty(def, "shape", { get });
50210
50244
  }
50211
- const _normalized = cached(() => normalizeDef(def));
50245
+ const _normalized = cached$1(() => normalizeDef(def));
50212
50246
  defineLazyInternal(inst, "propValues", (zod) => {
50213
50247
  const shape = zod.def.shape;
50214
50248
  const propValues = {};
@@ -50222,7 +50256,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
50222
50256
  }
50223
50257
  return propValues;
50224
50258
  });
50225
- const isObject$3 = isObject;
50259
+ const isObject$2 = isObject;
50226
50260
  const catchall = def.catchall;
50227
50261
  let value;
50228
50262
  const memo = globalConfig.memoizer;
@@ -50230,7 +50264,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
50230
50264
  inst._zod.parse = (payload, ctx) => {
50231
50265
  value ?? (value = _normalized.value);
50232
50266
  const input = payload.value;
50233
- if (!isObject$3(input)) {
50267
+ if (!isObject$2(input)) {
50234
50268
  payload.issues.push({
50235
50269
  expected: "object",
50236
50270
  code: "invalid_type",
@@ -50267,7 +50301,7 @@ var $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
50267
50301
  var $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
50268
50302
  $ZodObject.init(inst, def);
50269
50303
  const superParse = inst._zod.parse;
50270
- const _normalized = cached(() => normalizeDef(def));
50304
+ const _normalized = cached$1(() => normalizeDef(def));
50271
50305
  const memo = globalConfig.memoizer;
50272
50306
  const generateFastpass = (shape) => {
50273
50307
  const normalized = _normalized.value;
@@ -50360,7 +50394,7 @@ var $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
50360
50394
  return doc.compile();
50361
50395
  };
50362
50396
  let fastpass;
50363
- const isObject$2 = isObject;
50397
+ const isObject$3 = isObject;
50364
50398
  const jit = !globalConfig.jitless;
50365
50399
  const fastEnabled = jit && allowsEval.value;
50366
50400
  const catchall = def.catchall;
@@ -50368,7 +50402,7 @@ var $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
50368
50402
  inst._zod.parse = (payload, ctx) => {
50369
50403
  value ?? (value = _normalized.value);
50370
50404
  const input = payload.value;
50371
- if (!isObject$2(input)) {
50405
+ if (!isObject$3(input)) {
50372
50406
  payload.issues.push({
50373
50407
  expected: "object",
50374
50408
  code: "invalid_type",
@@ -50476,7 +50510,7 @@ var $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion"
50476
50510
  const propShape = rawShape(option._zod.def);
50477
50511
  if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) throw new Error(`Invalid discriminated union option at index "${i}"`);
50478
50512
  });
50479
- const disc = cached(() => discriminatorMap(def));
50513
+ const disc = cached$1(() => discriminatorMap(def));
50480
50514
  inst._zod.parse = (payload, ctx) => {
50481
50515
  const input = payload.value;
50482
50516
  if (!isObject(input)) {
@@ -51032,7 +51066,7 @@ function handleRefineResult(result, payload, input, inst) {
51032
51066
  }
51033
51067
  }
51034
51068
  //#endregion
51035
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
51069
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
51036
51070
  var $ZodCyclicError = class extends Error {
51037
51071
  constructor() {
51038
51072
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -51285,7 +51319,7 @@ function isBackEdge(ctx, value) {
51285
51319
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
51286
51320
  }
51287
51321
  //#endregion
51288
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/en.js
51322
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
51289
51323
  var error$1 = () => {
51290
51324
  const Sizable = {
51291
51325
  string: {
@@ -51393,7 +51427,7 @@ function en_default$2() {
51393
51427
  return { localeError: error$1() };
51394
51428
  }
51395
51429
  //#endregion
51396
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/registries.js
51430
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
51397
51431
  var _a;
51398
51432
  var $ZodRegistry = class {
51399
51433
  constructor() {
@@ -51440,7 +51474,7 @@ function registry() {
51440
51474
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
51441
51475
  var globalRegistry = globalThis.__zod_globalRegistry;
51442
51476
  //#endregion
51443
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/api.js
51477
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
51444
51478
  function snapshotChecks(def) {
51445
51479
  if (def.checks) def.checks = [...def.checks];
51446
51480
  return def;
@@ -51956,7 +51990,7 @@ function _check(fn, params) {
51956
51990
  return ch;
51957
51991
  }
51958
51992
  //#endregion
51959
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
51993
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
51960
51994
  function assignProps(target, ...sources) {
51961
51995
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
51962
51996
  return target;
@@ -52400,7 +52434,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
52400
52434
  return finalize(ctx, schema);
52401
52435
  };
52402
52436
  //#endregion
52403
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
52437
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
52404
52438
  var narrowMin = (agg, key, value) => {
52405
52439
  if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
52406
52440
  };
@@ -52861,7 +52895,7 @@ var lazyProcessor = (schema, ctx, _json, params) => {
52861
52895
  seen.ref = innerType;
52862
52896
  };
52863
52897
  //#endregion
52864
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/errors.js
52898
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/errors.js
52865
52899
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
52866
52900
  function _lazyMethod(proto, key, make) {
52867
52901
  Object.defineProperty(proto, key, {
@@ -52911,7 +52945,7 @@ var initializer = (inst, issues) => {
52911
52945
  };
52912
52946
  var ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
52913
52947
  //#endregion
52914
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/parse.js
52948
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/parse.js
52915
52949
  var parse = /* @__PURE__ */ _parse(ZodRealError);
52916
52950
  var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
52917
52951
  var safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -52925,7 +52959,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
52925
52959
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
52926
52960
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
52927
52961
  //#endregion
52928
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
52962
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
52929
52963
  function _ensureDefaultLocale() {
52930
52964
  if (!globalConfig.localeError) config(en_default$2());
52931
52965
  }
@@ -53857,7 +53891,7 @@ function preprocess(fn, schema) {
53857
53891
  });
53858
53892
  }
53859
53893
  //#endregion
53860
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
53894
+ //#region ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/iso.js
53861
53895
  function datetime(params) {
53862
53896
  return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
53863
53897
  }
@@ -56241,6 +56275,882 @@ function FlowCanvasView(props) {
56241
56275
  }, props.identity);
56242
56276
  }
56243
56277
  //#endregion
56278
+ //#region src/trigger/providers/fieldDescriptions.ts
56279
+ var driveChangesConfig = {
56280
+ driveId: "Shared drive ID. Leave empty to monitor the connected account.",
56281
+ includeCorpusRemovals: "Include the accessible file resource when an item leaves the change corpus.",
56282
+ includeItemsFromAllDrives: "Include items from My Drive and shared drives.",
56283
+ includeRemoved: "Include changes caused by deletion or loss of access.",
56284
+ pageSize: "Maximum number of changes read per page.",
56285
+ restrictToMyDrive: "Restrict changes to the My Drive hierarchy."
56286
+ };
56287
+ var englishTriggerFieldDescriptions = {
56288
+ "jira.on_issue_event": {
56289
+ configInputs: {
56290
+ sourceId: "Event source",
56291
+ eventTypes: "Events"
56292
+ },
56293
+ outputs: {
56294
+ event: "Event type",
56295
+ deliveryId: "Notification ID",
56296
+ cloudId: "Cloud site ID",
56297
+ issueId: "Issue ID",
56298
+ body: "Original event"
56299
+ }
56300
+ },
56301
+ "fireflies.on_meeting_ready": {
56302
+ configInputs: {
56303
+ sourceId: "Event source",
56304
+ eventTypes: "Events"
56305
+ },
56306
+ outputs: {
56307
+ event: "Event type",
56308
+ deliveryId: "Notification ID",
56309
+ accountId: "Account ID",
56310
+ meetingId: "Meeting / transcript ID",
56311
+ body: "Original object"
56312
+ }
56313
+ },
56314
+ "zoom.on_recording_ready": {
56315
+ configInputs: {
56316
+ sourceId: "Event source",
56317
+ eventTypes: "Events"
56318
+ },
56319
+ outputs: {
56320
+ event: "Event type",
56321
+ deliveryId: "Notification ID",
56322
+ accountId: "Zoom account ID",
56323
+ meetingUuid: "Meeting instance UUID",
56324
+ body: "Original object"
56325
+ }
56326
+ },
56327
+ "sentry.on_issue_alert": {
56328
+ configInputs: {
56329
+ sourceId: "Event source",
56330
+ eventTypes: "Events",
56331
+ projectIds: "Project IDs; empty includes all projects in the installation.",
56332
+ ruleNames: "Exact alert rule labels; empty includes all rules."
56333
+ },
56334
+ outputs: {
56335
+ event: "Event type",
56336
+ deliveryId: "Notification ID",
56337
+ organizationId: "Organization ID",
56338
+ issueId: "Issue ID",
56339
+ body: "Original object"
56340
+ }
56341
+ },
56342
+ "intercom.on_conversation_event": {
56343
+ configInputs: {
56344
+ sourceId: "Event source",
56345
+ eventTypes: "Events"
56346
+ },
56347
+ outputs: {
56348
+ event: "Event type",
56349
+ deliveryId: "Notification ID",
56350
+ workspaceId: "Workspace ID",
56351
+ objectId: "Conversation or ticket ID",
56352
+ body: "Original object"
56353
+ }
56354
+ },
56355
+ "slackbot.on_event": {
56356
+ configInputs: {
56357
+ sourceId: "Event source",
56358
+ eventTypes: "Events",
56359
+ channelIds: "Channel IDs; empty means all source channels."
56360
+ },
56361
+ outputs: {
56362
+ event: "Event type",
56363
+ deliveryId: "Event ID",
56364
+ appId: "Slack app ID",
56365
+ teamId: "Workspace ID",
56366
+ channel: "Conversation ID",
56367
+ user: "User ID",
56368
+ text: "Message text",
56369
+ ts: "Message timestamp",
56370
+ threadTs: "Parent thread timestamp, when present.",
56371
+ body: "Original Slack event"
56372
+ }
56373
+ },
56374
+ "asana.on_task_event": {
56375
+ configInputs: {
56376
+ projectId: "Project ID",
56377
+ eventTypes: "Events",
56378
+ customFieldId: "Custom field ID"
56379
+ },
56380
+ outputs: {
56381
+ projectId: "Project ID",
56382
+ events: "Matching events in this delivery."
56383
+ }
56384
+ },
56385
+ "calendly.on_booking_event": {
56386
+ configInputs: {
56387
+ scope: "Scope",
56388
+ eventTypes: "Events"
56389
+ },
56390
+ outputs: {
56391
+ event: "Business event type.",
56392
+ inviteeUri: "Invitee URI",
56393
+ createdAt: "Event timestamp.",
56394
+ body: "Original event data."
56395
+ }
56396
+ },
56397
+ "clickup.on_task_event": {
56398
+ configInputs: {
56399
+ workspaceId: "Workspace ID",
56400
+ listId: "List ID",
56401
+ eventTypes: "Events"
56402
+ },
56403
+ outputs: {
56404
+ event: "Business event type.",
56405
+ taskId: "Task ID",
56406
+ body: "Original event data."
56407
+ }
56408
+ },
56409
+ "pandadoc.on_document_event": {
56410
+ configInputs: { completedOnly: "Completed documents only" },
56411
+ outputs: { events: "Matching events in this delivery." }
56412
+ },
56413
+ "pipedrive.on_crm_event": {
56414
+ configInputs: { eventType: "Event" },
56415
+ outputs: {
56416
+ event: "Business event type.",
56417
+ deliveryId: "Delivery ID",
56418
+ objectId: "Object ID",
56419
+ body: "Original event data."
56420
+ }
56421
+ },
56422
+ "resend.on_email_event": {
56423
+ configInputs: { eventTypes: "Events" },
56424
+ outputs: {
56425
+ event: "Business event type.",
56426
+ deliveryId: "Delivery ID",
56427
+ emailId: "Email ID",
56428
+ createdAt: "Event timestamp.",
56429
+ body: "Original event data."
56430
+ }
56431
+ },
56432
+ "typeform.on_form_response": {
56433
+ configInputs: { formId: "Form ID" },
56434
+ outputs: { response: "Submission identity, time and original answers with stable field identifiers." }
56435
+ },
56436
+ "vercel.on_deployment_event": {
56437
+ configInputs: {
56438
+ teamId: "Team ID",
56439
+ projectId: "Project ID",
56440
+ environment: "Environment"
56441
+ },
56442
+ outputs: {
56443
+ event: "Business event type.",
56444
+ deliveryId: "Delivery ID",
56445
+ deploymentId: "Deployment ID",
56446
+ projectId: "Project ID",
56447
+ body: "Original event data."
56448
+ }
56449
+ },
56450
+ "tally.on_form_response": {
56451
+ configInputs: { formId: "Select a form accessible to this connection." },
56452
+ outputs: { response: "Submission identity, time, and fields, preserving field keys, types, values, options, and file metadata." }
56453
+ },
56454
+ "feishu_app_bot.on_event": {
56455
+ configInputs: {
56456
+ sourceId: "Event source that receives events for this trigger.",
56457
+ eventTypes: "Feishu event types that trigger a Run.",
56458
+ chatIds: "Chat IDs to receive events from. Leave empty to receive events from every chat available to the source.",
56459
+ resource: "Optional document, calendar, or approval resource to subscribe to."
56460
+ },
56461
+ outputs: {
56462
+ event: "Feishu event type.",
56463
+ deliveryId: "Unique delivery ID for this event.",
56464
+ appId: "ID of the Feishu application that received the event.",
56465
+ tenantKey: "Key of the Feishu tenant that produced the event.",
56466
+ occurredAt: "Time when the event occurred, when supplied by Feishu.",
56467
+ body: "Original Feishu event payload."
56468
+ }
56469
+ },
56470
+ "airtable.on_record_changed": {
56471
+ configInputs: {
56472
+ baseId: "ID of the Airtable base to monitor.",
56473
+ fields: "Fields to include in each returned record. Leave empty to include every field.",
56474
+ formula: "Airtable formula used to filter records. Leave empty to include every record.",
56475
+ maxRecordsPerPoll: "Maximum number of records processed per poll.",
56476
+ tableIdOrName: "ID or name of the Airtable table to monitor.",
56477
+ triggerField: "Date or time field used to detect created or updated records.",
56478
+ view: "Airtable view used to filter and order records. Leave empty to use the table default."
56479
+ },
56480
+ outputs: { events: "Records created or updated since the previous poll." }
56481
+ },
56482
+ "gmail.on_message_received": {
56483
+ configInputs: {
56484
+ includeDrafts: "Also trigger on draft messages.",
56485
+ includeSpamAndTrash: "Also trigger on messages in Spam and Trash.",
56486
+ labelNamesOrIds: "Only trigger on messages carrying all of these labels, referenced by name or ID.",
56487
+ maxMessagesPerPoll: "Maximum number of messages processed per poll.",
56488
+ readStatus: "Only trigger on read messages, unread messages, or both.",
56489
+ search: "Gmail search query that each message must match.",
56490
+ sender: "Only trigger on messages whose sender matches this address or name."
56491
+ },
56492
+ outputs: { events: "Messages received since the previous poll." }
56493
+ },
56494
+ "github.on_repo_event": {
56495
+ configInputs: {
56496
+ events: "GitHub webhook events that trigger a Run.",
56497
+ insecureSsl: "Allow GitHub to deliver webhooks without SSL certificate verification.",
56498
+ owner: "Owner of the GitHub repository.",
56499
+ repo: "Name of the GitHub repository."
56500
+ },
56501
+ outputs: {
56502
+ body: "Original GitHub webhook payload.",
56503
+ deliveryId: "Unique GitHub webhook delivery ID.",
56504
+ event: "GitHub webhook event name."
56505
+ }
56506
+ },
56507
+ "github.watch_pull_request": {
56508
+ configInputs: {
56509
+ owner: "Owner of the GitHub repository.",
56510
+ repo: "Name of the GitHub repository.",
56511
+ number: "Number of the pull request to watch."
56512
+ },
56513
+ outputs: {
56514
+ pullRequest: "Current pull request details after an observed change.",
56515
+ version: "Stable identifier for the observed pull request version."
56516
+ }
56517
+ },
56518
+ "gitlab.on_project_event": {
56519
+ configInputs: {
56520
+ events: "GitLab project events that trigger a Run.",
56521
+ insecureSsl: "Allow GitLab to deliver webhooks without SSL certificate verification.",
56522
+ project: "Numeric project ID or URL-encoded project path.",
56523
+ pushBranchFilter: "Branch or wildcard pattern used to filter push events. Leave empty to include every branch."
56524
+ },
56525
+ outputs: {
56526
+ body: "Original GitLab webhook payload.",
56527
+ deliveryId: "Unique ID generated for this webhook delivery.",
56528
+ event: "Normalized GitLab event name.",
56529
+ gitlabEvent: "Original GitLab event header value."
56530
+ }
56531
+ },
56532
+ "googlecalendar.on_event_changed": {
56533
+ configInputs: {
56534
+ calendarId: "ID of the Google Calendar to monitor.",
56535
+ changes: "Calendar event changes that trigger a Run.",
56536
+ matchTerm: "Text that must appear in the event summary, description, location, or attendees. Leave empty to match every event.",
56537
+ maxEventsPerPoll: "Maximum number of calendar events processed per poll."
56538
+ },
56539
+ outputs: { events: "Calendar events created, updated, or cancelled since the previous poll." }
56540
+ },
56541
+ "googledrive.changes_detected": {
56542
+ configInputs: driveChangesConfig,
56543
+ outputs: { events: "Google Drive changes available when the notification was received." }
56544
+ },
56545
+ "googledrive.watch_changes": {
56546
+ configInputs: driveChangesConfig,
56547
+ outputs: { events: "Google Drive changes observed by notifications or periodic scans." }
56548
+ },
56549
+ "googledrive.on_file_change": {
56550
+ configInputs: {
56551
+ changeType: "Whether created or updated items trigger a Run.",
56552
+ driveId: "Shared drive ID. Leave empty to use My Drive.",
56553
+ folderId: "ID of the Google Drive folder to monitor.",
56554
+ itemTypes: "Whether to monitor files, folders, or both.",
56555
+ maxFilesPerPoll: "Maximum number of changed items processed per poll.",
56556
+ mimeTypes: "Only trigger on these MIME types. Leave empty to include every MIME type.",
56557
+ namePrefix: "Only trigger on items whose names start with this text. Leave empty to include every name."
56558
+ },
56559
+ outputs: { events: "Files or folders created or updated since the previous poll." }
56560
+ },
56561
+ "googlesheets.on_row_added": {
56562
+ configInputs: {
56563
+ columnRange: "A1 column range to read, such as A:Z.",
56564
+ dateTimeRender: "How date and time values are returned.",
56565
+ firstDataRow: "First row containing data below the header.",
56566
+ headerRow: "Row whose cells become output field names.",
56567
+ maxRowsPerPoll: "Maximum number of new rows processed per poll.",
56568
+ sheet: "Name of the worksheet to monitor.",
56569
+ spreadsheetId: "ID of the Google Sheets spreadsheet.",
56570
+ valueRender: "How cell values are returned."
56571
+ },
56572
+ outputs: { events: "Rows appended since the previous poll." }
56573
+ },
56574
+ "linear.on_issue_changed": {
56575
+ configInputs: {
56576
+ teamId: "Linear Team UUID. Use Copy model UUID in Linear to find it.",
56577
+ stateIds: "Statuses from the selected Team. Leave empty for every status. Matches current status, not every transition into it."
56578
+ },
56579
+ outputs: { events: "Linear issues created or updated since the previous poll." }
56580
+ },
56581
+ "notion.on_database_page_event": {
56582
+ configInputs: {
56583
+ dataSourceId: "Data source ID within the database. Leave empty to use the primary data source.",
56584
+ databaseId: "ID of the Notion database to monitor.",
56585
+ events: "Page changes that trigger a Run.",
56586
+ includeProperties: "Include page properties in each output event.",
56587
+ maxItemsPerPoll: "Maximum number of changed pages processed per poll."
56588
+ },
56589
+ outputs: { events: "Database pages added or updated since the previous poll." }
56590
+ },
56591
+ "one_drive.on_item_changed": {
56592
+ configInputs: {
56593
+ events: "OneDrive item changes that trigger a Run.",
56594
+ itemId: "Only monitor this file or folder ID. Leave empty to monitor multiple items.",
56595
+ itemTypes: "Whether to monitor files, folders, or both.",
56596
+ maxItemsPerPoll: "Maximum number of changed items processed per poll.",
56597
+ parentFolderId: "Only monitor items in this parent folder. Leave empty to monitor the whole drive."
56598
+ },
56599
+ outputs: { events: "OneDrive items created, updated, or deleted since the previous poll." }
56600
+ },
56601
+ "outlook.on_message_received": {
56602
+ configInputs: {
56603
+ folder: "Well-known mail folder name, folder ID, or an empty value for the whole mailbox.",
56604
+ includeDrafts: "Also trigger on draft messages.",
56605
+ maxMessagesPerPoll: "Maximum number of messages processed per poll.",
56606
+ readStatus: "Only trigger on read messages, unread messages, or both.",
56607
+ senderAddress: "Exact sender address. Leave empty to allow any sender.",
56608
+ subjectContains: "Case-insensitive text that must appear in the message subject.",
56609
+ withAttachmentsOnly: "Only trigger on messages that have attachments."
56610
+ },
56611
+ outputs: { events: "Outlook messages received since the previous poll." }
56612
+ },
56613
+ "shopify.on_shop_event": {
56614
+ configInputs: { topics: "Shopify webhook topics that trigger a Run." },
56615
+ outputs: {
56616
+ apiVersion: "Shopify API version used for the webhook.",
56617
+ body: "Original Shopify webhook payload.",
56618
+ eventId: "Unique Shopify event ID.",
56619
+ shopDomain: "Domain of the Shopify shop that produced the event.",
56620
+ topic: "Shopify webhook topic.",
56621
+ triggeredAt: "Time when Shopify triggered the webhook.",
56622
+ webhookId: "ID of the Shopify webhook subscription."
56623
+ }
56624
+ },
56625
+ "slack.on_message_posted": {
56626
+ configInputs: {
56627
+ channelId: "Slack conversation ID to watch, such as C0122KQ70S7E.",
56628
+ fromUserIds: "Only trigger on messages from these Slack user IDs. Leave empty to allow any author.",
56629
+ ignoreUserIds: "Never trigger on messages from these Slack user IDs.",
56630
+ includeBotMessages: "Also trigger on messages posted by bots and apps.",
56631
+ includeSystemMessages: "Also trigger on Slack system notices.",
56632
+ maxMessagesPerPoll: "Maximum number of messages processed per poll.",
56633
+ textContains: "Only trigger when message text contains this string, ignoring case."
56634
+ },
56635
+ outputs: { events: "Slack messages posted since the previous poll." }
56636
+ },
56637
+ "stripe.on_event": {
56638
+ configInputs: {
56639
+ apiVersion: "Stripe API version used for webhook events. Leave empty to use the account default.",
56640
+ events: "Stripe event types that trigger a Run.",
56641
+ includeConnectedAccounts: "Also receive events from connected Stripe accounts."
56642
+ },
56643
+ outputs: {
56644
+ body: "Original Stripe event payload.",
56645
+ event: "Stripe event type.",
56646
+ eventId: "Unique Stripe event ID.",
56647
+ livemode: "Whether the event was created in live mode."
56648
+ }
56649
+ },
56650
+ "telegram.on_update": {
56651
+ configInputs: {
56652
+ chatIds: "Only accept updates from these numeric Telegram chat IDs. Leave empty to allow every chat.",
56653
+ dropPendingUpdates: "Discard updates queued before the webhook is created or resumed.",
56654
+ updates: "Telegram update types that trigger a Run. Use * for the Telegram default set.",
56655
+ userIds: "Only accept updates from these numeric Telegram user IDs. Leave empty to allow every user."
56656
+ },
56657
+ outputs: {
56658
+ body: "Original Telegram update payload.",
56659
+ deliveryId: "Unique ID generated for this Telegram update.",
56660
+ event: "Telegram update type."
56661
+ }
56662
+ },
56663
+ "woocommerce.on_store_event": {
56664
+ configInputs: {
56665
+ events: "WooCommerce store events that trigger a Run.",
56666
+ webhookName: "Name shown for the webhook in WooCommerce."
56667
+ },
56668
+ outputs: {
56669
+ body: "Original WooCommerce webhook payload.",
56670
+ deliveryId: "Unique WooCommerce webhook delivery ID.",
56671
+ event: "WooCommerce event action.",
56672
+ resource: "WooCommerce resource type.",
56673
+ source: "URL of the WooCommerce store that produced the event.",
56674
+ topic: "Full WooCommerce webhook topic.",
56675
+ webhookId: "ID of the WooCommerce webhook subscription."
56676
+ }
56677
+ },
56678
+ "zendesk.on_event": {
56679
+ configInputs: { events: "Zendesk event types that trigger a Run." },
56680
+ outputs: {
56681
+ body: "Original Zendesk event payload.",
56682
+ deliveryId: "Unique ID generated for this Zendesk event delivery.",
56683
+ event: "Zendesk event type.",
56684
+ subject: "Zendesk subject associated with the event."
56685
+ }
56686
+ }
56687
+ };
56688
+ //#endregion
56689
+ //#region src/trigger/providers/fieldLabels.ts
56690
+ var triggerConfigFieldLabels = {
56691
+ "en": {
56692
+ "jira.on_issue_event": { sourceId: "Event source" },
56693
+ "fireflies.on_meeting_ready": { sourceId: "Event source" },
56694
+ "zoom.on_recording_ready": { sourceId: "Event source" },
56695
+ "sentry.on_issue_alert": { sourceId: "Event source" },
56696
+ "intercom.on_conversation_event": { sourceId: "Event source" },
56697
+ "slackbot.on_event": { sourceId: "Event source" },
56698
+ "asana.on_task_event": { projectId: "Project ID" },
56699
+ "calendly.on_booking_event": {},
56700
+ "clickup.on_task_event": { workspaceId: "Workspace ID" },
56701
+ "pandadoc.on_document_event": {},
56702
+ "pipedrive.on_crm_event": {},
56703
+ "resend.on_email_event": {},
56704
+ "typeform.on_form_response": { formId: "Form ID" },
56705
+ "vercel.on_deployment_event": {
56706
+ teamId: "Team ID",
56707
+ projectId: "Project ID"
56708
+ },
56709
+ "tally.on_form_response": { formId: "Form" },
56710
+ "feishu_app_bot.on_event": {
56711
+ sourceId: "Event source",
56712
+ eventTypes: "Events to receive"
56713
+ },
56714
+ "airtable.on_record_changed": {
56715
+ baseId: "Base",
56716
+ tableIdOrName: "Table",
56717
+ triggerField: "Trigger field"
56718
+ },
56719
+ "github.on_repo_event": {
56720
+ events: "Events",
56721
+ owner: "Repository owner",
56722
+ repo: "Repository"
56723
+ },
56724
+ "github.watch_pull_request": {
56725
+ owner: "Repository owner",
56726
+ repo: "Repository",
56727
+ number: "Pull request number"
56728
+ },
56729
+ "gitlab.on_project_event": {
56730
+ events: "Events",
56731
+ project: "Project"
56732
+ },
56733
+ "googlecalendar.on_event_changed": { calendarId: "Calendar" },
56734
+ "googledrive.on_file_change": {
56735
+ changeType: "Change type",
56736
+ folderId: "Folder"
56737
+ },
56738
+ "googlesheets.on_row_added": {
56739
+ sheet: "Worksheet",
56740
+ spreadsheetId: "Spreadsheet"
56741
+ },
56742
+ "linear.on_issue_changed": { teamId: "Team" },
56743
+ "notion.on_database_page_event": { databaseId: "Database" },
56744
+ "shopify.on_shop_event": { topics: "Topics" },
56745
+ "slack.on_message_posted": { channelId: "Channel" },
56746
+ "stripe.on_event": { events: "Events" },
56747
+ "telegram.on_update": { updates: "Updates" },
56748
+ "woocommerce.on_store_event": { events: "Events" },
56749
+ "zendesk.on_event": { events: "Events" }
56750
+ },
56751
+ "zh-CN": {
56752
+ "jira.on_issue_event": { sourceId: "事件源" },
56753
+ "fireflies.on_meeting_ready": { sourceId: "事件源" },
56754
+ "zoom.on_recording_ready": { sourceId: "事件源" },
56755
+ "sentry.on_issue_alert": { sourceId: "事件源" },
56756
+ "intercom.on_conversation_event": { sourceId: "事件源" },
56757
+ "slackbot.on_event": { sourceId: "事件源" },
56758
+ "asana.on_task_event": { projectId: "项目 ID" },
56759
+ "calendly.on_booking_event": {},
56760
+ "clickup.on_task_event": { workspaceId: "工作区 ID" },
56761
+ "pandadoc.on_document_event": {},
56762
+ "pipedrive.on_crm_event": {},
56763
+ "resend.on_email_event": {},
56764
+ "typeform.on_form_response": { formId: "表单 ID" },
56765
+ "vercel.on_deployment_event": {
56766
+ teamId: "团队 ID",
56767
+ projectId: "项目 ID"
56768
+ },
56769
+ "tally.on_form_response": { formId: "表单" },
56770
+ "feishu_app_bot.on_event": {
56771
+ sourceId: "事件源",
56772
+ eventTypes: "接收的事件"
56773
+ },
56774
+ "airtable.on_record_changed": {
56775
+ baseId: "Base",
56776
+ tableIdOrName: "数据表",
56777
+ triggerField: "触发字段"
56778
+ },
56779
+ "github.on_repo_event": {
56780
+ events: "事件",
56781
+ owner: "仓库所有者",
56782
+ repo: "仓库"
56783
+ },
56784
+ "github.watch_pull_request": {
56785
+ owner: "仓库所有者",
56786
+ repo: "仓库",
56787
+ number: "拉取请求编号"
56788
+ },
56789
+ "gitlab.on_project_event": {
56790
+ events: "事件",
56791
+ project: "项目"
56792
+ },
56793
+ "googlecalendar.on_event_changed": { calendarId: "日历" },
56794
+ "googledrive.on_file_change": {
56795
+ changeType: "变更类型",
56796
+ folderId: "文件夹"
56797
+ },
56798
+ "googlesheets.on_row_added": {
56799
+ sheet: "工作表",
56800
+ spreadsheetId: "电子表格"
56801
+ },
56802
+ "linear.on_issue_changed": { teamId: "团队" },
56803
+ "notion.on_database_page_event": { databaseId: "数据库" },
56804
+ "shopify.on_shop_event": { topics: "主题" },
56805
+ "slack.on_message_posted": { channelId: "频道" },
56806
+ "stripe.on_event": { events: "事件" },
56807
+ "telegram.on_update": { updates: "更新类型" },
56808
+ "woocommerce.on_store_event": { events: "事件" },
56809
+ "zendesk.on_event": { events: "事件" }
56810
+ },
56811
+ "zh-TW": {
56812
+ "jira.on_issue_event": { sourceId: "事件源" },
56813
+ "fireflies.on_meeting_ready": { sourceId: "事件源" },
56814
+ "zoom.on_recording_ready": { sourceId: "事件源" },
56815
+ "sentry.on_issue_alert": { sourceId: "事件源" },
56816
+ "intercom.on_conversation_event": { sourceId: "事件源" },
56817
+ "slackbot.on_event": { sourceId: "事件源" },
56818
+ "asana.on_task_event": { projectId: "專案 ID" },
56819
+ "calendly.on_booking_event": {},
56820
+ "clickup.on_task_event": { workspaceId: "工作區 ID" },
56821
+ "pandadoc.on_document_event": {},
56822
+ "pipedrive.on_crm_event": {},
56823
+ "resend.on_email_event": {},
56824
+ "typeform.on_form_response": { formId: "表單 ID" },
56825
+ "vercel.on_deployment_event": {
56826
+ teamId: "團隊 ID",
56827
+ projectId: "專案 ID"
56828
+ },
56829
+ "tally.on_form_response": { formId: "表單" },
56830
+ "feishu_app_bot.on_event": {
56831
+ sourceId: "事件來源",
56832
+ eventTypes: "接收的事件"
56833
+ },
56834
+ "airtable.on_record_changed": {
56835
+ baseId: "Base",
56836
+ tableIdOrName: "資料表",
56837
+ triggerField: "觸發欄位"
56838
+ },
56839
+ "github.on_repo_event": {
56840
+ events: "事件",
56841
+ owner: "儲存庫擁有者",
56842
+ repo: "儲存庫"
56843
+ },
56844
+ "github.watch_pull_request": {
56845
+ owner: "儲存庫擁有者",
56846
+ repo: "儲存庫",
56847
+ number: "提取要求編號"
56848
+ },
56849
+ "gitlab.on_project_event": {
56850
+ events: "事件",
56851
+ project: "專案"
56852
+ },
56853
+ "googlecalendar.on_event_changed": { calendarId: "日曆" },
56854
+ "googledrive.on_file_change": {
56855
+ changeType: "變更類型",
56856
+ folderId: "資料夾"
56857
+ },
56858
+ "googlesheets.on_row_added": {
56859
+ sheet: "工作表",
56860
+ spreadsheetId: "試算表"
56861
+ },
56862
+ "linear.on_issue_changed": { teamId: "團隊" },
56863
+ "notion.on_database_page_event": { databaseId: "資料庫" },
56864
+ "shopify.on_shop_event": { topics: "主題" },
56865
+ "slack.on_message_posted": { channelId: "頻道" },
56866
+ "stripe.on_event": { events: "事件" },
56867
+ "telegram.on_update": { updates: "更新類型" },
56868
+ "woocommerce.on_store_event": { events: "事件" },
56869
+ "zendesk.on_event": { events: "事件" }
56870
+ },
56871
+ "ja": {
56872
+ "jira.on_issue_event": { sourceId: "イベントソース" },
56873
+ "fireflies.on_meeting_ready": { sourceId: "イベントソース" },
56874
+ "zoom.on_recording_ready": { sourceId: "イベントソース" },
56875
+ "sentry.on_issue_alert": { sourceId: "イベントソース" },
56876
+ "intercom.on_conversation_event": { sourceId: "イベントソース" },
56877
+ "slackbot.on_event": { sourceId: "イベントソース" },
56878
+ "asana.on_task_event": { projectId: "プロジェクト ID" },
56879
+ "calendly.on_booking_event": {},
56880
+ "clickup.on_task_event": { workspaceId: "ワークスペース ID" },
56881
+ "pandadoc.on_document_event": {},
56882
+ "pipedrive.on_crm_event": {},
56883
+ "resend.on_email_event": {},
56884
+ "typeform.on_form_response": { formId: "フォーム ID" },
56885
+ "vercel.on_deployment_event": {
56886
+ teamId: "チーム ID",
56887
+ projectId: "プロジェクト ID"
56888
+ },
56889
+ "tally.on_form_response": { formId: "フォーム" },
56890
+ "feishu_app_bot.on_event": {
56891
+ sourceId: "イベントソース",
56892
+ eventTypes: "受信するイベント"
56893
+ },
56894
+ "airtable.on_record_changed": {
56895
+ baseId: "ベース",
56896
+ tableIdOrName: "テーブル",
56897
+ triggerField: "トリガーフィールド"
56898
+ },
56899
+ "github.on_repo_event": {
56900
+ events: "イベント",
56901
+ owner: "リポジトリの所有者",
56902
+ repo: "リポジトリ"
56903
+ },
56904
+ "github.watch_pull_request": {
56905
+ owner: "リポジトリの所有者",
56906
+ repo: "リポジトリ",
56907
+ number: "プルリクエスト番号"
56908
+ },
56909
+ "gitlab.on_project_event": {
56910
+ events: "イベント",
56911
+ project: "プロジェクト"
56912
+ },
56913
+ "googlecalendar.on_event_changed": { calendarId: "カレンダー" },
56914
+ "googledrive.on_file_change": {
56915
+ changeType: "変更の種類",
56916
+ folderId: "フォルダー"
56917
+ },
56918
+ "googlesheets.on_row_added": {
56919
+ sheet: "シート",
56920
+ spreadsheetId: "スプレッドシート"
56921
+ },
56922
+ "linear.on_issue_changed": { teamId: "チーム" },
56923
+ "notion.on_database_page_event": { databaseId: "データベース" },
56924
+ "shopify.on_shop_event": { topics: "トピック" },
56925
+ "slack.on_message_posted": { channelId: "チャンネル" },
56926
+ "stripe.on_event": { events: "イベント" },
56927
+ "telegram.on_update": { updates: "更新の種類" },
56928
+ "woocommerce.on_store_event": { events: "イベント" },
56929
+ "zendesk.on_event": { events: "イベント" }
56930
+ },
56931
+ "ko": {
56932
+ "jira.on_issue_event": { sourceId: "이벤트 소스" },
56933
+ "fireflies.on_meeting_ready": { sourceId: "이벤트 소스" },
56934
+ "zoom.on_recording_ready": { sourceId: "이벤트 소스" },
56935
+ "sentry.on_issue_alert": { sourceId: "이벤트 소스" },
56936
+ "intercom.on_conversation_event": { sourceId: "이벤트 소스" },
56937
+ "slackbot.on_event": { sourceId: "이벤트 소스" },
56938
+ "asana.on_task_event": { projectId: "프로젝트 ID" },
56939
+ "calendly.on_booking_event": {},
56940
+ "clickup.on_task_event": { workspaceId: "워크스페이스 ID" },
56941
+ "pandadoc.on_document_event": {},
56942
+ "pipedrive.on_crm_event": {},
56943
+ "resend.on_email_event": {},
56944
+ "typeform.on_form_response": { formId: "양식 ID" },
56945
+ "vercel.on_deployment_event": {
56946
+ teamId: "팀 ID",
56947
+ projectId: "프로젝트 ID"
56948
+ },
56949
+ "tally.on_form_response": { formId: "양식" },
56950
+ "feishu_app_bot.on_event": {
56951
+ sourceId: "이벤트 소스",
56952
+ eventTypes: "수신할 이벤트"
56953
+ },
56954
+ "airtable.on_record_changed": {
56955
+ baseId: "베이스",
56956
+ tableIdOrName: "테이블",
56957
+ triggerField: "트리거 필드"
56958
+ },
56959
+ "github.on_repo_event": {
56960
+ events: "이벤트",
56961
+ owner: "저장소 소유자",
56962
+ repo: "저장소"
56963
+ },
56964
+ "github.watch_pull_request": {
56965
+ owner: "저장소 소유자",
56966
+ repo: "저장소",
56967
+ number: "풀 리퀘스트 번호"
56968
+ },
56969
+ "gitlab.on_project_event": {
56970
+ events: "이벤트",
56971
+ project: "프로젝트"
56972
+ },
56973
+ "googlecalendar.on_event_changed": { calendarId: "캘린더" },
56974
+ "googledrive.on_file_change": {
56975
+ changeType: "변경 유형",
56976
+ folderId: "폴더"
56977
+ },
56978
+ "googlesheets.on_row_added": {
56979
+ sheet: "시트",
56980
+ spreadsheetId: "스프레드시트"
56981
+ },
56982
+ "linear.on_issue_changed": { teamId: "팀" },
56983
+ "notion.on_database_page_event": { databaseId: "데이터베이스" },
56984
+ "shopify.on_shop_event": { topics: "주제" },
56985
+ "slack.on_message_posted": { channelId: "채널" },
56986
+ "stripe.on_event": { events: "이벤트" },
56987
+ "telegram.on_update": { updates: "업데이트 유형" },
56988
+ "woocommerce.on_store_event": { events: "이벤트" },
56989
+ "zendesk.on_event": { events: "이벤트" }
56990
+ },
56991
+ "ru": {
56992
+ "jira.on_issue_event": { sourceId: "Источник событий" },
56993
+ "fireflies.on_meeting_ready": { sourceId: "Источник событий" },
56994
+ "zoom.on_recording_ready": { sourceId: "Источник событий" },
56995
+ "sentry.on_issue_alert": { sourceId: "Источник событий" },
56996
+ "intercom.on_conversation_event": { sourceId: "Источник событий" },
56997
+ "slackbot.on_event": { sourceId: "Источник событий" },
56998
+ "asana.on_task_event": { projectId: "ID проекта" },
56999
+ "calendly.on_booking_event": {},
57000
+ "clickup.on_task_event": { workspaceId: "ID рабочего пространства" },
57001
+ "pandadoc.on_document_event": {},
57002
+ "pipedrive.on_crm_event": {},
57003
+ "resend.on_email_event": {},
57004
+ "typeform.on_form_response": { formId: "ID формы" },
57005
+ "vercel.on_deployment_event": {
57006
+ teamId: "ID команды",
57007
+ projectId: "ID проекта"
57008
+ },
57009
+ "tally.on_form_response": { formId: "Форма" },
57010
+ "feishu_app_bot.on_event": {
57011
+ sourceId: "Источник событий",
57012
+ eventTypes: "Принимаемые события"
57013
+ },
57014
+ "airtable.on_record_changed": {
57015
+ baseId: "База",
57016
+ tableIdOrName: "Таблица",
57017
+ triggerField: "Поле триггера"
57018
+ },
57019
+ "github.on_repo_event": {
57020
+ events: "События",
57021
+ owner: "Владелец репозитория",
57022
+ repo: "Репозиторий"
57023
+ },
57024
+ "github.watch_pull_request": {
57025
+ owner: "Владелец репозитория",
57026
+ repo: "Репозиторий",
57027
+ number: "Номер запроса на слияние"
57028
+ },
57029
+ "gitlab.on_project_event": {
57030
+ events: "События",
57031
+ project: "Проект"
57032
+ },
57033
+ "googlecalendar.on_event_changed": { calendarId: "Календарь" },
57034
+ "googledrive.on_file_change": {
57035
+ changeType: "Тип изменения",
57036
+ folderId: "Папка"
57037
+ },
57038
+ "googlesheets.on_row_added": {
57039
+ sheet: "Лист",
57040
+ spreadsheetId: "Таблица"
57041
+ },
57042
+ "linear.on_issue_changed": { teamId: "Команда" },
57043
+ "notion.on_database_page_event": { databaseId: "База данных" },
57044
+ "shopify.on_shop_event": { topics: "Темы" },
57045
+ "slack.on_message_posted": { channelId: "Канал" },
57046
+ "stripe.on_event": { events: "События" },
57047
+ "telegram.on_update": { updates: "Типы обновлений" },
57048
+ "woocommerce.on_store_event": { events: "События" },
57049
+ "zendesk.on_event": { events: "События" }
57050
+ },
57051
+ "fr": {
57052
+ "jira.on_issue_event": { sourceId: "Source d’événements" },
57053
+ "fireflies.on_meeting_ready": { sourceId: "Source d’événements" },
57054
+ "zoom.on_recording_ready": { sourceId: "Source d’événements" },
57055
+ "sentry.on_issue_alert": { sourceId: "Source d’événements" },
57056
+ "intercom.on_conversation_event": { sourceId: "Source d’événements" },
57057
+ "slackbot.on_event": { sourceId: "Source d’événements" },
57058
+ "asana.on_task_event": { projectId: "ID du projet" },
57059
+ "calendly.on_booking_event": {},
57060
+ "clickup.on_task_event": { workspaceId: "ID de l’espace de travail" },
57061
+ "pandadoc.on_document_event": {},
57062
+ "pipedrive.on_crm_event": {},
57063
+ "resend.on_email_event": {},
57064
+ "typeform.on_form_response": { formId: "ID du formulaire" },
57065
+ "vercel.on_deployment_event": {
57066
+ teamId: "ID de l’équipe",
57067
+ projectId: "ID du projet"
57068
+ },
57069
+ "tally.on_form_response": { formId: "Formulaire" },
57070
+ "feishu_app_bot.on_event": {
57071
+ sourceId: "Source d’événements",
57072
+ eventTypes: "Événements à recevoir"
57073
+ },
57074
+ "airtable.on_record_changed": {
57075
+ baseId: "Base",
57076
+ tableIdOrName: "Table",
57077
+ triggerField: "Champ déclencheur"
57078
+ },
57079
+ "github.on_repo_event": {
57080
+ events: "Événements",
57081
+ owner: "Propriétaire du dépôt",
57082
+ repo: "Dépôt"
57083
+ },
57084
+ "github.watch_pull_request": {
57085
+ owner: "Propriétaire du dépôt",
57086
+ repo: "Dépôt",
57087
+ number: "Numéro de la demande de tirage"
57088
+ },
57089
+ "gitlab.on_project_event": {
57090
+ events: "Événements",
57091
+ project: "Projet"
57092
+ },
57093
+ "googlecalendar.on_event_changed": { calendarId: "Agenda" },
57094
+ "googledrive.on_file_change": {
57095
+ changeType: "Type de modification",
57096
+ folderId: "Dossier"
57097
+ },
57098
+ "googlesheets.on_row_added": {
57099
+ sheet: "Feuille",
57100
+ spreadsheetId: "Feuille de calcul"
57101
+ },
57102
+ "linear.on_issue_changed": { teamId: "Équipe" },
57103
+ "notion.on_database_page_event": { databaseId: "Base de données" },
57104
+ "shopify.on_shop_event": { topics: "Sujets" },
57105
+ "slack.on_message_posted": { channelId: "Canal" },
57106
+ "stripe.on_event": { events: "Événements" },
57107
+ "telegram.on_update": { updates: "Types de mise à jour" },
57108
+ "woocommerce.on_store_event": { events: "Événements" },
57109
+ "zendesk.on_event": { events: "Événements" }
57110
+ }
57111
+ };
57112
+ //#endregion
57113
+ //#region src/trigger/providers/localization.ts
57114
+ var loaders = {
57115
+ "zh-CN": () => import("./zh-CN-Dg_xSGde.js"),
57116
+ "zh-TW": () => import("./zh-TW-oxuLwsV0.js"),
57117
+ "ja": () => import("./ja-CxQBHr2J.js"),
57118
+ "ko": () => import("./ko-D1Exiv1h.js"),
57119
+ "ru": () => import("./ru-BzLZv0B7.js"),
57120
+ "fr": () => import("./fr-CNTSedYU.js")
57121
+ };
57122
+ var cached = /* @__PURE__ */ new Map();
57123
+ var english = Promise.resolve({});
57124
+ function loadTriggerTranslations(locale) {
57125
+ if (locale == "en") return english;
57126
+ const existing = cached.get(locale);
57127
+ if (existing != null) return existing;
57128
+ const request = loaders[locale]().then((module) => module.default);
57129
+ cached.set(locale, request);
57130
+ request.catch(() => {
57131
+ if (cached.get(locale) == request) cached.delete(locale);
57132
+ });
57133
+ return request;
57134
+ }
57135
+ async function localizeTrigger(definition, locale) {
57136
+ const copy = (await loadTriggerTranslations(locale))[definition.key];
57137
+ const englishFields = englishTriggerFieldDescriptions[definition.key];
57138
+ return {
57139
+ configInputs: fieldDescriptions(definition.configInputs, copy?.configInputs, englishFields?.configInputs),
57140
+ configInputLabels: triggerConfigFieldLabels[locale][definition.key] ?? {},
57141
+ displayName: copy?.displayName ?? definition.displayName,
57142
+ description: copy?.description ?? definition.description,
57143
+ outputs: fieldDescriptions(definition.outputs, copy?.outputs, englishFields?.outputs)
57144
+ };
57145
+ }
57146
+ function fieldDescriptions(fields, translations, fallback) {
57147
+ return Object.fromEntries(fields.flatMap((field) => {
57148
+ if (!("handle" in field)) return [];
57149
+ const description = translations?.[field.handle] ?? fallback?.[field.handle] ?? field.description;
57150
+ return description == null ? [] : [[field.handle, description]];
57151
+ }));
57152
+ }
57153
+ //#endregion
56244
57154
  //#region src/flow/common/inputValue.ts
56245
57155
  /** An explicit clear suppresses the default; absent mappings still inherit it. */
56246
57156
  function inputValue(mapping, fallback) {
@@ -56272,6 +57182,167 @@ function dequal$1(foo, bar) {
56272
57182
  return foo !== foo && bar !== bar;
56273
57183
  }
56274
57184
  //#endregion
57185
+ //#region src/http/common/headers.ts
57186
+ /** Header names are case-insensitive; never silently combine duplicate business fields. */
57187
+ function httpHeaderNameIssue(name, names) {
57188
+ if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
57189
+ if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
57190
+ }
57191
+ //#endregion
57192
+ //#region src/flow/common/requestParameters.ts
57193
+ var requestParameterSchema = strictObject({
57194
+ mode: _enum(["fields", "object"]).default("fields"),
57195
+ names: array(string$1()).default([])
57196
+ });
57197
+ function requestParameterHandle(group, name) {
57198
+ return `${group === "query" ? "query" : "header"}.${name}`;
57199
+ }
57200
+ function requestParameterPorts(config, querySchema, queryValueSchema, headerSchema) {
57201
+ return ["query", "headers"].flatMap((group) => config[group].mode === "object" ? [{
57202
+ handle: group,
57203
+ jsonSchema: group === "query" ? querySchema : headerSchema,
57204
+ nullable: true
57205
+ }] : config[group].names.filter((name) => name.trim()).map((name) => ({
57206
+ handle: requestParameterHandle(group, name),
57207
+ jsonSchema: group === "query" ? queryValueSchema : { type: "string" },
57208
+ nullable: true
57209
+ })));
57210
+ }
57211
+ function retainRequestPorts(ports, old = []) {
57212
+ const remaining = new Map(ports.map((port) => [port.handle, port]));
57213
+ return [...old.flatMap((item) => {
57214
+ if ("group" in item) return [item];
57215
+ const next = remaining.get(item.handle);
57216
+ if (next == null) return [];
57217
+ remaining.delete(item.handle);
57218
+ return [dequal$1(item.jsonSchema, next.jsonSchema) && item.nullable == next.nullable ? item : next];
57219
+ }), ...remaining.values()];
57220
+ }
57221
+ function requestParameterIssues(config) {
57222
+ const issues = [];
57223
+ for (const group of ["query", "headers"]) {
57224
+ if (config[group].mode !== "fields") continue;
57225
+ const seen = /* @__PURE__ */ new Set();
57226
+ for (const [index, name] of config[group].names.entries()) {
57227
+ const key = group === "headers" ? name.toLowerCase() : name;
57228
+ if (!name.trim() || seen.has(key)) issues.push({
57229
+ field: group,
57230
+ index,
57231
+ code: "parameterNamesInvalid",
57232
+ message: "Parameter names must be nonempty and unique."
57233
+ });
57234
+ seen.add(key);
57235
+ if (group === "headers" && httpHeaderNameIssue(name, []) === "invalid") issues.push({
57236
+ field: group,
57237
+ index,
57238
+ code: "headerNameInvalid",
57239
+ message: "Invalid HTTP header name."
57240
+ });
57241
+ }
57242
+ }
57243
+ return issues;
57244
+ }
57245
+ //#endregion
57246
+ //#region src/connector/common/proxy.ts
57247
+ var connectorProxyConfigSchema = strictObject({
57248
+ providerId: string$1().min(1),
57249
+ connectionId: string$1().optional(),
57250
+ method: _enum([
57251
+ "GET",
57252
+ "POST",
57253
+ "PUT",
57254
+ "PATCH",
57255
+ "DELETE"
57256
+ ]).default("GET"),
57257
+ query: requestParameterSchema.default({
57258
+ mode: "fields",
57259
+ names: []
57260
+ }),
57261
+ headers: requestParameterSchema.default({
57262
+ mode: "fields",
57263
+ names: []
57264
+ }),
57265
+ bodyFormat: _enum(["none", "json"]).default("none")
57266
+ });
57267
+ var connectorProxyExecutorSchema = connectorProxyConfigSchema.extend({ kind: literal("connector-proxy") });
57268
+ var connectorProxyQueryValueSchema = { type: [
57269
+ "string",
57270
+ "number",
57271
+ "boolean",
57272
+ "null"
57273
+ ] };
57274
+ var connectorProxyQuerySchema = {
57275
+ type: "object",
57276
+ additionalProperties: connectorProxyQueryValueSchema
57277
+ };
57278
+ var connectorProxyHeaderSchema = {
57279
+ type: "object",
57280
+ additionalProperties: { type: "string" }
57281
+ };
57282
+ var connectorProxyBodyInput = {
57283
+ handle: "body",
57284
+ jsonSchema: {},
57285
+ nullable: true
57286
+ };
57287
+ function connectorProxySupportsBody(method) {
57288
+ return method !== "GET";
57289
+ }
57290
+ function connectorProxyHasBody(mapping, defaultValue) {
57291
+ if (mapping?.kind === "unset") return false;
57292
+ return mapping == null ? defaultValue !== void 0 : mapping.kind === "value" || mapping.sources.length > 0;
57293
+ }
57294
+ function connectorProxyTask(config, name = "Custom API Request", previous) {
57295
+ const { connectionId, ...settings } = config;
57296
+ const inputs = [
57297
+ {
57298
+ handle: "endpoint",
57299
+ jsonSchema: { type: "string" },
57300
+ nullable: false
57301
+ },
57302
+ ...requestParameterPorts(config, connectorProxyQuerySchema, connectorProxyQueryValueSchema, connectorProxyHeaderSchema),
57303
+ ...config.bodyFormat === "none" ? [] : [connectorProxyBodyInput]
57304
+ ];
57305
+ const outputs = [
57306
+ {
57307
+ handle: "body",
57308
+ jsonSchema: {},
57309
+ nullable: true
57310
+ },
57311
+ {
57312
+ handle: "statusCode",
57313
+ jsonSchema: { type: "integer" },
57314
+ nullable: false
57315
+ },
57316
+ {
57317
+ handle: "headers",
57318
+ jsonSchema: connectorProxyHeaderSchema,
57319
+ nullable: false
57320
+ },
57321
+ {
57322
+ handle: "bodyEncoding",
57323
+ jsonSchema: { const: "base64" },
57324
+ nullable: true
57325
+ }
57326
+ ];
57327
+ return {
57328
+ name,
57329
+ executor: {
57330
+ ...settings,
57331
+ ...connectionId === void 0 ? {} : { connectionId },
57332
+ kind: "connector-proxy"
57333
+ },
57334
+ inputs: retainRequestPorts(inputs, previous?.inputs),
57335
+ outputs: retainRequestPorts(outputs, previous?.outputs)
57336
+ };
57337
+ }
57338
+ function connectorProxyIssues(config, hasBody = config.bodyFormat !== "none") {
57339
+ return [...requestParameterIssues(config), ...!connectorProxySupportsBody(config.method) && hasBody ? [{
57340
+ field: "bodyFormat",
57341
+ code: "bodyUnsupported",
57342
+ message: "GET does not support a request body."
57343
+ }] : []];
57344
+ }
57345
+ //#endregion
56275
57346
  //#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
56276
57347
  function deepCompareStrict(a, b) {
56277
57348
  const typeofa = typeof a;
@@ -60374,18 +61445,7 @@ function isHttpHost(value) {
60374
61445
  return httpHostPattern.test(value) && (!value.startsWith("*.") || value.slice(2).includes("."));
60375
61446
  }
60376
61447
  //#endregion
60377
- //#region src/http/common/headers.ts
60378
- /** Header names are case-insensitive; never silently combine duplicate business fields. */
60379
- function httpHeaderNameIssue(name, names) {
60380
- if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
60381
- if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
60382
- }
60383
- //#endregion
60384
61448
  //#region src/http/common/httpRequest.ts
60385
- var parameterSchema = strictObject({
60386
- mode: _enum(["fields", "object"]).default("fields"),
60387
- names: array(string$1()).default([])
60388
- });
60389
61449
  var httpRequestConfigSchema = strictObject({
60390
61450
  method: _enum([
60391
61451
  "GET",
@@ -60396,11 +61456,11 @@ var httpRequestConfigSchema = strictObject({
60396
61456
  "HEAD",
60397
61457
  "OPTIONS"
60398
61458
  ]).default("GET"),
60399
- query: parameterSchema.default({
61459
+ query: requestParameterSchema.default({
60400
61460
  mode: "fields",
60401
61461
  names: []
60402
61462
  }),
60403
- headers: parameterSchema.default({
61463
+ headers: requestParameterSchema.default({
60404
61464
  mode: "fields",
60405
61465
  names: []
60406
61466
  }),
@@ -60447,32 +61507,12 @@ var httpQuerySchema = {
60447
61507
  function httpAuthHandles(config) {
60448
61508
  return config.authentication.type == "none" ? [] : config.authentication.type == "basic" ? ["auth.username", "auth.password"] : ["auth.token"];
60449
61509
  }
60450
- function retain(ports, old) {
60451
- const remaining = new Map(ports.map((port) => [port.handle, port]));
60452
- return [...old.flatMap((item) => {
60453
- if ("group" in item) return [item];
60454
- const next = remaining.get(item.handle);
60455
- if (next == null) return [];
60456
- remaining.delete(item.handle);
60457
- return [dequal$1(item.jsonSchema, next.jsonSchema) && item.nullable == next.nullable ? item : next];
60458
- }), ...remaining.values()];
60459
- }
60460
61510
  function httpRequestTask(config = httpRequestConfigSchema.parse({}), name = "HTTP Request", previous) {
60461
61511
  const inputs = [{
60462
61512
  handle: "url",
60463
61513
  jsonSchema: { type: "string" },
60464
61514
  nullable: false
60465
- }];
60466
- for (const group of ["query", "headers"]) if (config[group].mode == "object") inputs.push({
60467
- handle: group,
60468
- jsonSchema: group == "query" ? httpQuerySchema : httpHeaderSchema,
60469
- nullable: true
60470
- });
60471
- else for (const parameterName of config[group].names.filter((value) => value.trim())) inputs.push({
60472
- handle: `${group == "query" ? "query" : "header"}.${parameterName}`,
60473
- jsonSchema: group == "query" ? queryValueSchema : { type: "string" },
60474
- nullable: true
60475
- });
61515
+ }, ...requestParameterPorts(config, httpQuerySchema, queryValueSchema, httpHeaderSchema)];
60476
61516
  if (config.bodyFormat != "none") inputs.push({
60477
61517
  handle: "body",
60478
61518
  jsonSchema: config.bodyFormat == "json" ? {} : config.bodyFormat == "text" ? { type: "string" } : httpQuerySchema,
@@ -60506,8 +61546,8 @@ function httpRequestTask(config = httpRequestConfigSchema.parse({}), name = "HTT
60506
61546
  ...config,
60507
61547
  kind: "http-request"
60508
61548
  },
60509
- inputs: retain(inputs, previous?.inputs ?? []),
60510
- outputs: retain(outputs, previous?.outputs ?? [])
61549
+ inputs: retainRequestPorts(inputs, previous?.inputs),
61550
+ outputs: retainRequestPorts(outputs, previous?.outputs)
60511
61551
  };
60512
61552
  }
60513
61553
  function httpRequestIssues(config) {
@@ -60517,26 +61557,7 @@ function httpRequestIssues(config) {
60517
61557
  code: "bodyUnsupported",
60518
61558
  message: "GET and HEAD do not support a request body."
60519
61559
  });
60520
- for (const group of ["query", "headers"]) {
60521
- if (config[group].mode != "fields") continue;
60522
- const seen = /* @__PURE__ */ new Set();
60523
- for (const [index, name] of config[group].names.entries()) {
60524
- const key = group == "headers" ? name.toLowerCase() : name;
60525
- if (!name.trim() || seen.has(key)) issues.push({
60526
- field: group,
60527
- index,
60528
- code: "parameterNamesInvalid",
60529
- message: "Parameter names must be nonempty and unique."
60530
- });
60531
- seen.add(key);
60532
- if (group == "headers" && httpHeaderNameIssue(name, []) === "invalid") issues.push({
60533
- field: group,
60534
- index,
60535
- code: "headerNameInvalid",
60536
- message: "Invalid HTTP header name."
60537
- });
60538
- }
60539
- }
61560
+ issues.push(...requestParameterIssues(config));
60540
61561
  const auth = config.authentication;
60541
61562
  if (auth.type != "none") {
60542
61563
  const group = auth.type == "apiKey" && auth.in == "query" ? "query" : "headers";
@@ -60962,7 +61983,8 @@ var managedFields = object$2({
60962
61983
  revisionId: text
60963
61984
  }),
60964
61985
  httpRequestExecutorSchema,
60965
- skipDuplicatesExecutorSchema
61986
+ skipDuplicatesExecutorSchema,
61987
+ connectorProxyExecutorSchema
60966
61988
  ])
60967
61989
  });
60968
61990
  var managed = managedFields.transform(limitDecisionTask);
@@ -61233,7 +62255,8 @@ var revision = object$2({
61233
62255
  literal(10),
61234
62256
  literal(11),
61235
62257
  literal(12),
61236
- literal(13)
62258
+ literal(13),
62259
+ literal(14)
61237
62260
  ]),
61238
62261
  document: document$1,
61239
62262
  modules: record$3(text, module$1)
@@ -61434,6 +62457,7 @@ array(union$1([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, s
61434
62457
  ...shape
61435
62458
  })])).values()])).min(1);
61436
62459
  function checkModelVersion(content) {
62460
+ if (content.modelVersion < 14 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "connector-proxy")) throw new TypeError("Custom API Request requires Flow model v14.");
61437
62461
  if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "skip-duplicates")) throw new Error("Skip Duplicates requires Flow model v13.");
61438
62462
  if (content.modelVersion < 12 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "moduleId" in candidateNode.task && candidateNode.task.capabilities?.some((item) => item.kind == "http"))) throw new TypeError("Code HTTP access requires Flow model version 12.");
61439
62463
  if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind == "http-request")) throw new TypeError("HTTP Request requires Flow model version 11.");
@@ -61605,7 +62629,7 @@ var nodeErrorSchema = {
61605
62629
  }
61606
62630
  };
61607
62631
  function supportsNodeErrorHandling(node) {
61608
- return supportsNodeRetry(node) || node.kind === "task" && "executor" in node.task && node.task.executor.kind === "skip-duplicates";
62632
+ return supportsNodeRetry(node) || node.kind === "task" && "executor" in node.task && ["skip-duplicates", "connector-proxy"].includes(node.task.executor.kind);
61609
62633
  }
61610
62634
  function nodeSystemOutputPorts(node) {
61611
62635
  return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
@@ -61662,6 +62686,13 @@ function connectionUsage$7(document) {
61662
62686
  name
61663
62687
  });
61664
62688
  if (task?.executor.kind == "connector") add("connector", task.executor.action, task.executor.connectionId);
62689
+ if (task?.executor.kind == "connector-proxy") uses.push({
62690
+ kind: "connector-proxy",
62691
+ providerId: task.executor.providerId,
62692
+ connectionId: task.executor.connectionId,
62693
+ nodeId,
62694
+ name
62695
+ });
61665
62696
  if (node.kind == "task" && "moduleId" in node.task) {
61666
62697
  for (const capability of node.task.capabilities ?? []) if ("mode" in capability && capability.mode == "independent") for (const action of capability.actions) add("code", action.action, action.connectionId);
61667
62698
  }
@@ -61876,6 +62907,17 @@ function triggerOutputPorts(trigger) {
61876
62907
  return Object.fromEntries(triggerOutputDefinitions(trigger).map(({ handle, ...port }) => [handle, port]));
61877
62908
  }
61878
62909
  //#endregion
62910
+ //#region src/base/common/jsonSchema.ts
62911
+ /** Keep local definition references usable when a property becomes a standalone schema. */
62912
+ function propertySchemaWithDefinitions(root, schema) {
62913
+ const property = toPlainObject(schema);
62914
+ if (property == null) return schema;
62915
+ const result = Object.assign({}, property);
62916
+ if (result.$defs == null && root.$defs != null) result.$defs = root.$defs;
62917
+ if (result.definitions == null && root.definitions != null) result.definitions = root.definitions;
62918
+ return result;
62919
+ }
62920
+ //#endregion
61879
62921
  //#region src/flow/common/sourceField.ts
61880
62922
  /** Only explicitly declared, first-level object properties are selectable. */
61881
62923
  function sourceFields(output) {
@@ -61892,7 +62934,7 @@ function sourceFields(output) {
61892
62934
  field,
61893
62935
  port: {
61894
62936
  ...typeof description == "string" ? { description } : {},
61895
- jsonSchema,
62937
+ jsonSchema: propertySchemaWithDefinitions(schema, jsonSchema),
61896
62938
  nullable: missingParent || !required.includes(field)
61897
62939
  }
61898
62940
  };
@@ -62708,8 +63750,8 @@ function selectOperation(value, sourceUrl, path, method) {
62708
63750
  }
62709
63751
  //#endregion
62710
63752
  //#region src/runtime/common/engineContract.ts
62711
- /** v10 adds persistent Flow State to the published v9 Node compatibility and fetch contract. */
62712
- var currentEngineContract = "open-flow-engine/v10";
63753
+ /** v11 adds Provider API requests through Connector Proxy. */
63754
+ var currentEngineContract = "open-flow-engine/v11";
62713
63755
  /** The published v8 Node compatibility contract, retained for existing Publications and Runs. */
62714
63756
  var nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
62715
63757
  var platformSource = (contract) => `export const engineContract = ${JSON.stringify(contract)}
@@ -62759,13 +63801,19 @@ var v9Contract = {
62759
63801
  codeFetch: true,
62760
63802
  platformSource: platformSource("open-flow-engine/v9")
62761
63803
  };
62762
- var currentContract = {
63804
+ var v10Contract = {
62763
63805
  ...v9Contract,
62764
63806
  flowState: true,
63807
+ platformSource: platformSource("open-flow-engine/v10")
63808
+ };
63809
+ var currentContract = {
63810
+ ...v10Contract,
63811
+ connectorProxy: true,
62765
63812
  platformSource: platformSource(currentEngineContract)
62766
63813
  };
62767
63814
  function findEngineContract(contract) {
62768
- if (contract == "open-flow-engine/v10") return currentContract;
63815
+ if (contract == "open-flow-engine/v11") return currentContract;
63816
+ if (contract == "open-flow-engine/v10") return v10Contract;
62769
63817
  if (contract == "open-flow-engine/v9") return v9Contract;
62770
63818
  if (contract == "open-flow-engine/v8") return v8Contract;
62771
63819
  if (contract == "open-flow-engine/v8/nodejs-compat-v1") return nodejsContract;
@@ -63761,7 +64809,10 @@ var RevisionView = class {
63761
64809
  const separator = actionId.indexOf(".");
63762
64810
  if (separator > 0) connectorProviderIds.add(actionId.slice(0, separator));
63763
64811
  }
63764
- for (const node of Object.values(this.#document.graph.nodes)) if (node.kind == "integration" || node.kind == "poll") connectorProviderIds.add(node.definition.provider);
64812
+ for (const node of Object.values(this.#document.graph.nodes)) {
64813
+ if (node.kind == "integration" || node.kind == "poll") connectorProviderIds.add(node.definition.provider);
64814
+ if (node.kind === "task" && "executor" in node.task && node.task.executor.kind === "connector-proxy") connectorProviderIds.add(node.task.executor.providerId);
64815
+ }
63765
64816
  this.connectorProviderIds = connectorProviderIds;
63766
64817
  }
63767
64818
  inputMappings(node) {
@@ -64158,6 +65209,7 @@ var type$3 = _enum([
64158
65209
  "integration",
64159
65210
  "code",
64160
65211
  "connector",
65212
+ "connector-proxy",
64161
65213
  "agent",
64162
65214
  "llm",
64163
65215
  "decision",
@@ -64292,6 +65344,7 @@ var authoringConfigurations = {
64292
65344
  capabilities: authoringCapabilities.optional()
64293
65345
  }),
64294
65346
  "connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
65347
+ "connector-proxy": connectorProxyConfigSchema,
64295
65348
  "openapi": authoringOpenApiSchema,
64296
65349
  "http-request": httpRequestConfigSchema,
64297
65350
  "skip-duplicates": skipDuplicatesConfigSchema,
@@ -64857,7 +65910,12 @@ function savedVerticalNodeWidths(value) {
64857
65910
  //#region src/workbench/browser/runtime/workspace.ts
64858
65911
  function semanticNodeIcon(node, connectorActions, providers = {}) {
64859
65912
  if (node.node.icon != null) return node.node.icon;
64860
- if (node.kind != "task" || node.definition == null || !("executor" in node.definition) || node.definition.executor.kind != "connector") return nodeIcon(node);
65913
+ if (node.kind != "task" || node.definition == null || !("executor" in node.definition)) return nodeIcon(node);
65914
+ if (node.definition.executor.kind === "connector-proxy") {
65915
+ const provider = providers[node.definition.executor.providerId];
65916
+ return provider == null ? nodeIcon(node) : providerIcon(provider);
65917
+ }
65918
+ if (node.definition.executor.kind !== "connector") return nodeIcon(node);
64861
65919
  const actionId = node.definition.executor.action;
64862
65920
  const provider = connectorActions[actionId] ?? providers[actionId.split(".")[0]];
64863
65921
  return provider == null ? nodeIcon(node) : providerIcon(provider);
@@ -64901,7 +65959,7 @@ function nodeIcon(node) {
64901
65959
  if (task.executor.kind == "http-request") return ":lucide-light:globe:";
64902
65960
  if (task.executor.kind == "skip-duplicates") return ":lucide-light:list-filter:";
64903
65961
  if (task.executor.kind == "openapi") return ":logos:openapi-icon:";
64904
- return task.executor.kind == "connector" ? ":carbon:connection-signal:" : ":carbon:machine-learning-model:";
65962
+ return task.executor.kind == "connector" || task.executor.kind === "connector-proxy" ? ":carbon:connection-signal:" : ":carbon:machine-learning-model:";
64905
65963
  }
64906
65964
  }
64907
65965
  }
@@ -65164,7 +66222,8 @@ function executorName(task, providerName, t) {
65164
66222
  if (task.executor.kind == "openapi") return "OpenAPI";
65165
66223
  if (task.executor.kind == "skip-duplicates") return t?.("flowState.nodeTitle") ?? "Skip Duplicates";
65166
66224
  if (task.executor.kind == "llm") return t?.("designer.executorLlm") ?? "LLM";
65167
- return `${t?.("designer.executorConnector") ?? "Connector"} · ${providerName ?? task.executor.action.split(".")[0]}`;
66225
+ const providerId = task.executor.kind === "connector-proxy" ? task.executor.providerId : task.executor.action.split(".")[0];
66226
+ return `${t?.("designer.executorConnector") ?? "Connector"} · ${providerName ?? providerId}`;
65168
66227
  }
65169
66228
  function triggerIcon(trigger) {
65170
66229
  switch (trigger.kind) {
@@ -65371,13 +66430,14 @@ function semanticDesignerNode(nodeId, resolved, ports, position, context) {
65371
66430
  const inputs = groupedInputs(resolved, designerInputs(nodeId, node, ports, context.revision));
65372
66431
  const outputs = groupedOutputs(resolved, designerOutputs(ports));
65373
66432
  const task = resolved.kind == "task" ? resolved.definition : void 0;
65374
- const connector = task != null && "executor" in task && task.executor.kind == "connector" ? task.executor : void 0;
65375
- const connectorAction = connector == null ? void 0 : context.connectorActions[connector.action];
65376
- const connectorProvider = connector == null ? void 0 : context.providers[connector.action.split(".")[0]];
65377
- const connections = connectorAction == null ? void 0 : context.connectionCatalogs[connectorAction.serviceId];
66433
+ const connector = task != null && "executor" in task && (task.executor.kind == "connector" || task.executor.kind === "connector-proxy") ? task.executor : void 0;
66434
+ const connectorAction = connector?.kind !== "connector" ? void 0 : context.connectorActions[connector.action];
66435
+ const providerId = connector?.kind === "connector-proxy" ? connector.providerId : connector?.action.split(".")[0];
66436
+ const connectorProvider = providerId == null ? void 0 : context.providers[providerId];
66437
+ const connections = providerId == null ? void 0 : context.connectionCatalogs[providerId];
65378
66438
  const connectionId = connector?.connectionId;
65379
66439
  const selectedConnection = connectionId == null ? void 0 : connections?.byId.get(connectionId);
65380
- const connectionRequired = connectionId !== "" && connectorAction?.authenticated == true && (connector?.connectionId == null || connections != null && selectedConnection?.status != "active") || nodeDiagnosticCount(resolved, context.diagnostics.filter((diagnostic) => diagnostic.code === "task.action-connection-required")) > 0;
66440
+ const connectionRequired = connectionId !== "" && (connector?.kind === "connector-proxy" ? connectorProvider != null && !connectorProvider.noSetup : connectorAction?.authenticated == true) && (connector?.connectionId == null || connections != null && selectedConnection?.status != "active") || nodeDiagnosticCount(resolved, context.diagnostics.filter((diagnostic) => diagnostic.code === "task.action-connection-required")) > 0;
65381
66441
  const nodeRun = context.runNodes.get(nodeId);
65382
66442
  const common = {
65383
66443
  description: node.description,
@@ -66718,6 +67778,214 @@ function FlowNodeList({ nodes, onFocusNode, onSelect, groupTriggers = false }) {
66718
67778
  })
66719
67779
  });
66720
67780
  }
67781
+ var fieldTable_module_default = {
67782
+ list: "fieldTable_list_14bfd",
67783
+ columns: "fieldTable_columns_14bfd",
67784
+ nameHeading: "fieldTable_nameHeading_14bfd",
67785
+ typeHeading: "fieldTable_typeHeading_14bfd",
67786
+ valueHeading: "fieldTable_valueHeading_14bfd",
67787
+ row: "fieldTable_row_14bfd",
67788
+ nullableControl: "fieldTable_nullableControl_14bfd",
67789
+ nullableHeading: "fieldTable_nullableHeading_14bfd"
67790
+ };
67791
+ var fieldBranch_module_default = { branch: "fieldBranch_branch_a5820" };
67792
+ var valueEditor_module_default = {
67793
+ root: "valueEditor_root_4a4f1",
67794
+ errorAnchor: "valueEditor_errorAnchor_4a4f1",
67795
+ body: "valueEditor_body_4a4f1",
67796
+ valueTools: "valueEditor_valueTools_4a4f1",
67797
+ options: "valueEditor_options_4a4f1",
67798
+ toolbar: "valueEditor_toolbar_4a4f1",
67799
+ presence: "valueEditor_presence_4a4f1",
67800
+ actions: "valueEditor_actions_4a4f1",
67801
+ collection: "valueEditor_collection_4a4f1",
67802
+ fieldName: "valueEditor_fieldName_4a4f1",
67803
+ fieldType: "valueEditor_fieldType_4a4f1",
67804
+ json: "valueEditor_json_4a4f1",
67805
+ description: "valueEditor_description_4a4f1",
67806
+ error: "valueEditor_error_4a4f1",
67807
+ summary: "valueEditor_summary_4a4f1",
67808
+ summaryError: "valueEditor_summaryError_4a4f1",
67809
+ srOnly: "valueEditor_srOnly_4a4f1",
67810
+ option: "valueEditor_option_4a4f1",
67811
+ header: "valueEditor_header_4a4f1",
67812
+ leadingControl: "valueEditor_leadingControl_4a4f1",
67813
+ toggleControl: "valueEditor_toggleControl_4a4f1",
67814
+ valueAddon: "valueEditor_valueAddon_4a4f1",
67815
+ summaryText: "valueEditor_summaryText_4a4f1",
67816
+ clearValue: "valueEditor_clearValue_4a4f1",
67817
+ resetValue: "valueEditor_resetValue_4a4f1",
67818
+ unsetValue: "valueEditor_unsetValue_4a4f1",
67819
+ arrayIndex: "valueEditor_arrayIndex_4a4f1",
67820
+ nullValue: "valueEditor_nullValue_4a4f1",
67821
+ nullChip: "valueEditor_nullChip_4a4f1",
67822
+ collectionActions: "valueEditor_collectionActions_4a4f1",
67823
+ emptyObjectContent: "valueEditor_emptyObjectContent_4a4f1",
67824
+ emptyObjectConstraint: "valueEditor_emptyObjectConstraint_4a4f1",
67825
+ jsonCode: "valueEditor_jsonCode_4a4f1",
67826
+ emptyString: "valueEditor_emptyString_4a4f1",
67827
+ booleanControl: "valueEditor_booleanControl_4a4f1",
67828
+ booleanIndicator: "valueEditor_booleanIndicator_4a4f1",
67829
+ objectNotice: "valueEditor_objectNotice_4a4f1",
67830
+ valuePrefix: "valueEditor_valuePrefix_4a4f1"
67831
+ };
67832
+ //#endregion
67833
+ //#region src/form/browser/fieldLayout.tsx
67834
+ var Geometry = createContext({
67835
+ depth: 0,
67836
+ layout: "values"
67837
+ });
67838
+ function FieldLayout({ children, depth = 0, layout = "values", columns, gap }) {
67839
+ return /* @__PURE__ */ jsx(Geometry.Provider, {
67840
+ value: {
67841
+ depth,
67842
+ layout,
67843
+ columns,
67844
+ gap
67845
+ },
67846
+ children
67847
+ });
67848
+ }
67849
+ var FieldRow = forwardRef(({ columns, gap, header, valueOnly, leadingControl, disclosureContent, trailingControl, actions, layout, depth, typeWidth, disclosure, label, sorting, disclosureInvalid, stacking = "editor", children, style, className, ...props }, ref) => {
67850
+ const geometry = useContext(Geometry);
67851
+ const level = depth ?? geometry.depth;
67852
+ const hasHeader = header != null || valueOnly === true;
67853
+ return /* @__PURE__ */ jsxs("div", {
67854
+ ...props,
67855
+ ref,
67856
+ className: [valueEditor_module_default.root, className].filter(Boolean).join(" "),
67857
+ "data-stacking": stacking,
67858
+ "data-layout": layout ?? geometry.layout,
67859
+ "data-header": hasHeader || void 0,
67860
+ "data-value-only": valueOnly || void 0,
67861
+ "data-nested-field": level > 0 || void 0,
67862
+ style: {
67863
+ "gridTemplateColumns": columns ?? geometry.columns,
67864
+ "columnGap": gap ?? geometry.gap,
67865
+ "--field-indent": `${level * 16}px`,
67866
+ ...typeWidth === "fixed" ? { "--field-type-width": "32px" } : typeWidth === "editable" ? { "--field-type-width": "56px" } : {},
67867
+ ...style
67868
+ },
67869
+ children: [
67870
+ hasHeader && /* @__PURE__ */ jsxs("div", {
67871
+ className: valueEditor_module_default.header,
67872
+ children: [
67873
+ leadingControl != null && /* @__PURE__ */ jsx("div", {
67874
+ className: valueEditor_module_default.leadingControl,
67875
+ children: leadingControl
67876
+ }),
67877
+ /* @__PURE__ */ jsxs("div", {
67878
+ className: valueEditor_module_default.toggleControl,
67879
+ children: [disclosure && (!sorting || leadingControl == null) && /* @__PURE__ */ jsx(Button$1, {
67880
+ type: "button",
67881
+ size: "icon-xs",
67882
+ className: "w-[var(--field-toggle-width,24px)]",
67883
+ variant: "disclosure",
67884
+ "aria-label": label,
67885
+ "aria-expanded": disclosure.expanded,
67886
+ "aria-invalid": disclosureInvalid || void 0,
67887
+ "aria-controls": disclosure.controls,
67888
+ onClick: disclosure.onToggle,
67889
+ children: disclosureContent ?? /* @__PURE__ */ jsx("i", {
67890
+ "aria-hidden": "true",
67891
+ className: disclosure.expanded ? "i-lucide-light:chevron-down" : "i-lucide-light:chevron-right"
67892
+ })
67893
+ }), !disclosure && leadingControl == null && disclosureContent]
67894
+ }),
67895
+ !valueOnly && (typeof header === "function" ? header(disclosure) : header)
67896
+ ]
67897
+ }),
67898
+ children,
67899
+ trailingControl,
67900
+ actions != null && /* @__PURE__ */ jsx("div", {
67901
+ className: valueEditor_module_default.options,
67902
+ children: actions
67903
+ })
67904
+ ]
67905
+ });
67906
+ });
67907
+ /** Expanded values stay in their cell; structural branches establish a child geometry and connector. */
67908
+ function FieldBody({ placement, endpoint = "control", depth, className, children, ...props }) {
67909
+ const geometry = useContext(Geometry);
67910
+ return /* @__PURE__ */ jsx("div", {
67911
+ ...props,
67912
+ className: [className, placement === "branch" && fieldBranch_module_default.branch].filter(Boolean).join(" "),
67913
+ "data-field-branch": placement === "branch" || void 0,
67914
+ "data-branch-endpoint": placement === "branch" ? endpoint : void 0,
67915
+ children: /* @__PURE__ */ jsx(FieldLayout, {
67916
+ ...geometry,
67917
+ depth: depth ?? geometry.depth + (placement === "branch" ? 1 : 0),
67918
+ children
67919
+ })
67920
+ });
67921
+ }
67922
+ //#endregion
67923
+ //#region src/form/browser/fieldTable.tsx
67924
+ /** Shared field geometry. Callers own definitions, values, actions and persistence. */
67925
+ var FieldTable = forwardRef(({ layout = "definition", fixedTypes, typeColumn = true, columnHeadings = true, output, nullable, empty, actionSlots = 1, standalone, className, children, ...props }, ref) => {
67926
+ const t = useTranslate();
67927
+ return /* @__PURE__ */ jsxs("div", {
67928
+ ...props,
67929
+ ref,
67930
+ className: [fieldTable_module_default.list, className].filter(Boolean).join(" "),
67931
+ "data-value-editor-scope": true,
67932
+ "data-layout": layout,
67933
+ "data-type-column": typeColumn || void 0,
67934
+ "data-output": output || void 0,
67935
+ "data-fixed-types": fixedTypes || void 0,
67936
+ "data-nullable": nullable || void 0,
67937
+ "data-empty": empty || void 0,
67938
+ "data-action-slots": actionSlots,
67939
+ "data-standalone": standalone || void 0,
67940
+ children: [columnHeadings && !empty && /* @__PURE__ */ jsxs("div", {
67941
+ className: fieldTable_module_default.columns,
67942
+ "data-layout": layout,
67943
+ "data-output": output || void 0,
67944
+ children: [
67945
+ /* @__PURE__ */ jsx("span", {
67946
+ className: fieldTable_module_default.nameHeading,
67947
+ children: t("valueEditor.columnName")
67948
+ }),
67949
+ typeColumn && /* @__PURE__ */ jsx("span", {
67950
+ className: fieldTable_module_default.typeHeading,
67951
+ children: t("valueEditor.columnType")
67952
+ }),
67953
+ !output && /* @__PURE__ */ jsx("span", {
67954
+ className: fieldTable_module_default.valueHeading,
67955
+ children: t("valueEditor.columnValue")
67956
+ }),
67957
+ nullable && /* @__PURE__ */ jsx("span", {
67958
+ className: fieldTable_module_default.nullableHeading,
67959
+ children: t("valueEditor.nullable")
67960
+ })
67961
+ ]
67962
+ }), /* @__PURE__ */ jsx(FieldLayout, {
67963
+ layout,
67964
+ children
67965
+ })]
67966
+ });
67967
+ });
67968
+ function FieldTableRow({ className, ...props }) {
67969
+ return /* @__PURE__ */ jsx("div", {
67970
+ ...props,
67971
+ className: [fieldTable_module_default.row, className].filter(Boolean).join(" ")
67972
+ });
67973
+ }
67974
+ function FieldNullable({ name, checked, onChange }) {
67975
+ const t = useTranslate();
67976
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
67977
+ render: /* @__PURE__ */ jsx("span", { className: fieldTable_module_default.nullableControl }),
67978
+ children: /* @__PURE__ */ jsx(Checkbox, {
67979
+ className: "not-data-disabled:cursor-pointer",
67980
+ "aria-label": `${name} ${t("valueEditor.nullable")}`,
67981
+ "aria-checked": checked,
67982
+ checked,
67983
+ indeterminate: !onChange && !checked,
67984
+ disabled: !onChange,
67985
+ onCheckedChange: (next) => onChange?.(next === true)
67986
+ })
67987
+ }), /* @__PURE__ */ jsx(TooltipContent, { children: t(checked ? "valueEditor.nullableDescription" : "valueEditor.notNullableDescription") })] });
67988
+ }
66721
67989
  //#endregion
66722
67990
  //#region src/ui/browser/label.tsx
66723
67991
  function Label({ className, ...props }) {
@@ -66903,46 +68171,6 @@ var Input = m$4.forwardRef(function Input({ className, type, controlSize = "defa
66903
68171
  ...props
66904
68172
  });
66905
68173
  });
66906
- var valueEditor_module_default = {
66907
- root: "valueEditor_root_4a4f1",
66908
- errorAnchor: "valueEditor_errorAnchor_4a4f1",
66909
- body: "valueEditor_body_4a4f1",
66910
- valueTools: "valueEditor_valueTools_4a4f1",
66911
- options: "valueEditor_options_4a4f1",
66912
- toolbar: "valueEditor_toolbar_4a4f1",
66913
- presence: "valueEditor_presence_4a4f1",
66914
- actions: "valueEditor_actions_4a4f1",
66915
- collection: "valueEditor_collection_4a4f1",
66916
- fieldName: "valueEditor_fieldName_4a4f1",
66917
- fieldType: "valueEditor_fieldType_4a4f1",
66918
- json: "valueEditor_json_4a4f1",
66919
- description: "valueEditor_description_4a4f1",
66920
- error: "valueEditor_error_4a4f1",
66921
- summary: "valueEditor_summary_4a4f1",
66922
- summaryError: "valueEditor_summaryError_4a4f1",
66923
- srOnly: "valueEditor_srOnly_4a4f1",
66924
- option: "valueEditor_option_4a4f1",
66925
- header: "valueEditor_header_4a4f1",
66926
- leadingControl: "valueEditor_leadingControl_4a4f1",
66927
- toggleControl: "valueEditor_toggleControl_4a4f1",
66928
- valueAddon: "valueEditor_valueAddon_4a4f1",
66929
- summaryText: "valueEditor_summaryText_4a4f1",
66930
- clearValue: "valueEditor_clearValue_4a4f1",
66931
- resetValue: "valueEditor_resetValue_4a4f1",
66932
- unsetValue: "valueEditor_unsetValue_4a4f1",
66933
- arrayIndex: "valueEditor_arrayIndex_4a4f1",
66934
- nullValue: "valueEditor_nullValue_4a4f1",
66935
- nullChip: "valueEditor_nullChip_4a4f1",
66936
- collectionActions: "valueEditor_collectionActions_4a4f1",
66937
- emptyObjectContent: "valueEditor_emptyObjectContent_4a4f1",
66938
- emptyObjectConstraint: "valueEditor_emptyObjectConstraint_4a4f1",
66939
- jsonCode: "valueEditor_jsonCode_4a4f1",
66940
- emptyString: "valueEditor_emptyString_4a4f1",
66941
- booleanControl: "valueEditor_booleanControl_4a4f1",
66942
- booleanIndicator: "valueEditor_booleanIndicator_4a4f1",
66943
- objectNotice: "valueEditor_objectNotice_4a4f1",
66944
- valuePrefix: "valueEditor_valuePrefix_4a4f1"
66945
- };
66946
68174
  //#endregion
66947
68175
  //#region src/form/browser/fieldControl.tsx
66948
68176
  /** Gives custom value controls the same attached validation feedback as built-in editors. */
@@ -78798,8 +80026,8 @@ function editorComponent(schema) {
78798
80026
  }
78799
80027
  return Object.values(editorGroups).some((group) => group.includes(type)) ? type : "json";
78800
80028
  }
78801
- /** Choose a starting editor from simple schema hints; unresolved JSON defaults to single-line text. */
78802
- function defaultValueEditorSchema(schema) {
80029
+ /** Prefer schema hints; an explicit fallback respects the stored value's type without converting it. */
80030
+ function defaultValueEditorSchema(schema, fallback) {
78803
80031
  const hints = { ...objectValue(schema) };
78804
80032
  if (hints["ui:widget"] === "any") delete hints["ui:widget"];
78805
80033
  delete hints.anyOf;
@@ -78810,7 +80038,8 @@ function defaultValueEditorSchema(schema) {
78810
80038
  if (hints.properties != null) hints.type = "object";
78811
80039
  else if (hints.items != null) hints.type = "array";
78812
80040
  }
78813
- return editorComponent(hints) === "json" ? schemaForEditor("string", schema) : hints;
80041
+ const component = fallback == null ? "string" : fallback.value == null ? fallback.component : valueType({}, fallback.value);
80042
+ return editorComponent(hints) === "json" ? schemaForEditor(component, schema) : hints;
78814
80043
  }
78815
80044
  /** Changing the editor replaces incompatible constraints, retaining descriptive metadata. */
78816
80045
  function schemaForEditor(component, previous) {
@@ -79103,14 +80332,14 @@ function AccountControlButton({ disabled, status, label, hint, onClick }) {
79103
80332
  })]
79104
80333
  }) }), /* @__PURE__ */ jsx(TooltipContent, { children: hint ?? label })] });
79105
80334
  }
79106
- function AccountSelect({ connections, disabled, loading = false, id, invalid, warning, addWhenEmpty, allowDeferred = false, label, selectedConnection, selectedId, onChange, onManage }) {
80335
+ function AccountSelect({ connections, disabled, readOnly = false, loading = false, id, invalid, warning, addWhenEmpty, allowDeferred = false, label, selectedConnection, selectedId, onChange, onManage }) {
79107
80336
  const t = useTranslate();
79108
80337
  const [container, setContainer] = useState(null);
79109
80338
  const selected = selectedConnection ?? connections.find((candidate) => candidate.connectionId == selectedId);
79110
80339
  const showLoading = loading && selected == null && selectedId !== "";
79111
80340
  const builtInName = t("inspector.account.oomolBuiltIn");
79112
80341
  const displayName = (connection) => accountDisplayName(connection, connection.displayName, builtInName);
79113
- const selectedLabel = selectedId === "" ? t("inspector.account.deferred") : selected == null ? selectedId == null ? void 0 : `${selectedId} (${t("inspector.account.unavailable")})` : `${displayName(selected)}${selected.isDefault ? ` (${t("inspector.account.teamDefault")})` : ""}`;
80342
+ const selectedLabel = selectedId === "" ? t("inspector.account.deferred") : selected == null ? selectedId == null ? void 0 : readOnly ? selectedId : `${selectedId} (${t("inspector.account.unavailable")})` : `${displayName(selected)}${selected.isDefault ? ` (${t("inspector.account.teamDefault")})` : ""}`;
79114
80343
  const missingSelected = selectedId != null && selectedId !== "" && !connections.some((candidate) => candidate.connectionId == selectedId);
79115
80344
  const empty = !loading && connections.length == 0;
79116
80345
  const items = [
@@ -79138,7 +80367,7 @@ function AccountSelect({ connections, disabled, loading = false, id, invalid, wa
79138
80367
  label: t("inspector.account.addAccount")
79139
80368
  }]
79140
80369
  ];
79141
- if (!allowDeferred && !loading && addWhenEmpty && connections.length === 0 && selectedId == null) return /* @__PURE__ */ jsx(AccountControlButton, {
80370
+ if (!readOnly && !allowDeferred && !loading && addWhenEmpty && connections.length === 0 && selectedId == null) return /* @__PURE__ */ jsx(AccountControlButton, {
79142
80371
  disabled,
79143
80372
  status: "warning",
79144
80373
  onClick: onManage,
@@ -79148,7 +80377,7 @@ function AccountSelect({ connections, disabled, loading = false, id, invalid, wa
79148
80377
  ref: setContainer,
79149
80378
  className: "account-select relative min-w-0",
79150
80379
  children: [/* @__PURE__ */ jsxs(Select$1, {
79151
- disabled: disabled || loading,
80380
+ disabled: readOnly || disabled || loading,
79152
80381
  items,
79153
80382
  value: selectedId ?? null,
79154
80383
  onValueChange: (value) => {
@@ -79165,8 +80394,8 @@ function AccountSelect({ connections, disabled, loading = false, id, invalid, wa
79165
80394
  "data-status": invalid ? "danger" : warning ? "warning" : void 0,
79166
80395
  className: `${fieldSelectTriggerClass} account-control`,
79167
80396
  children: /* @__PURE__ */ jsx(SelectValue, {
79168
- className: !loading && selectedId != null ? "mr-5" : void 0,
79169
- placeholder: t("inspector.account.chooseAccount"),
80397
+ className: !readOnly && !loading && selectedId != null ? "mr-5" : void 0,
80398
+ placeholder: t(readOnly ? "connectorAccess.noAccountSelected" : "inspector.account.chooseAccount"),
79170
80399
  children: showLoading ? /* @__PURE__ */ jsxs("span", {
79171
80400
  role: "status",
79172
80401
  className: "flex min-w-0 items-center gap-2 text-muted-foreground",
@@ -79220,7 +80449,7 @@ function AccountSelect({ connections, disabled, loading = false, id, invalid, wa
79220
80449
  })] })
79221
80450
  ]
79222
80451
  })]
79223
- }), !loading && selectedId != null && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button$1, {
80452
+ }), !readOnly && !loading && selectedId != null && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button$1, {
79224
80453
  className: "account-select-clear absolute top-1/2 right-7 -translate-y-1/2 text-muted-foreground",
79225
80454
  type: "button",
79226
80455
  variant: "ghost",
@@ -79243,17 +80472,18 @@ function AccountSelect({ connections, disabled, loading = false, id, invalid, wa
79243
80472
  })] })]
79244
80473
  });
79245
80474
  }
79246
- function ConnectorAccount({ accessError, onConfigureAccess, action, actionError, actionId, activeConnections, authorizationPending, connection, connectionError, connectionId, connectors, disabled, fieldIdPrefix, loading, nodeId }) {
80475
+ function ConnectorAccount({ accessError, onConfigureAccess, resource, actionError, actionId, activeConnections, authorizationPending, connection, connectionError, connectionId, connectors, disabled, fieldIdPrefix, loading, nodeId }) {
79247
80476
  const t = useTranslate();
79248
80477
  const available = activeConnections ?? [];
80478
+ const authenticated = resource == null ? void 0 : "authenticated" in resource ? resource.authenticated : !resource.noSetup;
79249
80479
  const accessIssue = accessError ?? (actionError?.code == "connector.access-required" || actionError?.code == "connector.access-invalid" ? actionError.message : void 0);
79250
- const pending = loading || accessIssue == null && actionError == null && (action == null || activeConnections == null && connectionError == null);
79251
- const required = !pending && (accessIssue != null || connectionId !== "" && action?.authenticated == true && (connectionId == null || activeConnections != null && connection?.status != "active"));
80480
+ const pending = loading || accessIssue == null && actionError == null && (resource == null || activeConnections == null && connectionError == null);
80481
+ const required = !pending && (accessIssue != null || connectionId !== "" && authenticated == true && (connectionId == null || activeConnections != null && connection?.status != "active"));
79252
80482
  let onManage;
79253
80483
  let content;
79254
80484
  if (pending) content = /* @__PURE__ */ jsx("p", { children: t("inspector.account.loading") });
79255
80485
  else if (accessIssue != null) content = /* @__PURE__ */ jsx("p", { children: accessIssue });
79256
- else if (actionError != null || action == null) {
80486
+ else if (actionError != null || resource == null) {
79257
80487
  const canRetry = actionError?.code != "authorization.denied" && actionError?.code != "connector.action-not-found";
79258
80488
  content = /* @__PURE__ */ jsx(ConnectionAlert, {
79259
80489
  disabled,
@@ -79371,19 +80601,26 @@ function TriggerConnection({ activeConnections, authorizationPending, connection
79371
80601
  });
79372
80602
  }
79373
80603
  /** A persisted reference has no live account health or authorization state. */
79374
- function SavedConnectionReference({ action, connectionId }) {
80604
+ function SavedConnectionReference({ noSetup, connectionId }) {
79375
80605
  const t = useTranslate();
79376
- return /* @__PURE__ */ jsxs(InspectorStatusSection, {
80606
+ if (noSetup || connectionId?.startsWith("no_auth:")) return null;
80607
+ return /* @__PURE__ */ jsx(InspectorStatusSection, {
79377
80608
  title: t("inspector.account.title"),
79378
80609
  section: "account",
79379
- children: [/* @__PURE__ */ jsx("p", {
79380
- className: "reference-value",
79381
- children: action
79382
- }), connectionId != null && /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: t("inspector.account.connection") }), /* @__PURE__ */ jsx(Input, {
79383
- "aria-label": t("inspector.account.connection"),
79384
- readOnly: true,
79385
- value: connectionId
79386
- })] })]
80610
+ children: /* @__PURE__ */ jsxs(Field, {
80611
+ className: "connection-field",
80612
+ children: [/* @__PURE__ */ jsx(FieldLabel, {
80613
+ className: "sr-only",
80614
+ children: t("inspector.account.connection")
80615
+ }), /* @__PURE__ */ jsx(AccountSelect, {
80616
+ readOnly: true,
80617
+ connections: [],
80618
+ selectedId: connectionId,
80619
+ disabled: true,
80620
+ onChange: () => {},
80621
+ onManage: void 0
80622
+ })]
80623
+ })
79387
80624
  });
79388
80625
  }
79389
80626
  //#endregion
@@ -83332,6 +84569,7 @@ function childFields(props) {
83332
84569
  hideValueTools: props.hideValueTools,
83333
84570
  expansionPolicy: props.expansionPolicy,
83334
84571
  schema: childSchema,
84572
+ nullable: isUnconstrainedSchema(childSchema),
83335
84573
  value: childValue,
83336
84574
  onChange: change,
83337
84575
  valueEditable,
@@ -83813,97 +85051,6 @@ function EditableChoices({ options, labels, value, label, disabled, invalid, mul
83813
85051
  })
83814
85052
  });
83815
85053
  }
83816
- var fieldBranch_module_default = { branch: "fieldBranch_branch_a5820" };
83817
- //#endregion
83818
- //#region src/form/browser/fieldLayout.tsx
83819
- var Geometry = createContext({
83820
- depth: 0,
83821
- layout: "values"
83822
- });
83823
- function FieldLayout({ children, depth = 0, layout = "values", columns, gap }) {
83824
- return /* @__PURE__ */ jsx(Geometry.Provider, {
83825
- value: {
83826
- depth,
83827
- layout,
83828
- columns,
83829
- gap
83830
- },
83831
- children
83832
- });
83833
- }
83834
- var FieldRow = forwardRef(({ columns, gap, header, valueOnly, leadingControl, disclosureContent, trailingControl, actions, layout, depth, typeWidth, disclosure, label, sorting, disclosureInvalid, stacking = "editor", children, style, className, ...props }, ref) => {
83835
- const geometry = useContext(Geometry);
83836
- const level = depth ?? geometry.depth;
83837
- const hasHeader = header != null || valueOnly === true;
83838
- return /* @__PURE__ */ jsxs("div", {
83839
- ...props,
83840
- ref,
83841
- className: [valueEditor_module_default.root, className].filter(Boolean).join(" "),
83842
- "data-stacking": stacking,
83843
- "data-layout": layout ?? geometry.layout,
83844
- "data-header": hasHeader || void 0,
83845
- "data-value-only": valueOnly || void 0,
83846
- "data-nested-field": level > 0 || void 0,
83847
- style: {
83848
- "gridTemplateColumns": columns ?? geometry.columns,
83849
- "columnGap": gap ?? geometry.gap,
83850
- "--field-indent": `${level * 16}px`,
83851
- ...typeWidth === "fixed" ? { "--field-type-width": "32px" } : typeWidth === "editable" ? { "--field-type-width": "56px" } : {},
83852
- ...style
83853
- },
83854
- children: [
83855
- hasHeader && /* @__PURE__ */ jsxs("div", {
83856
- className: valueEditor_module_default.header,
83857
- children: [
83858
- leadingControl != null && /* @__PURE__ */ jsx("div", {
83859
- className: valueEditor_module_default.leadingControl,
83860
- children: leadingControl
83861
- }),
83862
- /* @__PURE__ */ jsxs("div", {
83863
- className: valueEditor_module_default.toggleControl,
83864
- children: [disclosure && (!sorting || leadingControl == null) && /* @__PURE__ */ jsx(Button$1, {
83865
- type: "button",
83866
- size: "icon-xs",
83867
- className: "w-[var(--field-toggle-width,24px)]",
83868
- variant: "disclosure",
83869
- "aria-label": label,
83870
- "aria-expanded": disclosure.expanded,
83871
- "aria-invalid": disclosureInvalid || void 0,
83872
- "aria-controls": disclosure.controls,
83873
- onClick: disclosure.onToggle,
83874
- children: disclosureContent ?? /* @__PURE__ */ jsx("i", {
83875
- "aria-hidden": "true",
83876
- className: disclosure.expanded ? "i-lucide-light:chevron-down" : "i-lucide-light:chevron-right"
83877
- })
83878
- }), !disclosure && leadingControl == null && disclosureContent]
83879
- }),
83880
- !valueOnly && (typeof header === "function" ? header(disclosure) : header)
83881
- ]
83882
- }),
83883
- children,
83884
- trailingControl,
83885
- actions != null && /* @__PURE__ */ jsx("div", {
83886
- className: valueEditor_module_default.options,
83887
- children: actions
83888
- })
83889
- ]
83890
- });
83891
- });
83892
- /** Expanded values stay in their cell; structural branches establish a child geometry and connector. */
83893
- function FieldBody({ placement, endpoint = "control", depth, className, children, ...props }) {
83894
- const geometry = useContext(Geometry);
83895
- return /* @__PURE__ */ jsx("div", {
83896
- ...props,
83897
- className: [className, placement === "branch" && fieldBranch_module_default.branch].filter(Boolean).join(" "),
83898
- "data-field-branch": placement === "branch" || void 0,
83899
- "data-branch-endpoint": placement === "branch" ? endpoint : void 0,
83900
- children: /* @__PURE__ */ jsx(FieldLayout, {
83901
- ...geometry,
83902
- depth: depth ?? geometry.depth + (placement === "branch" ? 1 : 0),
83903
- children
83904
- })
83905
- });
83906
- }
83907
85054
  //#endregion
83908
85055
  //#region src/form/browser/fieldTypeAddon.tsx
83909
85056
  /** A compact definition control attached to a value, shared by Case and array items. */
@@ -96248,7 +97395,10 @@ function FieldValueEditor(suppliedProps) {
96248
97395
  const definitionEditable = props.onDefinitionChange != null && !disabled;
96249
97396
  const showDataType = editorComponent(schema) === "json" && !definitionEditable && valueEditable && props.valueSuffix == null && props.editor == null;
96250
97397
  const [selectedEditorSchema, setSelectedEditorSchema] = useState();
96251
- const editorSchema = showDataType ? selectedEditorSchema ?? defaultValueEditorSchema(schema) : schema;
97398
+ const editorSchema = showDataType ? selectedEditorSchema ?? defaultValueEditorSchema(schema, props.defaultEditor == null ? void 0 : {
97399
+ component: props.defaultEditor,
97400
+ value
97401
+ }) : schema;
96252
97402
  const editorProps = {
96253
97403
  ...props,
96254
97404
  schema: editorSchema
@@ -96378,7 +97528,8 @@ function FieldValueEditor(suppliedProps) {
96378
97528
  const inlineTools = !props.hideValueTools && (props.layout === "values" || props.layout === "ports") && valueEditable && !disabled && !sorting;
96379
97529
  const nullControl = (state.display === "null" || presence === "null") && props.editor === void 0 && !choiceOptions && !enumeration;
96380
97530
  const canReset = inlineTools && props.onReset != null && (showUnset || !!nullable && nullControl);
96381
- const canClear = inlineTools && state.canClear;
97531
+ const clearable = state.canClear || props.unset != null && presence === "null";
97532
+ const canClear = inlineTools && clearable;
96382
97533
  const canToggleJson = inlineTools && expanded && shape.collection && presence === "value";
96383
97534
  const arrayDefinition = !showDataType && hasHeader && source.type === "array" && !Array.isArray(source.items) && !choiceOptions;
96384
97535
  const changeValueEditor = (nextSchema) => {
@@ -96494,7 +97645,7 @@ function FieldValueEditor(suppliedProps) {
96494
97645
  className: "i-lucide-light:circle-slash"
96495
97646
  }), "null"]
96496
97647
  }),
96497
- state.canClear && /* @__PURE__ */ jsxs(Button$1, {
97648
+ clearable && /* @__PURE__ */ jsxs(Button$1, {
96498
97649
  type: "button",
96499
97650
  size: "xs",
96500
97651
  variant: "ghost",
@@ -97057,16 +98208,29 @@ function AgentTools(props) {
97057
98208
  ...props.editor
97058
98209
  });
97059
98210
  if (props.config.tools.length === 0) return null;
98211
+ const summary = actionSummary(props.config.tools, {}, Object.values(props.providers ?? {}));
97060
98212
  return /* @__PURE__ */ jsx(ActionSelectionDialog, {
97061
98213
  readOnly: true,
97062
98214
  title: t("agent.tools"),
98215
+ triggerHint: summary.workflows > 0 ? t("toolPicker.summary", {
98216
+ tools: summary.count,
98217
+ workflows: summary.workflows
98218
+ }) : t("actionPicker.selectionSummary", {
98219
+ actions: summary.count,
98220
+ providers: summary.providers.length
98221
+ }),
97063
98222
  entries: props.config.tools,
97064
98223
  providers: props.providers,
97065
98224
  trigger: /* @__PURE__ */ jsx(Button$1, {
97066
98225
  type: "button",
97067
98226
  variant: "ghost",
97068
98227
  size: "sm",
97069
- children: t("agent.tools")
98228
+ className: "gap-1.5 font-normal text-muted-foreground",
98229
+ children: /* @__PURE__ */ jsx(IconStack, {
98230
+ icons: summary.providers,
98231
+ count: summary.count,
98232
+ size: "sm"
98233
+ })
97070
98234
  }),
97071
98235
  settings: {
97072
98236
  title: t("agent.toolSettings"),
@@ -97298,7 +98462,7 @@ function EditableAgentSettingsProvider({ children, task, nodeId, store, connecto
97298
98462
  return false;
97299
98463
  }
97300
98464
  const decoded = decodeRevisionContent({
97301
- modelVersion: 13,
98465
+ modelVersion: 14,
97302
98466
  modules: {},
97303
98467
  document: {
97304
98468
  bindings: {},
@@ -97893,7 +99057,10 @@ function CodeEditor({ ariaDescribedBy, ariaLabel, diagnostics, disabled, errorLa
97893
99057
  }
97894
99058
  //#endregion
97895
99059
  //#region src/workbench/browser/runtime/editor/codeHttpHosts.tsx
97896
- function CodeHttpHosts({ disabled, hosts, onSave }) {
99060
+ function CodeHttpHosts(props) {
99061
+ const { hosts } = props;
99062
+ const editor = props.readOnly ? void 0 : props;
99063
+ const disabled = editor?.disabled ?? false;
97897
99064
  const t = useTranslate();
97898
99065
  const id = useId();
97899
99066
  const saved = hosts.join("\n");
@@ -97907,6 +99074,7 @@ function CodeHttpHosts({ disabled, hosts, onSave }) {
97907
99074
  setContainer(element?.closest(".open-flow-workbench") ?? element?.closest(".open-flow-theme") ?? null);
97908
99075
  }, []);
97909
99076
  const commit = async () => {
99077
+ if (editor == null) return;
97910
99078
  if (openedHosts !== saved) {
97911
99079
  setOpenedHosts(saved);
97912
99080
  setDraft(saved);
@@ -97920,7 +99088,7 @@ function CodeHttpHosts({ disabled, hosts, onSave }) {
97920
99088
  setError(void 0);
97921
99089
  setPending(true);
97922
99090
  try {
97923
- if (dequal(next, hosts) || await onSave(next)) setOpen(false);
99091
+ if (dequal(next, hosts) || await editor.onSave(next)) setOpen(false);
97924
99092
  } finally {
97925
99093
  setPending(false);
97926
99094
  }
@@ -97964,25 +99132,26 @@ function CodeHttpHosts({ disabled, hosts, onSave }) {
97964
99132
  /* @__PURE__ */ jsx(ValueEditorFeedback, {
97965
99133
  error,
97966
99134
  children: (errorId) => /* @__PURE__ */ jsx(Textarea, {
97967
- "aria-describedby": [`${id}-hint`, errorId].filter(Boolean).join(" "),
99135
+ "aria-describedby": [editor == null ? void 0 : `${id}-hint`, errorId].filter(Boolean).join(" ") || void 0,
97968
99136
  "aria-invalid": error != null || void 0,
97969
99137
  className: "min-h-14 font-mono text-xs",
97970
99138
  disabled: disabled || pending,
97971
99139
  id: `${id}-hosts`,
97972
- onChange: (event) => setDraft(event.target.value),
99140
+ onChange: editor == null ? void 0 : (event) => setDraft(event.target.value),
97973
99141
  placeholder: "api.example.com",
99142
+ readOnly: props.readOnly,
97974
99143
  rows: 2,
97975
99144
  spellCheck: false,
97976
- value: draft
99145
+ value: editor == null ? saved : draft
97977
99146
  })
97978
99147
  }),
97979
- /* @__PURE__ */ jsx(FieldDescription, {
99148
+ editor != null && /* @__PURE__ */ jsx(FieldDescription, {
97980
99149
  id: `${id}-hint`,
97981
99150
  children: t("inspector.task.httpHostsHint")
97982
99151
  })
97983
99152
  ]
97984
99153
  }),
97985
- /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button$1, {
99154
+ editor != null && /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button$1, {
97986
99155
  type: "button",
97987
99156
  variant: "outline",
97988
99157
  disabled: pending,
@@ -98545,16 +99714,49 @@ function CodeTaskSection(props) {
98545
99714
  const { selection, theme } = props;
98546
99715
  const task = selection.definition;
98547
99716
  if (task == null || !("moduleId" in task) || selection.module == null) return null;
98548
- return /* @__PURE__ */ jsxs(CodeTaskFrame, { children: [/* @__PURE__ */ jsx(CodeEditor, {
98549
- ariaLabel: t("inspector.task.source"),
98550
- disabled: true,
98551
- theme,
98552
- typing: codeTyping(task, task.capabilities),
98553
- uri: `publication:modules/${task.moduleId}.js`,
98554
- value: selection.module.source,
98555
- loadingLabel: t("inspector.task.editorLoading"),
98556
- errorLabel: t("inspector.task.editorUnavailable")
98557
- }), task.capabilities != null && /* @__PURE__ */ jsx(JSONViewer, { data: task.capabilities })] });
99717
+ const permission = task.capabilities?.find((capability) => "mode" in capability);
99718
+ const tools = [...permission?.mode == "independent" ? permission.actions : [], ...(task.capabilities ?? []).filter((item) => item.kind == "workflow")];
99719
+ const summary = actionSummary(tools, {}, Object.values(props.providers ?? {}));
99720
+ const httpHosts = task.capabilities?.find((capability) => capability.kind == "http")?.hosts ?? [];
99721
+ return /* @__PURE__ */ jsx(CodeTaskFrame, {
99722
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [httpHosts.length > 0 && /* @__PURE__ */ jsx(CodeHttpHosts, {
99723
+ readOnly: true,
99724
+ hosts: httpHosts
99725
+ }), tools.length > 0 && /* @__PURE__ */ jsx(ActionSelectionDialog, {
99726
+ readOnly: true,
99727
+ title: t("actionPicker.configureActions"),
99728
+ triggerHint: summary.workflows > 0 ? t("toolPicker.summary", {
99729
+ tools: summary.count,
99730
+ workflows: summary.workflows
99731
+ }) : t("actionPicker.selectionSummary", {
99732
+ actions: summary.count,
99733
+ providers: summary.providers.length
99734
+ }),
99735
+ trigger: /* @__PURE__ */ jsx(Button$1, {
99736
+ type: "button",
99737
+ variant: "ghost",
99738
+ size: "sm",
99739
+ className: "gap-1.5 font-normal text-muted-foreground",
99740
+ children: /* @__PURE__ */ jsx(IconStack, {
99741
+ icons: summary.providers,
99742
+ count: summary.count,
99743
+ size: "sm"
99744
+ })
99745
+ }),
99746
+ entries: tools,
99747
+ providers: props.providers
99748
+ })] }),
99749
+ children: /* @__PURE__ */ jsx(CodeEditor, {
99750
+ ariaLabel: t("inspector.task.source"),
99751
+ disabled: true,
99752
+ theme,
99753
+ typing: codeTyping(task, task.capabilities),
99754
+ uri: `publication:modules/${task.moduleId}.js`,
99755
+ value: selection.module.source,
99756
+ loadingLabel: t("inspector.task.editorLoading"),
99757
+ errorLabel: t("inspector.task.editorUnavailable")
99758
+ })
99759
+ });
98558
99760
  }
98559
99761
  //#endregion
98560
99762
  //#region src/workbench/browser/runtime/editor/fieldPanelAnchor.ts
@@ -99774,7 +100976,7 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
99774
100976
  setSourceOpen(true);
99775
100977
  if (variables.enabled) variables.onOpen?.();
99776
100978
  }
99777
- } : void 0,
100979
+ } : presentation?.unset,
99778
100980
  label: fieldLabel,
99779
100981
  path: `/${fieldLabel.replaceAll("~", "~0").replaceAll("/", "~1")}`,
99780
100982
  disabled,
@@ -100499,82 +101701,130 @@ function presentConnectorInputs(inputs, t) {
100499
101701
  ...optional
100500
101702
  ];
100501
101703
  }
100502
- var fieldTable_module_default = {
100503
- list: "fieldTable_list_14bfd",
100504
- columns: "fieldTable_columns_14bfd",
100505
- nameHeading: "fieldTable_nameHeading_14bfd",
100506
- typeHeading: "fieldTable_typeHeading_14bfd",
100507
- valueHeading: "fieldTable_valueHeading_14bfd",
100508
- row: "fieldTable_row_14bfd",
100509
- nullableControl: "fieldTable_nullableControl_14bfd",
100510
- nullableHeading: "fieldTable_nullableHeading_14bfd"
100511
- };
100512
101704
  //#endregion
100513
- //#region src/form/browser/fieldTable.tsx
100514
- /** Shared field geometry. Callers own definitions, values, actions and persistence. */
100515
- var FieldTable = forwardRef(({ layout = "definition", fixedTypes, typeColumn = true, columnHeadings = true, output, nullable, empty, actionSlots = 1, standalone, className, children, ...props }, ref) => {
100516
- const t = useTranslate();
100517
- return /* @__PURE__ */ jsxs("div", {
101705
+ //#region src/workbench/browser/runtime/editor/inspectorSection.tsx
101706
+ function InspectorSection({ title, children, className, contentInset = true, ...props }) {
101707
+ return /* @__PURE__ */ jsxs("section", {
101708
+ className: cn$1("inspector-section inspector-titled-section", className),
100518
101709
  ...props,
100519
- ref,
100520
- className: [fieldTable_module_default.list, className].filter(Boolean).join(" "),
100521
- "data-value-editor-scope": true,
100522
- "data-layout": layout,
100523
- "data-type-column": typeColumn || void 0,
100524
- "data-output": output || void 0,
100525
- "data-fixed-types": fixedTypes || void 0,
100526
- "data-nullable": nullable || void 0,
100527
- "data-empty": empty || void 0,
100528
- "data-action-slots": actionSlots,
100529
- "data-standalone": standalone || void 0,
100530
- children: [columnHeadings && !empty && /* @__PURE__ */ jsxs("div", {
100531
- className: fieldTable_module_default.columns,
100532
- "data-layout": layout,
100533
- "data-output": output || void 0,
100534
- children: [
100535
- /* @__PURE__ */ jsx("span", {
100536
- className: fieldTable_module_default.nameHeading,
100537
- children: t("valueEditor.columnName")
100538
- }),
100539
- typeColumn && /* @__PURE__ */ jsx("span", {
100540
- className: fieldTable_module_default.typeHeading,
100541
- children: t("valueEditor.columnType")
100542
- }),
100543
- !output && /* @__PURE__ */ jsx("span", {
100544
- className: fieldTable_module_default.valueHeading,
100545
- children: t("valueEditor.columnValue")
100546
- }),
100547
- nullable && /* @__PURE__ */ jsx("span", {
100548
- className: fieldTable_module_default.nullableHeading,
100549
- children: t("valueEditor.nullable")
100550
- })
100551
- ]
100552
- }), /* @__PURE__ */ jsx(FieldLayout, {
100553
- layout,
101710
+ children: [/* @__PURE__ */ jsx("h3", {
101711
+ className: "inspector-section-title",
101712
+ children: title
101713
+ }), /* @__PURE__ */ jsx("div", {
101714
+ className: "inspector-section-content",
101715
+ "data-inset": contentInset || void 0,
100554
101716
  children
100555
101717
  })]
100556
101718
  });
100557
- });
100558
- function FieldTableRow({ className, ...props }) {
100559
- return /* @__PURE__ */ jsx("div", {
100560
- ...props,
100561
- className: [fieldTable_module_default.row, className].filter(Boolean).join(" ")
100562
- });
100563
101719
  }
100564
- function FieldNullable({ name, checked, onChange }) {
101720
+ //#endregion
101721
+ //#region src/workbench/browser/runtime/editor/connectorProxySection.tsx
101722
+ function ConnectorProxySection({ task, disabled, readOnly = false, hasBody, parameters, input, onSave, onClearBody }) {
100565
101723
  const t = useTranslate();
100566
- return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
100567
- render: /* @__PURE__ */ jsx("span", { className: fieldTable_module_default.nullableControl }),
100568
- children: /* @__PURE__ */ jsx(Checkbox, {
100569
- className: "not-data-disabled:cursor-pointer",
100570
- "aria-label": `${name} ${t("valueEditor.nullable")}`,
100571
- "aria-checked": checked,
100572
- checked,
100573
- indeterminate: !onChange && !checked,
100574
- disabled: !onChange,
100575
- onCheckedChange: (next) => onChange?.(next === true)
101724
+ const id = useId();
101725
+ const taskRef = useRef(task);
101726
+ const saveRef = useRef(onSave);
101727
+ useEffect(() => {
101728
+ taskRef.current = task;
101729
+ saveRef.current = onSave;
101730
+ }, [task, onSave]);
101731
+ const [changes] = useState(() => new TaskExecutorChanges(task.executor, (before, next) => {
101732
+ const current = taskRef.current;
101733
+ if (before.kind !== "connector-proxy" || next.kind !== "connector-proxy" || current.executor.kind !== "connector-proxy") return Promise.resolve(false);
101734
+ const merged = { ...current.executor };
101735
+ if (before.method !== next.method) merged.method = next.method;
101736
+ return saveRef.current(current, connectorProxyTask(merged, current.name, current));
101737
+ }));
101738
+ const [config, setConfig] = useState(changes.value);
101739
+ const [failed, setFailed] = useState(false);
101740
+ useEffect(() => {
101741
+ changes.sync(task.executor);
101742
+ setConfig(changes.value);
101743
+ }, [changes, task.executor]);
101744
+ if (config.kind !== "connector-proxy") return null;
101745
+ const supportsBody = connectorProxySupportsBody(config.method);
101746
+ const bodyError = task.executor.kind === "connector-proxy" && task.executor.method === config.method && connectorProxyIssues(config, hasBody).some((issue) => issue.code === "bodyUnsupported");
101747
+ async function save() {
101748
+ try {
101749
+ setFailed(!await changes.save());
101750
+ } catch {
101751
+ setFailed(true);
101752
+ }
101753
+ }
101754
+ function update(patch) {
101755
+ if (disabled || changes.value.kind !== "connector-proxy") return;
101756
+ changes.value = {
101757
+ ...changes.value,
101758
+ ...patch
101759
+ };
101760
+ setConfig(changes.value);
101761
+ save();
101762
+ }
101763
+ return /* @__PURE__ */ jsx(InspectorSection, {
101764
+ title: t("connectorProxy.title"),
101765
+ "data-inspector-section": "task",
101766
+ children: /* @__PURE__ */ jsxs("div", {
101767
+ className: "node-settings flex flex-col gap-3",
101768
+ "data-value-editor-scope": true,
101769
+ children: [
101770
+ input("endpoint", t("connectorProxy.endpoint")),
101771
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
101772
+ htmlFor: `${id}-method`,
101773
+ children: t("httpRequest.method")
101774
+ }), /* @__PURE__ */ jsx(NativeSelect, {
101775
+ id: `${id}-method`,
101776
+ value: config.method,
101777
+ disabled,
101778
+ className: "w-full",
101779
+ onChange: (event) => update({ method: event.target.value }),
101780
+ children: [
101781
+ "GET",
101782
+ "POST",
101783
+ "PUT",
101784
+ "PATCH",
101785
+ "DELETE"
101786
+ ].map((method) => /* @__PURE__ */ jsx(NativeSelectOption, {
101787
+ value: method,
101788
+ children: method
101789
+ }, method))
101790
+ })] }),
101791
+ parameters,
101792
+ supportsBody && input("body", t("httpRequest.body")),
101793
+ bodyError && /* @__PURE__ */ jsxs("div", {
101794
+ className: "flex flex-col gap-2",
101795
+ children: [/* @__PURE__ */ jsx("p", {
101796
+ id: `${id}-body-error`,
101797
+ role: "alert",
101798
+ className: "text-xs text-destructive",
101799
+ children: t("connectorProxy.bodyUnsupported")
101800
+ }), !readOnly && /* @__PURE__ */ jsxs(Button$1, {
101801
+ variant: "outline",
101802
+ size: "field",
101803
+ disabled,
101804
+ "aria-describedby": `${id}-body-error`,
101805
+ onClick: () => void onClearBody(),
101806
+ children: [
101807
+ t("valueEditor.clear"),
101808
+ " ",
101809
+ t("httpRequest.body")
101810
+ ]
101811
+ })]
101812
+ }),
101813
+ failed && /* @__PURE__ */ jsx(ValueEditorFeedback, {
101814
+ error: t("httpRequest.saveFailed"),
101815
+ children: (errorId) => /* @__PURE__ */ jsx(Button$1, {
101816
+ variant: "outline",
101817
+ size: "field",
101818
+ "aria-invalid": true,
101819
+ "aria-describedby": errorId,
101820
+ disabled,
101821
+ onClick: () => void save(),
101822
+ children: t("httpRequest.retry")
101823
+ })
101824
+ })
101825
+ ]
100576
101826
  })
100577
- }), /* @__PURE__ */ jsx(TooltipContent, { children: t(checked ? "valueEditor.nullableDescription" : "valueEditor.notNullableDescription") })] });
101827
+ });
100578
101828
  }
100579
101829
  //#endregion
100580
101830
  //#region src/ui/browser/helpButton.tsx
@@ -100611,22 +101861,6 @@ function HelpButton({ label, children, container, size = 24 }) {
100611
101861
  });
100612
101862
  }
100613
101863
  //#endregion
100614
- //#region src/workbench/browser/runtime/editor/inspectorSection.tsx
100615
- function InspectorSection({ title, children, className, contentInset = true, ...props }) {
100616
- return /* @__PURE__ */ jsxs("section", {
100617
- className: cn$1("inspector-section inspector-titled-section", className),
100618
- ...props,
100619
- children: [/* @__PURE__ */ jsx("h3", {
100620
- className: "inspector-section-title",
100621
- children: title
100622
- }), /* @__PURE__ */ jsx("div", {
100623
- className: "inspector-section-content",
100624
- "data-inset": contentInset || void 0,
100625
- children
100626
- })]
100627
- });
100628
- }
100629
- //#endregion
100630
101864
  //#region src/workbench/browser/runtime/editor/decisionSection.tsx
100631
101865
  var textSchema = {
100632
101866
  type: "string",
@@ -101803,13 +103037,13 @@ var catalog = [
101803
103037
  group: "contacts"
101804
103038
  }
101805
103039
  ];
101806
- function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents }) {
103040
+ function FeishuEventPicker({ value, onChange, disabled = false, readOnly = false, allowedEvents }) {
101807
103041
  const t = useTranslate();
101808
103042
  const id = useId();
101809
103043
  const [search, setSearch] = useState("");
101810
103044
  const [custom, setCustom] = useState("");
101811
103045
  const [invalid, setInvalid] = useState(false);
101812
- const entries = [...catalog.filter((entry) => allowedEvents == null || allowedEvents.includes(entry.id)).map((entry) => ({
103046
+ const entries = [...catalog.filter((entry) => (allowedEvents == null || allowedEvents.includes(entry.id)) && (!readOnly || value.includes(entry.id))).map((entry) => ({
101813
103047
  id: entry.id,
101814
103048
  group: entry.group,
101815
103049
  label: t(`eventSources.eventNames.${entry.id.replaceAll(".", "_")}`)
@@ -101838,7 +103072,7 @@ function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents })
101838
103072
  htmlFor: id,
101839
103073
  children: t("eventSources.events")
101840
103074
  }),
101841
- value.length > 0 && /* @__PURE__ */ jsx("div", {
103075
+ !readOnly && value.length > 0 && /* @__PURE__ */ jsx("div", {
101842
103076
  className: "flex flex-wrap gap-1.5",
101843
103077
  children: value.map((event) => /* @__PURE__ */ jsxs(Button$1, {
101844
103078
  type: "button",
@@ -101861,7 +103095,7 @@ function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents })
101861
103095
  id,
101862
103096
  type: "search",
101863
103097
  value: search,
101864
- disabled,
103098
+ disabled: disabled && !readOnly,
101865
103099
  placeholder: t("eventSources.searchEvents"),
101866
103100
  "aria-label": t("eventSources.searchEvents"),
101867
103101
  onChange: (event) => setSearch(event.target.value)
@@ -101880,7 +103114,7 @@ function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents })
101880
103114
  children: [/* @__PURE__ */ jsx(Checkbox, {
101881
103115
  className: "mt-0.5",
101882
103116
  checked: value.includes(entry.id),
101883
- disabled: disabled || !value.includes(entry.id) && value.length >= 200,
103117
+ disabled: readOnly || disabled || !value.includes(entry.id) && value.length >= 200,
101884
103118
  onCheckedChange: (checked) => onChange(checked === true ? [...value, entry.id] : value.filter((event) => event != entry.id))
101885
103119
  }), /* @__PURE__ */ jsxs("span", {
101886
103120
  className: "flex min-w-0 flex-col gap-0.5",
@@ -101898,7 +103132,7 @@ function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents })
101898
103132
  children: t("eventSources.noEventMatches")
101899
103133
  })]
101900
103134
  }),
101901
- value.length == 0 && /* @__PURE__ */ jsx("p", {
103135
+ !readOnly && value.length == 0 && /* @__PURE__ */ jsx("p", {
101902
103136
  className: "m-0 text-xs text-muted-foreground",
101903
103137
  children: t("eventSources.chooseEvents")
101904
103138
  }),
@@ -101911,7 +103145,7 @@ function FeishuEventPicker({ value, onChange, disabled = false, allowedEvents })
101911
103145
  unavailable.join(", ")
101912
103146
  ]
101913
103147
  }),
101914
- allowedEvents == null && /* @__PURE__ */ jsxs("details", { children: [
103148
+ !readOnly && allowedEvents == null && /* @__PURE__ */ jsxs("details", { children: [
101915
103149
  /* @__PURE__ */ jsx("summary", {
101916
103150
  className: "cursor-pointer text-xs text-muted-foreground",
101917
103151
  children: t("eventSources.customEvent")
@@ -103703,6 +104937,7 @@ var resources = {
103703
104937
  "missingStatuses": "Some selected statuses are no longer available. Remove or replace them."
103704
104938
  },
103705
104939
  nodePicker: {
104940
+ "custom": "Custom",
103706
104941
  "actionGroups": {
103707
104942
  "read": "Read actions",
103708
104943
  "write": "Write actions",
@@ -103931,6 +105166,12 @@ var resources = {
103931
105166
  "connector": "Connector",
103932
105167
  "workflow": "Workflow"
103933
105168
  },
105169
+ connectorProxy: {
105170
+ "bodyUnsupported": "GET requests do not support a request body.",
105171
+ "title": "Custom API Request",
105172
+ "description": "Call a Provider API using its connected account.",
105173
+ "endpoint": "Endpoint"
105174
+ },
103934
105175
  httpRequest: {
103935
105176
  "title": "HTTP Request",
103936
105177
  "description": "Send an HTTP request and use its response in the workflow.",
@@ -105093,6 +106334,7 @@ var resources = {
105093
106334
  "missingStatuses": "部分已选状态不再可用,请移除或重新选择。"
105094
106335
  },
105095
106336
  nodePicker: {
106337
+ "custom": "自定义",
105096
106338
  "actionGroups": {
105097
106339
  "read": "读取接口",
105098
106340
  "write": "写入接口",
@@ -105321,6 +106563,12 @@ var resources = {
105321
106563
  "connector": "连接器",
105322
106564
  "workflow": "工作流"
105323
106565
  },
106566
+ connectorProxy: {
106567
+ "bodyUnsupported": "GET 请求不支持请求体。",
106568
+ "title": "自定义 API 请求",
106569
+ "description": "使用已连接账号调用 Provider API。",
106570
+ "endpoint": "接口路径"
106571
+ },
105324
106572
  httpRequest: {
105325
106573
  "title": "HTTP 请求",
105326
106574
  "description": "发送 HTTP 请求,在工作流中使用响应数据。",
@@ -106483,6 +107731,7 @@ var resources = {
106483
107731
  "missingStatuses": "部分已選狀態不再可用,請移除或重新選擇。"
106484
107732
  },
106485
107733
  nodePicker: {
107734
+ "custom": "自訂",
106486
107735
  "actionGroups": {
106487
107736
  "read": "讀取介面",
106488
107737
  "write": "寫入介面",
@@ -106711,6 +107960,12 @@ var resources = {
106711
107960
  "connector": "連接器",
106712
107961
  "workflow": "工作流程"
106713
107962
  },
107963
+ connectorProxy: {
107964
+ "bodyUnsupported": "GET 請求不支援請求本文。",
107965
+ "title": "自訂 API 請求",
107966
+ "description": "使用已連線帳號呼叫 Provider API。",
107967
+ "endpoint": "介面路徑"
107968
+ },
106714
107969
  httpRequest: {
106715
107970
  "title": "HTTP 請求",
106716
107971
  "description": "傳送 HTTP 請求,在工作流程中使用回應資料。",
@@ -107873,6 +109128,7 @@ var resources = {
107873
109128
  "missingStatuses": "選択したステータスの一部は利用できません。削除するか選び直してください。"
107874
109129
  },
107875
109130
  nodePicker: {
109131
+ "custom": "カスタム",
107876
109132
  "actionGroups": {
107877
109133
  "read": "読み取り操作",
107878
109134
  "write": "書き込み操作",
@@ -108101,6 +109357,12 @@ var resources = {
108101
109357
  "connector": "コネクター",
108102
109358
  "workflow": "ワークフロー"
108103
109359
  },
109360
+ connectorProxy: {
109361
+ "bodyUnsupported": "GET リクエストはリクエストボディに対応していません。",
109362
+ "title": "カスタム API リクエスト",
109363
+ "description": "接続済みアカウントで Provider API を呼び出します。",
109364
+ "endpoint": "エンドポイント"
109365
+ },
108104
109366
  httpRequest: {
108105
109367
  "title": "HTTP リクエスト",
108106
109368
  "description": "HTTP リクエストを送信し、ワークフローでレスポンスを使用します。",
@@ -109263,6 +110525,7 @@ var resources = {
109263
110525
  "missingStatuses": "선택한 상태 중 일부를 사용할 수 없습니다. 삭제하거나 다시 선택하세요."
109264
110526
  },
109265
110527
  nodePicker: {
110528
+ "custom": "사용자 지정",
109266
110529
  "actionGroups": {
109267
110530
  "read": "읽기 작업",
109268
110531
  "write": "쓰기 작업",
@@ -109491,6 +110754,12 @@ var resources = {
109491
110754
  "connector": "커넥터",
109492
110755
  "workflow": "워크플로"
109493
110756
  },
110757
+ connectorProxy: {
110758
+ "bodyUnsupported": "GET 요청은 요청 본문을 지원하지 않습니다.",
110759
+ "title": "사용자 지정 API 요청",
110760
+ "description": "연결된 계정으로 Provider API를 호출합니다.",
110761
+ "endpoint": "엔드포인트"
110762
+ },
109494
110763
  httpRequest: {
109495
110764
  "title": "HTTP 요청",
109496
110765
  "description": "HTTP 요청을 보내고 워크플로에서 응답을 사용합니다.",
@@ -110653,6 +111922,7 @@ var resources = {
110653
111922
  "missingStatuses": "Некоторые выбранные статусы больше недоступны. Удалите или замените их."
110654
111923
  },
110655
111924
  nodePicker: {
111925
+ "custom": "Пользовательские",
110656
111926
  "actionGroups": {
110657
111927
  "read": "Операции чтения",
110658
111928
  "write": "Операции записи",
@@ -110881,6 +112151,12 @@ var resources = {
110881
112151
  "connector": "Коннектор",
110882
112152
  "workflow": "Рабочий процесс"
110883
112153
  },
112154
+ connectorProxy: {
112155
+ "bodyUnsupported": "GET-запросы не поддерживают тело запроса.",
112156
+ "title": "Пользовательский API-запрос",
112157
+ "description": "Вызов API провайдера через подключённый аккаунт.",
112158
+ "endpoint": "Путь запроса"
112159
+ },
110884
112160
  httpRequest: {
110885
112161
  "title": "HTTP-запрос",
110886
112162
  "description": "Отправить HTTP-запрос и использовать ответ в рабочем процессе.",
@@ -112043,6 +113319,7 @@ var resources = {
112043
113319
  "missingStatuses": "Certains statuts sélectionnés ne sont plus disponibles. Supprimez-les ou remplacez-les."
112044
113320
  },
112045
113321
  nodePicker: {
113322
+ "custom": "Personnalisé",
112046
113323
  "actionGroups": {
112047
113324
  "read": "Actions de lecture",
112048
113325
  "write": "Actions d’écriture",
@@ -112271,6 +113548,12 @@ var resources = {
112271
113548
  "connector": "Connecteur",
112272
113549
  "workflow": "Workflow"
112273
113550
  },
113551
+ connectorProxy: {
113552
+ "bodyUnsupported": "Les requêtes GET ne prennent pas en charge de corps.",
113553
+ "title": "Requête API personnalisée",
113554
+ "description": "Appeler une API du fournisseur avec le compte connecté.",
113555
+ "endpoint": "Point de terminaison"
113556
+ },
112274
113557
  httpRequest: {
112275
113558
  "title": "Requête HTTP",
112276
113559
  "description": "Envoyer une requête HTTP et utiliser sa réponse dans le workflow.",
@@ -113032,30 +114315,33 @@ function CreateEventSourceDialog({ client, sourceKind, notify, teamId, existingN
113032
114315
  }
113033
114316
  //#endregion
113034
114317
  //#region src/workbench/browser/runtime/editor/feishuEventFilters.tsx
113035
- function FeishuEventFilters({ field, config, events, managed, disabled, onChange }) {
114318
+ function FeishuEventFilters({ field, config, events, managed, disabled, readOnly = false, onChange }) {
113036
114319
  const t = useTranslate();
113037
114320
  const resource = isJsonObject(config.resource) ? config.resource : void 0;
113038
114321
  const kind = feishuResourceKind(events);
114322
+ const storedKind = resource?.kind;
114323
+ const displayKind = readOnly && (storedKind == "document" || storedKind == "calendar" || storedKind == "approval") ? storedKind : kind;
113039
114324
  const chats = Array.isArray(config.chatIds) ? config.chatIds.filter((item) => typeof item == "string") : [];
113040
114325
  const chatSupported = supportsFeishuChatFilter(events);
113041
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [field !== "resource" && (chatSupported || chats.length > 0) && /* @__PURE__ */ jsx("div", {
114326
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [field !== "resource" && (chatSupported || chats.length > 0) && /* @__PURE__ */ jsxs("div", {
113042
114327
  className: "flex flex-col gap-2",
113043
- children: chatSupported ? /* @__PURE__ */ jsx(ChatFilter, {
114328
+ children: [(chatSupported || readOnly) && /* @__PURE__ */ jsx(ChatFilter, {
113044
114329
  value: chats,
113045
114330
  disabled,
114331
+ readOnly,
113046
114332
  onChange: (value) => onChange("chatIds", value)
113047
- }, JSON.stringify(chats)) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
114333
+ }, JSON.stringify(chats)), !chatSupported && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
113048
114334
  role: "alert",
113049
114335
  className: "m-0 text-sm text-destructive",
113050
114336
  children: t("eventSources.incompatibleChats")
113051
- }), /* @__PURE__ */ jsx(Button$1, {
114337
+ }), !readOnly && /* @__PURE__ */ jsx(Button$1, {
113052
114338
  variant: "outline",
113053
114339
  size: "sm",
113054
114340
  className: "self-start",
113055
114341
  disabled,
113056
114342
  onClick: () => onChange("chatIds", void 0),
113057
114343
  children: t("eventSources.removeFilter")
113058
- })] })
114344
+ })] })]
113059
114345
  }), field !== "chatIds" && (kind != null || resource != null) && /* @__PURE__ */ jsxs("div", {
113060
114346
  className: "flex flex-col gap-3",
113061
114347
  children: [
@@ -113063,7 +114349,7 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113063
114349
  className: "flex items-center gap-2",
113064
114350
  children: [/* @__PURE__ */ jsx(Checkbox, {
113065
114351
  checked: resource != null,
113066
- disabled: disabled || resource == null && (!managed || kind == null),
114352
+ disabled: readOnly || disabled || resource == null && (!managed || kind == null),
113067
114353
  onCheckedChange: (checked) => onChange("resource", checked ? {
113068
114354
  kind,
113069
114355
  id: "",
@@ -113075,7 +114361,7 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113075
114361
  className: "m-0 text-xs leading-5 text-muted-foreground",
113076
114362
  children: t("eventSources.subscribeResourceHint")
113077
114363
  }),
113078
- !managed && /* @__PURE__ */ jsx("p", {
114364
+ !readOnly && !managed && /* @__PURE__ */ jsx("p", {
113079
114365
  className: "m-0 text-xs leading-5 text-muted-foreground",
113080
114366
  children: t("eventSources.managementRequired")
113081
114367
  }),
@@ -113084,8 +114370,8 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113084
114370
  className: "m-0 text-sm text-destructive",
113085
114371
  children: t("eventSources.incompatibleResource")
113086
114372
  }),
113087
- resource != null && kind != null && resource.kind == kind && /* @__PURE__ */ jsxs(Fragment$1, { children: [
113088
- kind == "document" && /* @__PURE__ */ jsx(SourceSelect, {
114373
+ resource != null && displayKind != null && resource.kind == displayKind && /* @__PURE__ */ jsxs(Fragment$1, { children: [
114374
+ displayKind == "document" && /* @__PURE__ */ jsx(SourceSelect, {
113089
114375
  label: t("eventSources.documentType"),
113090
114376
  value: typeof resource.documentType == "string" ? resource.documentType : "",
113091
114377
  options: [
@@ -113099,7 +114385,7 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113099
114385
  value,
113100
114386
  label: t(`eventSources.documentTypes.${value}`)
113101
114387
  })),
113102
- disabled: disabled || !managed,
114388
+ disabled: readOnly || disabled || !managed,
113103
114389
  onChange: (value) => onChange("resource", {
113104
114390
  ...resource,
113105
114391
  documentType: value
@@ -113107,9 +114393,10 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113107
114393
  }),
113108
114394
  /* @__PURE__ */ jsxs(Label, {
113109
114395
  className: "flex flex-col items-stretch gap-2",
113110
- children: [t(`eventSources.resourceIds.${kind}`), /* @__PURE__ */ jsx(Input, {
114396
+ children: [t(`eventSources.resourceIds.${displayKind}`), /* @__PURE__ */ jsx(Input, {
113111
114397
  value: typeof resource.id == "string" ? resource.id : "",
113112
- disabled: disabled || !managed,
114398
+ disabled: !readOnly && (disabled || !managed),
114399
+ readOnly,
113113
114400
  required: true,
113114
114401
  onChange: (event) => onChange("resource", {
113115
114402
  ...resource,
@@ -113119,23 +114406,25 @@ function FeishuEventFilters({ field, config, events, managed, disabled, onChange
113119
114406
  }),
113120
114407
  /* @__PURE__ */ jsx("p", {
113121
114408
  className: "m-0 text-xs leading-5 text-muted-foreground",
113122
- children: t(`eventSources.resourceHints.${kind}`)
114409
+ children: t(`eventSources.resourceHints.${displayKind}`)
113123
114410
  })
113124
114411
  ] })
113125
114412
  ]
113126
114413
  })] });
113127
114414
  }
113128
- function ChatFilter({ value, disabled, onChange }) {
114415
+ function ChatFilter({ value, disabled, readOnly = false, onChange }) {
113129
114416
  const t = useTranslate();
113130
114417
  const [text, setText] = useState(value.join("\n"));
113131
114418
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Label, {
113132
114419
  className: "flex flex-col items-stretch gap-2",
113133
114420
  children: [t("eventSources.specifiedChats"), /* @__PURE__ */ jsx(Textarea, {
113134
114421
  value: text,
113135
- disabled,
114422
+ disabled: disabled && !readOnly,
114423
+ readOnly,
113136
114424
  rows: 3,
113137
114425
  onChange: (event) => setText(event.target.value),
113138
114426
  onBlur: () => {
114427
+ if (readOnly || disabled) return;
113139
114428
  const ids = [...new Set(text.split("\n").map((item) => item.trim()).filter(Boolean))];
113140
114429
  if (JSON.stringify(ids) != JSON.stringify(value)) onChange(ids.length == 0 ? void 0 : ids);
113141
114430
  }
@@ -114211,15 +115500,18 @@ function EventSourceSelect({ label, value, options, disabled, onChange, onOpen }
114211
115500
  })
114212
115501
  });
114213
115502
  }
114214
- function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLabels, config: assignments, nodeId, connectionId, disabled, store }) {
115503
+ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLabels, config: assignments, nodeId, connectionId, disabled: temporarilyDisabled, readOnly = false, store }) {
115504
+ const disabled = temporarilyDisabled || readOnly;
115505
+ const editor = readOnly ? void 0 : store;
114215
115506
  const config = triggerConfigValues(inputs, assignments);
114216
115507
  const t = useTranslate();
114217
115508
  const [attempt, setAttempt] = useState(0);
114218
115509
  const sourceId = typeof config.sourceId == "string" ? config.sourceId : "";
114219
- const flowId = store.$.flowId.value;
115510
+ const flowId = editor?.$.flowId.value;
114220
115511
  const key = JSON.stringify([flowId, nodeId]);
114221
115512
  const [state, setState] = useState();
114222
115513
  useEffect(() => {
115514
+ if (editor == null) return;
114223
115515
  const controller = new AbortController();
114224
115516
  setState((current) => current?.key == key ? {
114225
115517
  ...current,
@@ -114229,7 +115521,7 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114229
115521
  key,
114230
115522
  loading: true
114231
115523
  });
114232
- store.loadEventSources(controller.signal).then((result) => {
115524
+ editor.loadEventSources(controller.signal).then((result) => {
114233
115525
  if (!controller.signal.aborted) setState({
114234
115526
  key,
114235
115527
  ...result,
@@ -114248,24 +115540,24 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114248
115540
  });
114249
115541
  return () => controller.abort();
114250
115542
  }, [
114251
- store,
115543
+ editor,
114252
115544
  key,
114253
115545
  attempt
114254
115546
  ]);
114255
115547
  const sources = state?.key == key ? state.sources : void 0;
114256
115548
  const matchingSources = sources?.filter((source) => source.provider == provider && source.connectionId == connectionId);
114257
- const options = matchingSources?.map((source) => ({
115549
+ const options = readOnly ? sourceId ? [{
115550
+ value: sourceId,
115551
+ label: sourceId
115552
+ }] : [] : matchingSources?.map((source) => ({
114258
115553
  value: source.sourceId,
114259
115554
  label: source.name
114260
115555
  }));
114261
115556
  const failed = state?.key == key && state.failed;
114262
115557
  const loading = state?.key != key || state.loading == true;
114263
115558
  const selectedSource = matchingSources?.find((source) => source.sourceId == sourceId);
114264
- const eventOptions = selectedSource?.eventTypes.map((type) => ({
114265
- value: type,
114266
- label: type
114267
- }));
114268
115559
  const selectedEvents = Array.isArray(config.eventTypes) ? config.eventTypes.filter((value) => typeof value == "string") : [];
115560
+ const eventOptions = readOnly ? selectedEvents : selectedSource?.eventTypes;
114269
115561
  const visibleInputs = inputs.filter((input) => {
114270
115562
  if ("group" in input || input.handle === "sourceId" || input.handle === "eventTypes") return true;
114271
115563
  if (!sourceId) return false;
@@ -114274,22 +115566,23 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114274
115566
  return true;
114275
115567
  });
114276
115568
  return /* @__PURE__ */ jsx(TriggerConfigEditor, {
115569
+ readOnly,
114277
115570
  onReset: () => {
114278
- return store.nodes.resetTriggerConfig(nodeId);
115571
+ return editor?.nodes.resetTriggerConfig(nodeId);
114279
115572
  },
114280
- onResetValue: (name) => void store.nodes.resetTriggerConfig(nodeId, [name]),
115573
+ onResetValue: (name) => void editor?.nodes.resetTriggerConfig(nodeId, [name]),
114281
115574
  inputs: visibleInputs,
114282
115575
  fieldLabels,
114283
115576
  config: assignments,
114284
115577
  disabled,
114285
- onChange: (name, value) => void store.nodes.saveTriggerConfig(nodeId, name, value),
115578
+ onChange: (name, value) => void editor?.nodes.saveTriggerConfig(nodeId, name, value),
114286
115579
  renderEditor: (input) => input.handle === "sourceId" ? /* @__PURE__ */ jsxs("div", {
114287
115580
  className: "flex min-w-0 flex-col gap-2",
114288
115581
  children: [
114289
115582
  options == null ? /* @__PURE__ */ jsx("div", {
114290
115583
  className: "flex h-[30px] w-full items-center rounded-[var(--ui-control-radius,var(--ui-radius))] border border-input bg-[var(--ui-control-background,var(--ui-muted))] px-2 text-xs text-muted-foreground",
114291
115584
  children: t("eventSources.loading")
114292
- }) : options.length > 0 ? /* @__PURE__ */ jsx(EventSourceSelect, {
115585
+ }) : readOnly || options.length > 0 ? /* @__PURE__ */ jsx(EventSourceSelect, {
114293
115586
  label: fieldLabels?.sourceId ?? t("eventSources.source"),
114294
115587
  value: sourceId,
114295
115588
  options,
@@ -114297,12 +115590,12 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114297
115590
  onOpen: () => setAttempt((value) => value + 1),
114298
115591
  onChange: (value) => {
114299
115592
  const source = matchingSources?.find((item) => item.sourceId == value);
114300
- if (source != null) store.nodes.setTriggerEventSource(nodeId, source);
115593
+ if (source != null) editor?.nodes.setTriggerEventSource(nodeId, source);
114301
115594
  }
114302
- }) : /* @__PURE__ */ jsxs("div", {
115595
+ }) : editor != null ? /* @__PURE__ */ jsxs("div", {
114303
115596
  className: "flex h-[30px] w-full items-center overflow-hidden rounded-[var(--ui-control-radius,var(--ui-radius))] border border-input bg-[var(--ui-control-background,var(--ui-muted))]",
114304
115597
  children: [/* @__PURE__ */ jsx(CreateEventSourceDialog, {
114305
- notify: store.notify,
115598
+ notify: editor.notify,
114306
115599
  className: "min-w-0 flex-1",
114307
115600
  trigger: /* @__PURE__ */ jsx(Button$1, {
114308
115601
  type: "button",
@@ -114311,7 +115604,7 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114311
115604
  className: "h-full w-full justify-start rounded-none border-0 bg-transparent px-2"
114312
115605
  }),
114313
115606
  sourceKind: eventSourceKind(provider),
114314
- client: store.eventSourceClient,
115607
+ client: editor.eventSourceClient,
114315
115608
  teamId: state?.key == key ? state.teamId ?? null : null,
114316
115609
  existingNames: sources?.map((source) => source.name) ?? [],
114317
115610
  disabled: disabled || state?.key != key || state.teamId === void 0,
@@ -114319,8 +115612,8 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114319
115612
  ...current,
114320
115613
  sources: [...current.sources ?? [], source]
114321
115614
  } : current),
114322
- onSelect: async (source) => store.$.flowId.value == flowId && await store.nodes.setTriggerEventSource(nodeId, source)
114323
- }, JSON.stringify([store.$.flowId.value, nodeId])), /* @__PURE__ */ jsx(Button$1, {
115615
+ onSelect: async (source) => editor.$.flowId.value == flowId && await editor.nodes.setTriggerEventSource(nodeId, source)
115616
+ }, JSON.stringify([editor.$.flowId.value, nodeId])), /* @__PURE__ */ jsx(Button$1, {
114324
115617
  type: "button",
114325
115618
  size: "icon-xs",
114326
115619
  variant: "ghost",
@@ -114334,7 +115627,7 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114334
115627
  className: `i-lucide-light:refresh-cw ${loading ? "animate-spin motion-reduce:animate-none" : ""}`
114335
115628
  })
114336
115629
  })]
114337
- }),
115630
+ }) : null,
114338
115631
  sourceId && options != null && !options.some((option) => option.value == sourceId) && /* @__PURE__ */ jsx("p", {
114339
115632
  role: "alert",
114340
115633
  className: "text-sm text-destructive",
@@ -114346,14 +115639,15 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114346
115639
  children: t("eventSources.loadFailed")
114347
115640
  })
114348
115641
  ]
114349
- }) : input.handle === "eventTypes" && provider === "feishu_app_bot" ? sourceId ? /* @__PURE__ */ jsxs("div", {
115642
+ }) : input.handle === "eventTypes" && provider === "feishu_app_bot" ? sourceId || readOnly ? /* @__PURE__ */ jsxs("div", {
114350
115643
  className: "flex flex-col gap-2",
114351
115644
  children: [/* @__PURE__ */ jsx(FeishuEventPicker, {
115645
+ readOnly,
114352
115646
  value: selectedEvents,
114353
- allowedEvents: (eventOptions ?? []).map((option) => option.value),
115647
+ allowedEvents: eventOptions ?? [],
114354
115648
  disabled: disabled || eventOptions == null,
114355
- onChange: (value) => void store.nodes.saveTriggerConfig(nodeId, "eventTypes", value)
114356
- }), /* @__PURE__ */ jsx("p", {
115649
+ onChange: (value) => void editor?.nodes.saveTriggerConfig(nodeId, "eventTypes", value)
115650
+ }), !readOnly && /* @__PURE__ */ jsx("p", {
114357
115651
  className: "m-0 text-xs text-muted-foreground",
114358
115652
  children: t("eventSources.sourceEventsHint")
114359
115653
  })]
@@ -114361,12 +115655,13 @@ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLa
114361
115655
  className: "flex h-[30px] items-center rounded-[var(--ui-control-radius,var(--ui-radius))] border border-input bg-[var(--ui-control-background,var(--ui-muted))] px-2 text-xs text-muted-foreground",
114362
115656
  children: t("eventSources.selectSourceFirst")
114363
115657
  }) : input.handle === "chatIds" || input.handle === "resource" ? /* @__PURE__ */ jsx(FeishuEventFilters, {
115658
+ readOnly,
114364
115659
  field: input.handle,
114365
115660
  config,
114366
115661
  events: selectedEvents,
114367
115662
  managed: selectedSource?.manageSubscriptions ?? false,
114368
115663
  disabled: disabled || selectedSource == null,
114369
- onChange: (name, value) => void store.nodes.saveTriggerConfig(nodeId, name, value)
115664
+ onChange: (name, value) => void editor?.nodes.saveTriggerConfig(nodeId, name, value)
114370
115665
  }) : void 0
114371
115666
  });
114372
115667
  }
@@ -115189,109 +116484,6 @@ function GeneralSettings({ title, children, disabled = false, readOnly = false,
115189
116484
  }, nodeId);
115190
116485
  }
115191
116486
  //#endregion
115192
- //#region src/workbench/browser/runtime/editor/httpParameterEditor.tsx
115193
- var expanded$2 = () => true;
115194
- var object = (value) => value != null && typeof value === "object" && !Array.isArray(value) ? value : {};
115195
- function HttpParameterEditor({ group, task, entries, disabled, readOnly, variables, renderSource, onEdit }) {
115196
- const t = useTranslate();
115197
- if (task.executor.kind !== "http-request") return null;
115198
- const parameters = task.executor[group];
115199
- const root = parameters.mode === "object" ? entries[group] : void 0;
115200
- const label = t(`httpRequest.${group}`);
115201
- const schema = group === "query" ? httpQuerySchema : httpHeaderSchema;
115202
- const handle = (name) => `${group === "query" ? "query" : "header"}.${name}`;
115203
- const values = parameters.mode === "fields" ? Object.fromEntries(parameters.names.map((name) => {
115204
- const value = entries[handle(name)]?.value;
115205
- return [name, value === void 0 ? "" : value];
115206
- })) : object(root?.value);
115207
- const input = (port, entry, name) => {
115208
- const upstream = renderSource(port.handle, port);
115209
- return {
115210
- embedded: true,
115211
- definition: port,
115212
- variables,
115213
- disabled,
115214
- readOnly,
115215
- variableName: entry?.variableName,
115216
- connected: entry?.connected ?? false,
115217
- upstream: upstream == null ? void 0 : {
115218
- ...upstream,
115219
- onChange: (source) => onEdit({
115220
- kind: "source",
115221
- source: {
115222
- kind: "node",
115223
- ...source
115224
- },
115225
- field: name,
115226
- fields: values
115227
- })
115228
- },
115229
- onVariable: (next) => {
115230
- if (next == null) onEdit({
115231
- kind: "fields",
115232
- value: name == null ? {} : {
115233
- ...values,
115234
- [name]: ""
115235
- },
115236
- field: name
115237
- });
115238
- else onEdit({
115239
- kind: "variable",
115240
- name: next,
115241
- field: name,
115242
- fields: values
115243
- });
115244
- }
115245
- };
115246
- };
115247
- return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(FieldTable, {
115248
- standalone: true,
115249
- layout: "values",
115250
- typeColumn: false,
115251
- columnHeadings: false,
115252
- actionSlots: 2,
115253
- children: /* @__PURE__ */ jsx(NodeInputValue, {
115254
- ...input({
115255
- handle: group,
115256
- jsonSchema: schema,
115257
- nullable: true
115258
- }, root),
115259
- label,
115260
- value: values,
115261
- onValue: (next) => onEdit({
115262
- kind: "fields",
115263
- value: object(next)
115264
- }),
115265
- presentation: {
115266
- valueOnly: true,
115267
- hideOptions: true,
115268
- hideValueTools: true,
115269
- hideChildTypes: true,
115270
- expansionPolicy: expanded$2,
115271
- validateObjectFieldName: (name, current) => group === "query" ? !!name.trim() && (name === current || !Object.hasOwn(values, name)) : httpHeaderNameIssue(name, Object.keys(values).filter((key) => key !== current)) == null,
115272
- renderObjectField: (name, props) => /* @__PURE__ */ jsx(NodeInputValue, {
115273
- ...input({
115274
- handle: handle(name),
115275
- jsonSchema: props.schema,
115276
- nullable: true
115277
- }, parameters.mode === "fields" ? entries[handle(name)] : void 0, name),
115278
- label: props.label,
115279
- value: parameters.mode === "fields" ? entries[handle(name)]?.value : values[name],
115280
- presentation: props,
115281
- onValue: (value) => onEdit({
115282
- kind: "fields",
115283
- value: {
115284
- ...values,
115285
- [name]: value ?? null
115286
- },
115287
- field: name
115288
- })
115289
- })
115290
- }
115291
- })
115292
- })] });
115293
- }
115294
- //#endregion
115295
116487
  //#region src/workbench/browser/runtime/editor/httpRequestSection.tsx
115296
116488
  function HttpRequestSection({ task, disabled, onSave, parameters, input }) {
115297
116489
  const t = useTranslate();
@@ -115462,7 +116654,8 @@ function HttpRequestSection({ task, disabled, onSave, parameters, input }) {
115462
116654
  }
115463
116655
  //#endregion
115464
116656
  //#region src/workbench/browser/runtime/editor/useTriggerConfigOptions.ts
115465
- function useTriggerConfigOptions(store, nodeId, field, scope, enabled) {
116657
+ function useTriggerConfigOptions(store, nodeId, field, scope, requested) {
116658
+ const enabled = store != null && requested;
115466
116659
  const [attempt, setAttempt] = useState(0);
115467
116660
  const key = JSON.stringify([
115468
116661
  nodeId,
@@ -115471,7 +116664,7 @@ function useTriggerConfigOptions(store, nodeId, field, scope, enabled) {
115471
116664
  ]);
115472
116665
  const [state, setState] = useState();
115473
116666
  useEffect(() => {
115474
- if (!enabled) return;
116667
+ if (!enabled || store == null) return;
115475
116668
  const controller = new AbortController();
115476
116669
  setState((current) => ({
115477
116670
  failed: false,
@@ -115587,12 +116780,15 @@ function TeamSelect({ disabled, missing, options, value, onChange }) {
115587
116780
  })]
115588
116781
  });
115589
116782
  }
115590
- function StatusSelect({ disabled, missing, options, selected, teamSelected, onChange }) {
116783
+ function StatusSelect({ disabled, readOnly = false, missing, options, selected, teamSelected, onChange }) {
115591
116784
  const t = useTranslate();
115592
116785
  const descriptionId = useId();
115593
116786
  const errorId = useId();
115594
116787
  const [container, setContainer] = useState(null);
115595
- const choices = [...options.options ?? [], ...missing.map((value) => ({
116788
+ const choices = readOnly ? selected.map((value) => options.options?.find((item) => item.value == value) ?? {
116789
+ label: value,
116790
+ value
116791
+ }) : [...options.options ?? [], ...missing.map((value) => ({
115596
116792
  label: t("linearTrigger.unavailableStatus", { id: value }),
115597
116793
  value
115598
116794
  }))];
@@ -115614,7 +116810,7 @@ function StatusSelect({ disabled, missing, options, selected, teamSelected, onCh
115614
116810
  }),
115615
116811
  /* @__PURE__ */ jsxs(DropdownMenu, {
115616
116812
  onOpenChange: (open) => {
115617
- if (open) options.refresh();
116813
+ if (open && !readOnly) options.refresh();
115618
116814
  },
115619
116815
  children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
115620
116816
  render: /* @__PURE__ */ jsx(Button$1, {
@@ -115624,7 +116820,7 @@ function StatusSelect({ disabled, missing, options, selected, teamSelected, onCh
115624
116820
  className: "w-full min-w-0 justify-between",
115625
116821
  "data-field-control": true,
115626
116822
  "data-field-prompt": missing.length > 0 || void 0,
115627
- disabled,
116823
+ disabled: disabled && !readOnly,
115628
116824
  size: "field",
115629
116825
  title: missing.length > 0 ? t("linearTrigger.missingStatuses") : t("linearTrigger.statusHint"),
115630
116826
  type: "button",
@@ -115654,6 +116850,7 @@ function StatusSelect({ disabled, missing, options, selected, teamSelected, onCh
115654
116850
  const unavailable = missing.includes(item.value);
115655
116851
  return /* @__PURE__ */ jsxs(DropdownMenuCheckboxItem, {
115656
116852
  checked,
116853
+ disabled: readOnly,
115657
116854
  className: `mt-1 first-of-type:mt-0 min-h-7 rounded-[var(--ui-control-radius,var(--ui-radius))] py-1 text-xs leading-5 font-normal ${unavailable ? "text-destructive" : ""}`,
115658
116855
  onCheckedChange: (next) => onChange(next ? [...selected, item.value] : selected.filter((value) => value != item.value)),
115659
116856
  children: ["color" in item && item.color != null && /* @__PURE__ */ jsx("span", {
@@ -115692,33 +116889,37 @@ function StatusSelect({ disabled, missing, options, selected, teamSelected, onCh
115692
116889
  ]
115693
116890
  });
115694
116891
  }
115695
- function LinearTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId, connectionId, disabled, store }) {
116892
+ function LinearTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId, connectionId, disabled: temporarilyDisabled, readOnly = false, store }) {
116893
+ const disabled = readOnly || temporarilyDisabled;
116894
+ const editor = readOnly ? void 0 : store;
115696
116895
  const config = triggerConfigValues(inputs, assignments);
115697
116896
  const teamId = typeof config.teamId == "string" ? config.teamId : void 0;
115698
116897
  const selected = Array.isArray(config.stateIds) ? config.stateIds.filter((id) => typeof id == "string") : [];
115699
- const scope = JSON.stringify([store.$.flowId.value, connectionId]);
115700
- const teams = useTriggerConfigOptions(store, nodeId, "teamId", scope, connectionId != null);
115701
- const states = useTriggerConfigOptions(store, nodeId, "stateIds", JSON.stringify([scope, teamId]), connectionId != null && teamId != null);
116898
+ const scope = JSON.stringify([editor?.$.flowId.value, connectionId]);
116899
+ const teams = useTriggerConfigOptions(editor, nodeId, "teamId", scope, connectionId != null);
116900
+ const states = useTriggerConfigOptions(editor, nodeId, "stateIds", JSON.stringify([scope, teamId]), connectionId != null && teamId != null);
115702
116901
  const missingTeam = teamId != null && teams.options != null && !teams.options.some((item) => item.value == teamId);
115703
116902
  const missingStates = states.options == null ? [] : selected.filter((id) => !states.options.some((item) => item.value == id));
115704
116903
  return /* @__PURE__ */ jsx(TriggerConfigEditor, {
115705
- onReset: () => store.nodes.resetTriggerConfig(nodeId),
115706
- onResetValue: (name) => void store.nodes.resetTriggerConfig(nodeId, [name]),
116904
+ readOnly,
116905
+ onReset: () => editor?.nodes.resetTriggerConfig(nodeId),
116906
+ onResetValue: (name) => void editor?.nodes.resetTriggerConfig(nodeId, [name]),
115707
116907
  inputs,
115708
116908
  fieldLabels,
115709
116909
  config: assignments,
115710
116910
  disabled,
115711
- onChange: (name, value) => void store.nodes.saveTriggerConfig(nodeId, name, value),
116911
+ onChange: (name, value) => void editor?.nodes.saveTriggerConfig(nodeId, name, value),
115712
116912
  renderEditor: (input) => input.handle === "teamId" ? /* @__PURE__ */ jsx(TeamSelect, {
115713
116913
  disabled: disabled || connectionId == null,
115714
116914
  missing: missingTeam,
115715
- onChange: (value) => void store.nodes.saveTriggerConfig(nodeId, "teamId", value),
116915
+ onChange: (value) => void editor?.nodes.saveTriggerConfig(nodeId, "teamId", value),
115716
116916
  options: teams,
115717
116917
  value: teamId
115718
116918
  }) : input.handle === "stateIds" ? /* @__PURE__ */ jsx(StatusSelect, {
116919
+ readOnly,
115719
116920
  disabled: disabled || connectionId == null || teamId == null || missingTeam,
115720
116921
  missing: missingStates,
115721
- onChange: (value) => void store.nodes.saveTriggerConfig(nodeId, "stateIds", value),
116922
+ onChange: (value) => void editor?.nodes.saveTriggerConfig(nodeId, "stateIds", value),
115722
116923
  options: states,
115723
116924
  selected,
115724
116925
  teamSelected: teamId != null
@@ -116339,6 +117540,106 @@ function presentProviderOutputDescription(node, output, description, display) {
116339
117540
  return display?.outputs[output] ?? description;
116340
117541
  }
116341
117542
  //#endregion
117543
+ //#region src/workbench/browser/runtime/editor/requestParameterEditor.tsx
117544
+ var expanded$2 = () => true;
117545
+ var object = (value) => value != null && typeof value === "object" && !Array.isArray(value) ? value : {};
117546
+ function RequestParameterEditor({ group, parameters, schema, entries, disabled, readOnly, variables, renderSource, onEdit }) {
117547
+ const t = useTranslate();
117548
+ const root = parameters.mode === "object" ? entries[group] : void 0;
117549
+ const label = t(`httpRequest.${group}`);
117550
+ const handle = (name) => `${group === "query" ? "query" : "header"}.${name}`;
117551
+ const values = parameters.mode === "fields" ? Object.fromEntries(parameters.names.map((name) => {
117552
+ const value = entries[handle(name)]?.value;
117553
+ return [name, value === void 0 ? "" : value];
117554
+ })) : object(root?.value);
117555
+ const input = (port, entry, name) => {
117556
+ const upstream = renderSource(port.handle, port);
117557
+ return {
117558
+ embedded: true,
117559
+ definition: port,
117560
+ variables,
117561
+ disabled,
117562
+ readOnly,
117563
+ variableName: entry?.variableName,
117564
+ connected: entry?.connected ?? false,
117565
+ upstream: upstream == null ? void 0 : {
117566
+ ...upstream,
117567
+ onChange: (source) => onEdit({
117568
+ kind: "source",
117569
+ source: {
117570
+ kind: "node",
117571
+ ...source
117572
+ },
117573
+ field: name,
117574
+ fields: values
117575
+ })
117576
+ },
117577
+ onVariable: (next) => {
117578
+ if (next == null) onEdit({
117579
+ kind: "fields",
117580
+ value: name == null ? {} : {
117581
+ ...values,
117582
+ [name]: ""
117583
+ },
117584
+ field: name
117585
+ });
117586
+ else onEdit({
117587
+ kind: "variable",
117588
+ name: next,
117589
+ field: name,
117590
+ fields: values
117591
+ });
117592
+ }
117593
+ };
117594
+ };
117595
+ return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(FieldTable, {
117596
+ standalone: true,
117597
+ layout: "values",
117598
+ typeColumn: false,
117599
+ columnHeadings: false,
117600
+ actionSlots: 2,
117601
+ children: /* @__PURE__ */ jsx(NodeInputValue, {
117602
+ ...input({
117603
+ handle: group,
117604
+ jsonSchema: schema,
117605
+ nullable: true
117606
+ }, root),
117607
+ label,
117608
+ value: values,
117609
+ onValue: (next) => onEdit({
117610
+ kind: "fields",
117611
+ value: object(next)
117612
+ }),
117613
+ presentation: {
117614
+ valueOnly: true,
117615
+ hideOptions: true,
117616
+ hideValueTools: true,
117617
+ hideChildTypes: true,
117618
+ expansionPolicy: expanded$2,
117619
+ validateObjectFieldName: (name, current) => group === "query" ? !!name.trim() && (name === current || !Object.hasOwn(values, name)) : httpHeaderNameIssue(name, Object.keys(values).filter((key) => key !== current)) == null,
117620
+ renderObjectField: (name, props) => /* @__PURE__ */ jsx(NodeInputValue, {
117621
+ ...input({
117622
+ handle: handle(name),
117623
+ jsonSchema: props.schema,
117624
+ nullable: true
117625
+ }, parameters.mode === "fields" ? entries[handle(name)] : void 0, name),
117626
+ label: props.label,
117627
+ value: parameters.mode === "fields" ? entries[handle(name)]?.value : values[name],
117628
+ presentation: props,
117629
+ onValue: (value) => onEdit({
117630
+ kind: "fields",
117631
+ value: {
117632
+ ...values,
117633
+ [name]: value ?? null
117634
+ },
117635
+ field: name
117636
+ })
117637
+ })
117638
+ }
117639
+ })
117640
+ })] });
117641
+ }
117642
+ //#endregion
116342
117643
  //#region src/workbench/browser/runtime/editor/timeZoneSelect.tsx
116343
117644
  function TimeZoneSelect({ id, value, disabled, label, onChange, at = /* @__PURE__ */ new Date() }) {
116344
117645
  const t = useTranslate();
@@ -116773,24 +118074,27 @@ function SkipDuplicatesSection({ task, disabled, onSave, history }) {
116773
118074
  }
116774
118075
  //#endregion
116775
118076
  //#region src/workbench/browser/runtime/editor/tallyTriggerConfig.tsx
116776
- function TallyTriggerConfig({ inputs, fieldLabels, config, nodeId, connectionId, disabled, store }) {
118077
+ function TallyTriggerConfig({ inputs, fieldLabels, config, nodeId, connectionId, disabled: temporarilyDisabled, readOnly = false, store }) {
118078
+ const disabled = readOnly || temporarilyDisabled;
118079
+ const editor = readOnly ? void 0 : store;
116777
118080
  const t = useTranslate();
116778
118081
  const values = triggerConfigValues(inputs, config);
116779
118082
  const formId = typeof values.formId == "string" ? values.formId : void 0;
116780
- const forms = useTriggerConfigOptions(store, nodeId, "formId", JSON.stringify([store.$.flowId.value, connectionId]), connectionId != null);
118083
+ const forms = useTriggerConfigOptions(editor, nodeId, "formId", JSON.stringify([editor?.$.flowId.value, connectionId]), connectionId != null);
116781
118084
  const missing = formId != null && forms.options != null && !forms.options.some((item) => item.value == formId);
116782
118085
  const items = [...forms.options ?? [], ...formId != null && !forms.options?.some((item) => item.value == formId) ? [{
116783
118086
  value: formId,
116784
118087
  label: formId
116785
118088
  }] : []];
116786
118089
  return /* @__PURE__ */ jsx(TriggerConfigEditor, {
118090
+ readOnly,
116787
118091
  inputs,
116788
118092
  fieldLabels,
116789
118093
  config,
116790
118094
  disabled,
116791
- onChange: (name, value) => void store.nodes.saveTriggerConfig(nodeId, name, value),
116792
- onReset: () => store.nodes.resetTriggerConfig(nodeId),
116793
- onResetValue: (name) => void store.nodes.resetTriggerConfig(nodeId, [name]),
118095
+ onChange: (name, value) => void editor?.nodes.saveTriggerConfig(nodeId, name, value),
118096
+ onReset: () => editor?.nodes.resetTriggerConfig(nodeId),
118097
+ onResetValue: (name) => void editor?.nodes.resetTriggerConfig(nodeId, [name]),
116794
118098
  renderEditor: (input) => input.handle == "formId" ? /* @__PURE__ */ jsxs("div", {
116795
118099
  className: "min-w-0",
116796
118100
  children: [
@@ -116802,7 +118106,7 @@ function TallyTriggerConfig({ inputs, fieldLabels, config, nodeId, connectionId,
116802
118106
  if (open) forms.refresh();
116803
118107
  },
116804
118108
  onValueChange: (value) => {
116805
- if (typeof value == "string") store.nodes.saveTriggerConfig(nodeId, "formId", value);
118109
+ if (typeof value == "string") editor?.nodes.saveTriggerConfig(nodeId, "formId", value);
116806
118110
  },
116807
118111
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
116808
118112
  "aria-label": t("tallyTrigger.form"),
@@ -118024,7 +119328,7 @@ function inspectorIcon(node) {
118024
119328
  if (node.definition.executor.kind == "decision") return "decision";
118025
119329
  if (node.definition.executor.kind == "workflow") return "flow";
118026
119330
  if (node.definition.executor.kind == "openapi" || node.definition.executor.kind == "http-request" || node.definition.executor.kind == "skip-duplicates") return "task";
118027
- return node.definition.executor.kind == "connector" ? "connection" : "llm";
119331
+ return node.definition.executor.kind == "connector" || node.definition.executor.kind === "connector-proxy" ? "connection" : "llm";
118028
119332
  }
118029
119333
  return "task";
118030
119334
  }
@@ -118058,6 +119362,7 @@ function nodePurposePlaceholder(selection, t, action, displays) {
118058
119362
  case "workflow": return t("workflow.description");
118059
119363
  case "skip-duplicates": return;
118060
119364
  case "http-request": return t("httpRequest.description");
119365
+ case "connector-proxy": return t("connectorProxy.description");
118061
119366
  case "openapi": return t("openapi.description");
118062
119367
  case "connector": return action?.description;
118063
119368
  case "llm": return t(definition.executor.mode == "json" ? "addNode.llmStructuredDescription" : "addNode.llmChatDescription");
@@ -118109,7 +119414,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118109
119414
  loading: false,
118110
119415
  names: [],
118111
119416
  onOpen: void 0
118112
- }, readOnly = false, connectorAction, connectorActionError, connectorAccessError, connectorAuthorizationPending = false, connectorConnection, connectorConnectionError, activeConnectorConnections, connectorProviders, connectors: liveConnectors, connectorAccess, connectorCandidates, onConfigureConnectorAccess, prepareConnectorAction, connectorLoading = false, disabled: temporarilyDisabled = false, diagnostics, focus, revision, selection, sourceNodeIcons, store: writableStore, theme, triggerActiveConnections, triggerAuthorizationPending = false, triggerConnection, triggerConnectionError, triggerConnectionLoading = false, triggerDisplays, triggers: liveTriggers }) {
119417
+ }, readOnly = false, connectorAction, connectorProvider, connectorActionError, connectorAccessError, connectorAuthorizationPending = false, connectorConnection, connectorConnectionError, activeConnectorConnections, connectorProviders, connectors: liveConnectors, connectorAccess, connectorCandidates, onConfigureConnectorAccess, prepareConnectorAction, connectorLoading = false, disabled: temporarilyDisabled = false, diagnostics, focus, revision, selection, sourceNodeIcons, store: writableStore, theme, triggerActiveConnections, triggerAuthorizationPending = false, triggerConnection, triggerConnectionError, triggerConnectionLoading = false, triggerDisplays, triggers: liveTriggers }) {
118113
119418
  const store = readOnly ? void 0 : writableStore;
118114
119419
  const connectors = readOnly ? void 0 : liveConnectors;
118115
119420
  const triggers = readOnly ? void 0 : liveTriggers;
@@ -118131,6 +119436,8 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118131
119436
  const isAgent = task != null && "executor" in task && task.executor.kind == "agent";
118132
119437
  const isDecision = task != null && "executor" in task && task.executor.kind == "decision";
118133
119438
  const isHttpRequest = task != null && "executor" in task && task.executor.kind == "http-request";
119439
+ const proxy = task != null && "executor" in task && task.executor.kind === "connector-proxy" ? task.executor : void 0;
119440
+ const proxyProvider = proxy == null ? void 0 : connectorProvider ?? connectorProviders?.[proxy.providerId];
118134
119441
  const isOpenApi = task != null && "executor" in task && task.executor.kind == "openapi";
118135
119442
  const unconfiguredWorkflow = task != null && "executor" in task && task.executor.kind == "workflow" && !task.executor.flowId;
118136
119443
  const unconfiguredOpenApi = task != null && "executor" in task && task.executor.kind == "openapi" && !task.executor.path;
@@ -118173,6 +119480,98 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118173
119480
  selection?.id,
118174
119481
  selection?.kind
118175
119482
  ]);
119483
+ const requestInput = (handle, label) => {
119484
+ if (selection?.kind !== "task" || task == null) return null;
119485
+ const proxyBody = proxy != null && handle === "body";
119486
+ const definition = task.inputs.find((port) => "handle" in port && port.handle === handle) ?? (proxyBody ? connectorProxyBodyInput : void 0);
119487
+ if (definition == null) return null;
119488
+ const mapping = revision.inputMappings(selection.node)[handle];
119489
+ const source = mapping?.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
119490
+ const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
119491
+ const input = /* @__PURE__ */ jsx(NodeInputValue, {
119492
+ embedded: true,
119493
+ definition,
119494
+ label,
119495
+ presentation: {
119496
+ compact: !proxyBody,
119497
+ hideOptions: true,
119498
+ ...proxyBody ? {
119499
+ layout: "values",
119500
+ valueOnly: true,
119501
+ hideChildTypes: true,
119502
+ defaultEditor: "object",
119503
+ expansionPolicy: () => true,
119504
+ unset: {
119505
+ label: t(readOnly ? "valueEditor.unset" : "valueEditor.setValue"),
119506
+ required: false
119507
+ }
119508
+ } : {}
119509
+ },
119510
+ sourceOnly: handle.startsWith("auth."),
119511
+ readOnly,
119512
+ disabled,
119513
+ value: inputValue(mapping, definition.value),
119514
+ connected: mapping?.kind === "sources" && binding?.kind !== "variable",
119515
+ variableName: binding?.kind === "variable" ? binding.target : void 0,
119516
+ upstream: inputUpstreamSources({
119517
+ revision,
119518
+ sourceNodeIcons,
119519
+ selection,
119520
+ store,
119521
+ handleName: handle,
119522
+ port: definition,
119523
+ t,
119524
+ triggerDisplays
119525
+ }),
119526
+ variables,
119527
+ onValue: (value, deletion) => {
119528
+ store?.nodes.setInputValue(selection.id, handle, value, deletion);
119529
+ },
119530
+ onVariable: (name) => {
119531
+ store?.nodes.setInputVariable(selection.id, handle, name);
119532
+ },
119533
+ onReset: proxyBody && definition.value !== void 0 ? () => void store?.nodes.resetInputs(selection.id, [handle]) : void 0
119534
+ });
119535
+ return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), proxyBody ? /* @__PURE__ */ jsx(FieldTable, {
119536
+ standalone: true,
119537
+ layout: "values",
119538
+ typeColumn: false,
119539
+ columnHeadings: false,
119540
+ actionSlots: 2,
119541
+ children: input
119542
+ }) : input] }, handle);
119543
+ };
119544
+ const requestExecutor = task != null && "executor" in task && (task.executor.kind === "http-request" || task.executor.kind === "connector-proxy") ? task.executor : void 0;
119545
+ const requestParameters = requestExecutor != null && selection?.kind === "task" && ["query", "headers"].map((group) => /* @__PURE__ */ jsx(RequestParameterEditor, {
119546
+ group,
119547
+ parameters: requestExecutor[group],
119548
+ schema: proxy != null ? group === "query" ? connectorProxyQuerySchema : connectorProxyHeaderSchema : group === "query" ? httpQuerySchema : httpHeaderSchema,
119549
+ entries: Object.fromEntries(Object.entries(revision.inputMappings(selection.node)).map(([handle, mapping]) => {
119550
+ const source = mapping.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
119551
+ const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
119552
+ return [handle, {
119553
+ value: inputValue(mapping, void 0),
119554
+ connected: mapping.kind === "sources" && binding?.kind !== "variable",
119555
+ variableName: binding?.kind === "variable" ? binding.target : void 0
119556
+ }];
119557
+ })),
119558
+ variables,
119559
+ disabled,
119560
+ readOnly,
119561
+ renderSource: (handleName, port) => inputUpstreamSources({
119562
+ revision,
119563
+ sourceNodeIcons,
119564
+ selection,
119565
+ store,
119566
+ handleName,
119567
+ port,
119568
+ t,
119569
+ triggerDisplays
119570
+ }),
119571
+ onEdit: (edit) => {
119572
+ store?.nodes.saveRequestParameters(selection.id, group, edit);
119573
+ }
119574
+ }, group));
118176
119575
  const panel = /* @__PURE__ */ jsx(ScrollArea, {
118177
119576
  className: "inspector-scroll",
118178
119577
  tabIndex: -1,
@@ -118182,13 +119581,14 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118182
119581
  children: [
118183
119582
  selection?.kind === "trigger" && selection.trigger.kind === "webhook" && webhookDeployment != null && /* @__PURE__ */ jsx(WebhookDeployment, { ...webhookDeployment }, selection.id),
118184
119583
  readOnly && connector != null && /* @__PURE__ */ jsx(SavedConnectionReference, {
118185
- action: connector.action,
118186
- connectionId: connector.connectionId
119584
+ noSetup: connectorAction?.authenticated === false || connectorProviders?.[connector.action.split(".")[0]]?.noSetup,
119585
+ connectionId: proxy?.connectionId ?? connector?.connectionId
118187
119586
  }),
118188
- readOnly && selection?.kind === "trigger" && (selection.trigger.kind === "poll" || selection.trigger.kind === "integration") && /* @__PURE__ */ jsx(SavedConnectionReference, {
118189
- action: selection.trigger.definition.key,
118190
- connectionId: selection.trigger.connectionId
119587
+ readOnly && proxy != null && /* @__PURE__ */ jsx(SavedConnectionReference, {
119588
+ noSetup: proxyProvider?.noSetup,
119589
+ connectionId: proxy.connectionId
118191
119590
  }),
119591
+ readOnly && selection?.kind === "trigger" && (selection.trigger.kind === "poll" || selection.trigger.kind === "integration") && /* @__PURE__ */ jsx(SavedConnectionReference, { connectionId: selection.trigger.connectionId }),
118192
119592
  !readOnly && triggers != null && selection?.kind == "trigger" && /* @__PURE__ */ jsx(TriggerConnection, {
118193
119593
  activeConnections: triggerActiveConnections,
118194
119594
  authorizationPending: triggerAuthorizationPending,
@@ -118200,17 +119600,17 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118200
119600
  triggers,
118201
119601
  onConfigureAccess: (providerId) => void triggers.connect(providerId)
118202
119602
  }),
118203
- !readOnly && connectors != null && connector != null && nodeId != null && connectorAction?.authenticated !== false && /* @__PURE__ */ jsx(ConnectorAccount, {
118204
- action: connectorAction,
119603
+ !readOnly && connectors != null && (connector != null || proxy != null) && nodeId != null && (proxy != null ? proxyProvider?.noSetup !== true : connectorAction?.authenticated !== false) && /* @__PURE__ */ jsx(ConnectorAccount, {
119604
+ resource: proxy != null ? proxyProvider : connectorAction,
118205
119605
  actionError: connectorActionError,
118206
119606
  accessError: connectorAccessError,
118207
- actionId: connector.action,
118208
- onConfigureAccess: () => void connectors.connect(connectorAction?.serviceId ?? connector.action.split(".")[0]),
119607
+ actionId: proxy?.providerId ?? connector.action,
119608
+ onConfigureAccess: () => void connectors.connect(proxy?.providerId ?? connectorAction?.serviceId ?? connector.action.split(".")[0]),
118209
119609
  activeConnections: activeConnectorConnections,
118210
119610
  authorizationPending: connectorAuthorizationPending,
118211
119611
  connection: connectorConnection,
118212
119612
  connectionError: connectorConnectionError,
118213
- connectionId: connector.connectionId,
119613
+ connectionId: proxy?.connectionId ?? connector?.connectionId,
118214
119614
  connectors,
118215
119615
  disabled,
118216
119616
  fieldIdPrefix: `task-${selection?.id}`,
@@ -118235,6 +119635,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118235
119635
  isAgent && /* @__PURE__ */ jsx(AgentPrompt, {}),
118236
119636
  selection?.kind === "task" && selection.module != null && /* @__PURE__ */ jsx(CodeTaskSection, {
118237
119637
  readOnly,
119638
+ providers: connectorProviders,
118238
119639
  connectorAccess,
118239
119640
  connectorCandidates,
118240
119641
  onConfigureAccess: onConfigureConnectorAccess == null ? void 0 : () => onConfigureConnectorAccess(),
@@ -118247,7 +119648,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118247
119648
  store,
118248
119649
  theme
118249
119650
  }),
118250
- selection?.kind === "trigger" && (selection.trigger.kind === "integration" || selection.trigger.kind === "poll") && (!readOnly && store != null && [
119651
+ selection?.kind === "trigger" && (selection.trigger.kind === "integration" || selection.trigger.kind === "poll") && ([
118251
119652
  "feishu.on_event",
118252
119653
  "feishu_app_bot.on_event",
118253
119654
  "slackbot.on_event",
@@ -118257,6 +119658,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118257
119658
  "fireflies.on_meeting_ready",
118258
119659
  "jira.on_issue_event"
118259
119660
  ].includes(selection.trigger.definition.key) ? /* @__PURE__ */ jsx(EventSourceTriggerConfig, {
119661
+ readOnly,
118260
119662
  provider: selection.trigger.definition.provider === "slackbot" ? "slackbot" : selection.trigger.definition.provider === "intercom" ? "intercom" : selection.trigger.definition.provider === "sentry" ? "sentry" : selection.trigger.definition.provider === "zoom" ? "zoom" : selection.trigger.definition.provider === "fireflies" ? "fireflies" : selection.trigger.definition.provider === "jira" ? "jira" : "feishu_app_bot",
118261
119663
  inputs: providerConfigInputs,
118262
119664
  fieldLabels: providerDisplay?.configInputLabels,
@@ -118265,7 +119667,8 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118265
119667
  connectionId: selection.trigger.connectionId,
118266
119668
  disabled,
118267
119669
  store
118268
- }) : !readOnly && store != null && selection.trigger.definition.key === "linear.on_issue_changed" ? /* @__PURE__ */ jsx(LinearTriggerConfig, {
119670
+ }) : selection.trigger.definition.key === "linear.on_issue_changed" ? /* @__PURE__ */ jsx(LinearTriggerConfig, {
119671
+ readOnly,
118269
119672
  inputs: providerConfigInputs,
118270
119673
  fieldLabels: providerDisplay?.configInputLabels,
118271
119674
  config: selection.trigger.config,
@@ -118273,7 +119676,8 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118273
119676
  connectionId: selection.trigger.connectionId,
118274
119677
  disabled,
118275
119678
  store
118276
- }) : !readOnly && store != null && selection.trigger.definition.key === "tally.on_form_response" ? /* @__PURE__ */ jsx(TallyTriggerConfig, {
119679
+ }) : selection.trigger.definition.key === "tally.on_form_response" ? /* @__PURE__ */ jsx(TallyTriggerConfig, {
119680
+ readOnly,
118277
119681
  inputs: providerConfigInputs,
118278
119682
  fieldLabels: providerDisplay?.configInputLabels,
118279
119683
  config: selection.trigger.config,
@@ -118408,74 +119812,8 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118408
119812
  isHttpRequest && task != null && "executor" in task && /* @__PURE__ */ jsx(HttpRequestSection, {
118409
119813
  task,
118410
119814
  disabled,
118411
- input: (handle, label) => {
118412
- if (selection?.kind !== "task") return null;
118413
- const definition = task.inputs.find((port) => "handle" in port && port.handle === handle);
118414
- if (definition == null) return null;
118415
- const mapping = revision.inputMappings(selection.node)[handle];
118416
- const source = mapping?.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
118417
- const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
118418
- return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(NodeInputValue, {
118419
- embedded: true,
118420
- definition,
118421
- label,
118422
- presentation: {
118423
- compact: true,
118424
- hideOptions: true
118425
- },
118426
- sourceOnly: handle.startsWith("auth."),
118427
- readOnly,
118428
- disabled,
118429
- value: inputValue(mapping, definition.value),
118430
- connected: mapping?.kind === "sources" && binding?.kind !== "variable",
118431
- variableName: binding?.kind === "variable" ? binding.target : void 0,
118432
- upstream: inputUpstreamSources({
118433
- revision,
118434
- sourceNodeIcons,
118435
- selection,
118436
- store,
118437
- handleName: handle,
118438
- t,
118439
- triggerDisplays
118440
- }),
118441
- variables,
118442
- onValue: (value, deletion) => {
118443
- store?.nodes.setInputValue(selection.id, handle, value, deletion);
118444
- },
118445
- onVariable: (name) => {
118446
- store?.nodes.setInputVariable(selection.id, handle, name);
118447
- }
118448
- })] }, handle);
118449
- },
118450
- parameters: selection?.kind === "task" && ["query", "headers"].map((group) => /* @__PURE__ */ jsx(HttpParameterEditor, {
118451
- group,
118452
- task,
118453
- entries: Object.fromEntries(Object.entries(revision.inputMappings(selection.node)).map(([handle, mapping]) => {
118454
- const source = mapping.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
118455
- const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
118456
- return [handle, {
118457
- value: inputValue(mapping, void 0),
118458
- connected: mapping.kind === "sources" && binding?.kind !== "variable",
118459
- variableName: binding?.kind === "variable" ? binding.target : void 0
118460
- }];
118461
- })),
118462
- variables,
118463
- disabled,
118464
- readOnly,
118465
- renderSource: (handleName, port) => inputUpstreamSources({
118466
- revision,
118467
- sourceNodeIcons,
118468
- selection,
118469
- store,
118470
- handleName,
118471
- port,
118472
- t,
118473
- triggerDisplays
118474
- }),
118475
- onEdit: (edit) => {
118476
- store?.nodes.saveHttpParameters(selection.id, group, edit);
118477
- }
118478
- }, group)),
119815
+ input: requestInput,
119816
+ parameters: requestParameters,
118479
119817
  onSave: (before, value) => store?.nodes.saveTaskSettings(selection.id, {
118480
119818
  kind: "http-request",
118481
119819
  name: task.name,
@@ -118483,6 +119821,21 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118483
119821
  task: value
118484
119822
  }) ?? Promise.resolve(false)
118485
119823
  }, `http:${selection?.id}`),
119824
+ proxy != null && task != null && "executor" in task && /* @__PURE__ */ jsx(ConnectorProxySection, {
119825
+ task,
119826
+ disabled,
119827
+ readOnly,
119828
+ hasBody: selection?.kind === "task" && connectorProxyHasBody(revision.inputMappings(selection.node).body, task.inputs.find((port) => "handle" in port && port.handle === "body")?.value),
119829
+ input: requestInput,
119830
+ parameters: requestParameters,
119831
+ onClearBody: () => store?.nodes.setInputValue(selection.id, "body", void 0) ?? Promise.resolve(false),
119832
+ onSave: (before, value) => store?.nodes.saveTaskSettings(selection.id, {
119833
+ kind: "connector-proxy",
119834
+ name: task.name,
119835
+ before,
119836
+ task: value
119837
+ }) ?? Promise.resolve(false)
119838
+ }, `proxy:${selection?.id}`),
118486
119839
  isOpenApi && task != null && "executor" in task && /* @__PURE__ */ jsx(OpenApiSection, {
118487
119840
  task,
118488
119841
  credentials: (onInvalidChange) => selection?.kind === "task" && task.inputs.filter((port) => "handle" in port && port.handle.startsWith("auth.")).map((definition) => {
@@ -118531,7 +119884,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118531
119884
  task: value
118532
119885
  }) ?? Promise.resolve(false)
118533
119886
  }, `openapi:${selection?.id}`),
118534
- !isHttpRequest && !unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
119887
+ !isHttpRequest && proxy == null && !unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
118535
119888
  const definitions = selection.kind === "outputs" ? [...selection.node.outputDefs] : selection.kind === "task" ? [...selection.definition?.inputs ?? []] : [...selection.node.inputDefinitions];
118536
119889
  const handles = new Set(definitions.flatMap((definition) => "handle" in definition ? [definition.handle] : []));
118537
119890
  for (const handle of Object.keys(revision.inputMappings(selection.node))) if (!handles.has(handle) && !(selection.kind === "task" && selection.node.additionalInputs?.some((port) => port.handle === handle))) definitions.push({
@@ -118696,7 +120049,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
118696
120049
  readOnly,
118697
120050
  groups: true,
118698
120051
  layout: "ports",
118699
- title: t(isHttpRequest ? "httpRequest.responseOutputs" : "inspector.ports.outputsTitle"),
120052
+ title: t(isHttpRequest || proxy != null ? "httpRequest.responseOutputs" : "inspector.ports.outputsTitle"),
118700
120053
  output: true,
118701
120054
  values: presentDecisionOutputs(selection.definition, t),
118702
120055
  disabled: disabled || !("moduleId" in selection.node.task || isAgent),
@@ -118873,13 +120226,32 @@ function WorkbenchInspectorToggle({ label, open, disabled = false, onToggle }) {
118873
120226
  function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultInteractiveMode, defaultDirection, defaultMiniMapExpanded, defaultInspectorOpen = false, defaultSelectedNodeIds, nodesDraggable = true, layoutMotion, label, background = "striped", showHeader = true }) {
118874
120227
  const root = useRef(null);
118875
120228
  const t = useTranslate();
118876
- const language = useLang();
120229
+ const language = resolveUiLanguage([useLang()]);
118877
120230
  const revision = useMemo(() => revisionView(draft), [draft]);
118878
120231
  const graphId = "flow";
118879
120232
  const [sessions, setSessions] = useState({});
118880
120233
  const [inspectorOpen, setInspectorOpen] = useState(defaultInspectorOpen);
118881
120234
  const [focus, setFocus] = useState();
118882
120235
  const [catalog, setCatalog] = useState();
120236
+ const [triggerCopy, setTriggerCopy] = useState();
120237
+ useEffect(() => {
120238
+ const definitions = Object.values(revision.graph().nodes).flatMap((node) => node.kind == "integration" || node.kind == "poll" ? [node.definition] : []);
120239
+ if (definitions.length === 0) return;
120240
+ let active = true;
120241
+ Promise.all(definitions.map(async (definition) => [definition.key, await localizeTrigger(definition, language)])).then((entries) => {
120242
+ if (active) setTriggerCopy({
120243
+ revision,
120244
+ language,
120245
+ display: Object.fromEntries(entries)
120246
+ });
120247
+ }, (error) => {
120248
+ if (active) console.warn("Could not load Preview Trigger translations.", error);
120249
+ });
120250
+ return () => {
120251
+ active = false;
120252
+ };
120253
+ }, [revision, language]);
120254
+ const triggerDisplays = triggerCopy?.revision === revision && triggerCopy.language === language ? triggerCopy.display : void 0;
118883
120255
  const needsProviders = revision.connectorProviderIds.size > 0;
118884
120256
  useEffect(() => {
118885
120257
  if (!needsProviders) return;
@@ -119027,7 +120399,8 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
119027
120399
  revision,
119028
120400
  selection,
119029
120401
  theme,
119030
- connectorProviders: providerMetadata
120402
+ connectorProviders: providerMetadata,
120403
+ triggerDisplays
119031
120404
  }, `${graphId}:${selection.id}`) : comment?.kind === "comment" ? /* @__PURE__ */ jsx(CommentInspector, {
119032
120405
  title: comment.title,
119033
120406
  content: comment.content ?? "",