@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
package/README.md CHANGED
@@ -77,6 +77,7 @@ Source paths are not public import APIs. Source maps and declaration maps are no
77
77
  | `@oomol-lab/open-flow/control-requests` | [src/control/common/requests.ts](src/control/common/requests.ts) |
78
78
  | `@oomol-lab/open-flow/decision` | [src/decision/common/decision.ts](src/decision/common/decision.ts) |
79
79
  | `@oomol-lab/open-flow/openapi` | [src/openapi/common/openapi.ts](src/openapi/common/openapi.ts) |
80
+ | `@oomol-lab/open-flow/http-request` | [src/http/common/httpRequest.ts](src/http/common/httpRequest.ts) |
80
81
 
81
82
  ## License
82
83
 
@@ -11481,7 +11481,8 @@ var extra_icon_default = {
11481
11481
  "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>",
11482
11482
  "width": 24,
11483
11483
  "height": 24
11484
- }
11484
+ },
11485
+ "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>" }
11485
11486
  },
11486
11487
  "width": 24,
11487
11488
  "height": 24
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
2
- import { $ as ko_default, B as MenuPopup, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, F as findRootOwnerId, G as MenuRootContext, H as MenuGroup, J as waitBranchDescription, K as useMenuRootContext, L as MenuRoot, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, Q as ru_default, R as MenuPositioner, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, U as ContextMenuRootContext, V as MenuItem, W as useContextMenuRootContext, X as zh_TW_default, Z as zh_CN_default, _ as NativeScrollArea, at as Checkbox, d as PopoverContent, et as ja_default, g as PopoverTrigger, h as PopoverTitle, k as DropdownMenuSeparator, l as wrapLayout, nt as en_default, q as uiLocales, rt as I18n, st as IconThemeContext, t as ContentIcon, tt as fr_default, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, z as MenuPortal } from "./ContentIcon-CUQHjQIw.js";
2
+ import { $ as ko_default, B as MenuPopup, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, F as findRootOwnerId, G as MenuRootContext, H as MenuGroup, J as waitBranchDescription, K as useMenuRootContext, L as MenuRoot, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, Q as ru_default, R as MenuPositioner, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, U as ContextMenuRootContext, V as MenuItem, W as useContextMenuRootContext, X as zh_TW_default, Z as zh_CN_default, _ as NativeScrollArea, at as Checkbox, d as PopoverContent, et as ja_default, g as PopoverTrigger, h as PopoverTitle, k as DropdownMenuSeparator, l as wrapLayout, nt as en_default, q as uiLocales, rt as I18n, st as IconThemeContext, t as ContentIcon, tt as fr_default, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, z as MenuPortal } from "./ContentIcon-FCpKiwjp.js";
3
3
  import { a as derive, c as strictEqual, i as compute, l as val, n as attachSetter, r as combine, s as readonlyVal } from "./dist-bO8nvHFH.js";
4
4
  import { c as useLang, i as isString, l as useTranslate, n as isBoolean, o as I18nProvider, r as isPlainObject, t as isArray$1, u as useVal } from "./dist-BFmpkX4P.js";
5
5
  import { $t as require_with_selector, A as string, An as ownerDocument, C as literal, Cr as useRenderElement, Mn as createLucideIcon, Sr as clsx, T as number, Tn as getTarget, Un as cancelOpen, Vn as createChangeEventDetails, an as useTimeout, ar as triggerPress, bn as stopEvent$1, br as cn$1, fr as useId$1, ft as pressableTriggerOpenStateMapping, i as TooltipTrigger, k as strictObject, n as TooltipContent, p as timeZoneOffsetMinutes, qt as addEventListener, r as TooltipProvider, t as Tooltip, vr as Button, wn as contains, y as discriminatedUnion } from "./tooltip-wZJRB9oP.js";
@@ -1,7 +1,7 @@
1
1
  import { l as useTranslate } from "./dist-BFmpkX4P.js";
2
2
  import { vr as Button } from "./tooltip-wZJRB9oP.js";
3
- import { Vt as Input, a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, i as DialogDescription, l as Icon, m as FieldGroup, n as DialogClose, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner } from "./dialog-BYJGvItc.js";
4
- import { t as WorkbenchSelect } from "./workbenchSelect-BcWPWGzw.js";
3
+ import { Qt as Input, a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, i as DialogDescription, l as Icon, m as FieldGroup, n as DialogClose, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner } from "./dialog-ZtpsFbl4.js";
4
+ import { t as WorkbenchSelect } from "./workbenchSelect-M441Lz0d.js";
5
5
  import { useEffect, useRef, useState } from "react";
6
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
@@ -6437,14 +6437,287 @@ function decisionTask(questions = [defaultDecisionQuestion()], name = "AI Decisi
6437
6437
  };
6438
6438
  }
6439
6439
  //#endregion
6440
- //#region src/openapi/common/authBindings.ts
6440
+ //#region src/http/common/authBindings.ts
6441
6441
  /** Never allow credentials to enter a Revision as literal node inputs. */
6442
- function assertOpenApiAuthBindings(document) {
6442
+ function assertHttpAuthBindings(document) {
6443
6443
  for (const node of Object.values(document.graph.nodes)) {
6444
- if (node.kind != "task" || !("executor" in node.task) || node.task.executor.kind != "openapi") continue;
6445
- 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.");
6444
+ if (node.kind != "task" || !("executor" in node.task) || !["openapi", "http-request"].includes(node.task.executor.kind)) continue;
6445
+ 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.");
6446
6446
  }
6447
6447
  }
6448
+ //#endregion
6449
+ //#region src/flow/common/portChanges.ts
6450
+ function renamedPort(previous, next) {
6451
+ const previousNames = new Set(previous.flatMap((port) => "handle" in port ? [port.handle] : []));
6452
+ const nextNames = new Set(next.flatMap((port) => "handle" in port ? [port.handle] : []));
6453
+ const removed = [...previousNames].filter((name) => !nextNames.has(name));
6454
+ const added = [...nextNames].filter((name) => !previousNames.has(name));
6455
+ return removed.length == 1 && added.length == 1 ? [removed[0], added[0]] : void 0;
6456
+ }
6457
+ function renameOutputMapping(mapping, nodeIds, rename) {
6458
+ if (rename == null || mapping.kind != "sources") return mapping;
6459
+ const sources = mapping.sources.map((source) => source.kind == "node" && !source.system && nodeIds.has(source.nodeId) && source.output == rename[0] ? {
6460
+ ...source,
6461
+ output: rename[1]
6462
+ } : source);
6463
+ return sources.every((source, index) => source === mapping.sources[index]) ? mapping : {
6464
+ kind: "sources",
6465
+ sources
6466
+ };
6467
+ }
6468
+ /** Carry saved mappings through a field rename and remove only fields absent from the new contract. */
6469
+ function remapInputMappings(mappings, ports, rename) {
6470
+ const inputs = { ...mappings };
6471
+ if (rename != null && Object.hasOwn(inputs, rename[0])) {
6472
+ Object.defineProperty(inputs, rename[1], {
6473
+ value: inputs[rename[0]],
6474
+ enumerable: true,
6475
+ configurable: true,
6476
+ writable: true
6477
+ });
6478
+ delete inputs[rename[0]];
6479
+ }
6480
+ const names = new Set(ports.flatMap((port) => "handle" in port ? [port.handle] : []));
6481
+ for (const name of Object.keys(inputs)) if (!names.has(name)) delete inputs[name];
6482
+ return inputs;
6483
+ }
6484
+ //#endregion
6485
+ //#region src/http/common/headers.ts
6486
+ /** Header names are case-insensitive; never silently combine duplicate business fields. */
6487
+ function httpHeaderNameIssue(name, names) {
6488
+ if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
6489
+ if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
6490
+ }
6491
+ //#endregion
6492
+ //#region src/http/common/httpRequest.ts
6493
+ var parameterSchema = strictObject({
6494
+ mode: _enum(["fields", "object"]).default("fields"),
6495
+ names: array(string()).default([])
6496
+ });
6497
+ var httpRequestConfigSchema = strictObject({
6498
+ method: _enum([
6499
+ "GET",
6500
+ "POST",
6501
+ "PUT",
6502
+ "PATCH",
6503
+ "DELETE",
6504
+ "HEAD",
6505
+ "OPTIONS"
6506
+ ]).default("GET"),
6507
+ query: parameterSchema.default({
6508
+ mode: "fields",
6509
+ names: []
6510
+ }),
6511
+ headers: parameterSchema.default({
6512
+ mode: "fields",
6513
+ names: []
6514
+ }),
6515
+ bodyFormat: _enum([
6516
+ "none",
6517
+ "json",
6518
+ "text",
6519
+ "form"
6520
+ ]).default("none"),
6521
+ authentication: union([
6522
+ strictObject({ type: literal("none") }),
6523
+ strictObject({ type: _enum(["bearer", "basic"]) }),
6524
+ strictObject({
6525
+ type: literal("apiKey"),
6526
+ name: string(),
6527
+ in: _enum(["header", "query"])
6528
+ })
6529
+ ]).default({ type: "none" }),
6530
+ responseFormat: _enum([
6531
+ "auto",
6532
+ "json",
6533
+ "text"
6534
+ ]).default("auto"),
6535
+ statusPolicy: _enum(["success", "all"]).default("success")
6536
+ });
6537
+ var httpRequestExecutorSchema = httpRequestConfigSchema.extend({ kind: literal("http-request") });
6538
+ var scalarSchema = { type: [
6539
+ "string",
6540
+ "number",
6541
+ "boolean"
6542
+ ] };
6543
+ var queryValueSchema = { anyOf: [scalarSchema, {
6544
+ type: "array",
6545
+ items: scalarSchema
6546
+ }] };
6547
+ var httpHeaderSchema = {
6548
+ type: "object",
6549
+ additionalProperties: { type: "string" }
6550
+ };
6551
+ var httpQuerySchema = {
6552
+ type: "object",
6553
+ additionalProperties: queryValueSchema
6554
+ };
6555
+ function httpAuthHandles(config) {
6556
+ return config.authentication.type == "none" ? [] : config.authentication.type == "basic" ? ["auth.username", "auth.password"] : ["auth.token"];
6557
+ }
6558
+ function retain(ports, old) {
6559
+ const remaining = new Map(ports.map((port) => [port.handle, port]));
6560
+ return [...old.flatMap((item) => {
6561
+ if ("group" in item) return [item];
6562
+ const next = remaining.get(item.handle);
6563
+ if (next == null) return [];
6564
+ remaining.delete(item.handle);
6565
+ return [dequal(item.jsonSchema, next.jsonSchema) && item.nullable == next.nullable ? item : next];
6566
+ }), ...remaining.values()];
6567
+ }
6568
+ function httpRequestTask(config = httpRequestConfigSchema.parse({}), name = "HTTP Request", previous) {
6569
+ const inputs = [{
6570
+ handle: "url",
6571
+ jsonSchema: { type: "string" },
6572
+ nullable: false
6573
+ }];
6574
+ for (const group of ["query", "headers"]) if (config[group].mode == "object") inputs.push({
6575
+ handle: group,
6576
+ jsonSchema: group == "query" ? httpQuerySchema : httpHeaderSchema,
6577
+ nullable: true
6578
+ });
6579
+ else for (const parameterName of config[group].names.filter((value) => value.trim())) inputs.push({
6580
+ handle: `${group == "query" ? "query" : "header"}.${parameterName}`,
6581
+ jsonSchema: group == "query" ? queryValueSchema : { type: "string" },
6582
+ nullable: true
6583
+ });
6584
+ if (config.bodyFormat != "none") inputs.push({
6585
+ handle: "body",
6586
+ jsonSchema: config.bodyFormat == "json" ? {} : config.bodyFormat == "text" ? { type: "string" } : httpQuerySchema,
6587
+ nullable: config.bodyFormat == "json"
6588
+ });
6589
+ inputs.push(...httpAuthHandles(config).map((handle) => ({
6590
+ handle,
6591
+ jsonSchema: { type: "string" },
6592
+ nullable: false
6593
+ })));
6594
+ const outputs = [
6595
+ {
6596
+ handle: "body",
6597
+ jsonSchema: config.responseFormat == "text" ? { type: "string" } : {},
6598
+ nullable: true
6599
+ },
6600
+ {
6601
+ handle: "statusCode",
6602
+ jsonSchema: { type: "integer" },
6603
+ nullable: false
6604
+ },
6605
+ {
6606
+ handle: "headers",
6607
+ jsonSchema: httpHeaderSchema,
6608
+ nullable: false
6609
+ }
6610
+ ];
6611
+ return {
6612
+ name,
6613
+ executor: {
6614
+ ...config,
6615
+ kind: "http-request"
6616
+ },
6617
+ inputs: retain(inputs, previous?.inputs ?? []),
6618
+ outputs: retain(outputs, previous?.outputs ?? [])
6619
+ };
6620
+ }
6621
+ function httpRequestIssues(config) {
6622
+ const issues = [];
6623
+ if (["GET", "HEAD"].includes(config.method) && config.bodyFormat != "none") issues.push({
6624
+ field: "bodyFormat",
6625
+ code: "bodyUnsupported",
6626
+ message: "GET and HEAD do not support a request body."
6627
+ });
6628
+ for (const group of ["query", "headers"]) {
6629
+ if (config[group].mode != "fields") continue;
6630
+ const seen = /* @__PURE__ */ new Set();
6631
+ for (const [index, name] of config[group].names.entries()) {
6632
+ const key = group == "headers" ? name.toLowerCase() : name;
6633
+ if (!name.trim() || seen.has(key)) issues.push({
6634
+ field: group,
6635
+ index,
6636
+ code: "parameterNamesInvalid",
6637
+ message: "Parameter names must be nonempty and unique."
6638
+ });
6639
+ seen.add(key);
6640
+ if (group == "headers" && httpHeaderNameIssue(name, []) === "invalid") issues.push({
6641
+ field: group,
6642
+ index,
6643
+ code: "headerNameInvalid",
6644
+ message: "Invalid HTTP header name."
6645
+ });
6646
+ }
6647
+ }
6648
+ const auth = config.authentication;
6649
+ if (auth.type != "none") {
6650
+ const group = auth.type == "apiKey" && auth.in == "query" ? "query" : "headers";
6651
+ const name = auth.type == "apiKey" ? auth.name : "authorization";
6652
+ if (!name.trim()) issues.push({
6653
+ field: "authentication",
6654
+ code: "keyNameRequired",
6655
+ message: "API Key requires a name."
6656
+ });
6657
+ if (group == "headers" && name.trim() && httpHeaderNameIssue(name, []) === "invalid") issues.push({
6658
+ field: "authentication",
6659
+ code: "headerNameInvalid",
6660
+ message: "Invalid authentication header name."
6661
+ });
6662
+ if (config[group].mode == "fields" && config[group].names.some((item) => group == "headers" ? item.toLowerCase() == name.toLowerCase() : item == name)) issues.push({
6663
+ field: "authentication",
6664
+ code: "authConflict",
6665
+ message: "Authentication conflicts with a request parameter."
6666
+ });
6667
+ }
6668
+ return issues;
6669
+ }
6670
+ /** Only a named parameter rename carries a value; changing source modes is not a rename. */
6671
+ function httpRequestInputs(mappings, previous, next) {
6672
+ const candidate = renamedPort(previous.inputs, next.inputs);
6673
+ const rename = candidate != null && ["query.", "header."].some((prefix) => candidate.every((name) => name.startsWith(prefix))) ? candidate : void 0;
6674
+ return remapInputMappings(mappings, next.inputs, rename);
6675
+ }
6676
+ /** The object editor assembles named inputs without changing unrelated request settings. */
6677
+ function withHttpParameterFields(node, group, values) {
6678
+ if (!("executor" in node.task) || node.task.executor.kind !== "http-request") return node;
6679
+ const config = node.task.executor;
6680
+ const task = httpRequestTask({
6681
+ ...config,
6682
+ [group]: {
6683
+ mode: "fields",
6684
+ names: Object.keys(values)
6685
+ }
6686
+ }, node.task.name, node.task);
6687
+ const inputs = httpRequestInputs(node.inputs, node.task, task);
6688
+ const rename = renamedPort(node.task.inputs, task.inputs);
6689
+ for (const [name, value] of Object.entries(values)) {
6690
+ const handle = `${group === "query" ? "query" : "header"}.${name}`;
6691
+ const existing = config[group].mode === "fields" && (config[group].names.includes(name) || rename?.[1] === handle);
6692
+ if (inputs[handle] == null && !existing) inputs[handle] = {
6693
+ kind: "value",
6694
+ value
6695
+ };
6696
+ }
6697
+ return {
6698
+ ...node,
6699
+ task,
6700
+ inputs
6701
+ };
6702
+ }
6703
+ function withHttpParameterSource(node, group, mapping) {
6704
+ if (!("executor" in node.task) || node.task.executor.kind !== "http-request") return node;
6705
+ const task = httpRequestTask({
6706
+ ...node.task.executor,
6707
+ [group]: {
6708
+ mode: "object",
6709
+ names: []
6710
+ }
6711
+ }, node.task.name, node.task);
6712
+ const inputs = httpRequestInputs(node.inputs, node.task, task);
6713
+ if (mapping == null) delete inputs[group];
6714
+ else inputs[group] = mapping;
6715
+ return {
6716
+ ...node,
6717
+ task,
6718
+ inputs
6719
+ };
6720
+ }
6448
6721
  function checkJsonDepth(value, depth = 0) {
6449
6722
  if (depth > 64) throw new TypeError("Value exceeds the maximum JSON depth.");
6450
6723
  if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
@@ -6455,6 +6728,7 @@ var retryNodeTypes = [
6455
6728
  "code",
6456
6729
  "connector",
6457
6730
  "openapi",
6731
+ "http-request",
6458
6732
  "llm",
6459
6733
  "decision"
6460
6734
  ];
@@ -6552,11 +6826,6 @@ function workflowOutputsPort(outputs) {
6552
6826
  nullable: false
6553
6827
  };
6554
6828
  }
6555
- /** Header names are case-insensitive; never silently combine duplicate business fields. */
6556
- function webhookHeaderNameIssue(name, names) {
6557
- if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
6558
- if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
6559
- }
6560
6829
  /** Fixed inputs belong to the node, not author-supplied definitions. */
6561
6830
  var webhookResponseInputs = [
6562
6831
  {
@@ -6769,7 +7038,8 @@ var managedFields = object({
6769
7038
  kind: literal("workflow"),
6770
7039
  flowId: text,
6771
7040
  revisionId: text
6772
- })
7041
+ }),
7042
+ httpRequestExecutorSchema
6773
7043
  ])
6774
7044
  });
6775
7045
  var managed = managedFields.transform(limitDecisionTask);
@@ -7069,7 +7339,7 @@ function decodeRevisionContent(value) {
7069
7339
  checkJsonDepth(value);
7070
7340
  const content = revision.parse(value);
7071
7341
  checkModelVersion(content);
7072
- assertOpenApiAuthBindings(content.document);
7342
+ assertHttpAuthBindings(content.document);
7073
7343
  return content;
7074
7344
  }
7075
7345
  var shapes = {
@@ -7240,6 +7510,7 @@ var variants = new Map(Object.entries(shapes).map(([kind, shape]) => [kind, shap
7240
7510
  })]));
7241
7511
  array(union([...variants.values()])).min(1);
7242
7512
  function checkModelVersion(content) {
7513
+ 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.");
7243
7514
  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.");
7244
7515
  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.");
7245
7516
  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.");
@@ -8140,7 +8411,7 @@ function applyFlowChanges(content, operations) {
8140
8411
  break;
8141
8412
  }
8142
8413
  }
8143
- assertOpenApiAuthBindings(document);
8414
+ assertHttpAuthBindings(document);
8144
8415
  return upgradeDecodedRevisionContent({
8145
8416
  document,
8146
8417
  modelVersion: 11,
@@ -9044,4 +9315,4 @@ function DialogDescription({ className, ...props }) {
9044
9315
  });
9045
9316
  }
9046
9317
  //#endregion
9047
- export { workflowOutputsPort as $, clearConditionBindings as A, resolveAriaLabelledBy as At, agentToolFields as B, Label as Bt, resourceNameIssue as C, SelectChevron as Ct, nodeErrorSchema as D, SelectSeparator as Dt, workflowToolNameIssue as E, SelectItem as Et, operandHandle as F, compareItemEquality as Ft, workflowAgentToolSchema as G, connectorAgentToolSchema as H, useLabelableId as Ht, operatorsForType as I, defaultItemEquality as It, webhookHeadersPort as J, webhookHeaderNameIssue as K, otherwiseOutput as L, findItemIndex as Lt, conditionInputPorts as M, isGroupedItems as Mt, mapConditionSources as N, stringifyAsLabel as Nt, nodeSystemOutputPorts as O, SelectTrigger as Ot, nodeInputMappings as P, stringifyAsValue as Pt, webhookStatusCodePort as Q, unaryOperator as R, removeItem as Rt, portsByHandle as S, Select as St, upgradeRevisionContent as T, SelectGroup as Tt, connectorCapabilitySchema as U, ChevronDown as Ut, authoringDefinitionSchemas as V, Input as Vt, decodeRevisionContent as W, webhookResponseInputs as X, webhookResponseAllowsBody as Y, webhookResponseTimeout as Z, applyFlowChanges as _, schemaObject as _t, DialogFooter as a, checkJsonDepth as at, nodeNameIssue as b, format as bt, DialogTrigger as c, decisionQuestionIssues as ct, Field as d, limitDecisionQuestions as dt, waitAutoContinueSchema as et, FieldDescription as f, webhookMethods as ft, FlowChangeError as g, portsAssignable as gt, FieldLabel as h, matchesSchema as ht, DialogDescription as i, supportsNodeRetry as it, comparisonIssue as j, hasNullItemLabel as jt, supportsNodeErrorHandling as k, SelectValue as kt, Icon as l, decisionTask as lt, FieldGroup as m, comparePorts as mt, DialogClose as n, nodeRetryLimits as nt, DialogHeader as o, decisionLimits as ot, FieldError as p, webhookSupportsBody as pt, webhookHeaderValuePort as q, DialogContent as r, retryConfigurationSchema as rt, DialogTitle as s, decisionModel as st, Dialog as t, defaultNodeRetry as tt, Spinner as u, defaultDecisionQuestion as ut, isTriggerNode as v, variableInputCompatible as vt, upgradeManualTrigger as w, SelectContent as wt, normalizeNodeName as x, dequal as xt, nextNodeName as y, isSchemaKeyword as yt, valueType as z, selectedValueIncludes as zt };
9318
+ export { waitAutoContinueSchema as $, useLabelableId as $t, clearConditionBindings as A, isSchemaKeyword as At, agentToolFields as B, SelectValue as Bt, resourceNameIssue as C, webhookMethods as Ct, nodeErrorSchema as D, portsAssignable as Dt, workflowToolNameIssue as E, matchesSchema as Et, operandHandle as F, SelectContent as Ft, workflowAgentToolSchema as G, stringifyAsValue as Gt, connectorAgentToolSchema as H, hasNullItemLabel as Ht, operatorsForType as I, SelectGroup as It, webhookResponseAllowsBody as J, findItemIndex as Jt, webhookHeaderValuePort as K, compareItemEquality as Kt, otherwiseOutput as L, SelectItem as Lt, conditionInputPorts as M, dequal as Mt, mapConditionSources as N, Select as Nt, nodeSystemOutputPorts as O, schemaObject as Ot, nodeInputMappings as P, SelectChevron as Pt, workflowOutputsPort as Q, Input as Qt, unaryOperator as R, SelectSeparator as Rt, portsByHandle as S, limitDecisionQuestions as St, upgradeRevisionContent as T, comparePorts as Tt, connectorCapabilitySchema as U, isGroupedItems as Ut, authoringDefinitionSchemas as V, resolveAriaLabelledBy as Vt, decodeRevisionContent as W, stringifyAsLabel as Wt, webhookResponseTimeout as X, selectedValueIncludes as Xt, webhookResponseInputs as Y, removeItem as Yt, webhookStatusCodePort as Z, Label as Zt, applyFlowChanges as _, decisionLimits as _t, DialogFooter as a, httpHeaderSchema as at, nodeNameIssue as b, decisionTask as bt, DialogTrigger as c, httpRequestInputs as ct, Field as d, withHttpParameterFields as dt, ChevronDown as en, defaultNodeRetry as et, FieldDescription as f, withHttpParameterSource as ft, FlowChangeError as g, renamedPort as gt, FieldLabel as h, renameOutputMapping as ht, DialogDescription as i, checkJsonDepth as it, comparisonIssue as j, format as jt, supportsNodeErrorHandling as k, variableInputCompatible as kt, Icon as l, httpRequestIssues as lt, FieldGroup as m, remapInputMappings as mt, DialogClose as n, retryConfigurationSchema as nt, DialogHeader as o, httpQuerySchema as ot, FieldError as p, httpHeaderNameIssue as pt, webhookHeadersPort as q, defaultItemEquality as qt, DialogContent as r, supportsNodeRetry as rt, DialogTitle as s, httpRequestConfigSchema as st, Dialog as t, nodeRetryLimits as tt, Spinner as u, httpRequestTask as ut, isTriggerNode as v, decisionModel as vt, upgradeManualTrigger as w, webhookSupportsBody as wt, normalizeNodeName as x, defaultDecisionQuestion as xt, nextNodeName as y, decisionQuestionIssues as yt, valueType as z, SelectTrigger as zt };
@@ -1,5 +1,5 @@
1
- import { n as IconImageCrossOriginContext, o as IconifyProvider } from "./ContentIcon-CUQHjQIw.js";
2
- import { t as FlowCanvas, v as CanvasStore } from "./FlowCanvas-Dtf8_cQp.js";
1
+ import { n as IconImageCrossOriginContext, o as IconifyProvider } from "./ContentIcon-FCpKiwjp.js";
2
+ import { t as FlowCanvas, v as CanvasStore } from "./FlowCanvas-dzRBnlUT.js";
3
3
  import { createElement } from "react";
4
4
  import { createRoot } from "react-dom/client";
5
5
  //#region ../../node_modules/.bun/html-to-image@1.11.11/node_modules/html-to-image/es/util.js