@datatechsolutions/ui 3.3.0 → 3.5.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 (212) hide show
  1. package/dist/astrlabe/index.js +113 -113
  2. package/dist/astrlabe/index.mjs +6 -6
  3. package/dist/astrlabe/workflow-canvas.js +6 -6
  4. package/dist/astrlabe/workflow-canvas.mjs +5 -5
  5. package/dist/brand/index.js +0 -14
  6. package/dist/brand/index.js.map +1 -1
  7. package/dist/brand/index.mjs +0 -14
  8. package/dist/brand/index.mjs.map +1 -1
  9. package/dist/{chunk-2WXRRQM3.mjs → chunk-2MJAHST4.mjs} +554 -516
  10. package/dist/chunk-2MJAHST4.mjs.map +1 -0
  11. package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
  12. package/dist/chunk-2OZZH2IO.js.map +1 -0
  13. package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
  14. package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
  15. package/dist/{chunk-O6M3KDGT.mjs → chunk-3OLYSMI5.mjs} +41 -7
  16. package/dist/chunk-3OLYSMI5.mjs.map +1 -0
  17. package/dist/{chunk-GIQXB3BG.mjs → chunk-4PFU6A2B.mjs} +3 -3
  18. package/dist/{chunk-GIQXB3BG.mjs.map → chunk-4PFU6A2B.mjs.map} +1 -1
  19. package/dist/{chunk-3ZUMJTDT.mjs → chunk-5BEVTOZV.mjs} +4 -5
  20. package/dist/{chunk-3JJWPOK6.js.map → chunk-5BEVTOZV.mjs.map} +1 -1
  21. package/dist/{chunk-3JJWPOK6.js → chunk-5I7F7KZ6.js} +10 -11
  22. package/dist/chunk-5I7F7KZ6.js.map +1 -0
  23. package/dist/{chunk-BR2GAZKG.mjs → chunk-6V3DUBOZ.mjs} +7 -7
  24. package/dist/{chunk-BR2GAZKG.mjs.map → chunk-6V3DUBOZ.mjs.map} +1 -1
  25. package/dist/{chunk-5GDKCFM5.mjs → chunk-6W7VTZG6.mjs} +3 -3
  26. package/dist/{chunk-5GDKCFM5.mjs.map → chunk-6W7VTZG6.mjs.map} +1 -1
  27. package/dist/{chunk-IJAKZHXX.js → chunk-74MHWEDC.js} +684 -645
  28. package/dist/chunk-74MHWEDC.js.map +1 -0
  29. package/dist/{chunk-IRPS5UCS.mjs → chunk-7CEZB3ZD.mjs} +3 -3
  30. package/dist/{chunk-IRPS5UCS.mjs.map → chunk-7CEZB3ZD.mjs.map} +1 -1
  31. package/dist/{chunk-UDDZTTLO.mjs → chunk-7UHV6A4C.mjs} +6 -7
  32. package/dist/chunk-7UHV6A4C.mjs.map +1 -0
  33. package/dist/{chunk-ZM5MVWIT.js → chunk-A7FI4K7Z.js} +5 -6
  34. package/dist/chunk-A7FI4K7Z.js.map +1 -0
  35. package/dist/{chunk-MWPTSBAI.js → chunk-AVM53A3Y.js} +63 -29
  36. package/dist/chunk-AVM53A3Y.js.map +1 -0
  37. package/dist/{chunk-I2NZGVBG.js → chunk-AWDH6WNA.js} +1214 -5396
  38. package/dist/chunk-AWDH6WNA.js.map +1 -0
  39. package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
  40. package/dist/chunk-BUDZNAKL.mjs.map +1 -0
  41. package/dist/{chunk-OCELRSLO.js → chunk-BVXATTTA.js} +4 -4
  42. package/dist/{chunk-OCELRSLO.js.map → chunk-BVXATTTA.js.map} +1 -1
  43. package/dist/{chunk-W5OEBO6E.js → chunk-C4NRF2G2.js} +13 -14
  44. package/dist/chunk-C4NRF2G2.js.map +1 -0
  45. package/dist/{chunk-JSNRCYSO.js → chunk-CY2MBKVG.js} +4 -4
  46. package/dist/{chunk-JSNRCYSO.js.map → chunk-CY2MBKVG.js.map} +1 -1
  47. package/dist/{chunk-ZL6C2ZAF.js → chunk-FK3WDELF.js} +67 -67
  48. package/dist/{chunk-ZL6C2ZAF.js.map → chunk-FK3WDELF.js.map} +1 -1
  49. package/dist/{chunk-MVBIAXVN.mjs → chunk-IOEQ2GET.mjs} +14 -11
  50. package/dist/chunk-IOEQ2GET.mjs.map +1 -0
  51. package/dist/{chunk-AOUUZ52N.js → chunk-NCDBNGIB.js} +85 -86
  52. package/dist/chunk-NCDBNGIB.js.map +1 -0
  53. package/dist/{chunk-B67DP7MI.mjs → chunk-NJ5RVWLA.mjs} +4 -4
  54. package/dist/{chunk-B67DP7MI.mjs.map → chunk-NJ5RVWLA.mjs.map} +1 -1
  55. package/dist/{chunk-HDCUWUNH.js → chunk-NKXQYFS7.js} +28 -27
  56. package/dist/chunk-NKXQYFS7.js.map +1 -0
  57. package/dist/{chunk-JN6IL6OH.mjs → chunk-NOHHZ6FM.mjs} +1171 -5316
  58. package/dist/chunk-NOHHZ6FM.mjs.map +1 -0
  59. package/dist/{chunk-PCYL4MII.mjs → chunk-OASC7NYV.mjs} +156 -314
  60. package/dist/chunk-OASC7NYV.mjs.map +1 -0
  61. package/dist/{chunk-RXZNACMI.js → chunk-P43PX75J.js} +33 -33
  62. package/dist/{chunk-RXZNACMI.js.map → chunk-P43PX75J.js.map} +1 -1
  63. package/dist/{chunk-OL73LBX5.mjs → chunk-QLFSJ6HK.mjs} +3 -4
  64. package/dist/chunk-QLFSJ6HK.mjs.map +1 -0
  65. package/dist/{chunk-LEKZUS6N.mjs → chunk-QPSHM2JQ.mjs} +4 -5
  66. package/dist/chunk-QPSHM2JQ.mjs.map +1 -0
  67. package/dist/{chunk-NJFRJ6YD.js → chunk-QSMPKL27.js} +225 -384
  68. package/dist/chunk-QSMPKL27.js.map +1 -0
  69. package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
  70. package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
  71. package/dist/{chunk-F54Q2YJY.js → chunk-SY4MUT5V.js} +7 -7
  72. package/dist/{chunk-F54Q2YJY.js.map → chunk-SY4MUT5V.js.map} +1 -1
  73. package/dist/{chunk-5RM6NGZ6.mjs → chunk-UHMAKUON.mjs} +3 -3
  74. package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-UHMAKUON.mjs.map} +1 -1
  75. package/dist/{chunk-TIJJHW2Z.js → chunk-V5VBYOF5.js} +36 -36
  76. package/dist/{chunk-TIJJHW2Z.js.map → chunk-V5VBYOF5.js.map} +1 -1
  77. package/dist/{chunk-KR2X2WHJ.js → chunk-VMGNQFRO.js} +53 -53
  78. package/dist/{chunk-KR2X2WHJ.js.map → chunk-VMGNQFRO.js.map} +1 -1
  79. package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
  80. package/dist/chunk-VY52Y5GC.js.map +1 -0
  81. package/dist/{chunk-TVMLV675.js → chunk-Z7VY5M4T.js} +98 -95
  82. package/dist/chunk-Z7VY5M4T.js.map +1 -0
  83. package/dist/{chunk-R4TQWXNG.mjs → chunk-ZM2Q2SMC.mjs} +6 -5
  84. package/dist/chunk-ZM2Q2SMC.mjs.map +1 -0
  85. package/dist/index.js +744 -904
  86. package/dist/index.mjs +4 -4
  87. package/dist/platform/admin/index.js +13 -13
  88. package/dist/platform/admin/index.mjs +7 -7
  89. package/dist/platform/agents-workspace.js +9 -9
  90. package/dist/platform/agents-workspace.mjs +8 -8
  91. package/dist/platform/app-shell.js +6 -6
  92. package/dist/platform/app-shell.mjs +5 -5
  93. package/dist/platform/auth/index.js +30 -30
  94. package/dist/platform/auth/index.mjs +7 -7
  95. package/dist/platform/billing/index.js +6 -6
  96. package/dist/platform/billing/index.mjs +5 -5
  97. package/dist/platform/impersonation/index.js +6 -6
  98. package/dist/platform/impersonation/index.mjs +5 -5
  99. package/dist/platform/index.js +102 -4812
  100. package/dist/platform/index.js.map +1 -1
  101. package/dist/platform/index.mjs +24 -4729
  102. package/dist/platform/index.mjs.map +1 -1
  103. package/dist/platform/pages/index.js +320 -204
  104. package/dist/platform/pages/index.js.map +1 -1
  105. package/dist/platform/pages/index.mjs +146 -30
  106. package/dist/platform/pages/index.mjs.map +1 -1
  107. package/dist/platform/rbac.js +2 -2
  108. package/dist/platform/rbac.mjs +1 -1
  109. package/dist/platform/settings/index.js +10 -10
  110. package/dist/platform/settings/index.mjs +9 -9
  111. package/dist/platform/utils/index.js +3 -3
  112. package/dist/platform/utils/index.js.map +1 -1
  113. package/dist/platform/utils/index.mjs +1 -1
  114. package/dist/platform/utils/index.mjs.map +1 -1
  115. package/dist/platform/workflow-api-client.js +62 -62
  116. package/dist/platform/workflow-api-client.mjs +2 -2
  117. package/dist/platform/workflow-canvas-shell.js +7 -7
  118. package/dist/platform/workflow-canvas-shell.mjs +6 -6
  119. package/package.json +15 -5
  120. package/src/styles/liquid-glass.css +283 -2
  121. package/dist/astrlabe/contracts.d.mts +0 -517
  122. package/dist/astrlabe/contracts.d.ts +0 -517
  123. package/dist/astrlabe/graph-node.d.mts +0 -28
  124. package/dist/astrlabe/graph-node.d.ts +0 -28
  125. package/dist/astrlabe/index.d.mts +0 -751
  126. package/dist/astrlabe/index.d.ts +0 -751
  127. package/dist/astrlabe/utils.d.mts +0 -60
  128. package/dist/astrlabe/utils.d.ts +0 -60
  129. package/dist/astrlabe/workflow-canvas.d.mts +0 -69
  130. package/dist/astrlabe/workflow-canvas.d.ts +0 -69
  131. package/dist/astrlabe/workflow-preview-canvas.d.mts +0 -10
  132. package/dist/astrlabe/workflow-preview-canvas.d.ts +0 -10
  133. package/dist/billing-panel-DsHhhJqG.d.mts +0 -18
  134. package/dist/billing-panel-DsHhhJqG.d.ts +0 -18
  135. package/dist/brand/index.d.mts +0 -85
  136. package/dist/brand/index.d.ts +0 -85
  137. package/dist/chunk-2WXRRQM3.mjs.map +0 -1
  138. package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
  139. package/dist/chunk-AOUUZ52N.js.map +0 -1
  140. package/dist/chunk-FAGDZEKM.js.map +0 -1
  141. package/dist/chunk-HDCUWUNH.js.map +0 -1
  142. package/dist/chunk-HZ4LOVHM.js.map +0 -1
  143. package/dist/chunk-I2NZGVBG.js.map +0 -1
  144. package/dist/chunk-IJAKZHXX.js.map +0 -1
  145. package/dist/chunk-JN6IL6OH.mjs.map +0 -1
  146. package/dist/chunk-LEKZUS6N.mjs.map +0 -1
  147. package/dist/chunk-MVBIAXVN.mjs.map +0 -1
  148. package/dist/chunk-MWPTSBAI.js.map +0 -1
  149. package/dist/chunk-NJFRJ6YD.js.map +0 -1
  150. package/dist/chunk-O6M3KDGT.mjs.map +0 -1
  151. package/dist/chunk-OL73LBX5.mjs.map +0 -1
  152. package/dist/chunk-PCYL4MII.mjs.map +0 -1
  153. package/dist/chunk-R4TQWXNG.mjs.map +0 -1
  154. package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
  155. package/dist/chunk-TVMLV675.js.map +0 -1
  156. package/dist/chunk-UDDZTTLO.mjs.map +0 -1
  157. package/dist/chunk-W5OEBO6E.js.map +0 -1
  158. package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
  159. package/dist/chunk-ZM5MVWIT.js.map +0 -1
  160. package/dist/dynamic-island-confirm-BKsZkAEP.d.mts +0 -17
  161. package/dist/dynamic-island-confirm-BKsZkAEP.d.ts +0 -17
  162. package/dist/index-CoB18TbG.d.ts +0 -215
  163. package/dist/index-VI9gyJXl.d.mts +0 -215
  164. package/dist/index.d.mts +0 -5412
  165. package/dist/index.d.ts +0 -5412
  166. package/dist/layout-engine-YZcVr20M.d.mts +0 -19
  167. package/dist/layout-engine-YZcVr20M.d.ts +0 -19
  168. package/dist/lib/i18n-context.d.mts +0 -36
  169. package/dist/lib/i18n-context.d.ts +0 -36
  170. package/dist/lib/router-context.d.mts +0 -35
  171. package/dist/lib/router-context.d.ts +0 -35
  172. package/dist/navigation-BiWVffAN.d.mts +0 -49
  173. package/dist/navigation-BiWVffAN.d.ts +0 -49
  174. package/dist/platform/admin/index.d.mts +0 -17
  175. package/dist/platform/admin/index.d.ts +0 -17
  176. package/dist/platform/agents-workspace.d.mts +0 -19
  177. package/dist/platform/agents-workspace.d.ts +0 -19
  178. package/dist/platform/app-shell.d.mts +0 -58
  179. package/dist/platform/app-shell.d.ts +0 -58
  180. package/dist/platform/auth/index.d.mts +0 -73
  181. package/dist/platform/auth/index.d.ts +0 -73
  182. package/dist/platform/billing/index.d.mts +0 -29
  183. package/dist/platform/billing/index.d.ts +0 -29
  184. package/dist/platform/impersonation/index.d.mts +0 -19
  185. package/dist/platform/impersonation/index.d.ts +0 -19
  186. package/dist/platform/index.d.mts +0 -224
  187. package/dist/platform/index.d.ts +0 -224
  188. package/dist/platform/pages/index.d.mts +0 -432
  189. package/dist/platform/pages/index.d.ts +0 -432
  190. package/dist/platform/rbac.d.mts +0 -41
  191. package/dist/platform/rbac.d.ts +0 -41
  192. package/dist/platform/settings/index.d.mts +0 -31
  193. package/dist/platform/settings/index.d.ts +0 -31
  194. package/dist/platform/telemetry/index.d.mts +0 -51
  195. package/dist/platform/telemetry/index.d.ts +0 -51
  196. package/dist/platform/utils/index.d.mts +0 -32
  197. package/dist/platform/utils/index.d.ts +0 -32
  198. package/dist/platform/windsock-admin-client.d.mts +0 -57
  199. package/dist/platform/windsock-admin-client.d.ts +0 -57
  200. package/dist/platform/workflow-api-client.d.mts +0 -6
  201. package/dist/platform/workflow-api-client.d.ts +0 -6
  202. package/dist/platform/workflow-canvas-shell.d.mts +0 -18
  203. package/dist/platform/workflow-canvas-shell.d.ts +0 -18
  204. package/dist/rule-form-BYJzyork.d.mts +0 -128
  205. package/dist/rule-form-BYJzyork.d.ts +0 -128
  206. package/dist/workflow-api-client-BKD8OfP_.d.ts +0 -468
  207. package/dist/workflow-api-client-DoYj7nHz.d.mts +0 -468
  208. package/dist/workflow-store-o17I6L6A.d.ts +0 -79
  209. package/dist/workflow-store-ppVHdMZi.d.mts +0 -79
  210. package/src/brand/logos/kori-icon.svg +0 -45
  211. package/src/brand/logos/kori-logo-dark.svg +0 -40
  212. package/src/brand/logos/kori-logo.svg +0 -43
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkNJFRJ6YD_js = require('./chunk-NJFRJ6YD.js');
5
- var chunkI2NZGVBG_js = require('./chunk-I2NZGVBG.js');
4
+ var chunkQSMPKL27_js = require('./chunk-QSMPKL27.js');
5
+ var chunkAWDH6WNA_js = require('./chunk-AWDH6WNA.js');
6
6
  var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
7
7
  var chunk72SWXOD5_js = require('./chunk-72SWXOD5.js');
8
8
  var react = require('react');
@@ -11,16 +11,102 @@ 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(chunkQSMPKL27_js.NodeRunningIndicator, { nodeId: id }),
44
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
45
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
46
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsx(
47
+ chunkQSMPKL27_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(chunkQSMPKL27_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
56
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkQSMPKL27_js.NodeRunningIndicator, { nodeId: id }),
66
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
67
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkQSMPKL27_js.NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ chunkQSMPKL27_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(chunkQSMPKL27_js.NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
85
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkQSMPKL27_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(chunkQSMPKL27_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(chunkQSMPKL27_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(chunkQSMPKL27_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
97
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkNJFRJ6YD_js.NodeRunningIndicator, { nodeId: id }),
21
- /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-cyan-500" }),
106
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.NodeRunningIndicator, { nodeId: id }),
107
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-cyan-500" }),
22
108
  /* @__PURE__ */ jsxRuntime.jsxs(
23
- chunkNJFRJ6YD_js.NodeInteractiveCard,
109
+ chunkQSMPKL27_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
- chunkNJFRJ6YD_js.NodeCardHeader,
118
+ chunkQSMPKL27_js.NodeCardHeader,
33
119
  {
34
- icon: /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.NodeIconBubble, { tone: "s3_write", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CloudArrowUpIcon, { className: "h-5 w-5 text-white" }) }),
120
+ icon: /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkNJFRJ6YD_js.NodeCardMeta, { compact: isCompact, children: [
127
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkQSMPKL27_js.NodeCardMeta, { compact: isCompact, children: [
42
128
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
43
- /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.NodeCardBadge, { tone: "s3_write", children: t("s3WriteNode") }),
44
- config.bucket && /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.NodeCardBadge, { tone: "s3_write", soft: true, children: config.bucket }),
129
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.NodeCardBadge, { tone: "s3_write", children: t("s3WriteNode") }),
130
+ config.bucket && /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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(chunkNJFRJ6YD_js.NodeCardDeleteAction, { nodeId: id, onDelete })
133
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_js.NodeCardDeleteAction, { nodeId: id, onDelete })
48
134
  ] })
49
135
  ]
50
136
  }
51
137
  ),
52
- /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-500" })
138
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQSMPKL27_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
+ chunkAWDH6WNA_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(chunkAWDH6WNA_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
+ chunkAWDH6WNA_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
+ chunkAWDH6WNA_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(chunkAWDH6WNA_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
233
319
  ] }),
234
320
  /* @__PURE__ */ jsxRuntime.jsx(
235
- chunkI2NZGVBG_js.FormInput,
321
+ chunkAWDH6WNA_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 = chunkNJFRJ6YD_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(chunkNJFRJ6YD_js.FRAMEWORK_META);
614
+ const frameworkKeys = Object.keys(chunkQSMPKL27_js.FRAMEWORK_META);
605
615
  const hasProviderConstraints = connectedProviderTypes.length > 0;
606
- const compatibleModels = chunkNJFRJ6YD_js.getCompatibleModels(models, selectedFramework);
616
+ const compatibleModels = chunkQSMPKL27_js.getCompatibleModels(models, selectedFramework);
607
617
  const handleFrameworkChange = react.useCallback((newFramework) => {
608
618
  setSelectedFramework(newFramework);
609
- if (!chunkNJFRJ6YD_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
610
- const compatible = chunkNJFRJ6YD_js.getCompatibleModels(models, newFramework);
619
+ if (!chunkQSMPKL27_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
620
+ const compatible = chunkQSMPKL27_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 = chunkNJFRJ6YD_js.FRAMEWORK_META[key];
631
+ const meta = chunkQSMPKL27_js.FRAMEWORK_META[key];
622
632
  const isSelected = key === selectedFramework;
623
- const compatCount = chunkNJFRJ6YD_js.getCompatibleModels(models, key).length;
624
- const isCompatibleWithProviders = !hasProviderConstraints || chunkNJFRJ6YD_js.isFrameworkCompatibleWithProviders(key, connectedProviderTypes);
633
+ const compatCount = chunkQSMPKL27_js.getCompatibleModels(models, key).length;
634
+ const isCompatibleWithProviders = !hasProviderConstraints || chunkQSMPKL27_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 = chunkNJFRJ6YD_js.isModelCompatibleWithFramework(model.id, selectedFramework);
666
+ const isCompatible = chunkQSMPKL27_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 = chunkNJFRJ6YD_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) => chunkNJFRJ6YD_js.isModelCompatibleWithFramework(m.id, agentFramework)
871
- );
872
- const incompatibleModels = providerModels.models.filter(
873
- (m) => !chunkNJFRJ6YD_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 = chunkNJFRJ6YD_js.getFrameworkMeta(framework);
824
+ const meta = chunkQSMPKL27_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
+ chunkAWDH6WNA_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 = chunkQSMPKL27_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
- ] })
912
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" })
1025
913
  ] }),
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" })
1048
- ] }),
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 = chunkNJFRJ6YD_js.useModalStore((s) => s.activeModal);
1123
- const agentData = chunkNJFRJ6YD_js.useModalStore((s) => s.agentData);
1124
- const closeModal = chunkNJFRJ6YD_js.useModalStore((s) => s.closeModal);
1033
+ const activeModal = chunkQSMPKL27_js.useModalStore((s) => s.activeModal);
1034
+ const agentData = chunkQSMPKL27_js.useModalStore((s) => s.agentData);
1035
+ const closeModal = chunkQSMPKL27_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,209 @@ 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 avatarInitial = (displayName || agent.name).charAt(0).toUpperCase();
1182
+ const avatarNode = /* @__PURE__ */ jsxRuntime.jsx(
1183
+ chunkAWDH6WNA_js.Avatar,
1184
+ {
1185
+ src: effectiveAvatarUrl || void 0,
1186
+ alt: displayName || agent.name,
1187
+ initials: effectiveAvatarUrl ? void 0 : avatarInitial,
1188
+ tone: effectiveAvatarUrl ? void 0 : "indigo",
1189
+ className: "size-12"
1190
+ }
1191
+ );
1192
+ const statusPill = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
1193
+ /* @__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
1194
  /* @__PURE__ */ jsxRuntime.jsx(
1273
- "button",
1195
+ chunkAWDH6WNA_js.ToggleSwitch,
1274
1196
  {
1275
- type: "button",
1276
- onClick: () => {
1277
- void handleMarkSaved();
1197
+ size: "sm",
1198
+ color: "green",
1199
+ checked: status === "active",
1200
+ onChange: (checked) => {
1201
+ setStatus(checked ? "active" : "draft");
1202
+ markDirty();
1278
1203
  },
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")
1204
+ label: t("agentDrawer.status", { _: "Status" })
1282
1205
  }
1283
1206
  )
1284
1207
  ] });
1285
- return /* @__PURE__ */ jsxRuntime.jsxs(
1286
- chunkI2NZGVBG_js.GlassModal,
1208
+ 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(
1209
+ chunkAWDH6WNA_js.HeroBlock,
1210
+ {
1211
+ icon: avatarNode,
1212
+ iconBackground: "none",
1213
+ iconSize: "lg",
1214
+ headingLevel: "h2",
1215
+ title: displayName,
1216
+ onTitleChange: (next) => {
1217
+ setDisplayName(next);
1218
+ markDirty();
1219
+ },
1220
+ titlePlaceholder: agent.name,
1221
+ subtitle: agent.role,
1222
+ rightContent: statusPill,
1223
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1224
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1225
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.description", { _: "Description" }) }),
1226
+ /* @__PURE__ */ jsxRuntime.jsx(
1227
+ "textarea",
1228
+ {
1229
+ rows: 2,
1230
+ value: description,
1231
+ onChange: (event) => {
1232
+ setDescription(event.target.value);
1233
+ markDirty();
1234
+ },
1235
+ placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" }),
1236
+ className: `${fieldCard} resize-none`
1237
+ }
1238
+ )
1239
+ ] }),
1240
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1241
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.tags", { _: "Tags" }) }),
1242
+ /* @__PURE__ */ jsxRuntime.jsx(
1243
+ "input",
1244
+ {
1245
+ type: "text",
1246
+ value: tagsText,
1247
+ onChange: (event) => {
1248
+ setTagsText(event.target.value);
1249
+ markDirty();
1250
+ },
1251
+ placeholder: t("agentDrawer.tagsPlaceholder", { _: "pricing, research, internal" }),
1252
+ className: fieldCard
1253
+ }
1254
+ )
1255
+ ] })
1256
+ ] })
1257
+ }
1258
+ ) });
1259
+ const autosaveLabel = persisting ? t("agentDrawer.saving", { _: "Saving\u2026" }) : dirty ? t("agentDrawer.pendingAutosave", { _: "Saving in a moment\u2026" }) : t("agentDrawer.autoSaved", { _: "Auto-saved" });
1260
+ 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";
1261
+ 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: [
1262
+ /* @__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(
1263
+ "span",
1264
+ {
1265
+ "aria-hidden": "true",
1266
+ className: "absolute inset-0 motion-safe:animate-ping rounded-full bg-indigo-500/60"
1267
+ }
1268
+ ) }),
1269
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `font-medium ${autosaveColor}`, children: autosaveLabel })
1270
+ ] });
1271
+ return /* @__PURE__ */ jsxRuntime.jsx(
1272
+ chunkAWDH6WNA_js.GlassModal,
1287
1273
  {
1288
1274
  open,
1289
1275
  onClose: handleClose,
1290
1276
  title: agent.name,
1291
- subtitle: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1292
1277
  gradient: "from-indigo-500 to-purple-600",
1293
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-white" }),
1278
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1294
1279
  label: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1295
1280
  sidebar: {
1296
1281
  sections,
1297
1282
  activeSectionId: activeTab,
1298
1283
  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
- },
1284
+ identityCard,
1305
1285
  footer: sidebarFooter
1306
1286
  },
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,
1287
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
1288
+ /* @__PURE__ */ jsxRuntime.jsx(
1289
+ chunkAWDH6WNA_js.SectionCard,
1312
1290
  {
1313
- agent,
1314
- temperature,
1315
- setTemperature,
1316
- markDirty,
1317
- t,
1318
- promptText: systemPrompt,
1319
- setPromptText: setSystemPrompt,
1320
- outputSchema,
1321
- setOutputSchema
1291
+ variant: "glass",
1292
+ padded: false,
1293
+ collapsible: true,
1294
+ defaultOpen: true,
1295
+ header: {
1296
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.Cog6ToothIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1297
+ title: t("agentDrawer.engineTab"),
1298
+ subtitle: t("agentDrawer.engineSubtitle", { _: "Como o agente roda \u2014 capacidade, modelo, credenciais" })
1299
+ },
1300
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1301
+ EngineTab,
1302
+ {
1303
+ agent,
1304
+ models,
1305
+ t,
1306
+ selectedModelId,
1307
+ setSelectedModelId,
1308
+ selectedFramework,
1309
+ setSelectedFramework: (fw) => setSelectedFramework(fw),
1310
+ temperature,
1311
+ setTemperature,
1312
+ elo,
1313
+ setElo,
1314
+ maxOutputTokens,
1315
+ setMaxOutputTokens,
1316
+ topP,
1317
+ setTopP,
1318
+ topK,
1319
+ setTopK,
1320
+ modelProviders: availableModelProviders,
1321
+ selectedProviderId,
1322
+ onSelectProvider: handleSelectProvider,
1323
+ markDirty
1324
+ }
1325
+ )
1322
1326
  }
1323
1327
  ),
1324
- activeTab === "advanced" && /* @__PURE__ */ jsxRuntime.jsx(
1325
- AdvancedTab,
1328
+ /* @__PURE__ */ jsxRuntime.jsx(
1329
+ chunkAWDH6WNA_js.SectionCard,
1326
1330
  {
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
1331
+ variant: "glass",
1332
+ padded: false,
1333
+ collapsible: true,
1334
+ defaultOpen: true,
1335
+ header: {
1336
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1337
+ title: t("agentDrawer.brainTab"),
1338
+ subtitle: t("agentDrawer.brainSubtitle", { _: "Como o agente pensa \u2014 prompt + criatividade" })
1339
+ },
1340
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1341
+ PromptTab,
1342
+ {
1343
+ agent,
1344
+ temperature,
1345
+ setTemperature,
1346
+ markDirty,
1347
+ t,
1348
+ promptText: systemPrompt,
1349
+ setPromptText: setSystemPrompt,
1350
+ outputSchema,
1351
+ setOutputSchema
1352
+ }
1353
+ )
1345
1354
  }
1346
1355
  ),
1347
- activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
1348
- activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
1349
- ModelsTab,
1356
+ /* @__PURE__ */ jsxRuntime.jsx(
1357
+ chunkAWDH6WNA_js.SectionCard,
1350
1358
  {
1351
- modelProviders: availableModelProviders,
1352
- selectedProviderId,
1353
- onSelectProvider: handleSelectProvider,
1354
- models,
1355
- selectedModelId,
1356
- onSelectModel: (modelId) => {
1357
- setSelectedModelId(modelId);
1358
- markDirty();
1359
+ variant: "glass",
1360
+ padded: false,
1361
+ collapsible: true,
1362
+ defaultOpen: true,
1363
+ header: {
1364
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1365
+ title: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`,
1366
+ subtitle: t("agentDrawer.toolsSubtitle", { _: "O que o agente pode invocar durante a execu\xE7\xE3o" })
1359
1367
  },
1360
- agentFramework: selectedFramework,
1361
- t
1368
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t })
1362
1369
  }
1363
- ),
1364
- activeTab === "results" && /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
1365
- ]
1370
+ )
1371
+ ] })
1366
1372
  }
1367
1373
  );
1368
1374
  }
@@ -1471,7 +1477,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1471
1477
  const markDirty = useSubworkflowStore((s) => s.markDirty);
1472
1478
  const markSaved = useSubworkflowStore((s) => s.markSaved);
1473
1479
  const closeModal = useSubworkflowStore((s) => s.closeModal);
1474
- const agentBehind = chunkNJFRJ6YD_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1480
+ const agentBehind = chunkQSMPKL27_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1475
1481
  const isCreateMode = !tool?.toolId;
1476
1482
  const initialGraph = react.useMemo(() => {
1477
1483
  const config = tool?.config;
@@ -1500,9 +1506,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1500
1506
  }, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
1501
1507
  if (!tool) return null;
1502
1508
  const categoryKey = category ?? "external";
1503
- const gradient = tool.color ?? chunkNJFRJ6YD_js.CATEGORY_COLORS[categoryKey] ?? chunkNJFRJ6YD_js.CATEGORY_COLORS.external;
1504
- const categoryPill = chunkNJFRJ6YD_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkNJFRJ6YD_js.CATEGORY_PILL_COLORS.external;
1505
- const IconComponent = chunkNJFRJ6YD_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
1509
+ const gradient = tool.color ?? chunkQSMPKL27_js.CATEGORY_COLORS[categoryKey] ?? chunkQSMPKL27_js.CATEGORY_COLORS.external;
1510
+ const categoryPill = chunkQSMPKL27_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkQSMPKL27_js.CATEGORY_PILL_COLORS.external;
1511
+ const IconComponent = chunkQSMPKL27_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
1506
1512
  const graph = latestGraphRef.current;
1507
1513
  const startNode = graph.nodes.find((n) => n.type === "start");
1508
1514
  const endNode = graph.nodes.find((n) => n.type === "end");
@@ -1535,7 +1541,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1535
1541
  ] })
1536
1542
  ] });
1537
1543
  return /* @__PURE__ */ jsxRuntime.jsx(
1538
- chunkI2NZGVBG_js.GlassModal,
1544
+ chunkAWDH6WNA_js.GlassModal,
1539
1545
  {
1540
1546
  open,
1541
1547
  onClose: closeModal,
@@ -1567,7 +1573,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1567
1573
  {
1568
1574
  type: "button",
1569
1575
  onClick: () => setCategory(cat),
1570
- className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkNJFRJ6YD_js.CATEGORY_PILL_COLORS[cat] ?? chunkNJFRJ6YD_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"}`,
1576
+ className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkQSMPKL27_js.CATEGORY_PILL_COLORS[cat] ?? chunkQSMPKL27_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
1577
  children: cat
1572
1578
  },
1573
1579
  cat
@@ -1654,7 +1660,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1654
1660
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
1655
1661
  ] }),
1656
1662
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1657
- chunkNJFRJ6YD_js.WorkflowCanvas,
1663
+ chunkQSMPKL27_js.WorkflowCanvas,
1658
1664
  {
1659
1665
  initialGraph,
1660
1666
  agents: [],
@@ -1670,9 +1676,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1670
1676
  }
1671
1677
  function PipelineSettingsModal({ onSave }) {
1672
1678
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
1673
- const activeModal = chunkNJFRJ6YD_js.useModalStore((s) => s.activeModal);
1674
- const data = chunkNJFRJ6YD_js.useModalStore((s) => s.pipelineSettingsData);
1675
- const closeModal = chunkNJFRJ6YD_js.useModalStore((s) => s.closeModal);
1679
+ const activeModal = chunkQSMPKL27_js.useModalStore((s) => s.activeModal);
1680
+ const data = chunkQSMPKL27_js.useModalStore((s) => s.pipelineSettingsData);
1681
+ const closeModal = chunkQSMPKL27_js.useModalStore((s) => s.closeModal);
1676
1682
  const open = activeModal === "pipeline-settings";
1677
1683
  const [nameValue, setNameValue] = react.useState("");
1678
1684
  const [descriptionValue, setDescriptionValue] = react.useState("");
@@ -1734,7 +1740,7 @@ function PipelineSettingsModal({ onSave }) {
1734
1740
  }
1735
1741
  ),
1736
1742
  /* @__PURE__ */ jsxRuntime.jsxs(
1737
- chunkI2NZGVBG_js.Button,
1743
+ chunkAWDH6WNA_js.Button,
1738
1744
  {
1739
1745
  type: "submit",
1740
1746
  form: "pipeline-settings-form",
@@ -1749,7 +1755,7 @@ function PipelineSettingsModal({ onSave }) {
1749
1755
  )
1750
1756
  ] });
1751
1757
  return /* @__PURE__ */ jsxRuntime.jsx(
1752
- chunkI2NZGVBG_js.GlassModal,
1758
+ chunkAWDH6WNA_js.GlassModal,
1753
1759
  {
1754
1760
  open,
1755
1761
  onClose: closeModal,
@@ -1763,7 +1769,7 @@ function PipelineSettingsModal({ onSave }) {
1763
1769
  onSubmit: handleSubmit,
1764
1770
  children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: "pipeline-settings-form", onSubmit: handleSubmit, className: "space-y-5", children: [
1765
1771
  /* @__PURE__ */ jsxRuntime.jsx(
1766
- chunkI2NZGVBG_js.FormInput,
1772
+ chunkAWDH6WNA_js.FormInput,
1767
1773
  {
1768
1774
  label: t("pipelineName"),
1769
1775
  value: nameValue,
@@ -1773,7 +1779,7 @@ function PipelineSettingsModal({ onSave }) {
1773
1779
  }
1774
1780
  ),
1775
1781
  /* @__PURE__ */ jsxRuntime.jsx(
1776
- chunkI2NZGVBG_js.FormTextarea,
1782
+ chunkAWDH6WNA_js.FormTextarea,
1777
1783
  {
1778
1784
  label: t("pipelineDescription"),
1779
1785
  value: descriptionValue,
@@ -1784,7 +1790,7 @@ function PipelineSettingsModal({ onSave }) {
1784
1790
  ),
1785
1791
  lifecycleAvailable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1786
1792
  /* @__PURE__ */ jsxRuntime.jsx(
1787
- chunkI2NZGVBG_js.FormInput,
1793
+ chunkAWDH6WNA_js.FormInput,
1788
1794
  {
1789
1795
  label: t("pipelineSlug", { _: "Slug" }),
1790
1796
  value: slugValue,
@@ -1911,7 +1917,7 @@ function RunReplayModal({
1911
1917
  }
1912
1918
  ),
1913
1919
  /* @__PURE__ */ jsxRuntime.jsxs(
1914
- chunkI2NZGVBG_js.Button,
1920
+ chunkAWDH6WNA_js.Button,
1915
1921
  {
1916
1922
  type: "submit",
1917
1923
  form: "run-replay-form",
@@ -1926,7 +1932,7 @@ function RunReplayModal({
1926
1932
  ] })
1927
1933
  ] });
1928
1934
  return /* @__PURE__ */ jsxRuntime.jsx(
1929
- chunkI2NZGVBG_js.GlassModal,
1935
+ chunkAWDH6WNA_js.GlassModal,
1930
1936
  {
1931
1937
  open,
1932
1938
  onClose,
@@ -2000,7 +2006,7 @@ function RowEditor({
2000
2006
  ]
2001
2007
  }
2002
2008
  ) : isJson ? /* @__PURE__ */ jsxRuntime.jsx(
2003
- chunkI2NZGVBG_js.FormTextarea,
2009
+ chunkAWDH6WNA_js.FormTextarea,
2004
2010
  {
2005
2011
  value: row.value,
2006
2012
  onValueChange: (v) => onChange({ value: v }),
@@ -2008,7 +2014,7 @@ function RowEditor({
2008
2014
  className: "font-mono"
2009
2015
  }
2010
2016
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2011
- chunkI2NZGVBG_js.FormInput,
2017
+ chunkAWDH6WNA_js.FormInput,
2012
2018
  {
2013
2019
  type: row.kind === "number" ? "number" : "text",
2014
2020
  value: row.value,
@@ -2112,13 +2118,13 @@ function ExecutionTimelinePanel({
2112
2118
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium text-slate-900 dark:text-white", children: entry.nodeId }),
2113
2119
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2114
2120
  ] }),
2115
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.Badge, { color: meta.color, children: [
2121
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkAWDH6WNA_js.Badge, { color: meta.color, children: [
2116
2122
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "mr-1 h-3 w-3" }),
2117
2123
  labels[entry.status]
2118
2124
  ] })
2119
2125
  ] }),
2120
2126
  /* @__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) }),
2127
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration(entry.durationMs) }),
2122
2128
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
2123
2129
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatTimestamp(entry.startedAt) })
2124
2130
  ] })
@@ -2142,7 +2148,7 @@ function NodeInspector({
2142
2148
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-slate-900 dark:text-white", children: entry.nodeId }),
2143
2149
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2144
2150
  ] }),
2145
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: meta.color, children: labels[entry.status] })
2151
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: meta.color, children: labels[entry.status] })
2146
2152
  ] }),
2147
2153
  /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-2 gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
2148
2154
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -2155,7 +2161,7 @@ function NodeInspector({
2155
2161
  ] }),
2156
2162
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2157
2163
  /* @__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) })
2164
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration(entry.durationMs) })
2159
2165
  ] }),
2160
2166
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2161
2167
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-semibold", children: labels.status }),
@@ -2209,7 +2215,7 @@ function hasMetrics(metrics) {
2209
2215
  metrics.model || metrics.tokensIn !== void 0 || metrics.tokensOut !== void 0 || metrics.costUsd !== void 0
2210
2216
  );
2211
2217
  }
2212
- function formatDuration2(ms) {
2218
+ function formatDuration(ms) {
2213
2219
  if (ms === null) return "\u2014";
2214
2220
  if (ms < 1e3) return `${ms}ms`;
2215
2221
  if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
@@ -2312,7 +2318,7 @@ function RuleConditionBuilder({ value, onChange, depth = 0 }) {
2312
2318
  };
2313
2319
  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
2320
  /* @__PURE__ */ jsxRuntime.jsx(
2315
- chunkI2NZGVBG_js.FormSelect,
2321
+ chunkAWDH6WNA_js.FormSelect,
2316
2322
  {
2317
2323
  label: "Operator",
2318
2324
  value: value.operator,
@@ -2335,7 +2341,7 @@ function SimpleEditor({
2335
2341
  const isTruthy = value.operator === "truthy";
2336
2342
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2337
2343
  /* @__PURE__ */ jsxRuntime.jsx(
2338
- chunkI2NZGVBG_js.FormInput,
2344
+ chunkAWDH6WNA_js.FormInput,
2339
2345
  {
2340
2346
  label: "Field",
2341
2347
  hint: "Dotted reference into the variable pool \u2014 e.g. `parse-pricing.margin`, `inputs.category`",
@@ -2345,7 +2351,7 @@ function SimpleEditor({
2345
2351
  }
2346
2352
  ),
2347
2353
  !isTruthy && /* @__PURE__ */ jsxRuntime.jsx(
2348
- chunkI2NZGVBG_js.FormInput,
2354
+ chunkAWDH6WNA_js.FormInput,
2349
2355
  {
2350
2356
  label: "Value",
2351
2357
  hint: "Literal. Numeric operators coerce via `as f64`.",
@@ -2361,7 +2367,7 @@ function ThresholdEditor({
2361
2367
  }) {
2362
2368
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
2363
2369
  /* @__PURE__ */ jsxRuntime.jsx(
2364
- chunkI2NZGVBG_js.FormInput,
2370
+ chunkAWDH6WNA_js.FormInput,
2365
2371
  {
2366
2372
  label: "Field",
2367
2373
  value: value.field ?? "",
@@ -2370,7 +2376,7 @@ function ThresholdEditor({
2370
2376
  }
2371
2377
  ),
2372
2378
  /* @__PURE__ */ jsxRuntime.jsx(
2373
- chunkI2NZGVBG_js.FormSelect,
2379
+ chunkAWDH6WNA_js.FormSelect,
2374
2380
  {
2375
2381
  label: "Direction",
2376
2382
  value: value.comparison ?? "gte",
@@ -2384,7 +2390,7 @@ function ThresholdEditor({
2384
2390
  }
2385
2391
  ),
2386
2392
  /* @__PURE__ */ jsxRuntime.jsx(
2387
- chunkI2NZGVBG_js.FormInput,
2393
+ chunkAWDH6WNA_js.FormInput,
2388
2394
  {
2389
2395
  label: "Threshold",
2390
2396
  type: "number",
@@ -2401,7 +2407,7 @@ function RegexEditor({
2401
2407
  }) {
2402
2408
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2403
2409
  /* @__PURE__ */ jsxRuntime.jsx(
2404
- chunkI2NZGVBG_js.FormInput,
2410
+ chunkAWDH6WNA_js.FormInput,
2405
2411
  {
2406
2412
  label: "Field",
2407
2413
  value: value.field ?? "",
@@ -2410,7 +2416,7 @@ function RegexEditor({
2410
2416
  }
2411
2417
  ),
2412
2418
  /* @__PURE__ */ jsxRuntime.jsx(
2413
- chunkI2NZGVBG_js.FormInput,
2419
+ chunkAWDH6WNA_js.FormInput,
2414
2420
  {
2415
2421
  label: "Pattern",
2416
2422
  hint: "Rust regex syntax \u2014 `(?i)` etc. supported.",
@@ -2438,7 +2444,7 @@ function TimeWindowEditor({
2438
2444
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2439
2445
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2440
2446
  /* @__PURE__ */ jsxRuntime.jsx(
2441
- chunkI2NZGVBG_js.FormSelect,
2447
+ chunkAWDH6WNA_js.FormSelect,
2442
2448
  {
2443
2449
  label: "Timezone",
2444
2450
  value: value.timezone ?? "UTC",
@@ -2447,7 +2453,7 @@ function TimeWindowEditor({
2447
2453
  }
2448
2454
  ),
2449
2455
  /* @__PURE__ */ jsxRuntime.jsx(
2450
- chunkI2NZGVBG_js.FormInput,
2456
+ chunkAWDH6WNA_js.FormInput,
2451
2457
  {
2452
2458
  label: "Timestamp field (optional)",
2453
2459
  hint: "Pulls a timestamp from the pool. Leave blank to use the run's wall-clock.",
@@ -2460,7 +2466,7 @@ function TimeWindowEditor({
2460
2466
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2461
2467
  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
2468
  /* @__PURE__ */ jsxRuntime.jsx(
2463
- chunkI2NZGVBG_js.FormInput,
2469
+ chunkAWDH6WNA_js.FormInput,
2464
2470
  {
2465
2471
  label: `Start (hour)`,
2466
2472
  type: "number",
@@ -2471,7 +2477,7 @@ function TimeWindowEditor({
2471
2477
  }
2472
2478
  ),
2473
2479
  /* @__PURE__ */ jsxRuntime.jsx(
2474
- chunkI2NZGVBG_js.FormInput,
2480
+ chunkAWDH6WNA_js.FormInput,
2475
2481
  {
2476
2482
  label: `End (hour)`,
2477
2483
  type: "number",
@@ -2481,9 +2487,9 @@ function TimeWindowEditor({
2481
2487
  onValueChange: (raw) => update(index, { endHour: clampHour(raw, 24) })
2482
2488
  }
2483
2489
  ),
2484
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2490
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2485
2491
  ] }, index)),
2486
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2492
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2487
2493
  ] })
2488
2494
  ] });
2489
2495
  }
@@ -2506,7 +2512,7 @@ function BooleanGroupEditor({
2506
2512
  });
2507
2513
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2508
2514
  /* @__PURE__ */ jsxRuntime.jsx(
2509
- chunkI2NZGVBG_js.FormSelect,
2515
+ chunkAWDH6WNA_js.FormSelect,
2510
2516
  {
2511
2517
  label: "Combinator",
2512
2518
  value: value.combinator ?? "and",
@@ -2524,9 +2530,9 @@ function BooleanGroupEditor({
2524
2530
  depth
2525
2531
  }
2526
2532
  ),
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" }) })
2533
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
2528
2534
  ] }, index)),
2529
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2535
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2530
2536
  ] })
2531
2537
  ] });
2532
2538
  }
@@ -2562,7 +2568,7 @@ function RuleActionBuilder({ value, onChange }) {
2562
2568
  };
2563
2569
  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
2570
  /* @__PURE__ */ jsxRuntime.jsx(
2565
- chunkI2NZGVBG_js.FormSelect,
2571
+ chunkAWDH6WNA_js.FormSelect,
2566
2572
  {
2567
2573
  label: "Action type",
2568
2574
  value: type,
@@ -2572,7 +2578,7 @@ function RuleActionBuilder({ value, onChange }) {
2572
2578
  ),
2573
2579
  type === "adjust_price" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2574
2580
  /* @__PURE__ */ jsxRuntime.jsx(
2575
- chunkI2NZGVBG_js.FormInput,
2581
+ chunkAWDH6WNA_js.FormInput,
2576
2582
  {
2577
2583
  label: "Multiplier",
2578
2584
  type: "number",
@@ -2582,7 +2588,7 @@ function RuleActionBuilder({ value, onChange }) {
2582
2588
  }
2583
2589
  ),
2584
2590
  /* @__PURE__ */ jsxRuntime.jsx(
2585
- chunkI2NZGVBG_js.FormInput,
2591
+ chunkAWDH6WNA_js.FormInput,
2586
2592
  {
2587
2593
  label: "Reason code",
2588
2594
  value: stringParam(params.reason),
@@ -2592,7 +2598,7 @@ function RuleActionBuilder({ value, onChange }) {
2592
2598
  )
2593
2599
  ] }),
2594
2600
  type === "enforce_min_margin" && /* @__PURE__ */ jsxRuntime.jsx(
2595
- chunkI2NZGVBG_js.FormInput,
2601
+ chunkAWDH6WNA_js.FormInput,
2596
2602
  {
2597
2603
  label: "Floor (fraction, e.g. 0.08)",
2598
2604
  type: "number",
@@ -2602,7 +2608,7 @@ function RuleActionBuilder({ value, onChange }) {
2602
2608
  }
2603
2609
  ),
2604
2610
  type === "realign_to_competitor" && /* @__PURE__ */ jsxRuntime.jsx(
2605
- chunkI2NZGVBG_js.FormInput,
2611
+ chunkAWDH6WNA_js.FormInput,
2606
2612
  {
2607
2613
  label: "Tolerance (fraction)",
2608
2614
  type: "number",
@@ -2612,7 +2618,7 @@ function RuleActionBuilder({ value, onChange }) {
2612
2618
  }
2613
2619
  ),
2614
2620
  type === "request_manager_approval" && /* @__PURE__ */ jsxRuntime.jsx(
2615
- chunkI2NZGVBG_js.FormInput,
2621
+ chunkAWDH6WNA_js.FormInput,
2616
2622
  {
2617
2623
  label: "Approval limit (fraction)",
2618
2624
  type: "number",
@@ -2622,7 +2628,7 @@ function RuleActionBuilder({ value, onChange }) {
2622
2628
  }
2623
2629
  ),
2624
2630
  type === "round_to" && /* @__PURE__ */ jsxRuntime.jsx(
2625
- chunkI2NZGVBG_js.FormInput,
2631
+ chunkAWDH6WNA_js.FormInput,
2626
2632
  {
2627
2633
  label: "Step (e.g. 0.009)",
2628
2634
  type: "number",
@@ -2633,7 +2639,7 @@ function RuleActionBuilder({ value, onChange }) {
2633
2639
  ),
2634
2640
  type === "alert" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2635
2641
  /* @__PURE__ */ jsxRuntime.jsx(
2636
- chunkI2NZGVBG_js.FormInput,
2642
+ chunkAWDH6WNA_js.FormInput,
2637
2643
  {
2638
2644
  label: "Channel",
2639
2645
  value: stringParam(params.channel),
@@ -2642,7 +2648,7 @@ function RuleActionBuilder({ value, onChange }) {
2642
2648
  }
2643
2649
  ),
2644
2650
  /* @__PURE__ */ jsxRuntime.jsx(
2645
- chunkI2NZGVBG_js.FormInput,
2651
+ chunkAWDH6WNA_js.FormInput,
2646
2652
  {
2647
2653
  label: "Severity",
2648
2654
  value: stringParam(params.severity),
@@ -2680,7 +2686,7 @@ function CustomParamsEditor({
2680
2686
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2681
2687
  entries.map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2", children: [
2682
2688
  /* @__PURE__ */ jsxRuntime.jsx(
2683
- chunkI2NZGVBG_js.FormInput,
2689
+ chunkAWDH6WNA_js.FormInput,
2684
2690
  {
2685
2691
  label: "Key",
2686
2692
  value: key,
@@ -2688,16 +2694,16 @@ function CustomParamsEditor({
2688
2694
  }
2689
2695
  ),
2690
2696
  /* @__PURE__ */ jsxRuntime.jsx(
2691
- chunkI2NZGVBG_js.FormInput,
2697
+ chunkAWDH6WNA_js.FormInput,
2692
2698
  {
2693
2699
  label: "Value",
2694
2700
  value: String(value ?? ""),
2695
2701
  onValueChange: (raw) => update(index, key, raw)
2696
2702
  }
2697
2703
  ),
2698
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2704
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2699
2705
  ] }, index)),
2700
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2706
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2701
2707
  ] });
2702
2708
  }
2703
2709
  function numberParam(value, fallback) {
@@ -2727,9 +2733,9 @@ function RuleForm({ value, onChange }) {
2727
2733
  );
2728
2734
  const update = (key, v) => onChange({ ...value, [key]: v });
2729
2735
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
2730
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.FormGrid, { children: [
2736
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkAWDH6WNA_js.FormGrid, { children: [
2731
2737
  /* @__PURE__ */ jsxRuntime.jsx(
2732
- chunkI2NZGVBG_js.FormInput,
2738
+ chunkAWDH6WNA_js.FormInput,
2733
2739
  {
2734
2740
  label: "Name",
2735
2741
  required: true,
@@ -2738,7 +2744,7 @@ function RuleForm({ value, onChange }) {
2738
2744
  }
2739
2745
  ),
2740
2746
  /* @__PURE__ */ jsxRuntime.jsx(
2741
- chunkI2NZGVBG_js.FormInput,
2747
+ chunkAWDH6WNA_js.FormInput,
2742
2748
  {
2743
2749
  label: "Priority",
2744
2750
  type: "number",
@@ -2748,7 +2754,7 @@ function RuleForm({ value, onChange }) {
2748
2754
  }
2749
2755
  ),
2750
2756
  /* @__PURE__ */ jsxRuntime.jsx(
2751
- chunkI2NZGVBG_js.FormSelect,
2757
+ chunkAWDH6WNA_js.FormSelect,
2752
2758
  {
2753
2759
  label: "Enabled",
2754
2760
  value: value.enabled ? "true" : "false",
@@ -2760,7 +2766,7 @@ function RuleForm({ value, onChange }) {
2760
2766
  }
2761
2767
  ),
2762
2768
  /* @__PURE__ */ jsxRuntime.jsx(
2763
- chunkI2NZGVBG_js.FormTextarea,
2769
+ chunkAWDH6WNA_js.FormTextarea,
2764
2770
  {
2765
2771
  label: "Description",
2766
2772
  rows: 2,
@@ -2772,7 +2778,7 @@ function RuleForm({ value, onChange }) {
2772
2778
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2773
2779
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2774
2780
  /* @__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 })
2781
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: "indigo", children: value.condition.operator })
2776
2782
  ] }),
2777
2783
  /* @__PURE__ */ jsxRuntime.jsx(
2778
2784
  RuleConditionBuilder,
@@ -2785,7 +2791,7 @@ function RuleForm({ value, onChange }) {
2785
2791
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2786
2792
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2787
2793
  /* @__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 })
2794
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: "fuchsia", children: value.action.type })
2789
2795
  ] }),
2790
2796
  /* @__PURE__ */ jsxRuntime.jsx(
2791
2797
  RuleActionBuilder,
@@ -2807,7 +2813,7 @@ function RuleForm({ value, onChange }) {
2807
2813
  ),
2808
2814
  showAdvanced && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2809
2815
  /* @__PURE__ */ jsxRuntime.jsx(
2810
- chunkI2NZGVBG_js.FormInput,
2816
+ chunkAWDH6WNA_js.FormInput,
2811
2817
  {
2812
2818
  label: "Valid from (ISO 8601)",
2813
2819
  type: "datetime-local",
@@ -2816,7 +2822,7 @@ function RuleForm({ value, onChange }) {
2816
2822
  }
2817
2823
  ),
2818
2824
  /* @__PURE__ */ jsxRuntime.jsx(
2819
- chunkI2NZGVBG_js.FormInput,
2825
+ chunkAWDH6WNA_js.FormInput,
2820
2826
  {
2821
2827
  label: "Valid until (ISO 8601)",
2822
2828
  type: "datetime-local",
@@ -2825,7 +2831,7 @@ function RuleForm({ value, onChange }) {
2825
2831
  }
2826
2832
  ),
2827
2833
  /* @__PURE__ */ jsxRuntime.jsx(
2828
- chunkI2NZGVBG_js.FormSelect,
2834
+ chunkAWDH6WNA_js.FormSelect,
2829
2835
  {
2830
2836
  label: "Status",
2831
2837
  value: value.status ?? "active",
@@ -2834,7 +2840,7 @@ function RuleForm({ value, onChange }) {
2834
2840
  }
2835
2841
  ),
2836
2842
  /* @__PURE__ */ jsxRuntime.jsx(
2837
- chunkI2NZGVBG_js.FormInput,
2843
+ chunkAWDH6WNA_js.FormInput,
2838
2844
  {
2839
2845
  label: "Tags (comma-separated)",
2840
2846
  value: (value.tags ?? []).join(", "),
@@ -2909,7 +2915,7 @@ function getDatasourceLogo(entityId) {
2909
2915
  }
2910
2916
  return null;
2911
2917
  }
2912
- var PROVIDER_LOGOS2 = {
2918
+ var PROVIDER_LOGOS3 = {
2913
2919
  anthropic: "/logos/providers/anthropic.svg",
2914
2920
  amazon: "/logos/providers/aws.svg",
2915
2921
  google: "/logos/providers/google-gemini.svg",
@@ -3021,8 +3027,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
3021
3027
  ] });
3022
3028
  }
3023
3029
  function LogicNodeItemCard({ item, translationFunction }) {
3024
- const IconComponent = chunkNJFRJ6YD_js.LOGIC_ICON_MAP[item.nodeType];
3025
- const gradient = chunkNJFRJ6YD_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
3030
+ const IconComponent = chunkQSMPKL27_js.LOGIC_ICON_MAP[item.nodeType];
3031
+ const gradient = chunkQSMPKL27_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
3026
3032
  const defaultConfig = chunk72SWXOD5_js.createDefaultLogicNodeConfig(item.nodeType);
3027
3033
  const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
3028
3034
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3093,7 +3099,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3093
3099
  [entityTypes, normalizedQuery]
3094
3100
  );
3095
3101
  const filteredLogicItems = react.useMemo(() => {
3096
- const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkNJFRJ6YD_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3102
+ const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkQSMPKL27_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3097
3103
  if (!normalizedQuery) return visibleByDefault;
3098
3104
  return visibleByDefault.filter(
3099
3105
  (item) => t(item.nameKey).toLowerCase().includes(normalizedQuery) || t(item.descriptionKey).toLowerCase().includes(normalizedQuery)
@@ -3142,31 +3148,70 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3142
3148
  onAdd: onCreateAgent,
3143
3149
  addLabel: t("newAgent"),
3144
3150
  count: filteredAgents.length,
3145
- 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(
3146
- "div",
3147
- {
3148
- draggable: true,
3149
- onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
3150
- 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",
3151
- children: [
3152
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
3153
- 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" }) }),
3154
- /* @__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" }) })
3155
- ] }),
3156
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3157
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
3158
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
3159
- (() => {
3160
- const tier = chunk72SWXOD5_js.getAgentTier(Number(agent.elo ?? 0));
3161
- 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)}`) });
3162
- })()
3151
+ 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: [
3152
+ filteredAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
3153
+ "div",
3154
+ {
3155
+ draggable: true,
3156
+ onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
3157
+ 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",
3158
+ children: [
3159
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
3160
+ 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" }) }),
3161
+ /* @__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" }) })
3163
3162
  ] }),
3164
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
3165
- ] })
3166
- ]
3167
- },
3168
- agent.agentId
3169
- )) })
3163
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3164
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
3165
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
3166
+ (() => {
3167
+ const tier = chunk72SWXOD5_js.getAgentTier(Number(agent.elo ?? 0));
3168
+ 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)}`) });
3169
+ })()
3170
+ ] }),
3171
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
3172
+ ] })
3173
+ ]
3174
+ },
3175
+ agent.agentId
3176
+ )),
3177
+ filteredProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 border-t border-gray-200/40 pt-2 dark:border-white/5", children: [
3178
+ /* @__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") }),
3179
+ filteredProviders.map((provider) => {
3180
+ const providerLogo = PROVIDER_LOGOS3[provider.provider];
3181
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3182
+ "div",
3183
+ {
3184
+ draggable: true,
3185
+ onDragStart: (event) => {
3186
+ const defaultConfig = JSON.stringify({
3187
+ type: "model_provider",
3188
+ providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
3189
+ name: provider.name,
3190
+ modelFilter: []
3191
+ });
3192
+ onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
3193
+ },
3194
+ onClick: () => onConfigureProvider?.(provider.id),
3195
+ 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",
3196
+ role: "button",
3197
+ tabIndex: 0,
3198
+ children: [
3199
+ 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" }) }),
3200
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3201
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
3202
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
3203
+ provider.modelCount,
3204
+ " models"
3205
+ ] })
3206
+ ] }),
3207
+ 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") })
3208
+ ]
3209
+ },
3210
+ provider.id
3211
+ );
3212
+ })
3213
+ ] })
3214
+ ] })
3170
3215
  }
3171
3216
  ),
3172
3217
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3190,7 +3235,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3190
3235
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.category })
3191
3236
  ] }),
3192
3237
  /* @__PURE__ */ jsxRuntime.jsx(
3193
- chunkI2NZGVBG_js.ToggleSwitch,
3238
+ chunkAWDH6WNA_js.ToggleSwitch,
3194
3239
  {
3195
3240
  checked: Boolean(tool.enabled),
3196
3241
  onChange: () => {
@@ -3231,7 +3276,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3231
3276
  ] })
3232
3277
  ] }),
3233
3278
  /* @__PURE__ */ jsxRuntime.jsx(
3234
- chunkI2NZGVBG_js.ToggleSwitch,
3279
+ chunkAWDH6WNA_js.ToggleSwitch,
3235
3280
  {
3236
3281
  checked: Boolean(rule.enabled),
3237
3282
  onChange: () => {
@@ -3267,8 +3312,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3267
3312
  limit: entity.defaultLimit
3268
3313
  });
3269
3314
  const dsLogo = getDatasourceLogo(entity.id);
3270
- const EntityIcon = chunkNJFRJ6YD_js.getEntityIcon(entity.id);
3271
- const entityGradient = chunkNJFRJ6YD_js.getEntityGradient(entity.id);
3315
+ const EntityIcon = chunkQSMPKL27_js.getEntityIcon(entity.id);
3316
+ const entityGradient = chunkQSMPKL27_js.getEntityGradient(entity.id);
3272
3317
  return /* @__PURE__ */ jsxRuntime.jsxs(
3273
3318
  "div",
3274
3319
  {
@@ -3288,7 +3333,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3288
3333
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3289
3334
  /* @__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" }),
3290
3335
  /* @__PURE__ */ jsxRuntime.jsx(
3291
- chunkI2NZGVBG_js.ToggleSwitch,
3336
+ chunkAWDH6WNA_js.ToggleSwitch,
3292
3337
  {
3293
3338
  checked: true,
3294
3339
  onChange: () => {
@@ -3307,49 +3352,6 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3307
3352
  })
3308
3353
  }
3309
3354
  ),
3310
- filteredProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3311
- CollapsibleSection,
3312
- {
3313
- title: t("connectionsSection"),
3314
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3 w-3" }),
3315
- colorClass: "text-slate-600 dark:text-slate-400",
3316
- count: filteredProviders.length,
3317
- children: filteredProviders.map((provider) => {
3318
- const providerLogo = PROVIDER_LOGOS2[provider.provider];
3319
- return /* @__PURE__ */ jsxRuntime.jsxs(
3320
- "div",
3321
- {
3322
- draggable: true,
3323
- onDragStart: (event) => {
3324
- const defaultConfig = JSON.stringify({
3325
- type: "model_provider",
3326
- providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
3327
- name: provider.name,
3328
- modelFilter: []
3329
- });
3330
- onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
3331
- },
3332
- onClick: () => onConfigureProvider?.(provider.id),
3333
- 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",
3334
- role: "button",
3335
- tabIndex: 0,
3336
- children: [
3337
- 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" }) }),
3338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3339
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
3340
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
3341
- provider.modelCount,
3342
- " models"
3343
- ] })
3344
- ] }),
3345
- 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") })
3346
- ]
3347
- },
3348
- provider.id
3349
- );
3350
- })
3351
- }
3352
- ),
3353
3355
  /* @__PURE__ */ jsxRuntime.jsxs(
3354
3356
  CollapsibleSection,
3355
3357
  {
@@ -3544,7 +3546,7 @@ function VersionHistoryPanel({
3544
3546
  )
3545
3547
  ] }),
3546
3548
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto", children: [
3547
- 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" }) }),
3549
+ 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" }) }),
3548
3550
  loadError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-8 text-center", "data-testid": "version-history-error", children: [
3549
3551
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-500 dark:text-red-400", children: loadError }),
3550
3552
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3657,7 +3659,7 @@ var STATUS_CONFIG = {
3657
3659
  label: "error"
3658
3660
  }
3659
3661
  };
3660
- function formatDuration3(durationMs) {
3662
+ function formatDuration2(durationMs) {
3661
3663
  if (durationMs < 1e3) {
3662
3664
  return `${durationMs}ms`;
3663
3665
  }
@@ -3666,9 +3668,9 @@ function formatDuration3(durationMs) {
3666
3668
  }
3667
3669
  function RunPanel({ open, onClose, onRun, onStop }) {
3668
3670
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
3669
- const nodes = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodes);
3670
- const isRunning = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.isRunning);
3671
- const nodeResults = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodeResults);
3671
+ const nodes = chunkQSMPKL27_js.useWorkflowStore((state) => state.nodes);
3672
+ const isRunning = chunkQSMPKL27_js.useWorkflowStore((state) => state.isRunning);
3673
+ const nodeResults = chunkQSMPKL27_js.useWorkflowStore((state) => state.nodeResults);
3672
3674
  const startNode = nodes.find((node) => node.type === "start");
3673
3675
  const hasEndNode = nodes.some((node) => node.type === "end");
3674
3676
  const hasValidStartConfig = Boolean(
@@ -3687,10 +3689,24 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3687
3689
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3688
3690
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-4 w-4 text-gray-500 dark:text-gray-400" }),
3689
3691
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: translations("title") }),
3690
- 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: [
3691
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-blue-500" }),
3692
- translations("executing")
3693
- ] })
3692
+ isRunning && /* @__PURE__ */ jsxRuntime.jsxs(
3693
+ "span",
3694
+ {
3695
+ role: "status",
3696
+ "aria-live": "polite",
3697
+ 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",
3698
+ children: [
3699
+ /* @__PURE__ */ jsxRuntime.jsx(
3700
+ "span",
3701
+ {
3702
+ "aria-hidden": "true",
3703
+ className: "h-1.5 w-1.5 motion-safe:animate-pulse rounded-full bg-blue-500"
3704
+ }
3705
+ ),
3706
+ translations("executing")
3707
+ ]
3708
+ }
3709
+ )
3694
3710
  ] }),
3695
3711
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3696
3712
  isRunning ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3751,7 +3767,7 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3751
3767
  ] }),
3752
3768
  result?.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-red-500 dark:text-red-400", children: result.error })
3753
3769
  ] }),
3754
- 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) })
3770
+ 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) })
3755
3771
  ]
3756
3772
  },
3757
3773
  node.id
@@ -3765,7 +3781,7 @@ function SpinnerIcon({ className }) {
3765
3781
  return /* @__PURE__ */ jsxRuntime.jsxs(
3766
3782
  "svg",
3767
3783
  {
3768
- className: `animate-spin ${className ?? ""}`,
3784
+ className: `animate-spin motion-reduce:animate-none ${className ?? ""}`,
3769
3785
  viewBox: "0 0 24 24",
3770
3786
  fill: "none",
3771
3787
  stroke: "currentColor",
@@ -3985,8 +4001,8 @@ function inferVariables(config, nodeType) {
3985
4001
  }
3986
4002
  function VariableInspector({ open, onClose }) {
3987
4003
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
3988
- const nodes = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodes);
3989
- const edges = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.edges);
4004
+ const nodes = chunkQSMPKL27_js.useWorkflowStore((state) => state.nodes);
4005
+ const edges = chunkQSMPKL27_js.useWorkflowStore((state) => state.edges);
3990
4006
  const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
3991
4007
  const toggleNodeExpansion = react.useCallback((nodeId) => {
3992
4008
  setExpandedNodes((current) => {
@@ -4048,8 +4064,8 @@ function VariableInspector({ open, onClose }) {
4048
4064
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
4049
4065
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
4050
4066
  const isExpanded = expandedNodes.has(entry.nodeId);
4051
- const IconComponent = chunkNJFRJ6YD_js.LOGIC_ICON_MAP[entry.nodeType];
4052
- const gradient = chunkNJFRJ6YD_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
4067
+ const IconComponent = chunkQSMPKL27_js.LOGIC_ICON_MAP[entry.nodeType];
4068
+ const gradient = chunkQSMPKL27_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
4053
4069
  const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
4054
4070
  const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
4055
4071
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
@@ -4115,7 +4131,7 @@ function RunInputDialog({
4115
4131
  onRun
4116
4132
  }) {
4117
4133
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
4118
- const nodes = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodes);
4134
+ const nodes = chunkQSMPKL27_js.useWorkflowStore((state) => state.nodes);
4119
4135
  const [values, setValues] = react.useState({});
4120
4136
  const inputVariableNames = react.useMemo(() => {
4121
4137
  const storeStartNode = nodes.find((node) => node.type === "start");
@@ -4142,7 +4158,7 @@ function RunInputDialog({
4142
4158
  }, [onClose]);
4143
4159
  if (!open) return null;
4144
4160
  return /* @__PURE__ */ jsxRuntime.jsxs(
4145
- chunkI2NZGVBG_js.GlassModal,
4161
+ chunkAWDH6WNA_js.GlassModal,
4146
4162
  {
4147
4163
  open,
4148
4164
  onClose: handleClose,
@@ -4153,7 +4169,7 @@ function RunInputDialog({
4153
4169
  /* @__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: [
4154
4170
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: variableName }),
4155
4171
  /* @__PURE__ */ jsxRuntime.jsx(
4156
- chunkI2NZGVBG_js.Input,
4172
+ chunkAWDH6WNA_js.Input,
4157
4173
  {
4158
4174
  value: values[variableName] ?? "",
4159
4175
  onChange: (event) => handleValueChange(variableName, event.target.value),
@@ -4162,8 +4178,8 @@ function RunInputDialog({
4162
4178
  )
4163
4179
  ] }, variableName)) }),
4164
4180
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex items-center justify-end gap-2", children: [
4165
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
4166
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
4181
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
4182
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkAWDH6WNA_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
4167
4183
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-3.5 w-3.5", "data-slot": "icon" }),
4168
4184
  t("run")
4169
4185
  ] })
@@ -4175,13 +4191,13 @@ function RunInputDialog({
4175
4191
  var STATUS_STYLES = {
4176
4192
  completed: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4177
4193
  failed: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4178
- running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin" },
4194
+ running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin motion-reduce:animate-none" },
4179
4195
  pending: { icon: outline.ClockIcon, colorClass: "text-gray-400" },
4180
4196
  success: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4181
4197
  error: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4182
4198
  skipped: { icon: outline.ClockIcon, colorClass: "text-gray-400" }
4183
4199
  };
4184
- function formatDuration4(durationMs) {
4200
+ function formatDuration3(durationMs) {
4185
4201
  if (durationMs === null) return "\u2014";
4186
4202
  if (durationMs < 1e3) return `${durationMs}ms`;
4187
4203
  return `${(durationMs / 1e3).toFixed(1)}s`;
@@ -4196,8 +4212,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4196
4212
  const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
4197
4213
  const [selectedRun, setSelectedRun] = react.useState(null);
4198
4214
  const [selectedNode, setSelectedNode] = react.useState(null);
4199
- const isRunning = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.isRunning);
4200
- const nodeResults = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodeResults);
4215
+ const isRunning = chunkQSMPKL27_js.useWorkflowStore((state) => state.isRunning);
4216
+ const nodeResults = chunkQSMPKL27_js.useWorkflowStore((state) => state.nodeResults);
4201
4217
  const refreshRuns = react.useCallback(async () => {
4202
4218
  setIsLoadingRuns(true);
4203
4219
  try {
@@ -4232,7 +4248,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4232
4248
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
4233
4249
  isRunning && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-gray-200/50 px-4 py-3 dark:border-gray-700/50", children: [
4234
4250
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
4235
- /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "h-4 w-4 animate-spin text-blue-500" }),
4251
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "h-4 w-4 animate-spin motion-reduce:animate-none text-blue-500" }),
4236
4252
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-blue-600 dark:text-blue-400", children: t("activeRun") })
4237
4253
  ] }),
4238
4254
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 space-y-1 overflow-y-auto", children: Object.entries(nodeResults).map(([nodeId, result]) => {
@@ -4243,7 +4259,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4243
4259
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4244
4260
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-gray-700 dark:text-gray-300", children: nodeId.slice(0, 8) })
4245
4261
  ] }),
4246
- result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration4(result.durationMs) })
4262
+ result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration3(result.durationMs) })
4247
4263
  ] }, nodeId);
4248
4264
  }) })
4249
4265
  ] }),
@@ -4259,7 +4275,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4259
4275
  ] }),
4260
4276
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
4261
4277
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: t("duration") }),
4262
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration4(selectedNode.durationMs) })
4278
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration3(selectedNode.durationMs) })
4263
4279
  ] }),
4264
4280
  selectedNode.error && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4265
4281
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500", children: t("error") }),
@@ -4298,7 +4314,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4298
4314
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4299
4315
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: formatTimestamp2(run.createdAt) })
4300
4316
  ] }),
4301
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(run.totalDurationMs) })
4317
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(run.totalDurationMs) })
4302
4318
  ] }),
4303
4319
  run.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 truncate text-[10px] text-red-500", children: run.error })
4304
4320
  ]
@@ -4322,7 +4338,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4322
4338
  /* @__PURE__ */ jsxRuntime.jsx(NodeStatusIcon, { className: `h-3 w-3 ${nodeStatusStyle.colorClass}` }),
4323
4339
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: nodeResult.nodeType })
4324
4340
  ] }),
4325
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(nodeResult.durationMs) })
4341
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(nodeResult.durationMs) })
4326
4342
  ]
4327
4343
  },
4328
4344
  nodeResult.nodeId
@@ -4334,12 +4350,34 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4334
4350
  ] })
4335
4351
  ] });
4336
4352
  }
4337
- function SaveStatusBadge({ status }) {
4353
+ function SaveStatusBadge({ status, labels }) {
4354
+ const savingLabel = labels?.saving ?? "Salvando\u2026";
4355
+ const savedLabel = labels?.saved ?? "Salvo";
4338
4356
  if (status === "saving") {
4339
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-pulse text-[10px] text-gray-400 dark:text-gray-500", children: "\u2022" });
4357
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4358
+ /* @__PURE__ */ jsxRuntime.jsx(
4359
+ "span",
4360
+ {
4361
+ "aria-hidden": "true",
4362
+ className: "motion-safe:animate-pulse text-[11px] text-gray-500 dark:text-gray-400",
4363
+ children: "\u2022"
4364
+ }
4365
+ ),
4366
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savingLabel })
4367
+ ] });
4340
4368
  }
4341
4369
  if (status === "saved") {
4342
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-green-500/60 dark:text-green-400/50", children: "\u2713" });
4370
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4371
+ /* @__PURE__ */ jsxRuntime.jsx(
4372
+ "span",
4373
+ {
4374
+ "aria-hidden": "true",
4375
+ className: "text-[11px] text-emerald-600 dark:text-emerald-400",
4376
+ children: "\u2713"
4377
+ }
4378
+ ),
4379
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savedLabel })
4380
+ ] });
4343
4381
  }
4344
4382
  return null;
4345
4383
  }
@@ -4353,7 +4391,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4353
4391
  onAutoSaveGraph(graph);
4354
4392
  }, [onAutoSaveGraph, onGraphSnapshot]);
4355
4393
  return /* @__PURE__ */ jsxRuntime.jsx(
4356
- chunkNJFRJ6YD_js.Workspace,
4394
+ chunkQSMPKL27_js.Workspace,
4357
4395
  {
4358
4396
  ...workspaceProps,
4359
4397
  onGraphChange: handleGraphChange
@@ -4361,7 +4399,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4361
4399
  );
4362
4400
  });
4363
4401
  function DynamicIslandConfirm2(props) {
4364
- return /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.DynamicIslandConfirm, { ...props });
4402
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.DynamicIslandConfirm, { ...props });
4365
4403
  }
4366
4404
  var JSON_PREVIEW_LINE_LIMIT = 50;
4367
4405
  function DslExportModal({ open, onClose, workflow, graph }) {
@@ -4415,7 +4453,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4415
4453
  }, [jsonString, workflow.name, workflow.version]);
4416
4454
  if (!open) return null;
4417
4455
  return /* @__PURE__ */ jsxRuntime.jsx(
4418
- chunkI2NZGVBG_js.GlassModal,
4456
+ chunkAWDH6WNA_js.GlassModal,
4419
4457
  {
4420
4458
  open,
4421
4459
  onClose,
@@ -4457,7 +4495,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4457
4495
  ] }),
4458
4496
  /* @__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: [
4459
4497
  /* @__PURE__ */ jsxRuntime.jsx(
4460
- chunkI2NZGVBG_js.Button,
4498
+ chunkAWDH6WNA_js.Button,
4461
4499
  {
4462
4500
  type: "button",
4463
4501
  onClick: handleCopyToClipboard,
@@ -4474,7 +4512,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4474
4512
  }
4475
4513
  ),
4476
4514
  /* @__PURE__ */ jsxRuntime.jsxs(
4477
- chunkI2NZGVBG_js.Button,
4515
+ chunkAWDH6WNA_js.Button,
4478
4516
  {
4479
4517
  type: "button",
4480
4518
  onClick: handleDownloadJson,
@@ -4633,7 +4671,7 @@ function DslImportModal({ open, onClose, onImport }) {
4633
4671
  }, []);
4634
4672
  if (!open) return null;
4635
4673
  return /* @__PURE__ */ jsxRuntime.jsx(
4636
- chunkI2NZGVBG_js.GlassModal,
4674
+ chunkAWDH6WNA_js.GlassModal,
4637
4675
  {
4638
4676
  open,
4639
4677
  onClose,
@@ -4673,7 +4711,7 @@ function DslImportModal({ open, onClose, onImport }) {
4673
4711
  ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "import-validation-result", children: [
4674
4712
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
4675
4713
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: fileName }),
4676
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
4714
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
4677
4715
  ] }),
4678
4716
  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: [
4679
4717
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4701,9 +4739,9 @@ function DslImportModal({ open, onClose, onImport }) {
4701
4739
  ] })
4702
4740
  ] }) }),
4703
4741
  /* @__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: [
4704
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4742
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4705
4743
  /* @__PURE__ */ jsxRuntime.jsxs(
4706
- chunkI2NZGVBG_js.Button,
4744
+ chunkAWDH6WNA_js.Button,
4707
4745
  {
4708
4746
  type: "button",
4709
4747
  onClick: handleImport,
@@ -4724,14 +4762,14 @@ function DslImportModal({ open, onClose, onImport }) {
4724
4762
  }
4725
4763
 
4726
4764
  // src/astrlabe/store/selectors.ts
4727
- var useCanUndo = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.past.length > 0);
4728
- var useCanRedo = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.future.length > 0);
4729
- var useHasCopied = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.clipboard !== null);
4730
- var useContextMenu = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.contextMenu);
4731
- var useEditingNodeId = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.editingNodeId);
4732
- var useSelectedNodeCount = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
4733
- var useIsRunning = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.isRunning);
4734
- var useNodeResults = () => chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodeResults);
4765
+ var useCanUndo = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.past.length > 0);
4766
+ var useCanRedo = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.future.length > 0);
4767
+ var useHasCopied = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.clipboard !== null);
4768
+ var useContextMenu = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.contextMenu);
4769
+ var useEditingNodeId = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.editingNodeId);
4770
+ var useSelectedNodeCount = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
4771
+ var useIsRunning = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.isRunning);
4772
+ var useNodeResults = () => chunkQSMPKL27_js.useWorkflowStore((state) => state.nodeResults);
4735
4773
  var DEFAULT_MAX_HISTORY = 50;
4736
4774
  function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
4737
4775
  const pastRef = react.useRef([]);
@@ -5018,6 +5056,7 @@ exports.DslImportModal = DslImportModal;
5018
5056
  exports.DynamicIslandConfirm = DynamicIslandConfirm2;
5019
5057
  exports.ExecutionTimelinePanel = ExecutionTimelinePanel;
5020
5058
  exports.MetaLlamaIcon = MetaLlamaIcon;
5059
+ exports.ModelProviderFlowNode = ModelProviderFlowNode;
5021
5060
  exports.NodePalette = NodePalette;
5022
5061
  exports.OutputSchemaBuilder = OutputSchemaBuilder;
5023
5062
  exports.PipelineSettingsModal = PipelineSettingsModal;
@@ -5054,5 +5093,5 @@ exports.useNodeResults = useNodeResults;
5054
5093
  exports.useSelectedNodeCount = useSelectedNodeCount;
5055
5094
  exports.useSubworkflowStore = useSubworkflowStore;
5056
5095
  exports.useUndoRedo = useUndoRedo;
5057
- //# sourceMappingURL=chunk-IJAKZHXX.js.map
5058
- //# sourceMappingURL=chunk-IJAKZHXX.js.map
5096
+ //# sourceMappingURL=chunk-74MHWEDC.js.map
5097
+ //# sourceMappingURL=chunk-74MHWEDC.js.map