@datatechsolutions/ui 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/astrlabe/index.d.mts +22 -30
  2. package/dist/astrlabe/index.d.ts +22 -30
  3. package/dist/astrlabe/index.js +112 -112
  4. package/dist/astrlabe/index.mjs +5 -5
  5. package/dist/astrlabe/workflow-canvas.d.mts +6 -69
  6. package/dist/astrlabe/workflow-canvas.d.ts +6 -69
  7. package/dist/astrlabe/workflow-canvas.js +5 -5
  8. package/dist/astrlabe/workflow-canvas.mjs +4 -4
  9. package/dist/brand/index.d.mts +1 -15
  10. package/dist/brand/index.d.ts +1 -15
  11. package/dist/brand/index.js +0 -14
  12. package/dist/brand/index.js.map +1 -1
  13. package/dist/brand/index.mjs +0 -14
  14. package/dist/brand/index.mjs.map +1 -1
  15. package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
  16. package/dist/chunk-2OZZH2IO.js.map +1 -0
  17. package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
  18. package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
  19. package/dist/{chunk-JSNRCYSO.js → chunk-45QAUEYT.js} +4 -4
  20. package/dist/{chunk-JSNRCYSO.js.map → chunk-45QAUEYT.js.map} +1 -1
  21. package/dist/{chunk-B67DP7MI.mjs → chunk-4GDWGWHY.mjs} +4 -4
  22. package/dist/{chunk-B67DP7MI.mjs.map → chunk-4GDWGWHY.mjs.map} +1 -1
  23. package/dist/{chunk-KR2X2WHJ.js → chunk-4ICEQJH4.js} +53 -53
  24. package/dist/{chunk-KR2X2WHJ.js.map → chunk-4ICEQJH4.js.map} +1 -1
  25. package/dist/{chunk-RXZNACMI.js → chunk-6MBWKOPF.js} +33 -33
  26. package/dist/{chunk-RXZNACMI.js.map → chunk-6MBWKOPF.js.map} +1 -1
  27. package/dist/{chunk-JN6IL6OH.mjs → chunk-AGGOHPMZ.mjs} +1054 -5229
  28. package/dist/chunk-AGGOHPMZ.mjs.map +1 -0
  29. package/dist/{chunk-5GDKCFM5.mjs → chunk-AL73YAV4.mjs} +3 -3
  30. package/dist/{chunk-5GDKCFM5.mjs.map → chunk-AL73YAV4.mjs.map} +1 -1
  31. package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
  32. package/dist/chunk-BUDZNAKL.mjs.map +1 -0
  33. package/dist/{chunk-OL73LBX5.mjs → chunk-BW67WFHT.mjs} +3 -4
  34. package/dist/chunk-BW67WFHT.mjs.map +1 -0
  35. package/dist/{chunk-W5OEBO6E.js → chunk-CF7GOUBQ.js} +13 -14
  36. package/dist/chunk-CF7GOUBQ.js.map +1 -0
  37. package/dist/{chunk-IRPS5UCS.mjs → chunk-CUWPLPVY.mjs} +3 -3
  38. package/dist/{chunk-IRPS5UCS.mjs.map → chunk-CUWPLPVY.mjs.map} +1 -1
  39. package/dist/{chunk-IJAKZHXX.js → chunk-ERCDMBRT.js} +683 -645
  40. package/dist/chunk-ERCDMBRT.js.map +1 -0
  41. package/dist/{chunk-I2NZGVBG.js → chunk-FSBR4RCK.js} +1101 -5313
  42. package/dist/chunk-FSBR4RCK.js.map +1 -0
  43. package/dist/{chunk-5RM6NGZ6.mjs → chunk-IDEM3DYF.mjs} +3 -3
  44. package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-IDEM3DYF.mjs.map} +1 -1
  45. package/dist/{chunk-NJFRJ6YD.js → chunk-M7KSEUZR.js} +225 -384
  46. package/dist/chunk-M7KSEUZR.js.map +1 -0
  47. package/dist/{chunk-AOUUZ52N.js → chunk-MO5FBVV3.js} +85 -86
  48. package/dist/chunk-MO5FBVV3.js.map +1 -0
  49. package/dist/{chunk-BR2GAZKG.mjs → chunk-NAFWHJCM.mjs} +7 -7
  50. package/dist/{chunk-BR2GAZKG.mjs.map → chunk-NAFWHJCM.mjs.map} +1 -1
  51. package/dist/{chunk-3JJWPOK6.js → chunk-NCLZKVJK.js} +9 -10
  52. package/dist/chunk-NCLZKVJK.js.map +1 -0
  53. package/dist/{chunk-R4TQWXNG.mjs → chunk-NVQWHJQH.mjs} +6 -5
  54. package/dist/chunk-NVQWHJQH.mjs.map +1 -0
  55. package/dist/{chunk-ZL6C2ZAF.js → chunk-PGVZKMOA.js} +67 -67
  56. package/dist/{chunk-ZL6C2ZAF.js.map → chunk-PGVZKMOA.js.map} +1 -1
  57. package/dist/{chunk-UDDZTTLO.mjs → chunk-QBFE7ABE.mjs} +6 -7
  58. package/dist/chunk-QBFE7ABE.mjs.map +1 -0
  59. package/dist/{chunk-3ZUMJTDT.mjs → chunk-RFRXS4PC.mjs} +3 -4
  60. package/dist/{chunk-3JJWPOK6.js.map → chunk-RFRXS4PC.mjs.map} +1 -1
  61. package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
  62. package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
  63. package/dist/{chunk-MWPTSBAI.js → chunk-RLLP7VQJ.js} +26 -26
  64. package/dist/{chunk-MWPTSBAI.js.map → chunk-RLLP7VQJ.js.map} +1 -1
  65. package/dist/{chunk-GIQXB3BG.mjs → chunk-RLVOG5OQ.mjs} +3 -3
  66. package/dist/{chunk-GIQXB3BG.mjs.map → chunk-RLVOG5OQ.mjs.map} +1 -1
  67. package/dist/{chunk-2WXRRQM3.mjs → chunk-SEYUYGER.mjs} +553 -516
  68. package/dist/chunk-SEYUYGER.mjs.map +1 -0
  69. package/dist/{chunk-O6M3KDGT.mjs → chunk-SQ4KGLBZ.mjs} +4 -4
  70. package/dist/{chunk-O6M3KDGT.mjs.map → chunk-SQ4KGLBZ.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-ZM5MVWIT.js → chunk-TUQLZ4QD.js} +5 -6
  74. package/dist/chunk-TUQLZ4QD.js.map +1 -0
  75. package/dist/{chunk-TVMLV675.js → chunk-UE2RDQIK.js} +98 -95
  76. package/dist/chunk-UE2RDQIK.js.map +1 -0
  77. package/dist/{chunk-HDCUWUNH.js → chunk-UJVDI66K.js} +28 -27
  78. package/dist/chunk-UJVDI66K.js.map +1 -0
  79. package/dist/{chunk-PCYL4MII.mjs → chunk-VV6SYMPM.mjs} +156 -314
  80. package/dist/chunk-VV6SYMPM.mjs.map +1 -0
  81. package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
  82. package/dist/chunk-VY52Y5GC.js.map +1 -0
  83. package/dist/{chunk-LEKZUS6N.mjs → chunk-X3GW7UPN.mjs} +4 -5
  84. package/dist/chunk-X3GW7UPN.mjs.map +1 -0
  85. package/dist/{chunk-OCELRSLO.js → chunk-Y2AYFG4E.js} +4 -4
  86. package/dist/{chunk-OCELRSLO.js.map → chunk-Y2AYFG4E.js.map} +1 -1
  87. package/dist/{chunk-TIJJHW2Z.js → chunk-YV7F7IXG.js} +36 -36
  88. package/dist/{chunk-TIJJHW2Z.js.map → chunk-YV7F7IXG.js.map} +1 -1
  89. package/dist/{chunk-MVBIAXVN.mjs → chunk-ZKSDDFHG.mjs} +14 -11
  90. package/dist/chunk-ZKSDDFHG.mjs.map +1 -0
  91. package/dist/{index-VI9gyJXl.d.mts → index-BNRGVAS5.d.mts} +9 -2
  92. package/dist/index-BoebbJ44.d.mts +49 -0
  93. package/dist/index-BoebbJ44.d.ts +49 -0
  94. package/dist/{index-CoB18TbG.d.ts → index-CnCY-b5V.d.ts} +9 -2
  95. package/dist/index.d.mts +399 -548
  96. package/dist/index.d.ts +399 -548
  97. package/dist/index.js +727 -887
  98. package/dist/index.mjs +3 -3
  99. package/dist/platform/admin/index.js +12 -12
  100. package/dist/platform/admin/index.mjs +6 -6
  101. package/dist/platform/agents-workspace.js +8 -8
  102. package/dist/platform/agents-workspace.mjs +7 -7
  103. package/dist/platform/app-shell.js +5 -5
  104. package/dist/platform/app-shell.mjs +4 -4
  105. package/dist/platform/auth/index.js +29 -29
  106. package/dist/platform/auth/index.mjs +6 -6
  107. package/dist/platform/billing/index.js +5 -5
  108. package/dist/platform/billing/index.mjs +4 -4
  109. package/dist/platform/impersonation/index.js +5 -5
  110. package/dist/platform/impersonation/index.mjs +4 -4
  111. package/dist/platform/index.d.mts +3 -39
  112. package/dist/platform/index.d.ts +3 -39
  113. package/dist/platform/index.js +95 -4805
  114. package/dist/platform/index.js.map +1 -1
  115. package/dist/platform/index.mjs +23 -4728
  116. package/dist/platform/index.mjs.map +1 -1
  117. package/dist/platform/pages/index.d.mts +4 -4
  118. package/dist/platform/pages/index.d.ts +4 -4
  119. package/dist/platform/pages/index.js +197 -197
  120. package/dist/platform/pages/index.mjs +9 -9
  121. package/dist/platform/rbac.d.mts +2 -1
  122. package/dist/platform/rbac.d.ts +2 -1
  123. package/dist/platform/rbac.js +2 -2
  124. package/dist/platform/rbac.mjs +1 -1
  125. package/dist/platform/settings/index.js +9 -9
  126. package/dist/platform/settings/index.mjs +8 -8
  127. package/dist/platform/utils/index.js +3 -3
  128. package/dist/platform/utils/index.js.map +1 -1
  129. package/dist/platform/utils/index.mjs +1 -1
  130. package/dist/platform/utils/index.mjs.map +1 -1
  131. package/dist/platform/workflow-api-client.d.mts +2 -2
  132. package/dist/platform/workflow-api-client.d.ts +2 -2
  133. package/dist/platform/workflow-api-client.js +62 -62
  134. package/dist/platform/workflow-api-client.mjs +2 -2
  135. package/dist/platform/workflow-canvas-shell.js +6 -6
  136. package/dist/platform/workflow-canvas-shell.mjs +5 -5
  137. package/dist/{workflow-api-client-DoYj7nHz.d.mts → workflow-api-client-CpFl3WcG.d.mts} +1 -1
  138. package/dist/{workflow-api-client-BKD8OfP_.d.ts → workflow-api-client-uLICOanv.d.ts} +1 -1
  139. package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
  140. package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
  141. package/package.json +15 -5
  142. package/src/styles/liquid-glass.css +283 -2
  143. package/dist/chunk-2WXRRQM3.mjs.map +0 -1
  144. package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
  145. package/dist/chunk-AOUUZ52N.js.map +0 -1
  146. package/dist/chunk-FAGDZEKM.js.map +0 -1
  147. package/dist/chunk-HDCUWUNH.js.map +0 -1
  148. package/dist/chunk-HZ4LOVHM.js.map +0 -1
  149. package/dist/chunk-I2NZGVBG.js.map +0 -1
  150. package/dist/chunk-IJAKZHXX.js.map +0 -1
  151. package/dist/chunk-JN6IL6OH.mjs.map +0 -1
  152. package/dist/chunk-LEKZUS6N.mjs.map +0 -1
  153. package/dist/chunk-MVBIAXVN.mjs.map +0 -1
  154. package/dist/chunk-NJFRJ6YD.js.map +0 -1
  155. package/dist/chunk-OL73LBX5.mjs.map +0 -1
  156. package/dist/chunk-PCYL4MII.mjs.map +0 -1
  157. package/dist/chunk-R4TQWXNG.mjs.map +0 -1
  158. package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
  159. package/dist/chunk-TVMLV675.js.map +0 -1
  160. package/dist/chunk-UDDZTTLO.mjs.map +0 -1
  161. package/dist/chunk-W5OEBO6E.js.map +0 -1
  162. package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
  163. package/dist/chunk-ZM5MVWIT.js.map +0 -1
  164. package/src/brand/logos/kori-icon.svg +0 -45
  165. package/src/brand/logos/kori-logo-dark.svg +0 -40
  166. 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 chunkM7KSEUZR_js = require('./chunk-M7KSEUZR.js');
5
+ var chunkFSBR4RCK_js = require('./chunk-FSBR4RCK.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(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
44
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
45
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
46
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsx(
47
+ chunkM7KSEUZR_js.NodeCardHeader,
48
+ {
49
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
50
+ title: data.label || "Model Provider",
51
+ description: "Not configured",
52
+ iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
53
+ }
54
+ ) }),
55
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
56
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
57
+ ] });
58
+ }
59
+ const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
60
+ const displayName = config.name || providerLabel;
61
+ const regionLabel = config.region ? config.region : void 0;
62
+ const isConfigured = !!(config.credentialRef || config.apiKeyRef);
63
+ const logo = PROVIDER_LOGOS[config.providerType];
64
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
65
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
66
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
67
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
68
+ /* @__PURE__ */ jsxRuntime.jsx(
69
+ "button",
70
+ {
71
+ type: "button",
72
+ onClick: () => data.onEdit?.(id),
73
+ className: "w-full text-left",
74
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ chunkM7KSEUZR_js.NodeCardHeader,
77
+ {
78
+ icon: logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: providerLabel, className: "h-6 w-6 object-contain", loading: "lazy" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6 text-white" }),
79
+ title: displayName,
80
+ description: providerLabel,
81
+ iconClassName: `flex h-11 w-11 items-center justify-center rounded-xl shadow-lg ${logo ? "bg-white/10 dark:bg-white/5 p-2" : "bg-gradient-to-br from-slate-600 to-slate-700 p-1.5"}`
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
85
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-semibold text-slate-700 dark:bg-slate-500/20 dark:text-slate-300", children: providerLabel }),
86
+ regionLabel && /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: regionLabel }),
87
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${isConfigured ? "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300" : "bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300"}`, children: isConfigured ? "Configured" : "Setup needed" }),
88
+ config.modelFilter && config.modelFilter.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: [
89
+ config.modelFilter.length,
90
+ " models"
91
+ ] })
92
+ ] }) })
93
+ ] })
94
+ }
95
+ ),
96
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
97
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
98
+ ] });
99
+ });
14
100
  var S3WriteFlowNode = react.memo(function S3WriteFlowNode2({ id, data, selected }) {
15
101
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
16
102
  const { config, label, onDelete, onEdit } = data;
17
103
  const isCompact = data.displayMode === "compact";
18
104
  const keyPreview = config.key ? config.key.slice(0, 30) : "";
19
105
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20
- /* @__PURE__ */ jsxRuntime.jsx(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(chunkM7KSEUZR_js.NodeRunningIndicator, { nodeId: id }),
107
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-cyan-500" }),
22
108
  /* @__PURE__ */ jsxRuntime.jsxs(
23
- chunkNJFRJ6YD_js.NodeInteractiveCard,
109
+ chunkM7KSEUZR_js.NodeInteractiveCard,
24
110
  {
25
111
  nodeId: id,
26
112
  onEdit,
@@ -29,27 +115,27 @@ var S3WriteFlowNode = react.memo(function S3WriteFlowNode2({ id, data, selected
29
115
  nodeType: "s3_write",
30
116
  children: [
31
117
  /* @__PURE__ */ jsxRuntime.jsx(
32
- chunkNJFRJ6YD_js.NodeCardHeader,
118
+ chunkM7KSEUZR_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(chunkM7KSEUZR_js.NodeIconBubble, { tone: "s3_write", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CloudArrowUpIcon, { className: "h-5 w-5 text-white" }) }),
35
121
  title: label,
36
122
  description: t("s3WriteNodeDescription"),
37
123
  compact: isCompact,
38
124
  iconClassName: ""
39
125
  }
40
126
  ),
41
- /* @__PURE__ */ jsxRuntime.jsxs(chunkNJFRJ6YD_js.NodeCardMeta, { compact: isCompact, children: [
127
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkM7KSEUZR_js.NodeCardMeta, { compact: isCompact, children: [
42
128
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
43
- /* @__PURE__ */ jsxRuntime.jsx(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(chunkM7KSEUZR_js.NodeCardBadge, { tone: "s3_write", children: t("s3WriteNode") }),
130
+ config.bucket && /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardBadge, { tone: "s3_write", soft: true, children: config.bucket }),
45
131
  keyPreview && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: keyPreview })
46
132
  ] }),
47
- /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.NodeCardDeleteAction, { nodeId: id, onDelete })
133
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.NodeCardDeleteAction, { nodeId: id, onDelete })
48
134
  ] })
49
135
  ]
50
136
  }
51
137
  ),
52
- /* @__PURE__ */ jsxRuntime.jsx(chunkNJFRJ6YD_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-500" })
138
+ /* @__PURE__ */ jsxRuntime.jsx(chunkM7KSEUZR_js.WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-500" })
53
139
  ] });
54
140
  });
55
141
  function AnthropicModelIcon({ className }) {
@@ -113,7 +199,7 @@ function OutputSchemaBuilder({ value, onChange, depth = 0 }) {
113
199
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-dashed border-slate-300 bg-slate-50/40 p-4 text-center dark:border-slate-700 dark:bg-slate-900/30", children: [
114
200
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "No schema yet \u2014 agent text is exposed as a raw string. Add a schema to enforce structured output." }),
115
201
  /* @__PURE__ */ jsxRuntime.jsx(
116
- chunkI2NZGVBG_js.Button,
202
+ chunkFSBR4RCK_js.Button,
117
203
  {
118
204
  type: "button",
119
205
  outline: true,
@@ -177,7 +263,7 @@ function OutputSchemaBuilder({ value, onChange, depth = 0 }) {
177
263
  },
178
264
  index
179
265
  )),
180
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: addField, children: "+ Add field" })
266
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: addField, children: "+ Add field" })
181
267
  ] })
182
268
  ] });
183
269
  }
@@ -200,7 +286,7 @@ function FieldEditor({
200
286
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
201
287
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_140px_auto_auto] items-end gap-2", children: [
202
288
  /* @__PURE__ */ jsxRuntime.jsx(
203
- chunkI2NZGVBG_js.FormInput,
289
+ chunkFSBR4RCK_js.FormInput,
204
290
  {
205
291
  label: "Name",
206
292
  value: field.name,
@@ -209,7 +295,7 @@ function FieldEditor({
209
295
  }
210
296
  ),
211
297
  /* @__PURE__ */ jsxRuntime.jsx(
212
- chunkI2NZGVBG_js.FormSelect,
298
+ chunkFSBR4RCK_js.FormSelect,
213
299
  {
214
300
  label: "Type",
215
301
  value: field.type,
@@ -229,10 +315,10 @@ function FieldEditor({
229
315
  ),
230
316
  "Required"
231
317
  ] }),
232
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
318
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
233
319
  ] }),
234
320
  /* @__PURE__ */ jsxRuntime.jsx(
235
- chunkI2NZGVBG_js.FormInput,
321
+ chunkFSBR4RCK_js.FormInput,
236
322
  {
237
323
  label: "Description (optional)",
238
324
  value: field.description,
@@ -298,94 +384,6 @@ function rowsToSchema(rows) {
298
384
  function defaultAgentOutputSchema() {
299
385
  return { type: "object", properties: {}, required: [] };
300
386
  }
301
- function StatusBadge({ status }) {
302
- const colorMap = {
303
- pending: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
304
- running: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",
305
- success: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",
306
- error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300"
307
- };
308
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold ${colorMap[status] ?? colorMap.pending}`, children: status });
309
- }
310
- function formatDuration(ms) {
311
- if (ms < 1e3) return `${ms}ms`;
312
- return `${(ms / 1e3).toFixed(2)}s`;
313
- }
314
- function isRecord(value) {
315
- return typeof value === "object" && value !== null && !Array.isArray(value);
316
- }
317
- function OutputCard({ label, value }) {
318
- const displayValue = typeof value === "string" ? value : JSON.stringify(value, null, 2);
319
- const isLong = typeof displayValue === "string" && displayValue.length > 120;
320
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-white/20 bg-white/40 p-3 dark:border-white/10 dark:bg-white/5", children: [
321
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: label }),
322
- isLong ? /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-40 overflow-auto whitespace-pre-wrap text-xs text-gray-800 dark:text-gray-200", children: displayValue }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900 dark:text-white", children: displayValue })
323
- ] });
324
- }
325
- function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
326
- const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
327
- const avatarUrl = agent.avatar;
328
- const frameworkMeta = 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(chunkM7KSEUZR_js.FRAMEWORK_META);
605
615
  const hasProviderConstraints = connectedProviderTypes.length > 0;
606
- const compatibleModels = chunkNJFRJ6YD_js.getCompatibleModels(models, selectedFramework);
616
+ const compatibleModels = chunkM7KSEUZR_js.getCompatibleModels(models, selectedFramework);
607
617
  const handleFrameworkChange = react.useCallback((newFramework) => {
608
618
  setSelectedFramework(newFramework);
609
- if (!chunkNJFRJ6YD_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
610
- const compatible = chunkNJFRJ6YD_js.getCompatibleModels(models, newFramework);
619
+ if (!chunkM7KSEUZR_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
620
+ const compatible = chunkM7KSEUZR_js.getCompatibleModels(models, newFramework);
611
621
  if (compatible.length > 0) {
612
622
  setSelectedModelId(compatible[0].id);
613
623
  }
@@ -618,10 +628,10 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
618
628
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
619
629
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
620
630
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
621
- const meta = chunkNJFRJ6YD_js.FRAMEWORK_META[key];
631
+ const meta = chunkM7KSEUZR_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 = chunkM7KSEUZR_js.getCompatibleModels(models, key).length;
634
+ const isCompatibleWithProviders = !hasProviderConstraints || chunkM7KSEUZR_js.isFrameworkCompatibleWithProviders(key, connectedProviderTypes);
625
635
  return /* @__PURE__ */ jsxRuntime.jsxs(
626
636
  "button",
627
637
  {
@@ -653,7 +663,7 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
653
663
  ] }),
654
664
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
655
665
  const isSelected = model.id === selectedModelId;
656
- const isCompatible = chunkNJFRJ6YD_js.isModelCompatibleWithFramework(model.id, selectedFramework);
666
+ const isCompatible = chunkM7KSEUZR_js.isModelCompatibleWithFramework(model.id, selectedFramework);
657
667
  const { IconComponent, color, providerLabel } = getModelIcon(model.id);
658
668
  return /* @__PURE__ */ jsxRuntime.jsxs(
659
669
  "button",
@@ -776,138 +786,6 @@ function PromptTab({
776
786
  ] })
777
787
  ] });
778
788
  }
779
- function ResultsTab({ agentId, t }) {
780
- const nodeResults = 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 = chunkM7KSEUZR_js.getFrameworkMeta(framework);
947
825
  const isCurrentFw = framework === agentFramework;
948
826
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[8px] font-medium ${isCurrentFw ? meta.badgeColor : "bg-gray-100 text-gray-500 dark:bg-white/5 dark:text-gray-400"}`, children: [
949
827
  /* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
@@ -960,7 +838,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
960
838
  event.stopPropagation();
961
839
  },
962
840
  children: /* @__PURE__ */ jsxRuntime.jsx(
963
- chunkI2NZGVBG_js.ToggleSwitch,
841
+ chunkFSBR4RCK_js.ToggleSwitch,
964
842
  {
965
843
  checked: isEnabled,
966
844
  onChange: () => onToggle(tool.agentToolId),
@@ -979,155 +857,188 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
979
857
  })
980
858
  ] });
981
859
  }
982
- function AdvancedTab({
983
- displayName,
984
- setDisplayName,
985
- description,
986
- setDescription,
860
+ function EngineTab({
861
+ agent,
862
+ models,
863
+ t,
864
+ selectedModelId,
865
+ setSelectedModelId,
866
+ selectedFramework,
867
+ setSelectedFramework,
868
+ temperature,
869
+ setTemperature,
870
+ elo,
871
+ setElo,
987
872
  maxOutputTokens,
988
873
  setMaxOutputTokens,
989
874
  topP,
990
875
  setTopP,
991
876
  topK,
992
877
  setTopK,
993
- tags,
994
- setTags,
995
- status,
996
- setStatus,
997
- avatarUrl,
998
- setAvatarUrl,
999
- markDirty,
1000
- t
878
+ modelProviders,
879
+ selectedProviderId,
880
+ onSelectProvider,
881
+ markDirty
1001
882
  }) {
1002
- const wrap = "w-full rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2 text-sm text-gray-800 outline-none transition-colors focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 dark:border-white/10 dark:bg-white/5 dark:text-gray-200";
1003
- const labelCls = "mb-1 block text-xs font-medium text-gray-500 dark:text-gray-400";
1004
- const touch = () => markDirty();
1005
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
1006
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
1007
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1008
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.displayName", { _: "Display name" }) }),
1009
- /* @__PURE__ */ jsxRuntime.jsx("input", { className: wrap, value: displayName, onChange: (e) => {
1010
- setDisplayName(e.target.value);
1011
- touch();
1012
- } })
883
+ const modelObj = models.find((m) => m.id === selectedModelId);
884
+ const modelName = modelObj?.name ?? selectedModelId ?? "\u2014";
885
+ const family = getModelFamily(selectedModelId);
886
+ const compatibleProviders = findCompatibleProviders(selectedModelId, modelProviders);
887
+ const configuredCompatible = compatibleProviders.filter((p) => p.configured);
888
+ const effectiveProvider = compatibleProviders.find((p) => p.id === selectedProviderId) ?? configuredCompatible[0] ?? compatibleProviders[0];
889
+ const frameworkMeta = chunkM7KSEUZR_js.getFrameworkMeta(selectedFramework);
890
+ const inputCard = "liquid-surface w-full rounded-lg px-3 py-1.5 text-sm text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
891
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-hidden rounded-2xl border border-indigo-500/20 bg-gradient-to-b from-indigo-500/[0.04] via-violet-500/[0.03] to-purple-500/[0.04] dark:border-indigo-400/20 dark:from-indigo-500/[0.10] dark:via-violet-500/[0.06] dark:to-purple-500/[0.08]", children: [
892
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-3 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
893
+ AgentCapabilityCard,
894
+ {
895
+ elo,
896
+ setElo,
897
+ models,
898
+ selectedModelId,
899
+ setSelectedModelId,
900
+ temperature,
901
+ setTemperature,
902
+ onChanged: markDirty,
903
+ t
904
+ }
905
+ ) }),
906
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 text-[9px] font-semibold uppercase tracking-wider text-indigo-500/70 dark:text-indigo-400/70", children: [
907
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" }),
908
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
909
+ "\u2193 ",
910
+ t("agentDrawer.derives", { _: "deriva" })
1013
911
  ] }),
1014
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
1015
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.status", { _: "Status" }) }),
1016
- /* @__PURE__ */ jsxRuntime.jsxs("select", { className: wrap, value: status, onChange: (e) => {
1017
- setStatus(e.target.value);
1018
- touch();
1019
- }, children: [
1020
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "draft", children: "draft" }),
1021
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "active", children: "active" }),
1022
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "archived", children: "archived" })
1023
- ] })
1024
- ] })
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 = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal);
1034
+ const agentData = chunkM7KSEUZR_js.useModalStore((s) => s.agentData);
1035
+ const closeModal = chunkM7KSEUZR_js.useModalStore((s) => s.closeModal);
1125
1036
  const open = activeModal === "agent";
1126
1037
  const agent = agentData?.agent ?? null;
1127
1038
  const models = agentData?.models ?? [];
1128
1039
  const availableAgentTools = agentData?.agentTools ?? [];
1129
1040
  const isCreateMode = agentData?.isCreateMode ?? false;
1130
- const [activeTab, setActiveTab] = react.useState("profile");
1041
+ const [activeTab, setActiveTab] = react.useState("config");
1131
1042
  const [selectedModelId, setSelectedModelId] = react.useState("");
1132
1043
  const [selectedFramework, setSelectedFramework] = react.useState("custom");
1133
1044
  const [temperature, setTemperature] = react.useState(0.7);
@@ -1155,7 +1066,7 @@ function AgentModal({ onSaved, onPersist }) {
1155
1066
  setTemperature(agent.temperature ?? 0.7);
1156
1067
  setElo(Number(agent.elo ?? 1e3));
1157
1068
  setSaved(!isCreateMode);
1158
- setActiveTab("profile");
1069
+ setActiveTab("config");
1159
1070
  const agentToolIds = agent.agentToolIds;
1160
1071
  setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
1161
1072
  setSelectedProviderId(agent.modelProviderId ?? "");
@@ -1228,7 +1139,6 @@ function AgentModal({ onSaved, onPersist }) {
1228
1139
  setPersisting(true);
1229
1140
  if (onPersist) await onPersist(payload);
1230
1141
  markSaved();
1231
- onSaved?.();
1232
1142
  } catch (error) {
1233
1143
  console.error("[AgentModal] onPersist failed", error);
1234
1144
  } finally {
@@ -1256,113 +1166,208 @@ function AgentModal({ onSaved, onPersist }) {
1256
1166
  onSaved,
1257
1167
  onPersist
1258
1168
  ]);
1169
+ react.useEffect(() => {
1170
+ if (!dirty || persisting) return;
1171
+ const handle = setTimeout(() => {
1172
+ void handleMarkSaved();
1173
+ }, 700);
1174
+ return () => clearTimeout(handle);
1175
+ }, [dirty, persisting, handleMarkSaved]);
1259
1176
  if (!agent) return null;
1260
- const sections = [
1261
- { id: "profile", label: t("agentDrawer.profileSection"), icon: outline.UserCircleIcon, group: t("agentDrawer.agentGroup") },
1262
- { id: "framework", label: t("agentDrawer.frameworkSection"), icon: outline.Cog6ToothIcon, group: t("agentDrawer.agentGroup") },
1263
- { id: "prompt", label: t("agentDrawer.promptSection"), icon: outline.SparklesIcon, group: t("agentDrawer.agentGroup") },
1264
- { id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: outline.CommandLineIcon, group: t("agentDrawer.configGroup") },
1265
- { id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: outline.KeyIcon, group: t("agentDrawer.configGroup") },
1266
- { id: "advanced", label: t("agentDrawer.advancedTab", { _: "Advanced" }), icon: outline.Cog6ToothIcon, group: t("agentDrawer.configGroup") },
1267
- { id: "results", label: t("agentDrawer.resultsTab"), icon: outline.PlayCircleIcon, group: t("agentDrawer.executionGroup") }
1268
- ];
1177
+ const sections = [];
1269
1178
  const effectiveAvatarUrl = avatarUrl || agent.avatar;
1270
- const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
1271
- /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "flex-1 text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("agentDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("agentDrawer.saved") }) }),
1179
+ const fieldCard = "liquid-surface w-full rounded-lg px-2.5 py-1.5 text-xs text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
1180
+ const fieldLabel = "text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400";
1181
+ const avatarNode = effectiveAvatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(
1182
+ "img",
1183
+ {
1184
+ src: effectiveAvatarUrl,
1185
+ alt: displayName || agent.name,
1186
+ className: "h-full w-full rounded-full bg-white object-cover ring-2 ring-white shadow-sm dark:bg-gray-800 dark:ring-gray-800",
1187
+ loading: "lazy"
1188
+ }
1189
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 text-sm font-bold text-white ring-2 ring-white shadow-sm dark:ring-gray-800", children: (displayName || agent.name).charAt(0).toUpperCase() });
1190
+ const statusPill = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
1191
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[9px] font-semibold ${status === "active" ? "text-emerald-600 dark:text-emerald-400" : "text-slate-500"}`, children: status === "active" ? t("agentDrawer.statusActive", { _: "Active" }) : t("agentDrawer.statusInactive", { _: "Inactive" }) }),
1272
1192
  /* @__PURE__ */ jsxRuntime.jsx(
1273
- "button",
1193
+ chunkFSBR4RCK_js.ToggleSwitch,
1274
1194
  {
1275
- type: "button",
1276
- onClick: () => {
1277
- void handleMarkSaved();
1195
+ size: "sm",
1196
+ color: "green",
1197
+ checked: status === "active",
1198
+ onChange: (checked) => {
1199
+ setStatus(checked ? "active" : "draft");
1200
+ markDirty();
1278
1201
  },
1279
- disabled: !dirty || persisting,
1280
- className: `rounded-lg px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition-all ${dirty && !persisting ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
1281
- children: persisting ? "\u2026" : t("agentDrawer.save")
1202
+ label: t("agentDrawer.status", { _: "Status" })
1282
1203
  }
1283
1204
  )
1284
1205
  ] });
1285
- return /* @__PURE__ */ jsxRuntime.jsxs(
1286
- chunkI2NZGVBG_js.GlassModal,
1206
+ const identityCard = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface rounded-2xl p-3 ring-1 ring-slate-200/50 dark:ring-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(
1207
+ chunkFSBR4RCK_js.HeroBlock,
1208
+ {
1209
+ icon: avatarNode,
1210
+ iconShape: "round",
1211
+ iconBackground: "none",
1212
+ iconSize: "lg",
1213
+ headingLevel: "h2",
1214
+ title: displayName,
1215
+ onTitleChange: (next) => {
1216
+ setDisplayName(next);
1217
+ markDirty();
1218
+ },
1219
+ titlePlaceholder: agent.name,
1220
+ subtitle: agent.role,
1221
+ rightContent: statusPill,
1222
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1223
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1224
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.description", { _: "Description" }) }),
1225
+ /* @__PURE__ */ jsxRuntime.jsx(
1226
+ "textarea",
1227
+ {
1228
+ rows: 2,
1229
+ value: description,
1230
+ onChange: (event) => {
1231
+ setDescription(event.target.value);
1232
+ markDirty();
1233
+ },
1234
+ placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" }),
1235
+ className: `${fieldCard} resize-none`
1236
+ }
1237
+ )
1238
+ ] }),
1239
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
1240
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: fieldLabel, children: t("agentDrawer.tags", { _: "Tags" }) }),
1241
+ /* @__PURE__ */ jsxRuntime.jsx(
1242
+ "input",
1243
+ {
1244
+ type: "text",
1245
+ value: tagsText,
1246
+ onChange: (event) => {
1247
+ setTagsText(event.target.value);
1248
+ markDirty();
1249
+ },
1250
+ placeholder: t("agentDrawer.tagsPlaceholder", { _: "pricing, research, internal" }),
1251
+ className: fieldCard
1252
+ }
1253
+ )
1254
+ ] })
1255
+ ] })
1256
+ }
1257
+ ) });
1258
+ const autosaveLabel = persisting ? t("agentDrawer.saving", { _: "Saving\u2026" }) : dirty ? t("agentDrawer.pendingAutosave", { _: "Saving in a moment\u2026" }) : t("agentDrawer.autoSaved", { _: "Auto-saved" });
1259
+ const autosaveColor = persisting ? "text-indigo-500 dark:text-indigo-400" : dirty ? "text-amber-500 dark:text-amber-400" : "text-emerald-500 dark:text-emerald-400";
1260
+ const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "status", "aria-live": "polite", className: "flex items-center gap-1.5 px-1 py-2 text-xs", children: [
1261
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `relative inline-flex h-1.5 w-1.5 shrink-0 rounded-full ${persisting ? "bg-indigo-500" : dirty ? "bg-amber-500" : "bg-emerald-500"}`, children: persisting && /* @__PURE__ */ jsxRuntime.jsx(
1262
+ "span",
1263
+ {
1264
+ "aria-hidden": "true",
1265
+ className: "absolute inset-0 motion-safe:animate-ping rounded-full bg-indigo-500/60"
1266
+ }
1267
+ ) }),
1268
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `font-medium ${autosaveColor}`, children: autosaveLabel })
1269
+ ] });
1270
+ return /* @__PURE__ */ jsxRuntime.jsx(
1271
+ chunkFSBR4RCK_js.GlassModal,
1287
1272
  {
1288
1273
  open,
1289
1274
  onClose: handleClose,
1290
1275
  title: agent.name,
1291
- subtitle: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1292
1276
  gradient: "from-indigo-500 to-purple-600",
1293
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-white" }),
1277
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1294
1278
  label: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
1295
1279
  sidebar: {
1296
1280
  sections,
1297
1281
  activeSectionId: activeTab,
1298
1282
  onSectionChange: (sectionId) => setActiveTab(sectionId),
1299
- identity: {
1300
- displayName: displayName || agent.name,
1301
- profileInitial: (displayName || agent.name).charAt(0).toUpperCase(),
1302
- avatarUrl: effectiveAvatarUrl,
1303
- role: agent.role
1304
- },
1283
+ identityCard,
1305
1284
  footer: sidebarFooter
1306
1285
  },
1307
- children: [
1308
- activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
1309
- activeTab === "framework" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), markDirty, connectedProviderTypes: availableModelProviders.map((p) => p.provider) }),
1310
- activeTab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(
1311
- PromptTab,
1286
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
1287
+ /* @__PURE__ */ jsxRuntime.jsx(
1288
+ chunkFSBR4RCK_js.SectionCard,
1312
1289
  {
1313
- agent,
1314
- temperature,
1315
- setTemperature,
1316
- markDirty,
1317
- t,
1318
- promptText: systemPrompt,
1319
- setPromptText: setSystemPrompt,
1320
- outputSchema,
1321
- setOutputSchema
1290
+ variant: "glass",
1291
+ padded: false,
1292
+ collapsible: true,
1293
+ defaultOpen: true,
1294
+ header: {
1295
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.Cog6ToothIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1296
+ title: t("agentDrawer.engineTab"),
1297
+ subtitle: t("agentDrawer.engineSubtitle", { _: "Como o agente roda \u2014 capacidade, modelo, credenciais" })
1298
+ },
1299
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1300
+ EngineTab,
1301
+ {
1302
+ agent,
1303
+ models,
1304
+ t,
1305
+ selectedModelId,
1306
+ setSelectedModelId,
1307
+ selectedFramework,
1308
+ setSelectedFramework: (fw) => setSelectedFramework(fw),
1309
+ temperature,
1310
+ setTemperature,
1311
+ elo,
1312
+ setElo,
1313
+ maxOutputTokens,
1314
+ setMaxOutputTokens,
1315
+ topP,
1316
+ setTopP,
1317
+ topK,
1318
+ setTopK,
1319
+ modelProviders: availableModelProviders,
1320
+ selectedProviderId,
1321
+ onSelectProvider: handleSelectProvider,
1322
+ markDirty
1323
+ }
1324
+ )
1322
1325
  }
1323
1326
  ),
1324
- activeTab === "advanced" && /* @__PURE__ */ jsxRuntime.jsx(
1325
- AdvancedTab,
1327
+ /* @__PURE__ */ jsxRuntime.jsx(
1328
+ chunkFSBR4RCK_js.SectionCard,
1326
1329
  {
1327
- displayName,
1328
- setDisplayName,
1329
- description,
1330
- setDescription,
1331
- maxOutputTokens,
1332
- setMaxOutputTokens,
1333
- topP,
1334
- setTopP,
1335
- topK,
1336
- setTopK,
1337
- tags: tagsText,
1338
- setTags: setTagsText,
1339
- status,
1340
- setStatus,
1341
- avatarUrl,
1342
- setAvatarUrl: setAvatarUrlState,
1343
- markDirty,
1344
- t
1330
+ variant: "glass",
1331
+ padded: false,
1332
+ collapsible: true,
1333
+ defaultOpen: true,
1334
+ header: {
1335
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1336
+ title: t("agentDrawer.brainTab"),
1337
+ subtitle: t("agentDrawer.brainSubtitle", { _: "Como o agente pensa \u2014 prompt + criatividade" })
1338
+ },
1339
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1340
+ PromptTab,
1341
+ {
1342
+ agent,
1343
+ temperature,
1344
+ setTemperature,
1345
+ markDirty,
1346
+ t,
1347
+ promptText: systemPrompt,
1348
+ setPromptText: setSystemPrompt,
1349
+ outputSchema,
1350
+ setOutputSchema
1351
+ }
1352
+ )
1345
1353
  }
1346
1354
  ),
1347
- activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
1348
- activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
1349
- ModelsTab,
1355
+ /* @__PURE__ */ jsxRuntime.jsx(
1356
+ chunkFSBR4RCK_js.SectionCard,
1350
1357
  {
1351
- modelProviders: availableModelProviders,
1352
- selectedProviderId,
1353
- onSelectProvider: handleSelectProvider,
1354
- models,
1355
- selectedModelId,
1356
- onSelectModel: (modelId) => {
1357
- setSelectedModelId(modelId);
1358
- markDirty();
1358
+ variant: "glass",
1359
+ padded: false,
1360
+ collapsible: true,
1361
+ defaultOpen: true,
1362
+ header: {
1363
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
1364
+ title: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`,
1365
+ subtitle: t("agentDrawer.toolsSubtitle", { _: "O que o agente pode invocar durante a execu\xE7\xE3o" })
1359
1366
  },
1360
- agentFramework: selectedFramework,
1361
- t
1367
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t })
1362
1368
  }
1363
- ),
1364
- activeTab === "results" && /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
1365
- ]
1369
+ )
1370
+ ] })
1366
1371
  }
1367
1372
  );
1368
1373
  }
@@ -1471,7 +1476,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1471
1476
  const markDirty = useSubworkflowStore((s) => s.markDirty);
1472
1477
  const markSaved = useSubworkflowStore((s) => s.markSaved);
1473
1478
  const closeModal = useSubworkflowStore((s) => s.closeModal);
1474
- const agentBehind = chunkNJFRJ6YD_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1479
+ const agentBehind = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
1475
1480
  const isCreateMode = !tool?.toolId;
1476
1481
  const initialGraph = react.useMemo(() => {
1477
1482
  const config = tool?.config;
@@ -1500,9 +1505,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1500
1505
  }, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
1501
1506
  if (!tool) return null;
1502
1507
  const categoryKey = category ?? "external";
1503
- const gradient = tool.color ?? 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;
1508
+ const gradient = tool.color ?? chunkM7KSEUZR_js.CATEGORY_COLORS[categoryKey] ?? chunkM7KSEUZR_js.CATEGORY_COLORS.external;
1509
+ const categoryPill = chunkM7KSEUZR_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkM7KSEUZR_js.CATEGORY_PILL_COLORS.external;
1510
+ const IconComponent = chunkM7KSEUZR_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
1506
1511
  const graph = latestGraphRef.current;
1507
1512
  const startNode = graph.nodes.find((n) => n.type === "start");
1508
1513
  const endNode = graph.nodes.find((n) => n.type === "end");
@@ -1535,7 +1540,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1535
1540
  ] })
1536
1541
  ] });
1537
1542
  return /* @__PURE__ */ jsxRuntime.jsx(
1538
- chunkI2NZGVBG_js.GlassModal,
1543
+ chunkFSBR4RCK_js.GlassModal,
1539
1544
  {
1540
1545
  open,
1541
1546
  onClose: closeModal,
@@ -1567,7 +1572,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1567
1572
  {
1568
1573
  type: "button",
1569
1574
  onClick: () => setCategory(cat),
1570
- className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${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"}`,
1575
+ className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkM7KSEUZR_js.CATEGORY_PILL_COLORS[cat] ?? chunkM7KSEUZR_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
1571
1576
  children: cat
1572
1577
  },
1573
1578
  cat
@@ -1654,7 +1659,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1654
1659
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
1655
1660
  ] }),
1656
1661
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1657
- chunkNJFRJ6YD_js.WorkflowCanvas,
1662
+ chunkM7KSEUZR_js.WorkflowCanvas,
1658
1663
  {
1659
1664
  initialGraph,
1660
1665
  agents: [],
@@ -1670,9 +1675,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
1670
1675
  }
1671
1676
  function PipelineSettingsModal({ onSave }) {
1672
1677
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
1673
- const activeModal = chunkNJFRJ6YD_js.useModalStore((s) => s.activeModal);
1674
- const data = chunkNJFRJ6YD_js.useModalStore((s) => s.pipelineSettingsData);
1675
- const closeModal = chunkNJFRJ6YD_js.useModalStore((s) => s.closeModal);
1678
+ const activeModal = chunkM7KSEUZR_js.useModalStore((s) => s.activeModal);
1679
+ const data = chunkM7KSEUZR_js.useModalStore((s) => s.pipelineSettingsData);
1680
+ const closeModal = chunkM7KSEUZR_js.useModalStore((s) => s.closeModal);
1676
1681
  const open = activeModal === "pipeline-settings";
1677
1682
  const [nameValue, setNameValue] = react.useState("");
1678
1683
  const [descriptionValue, setDescriptionValue] = react.useState("");
@@ -1734,7 +1739,7 @@ function PipelineSettingsModal({ onSave }) {
1734
1739
  }
1735
1740
  ),
1736
1741
  /* @__PURE__ */ jsxRuntime.jsxs(
1737
- chunkI2NZGVBG_js.Button,
1742
+ chunkFSBR4RCK_js.Button,
1738
1743
  {
1739
1744
  type: "submit",
1740
1745
  form: "pipeline-settings-form",
@@ -1749,7 +1754,7 @@ function PipelineSettingsModal({ onSave }) {
1749
1754
  )
1750
1755
  ] });
1751
1756
  return /* @__PURE__ */ jsxRuntime.jsx(
1752
- chunkI2NZGVBG_js.GlassModal,
1757
+ chunkFSBR4RCK_js.GlassModal,
1753
1758
  {
1754
1759
  open,
1755
1760
  onClose: closeModal,
@@ -1763,7 +1768,7 @@ function PipelineSettingsModal({ onSave }) {
1763
1768
  onSubmit: handleSubmit,
1764
1769
  children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: "pipeline-settings-form", onSubmit: handleSubmit, className: "space-y-5", children: [
1765
1770
  /* @__PURE__ */ jsxRuntime.jsx(
1766
- chunkI2NZGVBG_js.FormInput,
1771
+ chunkFSBR4RCK_js.FormInput,
1767
1772
  {
1768
1773
  label: t("pipelineName"),
1769
1774
  value: nameValue,
@@ -1773,7 +1778,7 @@ function PipelineSettingsModal({ onSave }) {
1773
1778
  }
1774
1779
  ),
1775
1780
  /* @__PURE__ */ jsxRuntime.jsx(
1776
- chunkI2NZGVBG_js.FormTextarea,
1781
+ chunkFSBR4RCK_js.FormTextarea,
1777
1782
  {
1778
1783
  label: t("pipelineDescription"),
1779
1784
  value: descriptionValue,
@@ -1784,7 +1789,7 @@ function PipelineSettingsModal({ onSave }) {
1784
1789
  ),
1785
1790
  lifecycleAvailable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1786
1791
  /* @__PURE__ */ jsxRuntime.jsx(
1787
- chunkI2NZGVBG_js.FormInput,
1792
+ chunkFSBR4RCK_js.FormInput,
1788
1793
  {
1789
1794
  label: t("pipelineSlug", { _: "Slug" }),
1790
1795
  value: slugValue,
@@ -1911,7 +1916,7 @@ function RunReplayModal({
1911
1916
  }
1912
1917
  ),
1913
1918
  /* @__PURE__ */ jsxRuntime.jsxs(
1914
- chunkI2NZGVBG_js.Button,
1919
+ chunkFSBR4RCK_js.Button,
1915
1920
  {
1916
1921
  type: "submit",
1917
1922
  form: "run-replay-form",
@@ -1926,7 +1931,7 @@ function RunReplayModal({
1926
1931
  ] })
1927
1932
  ] });
1928
1933
  return /* @__PURE__ */ jsxRuntime.jsx(
1929
- chunkI2NZGVBG_js.GlassModal,
1934
+ chunkFSBR4RCK_js.GlassModal,
1930
1935
  {
1931
1936
  open,
1932
1937
  onClose,
@@ -2000,7 +2005,7 @@ function RowEditor({
2000
2005
  ]
2001
2006
  }
2002
2007
  ) : isJson ? /* @__PURE__ */ jsxRuntime.jsx(
2003
- chunkI2NZGVBG_js.FormTextarea,
2008
+ chunkFSBR4RCK_js.FormTextarea,
2004
2009
  {
2005
2010
  value: row.value,
2006
2011
  onValueChange: (v) => onChange({ value: v }),
@@ -2008,7 +2013,7 @@ function RowEditor({
2008
2013
  className: "font-mono"
2009
2014
  }
2010
2015
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2011
- chunkI2NZGVBG_js.FormInput,
2016
+ chunkFSBR4RCK_js.FormInput,
2012
2017
  {
2013
2018
  type: row.kind === "number" ? "number" : "text",
2014
2019
  value: row.value,
@@ -2112,13 +2117,13 @@ function ExecutionTimelinePanel({
2112
2117
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium text-slate-900 dark:text-white", children: entry.nodeId }),
2113
2118
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2114
2119
  ] }),
2115
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.Badge, { color: meta.color, children: [
2120
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.Badge, { color: meta.color, children: [
2116
2121
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "mr-1 h-3 w-3" }),
2117
2122
  labels[entry.status]
2118
2123
  ] })
2119
2124
  ] }),
2120
2125
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
2121
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration2(entry.durationMs) }),
2126
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration(entry.durationMs) }),
2122
2127
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
2123
2128
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatTimestamp(entry.startedAt) })
2124
2129
  ] })
@@ -2142,7 +2147,7 @@ function NodeInspector({
2142
2147
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-slate-900 dark:text-white", children: entry.nodeId }),
2143
2148
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
2144
2149
  ] }),
2145
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: meta.color, children: labels[entry.status] })
2150
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: meta.color, children: labels[entry.status] })
2146
2151
  ] }),
2147
2152
  /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-2 gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
2148
2153
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -2155,7 +2160,7 @@ function NodeInspector({
2155
2160
  ] }),
2156
2161
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2157
2162
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-semibold", children: labels.duration }),
2158
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration2(entry.durationMs) })
2163
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration(entry.durationMs) })
2159
2164
  ] }),
2160
2165
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2161
2166
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-semibold", children: labels.status }),
@@ -2209,7 +2214,7 @@ function hasMetrics(metrics) {
2209
2214
  metrics.model || metrics.tokensIn !== void 0 || metrics.tokensOut !== void 0 || metrics.costUsd !== void 0
2210
2215
  );
2211
2216
  }
2212
- function formatDuration2(ms) {
2217
+ function formatDuration(ms) {
2213
2218
  if (ms === null) return "\u2014";
2214
2219
  if (ms < 1e3) return `${ms}ms`;
2215
2220
  if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
@@ -2312,7 +2317,7 @@ function RuleConditionBuilder({ value, onChange, depth = 0 }) {
2312
2317
  };
2313
2318
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
2314
2319
  /* @__PURE__ */ jsxRuntime.jsx(
2315
- chunkI2NZGVBG_js.FormSelect,
2320
+ chunkFSBR4RCK_js.FormSelect,
2316
2321
  {
2317
2322
  label: "Operator",
2318
2323
  value: value.operator,
@@ -2335,7 +2340,7 @@ function SimpleEditor({
2335
2340
  const isTruthy = value.operator === "truthy";
2336
2341
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2337
2342
  /* @__PURE__ */ jsxRuntime.jsx(
2338
- chunkI2NZGVBG_js.FormInput,
2343
+ chunkFSBR4RCK_js.FormInput,
2339
2344
  {
2340
2345
  label: "Field",
2341
2346
  hint: "Dotted reference into the variable pool \u2014 e.g. `parse-pricing.margin`, `inputs.category`",
@@ -2345,7 +2350,7 @@ function SimpleEditor({
2345
2350
  }
2346
2351
  ),
2347
2352
  !isTruthy && /* @__PURE__ */ jsxRuntime.jsx(
2348
- chunkI2NZGVBG_js.FormInput,
2353
+ chunkFSBR4RCK_js.FormInput,
2349
2354
  {
2350
2355
  label: "Value",
2351
2356
  hint: "Literal. Numeric operators coerce via `as f64`.",
@@ -2361,7 +2366,7 @@ function ThresholdEditor({
2361
2366
  }) {
2362
2367
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
2363
2368
  /* @__PURE__ */ jsxRuntime.jsx(
2364
- chunkI2NZGVBG_js.FormInput,
2369
+ chunkFSBR4RCK_js.FormInput,
2365
2370
  {
2366
2371
  label: "Field",
2367
2372
  value: value.field ?? "",
@@ -2370,7 +2375,7 @@ function ThresholdEditor({
2370
2375
  }
2371
2376
  ),
2372
2377
  /* @__PURE__ */ jsxRuntime.jsx(
2373
- chunkI2NZGVBG_js.FormSelect,
2378
+ chunkFSBR4RCK_js.FormSelect,
2374
2379
  {
2375
2380
  label: "Direction",
2376
2381
  value: value.comparison ?? "gte",
@@ -2384,7 +2389,7 @@ function ThresholdEditor({
2384
2389
  }
2385
2390
  ),
2386
2391
  /* @__PURE__ */ jsxRuntime.jsx(
2387
- chunkI2NZGVBG_js.FormInput,
2392
+ chunkFSBR4RCK_js.FormInput,
2388
2393
  {
2389
2394
  label: "Threshold",
2390
2395
  type: "number",
@@ -2401,7 +2406,7 @@ function RegexEditor({
2401
2406
  }) {
2402
2407
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2403
2408
  /* @__PURE__ */ jsxRuntime.jsx(
2404
- chunkI2NZGVBG_js.FormInput,
2409
+ chunkFSBR4RCK_js.FormInput,
2405
2410
  {
2406
2411
  label: "Field",
2407
2412
  value: value.field ?? "",
@@ -2410,7 +2415,7 @@ function RegexEditor({
2410
2415
  }
2411
2416
  ),
2412
2417
  /* @__PURE__ */ jsxRuntime.jsx(
2413
- chunkI2NZGVBG_js.FormInput,
2418
+ chunkFSBR4RCK_js.FormInput,
2414
2419
  {
2415
2420
  label: "Pattern",
2416
2421
  hint: "Rust regex syntax \u2014 `(?i)` etc. supported.",
@@ -2438,7 +2443,7 @@ function TimeWindowEditor({
2438
2443
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2439
2444
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2440
2445
  /* @__PURE__ */ jsxRuntime.jsx(
2441
- chunkI2NZGVBG_js.FormSelect,
2446
+ chunkFSBR4RCK_js.FormSelect,
2442
2447
  {
2443
2448
  label: "Timezone",
2444
2449
  value: value.timezone ?? "UTC",
@@ -2447,7 +2452,7 @@ function TimeWindowEditor({
2447
2452
  }
2448
2453
  ),
2449
2454
  /* @__PURE__ */ jsxRuntime.jsx(
2450
- chunkI2NZGVBG_js.FormInput,
2455
+ chunkFSBR4RCK_js.FormInput,
2451
2456
  {
2452
2457
  label: "Timestamp field (optional)",
2453
2458
  hint: "Pulls a timestamp from the pool. Leave blank to use the run's wall-clock.",
@@ -2460,7 +2465,7 @@ function TimeWindowEditor({
2460
2465
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2461
2466
  windows.map((win, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2 rounded-lg border border-slate-200 p-2 dark:border-slate-700", children: [
2462
2467
  /* @__PURE__ */ jsxRuntime.jsx(
2463
- chunkI2NZGVBG_js.FormInput,
2468
+ chunkFSBR4RCK_js.FormInput,
2464
2469
  {
2465
2470
  label: `Start (hour)`,
2466
2471
  type: "number",
@@ -2471,7 +2476,7 @@ function TimeWindowEditor({
2471
2476
  }
2472
2477
  ),
2473
2478
  /* @__PURE__ */ jsxRuntime.jsx(
2474
- chunkI2NZGVBG_js.FormInput,
2479
+ chunkFSBR4RCK_js.FormInput,
2475
2480
  {
2476
2481
  label: `End (hour)`,
2477
2482
  type: "number",
@@ -2481,9 +2486,9 @@ function TimeWindowEditor({
2481
2486
  onValueChange: (raw) => update(index, { endHour: clampHour(raw, 24) })
2482
2487
  }
2483
2488
  ),
2484
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2489
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2485
2490
  ] }, index)),
2486
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2491
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
2487
2492
  ] })
2488
2493
  ] });
2489
2494
  }
@@ -2506,7 +2511,7 @@ function BooleanGroupEditor({
2506
2511
  });
2507
2512
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2508
2513
  /* @__PURE__ */ jsxRuntime.jsx(
2509
- chunkI2NZGVBG_js.FormSelect,
2514
+ chunkFSBR4RCK_js.FormSelect,
2510
2515
  {
2511
2516
  label: "Combinator",
2512
2517
  value: value.combinator ?? "and",
@@ -2524,9 +2529,9 @@ function BooleanGroupEditor({
2524
2529
  depth
2525
2530
  }
2526
2531
  ),
2527
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
2532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
2528
2533
  ] }, index)),
2529
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2534
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
2530
2535
  ] })
2531
2536
  ] });
2532
2537
  }
@@ -2562,7 +2567,7 @@ function RuleActionBuilder({ value, onChange }) {
2562
2567
  };
2563
2568
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
2564
2569
  /* @__PURE__ */ jsxRuntime.jsx(
2565
- chunkI2NZGVBG_js.FormSelect,
2570
+ chunkFSBR4RCK_js.FormSelect,
2566
2571
  {
2567
2572
  label: "Action type",
2568
2573
  value: type,
@@ -2572,7 +2577,7 @@ function RuleActionBuilder({ value, onChange }) {
2572
2577
  ),
2573
2578
  type === "adjust_price" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2574
2579
  /* @__PURE__ */ jsxRuntime.jsx(
2575
- chunkI2NZGVBG_js.FormInput,
2580
+ chunkFSBR4RCK_js.FormInput,
2576
2581
  {
2577
2582
  label: "Multiplier",
2578
2583
  type: "number",
@@ -2582,7 +2587,7 @@ function RuleActionBuilder({ value, onChange }) {
2582
2587
  }
2583
2588
  ),
2584
2589
  /* @__PURE__ */ jsxRuntime.jsx(
2585
- chunkI2NZGVBG_js.FormInput,
2590
+ chunkFSBR4RCK_js.FormInput,
2586
2591
  {
2587
2592
  label: "Reason code",
2588
2593
  value: stringParam(params.reason),
@@ -2592,7 +2597,7 @@ function RuleActionBuilder({ value, onChange }) {
2592
2597
  )
2593
2598
  ] }),
2594
2599
  type === "enforce_min_margin" && /* @__PURE__ */ jsxRuntime.jsx(
2595
- chunkI2NZGVBG_js.FormInput,
2600
+ chunkFSBR4RCK_js.FormInput,
2596
2601
  {
2597
2602
  label: "Floor (fraction, e.g. 0.08)",
2598
2603
  type: "number",
@@ -2602,7 +2607,7 @@ function RuleActionBuilder({ value, onChange }) {
2602
2607
  }
2603
2608
  ),
2604
2609
  type === "realign_to_competitor" && /* @__PURE__ */ jsxRuntime.jsx(
2605
- chunkI2NZGVBG_js.FormInput,
2610
+ chunkFSBR4RCK_js.FormInput,
2606
2611
  {
2607
2612
  label: "Tolerance (fraction)",
2608
2613
  type: "number",
@@ -2612,7 +2617,7 @@ function RuleActionBuilder({ value, onChange }) {
2612
2617
  }
2613
2618
  ),
2614
2619
  type === "request_manager_approval" && /* @__PURE__ */ jsxRuntime.jsx(
2615
- chunkI2NZGVBG_js.FormInput,
2620
+ chunkFSBR4RCK_js.FormInput,
2616
2621
  {
2617
2622
  label: "Approval limit (fraction)",
2618
2623
  type: "number",
@@ -2622,7 +2627,7 @@ function RuleActionBuilder({ value, onChange }) {
2622
2627
  }
2623
2628
  ),
2624
2629
  type === "round_to" && /* @__PURE__ */ jsxRuntime.jsx(
2625
- chunkI2NZGVBG_js.FormInput,
2630
+ chunkFSBR4RCK_js.FormInput,
2626
2631
  {
2627
2632
  label: "Step (e.g. 0.009)",
2628
2633
  type: "number",
@@ -2633,7 +2638,7 @@ function RuleActionBuilder({ value, onChange }) {
2633
2638
  ),
2634
2639
  type === "alert" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2635
2640
  /* @__PURE__ */ jsxRuntime.jsx(
2636
- chunkI2NZGVBG_js.FormInput,
2641
+ chunkFSBR4RCK_js.FormInput,
2637
2642
  {
2638
2643
  label: "Channel",
2639
2644
  value: stringParam(params.channel),
@@ -2642,7 +2647,7 @@ function RuleActionBuilder({ value, onChange }) {
2642
2647
  }
2643
2648
  ),
2644
2649
  /* @__PURE__ */ jsxRuntime.jsx(
2645
- chunkI2NZGVBG_js.FormInput,
2650
+ chunkFSBR4RCK_js.FormInput,
2646
2651
  {
2647
2652
  label: "Severity",
2648
2653
  value: stringParam(params.severity),
@@ -2680,7 +2685,7 @@ function CustomParamsEditor({
2680
2685
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2681
2686
  entries.map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2", children: [
2682
2687
  /* @__PURE__ */ jsxRuntime.jsx(
2683
- chunkI2NZGVBG_js.FormInput,
2688
+ chunkFSBR4RCK_js.FormInput,
2684
2689
  {
2685
2690
  label: "Key",
2686
2691
  value: key,
@@ -2688,16 +2693,16 @@ function CustomParamsEditor({
2688
2693
  }
2689
2694
  ),
2690
2695
  /* @__PURE__ */ jsxRuntime.jsx(
2691
- chunkI2NZGVBG_js.FormInput,
2696
+ chunkFSBR4RCK_js.FormInput,
2692
2697
  {
2693
2698
  label: "Value",
2694
2699
  value: String(value ?? ""),
2695
2700
  onValueChange: (raw) => update(index, key, raw)
2696
2701
  }
2697
2702
  ),
2698
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2703
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
2699
2704
  ] }, index)),
2700
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2705
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
2701
2706
  ] });
2702
2707
  }
2703
2708
  function numberParam(value, fallback) {
@@ -2727,9 +2732,9 @@ function RuleForm({ value, onChange }) {
2727
2732
  );
2728
2733
  const update = (key, v) => onChange({ ...value, [key]: v });
2729
2734
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
2730
- /* @__PURE__ */ jsxRuntime.jsxs(chunkI2NZGVBG_js.FormGrid, { children: [
2735
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.FormGrid, { children: [
2731
2736
  /* @__PURE__ */ jsxRuntime.jsx(
2732
- chunkI2NZGVBG_js.FormInput,
2737
+ chunkFSBR4RCK_js.FormInput,
2733
2738
  {
2734
2739
  label: "Name",
2735
2740
  required: true,
@@ -2738,7 +2743,7 @@ function RuleForm({ value, onChange }) {
2738
2743
  }
2739
2744
  ),
2740
2745
  /* @__PURE__ */ jsxRuntime.jsx(
2741
- chunkI2NZGVBG_js.FormInput,
2746
+ chunkFSBR4RCK_js.FormInput,
2742
2747
  {
2743
2748
  label: "Priority",
2744
2749
  type: "number",
@@ -2748,7 +2753,7 @@ function RuleForm({ value, onChange }) {
2748
2753
  }
2749
2754
  ),
2750
2755
  /* @__PURE__ */ jsxRuntime.jsx(
2751
- chunkI2NZGVBG_js.FormSelect,
2756
+ chunkFSBR4RCK_js.FormSelect,
2752
2757
  {
2753
2758
  label: "Enabled",
2754
2759
  value: value.enabled ? "true" : "false",
@@ -2760,7 +2765,7 @@ function RuleForm({ value, onChange }) {
2760
2765
  }
2761
2766
  ),
2762
2767
  /* @__PURE__ */ jsxRuntime.jsx(
2763
- chunkI2NZGVBG_js.FormTextarea,
2768
+ chunkFSBR4RCK_js.FormTextarea,
2764
2769
  {
2765
2770
  label: "Description",
2766
2771
  rows: 2,
@@ -2772,7 +2777,7 @@ function RuleForm({ value, onChange }) {
2772
2777
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2773
2778
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2774
2779
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Condition" }),
2775
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: "indigo", children: value.condition.operator })
2780
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: "indigo", children: value.condition.operator })
2776
2781
  ] }),
2777
2782
  /* @__PURE__ */ jsxRuntime.jsx(
2778
2783
  RuleConditionBuilder,
@@ -2785,7 +2790,7 @@ function RuleForm({ value, onChange }) {
2785
2790
  /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2786
2791
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
2787
2792
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Action on match" }),
2788
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Badge, { color: "fuchsia", children: value.action.type })
2793
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Badge, { color: "fuchsia", children: value.action.type })
2789
2794
  ] }),
2790
2795
  /* @__PURE__ */ jsxRuntime.jsx(
2791
2796
  RuleActionBuilder,
@@ -2807,7 +2812,7 @@ function RuleForm({ value, onChange }) {
2807
2812
  ),
2808
2813
  showAdvanced && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
2809
2814
  /* @__PURE__ */ jsxRuntime.jsx(
2810
- chunkI2NZGVBG_js.FormInput,
2815
+ chunkFSBR4RCK_js.FormInput,
2811
2816
  {
2812
2817
  label: "Valid from (ISO 8601)",
2813
2818
  type: "datetime-local",
@@ -2816,7 +2821,7 @@ function RuleForm({ value, onChange }) {
2816
2821
  }
2817
2822
  ),
2818
2823
  /* @__PURE__ */ jsxRuntime.jsx(
2819
- chunkI2NZGVBG_js.FormInput,
2824
+ chunkFSBR4RCK_js.FormInput,
2820
2825
  {
2821
2826
  label: "Valid until (ISO 8601)",
2822
2827
  type: "datetime-local",
@@ -2825,7 +2830,7 @@ function RuleForm({ value, onChange }) {
2825
2830
  }
2826
2831
  ),
2827
2832
  /* @__PURE__ */ jsxRuntime.jsx(
2828
- chunkI2NZGVBG_js.FormSelect,
2833
+ chunkFSBR4RCK_js.FormSelect,
2829
2834
  {
2830
2835
  label: "Status",
2831
2836
  value: value.status ?? "active",
@@ -2834,7 +2839,7 @@ function RuleForm({ value, onChange }) {
2834
2839
  }
2835
2840
  ),
2836
2841
  /* @__PURE__ */ jsxRuntime.jsx(
2837
- chunkI2NZGVBG_js.FormInput,
2842
+ chunkFSBR4RCK_js.FormInput,
2838
2843
  {
2839
2844
  label: "Tags (comma-separated)",
2840
2845
  value: (value.tags ?? []).join(", "),
@@ -2909,7 +2914,7 @@ function getDatasourceLogo(entityId) {
2909
2914
  }
2910
2915
  return null;
2911
2916
  }
2912
- var PROVIDER_LOGOS2 = {
2917
+ var PROVIDER_LOGOS3 = {
2913
2918
  anthropic: "/logos/providers/anthropic.svg",
2914
2919
  amazon: "/logos/providers/aws.svg",
2915
2920
  google: "/logos/providers/google-gemini.svg",
@@ -3021,8 +3026,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
3021
3026
  ] });
3022
3027
  }
3023
3028
  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";
3029
+ const IconComponent = chunkM7KSEUZR_js.LOGIC_ICON_MAP[item.nodeType];
3030
+ const gradient = chunkM7KSEUZR_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
3026
3031
  const defaultConfig = chunk72SWXOD5_js.createDefaultLogicNodeConfig(item.nodeType);
3027
3032
  const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
3028
3033
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3093,7 +3098,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3093
3098
  [entityTypes, normalizedQuery]
3094
3099
  );
3095
3100
  const filteredLogicItems = react.useMemo(() => {
3096
- const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkNJFRJ6YD_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3101
+ const visibleByDefault = LOGIC_NODE_ITEMS.filter((item) => !chunkM7KSEUZR_js.EXPERIMENTAL_NODE_TYPES.has(item.nodeType));
3097
3102
  if (!normalizedQuery) return visibleByDefault;
3098
3103
  return visibleByDefault.filter(
3099
3104
  (item) => t(item.nameKey).toLowerCase().includes(normalizedQuery) || t(item.descriptionKey).toLowerCase().includes(normalizedQuery)
@@ -3142,31 +3147,70 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3142
3147
  onAdd: onCreateAgent,
3143
3148
  addLabel: t("newAgent"),
3144
3149
  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
- })()
3150
+ children: filteredAgents.length === 0 && filteredAgentTools.length === 0 && filteredProviders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3151
+ filteredAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
3152
+ "div",
3153
+ {
3154
+ draggable: true,
3155
+ onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
3156
+ className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3157
+ children: [
3158
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
3159
+ agent.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: agent.avatar, alt: agent.name, className: "h-7 w-7 rounded-full bg-white shadow-sm ring-1 ring-gray-200/50 dark:bg-gray-800 dark:ring-white/10" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3160
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-indigo-500 ring-1.5 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-2 w-2 text-white" }) })
3163
3161
  ] }),
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
- )) })
3162
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3163
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
3164
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
3165
+ (() => {
3166
+ const tier = chunk72SWXOD5_js.getAgentTier(Number(agent.elo ?? 0));
3167
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
3168
+ })()
3169
+ ] }),
3170
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
3171
+ ] })
3172
+ ]
3173
+ },
3174
+ agent.agentId
3175
+ )),
3176
+ filteredProviders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 border-t border-gray-200/40 pt-2 dark:border-white/5", children: [
3177
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1.5 px-1 text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400", children: t("connectionsSection") }),
3178
+ filteredProviders.map((provider) => {
3179
+ const providerLogo = PROVIDER_LOGOS3[provider.provider];
3180
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3181
+ "div",
3182
+ {
3183
+ draggable: true,
3184
+ onDragStart: (event) => {
3185
+ const defaultConfig = JSON.stringify({
3186
+ type: "model_provider",
3187
+ providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
3188
+ name: provider.name,
3189
+ modelFilter: []
3190
+ });
3191
+ onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
3192
+ },
3193
+ onClick: () => onConfigureProvider?.(provider.id),
3194
+ className: "liquid-surface group mb-1 flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
3195
+ role: "button",
3196
+ tabIndex: 0,
3197
+ children: [
3198
+ providerLogo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/10 p-1", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: providerLogo, alt: "", className: "h-4 w-4 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
3199
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3200
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
3201
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
3202
+ provider.modelCount,
3203
+ " models"
3204
+ ] })
3205
+ ] }),
3206
+ provider.configured ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
3207
+ ]
3208
+ },
3209
+ provider.id
3210
+ );
3211
+ })
3212
+ ] })
3213
+ ] })
3170
3214
  }
3171
3215
  ),
3172
3216
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3190,7 +3234,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3190
3234
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.category })
3191
3235
  ] }),
3192
3236
  /* @__PURE__ */ jsxRuntime.jsx(
3193
- chunkI2NZGVBG_js.ToggleSwitch,
3237
+ chunkFSBR4RCK_js.ToggleSwitch,
3194
3238
  {
3195
3239
  checked: Boolean(tool.enabled),
3196
3240
  onChange: () => {
@@ -3231,7 +3275,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3231
3275
  ] })
3232
3276
  ] }),
3233
3277
  /* @__PURE__ */ jsxRuntime.jsx(
3234
- chunkI2NZGVBG_js.ToggleSwitch,
3278
+ chunkFSBR4RCK_js.ToggleSwitch,
3235
3279
  {
3236
3280
  checked: Boolean(rule.enabled),
3237
3281
  onChange: () => {
@@ -3267,8 +3311,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3267
3311
  limit: entity.defaultLimit
3268
3312
  });
3269
3313
  const dsLogo = getDatasourceLogo(entity.id);
3270
- const EntityIcon = chunkNJFRJ6YD_js.getEntityIcon(entity.id);
3271
- const entityGradient = chunkNJFRJ6YD_js.getEntityGradient(entity.id);
3314
+ const EntityIcon = chunkM7KSEUZR_js.getEntityIcon(entity.id);
3315
+ const entityGradient = chunkM7KSEUZR_js.getEntityGradient(entity.id);
3272
3316
  return /* @__PURE__ */ jsxRuntime.jsxs(
3273
3317
  "div",
3274
3318
  {
@@ -3288,7 +3332,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3288
3332
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3289
3333
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-slate-100 px-1.5 py-0.5 text-[9px] font-medium text-slate-600 dark:bg-white/10 dark:text-slate-300", children: "Read only" }),
3290
3334
  /* @__PURE__ */ jsxRuntime.jsx(
3291
- chunkI2NZGVBG_js.ToggleSwitch,
3335
+ chunkFSBR4RCK_js.ToggleSwitch,
3292
3336
  {
3293
3337
  checked: true,
3294
3338
  onChange: () => {
@@ -3307,49 +3351,6 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
3307
3351
  })
3308
3352
  }
3309
3353
  ),
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
3354
  /* @__PURE__ */ jsxRuntime.jsxs(
3354
3355
  CollapsibleSection,
3355
3356
  {
@@ -3544,7 +3545,7 @@ function VersionHistoryPanel({
3544
3545
  )
3545
3546
  ] }),
3546
3547
  /* @__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" }) }),
3548
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "version-history-loading", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-6 animate-spin motion-reduce:animate-none rounded-full border-2 border-blue-500 border-t-transparent" }) }),
3548
3549
  loadError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-8 text-center", "data-testid": "version-history-error", children: [
3549
3550
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-500 dark:text-red-400", children: loadError }),
3550
3551
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3657,7 +3658,7 @@ var STATUS_CONFIG = {
3657
3658
  label: "error"
3658
3659
  }
3659
3660
  };
3660
- function formatDuration3(durationMs) {
3661
+ function formatDuration2(durationMs) {
3661
3662
  if (durationMs < 1e3) {
3662
3663
  return `${durationMs}ms`;
3663
3664
  }
@@ -3666,9 +3667,9 @@ function formatDuration3(durationMs) {
3666
3667
  }
3667
3668
  function RunPanel({ open, onClose, onRun, onStop }) {
3668
3669
  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);
3670
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
3671
+ const isRunning = chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
3672
+ const nodeResults = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
3672
3673
  const startNode = nodes.find((node) => node.type === "start");
3673
3674
  const hasEndNode = nodes.some((node) => node.type === "end");
3674
3675
  const hasValidStartConfig = Boolean(
@@ -3687,10 +3688,24 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3687
3688
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3688
3689
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-4 w-4 text-gray-500 dark:text-gray-400" }),
3689
3690
  /* @__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
- ] })
3691
+ isRunning && /* @__PURE__ */ jsxRuntime.jsxs(
3692
+ "span",
3693
+ {
3694
+ role: "status",
3695
+ "aria-live": "polite",
3696
+ className: "flex items-center gap-1 rounded-full bg-blue-100 px-2 py-0.5 text-[11px] font-medium text-blue-800 dark:bg-blue-500/20 dark:text-blue-200",
3697
+ children: [
3698
+ /* @__PURE__ */ jsxRuntime.jsx(
3699
+ "span",
3700
+ {
3701
+ "aria-hidden": "true",
3702
+ className: "h-1.5 w-1.5 motion-safe:animate-pulse rounded-full bg-blue-500"
3703
+ }
3704
+ ),
3705
+ translations("executing")
3706
+ ]
3707
+ }
3708
+ )
3694
3709
  ] }),
3695
3710
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3696
3711
  isRunning ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3751,7 +3766,7 @@ function RunPanel({ open, onClose, onRun, onStop }) {
3751
3766
  ] }),
3752
3767
  result?.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-red-500 dark:text-red-400", children: result.error })
3753
3768
  ] }),
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) })
3769
+ result?.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatDuration2(result.durationMs) })
3755
3770
  ]
3756
3771
  },
3757
3772
  node.id
@@ -3765,7 +3780,7 @@ function SpinnerIcon({ className }) {
3765
3780
  return /* @__PURE__ */ jsxRuntime.jsxs(
3766
3781
  "svg",
3767
3782
  {
3768
- className: `animate-spin ${className ?? ""}`,
3783
+ className: `animate-spin motion-reduce:animate-none ${className ?? ""}`,
3769
3784
  viewBox: "0 0 24 24",
3770
3785
  fill: "none",
3771
3786
  stroke: "currentColor",
@@ -3985,8 +4000,8 @@ function inferVariables(config, nodeType) {
3985
4000
  }
3986
4001
  function VariableInspector({ open, onClose }) {
3987
4002
  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);
4003
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
4004
+ const edges = chunkM7KSEUZR_js.useWorkflowStore((state) => state.edges);
3990
4005
  const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
3991
4006
  const toggleNodeExpansion = react.useCallback((nodeId) => {
3992
4007
  setExpandedNodes((current) => {
@@ -4048,8 +4063,8 @@ function VariableInspector({ open, onClose }) {
4048
4063
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
4049
4064
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
4050
4065
  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";
4066
+ const IconComponent = chunkM7KSEUZR_js.LOGIC_ICON_MAP[entry.nodeType];
4067
+ const gradient = chunkM7KSEUZR_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
4053
4068
  const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
4054
4069
  const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
4055
4070
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
@@ -4115,7 +4130,7 @@ function RunInputDialog({
4115
4130
  onRun
4116
4131
  }) {
4117
4132
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
4118
- const nodes = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodes);
4133
+ const nodes = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes);
4119
4134
  const [values, setValues] = react.useState({});
4120
4135
  const inputVariableNames = react.useMemo(() => {
4121
4136
  const storeStartNode = nodes.find((node) => node.type === "start");
@@ -4142,7 +4157,7 @@ function RunInputDialog({
4142
4157
  }, [onClose]);
4143
4158
  if (!open) return null;
4144
4159
  return /* @__PURE__ */ jsxRuntime.jsxs(
4145
- chunkI2NZGVBG_js.GlassModal,
4160
+ chunkFSBR4RCK_js.GlassModal,
4146
4161
  {
4147
4162
  open,
4148
4163
  onClose: handleClose,
@@ -4153,7 +4168,7 @@ function RunInputDialog({
4153
4168
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: inputVariableNames.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: t("noInputs") }) : inputVariableNames.map((variableName) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4154
4169
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: variableName }),
4155
4170
  /* @__PURE__ */ jsxRuntime.jsx(
4156
- chunkI2NZGVBG_js.Input,
4171
+ chunkFSBR4RCK_js.Input,
4157
4172
  {
4158
4173
  value: values[variableName] ?? "",
4159
4174
  onChange: (event) => handleValueChange(variableName, event.target.value),
@@ -4162,8 +4177,8 @@ function RunInputDialog({
4162
4177
  )
4163
4178
  ] }, variableName)) }),
4164
4179
  /* @__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: [
4180
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
4181
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkFSBR4RCK_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
4167
4182
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-3.5 w-3.5", "data-slot": "icon" }),
4168
4183
  t("run")
4169
4184
  ] })
@@ -4175,13 +4190,13 @@ function RunInputDialog({
4175
4190
  var STATUS_STYLES = {
4176
4191
  completed: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4177
4192
  failed: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4178
- running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin" },
4193
+ running: { icon: outline.ArrowPathIcon, colorClass: "text-blue-500 animate-spin motion-reduce:animate-none" },
4179
4194
  pending: { icon: outline.ClockIcon, colorClass: "text-gray-400" },
4180
4195
  success: { icon: outline.CheckCircleIcon, colorClass: "text-green-500" },
4181
4196
  error: { icon: outline.ExclamationCircleIcon, colorClass: "text-red-500" },
4182
4197
  skipped: { icon: outline.ClockIcon, colorClass: "text-gray-400" }
4183
4198
  };
4184
- function formatDuration4(durationMs) {
4199
+ function formatDuration3(durationMs) {
4185
4200
  if (durationMs === null) return "\u2014";
4186
4201
  if (durationMs < 1e3) return `${durationMs}ms`;
4187
4202
  return `${(durationMs / 1e3).toFixed(1)}s`;
@@ -4196,8 +4211,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4196
4211
  const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
4197
4212
  const [selectedRun, setSelectedRun] = react.useState(null);
4198
4213
  const [selectedNode, setSelectedNode] = react.useState(null);
4199
- const isRunning = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.isRunning);
4200
- const nodeResults = chunkNJFRJ6YD_js.useWorkflowStore((state) => state.nodeResults);
4214
+ const isRunning = chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
4215
+ const nodeResults = chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
4201
4216
  const refreshRuns = react.useCallback(async () => {
4202
4217
  setIsLoadingRuns(true);
4203
4218
  try {
@@ -4232,7 +4247,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4232
4247
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
4233
4248
  isRunning && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-gray-200/50 px-4 py-3 dark:border-gray-700/50", children: [
4234
4249
  /* @__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" }),
4250
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "h-4 w-4 animate-spin motion-reduce:animate-none text-blue-500" }),
4236
4251
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-blue-600 dark:text-blue-400", children: t("activeRun") })
4237
4252
  ] }),
4238
4253
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 space-y-1 overflow-y-auto", children: Object.entries(nodeResults).map(([nodeId, result]) => {
@@ -4243,7 +4258,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4243
4258
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4244
4259
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-gray-700 dark:text-gray-300", children: nodeId.slice(0, 8) })
4245
4260
  ] }),
4246
- result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration4(result.durationMs) })
4261
+ result.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: formatDuration3(result.durationMs) })
4247
4262
  ] }, nodeId);
4248
4263
  }) })
4249
4264
  ] }),
@@ -4259,7 +4274,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4259
4274
  ] }),
4260
4275
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
4261
4276
  /* @__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) })
4277
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration3(selectedNode.durationMs) })
4263
4278
  ] }),
4264
4279
  selectedNode.error && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4265
4280
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500", children: t("error") }),
@@ -4298,7 +4313,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4298
4313
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
4299
4314
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: formatTimestamp2(run.createdAt) })
4300
4315
  ] }),
4301
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(run.totalDurationMs) })
4316
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(run.totalDurationMs) })
4302
4317
  ] }),
4303
4318
  run.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 truncate text-[10px] text-red-500", children: run.error })
4304
4319
  ]
@@ -4322,7 +4337,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4322
4337
  /* @__PURE__ */ jsxRuntime.jsx(NodeStatusIcon, { className: `h-3 w-3 ${nodeStatusStyle.colorClass}` }),
4323
4338
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: nodeResult.nodeType })
4324
4339
  ] }),
4325
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(nodeResult.durationMs) })
4340
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(nodeResult.durationMs) })
4326
4341
  ]
4327
4342
  },
4328
4343
  nodeResult.nodeId
@@ -4334,12 +4349,34 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
4334
4349
  ] })
4335
4350
  ] });
4336
4351
  }
4337
- function SaveStatusBadge({ status }) {
4352
+ function SaveStatusBadge({ status, labels }) {
4353
+ const savingLabel = labels?.saving ?? "Salvando\u2026";
4354
+ const savedLabel = labels?.saved ?? "Salvo";
4338
4355
  if (status === "saving") {
4339
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-pulse text-[10px] text-gray-400 dark:text-gray-500", children: "\u2022" });
4356
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4357
+ /* @__PURE__ */ jsxRuntime.jsx(
4358
+ "span",
4359
+ {
4360
+ "aria-hidden": "true",
4361
+ className: "motion-safe:animate-pulse text-[11px] text-gray-500 dark:text-gray-400",
4362
+ children: "\u2022"
4363
+ }
4364
+ ),
4365
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savingLabel })
4366
+ ] });
4340
4367
  }
4341
4368
  if (status === "saved") {
4342
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-green-500/60 dark:text-green-400/50", children: "\u2713" });
4369
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
4370
+ /* @__PURE__ */ jsxRuntime.jsx(
4371
+ "span",
4372
+ {
4373
+ "aria-hidden": "true",
4374
+ className: "text-[11px] text-emerald-600 dark:text-emerald-400",
4375
+ children: "\u2713"
4376
+ }
4377
+ ),
4378
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: savedLabel })
4379
+ ] });
4343
4380
  }
4344
4381
  return null;
4345
4382
  }
@@ -4353,7 +4390,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4353
4390
  onAutoSaveGraph(graph);
4354
4391
  }, [onAutoSaveGraph, onGraphSnapshot]);
4355
4392
  return /* @__PURE__ */ jsxRuntime.jsx(
4356
- chunkNJFRJ6YD_js.Workspace,
4393
+ chunkM7KSEUZR_js.Workspace,
4357
4394
  {
4358
4395
  ...workspaceProps,
4359
4396
  onGraphChange: handleGraphChange
@@ -4361,7 +4398,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
4361
4398
  );
4362
4399
  });
4363
4400
  function DynamicIslandConfirm2(props) {
4364
- return /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.DynamicIslandConfirm, { ...props });
4401
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.DynamicIslandConfirm, { ...props });
4365
4402
  }
4366
4403
  var JSON_PREVIEW_LINE_LIMIT = 50;
4367
4404
  function DslExportModal({ open, onClose, workflow, graph }) {
@@ -4415,7 +4452,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4415
4452
  }, [jsonString, workflow.name, workflow.version]);
4416
4453
  if (!open) return null;
4417
4454
  return /* @__PURE__ */ jsxRuntime.jsx(
4418
- chunkI2NZGVBG_js.GlassModal,
4455
+ chunkFSBR4RCK_js.GlassModal,
4419
4456
  {
4420
4457
  open,
4421
4458
  onClose,
@@ -4457,7 +4494,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4457
4494
  ] }),
4458
4495
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
4459
4496
  /* @__PURE__ */ jsxRuntime.jsx(
4460
- chunkI2NZGVBG_js.Button,
4497
+ chunkFSBR4RCK_js.Button,
4461
4498
  {
4462
4499
  type: "button",
4463
4500
  onClick: handleCopyToClipboard,
@@ -4474,7 +4511,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
4474
4511
  }
4475
4512
  ),
4476
4513
  /* @__PURE__ */ jsxRuntime.jsxs(
4477
- chunkI2NZGVBG_js.Button,
4514
+ chunkFSBR4RCK_js.Button,
4478
4515
  {
4479
4516
  type: "button",
4480
4517
  onClick: handleDownloadJson,
@@ -4633,7 +4670,7 @@ function DslImportModal({ open, onClose, onImport }) {
4633
4670
  }, []);
4634
4671
  if (!open) return null;
4635
4672
  return /* @__PURE__ */ jsxRuntime.jsx(
4636
- chunkI2NZGVBG_js.GlassModal,
4673
+ chunkFSBR4RCK_js.GlassModal,
4637
4674
  {
4638
4675
  open,
4639
4676
  onClose,
@@ -4673,7 +4710,7 @@ function DslImportModal({ open, onClose, onImport }) {
4673
4710
  ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "import-validation-result", children: [
4674
4711
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
4675
4712
  /* @__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") })
4713
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
4677
4714
  ] }),
4678
4715
  validationResult.isValid ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20", children: [
4679
4716
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4701,9 +4738,9 @@ function DslImportModal({ open, onClose, onImport }) {
4701
4738
  ] })
4702
4739
  ] }) }),
4703
4740
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
4704
- /* @__PURE__ */ jsxRuntime.jsx(chunkI2NZGVBG_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4741
+ /* @__PURE__ */ jsxRuntime.jsx(chunkFSBR4RCK_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
4705
4742
  /* @__PURE__ */ jsxRuntime.jsxs(
4706
- chunkI2NZGVBG_js.Button,
4743
+ chunkFSBR4RCK_js.Button,
4707
4744
  {
4708
4745
  type: "button",
4709
4746
  onClick: handleImport,
@@ -4724,14 +4761,14 @@ function DslImportModal({ open, onClose, onImport }) {
4724
4761
  }
4725
4762
 
4726
4763
  // 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);
4764
+ var useCanUndo = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.past.length > 0);
4765
+ var useCanRedo = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.future.length > 0);
4766
+ var useHasCopied = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.clipboard !== null);
4767
+ var useContextMenu = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.contextMenu);
4768
+ var useEditingNodeId = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.editingNodeId);
4769
+ var useSelectedNodeCount = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
4770
+ var useIsRunning = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.isRunning);
4771
+ var useNodeResults = () => chunkM7KSEUZR_js.useWorkflowStore((state) => state.nodeResults);
4735
4772
  var DEFAULT_MAX_HISTORY = 50;
4736
4773
  function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
4737
4774
  const pastRef = react.useRef([]);
@@ -5018,6 +5055,7 @@ exports.DslImportModal = DslImportModal;
5018
5055
  exports.DynamicIslandConfirm = DynamicIslandConfirm2;
5019
5056
  exports.ExecutionTimelinePanel = ExecutionTimelinePanel;
5020
5057
  exports.MetaLlamaIcon = MetaLlamaIcon;
5058
+ exports.ModelProviderFlowNode = ModelProviderFlowNode;
5021
5059
  exports.NodePalette = NodePalette;
5022
5060
  exports.OutputSchemaBuilder = OutputSchemaBuilder;
5023
5061
  exports.PipelineSettingsModal = PipelineSettingsModal;
@@ -5054,5 +5092,5 @@ exports.useNodeResults = useNodeResults;
5054
5092
  exports.useSelectedNodeCount = useSelectedNodeCount;
5055
5093
  exports.useSubworkflowStore = useSubworkflowStore;
5056
5094
  exports.useUndoRedo = useUndoRedo;
5057
- //# sourceMappingURL=chunk-IJAKZHXX.js.map
5058
- //# sourceMappingURL=chunk-IJAKZHXX.js.map
5095
+ //# sourceMappingURL=chunk-ERCDMBRT.js.map
5096
+ //# sourceMappingURL=chunk-ERCDMBRT.js.map