@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
@@ -1,9 +1,9 @@
1
1
  import { o as __toESM, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
2
- import { $ as ko_default$2, Q as ru_default$2, T as DropdownMenuItem, X as zh_TW_default$2, Y as waitBranchLocales, Z as zh_CN_default$2, a as spriteIcon, at as Checkbox, et as ja_default$2, i as initialsIcon, it as providerIconAppearance, l as wrapLayout, nt as en_default$2, q as uiLocales, r as imageIcon, rt as I18n, tt as fr_default$2 } from "./ContentIcon-CUQHjQIw.js";
2
+ import { $ as ko_default$2, Q as ru_default$2, T as DropdownMenuItem, X as zh_TW_default$2, Y as waitBranchLocales, Z as zh_CN_default$2, a as spriteIcon, at as Checkbox, et as ja_default$2, i as initialsIcon, it as providerIconAppearance, l as wrapLayout, nt as en_default$2, q as uiLocales, r as imageIcon, rt as I18n, tt as fr_default$2 } from "./ContentIcon-FCpKiwjp.js";
3
3
  import { a as derive, i as compute, l as val, t as arrayShallowEqual } from "./dist-bO8nvHFH.js";
4
4
  import { a as toPlainObject, l as useTranslate, o as I18nProvider } from "./dist-BFmpkX4P.js";
5
5
  import { A as string$1, C as literal, Cr as useRenderElement, E as object$1, M as unknown, Nr as mergeProps, O as record$2, S as lazy$1, T as number, _ as array, b as int, br as cn, g as _enum, i as TooltipTrigger, j as union, k as strictObject, n as TooltipContent, p as timeZoneOffsetMinutes, t as Tooltip, v as boolean, vr as Button, x as json$2, xr as cva, y as discriminatedUnion, yr as buttonVariants } from "./tooltip-wZJRB9oP.js";
6
- import { $ as workflowOutputsPort, A as clearConditionBindings, B as agentToolFields, Bt as Label, Et as SelectItem, G as workflowAgentToolSchema, H as connectorAgentToolSchema, J as webhookHeadersPort, K as webhookHeaderNameIssue, L as otherwiseOutput, M as conditionInputPorts, O as nodeSystemOutputPorts, Ot as SelectTrigger, P as nodeInputMappings, Q as webhookStatusCodePort, S as portsByHandle, St as Select, Tt as SelectGroup, U as connectorCapabilitySchema, V as authoringDefinitionSchemas, Vt as Input, W as decodeRevisionContent, X as webhookResponseInputs, Y as webhookResponseAllowsBody, _ as applyFlowChanges$1, _t as schemaObject, at as checkJsonDepth, bt as format, gt as portsAssignable, ht as matchesSchema, kt as SelectValue, lt as decisionTask, mt as comparePorts, pt as webhookSupportsBody, q as webhookHeaderValuePort, rt as retryConfigurationSchema, v as isTriggerNode, wt as SelectContent, x as normalizeNodeName, xt as dequal$1, y as nextNodeName, yt as isSchemaKeyword } from "./dialog-BYJGvItc.js";
6
+ import { A as clearConditionBindings, At as isSchemaKeyword, B as agentToolFields, Bt as SelectValue, Dt as portsAssignable, Et as matchesSchema, Ft as SelectContent, G as workflowAgentToolSchema, H as connectorAgentToolSchema, It as SelectGroup, J as webhookResponseAllowsBody, K as webhookHeaderValuePort, L as otherwiseOutput, Lt as SelectItem, M as conditionInputPorts, Mt as dequal$1, Nt as Select, O as nodeSystemOutputPorts, Ot as schemaObject, P as nodeInputMappings, Q as workflowOutputsPort, Qt as Input, S as portsByHandle, Tt as comparePorts, U as connectorCapabilitySchema, V as authoringDefinitionSchemas, W as decodeRevisionContent, Y as webhookResponseInputs, Z as webhookStatusCodePort, Zt as Label, _ as applyFlowChanges$1, bt as decisionTask, ct as httpRequestInputs, dt as withHttpParameterFields, ft as withHttpParameterSource, gt as renamedPort, ht as renameOutputMapping, it as checkJsonDepth, jt as format, mt as remapInputMappings, nt as retryConfigurationSchema, pt as httpHeaderNameIssue, q as webhookHeadersPort, st as httpRequestConfigSchema, ut as httpRequestTask, v as isTriggerNode, wt as webhookSupportsBody, x as normalizeNodeName, y as nextNodeName, zt as SelectTrigger } from "./dialog-ZtpsFbl4.js";
7
7
  import { a as uiLanguages, n as isUiLanguage, r as resolveUiLanguage } from "./languages-gYzoQqCi.js";
8
8
  import "./lib-Dws05GHj.js";
9
9
  import { i as objectValue, s as valueType, t as initialValue } from "./value-BbFQZZ_V.js";
@@ -887,6 +887,7 @@ var type = _enum([
887
887
  "llm",
888
888
  "decision",
889
889
  "openapi",
890
+ "http-request",
890
891
  "condition",
891
892
  "value",
892
893
  "wait",
@@ -1012,6 +1013,7 @@ var authoringConfigurations = {
1012
1013
  }),
1013
1014
  "connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
1014
1015
  "openapi": authoringOpenApiSchema,
1016
+ "http-request": httpRequestConfigSchema,
1015
1017
  "agent": authoringDefinitionSchemas.agent.omit({
1016
1018
  prompt: true,
1017
1019
  tools: true
@@ -2549,7 +2551,7 @@ function webhookResponseDiagnostics(graph, triggerId, path = `/document/graph/no
2549
2551
  if (headersSource == null) for (const [headers, location] of [[options.responseHeaders, `${path}/options/responseHeaders`], [headerOutputs, headersPath]]) {
2550
2552
  const names = [];
2551
2553
  for (const name of Object.keys(headers ?? {})) {
2552
- if (webhookHeaderNameIssue(name, names) != null) diagnostics.push(graphDiagnostic("trigger.webhook-response-header-name", "Use valid, unique HTTP header names.", location));
2554
+ if (httpHeaderNameIssue(name, names) != null) diagnostics.push(graphDiagnostic("trigger.webhook-response-header-name", "Use valid, unique HTTP header names.", location));
2553
2555
  names.push(name);
2554
2556
  }
2555
2557
  }
@@ -2820,9 +2822,9 @@ function checkInputSources(graph, target, handle, sources) {
2820
2822
  };
2821
2823
  }
2822
2824
  /** Enumerate structurally available outputs while retaining their compatibility with one input. */
2823
- function inputSourceCandidates(graph, target, handle) {
2825
+ function inputSourceCandidates(graph, target, handle, inputPort) {
2824
2826
  const targetNode = graph.nodes[target];
2825
- const input = targetNode == null ? void 0 : nodeInputPorts(targetNode)[handle];
2827
+ const input = inputPort ?? (targetNode == null ? void 0 : nodeInputPorts(targetNode)[handle]);
2826
2828
  if (input == null) return {};
2827
2829
  const analysis = graphPaths(graph);
2828
2830
  return Object.fromEntries([...analysis.ancestors.get(target) ?? []].flatMap((nodeId) => {
@@ -3779,7 +3781,7 @@ function decodeRunEvent(value) {
3779
3781
  switch (kind) {
3780
3782
  case "node.started": {
3781
3783
  const nodeKind = payload.nodeKind;
3782
- if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
3784
+ if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
3783
3785
  return {
3784
3786
  ...base,
3785
3787
  kind,
@@ -7058,6 +7060,38 @@ var resources = {
7058
7060
  "aliasInvalid": "Use a unique call name of 1–64 characters, starting with a letter and containing only letters, numbers, underscores or hyphens.",
7059
7061
  "connector": "Connector",
7060
7062
  "workflow": "Workflow"
7063
+ },
7064
+ httpRequest: {
7065
+ "title": "HTTP Request",
7066
+ "description": "Send an HTTP request and use its response in the workflow.",
7067
+ "method": "Method",
7068
+ "query": "Query parameters",
7069
+ "headers": "Request headers",
7070
+ "bodyFormat": "Request body format",
7071
+ "none": "None",
7072
+ "text": "Text",
7073
+ "authentication": "Authentication",
7074
+ "location": "Location",
7075
+ "keyName": "Key name",
7076
+ "responseFormat": "Response format",
7077
+ "auto": "Auto",
7078
+ "statusPolicy": "Accepted status codes",
7079
+ "success": "2xx",
7080
+ "all": "All status codes",
7081
+ "saveFailed": "Unable to save request settings.",
7082
+ "retry": "Retry",
7083
+ "bodyUnsupported": "GET and HEAD do not support a request body.",
7084
+ "parameterNamesInvalid": "Parameter names must be nonempty and unique.",
7085
+ "headerNameInvalid": "Invalid HTTP header name.",
7086
+ "keyNameRequired": "Enter an API Key name.",
7087
+ "authConflict": "Authentication conflicts with a request parameter.",
7088
+ "body": "Request body",
7089
+ "username": "Username",
7090
+ "password": "Password",
7091
+ "keyValue": "Key value",
7092
+ "responseOutputs": "Response outputs",
7093
+ "authenticationType": "Type",
7094
+ "responseSettings": "Response settings"
7061
7095
  }
7062
7096
  },
7063
7097
  "zh-CN": {
@@ -8549,6 +8583,38 @@ var resources = {
8549
8583
  "aliasInvalid": "调用名称不能重复,长度为 1–64 个字符,以英文字母开头,仅包含英文字母、数字、下划线或连字符。",
8550
8584
  "connector": "连接器",
8551
8585
  "workflow": "工作流"
8586
+ },
8587
+ httpRequest: {
8588
+ "title": "HTTP 请求",
8589
+ "description": "发送 HTTP 请求,在工作流中使用响应数据。",
8590
+ "method": "请求方法",
8591
+ "query": "查询参数",
8592
+ "headers": "请求头",
8593
+ "bodyFormat": "请求体格式",
8594
+ "none": "无",
8595
+ "text": "文本",
8596
+ "authentication": "认证",
8597
+ "location": "位置",
8598
+ "keyName": "密钥名称",
8599
+ "responseFormat": "响应格式",
8600
+ "auto": "自动",
8601
+ "statusPolicy": "接受的状态码",
8602
+ "success": "2xx",
8603
+ "all": "所有状态码",
8604
+ "saveFailed": "无法保存请求配置。",
8605
+ "retry": "重试",
8606
+ "bodyUnsupported": "GET 和 HEAD 不支持请求体。",
8607
+ "parameterNamesInvalid": "参数名称不能为空或重复。",
8608
+ "headerNameInvalid": "HTTP 请求头名称无效。",
8609
+ "keyNameRequired": "请填写 API Key 名称。",
8610
+ "authConflict": "认证与请求参数冲突。",
8611
+ "body": "请求体",
8612
+ "username": "用户名",
8613
+ "password": "密码",
8614
+ "keyValue": "密钥值",
8615
+ "responseOutputs": "响应输出",
8616
+ "authenticationType": "认证方式",
8617
+ "responseSettings": "响应配置"
8552
8618
  }
8553
8619
  },
8554
8620
  "zh-TW": {
@@ -10040,6 +10106,38 @@ var resources = {
10040
10106
  "aliasInvalid": "呼叫名稱不能重複,長度為 1–64 個字元,以英文字母開頭,僅包含英文字母、數字、底線或連字號。",
10041
10107
  "connector": "連接器",
10042
10108
  "workflow": "工作流程"
10109
+ },
10110
+ httpRequest: {
10111
+ "title": "HTTP 請求",
10112
+ "description": "傳送 HTTP 請求,在工作流程中使用回應資料。",
10113
+ "method": "請求方法",
10114
+ "query": "查詢參數",
10115
+ "headers": "請求標頭",
10116
+ "bodyFormat": "請求本文格式",
10117
+ "none": "無",
10118
+ "text": "文字",
10119
+ "authentication": "驗證",
10120
+ "location": "位置",
10121
+ "keyName": "金鑰名稱",
10122
+ "responseFormat": "回應格式",
10123
+ "auto": "自動",
10124
+ "statusPolicy": "接受的狀態碼",
10125
+ "success": "2xx",
10126
+ "all": "所有狀態碼",
10127
+ "saveFailed": "無法儲存請求設定。",
10128
+ "retry": "重試",
10129
+ "bodyUnsupported": "GET 和 HEAD 不支援請求本文。",
10130
+ "parameterNamesInvalid": "參數名稱不可為空或重複。",
10131
+ "headerNameInvalid": "HTTP 請求標頭名稱無效。",
10132
+ "keyNameRequired": "請填寫 API Key 名稱。",
10133
+ "authConflict": "驗證與請求參數衝突。",
10134
+ "body": "請求本文",
10135
+ "username": "使用者名稱",
10136
+ "password": "密碼",
10137
+ "keyValue": "金鑰值",
10138
+ "responseOutputs": "回應輸出",
10139
+ "authenticationType": "驗證方式",
10140
+ "responseSettings": "回應設定"
10043
10141
  }
10044
10142
  },
10045
10143
  "ja": {
@@ -11288,6 +11386,38 @@ var resources = {
11288
11386
  "aliasInvalid": "呼び出し名は重複しない1~64文字で、英字で始まり、英数字、アンダースコア、ハイフンのみを使用してください。",
11289
11387
  "connector": "コネクター",
11290
11388
  "workflow": "ワークフロー"
11389
+ },
11390
+ httpRequest: {
11391
+ "title": "HTTP リクエスト",
11392
+ "description": "HTTP リクエストを送信し、ワークフローでレスポンスを使用します。",
11393
+ "method": "メソッド",
11394
+ "query": "クエリパラメーター",
11395
+ "headers": "リクエストヘッダー",
11396
+ "bodyFormat": "リクエスト本文形式",
11397
+ "none": "なし",
11398
+ "text": "テキスト",
11399
+ "authentication": "認証",
11400
+ "location": "位置",
11401
+ "keyName": "キー名",
11402
+ "responseFormat": "レスポンス形式",
11403
+ "auto": "自動",
11404
+ "statusPolicy": "成功とするステータスコード",
11405
+ "success": "2xx",
11406
+ "all": "すべてのコード",
11407
+ "saveFailed": "リクエスト設定を保存できません。",
11408
+ "retry": "再試行",
11409
+ "bodyUnsupported": "GET と HEAD は本文をサポートしていません。",
11410
+ "parameterNamesInvalid": "パラメーター名は空白や重複にできません。",
11411
+ "headerNameInvalid": "HTTP ヘッダー名が無効です。",
11412
+ "keyNameRequired": "API キー名を入力してください。",
11413
+ "authConflict": "認証とリクエストパラメーターが競合しています。",
11414
+ "body": "リクエスト本文",
11415
+ "username": "ユーザー名",
11416
+ "password": "パスワード",
11417
+ "keyValue": "キーの値",
11418
+ "responseOutputs": "レスポンス出力",
11419
+ "authenticationType": "認証方式",
11420
+ "responseSettings": "レスポンス設定"
11291
11421
  }
11292
11422
  },
11293
11423
  "ko": {
@@ -12536,6 +12666,38 @@ var resources = {
12536
12666
  "aliasInvalid": "호출 이름은 중복 없이 1–64자로 지정하고, 영문자로 시작하여 영문자, 숫자, 밑줄 또는 하이픈만 사용하세요.",
12537
12667
  "connector": "커넥터",
12538
12668
  "workflow": "워크플로"
12669
+ },
12670
+ httpRequest: {
12671
+ "title": "HTTP 요청",
12672
+ "description": "HTTP 요청을 보내고 워크플로에서 응답을 사용합니다.",
12673
+ "method": "메서드",
12674
+ "query": "쿼리 매개변수",
12675
+ "headers": "요청 헤더",
12676
+ "bodyFormat": "요청 본문 형식",
12677
+ "none": "없음",
12678
+ "text": "텍스트",
12679
+ "authentication": "인증",
12680
+ "location": "위치",
12681
+ "keyName": "키 이름",
12682
+ "responseFormat": "응답 형식",
12683
+ "auto": "자동",
12684
+ "statusPolicy": "허용 상태 코드",
12685
+ "success": "2xx",
12686
+ "all": "모든 코드",
12687
+ "saveFailed": "요청 설정을 저장할 수 없습니다.",
12688
+ "retry": "다시 시도",
12689
+ "bodyUnsupported": "GET과 HEAD는 본문을 지원하지 않습니다.",
12690
+ "parameterNamesInvalid": "매개변수 이름은 비어 있거나 중복될 수 없습니다.",
12691
+ "headerNameInvalid": "HTTP 헤더 이름이 잘못되었습니다.",
12692
+ "keyNameRequired": "API 키 이름을 입력하세요.",
12693
+ "authConflict": "인증과 요청 매개변수가 충돌합니다.",
12694
+ "body": "요청 본문",
12695
+ "username": "사용자 이름",
12696
+ "password": "비밀번호",
12697
+ "keyValue": "키 값",
12698
+ "responseOutputs": "응답 출력",
12699
+ "authenticationType": "인증 방식",
12700
+ "responseSettings": "응답 설정"
12539
12701
  }
12540
12702
  },
12541
12703
  "ru": {
@@ -13784,6 +13946,38 @@ var resources = {
13784
13946
  "aliasInvalid": "Укажите уникальное имя вызова длиной 1–64 символа, начинающееся с латинской буквы и содержащее только латинские буквы, цифры, подчёркивания или дефисы.",
13785
13947
  "connector": "Коннектор",
13786
13948
  "workflow": "Рабочий процесс"
13949
+ },
13950
+ httpRequest: {
13951
+ "title": "HTTP-запрос",
13952
+ "description": "Отправить HTTP-запрос и использовать ответ в рабочем процессе.",
13953
+ "method": "Метод",
13954
+ "query": "Параметры запроса",
13955
+ "headers": "Заголовки запроса",
13956
+ "bodyFormat": "Формат тела запроса",
13957
+ "none": "Нет",
13958
+ "text": "Текст",
13959
+ "authentication": "Аутентификация",
13960
+ "location": "Расположение",
13961
+ "keyName": "Имя ключа",
13962
+ "responseFormat": "Формат ответа",
13963
+ "auto": "Автоматически",
13964
+ "statusPolicy": "Допустимые коды состояния",
13965
+ "success": "2xx",
13966
+ "all": "Все коды",
13967
+ "saveFailed": "Не удалось сохранить настройки запроса.",
13968
+ "retry": "Повторить",
13969
+ "bodyUnsupported": "GET и HEAD не поддерживают тело запроса.",
13970
+ "parameterNamesInvalid": "Имена параметров должны быть непустыми и уникальными.",
13971
+ "headerNameInvalid": "Недопустимое имя HTTP-заголовка.",
13972
+ "keyNameRequired": "Введите имя ключа API.",
13973
+ "authConflict": "Аутентификация конфликтует с параметром запроса.",
13974
+ "body": "Тело запроса",
13975
+ "username": "Имя пользователя",
13976
+ "password": "Пароль",
13977
+ "keyValue": "Значение ключа",
13978
+ "responseOutputs": "Выходы ответа",
13979
+ "authenticationType": "Тип",
13980
+ "responseSettings": "Настройки ответа"
13787
13981
  }
13788
13982
  },
13789
13983
  "fr": {
@@ -15032,6 +15226,38 @@ var resources = {
15032
15226
  "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.",
15033
15227
  "connector": "Connecteur",
15034
15228
  "workflow": "Workflow"
15229
+ },
15230
+ httpRequest: {
15231
+ "title": "Requête HTTP",
15232
+ "description": "Envoyer une requête HTTP et utiliser sa réponse dans le workflow.",
15233
+ "method": "Méthode",
15234
+ "query": "Paramètres de requête",
15235
+ "headers": "En-têtes de requête",
15236
+ "bodyFormat": "Format du corps de la requête",
15237
+ "none": "Aucun",
15238
+ "text": "Texte",
15239
+ "authentication": "Authentification",
15240
+ "location": "Emplacement",
15241
+ "keyName": "Nom de la clé",
15242
+ "responseFormat": "Format de réponse",
15243
+ "auto": "Automatique",
15244
+ "statusPolicy": "Codes de statut acceptés",
15245
+ "success": "2xx",
15246
+ "all": "Tous les codes",
15247
+ "saveFailed": "Impossible d’enregistrer la configuration.",
15248
+ "retry": "Réessayer",
15249
+ "bodyUnsupported": "GET et HEAD ne prennent pas en charge de corps.",
15250
+ "parameterNamesInvalid": "Les noms doivent être uniques et non vides.",
15251
+ "headerNameInvalid": "Nom d’en-tête HTTP invalide.",
15252
+ "keyNameRequired": "Saisissez un nom de clé API.",
15253
+ "authConflict": "L’authentification est en conflit avec un paramètre.",
15254
+ "body": "Corps de la requête",
15255
+ "username": "Nom d’utilisateur",
15256
+ "password": "Mot de passe",
15257
+ "keyValue": "Valeur de la clé",
15258
+ "responseOutputs": "Sorties de réponse",
15259
+ "authenticationType": "Type",
15260
+ "responseSettings": "Paramètres de réponse"
15035
15261
  }
15036
15262
  }
15037
15263
  };
@@ -16062,42 +16288,6 @@ function dequal(foo, bar) {
16062
16288
  return foo !== foo && bar !== bar;
16063
16289
  }
16064
16290
  //#endregion
16065
- //#region src/flow/common/portChanges.ts
16066
- function renamedPort(previous, next) {
16067
- const previousNames = new Set(previous.flatMap((port) => "handle" in port ? [port.handle] : []));
16068
- const nextNames = new Set(next.flatMap((port) => "handle" in port ? [port.handle] : []));
16069
- const removed = [...previousNames].filter((name) => !nextNames.has(name));
16070
- const added = [...nextNames].filter((name) => !previousNames.has(name));
16071
- return removed.length == 1 && added.length == 1 ? [removed[0], added[0]] : void 0;
16072
- }
16073
- function renameOutputMapping(mapping, nodeIds, rename) {
16074
- if (rename == null || mapping.kind != "sources") return mapping;
16075
- const sources = mapping.sources.map((source) => source.kind == "node" && !source.system && nodeIds.has(source.nodeId) && source.output == rename[0] ? {
16076
- ...source,
16077
- output: rename[1]
16078
- } : source);
16079
- return sources.every((source, index) => source === mapping.sources[index]) ? mapping : {
16080
- kind: "sources",
16081
- sources
16082
- };
16083
- }
16084
- /** Carry saved mappings through a field rename and remove only fields absent from the new contract. */
16085
- function remapInputMappings(mappings, ports, rename) {
16086
- const inputs = { ...mappings };
16087
- if (rename != null && Object.hasOwn(inputs, rename[0])) {
16088
- Object.defineProperty(inputs, rename[1], {
16089
- value: inputs[rename[0]],
16090
- enumerable: true,
16091
- configurable: true,
16092
- writable: true
16093
- });
16094
- delete inputs[rename[0]];
16095
- }
16096
- const names = new Set(ports.flatMap((port) => "handle" in port ? [port.handle] : []));
16097
- for (const name of Object.keys(inputs)) if (!names.has(name)) delete inputs[name];
16098
- return inputs;
16099
- }
16100
- //#endregion
16101
16291
  //#region src/flow/common/nodeChanges.ts
16102
16292
  var codeTaskTemplate = `export default async function (inputs, context) {
16103
16293
  return { result: inputs.value }
@@ -26790,6 +26980,7 @@ function nodeIcon(node) {
26790
26980
  if ("moduleId" in task) return ":carbon:code:";
26791
26981
  if (task.executor.kind == "decision") return ":carbon:ml-model-reference:";
26792
26982
  if (task.executor.kind == "workflow") return ":lucide-light:workflow:";
26983
+ if (task.executor.kind == "http-request") return ":lucide-light:globe:";
26793
26984
  if (task.executor.kind == "openapi") return ":logos:openapi-icon:";
26794
26985
  return task.executor.kind == "connector" ? ":carbon:connection-signal:" : ":carbon:machine-learning-model:";
26795
26986
  }
@@ -27050,6 +27241,7 @@ function executorName(task, providerName, t) {
27050
27241
  if (task.executor.kind == "agent") return t?.("addNode.agent") ?? "AI Agent";
27051
27242
  if (task.executor.kind == "decision") return t?.("addNode.decision") ?? "AI Decision";
27052
27243
  if (task.executor.kind == "workflow") return t?.("addNode.workflow") ?? "Call Workflow";
27244
+ if (task.executor.kind == "http-request") return `${t?.("httpRequest.title") ?? "HTTP Request"} · ${task.executor.method}`;
27053
27245
  if (task.executor.kind == "openapi") return "OpenAPI";
27054
27246
  if (task.executor.kind == "llm") return t?.("designer.executorLlm") ?? "LLM";
27055
27247
  return `${t?.("designer.executorConnector") ?? "Connector"} · ${providerName ?? task.executor.action.split(".")[0]}`;
@@ -27817,6 +28009,16 @@ function builtinOptions(_draft, t) {
27817
28009
  inputs: decisionTask().inputs.filter((port) => "handle" in port),
27818
28010
  outputs: decisionTask().outputs.filter((port) => "handle" in port)
27819
28011
  },
28012
+ {
28013
+ description: t("httpRequest.description"),
28014
+ group,
28015
+ icon: ":lucide-light:globe:",
28016
+ id: "http-request",
28017
+ inputs: httpRequestTask().inputs.filter((port) => "handle" in port),
28018
+ outputs: httpRequestTask().outputs.filter((port) => "handle" in port),
28019
+ kind: "http-request",
28020
+ label: t("httpRequest.title")
28021
+ },
27820
28022
  {
27821
28023
  description: t("openapi.description"),
27822
28024
  group,
@@ -28011,6 +28213,10 @@ function addNodeIntent(option, revision, t) {
28011
28213
  kind: "decision",
28012
28214
  name: t("addNode.decision")
28013
28215
  };
28216
+ case "http-request": return {
28217
+ kind: "http-request",
28218
+ name: t("httpRequest.title")
28219
+ };
28014
28220
  case "openapi": return {
28015
28221
  kind: "openapi",
28016
28222
  name: "OpenAPI"
@@ -28849,6 +29055,9 @@ function addNode(revision, nodeId, intent) {
28849
29055
  case "decision":
28850
29056
  changes = createDecisionTask({ nodeId }, intent.name);
28851
29057
  break;
29058
+ case "http-request":
29059
+ changes = createManagedTask({ nodeId }, httpRequestTask(void 0, intent.name));
29060
+ break;
28852
29061
  case "openapi":
28853
29062
  changes = createManagedTask({ nodeId }, {
28854
29063
  name: intent.name,
@@ -29114,6 +29323,7 @@ function updateTask(revision, nodeId, settings) {
29114
29323
  }];
29115
29324
  }
29116
29325
  case "decision":
29326
+ case "http-request":
29117
29327
  case "openapi":
29118
29328
  case "agent":
29119
29329
  if (!dequal$1(node.task, settings.before)) return;
@@ -29307,7 +29517,7 @@ function replaceTaskPorts(revision, nodeId, task, values) {
29307
29517
  }
29308
29518
  for (const [currentNodeId, node] of Object.entries(graph.nodes)) {
29309
29519
  if (isTriggerNode(node)) continue;
29310
- const inputs = currentNodeId == nodeId ? updatedInputMappings(revision.inputMappings(node), previous.inputs, task.inputs, inputRename, values) : { ...revision.inputMappings(node) };
29520
+ const inputs = currentNodeId == nodeId ? "executor" in task && task.executor.kind == "http-request" && "executor" in previous ? httpRequestInputs(revision.inputMappings(node), previous, task) : updatedInputMappings(revision.inputMappings(node), previous.inputs, task.inputs, inputRename, values) : { ...revision.inputMappings(node) };
29311
29521
  for (const [name, mapping] of Object.entries(inputs)) inputs[name] = renameOutputMapping(mapping, instances, outputRename);
29312
29522
  if (currentNodeId == nodeId && "moduleId" in current.task) {
29313
29523
  if (current.task.name != task.name) changes.push({
@@ -29392,5 +29602,36 @@ function updateOutputPorts(revision, nodeId, definitions, values) {
29392
29602
  }));
29393
29603
  return updateOutputsDefs(content, nodeId, ports, updatedInputMappings(node.outputMappings, node.outputDefs, ports, renamedPort(node.outputDefs, ports), values));
29394
29604
  }
29605
+ function updateHttpParameters(revision, nodeId, group, edit, bindingId) {
29606
+ const node = revision.graph().nodes[nodeId];
29607
+ if (node?.kind !== "task" || !("executor" in node.task) || node.task.executor.kind !== "http-request") return;
29608
+ const handle = edit.field == null ? group : `${group === "query" ? "query" : "header"}.${edit.field}`;
29609
+ let next = edit.kind === "fields" ? withHttpParameterFields(node, group, edit.value) : edit.field != null ? withHttpParameterFields(node, group, edit.fields) : withHttpParameterSource(node, group, edit.kind === "source" ? {
29610
+ kind: "sources",
29611
+ sources: [edit.source]
29612
+ } : void 0);
29613
+ if (edit.field != null && edit.kind !== "variable") next = {
29614
+ ...next,
29615
+ inputs: {
29616
+ ...next.inputs,
29617
+ [handle]: edit.kind === "source" ? {
29618
+ kind: "sources",
29619
+ sources: [edit.source]
29620
+ } : {
29621
+ kind: "value",
29622
+ value: edit.value[edit.field] ?? null
29623
+ }
29624
+ }
29625
+ };
29626
+ const operations = [{
29627
+ kind: "graph.node.replace",
29628
+ nodeId,
29629
+ before: node,
29630
+ node: next
29631
+ }];
29632
+ const content = revision.revision.content;
29633
+ const binding = edit.kind === "variable" ? setInputVariable$1(applyFlowChanges$1(content, operations), nodeId, handle, edit.name, bindingId) ?? [] : [];
29634
+ return cleanVariableBindings(content, [...operations, ...binding]);
29635
+ }
29395
29636
  //#endregion
29396
- export { designerGraph as $, EventSourceSetup as $t, valueForEditor as A, serverAddress as An, setInputSources as At, dateTimeWall as B, record$1 as Bn, InputGroupInput as Bt, updateWebhook as C, inputValue as Cn, setFlowViewport as Ct, editorComponent as D, openApiTask as Dn, resetInputValues as Dt, defaultValueEditorSchema as E, openApiFieldIssues as En, repairNodeNames as Et, calendarDate as F, workflowCandidateGroup as Fn, WorkflowExportMenuItem as Ft, combineSources as G, EmptyMedia as Gt, addNodeIntent as H, ApiError as Hn, EmptyContent as Ht, dateFromTimeZone as I, workflowCapability as In, IdTooltip as It, CacheResource as J, EventSourcesPage as Jt, mapSource as K, EmptyTitle as Kt, dateInTimeZone as L, workflowSelectionTask as Ln, followWorkbenchLink as Lt, isUnconstrainedSchema as M, sameWorkflowInterface as Mn, updateStartInputDefs as Mt, typeOfSchema as N, workflowAgentTool as Nn, updateTriggerSchedule as Nt, editorGroups as O, securityOptions as On, setCodeActions as Ot, calendarChange as P, workflowCandidate as Pn, dequal as Pt, connectorActionPorts as Q, FeishuEventPicker as Qt, datePickerChange as R, invalidResponse as Rn, InputGroup as Rt, updateValue as S, triggerConfigValues as Sn, setComment as St, supportsFeishuChatFilter as T, object as Tn, setNodePositions as Tt, deriveAddNodeOptions as U, controlErrorCode as Un, EmptyDescription as Ut, isDateFormat as V, string as Vn, Empty as Vt, indexAddNodeOptions as W, eventSourceKind as Wn, EmptyHeader as Wt, resourceData as X, SourceSelect as Xt, observeResource as Y, SourceForm as Yt, resourceValue as Z, createI18n as Zt, updateResolution as _, encodeWorkflowFile as _n, canvasPresentationChange as _t, nameCreatedNodes as a, decodeTriggerCatalog as an, canCancelRun as at, updateTaskPorts as b, workflowNameFromFile as bn, removeComments as bt, setInputVariable as c, webhookResponseDiagnostics as cn, flowResourceReferences as ct, updateCondition as d, normalizeTriggerOutputs as dn, diagnosticItems as dt, errorNotice as en, semanticNodeIcon as et, updateNodeDescription as f, sampleErrorOutputs as fn, diagnosticMessage as ft, updateOutputPorts as g, connectorActionMetadata as gn, connectionCatalog as gt, updateNodeSettings as h, connection as hn, actionWithConnections as ht, deleteSelection as i, decodeResultList as in, RunStore as it, getDefaultValue as j, servers as jn, setServiceConnections as jt, schemaForEditor as k, selectOperation as kn, setConnectorConnection as kt, setTriggerConnection as l, sourceOutputLabel as ln, Latest as lt, updateNodeName as m, isJsonObject as mn, schemaMismatchMessage as mt, agentTool as n, randomId as nn, actionSummary as nt, selectWebhookResponse as o, executionReachableNodes as on, hasRunFilter as ot, updateNodeIcon as p, triggerOutputDefinitions as pn, diagnosticNodeId as pt, scopedValue as q, Badge as qt, applyFlowChanges as r, allConnectorConnectionsQuery as rn, providerIcon as rt, setInputValue as s, resolutionOutputPorts as sn, revisionView as st, addNode as t, WorkbenchClient as tn, triggerNodeIcon as tt, setTriggerEventSource as u, sourcePort as un, deriveInspectorDiagnostics as ut, updateTask as v, parseWorkflowFile as vn, commentIds as vt, feishuResourceKind as w, listOperations as wn, setNodeContentHidden as wt, updateTriggerConfig as x, triggerConfigValue as xn, restoreCanvasPresentation as xt, updateTaskAdditionalInputs as y, workflowFileName as yn, flowPresentation as yt, datePickerValue as z, jsonValue as zn, InputGroupAddon as zt };
29637
+ export { connectorActionPorts as $, FeishuEventPicker as $t, schemaForEditor as A, securityOptions as An, setConnectorConnection as At, datePickerValue as B, invalidResponse as Bn, InputGroupAddon as Bt, updateValue as C, triggerConfigValue as Cn, setComment as Ct, defaultValueEditorSchema as D, object as Dn, repairNodeNames as Dt, supportsFeishuChatFilter as E, listOperations as En, setNodePositions as Et, calendarChange as F, workflowAgentTool as Fn, dequal as Ft, indexAddNodeOptions as G, controlErrorCode as Gn, EmptyHeader as Gt, isDateFormat as H, record$1 as Hn, Empty as Ht, calendarDate as I, workflowCandidate as In, WorkflowExportMenuItem as It, scopedValue as J, Badge as Jt, combineSources as K, eventSourceKind as Kn, EmptyMedia as Kt, dateFromTimeZone as L, workflowCandidateGroup as Ln, IdTooltip as Lt, getDefaultValue as M, serverAddress as Mn, setServiceConnections as Mt, isUnconstrainedSchema as N, servers as Nn, updateStartInputDefs as Nt, editorComponent as O, openApiFieldIssues as On, resetInputValues as Ot, typeOfSchema as P, sameWorkflowInterface as Pn, updateTriggerSchedule as Pt, resourceValue as Q, createI18n as Qt, dateInTimeZone as R, workflowCapability as Rn, followWorkbenchLink as Rt, updateTriggerConfig as S, workflowNameFromFile as Sn, restoreCanvasPresentation as St, feishuResourceKind as T, inputValue as Tn, setNodeContentHidden as Tt, addNodeIntent as U, string as Un, EmptyContent as Ut, dateTimeWall as V, jsonValue as Vn, InputGroupInput as Vt, deriveAddNodeOptions as W, ApiError as Wn, EmptyDescription as Wt, observeResource as X, SourceForm as Xt, CacheResource as Y, EventSourcesPage as Yt, resourceData as Z, SourceSelect as Zt, updateOutputPorts as _, connection as _n, connectionCatalog as _t, nameCreatedNodes as a, decodeResultList as an, RunStore as at, updateTaskAdditionalInputs as b, parseWorkflowFile as bn, flowPresentation as bt, setInputVariable as c, inputSourceCandidates as cn, revisionView as ct, updateCondition as d, sourceOutputLabel as dn, deriveInspectorDiagnostics as dt, EventSourceSetup as en, designerGraph as et, updateHttpParameters as f, sourcePort as fn, diagnosticItems as ft, updateNodeSettings as g, isJsonObject as gn, actionWithConnections as gt, updateNodeName as h, triggerOutputDefinitions as hn, schemaMismatchMessage as ht, deleteSelection as i, allConnectorConnectionsQuery as in, providerIcon as it, valueForEditor as j, selectOperation as jn, setInputSources as jt, editorGroups as k, openApiTask as kn, setCodeActions as kt, setTriggerConnection as l, resolutionOutputPorts as ln, flowResourceReferences as lt, updateNodeIcon as m, sampleErrorOutputs as mn, diagnosticNodeId as mt, agentTool as n, WorkbenchClient as nn, triggerNodeIcon as nt, selectWebhookResponse as o, decodeTriggerCatalog as on, canCancelRun as ot, updateNodeDescription as p, normalizeTriggerOutputs as pn, diagnosticMessage as pt, mapSource as q, EmptyTitle as qt, applyFlowChanges as r, randomId as rn, actionSummary as rt, setInputValue as s, executionReachableNodes as sn, hasRunFilter as st, addNode as t, errorNotice as tn, semanticNodeIcon as tt, setTriggerEventSource as u, webhookResponseDiagnostics as un, Latest as ut, updateResolution as v, connectorActionMetadata as vn, canvasPresentationChange as vt, updateWebhook as w, triggerConfigValues as wn, setFlowViewport as wt, updateTaskPorts as x, workflowFileName as xn, removeComments as xt, updateTask as y, encodeWorkflowFile as yn, commentIds as yt, datePickerChange as z, workflowSelectionTask as zn, InputGroup as zt };