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

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