@datatechsolutions/ui 3.2.1 → 3.4.0

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 (182) hide show
  1. package/dist/astrlabe/contracts.d.mts +31 -3
  2. package/dist/astrlabe/contracts.d.ts +31 -3
  3. package/dist/astrlabe/index.d.mts +22 -30
  4. package/dist/astrlabe/index.d.ts +22 -30
  5. package/dist/astrlabe/index.js +121 -121
  6. package/dist/astrlabe/index.mjs +7 -7
  7. package/dist/astrlabe/utils.js +9 -9
  8. package/dist/astrlabe/utils.mjs +2 -2
  9. package/dist/astrlabe/workflow-canvas.d.mts +6 -69
  10. package/dist/astrlabe/workflow-canvas.d.ts +6 -69
  11. package/dist/astrlabe/workflow-canvas.js +6 -6
  12. package/dist/astrlabe/workflow-canvas.mjs +5 -5
  13. package/dist/brand/index.d.mts +1 -15
  14. package/dist/brand/index.d.ts +1 -15
  15. package/dist/brand/index.js +0 -14
  16. package/dist/brand/index.js.map +1 -1
  17. package/dist/brand/index.mjs +0 -14
  18. package/dist/brand/index.mjs.map +1 -1
  19. package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
  20. package/dist/chunk-2OZZH2IO.js.map +1 -0
  21. package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
  22. package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
  23. package/dist/{chunk-JSNRCYSO.js → chunk-45QAUEYT.js} +4 -4
  24. package/dist/{chunk-JSNRCYSO.js.map → chunk-45QAUEYT.js.map} +1 -1
  25. package/dist/{chunk-B67DP7MI.mjs → chunk-4GDWGWHY.mjs} +4 -4
  26. package/dist/{chunk-B67DP7MI.mjs.map → chunk-4GDWGWHY.mjs.map} +1 -1
  27. package/dist/{chunk-KR2X2WHJ.js → chunk-4ICEQJH4.js} +53 -53
  28. package/dist/{chunk-KR2X2WHJ.js.map → chunk-4ICEQJH4.js.map} +1 -1
  29. package/dist/{chunk-RXZNACMI.js → chunk-6MBWKOPF.js} +33 -33
  30. package/dist/{chunk-RXZNACMI.js.map → chunk-6MBWKOPF.js.map} +1 -1
  31. package/dist/{chunk-C3H4FM4A.js → chunk-72SWXOD5.js} +15 -2
  32. package/dist/chunk-72SWXOD5.js.map +1 -0
  33. package/dist/{chunk-JN6IL6OH.mjs → chunk-AGGOHPMZ.mjs} +1054 -5229
  34. package/dist/chunk-AGGOHPMZ.mjs.map +1 -0
  35. package/dist/{chunk-5GDKCFM5.mjs → chunk-AL73YAV4.mjs} +3 -3
  36. package/dist/{chunk-5GDKCFM5.mjs.map → chunk-AL73YAV4.mjs.map} +1 -1
  37. package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
  38. package/dist/chunk-BUDZNAKL.mjs.map +1 -0
  39. package/dist/{chunk-OL73LBX5.mjs → chunk-BW67WFHT.mjs} +3 -4
  40. package/dist/chunk-BW67WFHT.mjs.map +1 -0
  41. package/dist/{chunk-W5OEBO6E.js → chunk-CF7GOUBQ.js} +13 -14
  42. package/dist/chunk-CF7GOUBQ.js.map +1 -0
  43. package/dist/{chunk-IRPS5UCS.mjs → chunk-CUWPLPVY.mjs} +3 -3
  44. package/dist/{chunk-IRPS5UCS.mjs.map → chunk-CUWPLPVY.mjs.map} +1 -1
  45. package/dist/{chunk-NJS2YC3J.js → chunk-DJDZIRM6.js} +12 -2
  46. package/dist/chunk-DJDZIRM6.js.map +1 -0
  47. package/dist/{chunk-RL35XATZ.js → chunk-ERCDMBRT.js} +702 -647
  48. package/dist/chunk-ERCDMBRT.js.map +1 -0
  49. package/dist/{chunk-I2NZGVBG.js → chunk-FSBR4RCK.js} +1101 -5313
  50. package/dist/chunk-FSBR4RCK.js.map +1 -0
  51. package/dist/{chunk-5W7L7BT7.mjs → chunk-G7JQ4OCE.mjs} +15 -2
  52. package/dist/chunk-G7JQ4OCE.mjs.map +1 -0
  53. package/dist/{chunk-5RM6NGZ6.mjs → chunk-IDEM3DYF.mjs} +3 -3
  54. package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-IDEM3DYF.mjs.map} +1 -1
  55. package/dist/{chunk-U7XM3N7F.mjs → chunk-LEXBTVGM.mjs} +12 -2
  56. package/dist/chunk-LEXBTVGM.mjs.map +1 -0
  57. package/dist/{chunk-EFOXN3LC.js → chunk-M7KSEUZR.js} +490 -389
  58. package/dist/chunk-M7KSEUZR.js.map +1 -0
  59. package/dist/{chunk-AOUUZ52N.js → chunk-MO5FBVV3.js} +85 -86
  60. package/dist/chunk-MO5FBVV3.js.map +1 -0
  61. package/dist/{chunk-H2D2CRTD.mjs → chunk-NAFWHJCM.mjs} +8 -8
  62. package/dist/{chunk-H2D2CRTD.mjs.map → chunk-NAFWHJCM.mjs.map} +1 -1
  63. package/dist/{chunk-3JJWPOK6.js → chunk-NCLZKVJK.js} +9 -10
  64. package/dist/chunk-NCLZKVJK.js.map +1 -0
  65. package/dist/{chunk-R4TQWXNG.mjs → chunk-NVQWHJQH.mjs} +6 -5
  66. package/dist/chunk-NVQWHJQH.mjs.map +1 -0
  67. package/dist/{chunk-Y6AEE56Q.js → chunk-PGVZKMOA.js} +69 -69
  68. package/dist/{chunk-Y6AEE56Q.js.map → chunk-PGVZKMOA.js.map} +1 -1
  69. package/dist/{chunk-UDDZTTLO.mjs → chunk-QBFE7ABE.mjs} +6 -7
  70. package/dist/chunk-QBFE7ABE.mjs.map +1 -0
  71. package/dist/{chunk-3ZUMJTDT.mjs → chunk-RFRXS4PC.mjs} +3 -4
  72. package/dist/{chunk-3JJWPOK6.js.map → chunk-RFRXS4PC.mjs.map} +1 -1
  73. package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
  74. package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
  75. package/dist/{chunk-SU3YPWFW.js → chunk-RLLP7VQJ.js} +26 -26
  76. package/dist/{chunk-SU3YPWFW.js.map → chunk-RLLP7VQJ.js.map} +1 -1
  77. package/dist/{chunk-YIB2YAM5.mjs → chunk-RLVOG5OQ.mjs} +3 -3
  78. package/dist/{chunk-YIB2YAM5.mjs.map → chunk-RLVOG5OQ.mjs.map} +1 -1
  79. package/dist/{chunk-QYA53LUF.mjs → chunk-SEYUYGER.mjs} +571 -517
  80. package/dist/chunk-SEYUYGER.mjs.map +1 -0
  81. package/dist/{chunk-YV72JM4B.mjs → chunk-SQ4KGLBZ.mjs} +4 -4
  82. package/dist/{chunk-YV72JM4B.mjs.map → chunk-SQ4KGLBZ.mjs.map} +1 -1
  83. package/dist/{chunk-F54Q2YJY.js → chunk-SY4MUT5V.js} +7 -7
  84. package/dist/{chunk-F54Q2YJY.js.map → chunk-SY4MUT5V.js.map} +1 -1
  85. package/dist/{chunk-ZM5MVWIT.js → chunk-TUQLZ4QD.js} +5 -6
  86. package/dist/chunk-TUQLZ4QD.js.map +1 -0
  87. package/dist/{chunk-TVMLV675.js → chunk-UE2RDQIK.js} +98 -95
  88. package/dist/chunk-UE2RDQIK.js.map +1 -0
  89. package/dist/{chunk-HDCUWUNH.js → chunk-UJVDI66K.js} +28 -27
  90. package/dist/chunk-UJVDI66K.js.map +1 -0
  91. package/dist/{chunk-IRT4T3CU.mjs → chunk-VV6SYMPM.mjs} +423 -321
  92. package/dist/chunk-VV6SYMPM.mjs.map +1 -0
  93. package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
  94. package/dist/chunk-VY52Y5GC.js.map +1 -0
  95. package/dist/{chunk-LEKZUS6N.mjs → chunk-X3GW7UPN.mjs} +4 -5
  96. package/dist/chunk-X3GW7UPN.mjs.map +1 -0
  97. package/dist/{chunk-RGI74SQH.js → chunk-Y2AYFG4E.js} +4 -4
  98. package/dist/{chunk-RGI74SQH.js.map → chunk-Y2AYFG4E.js.map} +1 -1
  99. package/dist/{chunk-TIJJHW2Z.js → chunk-YV7F7IXG.js} +36 -36
  100. package/dist/{chunk-TIJJHW2Z.js.map → chunk-YV7F7IXG.js.map} +1 -1
  101. package/dist/{chunk-MVBIAXVN.mjs → chunk-ZKSDDFHG.mjs} +14 -11
  102. package/dist/chunk-ZKSDDFHG.mjs.map +1 -0
  103. package/dist/{index-VI9gyJXl.d.mts → index-BNRGVAS5.d.mts} +9 -2
  104. package/dist/index-BoebbJ44.d.mts +49 -0
  105. package/dist/index-BoebbJ44.d.ts +49 -0
  106. package/dist/{index-CoB18TbG.d.ts → index-CnCY-b5V.d.ts} +9 -2
  107. package/dist/index.d.mts +399 -548
  108. package/dist/index.d.ts +399 -548
  109. package/dist/index.js +727 -887
  110. package/dist/index.mjs +3 -3
  111. package/dist/platform/admin/index.js +12 -12
  112. package/dist/platform/admin/index.mjs +6 -6
  113. package/dist/platform/agents-workspace.js +10 -10
  114. package/dist/platform/agents-workspace.mjs +9 -9
  115. package/dist/platform/app-shell.js +5 -5
  116. package/dist/platform/app-shell.mjs +4 -4
  117. package/dist/platform/auth/index.js +29 -29
  118. package/dist/platform/auth/index.mjs +6 -6
  119. package/dist/platform/billing/index.js +5 -5
  120. package/dist/platform/billing/index.mjs +4 -4
  121. package/dist/platform/impersonation/index.js +5 -5
  122. package/dist/platform/impersonation/index.mjs +4 -4
  123. package/dist/platform/index.d.mts +3 -39
  124. package/dist/platform/index.d.ts +3 -39
  125. package/dist/platform/index.js +102 -4812
  126. package/dist/platform/index.js.map +1 -1
  127. package/dist/platform/index.mjs +25 -4730
  128. package/dist/platform/index.mjs.map +1 -1
  129. package/dist/platform/pages/index.d.mts +4 -4
  130. package/dist/platform/pages/index.d.ts +4 -4
  131. package/dist/platform/pages/index.js +199 -199
  132. package/dist/platform/pages/index.mjs +11 -11
  133. package/dist/platform/rbac.d.mts +2 -1
  134. package/dist/platform/rbac.d.ts +2 -1
  135. package/dist/platform/rbac.js +2 -2
  136. package/dist/platform/rbac.mjs +1 -1
  137. package/dist/platform/settings/index.js +9 -9
  138. package/dist/platform/settings/index.mjs +8 -8
  139. package/dist/platform/utils/index.js +3 -3
  140. package/dist/platform/utils/index.js.map +1 -1
  141. package/dist/platform/utils/index.mjs +1 -1
  142. package/dist/platform/utils/index.mjs.map +1 -1
  143. package/dist/platform/workflow-api-client.d.mts +2 -2
  144. package/dist/platform/workflow-api-client.d.ts +2 -2
  145. package/dist/platform/workflow-api-client.js +62 -62
  146. package/dist/platform/workflow-api-client.mjs +2 -2
  147. package/dist/platform/workflow-canvas-shell.js +7 -7
  148. package/dist/platform/workflow-canvas-shell.mjs +6 -6
  149. package/dist/{workflow-api-client-DoYj7nHz.d.mts → workflow-api-client-CpFl3WcG.d.mts} +1 -1
  150. package/dist/{workflow-api-client-BKD8OfP_.d.ts → workflow-api-client-uLICOanv.d.ts} +1 -1
  151. package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
  152. package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
  153. package/package.json +15 -5
  154. package/src/styles/liquid-glass.css +283 -2
  155. package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
  156. package/dist/chunk-5W7L7BT7.mjs.map +0 -1
  157. package/dist/chunk-AOUUZ52N.js.map +0 -1
  158. package/dist/chunk-C3H4FM4A.js.map +0 -1
  159. package/dist/chunk-EFOXN3LC.js.map +0 -1
  160. package/dist/chunk-FAGDZEKM.js.map +0 -1
  161. package/dist/chunk-HDCUWUNH.js.map +0 -1
  162. package/dist/chunk-HZ4LOVHM.js.map +0 -1
  163. package/dist/chunk-I2NZGVBG.js.map +0 -1
  164. package/dist/chunk-IRT4T3CU.mjs.map +0 -1
  165. package/dist/chunk-JN6IL6OH.mjs.map +0 -1
  166. package/dist/chunk-LEKZUS6N.mjs.map +0 -1
  167. package/dist/chunk-MVBIAXVN.mjs.map +0 -1
  168. package/dist/chunk-NJS2YC3J.js.map +0 -1
  169. package/dist/chunk-OL73LBX5.mjs.map +0 -1
  170. package/dist/chunk-QYA53LUF.mjs.map +0 -1
  171. package/dist/chunk-R4TQWXNG.mjs.map +0 -1
  172. package/dist/chunk-RL35XATZ.js.map +0 -1
  173. package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
  174. package/dist/chunk-TVMLV675.js.map +0 -1
  175. package/dist/chunk-U7XM3N7F.mjs.map +0 -1
  176. package/dist/chunk-UDDZTTLO.mjs.map +0 -1
  177. package/dist/chunk-W5OEBO6E.js.map +0 -1
  178. package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
  179. package/dist/chunk-ZM5MVWIT.js.map +0 -1
  180. package/src/brand/logos/kori-icon.svg +0 -45
  181. package/src/brand/logos/kori-logo-dark.svg +0 -40
  182. package/src/brand/logos/kori-logo.svg +0 -43
@@ -1,26 +1,112 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkEFOXN3LC_js = require('./chunk-EFOXN3LC.js');
5
- var chunkI2NZGVBG_js = require('./chunk-I2NZGVBG.js');
4
+ var chunkM7KSEUZR_js = require('./chunk-M7KSEUZR.js');
5
+ var chunkFSBR4RCK_js = require('./chunk-FSBR4RCK.js');
6
6
  var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
7
- var chunkC3H4FM4A_js = require('./chunk-C3H4FM4A.js');
7
+ var chunk72SWXOD5_js = require('./chunk-72SWXOD5.js');
8
8
  var react = require('react');
9
9
  var react$1 = require('@xyflow/react');
10
10
  var outline = require('@heroicons/react/24/outline');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var zustand = require('zustand');
13
13
 
14
+ var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
15
+ var PROVIDER_LOGOS = {
16
+ aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
17
+ openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
18
+ google_vertex: SI("googlegemini", "8E75B2"),
19
+ azure_openai: SI("microsoftazure", "0078D4"),
20
+ anthropic_api: SI("anthropic", "D4A27F"),
21
+ groq: SI("groq", "000000"),
22
+ mistral: SI("mistralai", "FF7000"),
23
+ huggingface: SI("huggingface", "FFD21E"),
24
+ ollama: SI("ollama", "FFFFFF")
25
+ };
26
+ var PROVIDER_TYPE_LABELS = {
27
+ aws_bedrock: "AWS Bedrock",
28
+ openai_api: "OpenAI API",
29
+ google_vertex: "Google Vertex AI",
30
+ azure_openai: "Azure OpenAI",
31
+ anthropic_api: "Anthropic API",
32
+ groq: "Groq Cloud",
33
+ mistral: "Mistral AI",
34
+ huggingface: "Hugging Face",
35
+ ollama: "Ollama (Local)",
36
+ custom: "Custom"
37
+ };
38
+ var ModelProviderFlowNode = react.memo(function ModelProviderFlowNode2({ id, data, selected }) {
39
+ const config = data.config;
40
+ const isCompact = data.displayMode === "compact";
41
+ if (!config) {
42
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
43
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
44
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
45
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
46
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsx(
47
+ chunkM7KSEUZR_js.NodeCardHeader,
48
+ {
49
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
50
+ title: data.label || "Model Provider",
51
+ description: "Not configured",
52
+ iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
53
+ }
54
+ ) }),
55
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
56
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
57
+ ] });
58
+ }
59
+ const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
60
+ const displayName = config.name || providerLabel;
61
+ const regionLabel = config.region ? config.region : void 0;
62
+ const isConfigured = !!(config.credentialRef || config.apiKeyRef);
63
+ const logo = PROVIDER_LOGOS[config.providerType];
64
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
65
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
66
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
67
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
68
+ /* @__PURE__ */ jsxRuntime.jsx(
69
+ "button",
70
+ {
71
+ type: "button",
72
+ onClick: () => data.onEdit?.(id),
73
+ className: "w-full text-left",
74
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ chunkM7KSEUZR_js.NodeCardHeader,
77
+ {
78
+ icon: logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: providerLabel, className: "h-6 w-6 object-contain", loading: "lazy" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6 text-white" }),
79
+ title: displayName,
80
+ description: providerLabel,
81
+ iconClassName: `flex h-11 w-11 items-center justify-center rounded-xl shadow-lg ${logo ? "bg-white/10 dark:bg-white/5 p-2" : "bg-gradient-to-br from-slate-600 to-slate-700 p-1.5"}`
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
85
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-semibold text-slate-700 dark:bg-slate-500/20 dark:text-slate-300", children: providerLabel }),
86
+ regionLabel && /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: regionLabel }),
87
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${isConfigured ? "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300" : "bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300"}`, children: isConfigured ? "Configured" : "Setup needed" }),
88
+ config.modelFilter && config.modelFilter.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: [
89
+ config.modelFilter.length,
90
+ " models"
91
+ ] })
92
+ ] }) })
93
+ ] })
94
+ }
95
+ ),
96
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
97
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
98
+ ] });
99
+ });
14
100
  var S3WriteFlowNode = react.memo(function S3WriteFlowNode2({ id, data, selected }) {
15
101
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
16
102
  const { config, label, onDelete, onEdit } = data;
17
103
  const isCompact = data.displayMode === "compact";
18
104
  const keyPreview = config.key ? config.key.slice(0, 30) : "";
19
105
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20
- /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.NodeRunningIndicator, { nodeId: id }),
21
- /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-cyan-500" }),
106
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
107
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-cyan-500" }),
22
108
  /* @__PURE__ */ jsxRuntime.jsxs(
23
- chunkEFOXN3LC_js.NodeInteractiveCard,
109
+ chunkM7KSEUZR_js.NodeInteractiveCard,
24
110
  {
25
111
  nodeId: id,
26
112
  onEdit,
@@ -29,27 +115,27 @@ var S3WriteFlowNode = react.memo(function S3WriteFlowNode2({ id, data, selected
29
115
  nodeType: "s3_write",
30
116
  children: [
31
117
  /* @__PURE__ */ jsxRuntime.jsx(
32
- chunkEFOXN3LC_js.NodeCardHeader,
118
+ chunkM7KSEUZR_js.NodeCardHeader,
33
119
  {
34
- icon: /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.NodeIconBubble, { tone: "s3_write", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CloudArrowUpIcon, { className: "h-5 w-5 text-white" }) }),
120
+ icon: /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeIconBubble, { tone: "s3_write", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CloudArrowUpIcon, { className: "h-5 w-5 text-white" }) }),
35
121
  title: label,
36
122
  description: t("s3WriteNodeDescription"),
37
123
  compact: isCompact,
38
124
  iconClassName: ""
39
125
  }
40
126
  ),
41
- /* @__PURE__ */ jsxRuntime.jsxs(chunkEFOXN3LC_js.NodeCardMeta, { compact: isCompact, children: [
127
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCardMeta, { compact: isCompact, children: [
42
128
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
43
- /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.NodeCardBadge, { tone: "s3_write", children: t("s3WriteNode") }),
44
- config.bucket && /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.NodeCardBadge, { tone: "s3_write", soft: true, children: config.bucket }),
129
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { tone: "s3_write", children: t("s3WriteNode") }),
130
+ config.bucket && /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { tone: "s3_write", soft: true, children: config.bucket }),
45
131
  keyPreview && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: keyPreview })
46
132
  ] }),
47
- /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.NodeCardDeleteAction, { nodeId: id, onDelete })
133
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardDeleteAction, { nodeId: id, onDelete })
48
134
  ] })
49
135
  ]
50
136
  }
51
137
  ),
52
- /* @__PURE__ */ jsxRuntime.jsx(chunkEFOXN3LC_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-500" })
138
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-500" })
53
139
  ] });
54
140
  });
55
141
  function AnthropicModelIcon({ className }) {
@@ -113,7 +199,7 @@ function OutputSchemaBuilder({ value, onChange, depth = 0 }) {
113
199
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-dashed border-slate-300 bg-slate-50/40 p-4 text-center dark:border-slate-700 dark:bg-slate-900/30", children: [
114
200
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "No schema yet \u2014 agent text is exposed as a raw string. Add a schema to enforce structured output." }),
115
201
  /* @__PURE__ */ jsxRuntime.jsx(
116
- chunkI2NZGVBG_js.Button,
202
+ chunkFSBR4RCK_js.Button,
117
203
  {
118
204
  type: "button",
119
205
  outline: true,
@@ -177,7 +263,7 @@ function OutputSchemaBuilder({ value, onChange, depth = 0 }) {
177
263
  },
178
264
  index
179
265
  )),
180
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: addField, children: "+ Add field" })
266
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: addField, children: "+ Add field" })
181
267
  ] })
182
268
  ] });
183
269
  }
@@ -200,7 +286,7 @@ function FieldEditor({
200
286
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
201
287
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_140px_auto_auto] items-end gap-2", children: [
202
288
  /* @__PURE__ */ jsxRuntime.jsx(
203
- chunkI2NZGVBG_js.FormInput,
289
+ chunkFSBR4RCK_js.FormInput,
204
290
  {
205
291
  label: "Name",
206
292
  value: field.name,
@@ -209,7 +295,7 @@ function FieldEditor({
209
295
  }
210
296
  ),
211
297
  /* @__PURE__ */ jsxRuntime.jsx(
212
- chunkI2NZGVBG_js.FormSelect,
298
+ chunkFSBR4RCK_js.FormSelect,
213
299
  {
214
300
  label: "Type",
215
301
  value: field.type,
@@ -229,10 +315,10 @@ function FieldEditor({
229
315
  ),
230
316
  "Required"
231
317
  ] }),
232
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
318
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
233
319
  ] }),
234
320
  /* @__PURE__ */ jsxRuntime.jsx(
235
- chunkI2NZGVBG_js.FormInput,
321
+ chunkFSBR4RCK_js.FormInput,
236
322
  {
237
323
  label: "Description (optional)",
238
324
  value: field.description,
@@ -298,94 +384,6 @@ function rowsToSchema(rows) {
298
384
  function defaultAgentOutputSchema() {
299
385
  return { type: "object", properties: {}, required: [] };
300
386
  }
301
- function StatusBadge({ status }) {
302
- const colorMap = {
303
- pending: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
304
- running: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",
305
- success: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",
306
- error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300"
307
- };
308
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold ${colorMap[status] ?? colorMap.pending}`, children: status });
309
- }
310
- function formatDuration(ms) {
311
- if (ms < 1e3) return `${ms}ms`;
312
- return `${(ms / 1e3).toFixed(2)}s`;
313
- }
314
- function isRecord(value) {
315
- return typeof value === "object" && value !== null && !Array.isArray(value);
316
- }
317
- function OutputCard({ label, value }) {
318
- const displayValue = typeof value === "string" ? value : JSON.stringify(value, null, 2);
319
- const isLong = typeof displayValue === "string" && displayValue.length > 120;
320
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-white/20 bg-white/40 p-3 dark:border-white/10 dark:bg-white/5", children: [
321
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: label }),
322
- isLong ? /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-40 overflow-auto whitespace-pre-wrap text-xs text-gray-800 dark:text-gray-200", children: displayValue }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900 dark:text-white", children: displayValue })
323
- ] });
324
- }
325
- function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
326
- const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
327
- const avatarUrl = agent.avatar;
328
- const frameworkMeta = chunkEFOXN3LC_js.getFrameworkMeta(selectedFramework);
329
- const tierInfo = getEloTier(elo);
330
- const difficultyConfig = {
331
- beginner: { color: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400", labelKey: "agentDrawer.tierBeginner" },
332
- intermediate: { color: "bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400", labelKey: "agentDrawer.tierIntermediate" },
333
- advanced: { color: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400", labelKey: "agentDrawer.tierAdvanced" },
334
- expert: { color: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400", labelKey: "agentDrawer.tierExpert" }
335
- };
336
- const levelConfig = difficultyConfig[tierInfo.tierKey];
337
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden bg-gradient-to-br from-indigo-500/20 via-purple-500/10 to-transparent px-6 pb-6 pt-4 dark:from-indigo-500/10 dark:via-purple-500/5", children: [
338
- levelConfig && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${levelConfig.color} rounded-full px-4 py-1.5 text-xs font-bold shadow-sm transition-colors`, children: t(levelConfig.labelKey) }) }),
339
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
340
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 opacity-40 blur-lg" }),
341
- avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(
342
- "img",
343
- {
344
- src: avatarUrl,
345
- alt: agent.name,
346
- loading: "lazy",
347
- className: "relative h-20 w-20 rounded-full bg-white object-cover shadow-xl ring-4 ring-white dark:bg-gray-800 dark:ring-gray-800"
348
- }
349
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-xl ring-4 ring-white dark:ring-gray-800", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-10 w-10 text-white" }) }),
350
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center rounded-full bg-indigo-500 ring-2 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) })
351
- ] }) }),
352
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-center text-lg font-bold text-gray-900 dark:text-white", children: agent.name }),
353
- agent.role && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-white/60 px-3 py-1.5 text-xs font-medium text-gray-600 ring-1 ring-gray-200/50 dark:bg-gray-800/60 dark:text-gray-400 dark:ring-gray-700/50", children: [
354
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-3 w-3", fill: "currentColor", viewBox: "0 0 20 20", children: [
355
- /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z", clipRule: "evenodd" }),
356
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z" })
357
- ] }),
358
- agent.role
359
- ] }) }),
360
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
361
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1.5 rounded bg-white/50 px-2.5 py-1 text-[10px] text-gray-600 dark:bg-gray-800/50 dark:text-gray-400", children: [
362
- /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3 w-3" }),
363
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: modelName })
364
- ] }),
365
- elo != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1 rounded bg-white/50 px-2 py-1 text-[10px] text-gray-600 dark:bg-gray-800/50 dark:text-gray-400", children: [
366
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: "ELO:" }),
367
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold tabular-nums", children: elo })
368
- ] })
369
- ] }),
370
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-semibold ${frameworkMeta.badgeColor}`, children: [
371
- /* @__PURE__ */ jsxRuntime.jsx(frameworkMeta.IconComponent, { className: "h-3.5 w-3.5" }),
372
- frameworkMeta.label
373
- ] }) }),
374
- /* @__PURE__ */ jsxRuntime.jsx(AgentCapabilityCard, { elo, setElo, models, selectedModelId, setSelectedModelId, temperature, setTemperature, onChanged, t }),
375
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center justify-center gap-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
376
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
377
- "v",
378
- agent.activePromptVersion
379
- ] }),
380
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
381
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
382
- agent.promptCount,
383
- " prompt",
384
- agent.promptCount === 1 ? "" : "s"
385
- ] })
386
- ] })
387
- ] });
388
- }
389
387
  var MODEL_FAMILIES = {
390
388
  anthropic: [
391
389
  { prefix: "anthropic.claude-haiku", maxTokens: 8192, contextWindow: "200K" },
@@ -412,8 +410,20 @@ function getProviderFromModelId(modelId) {
412
410
  if (modelId.startsWith("anthropic.")) return "anthropic";
413
411
  if (modelId.startsWith("amazon.")) return "amazon";
414
412
  if (modelId.startsWith("meta.")) return "meta";
413
+ if (modelId.startsWith("openai.")) return "openai";
414
+ if (modelId.startsWith("google.")) return "google";
415
415
  return "anthropic";
416
416
  }
417
+ function getModelFamily(modelId) {
418
+ return getProviderFromModelId(modelId);
419
+ }
420
+ function findCompatibleProviders(modelId, providers) {
421
+ const family = getModelFamily(modelId);
422
+ return providers.filter((p) => {
423
+ const families = p.servedFamilies ?? [p.provider];
424
+ return families.includes(family);
425
+ });
426
+ }
417
427
  function getEloTier(elo) {
418
428
  if (elo < 1200) return {
419
429
  tierKey: "beginner",
@@ -601,13 +611,13 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
601
611
  ] });
602
612
  }
603
613
  function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework, markDirty, connectedProviderTypes }) {
604
- const frameworkKeys = Object.keys(chunkEFOXN3LC_js.FRAMEWORK_META);
614
+ const frameworkKeys = Object.keys(chunkM7KSEUZR_js.FRAMEWORK_META);
605
615
  const hasProviderConstraints = connectedProviderTypes.length > 0;
606
- const compatibleModels = chunkEFOXN3LC_js.getCompatibleModels(models, selectedFramework);
616
+ const compatibleModels = chunkM7KSEUZR_js.getCompatibleModels(models, selectedFramework);
607
617
  const handleFrameworkChange = react.useCallback((newFramework) => {
608
618
  setSelectedFramework(newFramework);
609
- if (!chunkEFOXN3LC_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
610
- const compatible = chunkEFOXN3LC_js.getCompatibleModels(models, newFramework);
619
+ if (!chunkM7KSEUZR_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
620
+ const compatible = chunkM7KSEUZR_js.getCompatibleModels(models, newFramework);
611
621
  if (compatible.length > 0) {
612
622
  setSelectedModelId(compatible[0].id);
613
623
  }
@@ -618,10 +628,10 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
618
628
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
619
629
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
620
630
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
621
- const meta = chunkEFOXN3LC_js.FRAMEWORK_META[key];
631
+ const meta = chunkM7KSEUZR_js.FRAMEWORK_META[key];
622
632
  const isSelected = key === selectedFramework;
623
- const compatCount = chunkEFOXN3LC_js.getCompatibleModels(models, key).length;
624
- const isCompatibleWithProviders = !hasProviderConstraints || chunkEFOXN3LC_js.isFrameworkCompatibleWithProviders(key, connectedProviderTypes);
633
+ const compatCount = chunkM7KSEUZR_js.getCompatibleModels(models, key).length;
634
+ const isCompatibleWithProviders = !hasProviderConstraints || chunkM7KSEUZR_js.isFrameworkCompatibleWithProviders(key, connectedProviderTypes);
625
635
  return /* @__PURE__ */ jsxRuntime.jsxs(
626
636
  "button",
627
637
  {
@@ -653,7 +663,7 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
653
663
  ] }),
654
664
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
655
665
  const isSelected = model.id === selectedModelId;
656
- const isCompatible = chunkEFOXN3LC_js.isModelCompatibleWithFramework(model.id, selectedFramework);
666
+ const isCompatible = chunkM7KSEUZR_js.isModelCompatibleWithFramework(model.id, selectedFramework);
657
667
  const { IconComponent, color, providerLabel } = getModelIcon(model.id);
658
668
  return /* @__PURE__ */ jsxRuntime.jsxs(
659
669
  "button",
@@ -776,138 +786,6 @@ function PromptTab({
776
786
  ] })
777
787
  ] });
778
788
  }
779
- function ResultsTab({ agentId, t }) {
780
- const nodeResults = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodeResults);
781
- const agentResult = react.useMemo(() => {
782
- return nodeResults[agentId] ?? null;
783
- }, [nodeResults, agentId]);
784
- if (!agentResult) {
785
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noResults") }) });
786
- }
787
- const outputs = isRecord(agentResult.data) ? agentResult.data : null;
788
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
789
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
790
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
791
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.status") }),
792
- /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: agentResult.status })
793
- ] }),
794
- agentResult.durationMs != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
795
- t("agentDrawer.duration"),
796
- ": ",
797
- formatDuration(agentResult.durationMs)
798
- ] })
799
- ] }),
800
- agentResult.error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-red-200 bg-red-50 p-3 dark:border-red-900/30 dark:bg-red-900/10", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-red-800 dark:text-red-300", children: agentResult.error }) }),
801
- outputs && Object.keys(outputs).length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
802
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.outputVariables") }),
803
- Object.entries(outputs).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsx(OutputCard, { label: key, value }, key))
804
- ] })
805
- ] });
806
- }
807
- var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
808
- var PROVIDER_LOGOS = {
809
- anthropic: SI("anthropic", "D4A27F"),
810
- amazon: "https://www.svgrepo.com/show/448266/aws.svg",
811
- google: SI("googlegemini", "8E75B2"),
812
- openai: "https://www.svgrepo.com/show/306500/openai.svg",
813
- meta: SI("meta", "0668E1"),
814
- aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
815
- openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
816
- google_vertex: SI("googlegemini", "8E75B2"),
817
- azure_openai: SI("microsoftazure", "0078D4"),
818
- anthropic_api: SI("anthropic", "D4A27F")
819
- };
820
- function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, models, selectedModelId, onSelectModel, agentFramework, t }) {
821
- if (modelProviders.length === 0) {
822
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
823
- /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
824
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noProvidersAvailable") }),
825
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.dragProviderHint") })
826
- ] });
827
- }
828
- const modelsByProvider = modelProviders.map((provider) => ({
829
- provider,
830
- models: models.filter((m) => {
831
- const modelProvider = m.id.split(".")[0];
832
- return provider.provider === modelProvider || provider.provider === "amazon" && modelProvider === "anthropic" || provider.provider === "amazon" && modelProvider === "amazon" || provider.provider === "amazon" && modelProvider === "meta";
833
- })
834
- }));
835
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
836
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
837
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectProvider") }),
838
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: modelProviders.map((provider) => {
839
- const isSelected = selectedProviderId === provider.id;
840
- const logo = PROVIDER_LOGOS[provider.provider];
841
- return /* @__PURE__ */ jsxRuntime.jsxs(
842
- "button",
843
- {
844
- type: "button",
845
- onClick: () => onSelectProvider(provider.id),
846
- className: `flex w-full items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all ${isSelected ? "border-indigo-500/30 bg-indigo-50/50 ring-1 ring-indigo-500/20 dark:border-indigo-400/20 dark:bg-indigo-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
847
- children: [
848
- logo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-white/10 p-1", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "h-5 w-5 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-slate-500 to-gray-600", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-4 w-4 text-white" }) }),
849
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
850
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs font-medium ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: provider.name }),
851
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500", children: [
852
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
853
- provider.modelCount,
854
- " models"
855
- ] }),
856
- provider.configured && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" })
857
- ] })
858
- ] }),
859
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition-all ${isSelected ? "bg-indigo-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-2.5 w-2.5" }) })
860
- ]
861
- },
862
- provider.id
863
- );
864
- }) })
865
- ] }),
866
- selectedProviderId && (() => {
867
- const providerModels = modelsByProvider.find((p) => p.provider.id === selectedProviderId);
868
- if (!providerModels || providerModels.models.length === 0) return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.noModelsForProvider") });
869
- const compatibleModels = providerModels.models.filter(
870
- (m) => chunkEFOXN3LC_js.isModelCompatibleWithFramework(m.id, agentFramework)
871
- );
872
- const incompatibleModels = providerModels.models.filter(
873
- (m) => !chunkEFOXN3LC_js.isModelCompatibleWithFramework(m.id, agentFramework)
874
- );
875
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
876
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectModel") }),
877
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
878
- compatibleModels.map((model) => {
879
- const isSelected = selectedModelId === model.id;
880
- const { IconComponent, color, providerLabel } = getModelIcon(model.id);
881
- return /* @__PURE__ */ jsxRuntime.jsxs(
882
- "button",
883
- {
884
- type: "button",
885
- onClick: () => onSelectModel(model.id),
886
- className: `flex w-full items-center gap-2.5 rounded-lg border px-3 py-2 text-left transition-all ${isSelected ? "border-indigo-500/50 bg-indigo-50/50 ring-1 ring-indigo-500/30 dark:border-indigo-400/40 dark:bg-indigo-500/10" : "border-gray-200/50 bg-gray-50/50 hover:border-gray-300 dark:border-white/10 dark:bg-white/5 dark:hover:border-white/20"}`,
887
- children: [
888
- /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-4 w-4 flex-shrink-0 ${isSelected ? color : "text-gray-400 dark:text-gray-500"}` }),
889
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
890
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs font-semibold ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-300"}`, children: model.name }),
891
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: providerLabel })
892
- ] }),
893
- isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-3.5 w-3.5 shrink-0 text-indigo-500" })
894
- ]
895
- },
896
- model.id
897
- );
898
- }),
899
- incompatibleModels.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
900
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 mb-1 text-[9px] font-medium text-gray-400 dark:text-gray-500", children: t("agentDrawer.incompatibleWithFramework") }),
901
- incompatibleModels.map((model) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5 rounded-lg border border-gray-200/30 px-3 py-2 opacity-40 dark:border-white/5", children: [
902
- /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4 text-gray-400" }),
903
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: model.name })
904
- ] }, model.id))
905
- ] })
906
- ] })
907
- ] });
908
- })()
909
- ] });
910
- }
911
789
  function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
912
790
  if (agentTools.length === 0) {
913
791
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
@@ -943,7 +821,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
943
821
  ] }),
944
822
  tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.description }),
945
823
  tool.compatibleFrameworks && tool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-0.5", children: tool.compatibleFrameworks.map((framework) => {
946
- const meta = chunkEFOXN3LC_js.getFrameworkMeta(framework);
824
+ const meta = chunkM7KSEUZR_js.getFrameworkMeta(framework);
947
825
  const isCurrentFw = framework === agentFramework;
948
826
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[8px] font-medium ${isCurrentFw ? meta.badgeColor : "bg-gray-100 text-gray-500 dark:bg-white/5 dark:text-gray-400"}`, children: [
949
827
  /* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
@@ -960,7 +838,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
960
838
  event.stopPropagation();
961
839
  },
962
840
  children: /* @__PURE__ */ jsxRuntime.jsx(
963
- chunkI2NZGVBG_js.ToggleSwitch,
841
+ chunkFSBR4RCK_js.ToggleSwitch,
964
842
  {
965
843
  checked: isEnabled,
966
844
  onChange: () => onToggle(tool.agentToolId),
@@ -979,155 +857,188 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
979
857
  })
980
858
  ] });
981
859
  }
982
- function AdvancedTab({
983
- displayName,
984
- setDisplayName,
985
- description,
986
- setDescription,
860
+ function EngineTab({
861
+ agent,
862
+ models,
863
+ t,
864
+ selectedModelId,
865
+ setSelectedModelId,
866
+ selectedFramework,
867
+ setSelectedFramework,
868
+ temperature,
869
+ setTemperature,
870
+ elo,
871
+ setElo,
987
872
  maxOutputTokens,
988
873
  setMaxOutputTokens,
989
874
  topP,
990
875
  setTopP,
991
876
  topK,
992
877
  setTopK,
993
- tags,
994
- setTags,
995
- status,
996
- setStatus,
997
- avatarUrl,
998
- setAvatarUrl,
999
- markDirty,
1000
- t
878
+ modelProviders,
879
+ selectedProviderId,
880
+ onSelectProvider,
881
+ markDirty
1001
882
  }) {
1002
- const wrap = "w-full rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2 text-sm text-gray-800 outline-none transition-colors focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 dark:border-white/10 dark:bg-white/5 dark:text-gray-200";
1003
- const labelCls = "mb-1 block text-xs font-medium text-gray-500 dark:text-gray-400";
1004
- const touch = () => markDirty();
1005
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
1006
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
1007
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1008
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.displayName", { _: "Display name" }) }),
1009
- /* @__PURE__ */ jsxRuntime.jsx("input", { className: wrap, value: displayName, onChange: (e) => {
1010
- setDisplayName(e.target.value);
1011
- touch();
1012
- } })
883
+ const modelObj = models.find((m) => m.id === selectedModelId);
884
+ const modelName = modelObj?.name ?? selectedModelId ?? "\u2014";
885
+ const family = getModelFamily(selectedModelId);
886
+ const compatibleProviders = findCompatibleProviders(selectedModelId, modelProviders);
887
+ const configuredCompatible = compatibleProviders.filter((p) => p.configured);
888
+ const effectiveProvider = compatibleProviders.find((p) => p.id === selectedProviderId) ?? configuredCompatible[0] ?? compatibleProviders[0];
889
+ const frameworkMeta = chunkM7KSEUZR_js.getFrameworkMeta(selectedFramework);
890
+ const inputCard = "liquid-surface w-full rounded-lg px-3 py-1.5 text-sm text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
891
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-hidden rounded-2xl border border-indigo-500/20 bg-gradient-to-b from-indigo-500/[0.04] via-violet-500/[0.03] to-purple-500/[0.04] dark:border-indigo-400/20 dark:from-indigo-500/[0.10] dark:via-violet-500/[0.06] dark:to-purple-500/[0.08]", children: [
892
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-3 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
893
+ AgentCapabilityCard,
894
+ {
895
+ elo,
896
+ setElo,
897
+ models,
898
+ selectedModelId,
899
+ setSelectedModelId,
900
+ temperature,
901
+ setTemperature,
902
+ onChanged: markDirty,
903
+ t
904
+ }
905
+ ) }),
906
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 text-[9px] font-semibold uppercase tracking-wider text-indigo-500/70 dark:text-indigo-400/70", children: [
907
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" }),
908
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
909
+ "\u2193 ",
910
+ t("agentDrawer.derives", { _: "deriva" })
1013
911
  ] }),
1014
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1015
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.status", { _: "Status" }) }),
1016
- /* @__PURE__ */ jsxRuntime.jsxs("select", { className: wrap, value: status, onChange: (e) => {
1017
- setStatus(e.target.value);
1018
- touch();
1019
- }, children: [
1020
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "draft", children: "draft" }),
1021
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "active", children: "active" }),
1022
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "archived", children: "archived" })
1023
- ] })
1024
- ] })
1025
- ] }),
1026
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
1027
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.description", { _: "Description" }) }),
1028
- /* @__PURE__ */ jsxRuntime.jsx(
1029
- "textarea",
1030
- {
1031
- className: wrap,
1032
- rows: 3,
1033
- value: description,
1034
- onChange: (e) => {
1035
- setDescription(e.target.value);
1036
- touch();
1037
- },
1038
- placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" })
1039
- }
1040
- )
1041
- ] }),
1042
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
1043
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.avatarUrl", { _: "Avatar URL" }) }),
1044
- /* @__PURE__ */ jsxRuntime.jsx("input", { className: wrap, value: avatarUrl, onChange: (e) => {
1045
- setAvatarUrl(e.target.value);
1046
- touch();
1047
- }, placeholder: "https://\u2026" })
912
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" })
1048
913
  ] }),
1049
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
1050
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1051
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.maxOutputTokens", { _: "Max output tokens" }) }),
1052
- /* @__PURE__ */ jsxRuntime.jsx(
1053
- "input",
1054
- {
1055
- type: "number",
1056
- min: 1,
1057
- max: 32768,
1058
- className: wrap,
1059
- value: maxOutputTokens,
1060
- onChange: (e) => {
1061
- setMaxOutputTokens(Number(e.target.value) || 0);
1062
- touch();
1063
- }
1064
- }
1065
- )
914
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
915
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
916
+ /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "mt-0.5 h-5 w-5 text-indigo-500 dark:text-indigo-400" }),
917
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
918
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: modelName }),
919
+ compatibleProviders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-amber-600 dark:text-amber-400", children: t("agentDrawer.noProviderForFamily", { _: "Nenhum provedor configurado serve a fam\xEDlia " + family }) }) : configuredCompatible.length > 1 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 flex items-center gap-1.5", children: [
920
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: t("agentDrawer.servedVia", { _: "via" }) }),
921
+ /* @__PURE__ */ jsxRuntime.jsx(
922
+ "select",
923
+ {
924
+ value: effectiveProvider?.id ?? "",
925
+ onChange: (event) => {
926
+ onSelectProvider(event.target.value);
927
+ markDirty();
928
+ },
929
+ className: "liquid-surface rounded-md px-2 py-0.5 text-[10px] font-semibold text-gray-900 outline-none focus:ring-1 focus:ring-indigo-300/40 dark:text-white",
930
+ children: configuredCompatible.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, children: p.name }, p.id))
931
+ }
932
+ ),
933
+ effectiveProvider && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-semibold ${effectiveProvider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: [
934
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1 w-1 rounded-full ${effectiveProvider.configured ? "bg-emerald-500" : "bg-amber-500"}` }),
935
+ effectiveProvider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" })
936
+ ] })
937
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: [
938
+ t("agentDrawer.servedVia", { _: "via" }),
939
+ " ",
940
+ effectiveProvider?.name ?? family,
941
+ effectiveProvider && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `ml-2 inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-semibold ${effectiveProvider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: [
942
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1 w-1 rounded-full ${effectiveProvider.configured ? "bg-emerald-500" : "bg-amber-500"}` }),
943
+ effectiveProvider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" })
944
+ ] })
945
+ ] })
946
+ ] })
1066
947
  ] }),
1067
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1068
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.topP", { _: "Top-p" }) }),
1069
- /* @__PURE__ */ jsxRuntime.jsx(
1070
- "input",
1071
- {
1072
- type: "number",
1073
- step: 0.05,
1074
- min: 0,
1075
- max: 1,
1076
- className: wrap,
1077
- value: topP,
1078
- onChange: (e) => {
1079
- setTopP(Number(e.target.value) || 0);
1080
- touch();
1081
- }
1082
- }
1083
- )
948
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-semibold ${frameworkMeta.badgeColor}`, children: [
949
+ /* @__PURE__ */ jsxRuntime.jsx(frameworkMeta.IconComponent, { className: "h-3.5 w-3.5" }),
950
+ frameworkMeta.label
951
+ ] })
952
+ ] }) }),
953
+ /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group border-t border-indigo-500/15 bg-white/30 px-4 py-2.5 dark:border-indigo-400/15 dark:bg-white/[0.02]", children: [
954
+ /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: [
955
+ /* @__PURE__ */ jsxRuntime.jsx(outline.Cog6ToothIcon, { className: "h-3 w-3" }),
956
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("agentDrawer.overrideDerivation", { _: "Override \xB7 ajustes avan\xE7ados" }) }),
957
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto font-normal text-gray-400 group-open:hidden", children: "\u25BE" }),
958
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto hidden font-normal text-gray-400 group-open:inline", children: "\u25B4" })
1084
959
  ] }),
1085
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1086
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.topK", { _: "Top-k" }) }),
960
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[10px] italic text-gray-400 dark:text-gray-500", children: t("agentDrawer.overrideHint", { _: "Mude framework, modelo manual ou tokens s\xF3 se a deriva\xE7\xE3o por ELO n\xE3o atender." }) }),
961
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 space-y-4", children: [
1087
962
  /* @__PURE__ */ jsxRuntime.jsx(
1088
- "input",
963
+ ConfigTab,
1089
964
  {
1090
- type: "number",
1091
- min: 0,
1092
- max: 500,
1093
- className: wrap,
1094
- value: topK,
1095
- onChange: (e) => {
1096
- setTopK(Number(e.target.value) || 0);
1097
- touch();
1098
- }
965
+ models,
966
+ t,
967
+ selectedModelId,
968
+ setSelectedModelId,
969
+ selectedFramework,
970
+ setSelectedFramework,
971
+ markDirty,
972
+ connectedProviderTypes: modelProviders.map((p) => p.provider)
1099
973
  }
1100
- )
974
+ ),
975
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
976
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.generationParams", { _: "Par\xE2metros de gera\xE7\xE3o" }) }),
977
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: [
978
+ { key: "max", labelKey: "agentDrawer.maxOutputTokens", label: "Max output", value: maxOutputTokens, setter: setMaxOutputTokens, step: 1, min: 1, max: 32768 },
979
+ { key: "topP", labelKey: "agentDrawer.topP", label: "Top-p", value: topP, setter: setTopP, step: 0.05, min: 0, max: 1 },
980
+ { key: "topK", labelKey: "agentDrawer.topK", label: "Top-k", value: topK, setter: setTopK, step: 1, min: 0, max: 500 }
981
+ ].map((field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${inputCard} flex flex-col items-center !py-2`, children: [
982
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[8px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t(field.labelKey, { _: field.label }) }),
983
+ /* @__PURE__ */ jsxRuntime.jsx(
984
+ "input",
985
+ {
986
+ type: "number",
987
+ step: field.step,
988
+ min: field.min,
989
+ max: field.max,
990
+ value: field.value,
991
+ onChange: (event) => {
992
+ field.setter(Number(event.target.value) || 0);
993
+ markDirty();
994
+ },
995
+ className: "w-full bg-transparent text-center text-sm font-semibold tabular-nums text-gray-900 outline-none dark:text-white"
996
+ }
997
+ )
998
+ ] }, field.key)) })
999
+ ] }),
1000
+ modelProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1001
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
1002
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.providerCredentials", { _: "Credenciais do provedor" }) }),
1003
+ /* @__PURE__ */ jsxRuntime.jsx(
1004
+ "a",
1005
+ {
1006
+ href: "/settings/integrations",
1007
+ className: "text-[10px] font-medium text-indigo-600 hover:text-indigo-700 dark:text-indigo-400 dark:hover:text-indigo-300",
1008
+ children: t("agentDrawer.manageCredentials", { _: "Gerenciar \u2192" })
1009
+ }
1010
+ )
1011
+ ] }),
1012
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: modelProviders.map((provider) => /* @__PURE__ */ jsxRuntime.jsxs(
1013
+ "div",
1014
+ {
1015
+ className: "flex items-center gap-2 rounded-lg border border-gray-200/50 bg-white/40 px-3 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",
1016
+ children: [
1017
+ /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3 w-3 shrink-0 text-gray-500 dark:text-gray-400" }),
1018
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-semibold text-gray-900 dark:text-white", children: provider.name }),
1019
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `shrink-0 rounded-full px-1.5 py-0.5 text-[8px] font-semibold uppercase ${provider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: provider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" }) }),
1020
+ provider.apiKeyMasked && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto truncate font-mono text-[9px] text-gray-400 dark:text-gray-500", title: provider.credentialRef, children: provider.apiKeyMasked })
1021
+ ]
1022
+ },
1023
+ provider.id
1024
+ )) }),
1025
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-[10px] text-gray-400 dark:text-gray-500", children: selectedProviderId ? "" : t("agentDrawer.providerHint", { _: "Credenciais s\xE3o configuradas no n\xEDvel da conta. Aqui voc\xEA s\xF3 confere o que est\xE1 conectado." }) })
1026
+ ] })
1101
1027
  ] })
1102
- ] }),
1103
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
1104
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.tags", { _: "Tags (comma-separated)" }) }),
1105
- /* @__PURE__ */ jsxRuntime.jsx(
1106
- "input",
1107
- {
1108
- className: wrap,
1109
- value: tags,
1110
- onChange: (e) => {
1111
- setTags(e.target.value);
1112
- touch();
1113
- },
1114
- placeholder: "pricing, research, internal"
1115
- }
1116
- )
1117
1028
  ] })
1118
- ] });
1029
+ ] }) });
1119
1030
  }
1120
1031
  function AgentModal({ onSaved, onPersist }) {
1121
1032
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
1122
- const activeModal = chunkEFOXN3LC_js.useModalStore((s) => s.activeModal);
1123
- const agentData = chunkEFOXN3LC_js.useModalStore((s) => s.agentData);
1124
- const closeModal = chunkEFOXN3LC_js.useModalStore((s) => s.closeModal);
1033
+ const activeModal = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal);
1034
+ const agentData = chunkM7KSEUZR_js.useModalStore((s) => s.agentData);
1035
+ const closeModal = chunkM7KSEUZR_js.useModalStore((s) => s.closeModal);
1125
1036
  const open = activeModal === "agent";
1126
1037
  const agent = agentData?.agent ?? null;
1127
1038
  const models = agentData?.models ?? [];
1128
1039
  const availableAgentTools = agentData?.agentTools ?? [];
1129
1040
  const isCreateMode = agentData?.isCreateMode ?? false;
1130
- const [activeTab, setActiveTab] = react.useState("profile");
1041
+ const [activeTab, setActiveTab] = react.useState("config");
1131
1042
  const [selectedModelId, setSelectedModelId] = react.useState("");
1132
1043
  const [selectedFramework, setSelectedFramework] = react.useState("custom");
1133
1044
  const [temperature, setTemperature] = react.useState(0.7);
@@ -1155,7 +1066,7 @@ function AgentModal({ onSaved, onPersist }) {
1155
1066
  setTemperature(agent.temperature ?? 0.7);
1156
1067
  setElo(Number(agent.elo ?? 1e3));
1157
1068
  setSaved(!isCreateMode);
1158
- setActiveTab("profile");
1069
+ setActiveTab("config");
1159
1070
  const agentToolIds = agent.agentToolIds;
1160
1071
  setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
1161
1072
  setSelectedProviderId(agent.modelProviderId ?? "");
@@ -1228,7 +1139,6 @@ function AgentModal({ onSaved, onPersist }) {
1228
1139
  setPersisting(true);
1229
1140
  if (onPersist) await onPersist(payload);
1230
1141
  markSaved();
1231
- onSaved?.();
1232
1142
  } catch (error) {
1233
1143
  console.error("[AgentModal] onPersist failed", error);
1234
1144
  } finally {
@@ -1256,113 +1166,208 @@ function AgentModal({ onSaved, onPersist }) {
1256
1166
  onSaved,
1257
1167
  onPersist
1258
1168
  ]);
1169
+ react.useEffect(() => {
1170
+ if (!dirty || persisting) return;
1171
+ const handle = setTimeout(() => {
1172
+ void handleMarkSaved();
1173
+ }, 700);
1174
+ return () => clearTimeout(handle);
1175
+ }, [dirty, persisting, handleMarkSaved]);
1259
1176
  if (!agent) return null;
1260
- const sections = [
1261
- { id: "profile", label: t("agentDrawer.profileSection"), icon: outline.UserCircleIcon, group: t("agentDrawer.agentGroup") },
1262
- { id: "framework", label: t("agentDrawer.frameworkSection"), icon: outline.Cog6ToothIcon, group: t("agentDrawer.agentGroup") },
1263
- { id: "prompt", label: t("agentDrawer.promptSection"), icon: outline.SparklesIcon, group: t("agentDrawer.agentGroup") },
1264
- { id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: outline.CommandLineIcon, group: t("agentDrawer.configGroup") },
1265
- { id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: outline.KeyIcon, group: t("agentDrawer.configGroup") },
1266
- { id: "advanced", label: t("agentDrawer.advancedTab", { _: "Advanced" }), icon: outline.Cog6ToothIcon, group: t("agentDrawer.configGroup") },
1267
- { id: "results", label: t("agentDrawer.resultsTab"), icon: outline.PlayCircleIcon, group: t("agentDrawer.executionGroup") }
1268
- ];
1177
+ const sections = [];
1269
1178
  const effectiveAvatarUrl = avatarUrl || agent.avatar;
1270
- const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
1271
- /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "flex-1 text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("agentDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("agentDrawer.saved") }) }),
1179
+ const fieldCard = "liquid-surface w-full rounded-lg px-2.5 py-1.5 text-xs text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
1180
+ const fieldLabel = "text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400";
1181
+ const avatarNode = effectiveAvatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(
1182
+ "img",
1183
+ {
1184
+ src: effectiveAvatarUrl,
1185
+ alt: displayName || agent.name,
1186
+ className: "h-full w-full rounded-full bg-white object-cover ring-2 ring-white shadow-sm dark:bg-gray-800 dark:ring-gray-800",
1187
+ loading: "lazy"
1188
+ }
1189
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 text-sm font-bold text-white ring-2 ring-white shadow-sm dark:ring-gray-800", children: (displayName || agent.name).charAt(0).toUpperCase() });
1190
+ const statusPill = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
1191
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[9px] font-semibold ${status === "active" ? "text-emerald-600 dark:text-emerald-400" : "text-slate-500"}`, children: status === "active" ? t("agentDrawer.statusActive", { _: "Active" }) : t("agentDrawer.statusInactive", { _: "Inactive" }) }),
1272
1192
  /* @__PURE__ */ jsxRuntime.jsx(
1273
- "button",
1193
+ chunkFSBR4RCK_js.ToggleSwitch,
1274
1194
  {
1275
- type: "button",
1276
- onClick: () => {
1277
- void handleMarkSaved();
1195
+ size: "sm",
1196
+ color: "green",
1197
+ checked: status === "active",
1198
+ onChange: (checked) => {
1199
+ setStatus(checked ? "active" : "draft");
1200
+ markDirty();
1278
1201
  },
1279
- disabled: !dirty || persisting,
1280
- className: `rounded-lg px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition-all ${dirty && !persisting ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
1281
- children: persisting ? "\u2026" : t("agentDrawer.save")
1202
+ label: t("agentDrawer.status", { _: "Status" })
1282
1203
  }
1283
1204
  )
1284
1205
  ] });
1285
- return /* @__PURE__ */ jsxRuntime.jsxs(
1286
- chunkI2NZGVBG_js.GlassModal,
1206
+ const identityCard = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface rounded-2xl p-3 ring-1 ring-slate-200/50 dark:ring-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(
1207
+ chunkFSBR4RCK_js.HeroBlock,
1208
+ {
1209
+ icon: avatarNode,
1210
+ iconShape: "round",
1211
+ iconBackground: "none",
1212
+ iconSize: "lg",
1213
+ headingLevel: "h2",
1214
+ title: displayName,
1215
+ onTitleChange: (next) => {
1216
+ setDisplayName(next);
1217
+ markDirty();
1218
+ },
1219
+ titlePlaceholder: agent.name,
1220
+ subtitle: agent.role,
1221
+ rightContent: statusPill,
1222
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1223
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1224
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.description", { _: "Description" }) }),
1225
+ /* @__PURE__ */ jsxRuntime.jsx(
1226
+ "textarea",
1227
+ {
1228
+ rows: 2,
1229
+ value: description,
1230
+ onChange: (event) => {
1231
+ setDescription(event.target.value);
1232
+ markDirty();
1233
+ },
1234
+ placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" }),
1235
+ className: `${fieldCard} resize-none`
1236
+ }
1237
+ )
1238
+ ] }),
1239
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1240
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.tags", { _: "Tags" }) }),
1241
+ /* @__PURE__ */ jsxRuntime.jsx(
1242
+ "input",
1243
+ {
1244
+ type: "text",
1245
+ value: tagsText,
1246
+ onChange: (event) => {
1247
+ setTagsText(event.target.value);
1248
+ markDirty();
1249
+ },
1250
+ placeholder: t("agentDrawer.tagsPlaceholder", { _: "pricing, research, internal" }),
1251
+ className: fieldCard
1252
+ }
1253
+ )
1254
+ ] })
1255
+ ] })
1256
+ }
1257
+ ) });
1258
+ const autosaveLabel = persisting ? t("agentDrawer.saving", { _: "Saving\u2026" }) : dirty ? t("agentDrawer.pendingAutosave", { _: "Saving in a moment\u2026" }) : t("agentDrawer.autoSaved", { _: "Auto-saved" });
1259
+ const autosaveColor = persisting ? "text-indigo-500 dark:text-indigo-400" : dirty ? "text-amber-500 dark:text-amber-400" : "text-emerald-500 dark:text-emerald-400";
1260
+ const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "status", "aria-live": "polite", className: "flex items-center gap-1.5 px-1 py-2 text-xs", children: [
1261
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `relative inline-flex h-1.5 w-1.5 shrink-0 rounded-full ${persisting ? "bg-indigo-500" : dirty ? "bg-amber-500" : "bg-emerald-500"}`, children: persisting && /* @__PURE__ */ jsxRuntime.jsx(
1262
+ "span",
1263
+ {
1264
+ "aria-hidden": "true",
1265
+ className: "absolute inset-0 motion-safe:animate-ping rounded-full bg-indigo-500/60"
1266
+ }
1267
+ ) }),
1268
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `font-medium ${autosaveColor}`, children: autosaveLabel })
1269
+ ] });
1270
+ return /* @__PURE__ */ jsxRuntime.jsx(
1271
+ chunkFSBR4RCK_js.GlassModal,
1287
1272
  {
1288
1273
  open,
1289
1274
  onClose: handleClose,
1290
1275
  title: agent.name,
1291
- subtitle: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1292
1276
  gradient: "from-indigo-500 to-purple-600",
1293
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-white" }),
1277
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1294
1278
  label: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1295
1279
  sidebar: {
1296
1280
  sections,
1297
1281
  activeSectionId: activeTab,
1298
1282
  onSectionChange: (sectionId) => setActiveTab(sectionId),
1299
- identity: {
1300
- displayName: displayName || agent.name,
1301
- profileInitial: (displayName || agent.name).charAt(0).toUpperCase(),
1302
- avatarUrl: effectiveAvatarUrl,
1303
- role: agent.role
1304
- },
1283
+ identityCard,
1305
1284
  footer: sidebarFooter
1306
1285
  },
1307
- children: [
1308
- activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
1309
- activeTab === "framework" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), markDirty, connectedProviderTypes: availableModelProviders.map((p) => p.provider) }),
1310
- activeTab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(
1311
- PromptTab,
1286
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
1287
+ /* @__PURE__ */ jsxRuntime.jsx(
1288
+ chunkFSBR4RCK_js.SectionCard,
1312
1289
  {
1313
- agent,
1314
- temperature,
1315
- setTemperature,
1316
- markDirty,
1317
- t,
1318
- promptText: systemPrompt,
1319
- setPromptText: setSystemPrompt,
1320
- outputSchema,
1321
- setOutputSchema
1290
+ variant: "glass",
1291
+ padded: false,
1292
+ collapsible: true,
1293
+ defaultOpen: true,
1294
+ header: {
1295
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.Cog6ToothIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1296
+ title: t("agentDrawer.engineTab"),
1297
+ subtitle: t("agentDrawer.engineSubtitle", { _: "Como o agente roda \u2014 capacidade, modelo, credenciais" })
1298
+ },
1299
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1300
+ EngineTab,
1301
+ {
1302
+ agent,
1303
+ models,
1304
+ t,
1305
+ selectedModelId,
1306
+ setSelectedModelId,
1307
+ selectedFramework,
1308
+ setSelectedFramework: (fw) => setSelectedFramework(fw),
1309
+ temperature,
1310
+ setTemperature,
1311
+ elo,
1312
+ setElo,
1313
+ maxOutputTokens,
1314
+ setMaxOutputTokens,
1315
+ topP,
1316
+ setTopP,
1317
+ topK,
1318
+ setTopK,
1319
+ modelProviders: availableModelProviders,
1320
+ selectedProviderId,
1321
+ onSelectProvider: handleSelectProvider,
1322
+ markDirty
1323
+ }
1324
+ )
1322
1325
  }
1323
1326
  ),
1324
- activeTab === "advanced" && /* @__PURE__ */ jsxRuntime.jsx(
1325
- AdvancedTab,
1327
+ /* @__PURE__ */ jsxRuntime.jsx(
1328
+ chunkFSBR4RCK_js.SectionCard,
1326
1329
  {
1327
- displayName,
1328
- setDisplayName,
1329
- description,
1330
- setDescription,
1331
- maxOutputTokens,
1332
- setMaxOutputTokens,
1333
- topP,
1334
- setTopP,
1335
- topK,
1336
- setTopK,
1337
- tags: tagsText,
1338
- setTags: setTagsText,
1339
- status,
1340
- setStatus,
1341
- avatarUrl,
1342
- setAvatarUrl: setAvatarUrlState,
1343
- markDirty,
1344
- t
1330
+ variant: "glass",
1331
+ padded: false,
1332
+ collapsible: true,
1333
+ defaultOpen: true,
1334
+ header: {
1335
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1336
+ title: t("agentDrawer.brainTab"),
1337
+ subtitle: t("agentDrawer.brainSubtitle", { _: "Como o agente pensa \u2014 prompt + criatividade" })
1338
+ },
1339
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1340
+ PromptTab,
1341
+ {
1342
+ agent,
1343
+ temperature,
1344
+ setTemperature,
1345
+ markDirty,
1346
+ t,
1347
+ promptText: systemPrompt,
1348
+ setPromptText: setSystemPrompt,
1349
+ outputSchema,
1350
+ setOutputSchema
1351
+ }
1352
+ )
1345
1353
  }
1346
1354
  ),
1347
- activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
1348
- activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
1349
- ModelsTab,
1355
+ /* @__PURE__ */ jsxRuntime.jsx(
1356
+ chunkFSBR4RCK_js.SectionCard,
1350
1357
  {
1351
- modelProviders: availableModelProviders,
1352
- selectedProviderId,
1353
- onSelectProvider: handleSelectProvider,
1354
- models,
1355
- selectedModelId,
1356
- onSelectModel: (modelId) => {
1357
- setSelectedModelId(modelId);
1358
- markDirty();
1358
+ variant: "glass",
1359
+ padded: false,
1360
+ collapsible: true,
1361
+ defaultOpen: true,
1362
+ header: {
1363
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1364
+ title: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`,
1365
+ subtitle: t("agentDrawer.toolsSubtitle", { _: "O que o agente pode invocar durante a execu\xE7\xE3o" })
1359
1366
  },
1360
- agentFramework: selectedFramework,
1361
- t
1367
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t })
1362
1368
  }
1363
- ),
1364
- activeTab === "results" && /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
1365
- ]
1369
+ )
1370
+ ] })
1366
1371
  }
1367
1372
  );
1368
1373
  }
@@ -1471,7 +1476,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1471
1476
  const markDirty = useSubworkflowStore((s) => s.markDirty);
1472
1477
  const markSaved = useSubworkflowStore((s) => s.markSaved);
1473
1478
  const closeModal = useSubworkflowStore((s) => s.closeModal);
1474
- const agentBehind = chunkEFOXN3LC_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1479
+ const agentBehind = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1475
1480
  const isCreateMode = !tool?.toolId;
1476
1481
  const initialGraph = react.useMemo(() => {
1477
1482
  const config = tool?.config;
@@ -1500,9 +1505,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1500
1505
  }, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
1501
1506
  if (!tool) return null;
1502
1507
  const categoryKey = category ?? "external";
1503
- const gradient = tool.color ?? chunkEFOXN3LC_js.CATEGORY_COLORS[categoryKey] ?? chunkEFOXN3LC_js.CATEGORY_COLORS.external;
1504
- const categoryPill = chunkEFOXN3LC_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkEFOXN3LC_js.CATEGORY_PILL_COLORS.external;
1505
- const IconComponent = chunkEFOXN3LC_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
1508
+ const gradient = tool.color ?? chunkM7KSEUZR_js.CATEGORY_COLORS[categoryKey] ?? chunkM7KSEUZR_js.CATEGORY_COLORS.external;
1509
+ const categoryPill = chunkM7KSEUZR_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkM7KSEUZR_js.CATEGORY_PILL_COLORS.external;
1510
+ const IconComponent = chunkM7KSEUZR_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
1506
1511
  const graph = latestGraphRef.current;
1507
1512
  const startNode = graph.nodes.find((n) => n.type === "start");
1508
1513
  const endNode = graph.nodes.find((n) => n.type === "end");
@@ -1535,7 +1540,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1535
1540
  ] })
1536
1541
  ] });
1537
1542
  return /* @__PURE__ */ jsxRuntime.jsx(
1538
- chunkI2NZGVBG_js.GlassModal,
1543
+ chunkFSBR4RCK_js.GlassModal,
1539
1544
  {
1540
1545
  open,
1541
1546
  onClose: closeModal,
@@ -1567,7 +1572,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1567
1572
  {
1568
1573
  type: "button",
1569
1574
  onClick: () => setCategory(cat),
1570
- className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkEFOXN3LC_js.CATEGORY_PILL_COLORS[cat] ?? chunkEFOXN3LC_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
1575
+ className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkM7KSEUZR_js.CATEGORY_PILL_COLORS[cat] ?? chunkM7KSEUZR_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
1571
1576
  children: cat
1572
1577
  },
1573
1578
  cat
@@ -1654,7 +1659,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1654
1659
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
1655
1660
  ] }),
1656
1661
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1657
- chunkEFOXN3LC_js.WorkflowCanvas,
1662
+ chunkM7KSEUZR_js.WorkflowCanvas,
1658
1663
  {
1659
1664
  initialGraph,
1660
1665
  agents: [],
@@ -1670,9 +1675,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1670
1675
  }
1671
1676
  function PipelineSettingsModal({ onSave }) {
1672
1677
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
1673
- const activeModal = chunkEFOXN3LC_js.useModalStore((s) => s.activeModal);
1674
- const data = chunkEFOXN3LC_js.useModalStore((s) => s.pipelineSettingsData);
1675
- const closeModal = chunkEFOXN3LC_js.useModalStore((s) => s.closeModal);
1678
+ const activeModal = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal);
1679
+ const data = chunkM7KSEUZR_js.useModalStore((s) => s.pipelineSettingsData);
1680
+ const closeModal = chunkM7KSEUZR_js.useModalStore((s) => s.closeModal);
1676
1681
  const open = activeModal === "pipeline-settings";
1677
1682
  const [nameValue, setNameValue] = react.useState("");
1678
1683
  const [descriptionValue, setDescriptionValue] = react.useState("");
@@ -1734,7 +1739,7 @@ function PipelineSettingsModal({ onSave }) {
1734
1739
  }
1735
1740
  ),
1736
1741
  /* @__PURE__ */ jsxRuntime.jsxs(
1737
- chunkI2NZGVBG_js.Button,
1742
+ chunkFSBR4RCK_js.Button,
1738
1743
  {
1739
1744
  type: "submit",
1740
1745
  form: "pipeline-settings-form",
@@ -1749,7 +1754,7 @@ function PipelineSettingsModal({ onSave }) {
1749
1754
  )
1750
1755
  ] });
1751
1756
  return /* @__PURE__ */ jsxRuntime.jsx(
1752
- chunkI2NZGVBG_js.GlassModal,
1757
+ chunkFSBR4RCK_js.GlassModal,
1753
1758
  {
1754
1759
  open,
1755
1760
  onClose: closeModal,
@@ -1763,7 +1768,7 @@ function PipelineSettingsModal({ onSave }) {
1763
1768
  onSubmit: handleSubmit,
1764
1769
  children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: "pipeline-settings-form", onSubmit: handleSubmit, className: "space-y-5", children: [
1765
1770
  /* @__PURE__ */ jsxRuntime.jsx(
1766
- chunkI2NZGVBG_js.FormInput,
1771
+ chunkFSBR4RCK_js.FormInput,
1767
1772
  {
1768
1773
  label: t("pipelineName"),
1769
1774
  value: nameValue,
@@ -1773,7 +1778,7 @@ function PipelineSettingsModal({ onSave }) {
1773
1778
  }
1774
1779
  ),
1775
1780
  /* @__PURE__ */ jsxRuntime.jsx(
1776
- chunkI2NZGVBG_js.FormTextarea,
1781
+ chunkFSBR4RCK_js.FormTextarea,
1777
1782
  {
1778
1783
  label: t("pipelineDescription"),
1779
1784
  value: descriptionValue,
@@ -1784,7 +1789,7 @@ function PipelineSettingsModal({ onSave }) {
1784
1789
  ),
1785
1790
  lifecycleAvailable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1786
1791
  /* @__PURE__ */ jsxRuntime.jsx(
1787
- chunkI2NZGVBG_js.FormInput,
1792
+ chunkFSBR4RCK_js.FormInput,
1788
1793
  {
1789
1794
  label: t("pipelineSlug", { _: "Slug" }),
1790
1795
  value: slugValue,
@@ -1911,7 +1916,7 @@ function RunReplayModal({
1911
1916
  }
1912
1917
  ),
1913
1918
  /* @__PURE__ */ jsxRuntime.jsxs(
1914
- chunkI2NZGVBG_js.Button,
1919
+ chunkFSBR4RCK_js.Button,
1915
1920
  {
1916
1921
  type: "submit",
1917
1922
  form: "run-replay-form",
@@ -1926,7 +1931,7 @@ function RunReplayModal({
1926
1931
  ] })
1927
1932
  ] });
1928
1933
  return /* @__PURE__ */ jsxRuntime.jsx(
1929
- chunkI2NZGVBG_js.GlassModal,
1934
+ chunkFSBR4RCK_js.GlassModal,
1930
1935
  {
1931
1936
  open,
1932
1937
  onClose,
@@ -2000,7 +2005,7 @@ function RowEditor({
2000
2005
  ]
2001
2006
  }
2002
2007
  ) : isJson ? /* @__PURE__ */ jsxRuntime.jsx(
2003
- chunkI2NZGVBG_js.FormTextarea,
2008
+ chunkFSBR4RCK_js.FormTextarea,
2004
2009
  {
2005
2010
  value: row.value,
2006
2011
  onValueChange: (v) => onChange({ value: v }),
@@ -2008,7 +2013,7 @@ function RowEditor({
2008
2013
  className: "font-mono"
2009
2014
  }
2010
2015
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2011
- chunkI2NZGVBG_js.FormInput,
2016
+ chunkFSBR4RCK_js.FormInput,
2012
2017
  {
2013
2018
  type: row.kind === "number" ? "number" : "text",
2014
2019
  value: row.value,
@@ -2112,13 +2117,13 @@ function ExecutionTimelinePanel({
2112
2117
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium text-slate-900 dark:text-white", children: entry.nodeId }),
2113
2118
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2114
2119
  ] }),
2115
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.Badge, { color: meta.color, children: [
2120
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.Badge, { color: meta.color, children: [
2116
2121
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "mr-1 h-3 w-3" }),
2117
2122
  labels[entry.status]
2118
2123
  ] })
2119
2124
  ] }),
2120
2125
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
2121
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration2(entry.durationMs) }),
2126
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration(entry.durationMs) }),
2122
2127
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
2123
2128
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatTimestamp(entry.startedAt) })
2124
2129
  ] })
@@ -2142,7 +2147,7 @@ function NodeInspector({
2142
2147
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-slate-900 dark:text-white", children: entry.nodeId }),
2143
2148
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2144
2149
  ] }),
2145
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: meta.color, children: labels[entry.status] })
2150
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: meta.color, children: labels[entry.status] })
2146
2151
  ] }),
2147
2152
  /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-2 gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
2148
2153
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -2155,7 +2160,7 @@ function NodeInspector({
2155
2160
  ] }),
2156
2161
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2157
2162
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-semibold", children: labels.duration }),
2158
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration2(entry.durationMs) })
2163
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration(entry.durationMs) })
2159
2164
  ] }),
2160
2165
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2161
2166
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-semibold", children: labels.status }),
@@ -2209,7 +2214,7 @@ function hasMetrics(metrics) {
2209
2214
  metrics.model || metrics.tokensIn !== void 0 || metrics.tokensOut !== void 0 || metrics.costUsd !== void 0
2210
2215
  );
2211
2216
  }
2212
- function formatDuration2(ms) {
2217
+ function formatDuration(ms) {
2213
2218
  if (ms === null) return "\u2014";
2214
2219
  if (ms < 1e3) return `${ms}ms`;
2215
2220
  if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
@@ -2312,7 +2317,7 @@ function RuleConditionBuilder({ value, onChange, depth = 0 }) {
2312
2317
  };
2313
2318
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
2314
2319
  /* @__PURE__ */ jsxRuntime.jsx(
2315
- chunkI2NZGVBG_js.FormSelect,
2320
+ chunkFSBR4RCK_js.FormSelect,
2316
2321
  {
2317
2322
  label: "Operator",
2318
2323
  value: value.operator,
@@ -2335,7 +2340,7 @@ function SimpleEditor({
2335
2340
  const isTruthy = value.operator === "truthy";
2336
2341
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2337
2342
  /* @__PURE__ */ jsxRuntime.jsx(
2338
- chunkI2NZGVBG_js.FormInput,
2343
+ chunkFSBR4RCK_js.FormInput,
2339
2344
  {
2340
2345
  label: "Field",
2341
2346
  hint: "Dotted reference into the variable pool \u2014 e.g. `parse-pricing.margin`, `inputs.category`",
@@ -2345,7 +2350,7 @@ function SimpleEditor({
2345
2350
  }
2346
2351
  ),
2347
2352
  !isTruthy && /* @__PURE__ */ jsxRuntime.jsx(
2348
- chunkI2NZGVBG_js.FormInput,
2353
+ chunkFSBR4RCK_js.FormInput,
2349
2354
  {
2350
2355
  label: "Value",
2351
2356
  hint: "Literal. Numeric operators coerce via `as f64`.",
@@ -2361,7 +2366,7 @@ function ThresholdEditor({
2361
2366
  }) {
2362
2367
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
2363
2368
  /* @__PURE__ */ jsxRuntime.jsx(
2364
- chunkI2NZGVBG_js.FormInput,
2369
+ chunkFSBR4RCK_js.FormInput,
2365
2370
  {
2366
2371
  label: "Field",
2367
2372
  value: value.field ?? "",
@@ -2370,7 +2375,7 @@ function ThresholdEditor({
2370
2375
  }
2371
2376
  ),
2372
2377
  /* @__PURE__ */ jsxRuntime.jsx(
2373
- chunkI2NZGVBG_js.FormSelect,
2378
+ chunkFSBR4RCK_js.FormSelect,
2374
2379
  {
2375
2380
  label: "Direction",
2376
2381
  value: value.comparison ?? "gte",
@@ -2384,7 +2389,7 @@ function ThresholdEditor({
2384
2389
  }
2385
2390
  ),
2386
2391
  /* @__PURE__ */ jsxRuntime.jsx(
2387
- chunkI2NZGVBG_js.FormInput,
2392
+ chunkFSBR4RCK_js.FormInput,
2388
2393
  {
2389
2394
  label: "Threshold",
2390
2395
  type: "number",
@@ -2401,7 +2406,7 @@ function RegexEditor({
2401
2406
  }) {
2402
2407
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2403
2408
  /* @__PURE__ */ jsxRuntime.jsx(
2404
- chunkI2NZGVBG_js.FormInput,
2409
+ chunkFSBR4RCK_js.FormInput,
2405
2410
  {
2406
2411
  label: "Field",
2407
2412
  value: value.field ?? "",
@@ -2410,7 +2415,7 @@ function RegexEditor({
2410
2415
  }
2411
2416
  ),
2412
2417
  /* @__PURE__ */ jsxRuntime.jsx(
2413
- chunkI2NZGVBG_js.FormInput,
2418
+ chunkFSBR4RCK_js.FormInput,
2414
2419
  {
2415
2420
  label: "Pattern",
2416
2421
  hint: "Rust regex syntax \u2014 `(?i)` etc. supported.",
@@ -2438,7 +2443,7 @@ function TimeWindowEditor({
2438
2443
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2439
2444
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2440
2445
  /* @__PURE__ */ jsxRuntime.jsx(
2441
- chunkI2NZGVBG_js.FormSelect,
2446
+ chunkFSBR4RCK_js.FormSelect,
2442
2447
  {
2443
2448
  label: "Timezone",
2444
2449
  value: value.timezone ?? "UTC",
@@ -2447,7 +2452,7 @@ function TimeWindowEditor({
2447
2452
  }
2448
2453
  ),
2449
2454
  /* @__PURE__ */ jsxRuntime.jsx(
2450
- chunkI2NZGVBG_js.FormInput,
2455
+ chunkFSBR4RCK_js.FormInput,
2451
2456
  {
2452
2457
  label: "Timestamp field (optional)",
2453
2458
  hint: "Pulls a timestamp from the pool. Leave blank to use the run's wall-clock.",
@@ -2460,7 +2465,7 @@ function TimeWindowEditor({
2460
2465
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2461
2466
  windows.map((win, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2 rounded-lg border border-slate-200 p-2 dark:border-slate-700", children: [
2462
2467
  /* @__PURE__ */ jsxRuntime.jsx(
2463
- chunkI2NZGVBG_js.FormInput,
2468
+ chunkFSBR4RCK_js.FormInput,
2464
2469
  {
2465
2470
  label: `Start (hour)`,
2466
2471
  type: "number",
@@ -2471,7 +2476,7 @@ function TimeWindowEditor({
2471
2476
  }
2472
2477
  ),
2473
2478
  /* @__PURE__ */ jsxRuntime.jsx(
2474
- chunkI2NZGVBG_js.FormInput,
2479
+ chunkFSBR4RCK_js.FormInput,
2475
2480
  {
2476
2481
  label: `End (hour)`,
2477
2482
  type: "number",
@@ -2481,9 +2486,9 @@ function TimeWindowEditor({
2481
2486
  onValueChange: (raw) => update(index, { endHour: clampHour(raw, 24) })
2482
2487
  }
2483
2488
  ),
2484
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2489
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2485
2490
  ] }, index)),
2486
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2491
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2487
2492
  ] })
2488
2493
  ] });
2489
2494
  }
@@ -2506,7 +2511,7 @@ function BooleanGroupEditor({
2506
2511
  });
2507
2512
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2508
2513
  /* @__PURE__ */ jsxRuntime.jsx(
2509
- chunkI2NZGVBG_js.FormSelect,
2514
+ chunkFSBR4RCK_js.FormSelect,
2510
2515
  {
2511
2516
  label: "Combinator",
2512
2517
  value: value.combinator ?? "and",
@@ -2524,9 +2529,9 @@ function BooleanGroupEditor({
2524
2529
  depth
2525
2530
  }
2526
2531
  ),
2527
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
2532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
2528
2533
  ] }, index)),
2529
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2534
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2530
2535
  ] })
2531
2536
  ] });
2532
2537
  }
@@ -2562,7 +2567,7 @@ function RuleActionBuilder({ value, onChange }) {
2562
2567
  };
2563
2568
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
2564
2569
  /* @__PURE__ */ jsxRuntime.jsx(
2565
- chunkI2NZGVBG_js.FormSelect,
2570
+ chunkFSBR4RCK_js.FormSelect,
2566
2571
  {
2567
2572
  label: "Action type",
2568
2573
  value: type,
@@ -2572,7 +2577,7 @@ function RuleActionBuilder({ value, onChange }) {
2572
2577
  ),
2573
2578
  type === "adjust_price" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2574
2579
  /* @__PURE__ */ jsxRuntime.jsx(
2575
- chunkI2NZGVBG_js.FormInput,
2580
+ chunkFSBR4RCK_js.FormInput,
2576
2581
  {
2577
2582
  label: "Multiplier",
2578
2583
  type: "number",
@@ -2582,7 +2587,7 @@ function RuleActionBuilder({ value, onChange }) {
2582
2587
  }
2583
2588
  ),
2584
2589
  /* @__PURE__ */ jsxRuntime.jsx(
2585
- chunkI2NZGVBG_js.FormInput,
2590
+ chunkFSBR4RCK_js.FormInput,
2586
2591
  {
2587
2592
  label: "Reason code",
2588
2593
  value: stringParam(params.reason),
@@ -2592,7 +2597,7 @@ function RuleActionBuilder({ value, onChange }) {
2592
2597
  )
2593
2598
  ] }),
2594
2599
  type === "enforce_min_margin" && /* @__PURE__ */ jsxRuntime.jsx(
2595
- chunkI2NZGVBG_js.FormInput,
2600
+ chunkFSBR4RCK_js.FormInput,
2596
2601
  {
2597
2602
  label: "Floor (fraction, e.g. 0.08)",
2598
2603
  type: "number",
@@ -2602,7 +2607,7 @@ function RuleActionBuilder({ value, onChange }) {
2602
2607
  }
2603
2608
  ),
2604
2609
  type === "realign_to_competitor" && /* @__PURE__ */ jsxRuntime.jsx(
2605
- chunkI2NZGVBG_js.FormInput,
2610
+ chunkFSBR4RCK_js.FormInput,
2606
2611
  {
2607
2612
  label: "Tolerance (fraction)",
2608
2613
  type: "number",
@@ -2612,7 +2617,7 @@ function RuleActionBuilder({ value, onChange }) {
2612
2617
  }
2613
2618
  ),
2614
2619
  type === "request_manager_approval" && /* @__PURE__ */ jsxRuntime.jsx(
2615
- chunkI2NZGVBG_js.FormInput,
2620
+ chunkFSBR4RCK_js.FormInput,
2616
2621
  {
2617
2622
  label: "Approval limit (fraction)",
2618
2623
  type: "number",
@@ -2622,7 +2627,7 @@ function RuleActionBuilder({ value, onChange }) {
2622
2627
  }
2623
2628
  ),
2624
2629
  type === "round_to" && /* @__PURE__ */ jsxRuntime.jsx(
2625
- chunkI2NZGVBG_js.FormInput,
2630
+ chunkFSBR4RCK_js.FormInput,
2626
2631
  {
2627
2632
  label: "Step (e.g. 0.009)",
2628
2633
  type: "number",
@@ -2633,7 +2638,7 @@ function RuleActionBuilder({ value, onChange }) {
2633
2638
  ),
2634
2639
  type === "alert" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2635
2640
  /* @__PURE__ */ jsxRuntime.jsx(
2636
- chunkI2NZGVBG_js.FormInput,
2641
+ chunkFSBR4RCK_js.FormInput,
2637
2642
  {
2638
2643
  label: "Channel",
2639
2644
  value: stringParam(params.channel),
@@ -2642,7 +2647,7 @@ function RuleActionBuilder({ value, onChange }) {
2642
2647
  }
2643
2648
  ),
2644
2649
  /* @__PURE__ */ jsxRuntime.jsx(
2645
- chunkI2NZGVBG_js.FormInput,
2650
+ chunkFSBR4RCK_js.FormInput,
2646
2651
  {
2647
2652
  label: "Severity",
2648
2653
  value: stringParam(params.severity),
@@ -2680,7 +2685,7 @@ function CustomParamsEditor({
2680
2685
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2681
2686
  entries.map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2", children: [
2682
2687
  /* @__PURE__ */ jsxRuntime.jsx(
2683
- chunkI2NZGVBG_js.FormInput,
2688
+ chunkFSBR4RCK_js.FormInput,
2684
2689
  {
2685
2690
  label: "Key",
2686
2691
  value: key,
@@ -2688,16 +2693,16 @@ function CustomParamsEditor({
2688
2693
  }
2689
2694
  ),
2690
2695
  /* @__PURE__ */ jsxRuntime.jsx(
2691
- chunkI2NZGVBG_js.FormInput,
2696
+ chunkFSBR4RCK_js.FormInput,
2692
2697
  {
2693
2698
  label: "Value",
2694
2699
  value: String(value ?? ""),
2695
2700
  onValueChange: (raw) => update(index, key, raw)
2696
2701
  }
2697
2702
  ),
2698
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2703
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2699
2704
  ] }, index)),
2700
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2705
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2701
2706
  ] });
2702
2707
  }
2703
2708
  function numberParam(value, fallback) {
@@ -2727,9 +2732,9 @@ function RuleForm({ value, onChange }) {
2727
2732
  );
2728
2733
  const update = (key, v) => onChange({ ...value, [key]: v });
2729
2734
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
2730
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.FormGrid, { children: [
2735
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.FormGrid, { children: [
2731
2736
  /* @__PURE__ */ jsxRuntime.jsx(
2732
- chunkI2NZGVBG_js.FormInput,
2737
+ chunkFSBR4RCK_js.FormInput,
2733
2738
  {
2734
2739
  label: "Name",
2735
2740
  required: true,
@@ -2738,7 +2743,7 @@ function RuleForm({ value, onChange }) {
2738
2743
  }
2739
2744
  ),
2740
2745
  /* @__PURE__ */ jsxRuntime.jsx(
2741
- chunkI2NZGVBG_js.FormInput,
2746
+ chunkFSBR4RCK_js.FormInput,
2742
2747
  {
2743
2748
  label: "Priority",
2744
2749
  type: "number",
@@ -2748,7 +2753,7 @@ function RuleForm({ value, onChange }) {
2748
2753
  }
2749
2754
  ),
2750
2755
  /* @__PURE__ */ jsxRuntime.jsx(
2751
- chunkI2NZGVBG_js.FormSelect,
2756
+ chunkFSBR4RCK_js.FormSelect,
2752
2757
  {
2753
2758
  label: "Enabled",
2754
2759
  value: value.enabled ? "true" : "false",
@@ -2760,7 +2765,7 @@ function RuleForm({ value, onChange }) {
2760
2765
  }
2761
2766
  ),
2762
2767
  /* @__PURE__ */ jsxRuntime.jsx(
2763
- chunkI2NZGVBG_js.FormTextarea,
2768
+ chunkFSBR4RCK_js.FormTextarea,
2764
2769
  {
2765
2770
  label: "Description",
2766
2771
  rows: 2,
@@ -2772,7 +2777,7 @@ function RuleForm({ value, onChange }) {
2772
2777
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2773
2778
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2774
2779
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Condition" }),
2775
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: "indigo", children: value.condition.operator })
2780
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: "indigo", children: value.condition.operator })
2776
2781
  ] }),
2777
2782
  /* @__PURE__ */ jsxRuntime.jsx(
2778
2783
  RuleConditionBuilder,
@@ -2785,7 +2790,7 @@ function RuleForm({ value, onChange }) {
2785
2790
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2786
2791
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2787
2792
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Action on match" }),
2788
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: "fuchsia", children: value.action.type })
2793
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: "fuchsia", children: value.action.type })
2789
2794
  ] }),
2790
2795
  /* @__PURE__ */ jsxRuntime.jsx(
2791
2796
  RuleActionBuilder,
@@ -2807,7 +2812,7 @@ function RuleForm({ value, onChange }) {
2807
2812
  ),
2808
2813
  showAdvanced && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2809
2814
  /* @__PURE__ */ jsxRuntime.jsx(
2810
- chunkI2NZGVBG_js.FormInput,
2815
+ chunkFSBR4RCK_js.FormInput,
2811
2816
  {
2812
2817
  label: "Valid from (ISO 8601)",
2813
2818
  type: "datetime-local",
@@ -2816,7 +2821,7 @@ function RuleForm({ value, onChange }) {
2816
2821
  }
2817
2822
  ),
2818
2823
  /* @__PURE__ */ jsxRuntime.jsx(
2819
- chunkI2NZGVBG_js.FormInput,
2824
+ chunkFSBR4RCK_js.FormInput,
2820
2825
  {
2821
2826
  label: "Valid until (ISO 8601)",
2822
2827
  type: "datetime-local",
@@ -2825,7 +2830,7 @@ function RuleForm({ value, onChange }) {
2825
2830
  }
2826
2831
  ),
2827
2832
  /* @__PURE__ */ jsxRuntime.jsx(
2828
- chunkI2NZGVBG_js.FormSelect,
2833
+ chunkFSBR4RCK_js.FormSelect,
2829
2834
  {
2830
2835
  label: "Status",
2831
2836
  value: value.status ?? "active",
@@ -2834,7 +2839,7 @@ function RuleForm({ value, onChange }) {
2834
2839
  }
2835
2840
  ),
2836
2841
  /* @__PURE__ */ jsxRuntime.jsx(
2837
- chunkI2NZGVBG_js.FormInput,
2842
+ chunkFSBR4RCK_js.FormInput,
2838
2843
  {
2839
2844
  label: "Tags (comma-separated)",
2840
2845
  value: (value.tags ?? []).join(", "),
@@ -2909,7 +2914,7 @@ function getDatasourceLogo(entityId) {
2909
2914
  }
2910
2915
  return null;
2911
2916
  }
2912
- var PROVIDER_LOGOS2 = {
2917
+ var PROVIDER_LOGOS3 = {
2913
2918
  anthropic: "/logos/providers/anthropic.svg",
2914
2919
  amazon: "/logos/providers/aws.svg",
2915
2920
  google: "/logos/providers/google-gemini.svg",
@@ -2951,6 +2956,8 @@ var LOGIC_NODE_ITEMS = [
2951
2956
  { nodeType: "answer", nameKey: "answerNode", descriptionKey: "answerNodeDescription", subcategory: "ai_ml" },
2952
2957
  { nodeType: "question_classifier", nameKey: "questionClassifierNode", descriptionKey: "questionClassifierNodeDescription", subcategory: "ai_ml" },
2953
2958
  { nodeType: "parameter_extractor", nameKey: "parameterExtractorNode", descriptionKey: "parameterExtractorNodeDescription", subcategory: "ai_ml" },
2959
+ { nodeType: "audio_input", nameKey: "audioInputNode", descriptionKey: "audioInputNodeDescription", subcategory: "ai_ml" },
2960
+ { nodeType: "speech_transcriber", nameKey: "speechTranscriberNode", descriptionKey: "speechTranscriberNodeDescription", subcategory: "ai_ml" },
2954
2961
  // Annotation
2955
2962
  { nodeType: "note", nameKey: "noteNode", descriptionKey: "noteNodeDescription", subcategory: "annotation" },
2956
2963
  // Output
@@ -3019,9 +3026,9 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
3019
3026
  ] });
3020
3027
  }
3021
3028
  function LogicNodeItemCard({ item, translationFunction }) {
3022
- const IconComponent = chunkEFOXN3LC_js.LOGIC_ICON_MAP[item.nodeType];
3023
- const gradient = chunkEFOXN3LC_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
3024
- const defaultConfig = chunkC3H4FM4A_js.createDefaultLogicNodeConfig(item.nodeType);
3029
+ const IconComponent = chunkM7KSEUZR_js.LOGIC_ICON_MAP[item.nodeType];
3030
+ const gradient = chunkM7KSEUZR_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
3031
+ const defaultConfig = chunk72SWXOD5_js.createDefaultLogicNodeConfig(item.nodeType);
3025
3032
  const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
3026
3033
  return /* @__PURE__ */ jsxRuntime.jsxs(
3027
3034
  "div",
@@ -3091,7 +3098,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3091
3098
  [entityTypes, normalizedQuery]
3092
3099
  );
3093
3100
  const filteredLogicItems = react.useMemo(() => {
3094
- const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkEFOXN3LC_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3101
+ const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkM7KSEUZR_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3095
3102
  if (!normalizedQuery) return visibleByDefault;
3096
3103
  return visibleByDefault.filter(
3097
3104
  (item) => t(item.nameKey).toLowerCase().includes(normalizedQuery) || t(item.descriptionKey).toLowerCase().includes(normalizedQuery)
@@ -3140,31 +3147,70 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3140
3147
  onAdd: onCreateAgent,
3141
3148
  addLabel: t("newAgent"),
3142
3149
  count: filteredAgents.length,
3143
- children: filteredAgents.length === 0 && filteredAgentTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: filteredAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
3144
- "div",
3145
- {
3146
- draggable: true,
3147
- onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
3148
- className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3149
- children: [
3150
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
3151
- agent.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: agent.avatar, alt: agent.name, className: "h-7 w-7 rounded-full bg-white shadow-sm ring-1 ring-gray-200/50 dark:bg-gray-800 dark:ring-white/10" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3152
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-indigo-500 ring-1.5 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-2 w-2 text-white" }) })
3153
- ] }),
3154
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3155
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
3156
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
3157
- (() => {
3158
- const tier = chunkC3H4FM4A_js.getAgentTier(Number(agent.elo ?? 0));
3159
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
3160
- })()
3150
+ children: filteredAgents.length === 0 && filteredAgentTools.length === 0 && filteredProviders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3151
+ filteredAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
3152
+ "div",
3153
+ {
3154
+ draggable: true,
3155
+ onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
3156
+ className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3157
+ children: [
3158
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
3159
+ agent.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: agent.avatar, alt: agent.name, className: "h-7 w-7 rounded-full bg-white shadow-sm ring-1 ring-gray-200/50 dark:bg-gray-800 dark:ring-white/10" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3160
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-indigo-500 ring-1.5 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-2 w-2 text-white" }) })
3161
3161
  ] }),
3162
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
3163
- ] })
3164
- ]
3165
- },
3166
- agent.agentId
3167
- )) })
3162
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3163
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
3164
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
3165
+ (() => {
3166
+ const tier = chunk72SWXOD5_js.getAgentTier(Number(agent.elo ?? 0));
3167
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
3168
+ })()
3169
+ ] }),
3170
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
3171
+ ] })
3172
+ ]
3173
+ },
3174
+ agent.agentId
3175
+ )),
3176
+ filteredProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 border-t border-gray-200/40 pt-2 dark:border-white/5", children: [
3177
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1.5 px-1 text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400", children: t("connectionsSection") }),
3178
+ filteredProviders.map((provider) => {
3179
+ const providerLogo = PROVIDER_LOGOS3[provider.provider];
3180
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3181
+ "div",
3182
+ {
3183
+ draggable: true,
3184
+ onDragStart: (event) => {
3185
+ const defaultConfig = JSON.stringify({
3186
+ type: "model_provider",
3187
+ providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
3188
+ name: provider.name,
3189
+ modelFilter: []
3190
+ });
3191
+ onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
3192
+ },
3193
+ onClick: () => onConfigureProvider?.(provider.id),
3194
+ className: "liquid-surface group mb-1 flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3195
+ role: "button",
3196
+ tabIndex: 0,
3197
+ children: [
3198
+ providerLogo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/10 p-1", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: providerLogo, alt: "", className: "h-4 w-4 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3199
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3200
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
3201
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
3202
+ provider.modelCount,
3203
+ " models"
3204
+ ] })
3205
+ ] }),
3206
+ provider.configured ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
3207
+ ]
3208
+ },
3209
+ provider.id
3210
+ );
3211
+ })
3212
+ ] })
3213
+ ] })
3168
3214
  }
3169
3215
  ),
3170
3216
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3188,7 +3234,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3188
3234
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.category })
3189
3235
  ] }),
3190
3236
  /* @__PURE__ */ jsxRuntime.jsx(
3191
- chunkI2NZGVBG_js.ToggleSwitch,
3237
+ chunkFSBR4RCK_js.ToggleSwitch,
3192
3238
  {
3193
3239
  checked: Boolean(tool.enabled),
3194
3240
  onChange: () => {
@@ -3229,7 +3275,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3229
3275
  ] })
3230
3276
  ] }),
3231
3277
  /* @__PURE__ */ jsxRuntime.jsx(
3232
- chunkI2NZGVBG_js.ToggleSwitch,
3278
+ chunkFSBR4RCK_js.ToggleSwitch,
3233
3279
  {
3234
3280
  checked: Boolean(rule.enabled),
3235
3281
  onChange: () => {
@@ -3265,8 +3311,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3265
3311
  limit: entity.defaultLimit
3266
3312
  });
3267
3313
  const dsLogo = getDatasourceLogo(entity.id);
3268
- const EntityIcon = chunkEFOXN3LC_js.getEntityIcon(entity.id);
3269
- const entityGradient = chunkEFOXN3LC_js.getEntityGradient(entity.id);
3314
+ const EntityIcon = chunkM7KSEUZR_js.getEntityIcon(entity.id);
3315
+ const entityGradient = chunkM7KSEUZR_js.getEntityGradient(entity.id);
3270
3316
  return /* @__PURE__ */ jsxRuntime.jsxs(
3271
3317
  "div",
3272
3318
  {
@@ -3286,7 +3332,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3286
3332
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3287
3333
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-slate-100 px-1.5 py-0.5 text-[9px] font-medium text-slate-600 dark:bg-white/10 dark:text-slate-300", children: "Read only" }),
3288
3334
  /* @__PURE__ */ jsxRuntime.jsx(
3289
- chunkI2NZGVBG_js.ToggleSwitch,
3335
+ chunkFSBR4RCK_js.ToggleSwitch,
3290
3336
  {
3291
3337
  checked: true,
3292
3338
  onChange: () => {
@@ -3305,49 +3351,6 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3305
3351
  })
3306
3352
  }
3307
3353
  ),
3308
- filteredProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3309
- CollapsibleSection,
3310
- {
3311
- title: t("connectionsSection"),
3312
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3 w-3" }),
3313
- colorClass: "text-slate-600 dark:text-slate-400",
3314
- count: filteredProviders.length,
3315
- children: filteredProviders.map((provider) => {
3316
- const providerLogo = PROVIDER_LOGOS2[provider.provider];
3317
- return /* @__PURE__ */ jsxRuntime.jsxs(
3318
- "div",
3319
- {
3320
- draggable: true,
3321
- onDragStart: (event) => {
3322
- const defaultConfig = JSON.stringify({
3323
- type: "model_provider",
3324
- providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
3325
- name: provider.name,
3326
- modelFilter: []
3327
- });
3328
- onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
3329
- },
3330
- onClick: () => onConfigureProvider?.(provider.id),
3331
- className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3332
- role: "button",
3333
- tabIndex: 0,
3334
- children: [
3335
- providerLogo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/10 p-1", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: providerLogo, alt: "", className: "h-4 w-4 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3336
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3337
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
3338
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
3339
- provider.modelCount,
3340
- " models"
3341
- ] })
3342
- ] }),
3343
- provider.configured ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
3344
- ]
3345
- },
3346
- provider.id
3347
- );
3348
- })
3349
- }
3350
- ),
3351
3354
  /* @__PURE__ */ jsxRuntime.jsxs(
3352
3355
  CollapsibleSection,
3353
3356
  {
@@ -3542,7 +3545,7 @@ function VersionHistoryPanel({
3542
3545
  )
3543
3546
  ] }),
3544
3547
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto", children: [
3545
- isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "version-history-loading", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent" }) }),
3548
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "version-history-loading", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-6 animate-spin motion-reduce:animate-none rounded-full border-2 border-blue-500 border-t-transparent" }) }),
3546
3549
  loadError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-8 text-center", "data-testid": "version-history-error", children: [
3547
3550
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-500 dark:text-red-400", children: loadError }),
3548
3551
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3655,7 +3658,7 @@ var STATUS_CONFIG = {
3655
3658
  label: "error"
3656
3659
  }
3657
3660
  };
3658
- function formatDuration3(durationMs) {
3661
+ function formatDuration2(durationMs) {
3659
3662
  if (durationMs < 1e3) {
3660
3663
  return `${durationMs}ms`;
3661
3664
  }
@@ -3664,9 +3667,9 @@ function formatDuration3(durationMs) {
3664
3667
  }
3665
3668
  function RunPanel({ open, onClose, onRun, onStop }) {
3666
3669
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
3667
- const nodes = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodes);
3668
- const isRunning = chunkEFOXN3LC_js.useWorkflowStore((state) => state.isRunning);
3669
- const nodeResults = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodeResults);
3670
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
3671
+ const isRunning = chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
3672
+ const nodeResults = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
3670
3673
  const startNode = nodes.find((node) => node.type === "start");
3671
3674
  const hasEndNode = nodes.some((node) => node.type === "end");
3672
3675
  const hasValidStartConfig = Boolean(
@@ -3685,10 +3688,24 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3685
3688
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3686
3689
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-4 w-4 text-gray-500 dark:text-gray-400" }),
3687
3690
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: translations("title") }),
3688
- isRunning && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium text-blue-700 dark:bg-blue-500/20 dark:text-blue-300", children: [
3689
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-blue-500" }),
3690
- translations("executing")
3691
- ] })
3691
+ isRunning && /* @__PURE__ */ jsxRuntime.jsxs(
3692
+ "span",
3693
+ {
3694
+ role: "status",
3695
+ "aria-live": "polite",
3696
+ className: "flex items-center gap-1 rounded-full bg-blue-100 px-2 py-0.5 text-[11px] font-medium text-blue-800 dark:bg-blue-500/20 dark:text-blue-200",
3697
+ children: [
3698
+ /* @__PURE__ */ jsxRuntime.jsx(
3699
+ "span",
3700
+ {
3701
+ "aria-hidden": "true",
3702
+ className: "h-1.5 w-1.5 motion-safe:animate-pulse rounded-full bg-blue-500"
3703
+ }
3704
+ ),
3705
+ translations("executing")
3706
+ ]
3707
+ }
3708
+ )
3692
3709
  ] }),
3693
3710
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3694
3711
  isRunning ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3749,7 +3766,7 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3749
3766
  ] }),
3750
3767
  result?.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-red-500 dark:text-red-400", children: result.error })
3751
3768
  ] }),
3752
- result?.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatDuration3(result.durationMs) })
3769
+ result?.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatDuration2(result.durationMs) })
3753
3770
  ]
3754
3771
  },
3755
3772
  node.id
@@ -3763,7 +3780,7 @@ function SpinnerIcon({ className }) {
3763
3780
  return /* @__PURE__ */ jsxRuntime.jsxs(
3764
3781
  "svg",
3765
3782
  {
3766
- className: `animate-spin ${className ?? ""}`,
3783
+ className: `animate-spin motion-reduce:animate-none ${className ?? ""}`,
3767
3784
  viewBox: "0 0 24 24",
3768
3785
  fill: "none",
3769
3786
  stroke: "currentColor",
@@ -3849,6 +3866,21 @@ function inferVariables(config, nodeType) {
3849
3866
  variables.push({ name: "body", direction: "input", variableType: "string" });
3850
3867
  }
3851
3868
  break;
3869
+ case "audio_input":
3870
+ variables.push({ name: "url", direction: "input", variableType: "string" });
3871
+ variables.push({ name: "url", direction: "output", variableType: "string" });
3872
+ variables.push({ name: "format", direction: "output", variableType: "string" });
3873
+ variables.push({ name: "sourceType", direction: "output", variableType: "string" });
3874
+ break;
3875
+ case "speech_transcriber":
3876
+ variables.push({ name: "audioUrl", direction: "input", variableType: "string" });
3877
+ variables.push({ name: "text", direction: "output", variableType: "string" });
3878
+ variables.push({ name: "language", direction: "output", variableType: "string" });
3879
+ variables.push({ name: "durationMs", direction: "output", variableType: "number" });
3880
+ variables.push({ name: "segments", direction: "output", variableType: "array" });
3881
+ variables.push({ name: "model", direction: "output", variableType: "string" });
3882
+ variables.push({ name: "provider", direction: "output", variableType: "string" });
3883
+ break;
3852
3884
  case "s3_write":
3853
3885
  variables.push({ name: "key", direction: "input", variableType: "string" });
3854
3886
  if (config.sourceUrl) {
@@ -3968,8 +4000,8 @@ function inferVariables(config, nodeType) {
3968
4000
  }
3969
4001
  function VariableInspector({ open, onClose }) {
3970
4002
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
3971
- const nodes = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodes);
3972
- const edges = chunkEFOXN3LC_js.useWorkflowStore((state) => state.edges);
4003
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
4004
+ const edges = chunkM7KSEUZR_js.useWorkflowStore((state) => state.edges);
3973
4005
  const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
3974
4006
  const toggleNodeExpansion = react.useCallback((nodeId) => {
3975
4007
  setExpandedNodes((current) => {
@@ -4031,8 +4063,8 @@ function VariableInspector({ open, onClose }) {
4031
4063
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
4032
4064
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
4033
4065
  const isExpanded = expandedNodes.has(entry.nodeId);
4034
- const IconComponent = chunkEFOXN3LC_js.LOGIC_ICON_MAP[entry.nodeType];
4035
- const gradient = chunkEFOXN3LC_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
4066
+ const IconComponent = chunkM7KSEUZR_js.LOGIC_ICON_MAP[entry.nodeType];
4067
+ const gradient = chunkM7KSEUZR_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
4036
4068
  const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
4037
4069
  const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
4038
4070
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
@@ -4098,7 +4130,7 @@ function RunInputDialog({
4098
4130
  onRun
4099
4131
  }) {
4100
4132
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
4101
- const nodes = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodes);
4133
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
4102
4134
  const [values, setValues] = react.useState({});
4103
4135
  const inputVariableNames = react.useMemo(() => {
4104
4136
  const storeStartNode = nodes.find((node) => node.type === "start");
@@ -4125,7 +4157,7 @@ function RunInputDialog({
4125
4157
  }, [onClose]);
4126
4158
  if (!open) return null;
4127
4159
  return /* @__PURE__ */ jsxRuntime.jsxs(
4128
- chunkI2NZGVBG_js.GlassModal,
4160
+ chunkFSBR4RCK_js.GlassModal,
4129
4161
  {
4130
4162
  open,
4131
4163
  onClose: handleClose,
@@ -4136,7 +4168,7 @@ function RunInputDialog({
4136
4168
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: inputVariableNames.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: t("noInputs") }) : inputVariableNames.map((variableName) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4137
4169
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: variableName }),
4138
4170
  /* @__PURE__ */ jsxRuntime.jsx(
4139
- chunkI2NZGVBG_js.Input,
4171
+ chunkFSBR4RCK_js.Input,
4140
4172
  {
4141
4173
  value: values[variableName] ?? "",
4142
4174
  onChange: (event) => handleValueChange(variableName, event.target.value),
@@ -4145,8 +4177,8 @@ function RunInputDialog({
4145
4177
  )
4146
4178
  ] }, variableName)) }),
4147
4179
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex items-center justify-end gap-2", children: [
4148
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
4149
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
4180
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
4181
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
4150
4182
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-3.5 w-3.5", "data-slot": "icon" }),
4151
4183
  t("run")
4152
4184
  ] })
@@ -4158,13 +4190,13 @@ function RunInputDialog({
4158
4190
  var STATUS_STYLES = {
4159
4191
  completed: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4160
4192
  failed: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4161
- running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin" },
4193
+ running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin motion-reduce:animate-none" },
4162
4194
  pending: { icon: outline.ClockIcon, colorClass: "text-gray-400" },
4163
4195
  success: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4164
4196
  error: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4165
4197
  skipped: { icon: outline.ClockIcon, colorClass: "text-gray-400" }
4166
4198
  };
4167
- function formatDuration4(durationMs) {
4199
+ function formatDuration3(durationMs) {
4168
4200
  if (durationMs === null) return "\u2014";
4169
4201
  if (durationMs < 1e3) return `${durationMs}ms`;
4170
4202
  return `${(durationMs / 1e3).toFixed(1)}s`;
@@ -4179,8 +4211,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4179
4211
  const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
4180
4212
  const [selectedRun, setSelectedRun] = react.useState(null);
4181
4213
  const [selectedNode, setSelectedNode] = react.useState(null);
4182
- const isRunning = chunkEFOXN3LC_js.useWorkflowStore((state) => state.isRunning);
4183
- const nodeResults = chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodeResults);
4214
+ const isRunning = chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
4215
+ const nodeResults = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
4184
4216
  const refreshRuns = react.useCallback(async () => {
4185
4217
  setIsLoadingRuns(true);
4186
4218
  try {
@@ -4215,7 +4247,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4215
4247
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
4216
4248
  isRunning && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-gray-200/50 px-4 py-3 dark:border-gray-700/50", children: [
4217
4249
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
4218
- /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "h-4 w-4 animate-spin text-blue-500" }),
4250
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "h-4 w-4 animate-spin motion-reduce:animate-none text-blue-500" }),
4219
4251
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-blue-600 dark:text-blue-400", children: t("activeRun") })
4220
4252
  ] }),
4221
4253
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 space-y-1 overflow-y-auto", children: Object.entries(nodeResults).map(([nodeId, result]) => {
@@ -4226,7 +4258,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4226
4258
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4227
4259
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-gray-700 dark:text-gray-300", children: nodeId.slice(0, 8) })
4228
4260
  ] }),
4229
- result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration4(result.durationMs) })
4261
+ result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration3(result.durationMs) })
4230
4262
  ] }, nodeId);
4231
4263
  }) })
4232
4264
  ] }),
@@ -4242,7 +4274,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4242
4274
  ] }),
4243
4275
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
4244
4276
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: t("duration") }),
4245
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration4(selectedNode.durationMs) })
4277
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration3(selectedNode.durationMs) })
4246
4278
  ] }),
4247
4279
  selectedNode.error && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4248
4280
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500", children: t("error") }),
@@ -4281,7 +4313,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4281
4313
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4282
4314
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: formatTimestamp2(run.createdAt) })
4283
4315
  ] }),
4284
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(run.totalDurationMs) })
4316
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(run.totalDurationMs) })
4285
4317
  ] }),
4286
4318
  run.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 truncate text-[10px] text-red-500", children: run.error })
4287
4319
  ]
@@ -4305,7 +4337,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4305
4337
  /* @__PURE__ */ jsxRuntime.jsx(NodeStatusIcon, { className: `h-3 w-3 ${nodeStatusStyle.colorClass}` }),
4306
4338
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: nodeResult.nodeType })
4307
4339
  ] }),
4308
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(nodeResult.durationMs) })
4340
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(nodeResult.durationMs) })
4309
4341
  ]
4310
4342
  },
4311
4343
  nodeResult.nodeId
@@ -4317,12 +4349,34 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4317
4349
  ] })
4318
4350
  ] });
4319
4351
  }
4320
- function SaveStatusBadge({ status }) {
4352
+ function SaveStatusBadge({ status, labels }) {
4353
+ const savingLabel = labels?.saving ?? "Salvando\u2026";
4354
+ const savedLabel = labels?.saved ?? "Salvo";
4321
4355
  if (status === "saving") {
4322
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-pulse text-[10px] text-gray-400 dark:text-gray-500", children: "\u2022" });
4356
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4357
+ /* @__PURE__ */ jsxRuntime.jsx(
4358
+ "span",
4359
+ {
4360
+ "aria-hidden": "true",
4361
+ className: "motion-safe:animate-pulse text-[11px] text-gray-500 dark:text-gray-400",
4362
+ children: "\u2022"
4363
+ }
4364
+ ),
4365
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savingLabel })
4366
+ ] });
4323
4367
  }
4324
4368
  if (status === "saved") {
4325
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-green-500/60 dark:text-green-400/50", children: "\u2713" });
4369
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4370
+ /* @__PURE__ */ jsxRuntime.jsx(
4371
+ "span",
4372
+ {
4373
+ "aria-hidden": "true",
4374
+ className: "text-[11px] text-emerald-600 dark:text-emerald-400",
4375
+ children: "\u2713"
4376
+ }
4377
+ ),
4378
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savedLabel })
4379
+ ] });
4326
4380
  }
4327
4381
  return null;
4328
4382
  }
@@ -4336,7 +4390,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4336
4390
  onAutoSaveGraph(graph);
4337
4391
  }, [onAutoSaveGraph, onGraphSnapshot]);
4338
4392
  return /* @__PURE__ */ jsxRuntime.jsx(
4339
- chunkEFOXN3LC_js.Workspace,
4393
+ chunkM7KSEUZR_js.Workspace,
4340
4394
  {
4341
4395
  ...workspaceProps,
4342
4396
  onGraphChange: handleGraphChange
@@ -4344,7 +4398,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4344
4398
  );
4345
4399
  });
4346
4400
  function DynamicIslandConfirm2(props) {
4347
- return /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.DynamicIslandConfirm, { ...props });
4401
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.DynamicIslandConfirm, { ...props });
4348
4402
  }
4349
4403
  var JSON_PREVIEW_LINE_LIMIT = 50;
4350
4404
  function DslExportModal({ open, onClose, workflow, graph }) {
@@ -4398,7 +4452,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4398
4452
  }, [jsonString, workflow.name, workflow.version]);
4399
4453
  if (!open) return null;
4400
4454
  return /* @__PURE__ */ jsxRuntime.jsx(
4401
- chunkI2NZGVBG_js.GlassModal,
4455
+ chunkFSBR4RCK_js.GlassModal,
4402
4456
  {
4403
4457
  open,
4404
4458
  onClose,
@@ -4440,7 +4494,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4440
4494
  ] }),
4441
4495
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
4442
4496
  /* @__PURE__ */ jsxRuntime.jsx(
4443
- chunkI2NZGVBG_js.Button,
4497
+ chunkFSBR4RCK_js.Button,
4444
4498
  {
4445
4499
  type: "button",
4446
4500
  onClick: handleCopyToClipboard,
@@ -4457,7 +4511,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4457
4511
  }
4458
4512
  ),
4459
4513
  /* @__PURE__ */ jsxRuntime.jsxs(
4460
- chunkI2NZGVBG_js.Button,
4514
+ chunkFSBR4RCK_js.Button,
4461
4515
  {
4462
4516
  type: "button",
4463
4517
  onClick: handleDownloadJson,
@@ -4616,7 +4670,7 @@ function DslImportModal({ open, onClose, onImport }) {
4616
4670
  }, []);
4617
4671
  if (!open) return null;
4618
4672
  return /* @__PURE__ */ jsxRuntime.jsx(
4619
- chunkI2NZGVBG_js.GlassModal,
4673
+ chunkFSBR4RCK_js.GlassModal,
4620
4674
  {
4621
4675
  open,
4622
4676
  onClose,
@@ -4656,7 +4710,7 @@ function DslImportModal({ open, onClose, onImport }) {
4656
4710
  ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "import-validation-result", children: [
4657
4711
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
4658
4712
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: fileName }),
4659
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
4713
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
4660
4714
  ] }),
4661
4715
  validationResult.isValid ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20", children: [
4662
4716
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4684,9 +4738,9 @@ function DslImportModal({ open, onClose, onImport }) {
4684
4738
  ] })
4685
4739
  ] }) }),
4686
4740
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
4687
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4741
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4688
4742
  /* @__PURE__ */ jsxRuntime.jsxs(
4689
- chunkI2NZGVBG_js.Button,
4743
+ chunkFSBR4RCK_js.Button,
4690
4744
  {
4691
4745
  type: "button",
4692
4746
  onClick: handleImport,
@@ -4707,14 +4761,14 @@ function DslImportModal({ open, onClose, onImport }) {
4707
4761
  }
4708
4762
 
4709
4763
  // src/astrlabe/store/selectors.ts
4710
- var useCanUndo = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.past.length > 0);
4711
- var useCanRedo = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.future.length > 0);
4712
- var useHasCopied = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.clipboard !== null);
4713
- var useContextMenu = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.contextMenu);
4714
- var useEditingNodeId = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.editingNodeId);
4715
- var useSelectedNodeCount = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
4716
- var useIsRunning = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.isRunning);
4717
- var useNodeResults = () => chunkEFOXN3LC_js.useWorkflowStore((state) => state.nodeResults);
4764
+ var useCanUndo = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.past.length > 0);
4765
+ var useCanRedo = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.future.length > 0);
4766
+ var useHasCopied = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.clipboard !== null);
4767
+ var useContextMenu = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.contextMenu);
4768
+ var useEditingNodeId = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.editingNodeId);
4769
+ var useSelectedNodeCount = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
4770
+ var useIsRunning = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
4771
+ var useNodeResults = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
4718
4772
  var DEFAULT_MAX_HISTORY = 50;
4719
4773
  function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
4720
4774
  const pastRef = react.useRef([]);
@@ -5001,6 +5055,7 @@ exports.DslImportModal = DslImportModal;
5001
5055
  exports.DynamicIslandConfirm = DynamicIslandConfirm2;
5002
5056
  exports.ExecutionTimelinePanel = ExecutionTimelinePanel;
5003
5057
  exports.MetaLlamaIcon = MetaLlamaIcon;
5058
+ exports.ModelProviderFlowNode = ModelProviderFlowNode;
5004
5059
  exports.NodePalette = NodePalette;
5005
5060
  exports.OutputSchemaBuilder = OutputSchemaBuilder;
5006
5061
  exports.PipelineSettingsModal = PipelineSettingsModal;
@@ -5037,5 +5092,5 @@ exports.useNodeResults = useNodeResults;
5037
5092
  exports.useSelectedNodeCount = useSelectedNodeCount;
5038
5093
  exports.useSubworkflowStore = useSubworkflowStore;
5039
5094
  exports.useUndoRedo = useUndoRedo;
5040
- //# sourceMappingURL=chunk-RL35XATZ.js.map
5041
- //# sourceMappingURL=chunk-RL35XATZ.js.map
5095
+ //# sourceMappingURL=chunk-ERCDMBRT.js.map
5096
+ //# sourceMappingURL=chunk-ERCDMBRT.js.map