@oomol-lab/open-flow 0.1.0-beta.74 → 0.1.0-beta.75

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 (60) hide show
  1. package/README.md +1 -0
  2. package/dist/browser/{ContentIcon-CUQHjQIw.js → ContentIcon-FCpKiwjp.js} +2 -1
  3. package/dist/browser/{FlowCanvas-Dtf8_cQp.js → FlowCanvas-dzRBnlUT.js} +1 -1
  4. package/dist/browser/{createResourceDialog-DI9pL-Yr.js → createResourceDialog-BeYDdUl-.js} +2 -2
  5. package/dist/browser/{dialog-BYJGvItc.js → dialog-ZtpsFbl4.js} +284 -13
  6. package/dist/browser/{exportSvg-BOoy7-Db.js → exportSvg-DqXw1yf-.js} +2 -2
  7. package/dist/browser/{flowChanges-RL-H4CjD.js → flowChanges-b_5UobFj.js} +285 -44
  8. package/dist/browser/{flowWorkspace-BkDsETj0.js → flowWorkspace-ItojZbO4.js} +414 -53
  9. package/dist/browser/preview.css +181 -176
  10. package/dist/browser/preview.js +955 -182
  11. package/dist/browser/workbench.css +181 -176
  12. package/dist/browser/workbench.js +12 -6
  13. package/dist/browser/{workbenchSelect-BcWPWGzw.js → workbenchSelect-M441Lz0d.js} +1 -1
  14. package/dist/command/index.js +36 -36
  15. package/dist/common/authoring.d.ts +4 -4
  16. package/dist/common/authoringExamples.d.ts +3 -2
  17. package/dist/common/authoringSchema.d.ts +67 -4
  18. package/dist/common/control-api-conformance.js +58 -7
  19. package/dist/common/control-api.js +58 -7
  20. package/dist/common/control-requests.d.ts +3 -3
  21. package/dist/common/control-requests.js +234 -62
  22. package/dist/common/engine-contract.d.ts +1 -0
  23. package/dist/common/flow-authoring.js +56 -7
  24. package/dist/common/flow-change.d.ts +1 -1
  25. package/dist/common/flow-change.js +56 -7
  26. package/dist/common/flow-encoding.js +55 -7
  27. package/dist/common/flow-graph.d.ts +2 -1
  28. package/dist/common/flow-retry.d.ts +1 -1
  29. package/dist/common/flow-semantics.js +810 -577
  30. package/dist/common/http-request.d.ts +156 -0
  31. package/dist/common/http-request.js +5254 -0
  32. package/dist/common/mcp.d.ts +3 -3
  33. package/dist/common/mcp.js +58 -7
  34. package/dist/common/run-events.js +11 -9
  35. package/dist/common/runtime-contract.js +3 -0
  36. package/dist/common/scheduler.d.ts +1 -1
  37. package/dist/common/scheduler.js +70 -21
  38. package/dist/common/webhook-response.d.ts +0 -2
  39. package/dist/common/webhook-trigger.js +12 -11
  40. package/package.json +5 -1
  41. package/skills/open-flow/references/flow-authoring.md +1 -0
  42. package/skills/open-flow/references/flow-n8n-conversion.md +19 -15
  43. package/src/control/common/api.ts +1 -0
  44. package/src/control/common/authoring.ts +14 -3
  45. package/src/control/common/authoringExamples.ts +8 -0
  46. package/src/control/common/authoringSchema.ts +30 -24
  47. package/src/execution/common/engineContract.ts +4 -0
  48. package/src/execution/common/events.ts +3 -0
  49. package/src/execution/common/node-execution.ts +4 -2
  50. package/src/execution/common/scheduler.ts +1 -0
  51. package/src/flow/common/change.ts +3 -2
  52. package/src/flow/common/changeSchema.ts +12 -3
  53. package/src/flow/common/graph.ts +10 -4
  54. package/src/flow/common/retry.ts +1 -1
  55. package/src/flow/common/semantics.ts +60 -3
  56. package/src/flow/common/webhookResponse.ts +3 -7
  57. package/src/{openapi → http}/common/authBindings.ts +3 -3
  58. package/src/http/common/headers.ts +5 -0
  59. package/src/http/common/httpRequest.ts +251 -0
  60. package/src/trigger/common/webhook.ts +4 -3
@@ -32409,7 +32409,8 @@ var extra_icon_default = {
32409
32409
  "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect width=\"8\" height=\"8\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M7 11v4a2 2 0 0 0 2 2h4\"/><rect width=\"8\" height=\"8\" x=\"13\" y=\"13\" rx=\"2\"/></g>",
32410
32410
  "width": 24,
32411
32411
  "height": 24
32412
- }
32412
+ },
32413
+ "globe": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20\"/></g>" }
32413
32414
  },
32414
32415
  "width": 24,
32415
32416
  "height": 24
@@ -51885,7 +51886,7 @@ var ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
51885
51886
  return required$1(ZodNonOptional, this, args[0]);
51886
51887
  }
51887
51888
  });
51888
- function object$1(shape, params) {
51889
+ function object$2(shape, params) {
51889
51890
  return new ZodObject({
51890
51891
  type: "object",
51891
51892
  shape: shape ?? {},
@@ -53786,12 +53787,12 @@ function FlowCanvasView(props) {
53786
53787
  }, props.identity);
53787
53788
  }
53788
53789
  //#endregion
53789
- //#region src/openapi/common/authBindings.ts
53790
+ //#region src/http/common/authBindings.ts
53790
53791
  /** Never allow credentials to enter a Revision as literal node inputs. */
53791
- function assertOpenApiAuthBindings(document) {
53792
+ function assertHttpAuthBindings(document) {
53792
53793
  for (const node of Object.values(document.graph.nodes)) {
53793
- if (node.kind != "task" || !("executor" in node.task) || node.task.executor.kind != "openapi") continue;
53794
- for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("OpenAPI authentication accepts deployment variables and upstream outputs only.");
53794
+ if (node.kind != "task" || !("executor" in node.task) || !["openapi", "http-request"].includes(node.task.executor.kind)) continue;
53795
+ for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("HTTP authentication accepts deployment variables and upstream outputs only.");
53795
53796
  }
53796
53797
  }
53797
53798
  //#endregion
@@ -57908,6 +57909,192 @@ function decisionTask(questions = [defaultDecisionQuestion()], name = "AI Decisi
57908
57909
  outputs
57909
57910
  };
57910
57911
  }
57912
+ //#endregion
57913
+ //#region src/http/common/headers.ts
57914
+ /** Header names are case-insensitive; never silently combine duplicate business fields. */
57915
+ function httpHeaderNameIssue(name, names) {
57916
+ if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
57917
+ if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
57918
+ }
57919
+ //#endregion
57920
+ //#region src/http/common/httpRequest.ts
57921
+ var parameterSchema = strictObject({
57922
+ mode: _enum(["fields", "object"]).default("fields"),
57923
+ names: array(string$1()).default([])
57924
+ });
57925
+ var httpRequestConfigSchema = strictObject({
57926
+ method: _enum([
57927
+ "GET",
57928
+ "POST",
57929
+ "PUT",
57930
+ "PATCH",
57931
+ "DELETE",
57932
+ "HEAD",
57933
+ "OPTIONS"
57934
+ ]).default("GET"),
57935
+ query: parameterSchema.default({
57936
+ mode: "fields",
57937
+ names: []
57938
+ }),
57939
+ headers: parameterSchema.default({
57940
+ mode: "fields",
57941
+ names: []
57942
+ }),
57943
+ bodyFormat: _enum([
57944
+ "none",
57945
+ "json",
57946
+ "text",
57947
+ "form"
57948
+ ]).default("none"),
57949
+ authentication: union$1([
57950
+ strictObject({ type: literal("none") }),
57951
+ strictObject({ type: _enum(["bearer", "basic"]) }),
57952
+ strictObject({
57953
+ type: literal("apiKey"),
57954
+ name: string$1(),
57955
+ in: _enum(["header", "query"])
57956
+ })
57957
+ ]).default({ type: "none" }),
57958
+ responseFormat: _enum([
57959
+ "auto",
57960
+ "json",
57961
+ "text"
57962
+ ]).default("auto"),
57963
+ statusPolicy: _enum(["success", "all"]).default("success")
57964
+ });
57965
+ var httpRequestExecutorSchema = httpRequestConfigSchema.extend({ kind: literal("http-request") });
57966
+ var scalarSchema = { type: [
57967
+ "string",
57968
+ "number",
57969
+ "boolean"
57970
+ ] };
57971
+ var queryValueSchema = { anyOf: [scalarSchema, {
57972
+ type: "array",
57973
+ items: scalarSchema
57974
+ }] };
57975
+ var httpHeaderSchema = {
57976
+ type: "object",
57977
+ additionalProperties: { type: "string" }
57978
+ };
57979
+ var httpQuerySchema = {
57980
+ type: "object",
57981
+ additionalProperties: queryValueSchema
57982
+ };
57983
+ function httpAuthHandles(config) {
57984
+ return config.authentication.type == "none" ? [] : config.authentication.type == "basic" ? ["auth.username", "auth.password"] : ["auth.token"];
57985
+ }
57986
+ function retain(ports, old) {
57987
+ const remaining = new Map(ports.map((port) => [port.handle, port]));
57988
+ return [...old.flatMap((item) => {
57989
+ if ("group" in item) return [item];
57990
+ const next = remaining.get(item.handle);
57991
+ if (next == null) return [];
57992
+ remaining.delete(item.handle);
57993
+ return [dequal$1(item.jsonSchema, next.jsonSchema) && item.nullable == next.nullable ? item : next];
57994
+ }), ...remaining.values()];
57995
+ }
57996
+ function httpRequestTask(config = httpRequestConfigSchema.parse({}), name = "HTTP Request", previous) {
57997
+ const inputs = [{
57998
+ handle: "url",
57999
+ jsonSchema: { type: "string" },
58000
+ nullable: false
58001
+ }];
58002
+ for (const group of ["query", "headers"]) if (config[group].mode == "object") inputs.push({
58003
+ handle: group,
58004
+ jsonSchema: group == "query" ? httpQuerySchema : httpHeaderSchema,
58005
+ nullable: true
58006
+ });
58007
+ else for (const parameterName of config[group].names.filter((value) => value.trim())) inputs.push({
58008
+ handle: `${group == "query" ? "query" : "header"}.${parameterName}`,
58009
+ jsonSchema: group == "query" ? queryValueSchema : { type: "string" },
58010
+ nullable: true
58011
+ });
58012
+ if (config.bodyFormat != "none") inputs.push({
58013
+ handle: "body",
58014
+ jsonSchema: config.bodyFormat == "json" ? {} : config.bodyFormat == "text" ? { type: "string" } : httpQuerySchema,
58015
+ nullable: config.bodyFormat == "json"
58016
+ });
58017
+ inputs.push(...httpAuthHandles(config).map((handle) => ({
58018
+ handle,
58019
+ jsonSchema: { type: "string" },
58020
+ nullable: false
58021
+ })));
58022
+ const outputs = [
58023
+ {
58024
+ handle: "body",
58025
+ jsonSchema: config.responseFormat == "text" ? { type: "string" } : {},
58026
+ nullable: true
58027
+ },
58028
+ {
58029
+ handle: "statusCode",
58030
+ jsonSchema: { type: "integer" },
58031
+ nullable: false
58032
+ },
58033
+ {
58034
+ handle: "headers",
58035
+ jsonSchema: httpHeaderSchema,
58036
+ nullable: false
58037
+ }
58038
+ ];
58039
+ return {
58040
+ name,
58041
+ executor: {
58042
+ ...config,
58043
+ kind: "http-request"
58044
+ },
58045
+ inputs: retain(inputs, previous?.inputs ?? []),
58046
+ outputs: retain(outputs, previous?.outputs ?? [])
58047
+ };
58048
+ }
58049
+ function httpRequestIssues(config) {
58050
+ const issues = [];
58051
+ if (["GET", "HEAD"].includes(config.method) && config.bodyFormat != "none") issues.push({
58052
+ field: "bodyFormat",
58053
+ code: "bodyUnsupported",
58054
+ message: "GET and HEAD do not support a request body."
58055
+ });
58056
+ for (const group of ["query", "headers"]) {
58057
+ if (config[group].mode != "fields") continue;
58058
+ const seen = /* @__PURE__ */ new Set();
58059
+ for (const [index, name] of config[group].names.entries()) {
58060
+ const key = group == "headers" ? name.toLowerCase() : name;
58061
+ if (!name.trim() || seen.has(key)) issues.push({
58062
+ field: group,
58063
+ index,
58064
+ code: "parameterNamesInvalid",
58065
+ message: "Parameter names must be nonempty and unique."
58066
+ });
58067
+ seen.add(key);
58068
+ if (group == "headers" && httpHeaderNameIssue(name, []) === "invalid") issues.push({
58069
+ field: group,
58070
+ index,
58071
+ code: "headerNameInvalid",
58072
+ message: "Invalid HTTP header name."
58073
+ });
58074
+ }
58075
+ }
58076
+ const auth = config.authentication;
58077
+ if (auth.type != "none") {
58078
+ const group = auth.type == "apiKey" && auth.in == "query" ? "query" : "headers";
58079
+ const name = auth.type == "apiKey" ? auth.name : "authorization";
58080
+ if (!name.trim()) issues.push({
58081
+ field: "authentication",
58082
+ code: "keyNameRequired",
58083
+ message: "API Key requires a name."
58084
+ });
58085
+ if (group == "headers" && name.trim() && httpHeaderNameIssue(name, []) === "invalid") issues.push({
58086
+ field: "authentication",
58087
+ code: "headerNameInvalid",
58088
+ message: "Invalid authentication header name."
58089
+ });
58090
+ if (config[group].mode == "fields" && config[group].names.some((item) => group == "headers" ? item.toLowerCase() == name.toLowerCase() : item == name)) issues.push({
58091
+ field: "authentication",
58092
+ code: "authConflict",
58093
+ message: "Authentication conflicts with a request parameter."
58094
+ });
58095
+ }
58096
+ return issues;
58097
+ }
57911
58098
  function checkJsonDepth(value, depth = 0) {
57912
58099
  if (depth > 64) throw new TypeError("Value exceeds the maximum JSON depth.");
57913
58100
  if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
@@ -57918,6 +58105,7 @@ var retryNodeTypes = [
57918
58105
  "code",
57919
58106
  "connector",
57920
58107
  "openapi",
58108
+ "http-request",
57921
58109
  "llm",
57922
58110
  "decision"
57923
58111
  ];
@@ -57940,11 +58128,11 @@ function supportsNodeRetry(node) {
57940
58128
  }
57941
58129
  //#endregion
57942
58130
  //#region src/flow/common/triggerScheduleSchema.ts
57943
- var triggerScheduleSchema = array(union$1([object$1({
58131
+ var triggerScheduleSchema = array(union$1([object$2({
57944
58132
  type: literal("cron"),
57945
58133
  expression: string$1(),
57946
58134
  timezone: string$1()
57947
- }), object$1({
58135
+ }), object$2({
57948
58136
  type: literal("every"),
57949
58137
  unit: _enum([
57950
58138
  "day",
@@ -58027,11 +58215,6 @@ function workflowOutputsPort(outputs) {
58027
58215
  nullable: false
58028
58216
  };
58029
58217
  }
58030
- /** Header names are case-insensitive; never silently combine duplicate business fields. */
58031
- function webhookHeaderNameIssue(name, names) {
58032
- if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
58033
- if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
58034
- }
58035
58218
  /** Fixed inputs belong to the node, not author-supplied definitions. */
58036
58219
  var webhookResponseInputs = [
58037
58220
  {
@@ -58057,7 +58240,7 @@ var text = string$1();
58057
58240
  var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
58058
58241
  var json$3 = json$4();
58059
58242
  var strings = array(text);
58060
- var port = object$1({
58243
+ var port = object$2({
58061
58244
  description: text.optional(),
58062
58245
  jsonSchema: json$3,
58063
58246
  nullable: boolean(),
@@ -58065,25 +58248,25 @@ var port = object$1({
58065
58248
  });
58066
58249
  var workflowInputDefs = array(port.strict());
58067
58250
  var input = port.extend({ value: json$3.optional() });
58068
- var group$1 = object$1({
58251
+ var group$1 = object$2({
58069
58252
  collapsed: boolean().optional(),
58070
58253
  group: text
58071
58254
  });
58072
- var source = union$1([object$1({
58255
+ var source = union$1([object$2({
58073
58256
  kind: literal("node"),
58074
58257
  nodeId: text,
58075
58258
  output: text,
58076
58259
  system: literal(true).optional(),
58077
58260
  field: text.optional()
58078
- }), object$1({
58261
+ }), object$2({
58079
58262
  kind: literal("binding"),
58080
58263
  bindingId: text
58081
58264
  })]);
58082
- var fixedInput = union$1([object$1({ kind: literal("unset") }), object$1({
58265
+ var fixedInput = union$1([object$2({ kind: literal("unset") }), object$2({
58083
58266
  kind: literal("value"),
58084
58267
  value: json$3
58085
58268
  })]);
58086
- var mapping = union$1([fixedInput, object$1({
58269
+ var mapping = union$1([fixedInput, object$2({
58087
58270
  kind: literal("sources"),
58088
58271
  sources: array(source)
58089
58272
  })]);
@@ -58133,20 +58316,20 @@ var workflowCapabilitySchema = strictObject({
58133
58316
  outputs: array(port).nullable()
58134
58317
  });
58135
58318
  var capability = union$1([connectorCapabilitySchema, workflowCapabilitySchema]);
58136
- var inline = object$1({
58319
+ var inline = object$2({
58137
58320
  ...ports,
58138
58321
  name: text,
58139
58322
  moduleId: text,
58140
58323
  capabilities: array(capability).optional()
58141
58324
  });
58142
- var agentValue = union$1([object$1({
58325
+ var agentValue = union$1([object$2({
58143
58326
  kind: literal("value"),
58144
58327
  value: json$3
58145
- }), object$1({
58328
+ }), object$2({
58146
58329
  kind: literal("input"),
58147
58330
  input: text
58148
58331
  })]);
58149
- var agentInput = union$1([agentValue, object$1({ kind: literal("model") })]);
58332
+ var agentInput = union$1([agentValue, object$2({ kind: literal("model") })]);
58150
58333
  var agentToolFields = {
58151
58334
  id: text,
58152
58335
  name: text,
@@ -58154,7 +58337,7 @@ var agentToolFields = {
58154
58337
  approval: boolean(),
58155
58338
  inputs: array(input.extend({ source: agentInput }))
58156
58339
  };
58157
- var connectorAgentToolSchema = object$1({
58340
+ var connectorAgentToolSchema = object$2({
58158
58341
  ...agentToolFields,
58159
58342
  kind: literal("connector").optional(),
58160
58343
  action: text,
@@ -58187,24 +58370,24 @@ var decisionQuestion = discriminatedUnion("type", [
58187
58370
  criteria: strings
58188
58371
  })
58189
58372
  ]);
58190
- var managedFields = object$1({
58373
+ var managedFields = object$2({
58191
58374
  ...ports,
58192
58375
  name: text,
58193
58376
  executor: union$1([
58194
- object$1({
58377
+ object$2({
58195
58378
  kind: literal("connector"),
58196
58379
  action: text,
58197
58380
  connectionId: actionConnection.optional(),
58198
58381
  outputMode: literal("value").optional()
58199
58382
  }),
58200
- object$1({
58383
+ object$2({
58201
58384
  kind: literal("openapi"),
58202
58385
  sourceUrl: text,
58203
58386
  method: text,
58204
58387
  path: text,
58205
58388
  serverUrl: text,
58206
58389
  document: json$3,
58207
- auth: array(object$1({
58390
+ auth: array(object$2({
58208
58391
  id: text,
58209
58392
  type: _enum([
58210
58393
  "bearer",
@@ -58219,18 +58402,18 @@ var managedFields = object$1({
58219
58402
  kind: literal("decision"),
58220
58403
  questions: array(decisionQuestion)
58221
58404
  }),
58222
- object$1({
58405
+ object$2({
58223
58406
  kind: literal("llm"),
58224
58407
  mode: _enum(["chat", "json"])
58225
58408
  }),
58226
- object$1({
58409
+ object$2({
58227
58410
  kind: literal("agent"),
58228
58411
  code: boolean().optional(),
58229
58412
  model: text,
58230
58413
  prompt: text,
58231
58414
  maxRounds: number(),
58232
58415
  tools: array(union$1([workflowAgentToolSchema, connectorAgentToolSchema])),
58233
- notification: object$1({
58416
+ notification: object$2({
58234
58417
  action: text,
58235
58418
  connectionId: actionConnection.optional(),
58236
58419
  inputDefinitions: array(input),
@@ -58242,24 +58425,25 @@ var managedFields = object$1({
58242
58425
  kind: literal("workflow"),
58243
58426
  flowId: text,
58244
58427
  revisionId: text
58245
- })
58428
+ }),
58429
+ httpRequestExecutorSchema
58246
58430
  ])
58247
58431
  });
58248
58432
  var managed = managedFields.transform(limitDecisionTask);
58249
- var operand$1 = union$1([object$1({
58433
+ var operand$1 = union$1([object$2({
58250
58434
  kind: literal("value"),
58251
58435
  value: json$3.optional(),
58252
58436
  jsonSchema: json$3.optional()
58253
- }), object$1({
58437
+ }), object$2({
58254
58438
  kind: literal("source"),
58255
58439
  source
58256
58440
  })]);
58257
58441
  var condition = {
58258
58442
  matchMode: _enum(["first", "all"]),
58259
- cases: array(object$1({
58443
+ cases: array(object$2({
58260
58444
  description: text.optional(),
58261
58445
  output: text,
58262
- groups: array(object$1({ expressions: array(object$1({
58446
+ groups: array(object$2({ expressions: array(object$2({
58263
58447
  left: operand$1,
58264
58448
  operator: _enum([
58265
58449
  "!=",
@@ -58291,7 +58475,7 @@ var wait = {
58291
58475
  inputDefinitions: array(input),
58292
58476
  prompt: text
58293
58477
  };
58294
- var webhookOptions = object$1({
58478
+ var webhookOptions = object$2({
58295
58479
  allowedMethods: never().optional(),
58296
58480
  allowedOrigins: strings.optional(),
58297
58481
  noResponseBody: never().optional(),
@@ -58329,8 +58513,8 @@ var definition = {
58329
58513
  outputs: array(port).refine((definitions) => new Set(definitions.map((output) => output.handle)).size === definitions.length, "Duplicate Trigger output handle."),
58330
58514
  provider: text
58331
58515
  };
58332
- var endpoint = object$1({
58333
- body: object$1({
58516
+ var endpoint = object$2({
58517
+ body: object$2({
58334
58518
  allowArray: boolean(),
58335
58519
  allowEmpty: boolean(),
58336
58520
  formats: array(_enum([
@@ -58379,19 +58563,19 @@ var node = union$1([
58379
58563
  outputDefs: array(port.strict()),
58380
58564
  outputMappings: inputs
58381
58565
  }).omit({ inputs: true }),
58382
- object$1({
58566
+ object$2({
58383
58567
  ...base,
58384
58568
  inputs: record$3(text, never()),
58385
58569
  kind: literal("condition"),
58386
58570
  ...condition
58387
58571
  }),
58388
- object$1({
58572
+ object$2({
58389
58573
  ...base,
58390
58574
  inputs: unknown().transform(() => ({})).default({}),
58391
58575
  kind: literal("value"),
58392
58576
  values: array(input)
58393
58577
  }),
58394
- object$1({
58578
+ object$2({
58395
58579
  ...base,
58396
58580
  kind: literal("task"),
58397
58581
  task: union$1([inline, managed]),
@@ -58408,7 +58592,7 @@ var node = union$1([
58408
58592
  ...wait,
58409
58593
  autoContinue: waitAutoContinueDraftSchema.optional()
58410
58594
  }).omit({ timeoutMs: true }),
58411
- object$1({
58595
+ object$2({
58412
58596
  ...trigger,
58413
58597
  kind: literal("manual")
58414
58598
  }),
@@ -58422,33 +58606,33 @@ var node = union$1([
58422
58606
  kind: literal("error"),
58423
58607
  sourceFlowIds: sourceFlowIds.optional()
58424
58608
  }),
58425
- object$1({
58609
+ object$2({
58426
58610
  ...trigger,
58427
58611
  kind: literal("webhook"),
58428
58612
  ...webhook
58429
58613
  }),
58430
- object$1({
58614
+ object$2({
58431
58615
  ...trigger,
58432
58616
  kind: literal("cron"),
58433
58617
  cronTimes: triggerScheduleSchema
58434
58618
  }),
58435
- object$1({
58619
+ object$2({
58436
58620
  ...trigger,
58437
58621
  kind: literal("poll"),
58438
58622
  connectionId: text.min(1).optional(),
58439
58623
  config: record$3(text, fixedInput),
58440
- definition: object$1({
58624
+ definition: object$2({
58441
58625
  ...definition,
58442
58626
  type: literal("poll")
58443
58627
  }),
58444
58628
  pollTimes: triggerScheduleSchema
58445
58629
  }),
58446
- object$1({
58630
+ object$2({
58447
58631
  ...trigger,
58448
58632
  kind: literal("integration"),
58449
58633
  connectionId: text.min(1).optional(),
58450
58634
  config: record$3(text, fixedInput),
58451
- definition: object$1({
58635
+ definition: object$2({
58452
58636
  ...definition,
58453
58637
  type: literal("integration"),
58454
58638
  endpoint
@@ -58475,7 +58659,7 @@ var authoringDefinitionSchemas = {
58475
58659
  notification: true
58476
58660
  }).strict()
58477
58661
  };
58478
- var edge = object$1({
58662
+ var edge = object$2({
58479
58663
  source: text,
58480
58664
  target: text,
58481
58665
  sourceHandle: text.optional()
@@ -58484,24 +58668,24 @@ var at = {
58484
58668
  nodeId: text,
58485
58669
  target: never().optional()
58486
58670
  };
58487
- var graph = object$1({
58671
+ var graph = object$2({
58488
58672
  nodes: record$3(text, node),
58489
58673
  edges: array(edge).default([])
58490
58674
  });
58491
- var binding$1 = object$1({
58675
+ var binding$1 = object$2({
58492
58676
  kind: literal("variable"),
58493
58677
  target: text
58494
58678
  });
58495
- var module$1 = object$1({
58679
+ var module$1 = object$2({
58496
58680
  name: text,
58497
58681
  imports: strings,
58498
58682
  source: text
58499
58683
  });
58500
- var document$1 = preprocess(normalizeDocument, object$1({
58684
+ var document$1 = preprocess(normalizeDocument, object$2({
58501
58685
  bindings: record$3(text, binding$1),
58502
58686
  graph
58503
58687
  }));
58504
- var revision = object$1({
58688
+ var revision = object$2({
58505
58689
  modelVersion: union$1([
58506
58690
  literal(2),
58507
58691
  literal(4),
@@ -58542,7 +58726,7 @@ function decodeRevisionContent(value) {
58542
58726
  checkJsonDepth(value);
58543
58727
  const content = revision.parse(value);
58544
58728
  checkModelVersion(content);
58545
- assertOpenApiAuthBindings(content.document);
58729
+ assertHttpAuthBindings(content.document);
58546
58730
  return content;
58547
58731
  }
58548
58732
  var shapes = {
@@ -58580,21 +58764,21 @@ var shapes = {
58580
58764
  },
58581
58765
  "graph.node.delete": at,
58582
58766
  "graph.node.field.set": union$1([
58583
- object$1({
58767
+ object$2({
58584
58768
  ...at,
58585
58769
  kind: literal("graph.node.field.set"),
58586
58770
  field: literal("retry"),
58587
58771
  before: retryConfigurationSchema.optional(),
58588
58772
  value: retryConfigurationSchema.optional()
58589
58773
  }),
58590
- object$1({
58774
+ object$2({
58591
58775
  ...at,
58592
58776
  kind: literal("graph.node.field.set"),
58593
58777
  field: literal("connectionId"),
58594
58778
  before: text.min(1).optional(),
58595
58779
  value: text.min(1).optional()
58596
58780
  }),
58597
- object$1({
58781
+ object$2({
58598
58782
  ...at,
58599
58783
  kind: literal("graph.node.field.set"),
58600
58784
  field: _enum([
@@ -58606,14 +58790,14 @@ var shapes = {
58606
58790
  before: text.optional(),
58607
58791
  value: text.optional()
58608
58792
  }),
58609
- object$1({
58793
+ object$2({
58610
58794
  ...at,
58611
58795
  kind: literal("graph.node.field.set"),
58612
58796
  field: literal("maxExecutions"),
58613
58797
  before: number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),
58614
58798
  value: number().int().positive().max(Number.MAX_SAFE_INTEGER).optional()
58615
58799
  }),
58616
- object$1({
58800
+ object$2({
58617
58801
  ...at,
58618
58802
  kind: literal("graph.node.field.set"),
58619
58803
  field: literal("timeoutMs"),
@@ -58634,8 +58818,8 @@ var shapes = {
58634
58818
  },
58635
58819
  "graph.node.condition.set": {
58636
58820
  ...at,
58637
- before: object$1(condition),
58638
- value: object$1(condition)
58821
+ before: object$2(condition),
58822
+ value: object$2(condition)
58639
58823
  },
58640
58824
  "graph.node.values.set": {
58641
58825
  ...at,
@@ -58655,13 +58839,13 @@ var shapes = {
58655
58839
  },
58656
58840
  "graph.node.webhook.set": {
58657
58841
  ...at,
58658
- before: object$1(webhook),
58659
- value: object$1(webhook)
58842
+ before: object$2(webhook),
58843
+ value: object$2(webhook)
58660
58844
  },
58661
58845
  "graph.node.task.ports.set": {
58662
58846
  ...at,
58663
- before: object$1(ports),
58664
- value: object$1(ports)
58847
+ before: object$2(ports),
58848
+ value: object$2(ports)
58665
58849
  },
58666
58850
  "graph.node.task.name.set": {
58667
58851
  ...at,
@@ -58707,11 +58891,12 @@ var shapes = {
58707
58891
  value: union$1([inline, managed])
58708
58892
  }
58709
58893
  };
58710
- array(union$1([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, shape instanceof ZodType ? shape : object$1({
58894
+ array(union$1([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, shape instanceof ZodType ? shape : object$2({
58711
58895
  kind: literal(kind),
58712
58896
  ...shape
58713
58897
  })])).values()])).min(1);
58714
58898
  function checkModelVersion(content) {
58899
+ 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.");
58715
58900
  if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
58716
58901
  if (content.modelVersion < 10 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "webhook" && (candidateNode.options?.responseBody != null || candidateNode.options?.responseStatusCodeOutput != null || candidateNode.options?.responseHeadersSource != null || candidateNode.options?.responseHeaderOutputs != null))) throw new TypeError("Dynamic Webhook responses require Flow model version 10.");
58717
58902
  if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => "retry" in candidateNode && candidateNode.retry != null)) throw new TypeError("Node retries require Flow model version 9.");
@@ -59223,7 +59408,7 @@ function webhookResponseDiagnostics(graph, triggerId, path = `/document/graph/no
59223
59408
  if (headersSource == null) for (const [headers, location] of [[options.responseHeaders, `${path}/options/responseHeaders`], [headerOutputs, headersPath]]) {
59224
59409
  const names = [];
59225
59410
  for (const name of Object.keys(headers ?? {})) {
59226
- if (webhookHeaderNameIssue(name, names) != null) diagnostics.push(graphDiagnostic("trigger.webhook-response-header-name", "Use valid, unique HTTP header names.", location));
59411
+ if (httpHeaderNameIssue(name, names) != null) diagnostics.push(graphDiagnostic("trigger.webhook-response-header-name", "Use valid, unique HTTP header names.", location));
59227
59412
  names.push(name);
59228
59413
  }
59229
59414
  }
@@ -59494,9 +59679,9 @@ function checkInputSources(graph, target, handle, sources) {
59494
59679
  };
59495
59680
  }
59496
59681
  /** Enumerate structurally available outputs while retaining their compatibility with one input. */
59497
- function inputSourceCandidates(graph, target, handle) {
59682
+ function inputSourceCandidates(graph, target, handle, inputPort) {
59498
59683
  const targetNode = graph.nodes[target];
59499
- const input = targetNode == null ? void 0 : nodeInputPorts(targetNode)[handle];
59684
+ const input = inputPort ?? (targetNode == null ? void 0 : nodeInputPorts(targetNode)[handle]);
59500
59685
  if (input == null) return {};
59501
59686
  const analysis = graphPaths(graph);
59502
59687
  return Object.fromEntries([...analysis.ancestors.get(target) ?? []].flatMap((nodeId) => {
@@ -59550,7 +59735,7 @@ var methods = [
59550
59735
  "patch",
59551
59736
  "trace"
59552
59737
  ];
59553
- function object(value) {
59738
+ function object$1(value) {
59554
59739
  if (value == null || typeof value != "object" || Array.isArray(value)) throw new Error("Expected an OpenAPI object.");
59555
59740
  return value;
59556
59741
  }
@@ -59560,30 +59745,30 @@ function httpUrl(value, base) {
59560
59745
  return url.href;
59561
59746
  }
59562
59747
  function parseOpenApi(value) {
59563
- const doc = object(value);
59748
+ const doc = object$1(value);
59564
59749
  if (typeof doc.openapi != "string" || !/^3\.[01]\.\d+$/.test(doc.openapi)) throw new Error("Only OpenAPI 3.0 and 3.1 JSON documents are supported.");
59565
- object(doc.paths);
59750
+ object$1(doc.paths);
59566
59751
  return doc;
59567
59752
  }
59568
59753
  function pointer(doc, ref) {
59569
59754
  if (!ref.startsWith("#/")) throw new Error("External OpenAPI references are not supported.");
59570
59755
  let value = doc;
59571
59756
  for (const key of decodeURIComponent(ref.slice(2)).split("/").map((part) => part.replace(/~1/g, "/").replace(/~0/g, "~"))) {
59572
- const source = object(value);
59757
+ const source = object$1(value);
59573
59758
  if (!Object.hasOwn(source, key)) throw new Error("An OpenAPI reference is missing.");
59574
59759
  value = source[key];
59575
59760
  }
59576
59761
  return value;
59577
59762
  }
59578
59763
  function resolved(doc, value) {
59579
- let result = object(value);
59764
+ let result = object$1(value);
59580
59765
  const seen = /* @__PURE__ */ new Set();
59581
59766
  while (typeof result.$ref == "string") {
59582
59767
  if (seen.has(result.$ref)) throw new Error("Circular non-schema reference is unsupported.");
59583
59768
  seen.add(result.$ref);
59584
59769
  const { $ref, ...siblings } = result;
59585
59770
  result = {
59586
- ...object(pointer(doc, $ref)),
59771
+ ...object$1(pointer(doc, $ref)),
59587
59772
  ...siblings
59588
59773
  };
59589
59774
  }
@@ -59591,10 +59776,10 @@ function resolved(doc, value) {
59591
59776
  }
59592
59777
  function listOperations(documentValue) {
59593
59778
  const doc = parseOpenApi(documentValue);
59594
- return Object.entries(object(doc.paths)).flatMap(([path, value]) => {
59779
+ return Object.entries(object$1(doc.paths)).flatMap(([path, value]) => {
59595
59780
  const item = resolved(doc, value);
59596
59781
  return methods.filter((method) => item[method] != null).map((method) => {
59597
- const op = object(item[method]);
59782
+ const op = object$1(item[method]);
59598
59783
  return {
59599
59784
  method,
59600
59785
  path,
@@ -59605,11 +59790,11 @@ function listOperations(documentValue) {
59605
59790
  });
59606
59791
  }
59607
59792
  function operation(doc, path, method) {
59608
- const item = resolved(doc, object(doc.paths)[path]);
59793
+ const item = resolved(doc, object$1(doc.paths)[path]);
59609
59794
  if (!methods.includes(method) || item[method] == null) throw new Error("The selected operation is no longer available.");
59610
59795
  return {
59611
59796
  item,
59612
- op: object(item[method])
59797
+ op: object$1(item[method])
59613
59798
  };
59614
59799
  }
59615
59800
  function servers(value, path, method) {
@@ -59617,11 +59802,11 @@ function servers(value, path, method) {
59617
59802
  const { item, op } = operation(doc, path, method);
59618
59803
  const entries = op.servers ?? item.servers ?? doc.servers;
59619
59804
  if (!Array.isArray(entries) || entries.length == 0) return [{ url: "/" }];
59620
- return entries.map(object);
59805
+ return entries.map(object$1);
59621
59806
  }
59622
59807
  function serverAddress(server, sourceUrl, variables = {}) {
59623
59808
  return httpUrl(String(server.url).replace(/\{([^}]+)\}/g, (_, name) => {
59624
- const definition = object(object(server.variables)[name]);
59809
+ const definition = object$1(object$1(server.variables)[name]);
59625
59810
  const value = variables[name] ?? definition.default;
59626
59811
  if (typeof value != "string" || Array.isArray(definition.enum) && !definition.enum.includes(value)) throw new Error("A server variable is invalid.");
59627
59812
  return value;
@@ -59637,14 +59822,14 @@ function securityOptions(value, path, method) {
59637
59822
  auth: []
59638
59823
  }];
59639
59824
  return requirements.map((entry) => {
59640
- const names = Object.keys(object(entry));
59825
+ const names = Object.keys(object$1(entry));
59641
59826
  const label = names.join(" + ") || "None";
59642
59827
  try {
59643
59828
  if (!names.length) return {
59644
59829
  label,
59645
59830
  auth: []
59646
59831
  };
59647
- const schemes = object(object(doc.components).securitySchemes);
59832
+ const schemes = object$1(object$1(doc.components).securitySchemes);
59648
59833
  return {
59649
59834
  label,
59650
59835
  auth: names.map((id) => {
@@ -59697,7 +59882,7 @@ function snapshot$7(documentValue, path, method) {
59697
59882
  let target = result;
59698
59883
  for (const key of keys.slice(0, -1)) {
59699
59884
  if (!Object.hasOwn(target, key)) target[key] = {};
59700
- target = object(target[key]);
59885
+ target = object$1(target[key]);
59701
59886
  }
59702
59887
  target[keys.at(-1)] = structuredClone(value);
59703
59888
  visit(value);
@@ -59708,7 +59893,7 @@ function snapshot$7(documentValue, path, method) {
59708
59893
  value.forEach(visit);
59709
59894
  return;
59710
59895
  }
59711
- if (typeof object(value).$ref == "string") copy(object(value).$ref);
59896
+ if (typeof object$1(value).$ref == "string") copy(object$1(value).$ref);
59712
59897
  for (const [key, child] of Object.entries(value)) if (![
59713
59898
  "example",
59714
59899
  "examples",
@@ -59716,7 +59901,7 @@ function snapshot$7(documentValue, path, method) {
59716
59901
  ].includes(key)) visit(child);
59717
59902
  }
59718
59903
  visit(result);
59719
- for (const entry of security) for (const name of Object.keys(object(entry))) copy(`#/components/securitySchemes/${name.replace(/~/g, "~0").replace(/\//g, "~1")}`);
59904
+ for (const entry of security) for (const name of Object.keys(object$1(entry))) copy(`#/components/securitySchemes/${name.replace(/~/g, "~0").replace(/\//g, "~1")}`);
59720
59905
  return structuredClone(result);
59721
59906
  }
59722
59907
  function schema$2(doc, schemaValue) {
@@ -59724,7 +59909,7 @@ function schema$2(doc, schemaValue) {
59724
59909
  const ids = /* @__PURE__ */ new Map();
59725
59910
  function convert(value) {
59726
59911
  if (typeof value == "boolean") return value;
59727
- const source = object(value);
59912
+ const source = object$1(value);
59728
59913
  if (source.format == "binary" || source.$dynamicRef != null || source.$id != null) throw new Error("Binary and dynamically scoped schemas are unsupported.");
59729
59914
  const result = {};
59730
59915
  for (const [key, child] of Object.entries(source)) {
@@ -59750,7 +59935,7 @@ function schema$2(doc, schemaValue) {
59750
59935
  "$defs",
59751
59936
  "definitions",
59752
59937
  "dependentSchemas"
59753
- ].includes(key)) result[key] = Object.fromEntries(Object.entries(object(child)).map(([name, childSchema]) => [name, convert(childSchema)]));
59938
+ ].includes(key)) result[key] = Object.fromEntries(Object.entries(object$1(child)).map(([name, childSchema]) => [name, convert(childSchema)]));
59754
59939
  else if ([
59755
59940
  "allOf",
59756
59941
  "anyOf",
@@ -59785,18 +59970,18 @@ function schema$2(doc, schemaValue) {
59785
59970
  return result;
59786
59971
  }
59787
59972
  let converted = convert(schemaValue);
59788
- if (typeof converted == "object" && converted != null && typeof object(converted).$ref == "string") {
59789
- const id = String(object(converted).$ref).slice(8);
59790
- const { $ref: _ref, ...siblings } = object(converted);
59973
+ if (typeof converted == "object" && converted != null && typeof object$1(converted).$ref == "string") {
59974
+ const id = String(object$1(converted).$ref).slice(8);
59975
+ const { $ref: _ref, ...siblings } = object$1(converted);
59791
59976
  converted = {
59792
- ...object(defs[id]),
59977
+ ...object$1(defs[id]),
59793
59978
  ...siblings
59794
59979
  };
59795
59980
  }
59796
59981
  if (typeof converted == "boolean") return converted;
59797
59982
  return {
59798
59983
  $schema: "https://json-schema.org/draft/2020-12/schema",
59799
- ...object(converted),
59984
+ ...object$1(converted),
59800
59985
  ...Object.keys(defs).length ? { $defs: defs } : {}
59801
59986
  };
59802
59987
  }
@@ -59819,12 +60004,12 @@ function parameters(config) {
59819
60004
  }
59820
60005
  function jsonContent(doc, value) {
59821
60006
  const content = resolved(doc, value);
59822
- const media = object(content.content);
60007
+ const media = object$1(content.content);
59823
60008
  const mediaType = media["application/json"] != null ? "application/json" : Object.keys(media).find((key) => /^application\/.+\+json$/.test(key));
59824
60009
  const json = mediaType == null ? void 0 : media[mediaType];
59825
60010
  if (json == null) throw new Error("Only JSON request and response bodies are supported.");
59826
60011
  return {
59827
- schema: schema$2(doc, object(json).schema ?? {}),
60012
+ schema: schema$2(doc, object$1(json).schema ?? {}),
59828
60013
  required: content.required === true,
59829
60014
  mediaType
59830
60015
  };
@@ -59844,7 +60029,7 @@ function openApiTask(config, name = "OpenAPI") {
59844
60029
  const params = parameters(config);
59845
60030
  const inputs = params.map((p) => {
59846
60031
  const jsonSchema = schema$2(doc, p.schema ?? {});
59847
- const defaultValue = typeof jsonSchema == "boolean" ? void 0 : object(jsonSchema).default;
60032
+ const defaultValue = typeof jsonSchema == "boolean" ? void 0 : object$1(jsonSchema).default;
59848
60033
  return {
59849
60034
  handle: `${p.in}.${p.name}`,
59850
60035
  jsonSchema,
@@ -59874,14 +60059,14 @@ function openApiTask(config, name = "OpenAPI") {
59874
60059
  jsonSchema: { type: "string" },
59875
60060
  nullable: false
59876
60061
  })));
59877
- const responses = object(op.responses);
60062
+ const responses = object$1(op.responses);
59878
60063
  const schemas = [];
59879
60064
  for (const [status, response] of Object.entries(responses)) if (/^2\d\d$|^2XX$/.test(status) || status == "default") {
59880
60065
  const r = resolved(doc, response);
59881
60066
  if (r.content == null) schemas.push({ type: "null" });
59882
60067
  else {
59883
60068
  jsonContent(doc, r);
59884
- for (const [mediaType, media] of Object.entries(object(r.content))) if (/^application\/(json|.+\+json)$/.test(mediaType)) schemas.push(schema$2(doc, object(media).schema ?? {}));
60069
+ for (const [mediaType, media] of Object.entries(object$1(r.content))) if (/^application\/(json|.+\+json)$/.test(mediaType)) schemas.push(schema$2(doc, object$1(media).schema ?? {}));
59885
60070
  }
59886
60071
  }
59887
60072
  if (!schemas.length) throw new Error("A successful JSON response definition is required.");
@@ -59975,7 +60160,7 @@ function selectOperation(value, sourceUrl, path, method) {
59975
60160
  }
59976
60161
  //#endregion
59977
60162
  //#region src/workflow/common/workflow.ts
59978
- var portSchema = object$1({
60163
+ var portSchema = object$2({
59979
60164
  handle: string$1().min(1),
59980
60165
  jsonSchema: json$4(),
59981
60166
  nullable: boolean(),
@@ -59995,7 +60180,7 @@ function comparablePorts(value) {
59995
60180
  function sameWorkflowInterface(left, right) {
59996
60181
  return dequal$1(comparablePorts(left.inputs), comparablePorts(right.inputs)) && dequal$1(comparablePorts(left.outputs), comparablePorts(right.outputs));
59997
60182
  }
59998
- object$1({
60183
+ object$2({
59999
60184
  version: literal(1),
60000
60185
  flowId: string$1().min(1),
60001
60186
  name: string$1(),
@@ -60034,17 +60219,17 @@ function workflowTask(contract, name = contract.name) {
60034
60219
  outputs: contract.outputs ?? []
60035
60220
  };
60036
60221
  }
60037
- object$1({
60222
+ object$2({
60038
60223
  version: literal(1),
60039
60224
  direction: _enum(["incoming", "outgoing"]),
60040
60225
  total: int().nonnegative(),
60041
60226
  nextOffset: int().nonnegative().optional(),
60042
- references: array(object$1({
60227
+ references: array(object$2({
60043
60228
  flowId: string$1(),
60044
60229
  name: string$1().nullable(),
60045
60230
  available: boolean(),
60046
60231
  draft: boolean(),
60047
- live: object$1({
60232
+ live: object$2({
60048
60233
  publicationId: string$1(),
60049
60234
  enabled: boolean()
60050
60235
  }).nullable()
@@ -69908,6 +70093,7 @@ function nodeIcon(node) {
69908
70093
  if ("moduleId" in task) return ":carbon:code:";
69909
70094
  if (task.executor.kind == "decision") return ":carbon:ml-model-reference:";
69910
70095
  if (task.executor.kind == "workflow") return ":lucide-light:workflow:";
70096
+ if (task.executor.kind == "http-request") return ":lucide-light:globe:";
69911
70097
  if (task.executor.kind == "openapi") return ":logos:openapi-icon:";
69912
70098
  return task.executor.kind == "connector" ? ":carbon:connection-signal:" : ":carbon:machine-learning-model:";
69913
70099
  }
@@ -70168,6 +70354,7 @@ function executorName(task, providerName, t) {
70168
70354
  if (task.executor.kind == "agent") return t?.("addNode.agent") ?? "AI Agent";
70169
70355
  if (task.executor.kind == "decision") return t?.("addNode.decision") ?? "AI Decision";
70170
70356
  if (task.executor.kind == "workflow") return t?.("addNode.workflow") ?? "Call Workflow";
70357
+ if (task.executor.kind == "http-request") return `${t?.("httpRequest.title") ?? "HTTP Request"} · ${task.executor.method}`;
70171
70358
  if (task.executor.kind == "openapi") return "OpenAPI";
70172
70359
  if (task.executor.kind == "llm") return t?.("designer.executorLlm") ?? "LLM";
70173
70360
  return `${t?.("designer.executorConnector") ?? "Connector"} · ${providerName ?? task.executor.action.split(".")[0]}`;
@@ -72178,44 +72365,44 @@ var Input = m$4.forwardRef(function Input({ className, type, controlSize = "defa
72178
72365
  });
72179
72366
  });
72180
72367
  var valueEditor_module_default = {
72181
- root: "valueEditor_root_64cb9",
72182
- errorAnchor: "valueEditor_errorAnchor_64cb9",
72183
- body: "valueEditor_body_64cb9",
72184
- valueTools: "valueEditor_valueTools_64cb9",
72185
- options: "valueEditor_options_64cb9",
72186
- toolbar: "valueEditor_toolbar_64cb9",
72187
- presence: "valueEditor_presence_64cb9",
72188
- actions: "valueEditor_actions_64cb9",
72189
- collection: "valueEditor_collection_64cb9",
72190
- fieldName: "valueEditor_fieldName_64cb9",
72191
- fieldType: "valueEditor_fieldType_64cb9",
72192
- json: "valueEditor_json_64cb9",
72193
- description: "valueEditor_description_64cb9",
72194
- error: "valueEditor_error_64cb9",
72195
- summary: "valueEditor_summary_64cb9",
72196
- summaryError: "valueEditor_summaryError_64cb9",
72197
- srOnly: "valueEditor_srOnly_64cb9",
72198
- option: "valueEditor_option_64cb9",
72199
- header: "valueEditor_header_64cb9",
72200
- leadingControl: "valueEditor_leadingControl_64cb9",
72201
- toggleControl: "valueEditor_toggleControl_64cb9",
72202
- valueAddon: "valueEditor_valueAddon_64cb9",
72203
- summaryText: "valueEditor_summaryText_64cb9",
72204
- clearValue: "valueEditor_clearValue_64cb9",
72205
- resetValue: "valueEditor_resetValue_64cb9",
72206
- unsetValue: "valueEditor_unsetValue_64cb9",
72207
- arrayIndex: "valueEditor_arrayIndex_64cb9",
72208
- nullValue: "valueEditor_nullValue_64cb9",
72209
- nullChip: "valueEditor_nullChip_64cb9",
72210
- collectionActions: "valueEditor_collectionActions_64cb9",
72211
- emptyObjectContent: "valueEditor_emptyObjectContent_64cb9",
72212
- emptyObjectConstraint: "valueEditor_emptyObjectConstraint_64cb9",
72213
- jsonCode: "valueEditor_jsonCode_64cb9",
72214
- emptyString: "valueEditor_emptyString_64cb9",
72215
- booleanControl: "valueEditor_booleanControl_64cb9",
72216
- booleanIndicator: "valueEditor_booleanIndicator_64cb9",
72217
- objectNotice: "valueEditor_objectNotice_64cb9",
72218
- valuePrefix: "valueEditor_valuePrefix_64cb9"
72368
+ root: "valueEditor_root_4a4f1",
72369
+ errorAnchor: "valueEditor_errorAnchor_4a4f1",
72370
+ body: "valueEditor_body_4a4f1",
72371
+ valueTools: "valueEditor_valueTools_4a4f1",
72372
+ options: "valueEditor_options_4a4f1",
72373
+ toolbar: "valueEditor_toolbar_4a4f1",
72374
+ presence: "valueEditor_presence_4a4f1",
72375
+ actions: "valueEditor_actions_4a4f1",
72376
+ collection: "valueEditor_collection_4a4f1",
72377
+ fieldName: "valueEditor_fieldName_4a4f1",
72378
+ fieldType: "valueEditor_fieldType_4a4f1",
72379
+ json: "valueEditor_json_4a4f1",
72380
+ description: "valueEditor_description_4a4f1",
72381
+ error: "valueEditor_error_4a4f1",
72382
+ summary: "valueEditor_summary_4a4f1",
72383
+ summaryError: "valueEditor_summaryError_4a4f1",
72384
+ srOnly: "valueEditor_srOnly_4a4f1",
72385
+ option: "valueEditor_option_4a4f1",
72386
+ header: "valueEditor_header_4a4f1",
72387
+ leadingControl: "valueEditor_leadingControl_4a4f1",
72388
+ toggleControl: "valueEditor_toggleControl_4a4f1",
72389
+ valueAddon: "valueEditor_valueAddon_4a4f1",
72390
+ summaryText: "valueEditor_summaryText_4a4f1",
72391
+ clearValue: "valueEditor_clearValue_4a4f1",
72392
+ resetValue: "valueEditor_resetValue_4a4f1",
72393
+ unsetValue: "valueEditor_unsetValue_4a4f1",
72394
+ arrayIndex: "valueEditor_arrayIndex_4a4f1",
72395
+ nullValue: "valueEditor_nullValue_4a4f1",
72396
+ nullChip: "valueEditor_nullChip_4a4f1",
72397
+ collectionActions: "valueEditor_collectionActions_4a4f1",
72398
+ emptyObjectContent: "valueEditor_emptyObjectContent_4a4f1",
72399
+ emptyObjectConstraint: "valueEditor_emptyObjectConstraint_4a4f1",
72400
+ jsonCode: "valueEditor_jsonCode_4a4f1",
72401
+ emptyString: "valueEditor_emptyString_4a4f1",
72402
+ booleanControl: "valueEditor_booleanControl_4a4f1",
72403
+ booleanIndicator: "valueEditor_booleanIndicator_4a4f1",
72404
+ objectNotice: "valueEditor_objectNotice_4a4f1",
72405
+ valuePrefix: "valueEditor_valuePrefix_4a4f1"
72219
72406
  };
72220
72407
  //#endregion
72221
72408
  //#region src/form/browser/fieldControl.tsx
@@ -72225,6 +72412,7 @@ function ValueEditorFeedback({ children, error }) {
72225
72412
  const errorId = error == null ? void 0 : `${id}-error`;
72226
72413
  return /* @__PURE__ */ jsxs("div", {
72227
72414
  className: valueEditor_module_default.errorAnchor,
72415
+ "data-feedback": error != null || void 0,
72228
72416
  children: [children(errorId), error != null && /* @__PURE__ */ jsx("div", {
72229
72417
  id: errorId,
72230
72418
  className: valueEditor_module_default.error,
@@ -72650,6 +72838,7 @@ var type$3 = _enum([
72650
72838
  "llm",
72651
72839
  "decision",
72652
72840
  "openapi",
72841
+ "http-request",
72653
72842
  "condition",
72654
72843
  "value",
72655
72844
  "wait",
@@ -72775,6 +72964,7 @@ var authoringConfigurations = {
72775
72964
  }),
72776
72965
  "connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
72777
72966
  "openapi": authoringOpenApiSchema,
72967
+ "http-request": httpRequestConfigSchema,
72778
72968
  "agent": authoringDefinitionSchemas.agent.omit({
72779
72969
  prompt: true,
72780
72970
  tools: true
@@ -72898,7 +73088,7 @@ strictObject({
72898
73088
  type: type$3.optional(),
72899
73089
  action: id$1.optional()
72900
73090
  }).refine((v) => v.type == null || v.action == null, "Choose type or action.");
72901
- var authoringDiagnosticSchema = object$1({
73091
+ var authoringDiagnosticSchema = object$2({
72902
73092
  code: id$1,
72903
73093
  message: string$1(),
72904
73094
  nodes: array(id$1),
@@ -72906,24 +73096,24 @@ var authoringDiagnosticSchema = object$1({
72906
73096
  line: number().optional(),
72907
73097
  column: number().optional()
72908
73098
  });
72909
- object$1({
73099
+ object$2({
72910
73100
  flowId: id$1,
72911
73101
  revisionId: id$1,
72912
73102
  valid: boolean(),
72913
73103
  diagnostics: array(authoringDiagnosticSchema),
72914
73104
  version: literal(1)
72915
73105
  });
72916
- object$1({
73106
+ object$2({
72917
73107
  flowId: id$1,
72918
73108
  saved: literal(true),
72919
73109
  revision: id$1,
72920
73110
  nodes: record$3(id$1, id$1),
72921
- changes: array(object$1({
73111
+ changes: array(object$2({
72922
73112
  index: int(),
72923
73113
  op: id$1,
72924
73114
  node: id$1.optional()
72925
73115
  })),
72926
- validation: object$1({
73116
+ validation: object$2({
72927
73117
  status: _enum([
72928
73118
  "valid",
72929
73119
  "invalid",
@@ -72933,21 +73123,21 @@ object$1({
72933
73123
  }),
72934
73124
  version: literal(1)
72935
73125
  });
72936
- object$1({
73126
+ object$2({
72937
73127
  flowId: id$1,
72938
73128
  revision: id$1,
72939
- data: object$1({
73129
+ data: object$2({
72940
73130
  nodes: array(record$3(string$1(), json$1)).optional(),
72941
73131
  edges: array(json$1).optional(),
72942
73132
  text: record$3(string$1(), json$1).optional()
72943
73133
  }),
72944
73134
  version: literal(1)
72945
73135
  });
72946
- object$1({
73136
+ object$2({
72947
73137
  flowId: id$1,
72948
73138
  revision: id$1,
72949
- data: object$1({
72950
- matches: array(object$1({
73139
+ data: object$2({
73140
+ matches: array(object$2({
72951
73141
  node: id$1.optional(),
72952
73142
  field: id$1,
72953
73143
  line: int().optional(),
@@ -73022,48 +73212,48 @@ var metadata = {
73022
73212
  var binding = unknown().transform(triggerBinding);
73023
73213
  var provider = {
73024
73214
  provider: string$1().min(1),
73025
- inputs: record$3(string$1(), discriminatedUnion("kind", [object$1({
73215
+ inputs: record$3(string$1(), discriminatedUnion("kind", [object$2({
73026
73216
  kind: literal("value"),
73027
73217
  value: json$4()
73028
- }), object$1({ kind: literal("unset") })]))
73218
+ }), object$2({ kind: literal("unset") })]))
73029
73219
  };
73030
73220
  discriminatedUnion("type", [
73031
- object$1({
73221
+ object$2({
73032
73222
  ...metadata,
73033
73223
  type: literal("start"),
73034
73224
  config: authoringConfigurations.start
73035
73225
  }),
73036
- object$1({
73226
+ object$2({
73037
73227
  ...metadata,
73038
73228
  type: literal("manual"),
73039
- config: object$1({})
73229
+ config: object$2({})
73040
73230
  }),
73041
- object$1({
73231
+ object$2({
73042
73232
  ...metadata,
73043
73233
  type: literal("webhook"),
73044
73234
  config: authoringConfigurations.webhook,
73045
73235
  binding
73046
73236
  }),
73047
- object$1({
73237
+ object$2({
73048
73238
  ...metadata,
73049
73239
  type: literal("cron"),
73050
73240
  config: authoringConfigurations.cron,
73051
73241
  binding
73052
73242
  }),
73053
- object$1({
73243
+ object$2({
73054
73244
  ...metadata,
73055
73245
  type: literal("error"),
73056
73246
  config: authoringConfigurations.error,
73057
73247
  binding
73058
73248
  }),
73059
- object$1({
73249
+ object$2({
73060
73250
  ...metadata,
73061
73251
  ...provider,
73062
73252
  type: literal("poll"),
73063
73253
  config: authoringConfigurations.poll,
73064
73254
  binding
73065
73255
  }),
73066
- object$1({
73256
+ object$2({
73067
73257
  ...metadata,
73068
73258
  ...provider,
73069
73259
  type: literal("integration"),
@@ -73080,7 +73270,7 @@ discriminatedUnion("kind", [strictObject({ kind: literal("admin-delegation") }),
73080
73270
  var id = string$1().min(1).max(256);
73081
73271
  var eventType = string$1().regex(/^[a-z][a-z0-9_.:]{0,127}$/);
73082
73272
  var name$1 = string$1().trim().min(1).max(128);
73083
- object$1({
73273
+ object$2({
73084
73274
  version: literal(1),
73085
73275
  sourceId: id,
73086
73276
  revision: int().positive(),
@@ -73120,7 +73310,7 @@ object$1({
73120
73310
  verifiedAt: string$1().nullable(),
73121
73311
  lastReceivedAt: string$1().nullable(),
73122
73312
  updatedAt: string$1(),
73123
- consumers: array(object$1({
73313
+ consumers: array(object$2({
73124
73314
  flowId: id,
73125
73315
  flowName: string$1(),
73126
73316
  triggerNodeId: id
@@ -73149,7 +73339,7 @@ strictObject({
73149
73339
  //#endregion
73150
73340
  //#region src/control/common/results.ts
73151
73341
  var json = json$4();
73152
- var entry = object$1({
73342
+ var entry = object$2({
73153
73343
  pointer: string$1(),
73154
73344
  type: _enum([
73155
73345
  "object",
@@ -73168,17 +73358,17 @@ var page$1 = entry.extend({
73168
73358
  nextOffset: number().int().positive().optional(),
73169
73359
  entries: array(entry).optional()
73170
73360
  });
73171
- var result = object$1({
73361
+ var result = object$2({
73172
73362
  resultId: string$1().min(1),
73173
73363
  callId: string$1().min(1),
73174
73364
  toolId: string$1().min(1),
73175
73365
  source: discriminatedUnion("kind", [
73176
- object$1({
73366
+ object$2({
73177
73367
  kind: literal("connector"),
73178
73368
  action: string$1().min(1)
73179
73369
  }),
73180
- object$1({ kind: literal("code") }),
73181
- object$1({
73370
+ object$2({ kind: literal("code") }),
73371
+ object$2({
73182
73372
  kind: literal("workflow"),
73183
73373
  flowId: string$1().min(1)
73184
73374
  })
@@ -73187,13 +73377,13 @@ var result = object$1({
73187
73377
  digest: string$1().regex(/^[a-f0-9]{64}$/),
73188
73378
  createdAt: string$1().datetime()
73189
73379
  });
73190
- object$1({
73380
+ object$2({
73191
73381
  version: literal(1),
73192
73382
  runId: string$1(),
73193
73383
  results: array(result),
73194
73384
  nextAfter: string$1().optional()
73195
73385
  });
73196
- object$1({
73386
+ object$2({
73197
73387
  version: literal(1),
73198
73388
  runId: string$1(),
73199
73389
  result,
@@ -102366,8 +102556,9 @@ function FieldValueEditor(suppliedProps) {
102366
102556
  });
102367
102557
  const firstName = objectFieldNames(schema, value)[0];
102368
102558
  const firstSchema = firstName == null ? void 0 : objectValue(source.properties)?.[firstName] ?? source.additionalProperties ?? {};
102559
+ const firstEditorSchema = !definitionEditable && editorComponent(firstSchema) === "json" ? defaultValueEditorSchema(firstSchema) : firstSchema;
102369
102560
  const firstValue = firstName == null ? void 0 : objectValue(value)?.[firstName];
102370
- const childMarker = type === "array" ? array.length > 0 : firstName != null && (sorting && props.onDefinitionChange != null || fieldValueShape(firstSchema, firstValue, {
102561
+ const childMarker = type === "array" ? array.length > 0 : firstName != null && (sorting && props.onDefinitionChange != null || fieldValueShape(firstEditorSchema, firstValue, {
102371
102562
  objectChild: true,
102372
102563
  depth: depth + 1
102373
102564
  }).expandable);
@@ -102378,6 +102569,7 @@ function FieldValueEditor(suppliedProps) {
102378
102569
  id: `${id}-body`,
102379
102570
  className: valueEditor_module_default.body,
102380
102571
  "data-value-body": true,
102572
+ "data-feedback": anchor === "body" && messages.length > 0 || void 0,
102381
102573
  hidden: compactValue && expandable && !expanded || expandable && !hasExpandedContent,
102382
102574
  children: [
102383
102575
  !showUnset && !compactValue && valueEditable && presence !== "value" && /* @__PURE__ */ jsx("span", {
@@ -102508,6 +102700,7 @@ function FieldValueEditor(suppliedProps) {
102508
102700
  "aria-label": label,
102509
102701
  "aria-describedby": messages.length ? `${id}-error` : void 0,
102510
102702
  ref: setContainer,
102703
+ "data-summary-feedback": anchor === "summary" && messages.length > 0 || void 0,
102511
102704
  "data-inline": props.hideOptions && !hasHeader || void 0,
102512
102705
  "data-compact": props.compact || void 0,
102513
102706
  "data-value-tools": canReset || canClear || canToggleJson || inlineExpansion && hasExpandedContent || void 0,
@@ -109500,6 +109693,38 @@ var resources = {
109500
109693
  "aliasInvalid": "Use a unique call name of 1–64 characters, starting with a letter and containing only letters, numbers, underscores or hyphens.",
109501
109694
  "connector": "Connector",
109502
109695
  "workflow": "Workflow"
109696
+ },
109697
+ httpRequest: {
109698
+ "title": "HTTP Request",
109699
+ "description": "Send an HTTP request and use its response in the workflow.",
109700
+ "method": "Method",
109701
+ "query": "Query parameters",
109702
+ "headers": "Request headers",
109703
+ "bodyFormat": "Request body format",
109704
+ "none": "None",
109705
+ "text": "Text",
109706
+ "authentication": "Authentication",
109707
+ "location": "Location",
109708
+ "keyName": "Key name",
109709
+ "responseFormat": "Response format",
109710
+ "auto": "Auto",
109711
+ "statusPolicy": "Accepted status codes",
109712
+ "success": "2xx",
109713
+ "all": "All status codes",
109714
+ "saveFailed": "Unable to save request settings.",
109715
+ "retry": "Retry",
109716
+ "bodyUnsupported": "GET and HEAD do not support a request body.",
109717
+ "parameterNamesInvalid": "Parameter names must be nonempty and unique.",
109718
+ "headerNameInvalid": "Invalid HTTP header name.",
109719
+ "keyNameRequired": "Enter an API Key name.",
109720
+ "authConflict": "Authentication conflicts with a request parameter.",
109721
+ "body": "Request body",
109722
+ "username": "Username",
109723
+ "password": "Password",
109724
+ "keyValue": "Key value",
109725
+ "responseOutputs": "Response outputs",
109726
+ "authenticationType": "Type",
109727
+ "responseSettings": "Response settings"
109503
109728
  }
109504
109729
  },
109505
109730
  "zh-CN": {
@@ -110991,6 +111216,38 @@ var resources = {
110991
111216
  "aliasInvalid": "调用名称不能重复,长度为 1–64 个字符,以英文字母开头,仅包含英文字母、数字、下划线或连字符。",
110992
111217
  "connector": "连接器",
110993
111218
  "workflow": "工作流"
111219
+ },
111220
+ httpRequest: {
111221
+ "title": "HTTP 请求",
111222
+ "description": "发送 HTTP 请求,在工作流中使用响应数据。",
111223
+ "method": "请求方法",
111224
+ "query": "查询参数",
111225
+ "headers": "请求头",
111226
+ "bodyFormat": "请求体格式",
111227
+ "none": "无",
111228
+ "text": "文本",
111229
+ "authentication": "认证",
111230
+ "location": "位置",
111231
+ "keyName": "密钥名称",
111232
+ "responseFormat": "响应格式",
111233
+ "auto": "自动",
111234
+ "statusPolicy": "接受的状态码",
111235
+ "success": "2xx",
111236
+ "all": "所有状态码",
111237
+ "saveFailed": "无法保存请求配置。",
111238
+ "retry": "重试",
111239
+ "bodyUnsupported": "GET 和 HEAD 不支持请求体。",
111240
+ "parameterNamesInvalid": "参数名称不能为空或重复。",
111241
+ "headerNameInvalid": "HTTP 请求头名称无效。",
111242
+ "keyNameRequired": "请填写 API Key 名称。",
111243
+ "authConflict": "认证与请求参数冲突。",
111244
+ "body": "请求体",
111245
+ "username": "用户名",
111246
+ "password": "密码",
111247
+ "keyValue": "密钥值",
111248
+ "responseOutputs": "响应输出",
111249
+ "authenticationType": "认证方式",
111250
+ "responseSettings": "响应配置"
110994
111251
  }
110995
111252
  },
110996
111253
  "zh-TW": {
@@ -112482,6 +112739,38 @@ var resources = {
112482
112739
  "aliasInvalid": "呼叫名稱不能重複,長度為 1–64 個字元,以英文字母開頭,僅包含英文字母、數字、底線或連字號。",
112483
112740
  "connector": "連接器",
112484
112741
  "workflow": "工作流程"
112742
+ },
112743
+ httpRequest: {
112744
+ "title": "HTTP 請求",
112745
+ "description": "傳送 HTTP 請求,在工作流程中使用回應資料。",
112746
+ "method": "請求方法",
112747
+ "query": "查詢參數",
112748
+ "headers": "請求標頭",
112749
+ "bodyFormat": "請求本文格式",
112750
+ "none": "無",
112751
+ "text": "文字",
112752
+ "authentication": "驗證",
112753
+ "location": "位置",
112754
+ "keyName": "金鑰名稱",
112755
+ "responseFormat": "回應格式",
112756
+ "auto": "自動",
112757
+ "statusPolicy": "接受的狀態碼",
112758
+ "success": "2xx",
112759
+ "all": "所有狀態碼",
112760
+ "saveFailed": "無法儲存請求設定。",
112761
+ "retry": "重試",
112762
+ "bodyUnsupported": "GET 和 HEAD 不支援請求本文。",
112763
+ "parameterNamesInvalid": "參數名稱不可為空或重複。",
112764
+ "headerNameInvalid": "HTTP 請求標頭名稱無效。",
112765
+ "keyNameRequired": "請填寫 API Key 名稱。",
112766
+ "authConflict": "驗證與請求參數衝突。",
112767
+ "body": "請求本文",
112768
+ "username": "使用者名稱",
112769
+ "password": "密碼",
112770
+ "keyValue": "金鑰值",
112771
+ "responseOutputs": "回應輸出",
112772
+ "authenticationType": "驗證方式",
112773
+ "responseSettings": "回應設定"
112485
112774
  }
112486
112775
  },
112487
112776
  "ja": {
@@ -113730,6 +114019,38 @@ var resources = {
113730
114019
  "aliasInvalid": "呼び出し名は重複しない1~64文字で、英字で始まり、英数字、アンダースコア、ハイフンのみを使用してください。",
113731
114020
  "connector": "コネクター",
113732
114021
  "workflow": "ワークフロー"
114022
+ },
114023
+ httpRequest: {
114024
+ "title": "HTTP リクエスト",
114025
+ "description": "HTTP リクエストを送信し、ワークフローでレスポンスを使用します。",
114026
+ "method": "メソッド",
114027
+ "query": "クエリパラメーター",
114028
+ "headers": "リクエストヘッダー",
114029
+ "bodyFormat": "リクエスト本文形式",
114030
+ "none": "なし",
114031
+ "text": "テキスト",
114032
+ "authentication": "認証",
114033
+ "location": "位置",
114034
+ "keyName": "キー名",
114035
+ "responseFormat": "レスポンス形式",
114036
+ "auto": "自動",
114037
+ "statusPolicy": "成功とするステータスコード",
114038
+ "success": "2xx",
114039
+ "all": "すべてのコード",
114040
+ "saveFailed": "リクエスト設定を保存できません。",
114041
+ "retry": "再試行",
114042
+ "bodyUnsupported": "GET と HEAD は本文をサポートしていません。",
114043
+ "parameterNamesInvalid": "パラメーター名は空白や重複にできません。",
114044
+ "headerNameInvalid": "HTTP ヘッダー名が無効です。",
114045
+ "keyNameRequired": "API キー名を入力してください。",
114046
+ "authConflict": "認証とリクエストパラメーターが競合しています。",
114047
+ "body": "リクエスト本文",
114048
+ "username": "ユーザー名",
114049
+ "password": "パスワード",
114050
+ "keyValue": "キーの値",
114051
+ "responseOutputs": "レスポンス出力",
114052
+ "authenticationType": "認証方式",
114053
+ "responseSettings": "レスポンス設定"
113733
114054
  }
113734
114055
  },
113735
114056
  "ko": {
@@ -114978,6 +115299,38 @@ var resources = {
114978
115299
  "aliasInvalid": "호출 이름은 중복 없이 1–64자로 지정하고, 영문자로 시작하여 영문자, 숫자, 밑줄 또는 하이픈만 사용하세요.",
114979
115300
  "connector": "커넥터",
114980
115301
  "workflow": "워크플로"
115302
+ },
115303
+ httpRequest: {
115304
+ "title": "HTTP 요청",
115305
+ "description": "HTTP 요청을 보내고 워크플로에서 응답을 사용합니다.",
115306
+ "method": "메서드",
115307
+ "query": "쿼리 매개변수",
115308
+ "headers": "요청 헤더",
115309
+ "bodyFormat": "요청 본문 형식",
115310
+ "none": "없음",
115311
+ "text": "텍스트",
115312
+ "authentication": "인증",
115313
+ "location": "위치",
115314
+ "keyName": "키 이름",
115315
+ "responseFormat": "응답 형식",
115316
+ "auto": "자동",
115317
+ "statusPolicy": "허용 상태 코드",
115318
+ "success": "2xx",
115319
+ "all": "모든 코드",
115320
+ "saveFailed": "요청 설정을 저장할 수 없습니다.",
115321
+ "retry": "다시 시도",
115322
+ "bodyUnsupported": "GET과 HEAD는 본문을 지원하지 않습니다.",
115323
+ "parameterNamesInvalid": "매개변수 이름은 비어 있거나 중복될 수 없습니다.",
115324
+ "headerNameInvalid": "HTTP 헤더 이름이 잘못되었습니다.",
115325
+ "keyNameRequired": "API 키 이름을 입력하세요.",
115326
+ "authConflict": "인증과 요청 매개변수가 충돌합니다.",
115327
+ "body": "요청 본문",
115328
+ "username": "사용자 이름",
115329
+ "password": "비밀번호",
115330
+ "keyValue": "키 값",
115331
+ "responseOutputs": "응답 출력",
115332
+ "authenticationType": "인증 방식",
115333
+ "responseSettings": "응답 설정"
114981
115334
  }
114982
115335
  },
114983
115336
  "ru": {
@@ -116226,6 +116579,38 @@ var resources = {
116226
116579
  "aliasInvalid": "Укажите уникальное имя вызова длиной 1–64 символа, начинающееся с латинской буквы и содержащее только латинские буквы, цифры, подчёркивания или дефисы.",
116227
116580
  "connector": "Коннектор",
116228
116581
  "workflow": "Рабочий процесс"
116582
+ },
116583
+ httpRequest: {
116584
+ "title": "HTTP-запрос",
116585
+ "description": "Отправить HTTP-запрос и использовать ответ в рабочем процессе.",
116586
+ "method": "Метод",
116587
+ "query": "Параметры запроса",
116588
+ "headers": "Заголовки запроса",
116589
+ "bodyFormat": "Формат тела запроса",
116590
+ "none": "Нет",
116591
+ "text": "Текст",
116592
+ "authentication": "Аутентификация",
116593
+ "location": "Расположение",
116594
+ "keyName": "Имя ключа",
116595
+ "responseFormat": "Формат ответа",
116596
+ "auto": "Автоматически",
116597
+ "statusPolicy": "Допустимые коды состояния",
116598
+ "success": "2xx",
116599
+ "all": "Все коды",
116600
+ "saveFailed": "Не удалось сохранить настройки запроса.",
116601
+ "retry": "Повторить",
116602
+ "bodyUnsupported": "GET и HEAD не поддерживают тело запроса.",
116603
+ "parameterNamesInvalid": "Имена параметров должны быть непустыми и уникальными.",
116604
+ "headerNameInvalid": "Недопустимое имя HTTP-заголовка.",
116605
+ "keyNameRequired": "Введите имя ключа API.",
116606
+ "authConflict": "Аутентификация конфликтует с параметром запроса.",
116607
+ "body": "Тело запроса",
116608
+ "username": "Имя пользователя",
116609
+ "password": "Пароль",
116610
+ "keyValue": "Значение ключа",
116611
+ "responseOutputs": "Выходы ответа",
116612
+ "authenticationType": "Тип",
116613
+ "responseSettings": "Настройки ответа"
116229
116614
  }
116230
116615
  },
116231
116616
  "fr": {
@@ -117474,6 +117859,38 @@ var resources = {
117474
117859
  "aliasInvalid": "Utilisez un nom d’appel unique de 1 à 64 caractères, commençant par une lettre et contenant uniquement des lettres ASCII, chiffres, tirets ou traits de soulignement.",
117475
117860
  "connector": "Connecteur",
117476
117861
  "workflow": "Workflow"
117862
+ },
117863
+ httpRequest: {
117864
+ "title": "Requête HTTP",
117865
+ "description": "Envoyer une requête HTTP et utiliser sa réponse dans le workflow.",
117866
+ "method": "Méthode",
117867
+ "query": "Paramètres de requête",
117868
+ "headers": "En-têtes de requête",
117869
+ "bodyFormat": "Format du corps de la requête",
117870
+ "none": "Aucun",
117871
+ "text": "Texte",
117872
+ "authentication": "Authentification",
117873
+ "location": "Emplacement",
117874
+ "keyName": "Nom de la clé",
117875
+ "responseFormat": "Format de réponse",
117876
+ "auto": "Automatique",
117877
+ "statusPolicy": "Codes de statut acceptés",
117878
+ "success": "2xx",
117879
+ "all": "Tous les codes",
117880
+ "saveFailed": "Impossible d’enregistrer la configuration.",
117881
+ "retry": "Réessayer",
117882
+ "bodyUnsupported": "GET et HEAD ne prennent pas en charge de corps.",
117883
+ "parameterNamesInvalid": "Les noms doivent être uniques et non vides.",
117884
+ "headerNameInvalid": "Nom d’en-tête HTTP invalide.",
117885
+ "keyNameRequired": "Saisissez un nom de clé API.",
117886
+ "authConflict": "L’authentification est en conflit avec un paramètre.",
117887
+ "body": "Corps de la requête",
117888
+ "username": "Nom d’utilisateur",
117889
+ "password": "Mot de passe",
117890
+ "keyValue": "Valeur de la clé",
117891
+ "responseOutputs": "Sorties de réponse",
117892
+ "authenticationType": "Type",
117893
+ "responseSettings": "Paramètres de réponse"
117477
117894
  }
117478
117895
  }
117479
117896
  };
@@ -119724,6 +120141,278 @@ function GeneralSettings({ title, children, disabled = false, readOnly = false,
119724
120141
  }, nodeId);
119725
120142
  }
119726
120143
  //#endregion
120144
+ //#region src/workbench/browser/runtime/editor/httpParameterEditor.tsx
120145
+ var expanded$2 = () => true;
120146
+ var object = (value) => value != null && typeof value === "object" && !Array.isArray(value) ? value : {};
120147
+ function HttpParameterEditor({ group, task, entries, disabled, readOnly, variables, renderSource, onEdit }) {
120148
+ const t = useTranslate();
120149
+ if (task.executor.kind !== "http-request") return null;
120150
+ const parameters = task.executor[group];
120151
+ const root = parameters.mode === "object" ? entries[group] : void 0;
120152
+ const label = t(`httpRequest.${group}`);
120153
+ const schema = group === "query" ? httpQuerySchema : httpHeaderSchema;
120154
+ const handle = (name) => `${group === "query" ? "query" : "header"}.${name}`;
120155
+ const values = parameters.mode === "fields" ? Object.fromEntries(parameters.names.map((name) => {
120156
+ const value = entries[handle(name)]?.value;
120157
+ return [name, value === void 0 ? "" : value];
120158
+ })) : object(root?.value);
120159
+ const input = (port, entry, name) => {
120160
+ const upstream = renderSource(port.handle, port);
120161
+ return {
120162
+ embedded: true,
120163
+ definition: port,
120164
+ variables,
120165
+ disabled,
120166
+ readOnly,
120167
+ variableName: entry?.variableName,
120168
+ connected: entry?.connected ?? false,
120169
+ upstream: upstream == null ? void 0 : {
120170
+ ...upstream,
120171
+ onChange: (source) => onEdit({
120172
+ kind: "source",
120173
+ source: {
120174
+ kind: "node",
120175
+ ...source
120176
+ },
120177
+ field: name,
120178
+ fields: values
120179
+ })
120180
+ },
120181
+ onVariable: (next) => {
120182
+ if (next == null) onEdit({
120183
+ kind: "fields",
120184
+ value: name == null ? {} : {
120185
+ ...values,
120186
+ [name]: ""
120187
+ },
120188
+ field: name
120189
+ });
120190
+ else onEdit({
120191
+ kind: "variable",
120192
+ name: next,
120193
+ field: name,
120194
+ fields: values
120195
+ });
120196
+ }
120197
+ };
120198
+ };
120199
+ return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(FieldTable, {
120200
+ standalone: true,
120201
+ layout: "values",
120202
+ typeColumn: false,
120203
+ columnHeadings: false,
120204
+ actionSlots: 2,
120205
+ children: /* @__PURE__ */ jsx(NodeInputValue, {
120206
+ ...input({
120207
+ handle: group,
120208
+ jsonSchema: schema,
120209
+ nullable: true
120210
+ }, root),
120211
+ label,
120212
+ value: values,
120213
+ onValue: (next) => onEdit({
120214
+ kind: "fields",
120215
+ value: object(next)
120216
+ }),
120217
+ presentation: {
120218
+ valueOnly: true,
120219
+ hideOptions: true,
120220
+ hideValueTools: true,
120221
+ hideChildTypes: true,
120222
+ expansionPolicy: expanded$2,
120223
+ validateObjectFieldName: (name, current) => group === "query" ? !!name.trim() && (name === current || !Object.hasOwn(values, name)) : httpHeaderNameIssue(name, Object.keys(values).filter((key) => key !== current)) == null,
120224
+ renderObjectField: (name, props) => /* @__PURE__ */ jsx(NodeInputValue, {
120225
+ ...input({
120226
+ handle: handle(name),
120227
+ jsonSchema: props.schema,
120228
+ nullable: true
120229
+ }, parameters.mode === "fields" ? entries[handle(name)] : void 0, name),
120230
+ label: props.label,
120231
+ value: parameters.mode === "fields" ? entries[handle(name)]?.value : values[name],
120232
+ presentation: props,
120233
+ onValue: (value) => onEdit({
120234
+ kind: "fields",
120235
+ value: {
120236
+ ...values,
120237
+ [name]: value ?? null
120238
+ },
120239
+ field: name
120240
+ })
120241
+ })
120242
+ }
120243
+ })
120244
+ })] });
120245
+ }
120246
+ //#endregion
120247
+ //#region src/workbench/browser/runtime/editor/httpRequestSection.tsx
120248
+ function HttpRequestSection({ task, disabled, onSave, parameters, input }) {
120249
+ const t = useTranslate();
120250
+ const id = useId();
120251
+ const saveRef = useRef(onSave);
120252
+ saveRef.current = onSave;
120253
+ const taskRef = useRef(task);
120254
+ taskRef.current = task;
120255
+ const [changes] = useState(() => new TaskExecutorChanges(task.executor, (before, next) => {
120256
+ if (before.kind != "http-request" || next.kind != "http-request") return Promise.resolve(false);
120257
+ const current = taskRef.current;
120258
+ if (current.executor.kind !== "http-request") return Promise.resolve(false);
120259
+ const merged = { ...current.executor };
120260
+ for (const key of [
120261
+ "method",
120262
+ "authentication",
120263
+ "bodyFormat",
120264
+ "responseFormat",
120265
+ "statusPolicy"
120266
+ ]) if (!dequal$1(before[key], next[key])) Object.assign(merged, { [key]: next[key] });
120267
+ return saveRef.current(current, httpRequestTask(merged, current.name, current));
120268
+ }));
120269
+ const [config, setConfig] = useState(changes.value);
120270
+ const [failed, setFailed] = useState(false);
120271
+ useEffect(() => {
120272
+ changes.sync(task.executor);
120273
+ setConfig(changes.value);
120274
+ }, [changes, task.executor]);
120275
+ if (config.kind != "http-request") return null;
120276
+ const issues = httpRequestIssues(config);
120277
+ const error = (field, index) => {
120278
+ const messages = issues.filter((issue) => issue.field === field && issue.index === index).map((issue) => t(`httpRequest.${issue.code}`));
120279
+ return messages.length ? [...new Set(messages)].join(" ") : void 0;
120280
+ };
120281
+ async function save() {
120282
+ try {
120283
+ setFailed(!await changes.save());
120284
+ } catch {
120285
+ setFailed(true);
120286
+ }
120287
+ }
120288
+ function update(patch) {
120289
+ if (disabled || changes.value.kind != "http-request") return;
120290
+ changes.value = {
120291
+ ...changes.value,
120292
+ ...patch
120293
+ };
120294
+ setConfig(changes.value);
120295
+ save();
120296
+ }
120297
+ const select = (key, value, options, change, fieldLabel = t(`httpRequest.${key}`)) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
120298
+ htmlFor: `${id}-${key}`,
120299
+ children: fieldLabel
120300
+ }), /* @__PURE__ */ jsx(ValueEditorFeedback, {
120301
+ error: key === "authentication" && config.authentication.type === "apiKey" ? void 0 : error(key),
120302
+ children: (errorId) => /* @__PURE__ */ jsx(NativeSelect, {
120303
+ className: "w-full",
120304
+ id: `${id}-${key}`,
120305
+ value,
120306
+ disabled,
120307
+ "aria-invalid": !!errorId,
120308
+ "aria-describedby": errorId,
120309
+ onChange: (event) => change(event.target.value),
120310
+ children: options.map(([optionValue, label]) => /* @__PURE__ */ jsx(NativeSelectOption, {
120311
+ value: optionValue,
120312
+ children: label
120313
+ }, optionValue))
120314
+ })
120315
+ })] }, key);
120316
+ const auth = config.authentication;
120317
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
120318
+ /* @__PURE__ */ jsx(InspectorSection, {
120319
+ title: t("httpRequest.title"),
120320
+ "data-inspector-section": "task",
120321
+ children: /* @__PURE__ */ jsxs("div", {
120322
+ className: "node-settings flex flex-col gap-3",
120323
+ "data-value-editor-scope": true,
120324
+ children: [
120325
+ input("url", "URL"),
120326
+ select("method", config.method, [
120327
+ "GET",
120328
+ "POST",
120329
+ "PUT",
120330
+ "PATCH",
120331
+ "DELETE",
120332
+ "HEAD",
120333
+ "OPTIONS"
120334
+ ].map((value) => [value, value]), (method) => update({ method })),
120335
+ parameters,
120336
+ select("bodyFormat", config.bodyFormat, [
120337
+ ["none", t("httpRequest.none")],
120338
+ ["json", "JSON"],
120339
+ ["text", t("httpRequest.text")],
120340
+ ["form", "URL-encoded"]
120341
+ ], (bodyFormat) => update({ bodyFormat })),
120342
+ config.bodyFormat !== "none" && input("body", t("httpRequest.body"))
120343
+ ]
120344
+ })
120345
+ }),
120346
+ /* @__PURE__ */ jsx(InspectorSection, {
120347
+ title: t("httpRequest.authentication"),
120348
+ children: /* @__PURE__ */ jsxs("div", {
120349
+ className: "node-settings flex flex-col gap-3",
120350
+ "data-value-editor-scope": true,
120351
+ children: [
120352
+ select("authentication", auth.type, [
120353
+ ["none", t("httpRequest.none")],
120354
+ ["bearer", "Bearer"],
120355
+ ["basic", "Basic"],
120356
+ ["apiKey", "API Key"]
120357
+ ], (type) => update({ authentication: type == "apiKey" ? {
120358
+ type,
120359
+ name: "X-API-Key",
120360
+ in: "header"
120361
+ } : { type } }), t("httpRequest.authenticationType")),
120362
+ auth.type == "apiKey" && /* @__PURE__ */ jsxs(Fragment$1, { children: [select("location", auth.in, [["header", "Header"], ["query", "Query"]], (location) => update({ authentication: {
120363
+ ...auth,
120364
+ in: location
120365
+ } })), /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
120366
+ htmlFor: `${id}-keyName`,
120367
+ children: t("httpRequest.keyName")
120368
+ }), /* @__PURE__ */ jsx(ValueEditorFeedback, {
120369
+ error: error("authentication"),
120370
+ children: (errorId) => /* @__PURE__ */ jsx(Input, {
120371
+ id: `${id}-keyName`,
120372
+ value: auth.name,
120373
+ "aria-invalid": !!errorId,
120374
+ "aria-describedby": errorId,
120375
+ readOnly: disabled,
120376
+ onChange: (event) => update({ authentication: {
120377
+ ...auth,
120378
+ name: event.target.value
120379
+ } })
120380
+ })
120381
+ })] })] }),
120382
+ auth.type === "basic" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [input("auth.username", t("httpRequest.username")), input("auth.password", t("httpRequest.password"))] }) : auth.type !== "none" ? input("auth.token", auth.type === "apiKey" ? t("httpRequest.keyValue") : "Token") : null
120383
+ ]
120384
+ })
120385
+ }),
120386
+ /* @__PURE__ */ jsx(InspectorSection, {
120387
+ title: t("httpRequest.responseSettings"),
120388
+ children: /* @__PURE__ */ jsxs("div", {
120389
+ className: "node-settings flex flex-col gap-3",
120390
+ "data-value-editor-scope": true,
120391
+ children: [
120392
+ select("responseFormat", config.responseFormat, [
120393
+ ["auto", t("httpRequest.auto")],
120394
+ ["json", "JSON"],
120395
+ ["text", t("httpRequest.text")]
120396
+ ], (responseFormat) => update({ responseFormat })),
120397
+ select("statusPolicy", config.statusPolicy, [["success", t("httpRequest.success")], ["all", t("httpRequest.all")]], (statusPolicy) => update({ statusPolicy })),
120398
+ failed && /* @__PURE__ */ jsx(ValueEditorFeedback, {
120399
+ error: t("httpRequest.saveFailed"),
120400
+ children: (errorId) => /* @__PURE__ */ jsx(Button$1, {
120401
+ variant: "outline",
120402
+ size: "field",
120403
+ "aria-invalid": true,
120404
+ "aria-describedby": errorId,
120405
+ disabled,
120406
+ onClick: () => void save(),
120407
+ children: t("httpRequest.retry")
120408
+ })
120409
+ })
120410
+ ]
120411
+ })
120412
+ })
120413
+ ] });
120414
+ }
120415
+ //#endregion
119727
120416
  //#region src/workbench/browser/runtime/editor/leinaBotSelect.tsx
119728
120417
  function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
119729
120418
  const t = useTranslate();
@@ -120555,9 +121244,9 @@ function OpenApiSection({ task, disabled, load, onSave, credentials }) {
120555
121244
  })]
120556
121245
  })]
120557
121246
  })
120558
- })] }), selectedServer != null && Object.entries(object(selectedServer.variables ?? {})).map(([name, definition]) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: name }), /* @__PURE__ */ jsx(Input, {
121247
+ })] }), selectedServer != null && Object.entries(object$1(selectedServer.variables ?? {})).map(([name, definition]) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: name }), /* @__PURE__ */ jsx(Input, {
120559
121248
  "aria-label": name,
120560
- value: serverVariables[name] ?? String(object(definition).default ?? ""),
121249
+ value: serverVariables[name] ?? String(object$1(definition).default ?? ""),
120561
121250
  disabled,
120562
121251
  onChange: (event) => setServerVariables({
120563
121252
  ...serverVariables,
@@ -121738,7 +122427,7 @@ function WebhookHeadersEditor({ options, outputs, disabled, readOnly, sourceDisa
121738
122427
  onDraftIssue: ignoreDraft,
121739
122428
  valueAddon: source(),
121740
122429
  editor: whole == null ? void 0 : selected(whole.output, issue("/responseHeadersSource")),
121741
- validateObjectFieldName: (name, current) => webhookHeaderNameIssue(name, Object.keys(headers).filter((candidate) => candidate !== current)) == null,
122430
+ validateObjectFieldName: (name, current) => httpHeaderNameIssue(name, Object.keys(headers).filter((candidate) => candidate !== current)) == null,
121742
122431
  renderObjectField: (name, props) => {
121743
122432
  const reference = binding(name);
121744
122433
  return /* @__PURE__ */ jsx(FieldValueEditor, {
@@ -122241,7 +122930,7 @@ function WebhookResponseEditor({ entries, disabled, readOnly, variables, renderS
122241
122930
  hideValueTools: true,
122242
122931
  hideChildTypes: true,
122243
122932
  expansionPolicy: expanded,
122244
- validateObjectFieldName: (next, current) => webhookHeaderNameIssue(next, Object.keys(value != null && typeof value === "object" && !Array.isArray(value) ? value : {}).filter((key) => key !== current)) == null
122933
+ validateObjectFieldName: (next, current) => httpHeaderNameIssue(next, Object.keys(value != null && typeof value === "object" && !Array.isArray(value) ? value : {}).filter((key) => key !== current)) == null
122245
122934
  } : { hideOptions: true }
122246
122935
  });
122247
122936
  return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), headers ? /* @__PURE__ */ jsx(FieldTable, {
@@ -122268,7 +122957,7 @@ function inspectorIcon(node) {
122268
122957
  if (node?.kind == "task" && node.definition != null && "executor" in node.definition) {
122269
122958
  if (node.definition.executor.kind == "decision") return "decision";
122270
122959
  if (node.definition.executor.kind == "workflow") return "flow";
122271
- if (node.definition.executor.kind == "openapi") return "task";
122960
+ if (node.definition.executor.kind == "openapi" || node.definition.executor.kind == "http-request") return "task";
122272
122961
  return node.definition.executor.kind == "connector" ? "connection" : "llm";
122273
122962
  }
122274
122963
  return "task";
@@ -122301,6 +122990,7 @@ function nodePurposePlaceholder(selection, t, action, displays) {
122301
122990
  case "agent": return t("addNode.agentDescription");
122302
122991
  case "decision": return t("decision.description");
122303
122992
  case "workflow": return t("workflow.description");
122993
+ case "http-request": return t("httpRequest.description");
122304
122994
  case "openapi": return t("openapi.description");
122305
122995
  case "connector": return action?.description;
122306
122996
  case "llm": return t(definition.executor.mode == "json" ? "addNode.llmStructuredDescription" : "addNode.llmChatDescription");
@@ -122308,7 +122998,7 @@ function nodePurposePlaceholder(selection, t, action, displays) {
122308
122998
  }
122309
122999
  }
122310
123000
  }
122311
- function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, handleName, t, triggerDisplays }) {
123001
+ function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, handleName, port, t, triggerDisplays }) {
122312
123002
  const graph = revision.graph();
122313
123003
  const mapping = revision.inputMappings(selection.node)[handleName];
122314
123004
  const sources = mapping?.kind == "sources" ? mapping.sources.filter((source) => source.kind == "node") : [];
@@ -122327,7 +123017,10 @@ function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, han
122327
123017
  check: void 0
122328
123018
  };
122329
123019
  }),
122330
- query: revision.inputSource(selection.id, handleName),
123020
+ query: port == null ? revision.inputSource(selection.id, handleName) : {
123021
+ ...revision.inputSource(selection.id, handleName),
123022
+ candidates: () => inputSourceCandidates(graph, selection.id, handleName, port)
123023
+ },
122331
123024
  groups: [],
122332
123025
  describeGroups: (candidates) => Object.entries(candidates).map(([nodeId, outputs]) => {
122333
123026
  const node = graph.nodes[nodeId];
@@ -122370,6 +123063,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
122370
123063
  const task = selection?.kind == "task" ? selection.definition : void 0;
122371
123064
  const isAgent = task != null && "executor" in task && task.executor.kind == "agent";
122372
123065
  const isDecision = task != null && "executor" in task && task.executor.kind == "decision";
123066
+ const isHttpRequest = task != null && "executor" in task && task.executor.kind == "http-request";
122373
123067
  const isOpenApi = task != null && "executor" in task && task.executor.kind == "openapi";
122374
123068
  const unconfiguredWorkflow = task != null && "executor" in task && task.executor.kind == "workflow" && !task.executor.flowId;
122375
123069
  const unconfiguredOpenApi = task != null && "executor" in task && task.executor.kind == "openapi" && !task.executor.path;
@@ -122643,6 +123337,84 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
122643
123337
  actions: workflowActions,
122644
123338
  list: (signal) => store.listWorkflowTargets(signal)
122645
123339
  }, `workflow:${selection?.id}`),
123340
+ isHttpRequest && task != null && "executor" in task && /* @__PURE__ */ jsx(HttpRequestSection, {
123341
+ task,
123342
+ disabled,
123343
+ input: (handle, label) => {
123344
+ if (selection?.kind !== "task") return null;
123345
+ const definition = task.inputs.find((port) => "handle" in port && port.handle === handle);
123346
+ if (definition == null) return null;
123347
+ const mapping = revision.inputMappings(selection.node)[handle];
123348
+ const source = mapping?.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
123349
+ const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
123350
+ return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(NodeInputValue, {
123351
+ embedded: true,
123352
+ definition,
123353
+ label,
123354
+ presentation: {
123355
+ compact: true,
123356
+ hideOptions: true
123357
+ },
123358
+ sourceOnly: handle.startsWith("auth."),
123359
+ readOnly,
123360
+ disabled,
123361
+ value: inputValue(mapping, definition.value),
123362
+ connected: mapping?.kind === "sources" && binding?.kind !== "variable",
123363
+ variableName: binding?.kind === "variable" ? binding.target : void 0,
123364
+ upstream: inputUpstreamSources({
123365
+ revision,
123366
+ sourceNodeIcons,
123367
+ selection,
123368
+ store,
123369
+ handleName: handle,
123370
+ t,
123371
+ triggerDisplays
123372
+ }),
123373
+ variables,
123374
+ onValue: (value, deletion) => {
123375
+ store?.nodes.setInputValue(selection.id, handle, value, deletion);
123376
+ },
123377
+ onVariable: (name) => {
123378
+ store?.nodes.setInputVariable(selection.id, handle, name);
123379
+ }
123380
+ })] }, handle);
123381
+ },
123382
+ parameters: selection?.kind === "task" && ["query", "headers"].map((group) => /* @__PURE__ */ jsx(HttpParameterEditor, {
123383
+ group,
123384
+ task,
123385
+ entries: Object.fromEntries(Object.entries(revision.inputMappings(selection.node)).map(([handle, mapping]) => {
123386
+ const source = mapping.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
123387
+ const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
123388
+ return [handle, {
123389
+ value: inputValue(mapping, void 0),
123390
+ connected: mapping.kind === "sources" && binding?.kind !== "variable",
123391
+ variableName: binding?.kind === "variable" ? binding.target : void 0
123392
+ }];
123393
+ })),
123394
+ variables,
123395
+ disabled,
123396
+ readOnly,
123397
+ renderSource: (handleName, port) => inputUpstreamSources({
123398
+ revision,
123399
+ sourceNodeIcons,
123400
+ selection,
123401
+ store,
123402
+ handleName,
123403
+ port,
123404
+ t,
123405
+ triggerDisplays
123406
+ }),
123407
+ onEdit: (edit) => {
123408
+ store?.nodes.saveHttpParameters(selection.id, group, edit);
123409
+ }
123410
+ }, group)),
123411
+ onSave: (before, value) => store?.nodes.saveTaskSettings(selection.id, {
123412
+ kind: "http-request",
123413
+ name: task.name,
123414
+ before,
123415
+ task: value
123416
+ }) ?? Promise.resolve(false)
123417
+ }, `http:${selection?.id}`),
122646
123418
  isOpenApi && task != null && "executor" in task && /* @__PURE__ */ jsx(OpenApiSection, {
122647
123419
  task,
122648
123420
  credentials: (onInvalidChange) => selection?.kind === "task" && task.inputs.filter((port) => "handle" in port && port.handle.startsWith("auth.")).map((definition) => {
@@ -122691,7 +123463,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
122691
123463
  task: value
122692
123464
  }) ?? Promise.resolve(false)
122693
123465
  }, `openapi:${selection?.id}`),
122694
- !unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
123466
+ !isHttpRequest && !unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
122695
123467
  const definitions = selection.kind === "outputs" ? [...selection.node.outputDefs] : selection.kind === "task" ? [...selection.definition?.inputs ?? []] : [...selection.node.inputDefinitions];
122696
123468
  const handles = new Set(definitions.flatMap((definition) => "handle" in definition ? [definition.handle] : []));
122697
123469
  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({
@@ -122710,6 +123482,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
122710
123482
  const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
122711
123483
  return {
122712
123484
  definition,
123485
+ sourceOnly: isHttpRequest && definition.handle.startsWith("auth."),
122713
123486
  editor: !readOnly && connectors != null && connector?.action == "leina.send_notification" && definition.handle == "leinaId" && mapping?.kind != "sources" ? /* @__PURE__ */ jsx(LeinaBotSelect, {
122714
123487
  source: connectors,
122715
123488
  flowId: revision.revision.flowId,
@@ -122857,7 +123630,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
122857
123630
  readOnly,
122858
123631
  groups: true,
122859
123632
  layout: "ports",
122860
- title: t("inspector.ports.outputsTitle"),
123633
+ title: t(isHttpRequest ? "httpRequest.responseOutputs" : "inspector.ports.outputsTitle"),
122861
123634
  output: true,
122862
123635
  values: presentDecisionOutputs(selection.definition, t),
122863
123636
  disabled: disabled || !("moduleId" in selection.node.task || isAgent),