@datatechsolutions/ui 3.6.1 → 3.7.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 (135) hide show
  1. package/dist/astrlabe/graph-node.js +8 -5
  2. package/dist/astrlabe/graph-node.mjs +4 -1
  3. package/dist/astrlabe/index.js +115 -114
  4. package/dist/astrlabe/index.mjs +7 -6
  5. package/dist/astrlabe/workflow-canvas.js +7 -6
  6. package/dist/astrlabe/workflow-canvas.mjs +6 -5
  7. package/dist/{chunk-3Z66NXEB.mjs → chunk-2OPBUVTQ.mjs} +3 -3
  8. package/dist/{chunk-3Z66NXEB.mjs.map → chunk-2OPBUVTQ.mjs.map} +1 -1
  9. package/dist/{chunk-4JDJRGAB.mjs → chunk-34XRH2FX.mjs} +5 -4
  10. package/dist/chunk-34XRH2FX.mjs.map +1 -0
  11. package/dist/{chunk-KEWRLEYV.js → chunk-3JZGRXSG.js} +4 -4
  12. package/dist/{chunk-KEWRLEYV.js.map → chunk-3JZGRXSG.js.map} +1 -1
  13. package/dist/{chunk-JQYDJ75Q.mjs → chunk-3VYD7QL2.mjs} +3 -3
  14. package/dist/{chunk-JQYDJ75Q.mjs.map → chunk-3VYD7QL2.mjs.map} +1 -1
  15. package/dist/{chunk-MRRFDIUQ.mjs → chunk-4JRMXHPU.mjs} +5 -4
  16. package/dist/chunk-4JRMXHPU.mjs.map +1 -0
  17. package/dist/{chunk-4OFG6POC.mjs → chunk-5LCWQKGQ.mjs} +207 -1128
  18. package/dist/chunk-5LCWQKGQ.mjs.map +1 -0
  19. package/dist/{chunk-W5YCZOXO.js → chunk-7YK4WXHO.js} +79 -78
  20. package/dist/chunk-7YK4WXHO.js.map +1 -0
  21. package/dist/{chunk-YOJIPZ72.js → chunk-BBLBSDPN.js} +9 -9
  22. package/dist/{chunk-YOJIPZ72.js.map → chunk-BBLBSDPN.js.map} +1 -1
  23. package/dist/chunk-BHOT22QL.js +998 -0
  24. package/dist/chunk-BHOT22QL.js.map +1 -0
  25. package/dist/{chunk-MQNXKBFP.mjs → chunk-C4AJWDFB.mjs} +7 -6
  26. package/dist/chunk-C4AJWDFB.mjs.map +1 -0
  27. package/dist/{chunk-UOABOFKO.mjs → chunk-CBFK4W4C.mjs} +3 -3
  28. package/dist/{chunk-UOABOFKO.mjs.map → chunk-CBFK4W4C.mjs.map} +1 -1
  29. package/dist/{chunk-P5F257N3.js → chunk-CVZXZK2X.js} +35 -34
  30. package/dist/chunk-CVZXZK2X.js.map +1 -0
  31. package/dist/{chunk-IHHGT3LP.mjs → chunk-CYAAL3BY.mjs} +6 -5
  32. package/dist/chunk-CYAAL3BY.mjs.map +1 -0
  33. package/dist/{chunk-LVK7VXW7.js → chunk-DMPBNWJB.js} +37 -36
  34. package/dist/chunk-DMPBNWJB.js.map +1 -0
  35. package/dist/{chunk-ESLKQJQS.mjs → chunk-DXLATMGD.mjs} +6 -5
  36. package/dist/chunk-DXLATMGD.mjs.map +1 -0
  37. package/dist/{chunk-P4YYEM4B.js → chunk-EZQ2D47U.js} +7 -10
  38. package/dist/chunk-EZQ2D47U.js.map +1 -0
  39. package/dist/{chunk-6ZMTJSQF.js → chunk-FUHNEP3Y.js} +164 -163
  40. package/dist/chunk-FUHNEP3Y.js.map +1 -0
  41. package/dist/{chunk-YTE6WCBX.js → chunk-JHN2OUWG.js} +64 -63
  42. package/dist/chunk-JHN2OUWG.js.map +1 -0
  43. package/dist/{chunk-AMYQSPQC.js → chunk-JLECJI7S.js} +18 -17
  44. package/dist/chunk-JLECJI7S.js.map +1 -0
  45. package/dist/{chunk-DRORQGN2.js → chunk-KMNWPC64.js} +40 -39
  46. package/dist/chunk-KMNWPC64.js.map +1 -0
  47. package/dist/{chunk-VUAGVZJM.mjs → chunk-NJ6HH4QP.mjs} +6 -5
  48. package/dist/chunk-NJ6HH4QP.mjs.map +1 -0
  49. package/dist/{chunk-OZNTQROP.mjs → chunk-PLTLRL2V.mjs} +7 -10
  50. package/dist/chunk-PLTLRL2V.mjs.map +1 -0
  51. package/dist/{chunk-5ZAZ2C7A.mjs → chunk-PMMP76MV.mjs} +7 -6
  52. package/dist/chunk-PMMP76MV.mjs.map +1 -0
  53. package/dist/{chunk-NJZIE4EH.js → chunk-QF6WL7XU.js} +6 -5
  54. package/dist/chunk-QF6WL7XU.js.map +1 -0
  55. package/dist/{chunk-QRNFTG6A.js → chunk-QGLGQXJE.js} +4 -4
  56. package/dist/{chunk-QRNFTG6A.js.map → chunk-QGLGQXJE.js.map} +1 -1
  57. package/dist/{chunk-GCYYGSHU.js → chunk-R4EKPXX3.js} +564 -1525
  58. package/dist/chunk-R4EKPXX3.js.map +1 -0
  59. package/dist/{chunk-SQZGQOKU.js → chunk-RWYG7QHP.js} +119 -132
  60. package/dist/chunk-RWYG7QHP.js.map +1 -0
  61. package/dist/{chunk-WBEZATIB.js → chunk-RZ3NDH5S.js} +13 -13
  62. package/dist/{chunk-WBEZATIB.js.map → chunk-RZ3NDH5S.js.map} +1 -1
  63. package/dist/{chunk-HGWVJ3VB.mjs → chunk-SJVKID3E.mjs} +4 -3
  64. package/dist/chunk-SJVKID3E.mjs.map +1 -0
  65. package/dist/{chunk-7LILNZMR.mjs → chunk-TJEZL72T.mjs} +4 -3
  66. package/dist/chunk-TJEZL72T.mjs.map +1 -0
  67. package/dist/{chunk-MUOTTGCX.js → chunk-UDYEUTJC.js} +31 -30
  68. package/dist/chunk-UDYEUTJC.js.map +1 -0
  69. package/dist/{chunk-UGJZ3M4Q.js → chunk-VDLMWOQM.js} +55 -54
  70. package/dist/chunk-VDLMWOQM.js.map +1 -0
  71. package/dist/{chunk-KDFBN2L2.mjs → chunk-VZIUQE7B.mjs} +24 -37
  72. package/dist/chunk-VZIUQE7B.mjs.map +1 -0
  73. package/dist/chunk-WR55H7DH.mjs +934 -0
  74. package/dist/chunk-WR55H7DH.mjs.map +1 -0
  75. package/dist/{chunk-ZYVDDSAC.mjs → chunk-YRXDETBK.mjs} +6 -6
  76. package/dist/{chunk-ZYVDDSAC.mjs.map → chunk-YRXDETBK.mjs.map} +1 -1
  77. package/dist/{chunk-VDLAZR7S.mjs → chunk-ZYRL3WER.mjs} +5 -4
  78. package/dist/chunk-ZYRL3WER.mjs.map +1 -0
  79. package/dist/index.js +826 -825
  80. package/dist/index.mjs +4 -3
  81. package/dist/platform/admin/index.js +13 -12
  82. package/dist/platform/admin/index.mjs +7 -6
  83. package/dist/platform/agents-workspace.js +10 -9
  84. package/dist/platform/agents-workspace.mjs +9 -8
  85. package/dist/platform/app-shell.js +6 -5
  86. package/dist/platform/app-shell.mjs +5 -4
  87. package/dist/platform/auth/index.js +30 -29
  88. package/dist/platform/auth/index.mjs +7 -6
  89. package/dist/platform/billing/index.js +6 -5
  90. package/dist/platform/billing/index.mjs +5 -4
  91. package/dist/platform/impersonation/index.js +6 -5
  92. package/dist/platform/impersonation/index.mjs +5 -4
  93. package/dist/platform/index.d.mts +1 -1
  94. package/dist/platform/index.d.ts +1 -1
  95. package/dist/platform/index.js +87 -93
  96. package/dist/platform/index.js.map +1 -1
  97. package/dist/platform/index.mjs +23 -29
  98. package/dist/platform/index.mjs.map +1 -1
  99. package/dist/platform/pages/index.d.mts +86 -1
  100. package/dist/platform/pages/index.d.ts +86 -1
  101. package/dist/platform/pages/index.js +868 -209
  102. package/dist/platform/pages/index.js.map +1 -1
  103. package/dist/platform/pages/index.mjs +670 -12
  104. package/dist/platform/pages/index.mjs.map +1 -1
  105. package/dist/platform/settings/index.js +10 -9
  106. package/dist/platform/settings/index.mjs +9 -8
  107. package/dist/platform/workflow-canvas-shell.js +8 -7
  108. package/dist/platform/workflow-canvas-shell.mjs +7 -6
  109. package/package.json +1 -1
  110. package/dist/chunk-4JDJRGAB.mjs.map +0 -1
  111. package/dist/chunk-4OFG6POC.mjs.map +0 -1
  112. package/dist/chunk-5ZAZ2C7A.mjs.map +0 -1
  113. package/dist/chunk-6ZMTJSQF.js.map +0 -1
  114. package/dist/chunk-7LILNZMR.mjs.map +0 -1
  115. package/dist/chunk-AMYQSPQC.js.map +0 -1
  116. package/dist/chunk-DRORQGN2.js.map +0 -1
  117. package/dist/chunk-ESLKQJQS.mjs.map +0 -1
  118. package/dist/chunk-GCYYGSHU.js.map +0 -1
  119. package/dist/chunk-HGWVJ3VB.mjs.map +0 -1
  120. package/dist/chunk-IHHGT3LP.mjs.map +0 -1
  121. package/dist/chunk-KDFBN2L2.mjs.map +0 -1
  122. package/dist/chunk-LVK7VXW7.js.map +0 -1
  123. package/dist/chunk-MQNXKBFP.mjs.map +0 -1
  124. package/dist/chunk-MRRFDIUQ.mjs.map +0 -1
  125. package/dist/chunk-MUOTTGCX.js.map +0 -1
  126. package/dist/chunk-NJZIE4EH.js.map +0 -1
  127. package/dist/chunk-OZNTQROP.mjs.map +0 -1
  128. package/dist/chunk-P4YYEM4B.js.map +0 -1
  129. package/dist/chunk-P5F257N3.js.map +0 -1
  130. package/dist/chunk-SQZGQOKU.js.map +0 -1
  131. package/dist/chunk-UGJZ3M4Q.js.map +0 -1
  132. package/dist/chunk-VDLAZR7S.mjs.map +0 -1
  133. package/dist/chunk-VUAGVZJM.mjs.map +0 -1
  134. package/dist/chunk-W5YCZOXO.js.map +0 -1
  135. package/dist/chunk-YTE6WCBX.js.map +0 -1
@@ -2,19 +2,20 @@
2
2
  'use strict';
3
3
 
4
4
  var chunk3T2WGL47_js = require('../../chunk-3T2WGL47.js');
5
- var chunkMUOTTGCX_js = require('../../chunk-MUOTTGCX.js');
6
- var chunkLVK7VXW7_js = require('../../chunk-LVK7VXW7.js');
7
- var chunk6ZMTJSQF_js = require('../../chunk-6ZMTJSQF.js');
5
+ var chunkUDYEUTJC_js = require('../../chunk-UDYEUTJC.js');
6
+ var chunkDMPBNWJB_js = require('../../chunk-DMPBNWJB.js');
7
+ var chunkFUHNEP3Y_js = require('../../chunk-FUHNEP3Y.js');
8
8
  require('../../chunk-55H6WZQP.js');
9
9
  require('../../chunk-DJDZIRM6.js');
10
- require('../../chunk-SQZGQOKU.js');
11
- var chunkGCYYGSHU_js = require('../../chunk-GCYYGSHU.js');
12
- require('../../chunk-UZ3CMNUJ.js');
10
+ require('../../chunk-RWYG7QHP.js');
11
+ var chunkR4EKPXX3_js = require('../../chunk-R4EKPXX3.js');
13
12
  require('../../chunk-YXN2K77G.js');
14
- var chunkS7KHTUHA_js = require('../../chunk-S7KHTUHA.js');
15
13
  require('../../chunk-SY4MUT5V.js');
16
14
  require('../../chunk-2OZZH2IO.js');
17
- require('../../chunk-P4YYEM4B.js');
15
+ require('../../chunk-EZQ2D47U.js');
16
+ var chunkBHOT22QL_js = require('../../chunk-BHOT22QL.js');
17
+ require('../../chunk-UZ3CMNUJ.js');
18
+ var chunkS7KHTUHA_js = require('../../chunk-S7KHTUHA.js');
18
19
  require('../../chunk-72SWXOD5.js');
19
20
  var react = require('react');
20
21
  var outline = require('@heroicons/react/24/outline');
@@ -26,7 +27,7 @@ function AgentsModelsPageView({ labels, models, loading }) {
26
27
  const filteredModels = searchTerm.trim() ? allModels.filter((model) => model.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allModels;
27
28
  const isEmpty = allModels.length === 0;
28
29
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
29
- chunkGCYYGSHU_js.HeroSection,
30
+ chunkR4EKPXX3_js.HeroSection,
30
31
  {
31
32
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
32
33
  label: labels.title,
@@ -35,9 +36,9 @@ function AgentsModelsPageView({ labels, models, loading }) {
35
36
  gradient: "from-emerald-500 to-teal-700"
36
37
  }
37
38
  );
38
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39
40
  /* @__PURE__ */ jsxRuntime.jsx(
40
- chunkGCYYGSHU_js.SearchBar,
41
+ chunkR4EKPXX3_js.SearchBar,
41
42
  {
42
43
  searchTerm,
43
44
  onSearchChange: setSearchTerm,
@@ -45,18 +46,18 @@ function AgentsModelsPageView({ labels, models, loading }) {
45
46
  }
46
47
  ),
47
48
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
48
- chunkGCYYGSHU_js.EntityCard,
49
+ chunkR4EKPXX3_js.EntityCard,
49
50
  {
50
51
  accentGradient: "from-emerald-500 to-teal-700",
51
52
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-6 w-6" }) }),
52
53
  title: model.name,
53
54
  subtitle: `${labels.provider}: ${model.provider}`,
54
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
55
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
55
56
  },
56
57
  model.id
57
58
  )) })
58
59
  ] });
59
- return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
60
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content });
60
61
  }
61
62
  function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
62
63
  const [editing, setEditing] = react.useState(null);
@@ -67,7 +68,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
67
68
  const filteredAgents = searchTerm.trim() ? allAgents.filter((agent) => String(agent.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allAgents;
68
69
  const isEmpty = allAgents.length === 0;
69
70
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
70
- chunkGCYYGSHU_js.HeroSection,
71
+ chunkR4EKPXX3_js.HeroSection,
71
72
  {
72
73
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
73
74
  label: labels.title,
@@ -75,7 +76,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
75
76
  subtitle: labels.subtitle,
76
77
  gradient: "from-violet-500 to-indigo-700",
77
78
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
78
- chunkGCYYGSHU_js.SearchBar,
79
+ chunkR4EKPXX3_js.SearchBar,
79
80
  {
80
81
  searchTerm,
81
82
  onSearchChange: setSearchTerm,
@@ -84,7 +85,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
84
85
  }
85
86
  ) : void 0,
86
87
  actions: /* @__PURE__ */ jsxRuntime.jsx(
87
- chunkGCYYGSHU_js.CreateActionButton,
88
+ chunkR4EKPXX3_js.CreateActionButton,
88
89
  {
89
90
  mode: "desktop",
90
91
  label: labels.addAgent,
@@ -95,7 +96,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
95
96
  }
96
97
  );
97
98
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
98
- chunkGCYYGSHU_js.CreateActionButton,
99
+ chunkR4EKPXX3_js.CreateActionButton,
99
100
  {
100
101
  mode: "mobile",
101
102
  label: labels.addAgent,
@@ -103,23 +104,23 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
103
104
  accent: "violet"
104
105
  }
105
106
  );
106
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredAgents.map((agent) => {
107
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredAgents.map((agent) => {
107
108
  const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
108
109
  return /* @__PURE__ */ jsxRuntime.jsx(
109
- chunkGCYYGSHU_js.EntityCard,
110
+ chunkR4EKPXX3_js.EntityCard,
110
111
  {
111
112
  accentGradient: "from-violet-500 to-indigo-700",
112
113
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-6 w-6" }) }),
113
114
  title: String(agent.name ?? ""),
114
115
  subtitle: String(modelRecord?.name ?? agent.modelId ?? ""),
115
- status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Badge, { color: "emerald", children: [
116
+ status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: "emerald", children: [
116
117
  "v",
117
118
  agent.activePromptVersion
118
119
  ] }) : null,
119
120
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
120
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(agent), children: labels.edit }),
121
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(agent), children: labels.edit }),
121
122
  /* @__PURE__ */ jsxRuntime.jsx(
122
- chunkGCYYGSHU_js.Button,
123
+ chunkBHOT22QL_js.Button,
123
124
  {
124
125
  type: "button",
125
126
  size: "sm",
@@ -143,7 +144,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
143
144
  );
144
145
  }) });
145
146
  const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
146
- chunkGCYYGSHU_js.GlassModal,
147
+ chunkR4EKPXX3_js.GlassModal,
147
148
  {
148
149
  open: true,
149
150
  onClose: () => {
@@ -166,18 +167,18 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
166
167
  outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
167
168
  });
168
169
  },
169
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
170
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
171
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
172
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
173
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
174
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
175
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
170
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
171
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
172
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
173
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
174
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
175
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
176
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
176
177
  ] })
177
178
  }
178
179
  );
179
180
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
180
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
181
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
181
182
  createOpen && renderForm({ title: labels.createTitle }, (input) => {
182
183
  onCreate(input);
183
184
  setCreateOpen(false);
@@ -235,7 +236,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
235
236
  }) : allPrompts;
236
237
  const isEmpty = allPrompts.length === 0;
237
238
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
238
- chunkGCYYGSHU_js.HeroSection,
239
+ chunkR4EKPXX3_js.HeroSection,
239
240
  {
240
241
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
241
242
  label: labels.title,
@@ -243,7 +244,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
243
244
  subtitle: labels.subtitle,
244
245
  gradient: "from-sky-500 to-blue-700",
245
246
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
246
- chunkGCYYGSHU_js.CreateActionButton,
247
+ chunkR4EKPXX3_js.CreateActionButton,
247
248
  {
248
249
  mode: "desktop",
249
250
  label: labels.addPrompt,
@@ -254,7 +255,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
254
255
  }
255
256
  );
256
257
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
257
- chunkGCYYGSHU_js.CreateActionButton,
258
+ chunkR4EKPXX3_js.CreateActionButton,
258
259
  {
259
260
  mode: "mobile",
260
261
  label: labels.addPrompt,
@@ -262,9 +263,9 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
262
263
  accent: "sky"
263
264
  }
264
265
  );
265
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
266
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
266
267
  /* @__PURE__ */ jsxRuntime.jsx(
267
- chunkGCYYGSHU_js.SearchBar,
268
+ chunkR4EKPXX3_js.SearchBar,
268
269
  {
269
270
  searchTerm,
270
271
  onSearchChange: setSearchTerm,
@@ -275,17 +276,17 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
275
276
  const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
276
277
  const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
277
278
  return /* @__PURE__ */ jsxRuntime.jsx(
278
- chunkGCYYGSHU_js.EntityCard,
279
+ chunkR4EKPXX3_js.EntityCard,
279
280
  {
280
281
  accentGradient: "from-sky-500 to-blue-700",
281
282
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-6 w-6" }) }),
282
283
  title: agentName,
283
284
  subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
284
- status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "emerald", children: labels.isActive }) : null,
285
+ status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "emerald", children: labels.isActive }) : null,
285
286
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
286
- !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
287
+ !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
287
288
  /* @__PURE__ */ jsxRuntime.jsx(
288
- chunkGCYYGSHU_js.Button,
289
+ chunkBHOT22QL_js.Button,
289
290
  {
290
291
  type: "button",
291
292
  size: "sm",
@@ -304,9 +305,9 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
304
305
  }) })
305
306
  ] });
306
307
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
307
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
308
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
308
309
  /* @__PURE__ */ jsxRuntime.jsx(
309
- chunkGCYYGSHU_js.GlassModal,
310
+ chunkR4EKPXX3_js.GlassModal,
310
311
  {
311
312
  open: createOpen,
312
313
  onClose: () => setCreateOpen(false),
@@ -330,11 +331,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
330
331
  });
331
332
  setCreateOpen(false);
332
333
  },
333
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
334
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
335
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
334
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
335
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
336
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
336
337
  /* @__PURE__ */ jsxRuntime.jsx(
337
- chunkGCYYGSHU_js.FormSelect,
338
+ chunkR4EKPXX3_js.FormSelect,
338
339
  {
339
340
  name: "isActive",
340
341
  label: labels.isActive,
@@ -342,10 +343,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
342
343
  defaultValue: "true"
343
344
  }
344
345
  ),
345
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "reason", label: labels.reason }),
346
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
347
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
348
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
346
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "reason", label: labels.reason }),
347
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
348
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
349
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
349
350
  ] })
350
351
  }
351
352
  )
@@ -380,7 +381,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
380
381
  const filteredTools = searchTerm.trim() ? allTools.filter((tool) => tool.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTools;
381
382
  const isEmpty = allTools.length === 0;
382
383
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
383
- chunkGCYYGSHU_js.HeroSection,
384
+ chunkR4EKPXX3_js.HeroSection,
384
385
  {
385
386
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
386
387
  label: labels.title,
@@ -388,7 +389,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
388
389
  subtitle: labels.subtitle,
389
390
  gradient: "from-amber-500 to-orange-700",
390
391
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
391
- chunkGCYYGSHU_js.CreateActionButton,
392
+ chunkR4EKPXX3_js.CreateActionButton,
392
393
  {
393
394
  mode: "desktop",
394
395
  label: labels.addTool,
@@ -399,7 +400,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
399
400
  }
400
401
  );
401
402
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
402
- chunkGCYYGSHU_js.CreateActionButton,
403
+ chunkR4EKPXX3_js.CreateActionButton,
403
404
  {
404
405
  mode: "mobile",
405
406
  label: labels.addTool,
@@ -407,9 +408,9 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
407
408
  accent: "amber"
408
409
  }
409
410
  );
410
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
411
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
411
412
  /* @__PURE__ */ jsxRuntime.jsx(
412
- chunkGCYYGSHU_js.SearchBar,
413
+ chunkR4EKPXX3_js.SearchBar,
413
414
  {
414
415
  searchTerm,
415
416
  onSearchChange: setSearchTerm,
@@ -417,17 +418,17 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
417
418
  }
418
419
  ),
419
420
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
420
- chunkGCYYGSHU_js.EntityCard,
421
+ chunkR4EKPXX3_js.EntityCard,
421
422
  {
422
423
  accentGradient: "from-amber-500 to-orange-700",
423
424
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-6 w-6" }) }),
424
425
  title: tool.name,
425
426
  subtitle: toolTypeLabel(tool),
426
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
427
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
427
428
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
428
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
429
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
429
430
  /* @__PURE__ */ jsxRuntime.jsx(
430
- chunkGCYYGSHU_js.Button,
431
+ chunkBHOT22QL_js.Button,
431
432
  {
432
433
  type: "button",
433
434
  size: "sm",
@@ -445,7 +446,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
445
446
  )) })
446
447
  ] });
447
448
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
448
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
449
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
449
450
  createOpen && /* @__PURE__ */ jsxRuntime.jsx(
450
451
  ToolEditor,
451
452
  {
@@ -503,7 +504,7 @@ function ToolEditor({
503
504
  setValue((v) => ({ ...v, [key]: next }));
504
505
  };
505
506
  return /* @__PURE__ */ jsxRuntime.jsx(
506
- chunkGCYYGSHU_js.GlassModal,
507
+ chunkR4EKPXX3_js.GlassModal,
507
508
  {
508
509
  open: true,
509
510
  onClose,
@@ -516,9 +517,9 @@ function ToolEditor({
516
517
  handleSubmit();
517
518
  },
518
519
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
519
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
520
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
520
521
  /* @__PURE__ */ jsxRuntime.jsx(
521
- chunkGCYYGSHU_js.FormInput,
522
+ chunkR4EKPXX3_js.FormInput,
522
523
  {
523
524
  label: "Name",
524
525
  required: true,
@@ -528,7 +529,7 @@ function ToolEditor({
528
529
  }
529
530
  ),
530
531
  /* @__PURE__ */ jsxRuntime.jsx(
531
- chunkGCYYGSHU_js.FormSelect,
532
+ chunkR4EKPXX3_js.FormSelect,
532
533
  {
533
534
  label: "Tool type",
534
535
  value: value.toolType,
@@ -538,7 +539,7 @@ function ToolEditor({
538
539
  }
539
540
  ),
540
541
  /* @__PURE__ */ jsxRuntime.jsx(
541
- chunkGCYYGSHU_js.FormSelect,
542
+ chunkR4EKPXX3_js.FormSelect,
542
543
  {
543
544
  label: "Enabled",
544
545
  value: value.enabled ? "true" : "false",
@@ -547,7 +548,7 @@ function ToolEditor({
547
548
  }
548
549
  ),
549
550
  /* @__PURE__ */ jsxRuntime.jsx(
550
- chunkGCYYGSHU_js.FormInput,
551
+ chunkR4EKPXX3_js.FormInput,
551
552
  {
552
553
  label: "Icon (optional)",
553
554
  value: value.icon ?? "",
@@ -557,7 +558,7 @@ function ToolEditor({
557
558
  )
558
559
  ] }),
559
560
  /* @__PURE__ */ jsxRuntime.jsx(
560
- chunkGCYYGSHU_js.FormTextarea,
561
+ chunkR4EKPXX3_js.FormTextarea,
561
562
  {
562
563
  label: "Description",
563
564
  rows: 2,
@@ -605,7 +606,7 @@ function ParametersEditor({
605
606
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
606
607
  parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
607
608
  /* @__PURE__ */ jsxRuntime.jsx(
608
- chunkGCYYGSHU_js.FormInput,
609
+ chunkR4EKPXX3_js.FormInput,
609
610
  {
610
611
  label: "Name",
611
612
  value: param.name,
@@ -614,7 +615,7 @@ function ParametersEditor({
614
615
  }
615
616
  ),
616
617
  /* @__PURE__ */ jsxRuntime.jsx(
617
- chunkGCYYGSHU_js.FormSelect,
618
+ chunkR4EKPXX3_js.FormSelect,
618
619
  {
619
620
  label: "Type",
620
621
  value: param.type,
@@ -623,7 +624,7 @@ function ParametersEditor({
623
624
  }
624
625
  ),
625
626
  /* @__PURE__ */ jsxRuntime.jsx(
626
- chunkGCYYGSHU_js.FormInput,
627
+ chunkR4EKPXX3_js.FormInput,
627
628
  {
628
629
  label: "Description",
629
630
  value: param.description,
@@ -642,9 +643,9 @@ function ParametersEditor({
642
643
  ),
643
644
  "Required"
644
645
  ] }),
645
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
646
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
646
647
  ] }, index)),
647
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add parameter" })
648
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add parameter" })
648
649
  ] })
649
650
  ] });
650
651
  }
@@ -657,9 +658,9 @@ function HandlerConfigEditor({
657
658
  if (toolType === "http") {
658
659
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
659
660
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
660
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
661
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
661
662
  /* @__PURE__ */ jsxRuntime.jsx(
662
- chunkGCYYGSHU_js.FormSelect,
663
+ chunkR4EKPXX3_js.FormSelect,
663
664
  {
664
665
  label: "Method",
665
666
  value: stringProp(config, "method", "GET"),
@@ -668,7 +669,7 @@ function HandlerConfigEditor({
668
669
  }
669
670
  ),
670
671
  /* @__PURE__ */ jsxRuntime.jsx(
671
- chunkGCYYGSHU_js.FormInput,
672
+ chunkR4EKPXX3_js.FormInput,
672
673
  {
673
674
  label: "URL template",
674
675
  value: stringProp(config, "url"),
@@ -678,7 +679,7 @@ function HandlerConfigEditor({
678
679
  )
679
680
  ] }),
680
681
  /* @__PURE__ */ jsxRuntime.jsx(
681
- chunkGCYYGSHU_js.FormTextarea,
682
+ chunkR4EKPXX3_js.FormTextarea,
682
683
  {
683
684
  label: "Headers (JSON)",
684
685
  rows: 3,
@@ -688,7 +689,7 @@ function HandlerConfigEditor({
688
689
  }
689
690
  ),
690
691
  /* @__PURE__ */ jsxRuntime.jsx(
691
- chunkGCYYGSHU_js.FormTextarea,
692
+ chunkR4EKPXX3_js.FormTextarea,
692
693
  {
693
694
  label: "Body template",
694
695
  rows: 3,
@@ -703,7 +704,7 @@ function HandlerConfigEditor({
703
704
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
704
705
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
705
706
  /* @__PURE__ */ jsxRuntime.jsx(
706
- chunkGCYYGSHU_js.FormInput,
707
+ chunkR4EKPXX3_js.FormInput,
707
708
  {
708
709
  label: "Implementation key",
709
710
  value: stringProp(config, "implementationKey"),
@@ -717,9 +718,9 @@ function HandlerConfigEditor({
717
718
  if (toolType === "database_query") {
718
719
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
719
720
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
720
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
721
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
721
722
  /* @__PURE__ */ jsxRuntime.jsx(
722
- chunkGCYYGSHU_js.FormInput,
723
+ chunkR4EKPXX3_js.FormInput,
723
724
  {
724
725
  label: "Datasource ID",
725
726
  value: stringProp(config, "datasourceId"),
@@ -728,7 +729,7 @@ function HandlerConfigEditor({
728
729
  }
729
730
  ),
730
731
  /* @__PURE__ */ jsxRuntime.jsx(
731
- chunkGCYYGSHU_js.FormInput,
732
+ chunkR4EKPXX3_js.FormInput,
732
733
  {
733
734
  label: "Max rows",
734
735
  type: "number",
@@ -738,7 +739,7 @@ function HandlerConfigEditor({
738
739
  )
739
740
  ] }),
740
741
  /* @__PURE__ */ jsxRuntime.jsx(
741
- chunkGCYYGSHU_js.FormTextarea,
742
+ chunkR4EKPXX3_js.FormTextarea,
742
743
  {
743
744
  label: "Query template",
744
745
  rows: 4,
@@ -754,7 +755,7 @@ function HandlerConfigEditor({
754
755
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
755
756
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-amber-600 dark:text-amber-400", children: "Experimental \u2014 sandbox is not yet enforced. Only enable for trusted tools." }),
756
757
  /* @__PURE__ */ jsxRuntime.jsx(
757
- chunkGCYYGSHU_js.FormSelect,
758
+ chunkR4EKPXX3_js.FormSelect,
758
759
  {
759
760
  label: "Language",
760
761
  value: stringProp(config, "language", "javascript"),
@@ -766,7 +767,7 @@ function HandlerConfigEditor({
766
767
  }
767
768
  ),
768
769
  /* @__PURE__ */ jsxRuntime.jsx(
769
- chunkGCYYGSHU_js.FormTextarea,
770
+ chunkR4EKPXX3_js.FormTextarea,
770
771
  {
771
772
  label: "Code",
772
773
  rows: 6,
@@ -779,9 +780,9 @@ function HandlerConfigEditor({
779
780
  }
780
781
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
781
782
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
782
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
783
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
783
784
  /* @__PURE__ */ jsxRuntime.jsx(
784
- chunkGCYYGSHU_js.FormInput,
785
+ chunkR4EKPXX3_js.FormInput,
785
786
  {
786
787
  label: "URL",
787
788
  value: stringProp(config, "url"),
@@ -789,7 +790,7 @@ function HandlerConfigEditor({
789
790
  }
790
791
  ),
791
792
  /* @__PURE__ */ jsxRuntime.jsx(
792
- chunkGCYYGSHU_js.FormSelect,
793
+ chunkR4EKPXX3_js.FormSelect,
793
794
  {
794
795
  label: "Auth",
795
796
  value: stringProp(config, "authType", "bearer"),
@@ -803,7 +804,7 @@ function HandlerConfigEditor({
803
804
  }
804
805
  ),
805
806
  /* @__PURE__ */ jsxRuntime.jsx(
806
- chunkGCYYGSHU_js.FormInput,
807
+ chunkR4EKPXX3_js.FormInput,
807
808
  {
808
809
  label: "Credential secret id",
809
810
  value: stringProp(config, "credentialRef"),
@@ -936,7 +937,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
936
937
  const filteredRules = searchTerm.trim() ? allRules.filter((rule) => (rule.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allRules;
937
938
  const isEmpty = allRules.length === 0;
938
939
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
939
- chunkGCYYGSHU_js.HeroSection,
940
+ chunkR4EKPXX3_js.HeroSection,
940
941
  {
941
942
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
942
943
  label: labels.title,
@@ -944,7 +945,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
944
945
  subtitle: labels.subtitle,
945
946
  gradient: "from-fuchsia-500 to-purple-700",
946
947
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
947
- chunkGCYYGSHU_js.CreateActionButton,
948
+ chunkR4EKPXX3_js.CreateActionButton,
948
949
  {
949
950
  mode: "desktop",
950
951
  label: labels.addRule,
@@ -955,7 +956,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
955
956
  }
956
957
  );
957
958
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
958
- chunkGCYYGSHU_js.CreateActionButton,
959
+ chunkR4EKPXX3_js.CreateActionButton,
959
960
  {
960
961
  mode: "mobile",
961
962
  label: labels.addRule,
@@ -963,9 +964,9 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
963
964
  accent: "fuchsia"
964
965
  }
965
966
  );
966
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
967
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
967
968
  /* @__PURE__ */ jsxRuntime.jsx(
968
- chunkGCYYGSHU_js.SearchBar,
969
+ chunkR4EKPXX3_js.SearchBar,
969
970
  {
970
971
  searchTerm,
971
972
  onSearchChange: setSearchTerm,
@@ -973,17 +974,17 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
973
974
  }
974
975
  ),
975
976
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
976
- chunkGCYYGSHU_js.EntityCard,
977
+ chunkR4EKPXX3_js.EntityCard,
977
978
  {
978
979
  accentGradient: "from-fuchsia-500 to-purple-700",
979
980
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-fuchsia-500/10 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-6 w-6" }) }),
980
981
  title: rule.name,
981
982
  subtitle: `${labels.order}: ${rule.order ?? 0}`,
982
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
983
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
983
984
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
984
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
985
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
985
986
  /* @__PURE__ */ jsxRuntime.jsx(
986
- chunkGCYYGSHU_js.Button,
987
+ chunkBHOT22QL_js.Button,
987
988
  {
988
989
  type: "button",
989
990
  size: "sm",
@@ -1001,13 +1002,13 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
1001
1002
  )) })
1002
1003
  ] });
1003
1004
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1004
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
1005
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
1005
1006
  createOpen && /* @__PURE__ */ jsxRuntime.jsx(
1006
1007
  RuleEditor,
1007
1008
  {
1008
1009
  title: labels.createTitle,
1009
1010
  saveLabel: labels.save,
1010
- initial: chunk6ZMTJSQF_js.defaultRuleForm(),
1011
+ initial: chunkFUHNEP3Y_js.defaultRuleForm(),
1011
1012
  onClose: () => setCreateOpen(false),
1012
1013
  onSubmit: (value) => {
1013
1014
  onCreate(value);
@@ -1039,7 +1040,7 @@ function RuleEditor({
1039
1040
  }) {
1040
1041
  const [value, setValue] = react.useState(initial);
1041
1042
  return /* @__PURE__ */ jsxRuntime.jsx(
1042
- chunkGCYYGSHU_js.GlassModal,
1043
+ chunkR4EKPXX3_js.GlassModal,
1043
1044
  {
1044
1045
  open: true,
1045
1046
  onClose,
@@ -1051,12 +1052,12 @@ function RuleEditor({
1051
1052
  event.preventDefault();
1052
1053
  onSubmit(value);
1053
1054
  },
1054
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk6ZMTJSQF_js.RuleForm, { value, onChange: setValue })
1055
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkFUHNEP3Y_js.RuleForm, { value, onChange: setValue })
1055
1056
  }
1056
1057
  );
1057
1058
  }
1058
1059
  function ruleToFormValue(rule) {
1059
- const base = chunk6ZMTJSQF_js.defaultRuleForm();
1060
+ const base = chunkFUHNEP3Y_js.defaultRuleForm();
1060
1061
  const rawCondition = rule.condition ?? rule.conditions;
1061
1062
  const rawAction = pickAction(rule);
1062
1063
  return {
@@ -1187,7 +1188,7 @@ var SAMPLE_DATASOURCES = [
1187
1188
  ];
1188
1189
  function getDialectLabel(dialect) {
1189
1190
  if (!dialect) return "Unknown";
1190
- for (const category of chunkLVK7VXW7_js.DIALECT_CATEGORIES) {
1191
+ for (const category of chunkDMPBNWJB_js.DIALECT_CATEGORIES) {
1191
1192
  const found = category.dialects.find((d) => d.value === dialect);
1192
1193
  if (found) return found.label;
1193
1194
  }
@@ -1195,12 +1196,12 @@ function getDialectLabel(dialect) {
1195
1196
  }
1196
1197
  function getDialectGradient(dialect) {
1197
1198
  if (!dialect) return "from-gray-400 to-gray-500";
1198
- const category = chunkLVK7VXW7_js.findCategory(dialect);
1199
+ const category = chunkDMPBNWJB_js.findCategory(dialect);
1199
1200
  return category?.gradient ?? "from-gray-400 to-gray-500";
1200
1201
  }
1201
1202
  function getDialectIcon(dialect) {
1202
1203
  if (!dialect) return outline.CircleStackIcon;
1203
- const category = chunkLVK7VXW7_js.findCategory(dialect);
1204
+ const category = chunkDMPBNWJB_js.findCategory(dialect);
1204
1205
  return category?.icon ?? outline.CircleStackIcon;
1205
1206
  }
1206
1207
  var DIALECT_LOGO = {
@@ -1270,7 +1271,7 @@ function DatasourcesPageView({
1270
1271
  }
1271
1272
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1272
1273
  /* @__PURE__ */ jsxRuntime.jsx(
1273
- chunkGCYYGSHU_js.HeroSection,
1274
+ chunkR4EKPXX3_js.HeroSection,
1274
1275
  {
1275
1276
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
1276
1277
  label: labels.title,
@@ -1278,7 +1279,7 @@ function DatasourcesPageView({
1278
1279
  subtitle: labels.subtitle,
1279
1280
  gradient: "from-amber-500 to-orange-600",
1280
1281
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
1281
- chunkGCYYGSHU_js.CreateActionButton,
1282
+ chunkR4EKPXX3_js.CreateActionButton,
1282
1283
  {
1283
1284
  mode: "desktop",
1284
1285
  label: labels.addDatasource,
@@ -1289,7 +1290,7 @@ function DatasourcesPageView({
1289
1290
  }
1290
1291
  ),
1291
1292
  /* @__PURE__ */ jsxRuntime.jsx(
1292
- chunkGCYYGSHU_js.CreateActionButton,
1293
+ chunkR4EKPXX3_js.CreateActionButton,
1293
1294
  {
1294
1295
  mode: "mobile",
1295
1296
  label: labels.addDatasource,
@@ -1298,7 +1299,7 @@ function DatasourcesPageView({
1298
1299
  }
1299
1300
  ),
1300
1301
  !isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
1301
- chunkGCYYGSHU_js.SearchBar,
1302
+ chunkR4EKPXX3_js.SearchBar,
1302
1303
  {
1303
1304
  searchTerm,
1304
1305
  onSearchChange: setSearchTerm,
@@ -1306,7 +1307,7 @@ function DatasourcesPageView({
1306
1307
  }
1307
1308
  ),
1308
1309
  isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1309
- chunkGCYYGSHU_js.PageEmptyState,
1310
+ chunkR4EKPXX3_js.PageEmptyState,
1310
1311
  {
1311
1312
  title: labels.emptyTitle,
1312
1313
  message: labels.emptyDescription,
@@ -1320,15 +1321,15 @@ function DatasourcesPageView({
1320
1321
  const logoSrc = getDialectLogoSrc(ds.dialect);
1321
1322
  const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface flex h-11 w-11 items-center justify-center rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: dialectLabel, className: "h-7 w-7 object-contain" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) });
1322
1323
  return /* @__PURE__ */ jsxRuntime.jsx(
1323
- chunkGCYYGSHU_js.EntityCard,
1324
+ chunkR4EKPXX3_js.EntityCard,
1324
1325
  {
1325
1326
  accentGradient: gradient,
1326
1327
  icon: iconElement,
1327
1328
  title: ds.name ?? ds.id,
1328
1329
  subtitle: dialectLabel,
1329
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
1330
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
1330
1331
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
1331
- ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "blue", size: "xs", children: "Read-only" }),
1332
+ ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "blue", size: "xs", children: "Read-only" }),
1332
1333
  ds.timeoutMs && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1333
1334
  ds.timeoutMs / 1e3,
1334
1335
  "s timeout"
@@ -1350,7 +1351,7 @@ function DatasourcesPageView({
1350
1351
  );
1351
1352
  }) }),
1352
1353
  /* @__PURE__ */ jsxRuntime.jsx(
1353
- chunkLVK7VXW7_js.DatasourceModal,
1354
+ chunkDMPBNWJB_js.DatasourceModal,
1354
1355
  {
1355
1356
  open: modalOpen,
1356
1357
  onClose: () => setModalOpen(false),
@@ -1365,7 +1366,7 @@ function DashboardPageView({ labels, appLogo }) {
1365
1366
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-6", children: appLogo }),
1366
1367
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-slate-600 dark:text-slate-300", children: labels.subtitle })
1367
1368
  ] });
1368
- return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content: null });
1369
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content: null });
1369
1370
  }
1370
1371
  function AgentsIndexPageView({ labels }) {
1371
1372
  const Link = chunkS7KHTUHA_js.useLink();
@@ -1379,7 +1380,7 @@ function AgentsIndexPageView({ labels }) {
1379
1380
  const filteredTiles = searchTerm.trim() ? allTiles.filter((tile) => tile.title.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTiles;
1380
1381
  const isEmpty = allTiles.length === 0;
1381
1382
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1382
- chunkGCYYGSHU_js.HeroSection,
1383
+ chunkR4EKPXX3_js.HeroSection,
1383
1384
  {
1384
1385
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
1385
1386
  label: labels.title,
@@ -1390,7 +1391,7 @@ function AgentsIndexPageView({ labels }) {
1390
1391
  );
1391
1392
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1392
1393
  !isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
1393
- chunkGCYYGSHU_js.SearchBar,
1394
+ chunkR4EKPXX3_js.SearchBar,
1394
1395
  {
1395
1396
  searchTerm,
1396
1397
  onSearchChange: setSearchTerm,
@@ -1400,7 +1401,7 @@ function AgentsIndexPageView({ labels }) {
1400
1401
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
1401
1402
  const Icon = tile.icon;
1402
1403
  return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
1403
- chunkGCYYGSHU_js.EntityCard,
1404
+ chunkR4EKPXX3_js.EntityCard,
1404
1405
  {
1405
1406
  accentGradient: tile.gradient,
1406
1407
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) }),
@@ -1410,13 +1411,13 @@ function AgentsIndexPageView({ labels }) {
1410
1411
  ) }, tile.id);
1411
1412
  }) })
1412
1413
  ] });
1413
- return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
1414
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content });
1414
1415
  }
1415
1416
  function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
1416
1417
  const selectedWorkflow = workflows[0] ?? null;
1417
1418
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1418
1419
  /* @__PURE__ */ jsxRuntime.jsx(
1419
- chunkGCYYGSHU_js.SectionHeader,
1420
+ chunkR4EKPXX3_js.SectionHeader,
1420
1421
  {
1421
1422
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
1422
1423
  title: labels.title,
@@ -1425,9 +1426,9 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1425
1426
  }
1426
1427
  ),
1427
1428
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1428
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
1429
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
1429
1430
  /* @__PURE__ */ jsxRuntime.jsx(
1430
- chunkGCYYGSHU_js.Form,
1431
+ chunkR4EKPXX3_js.Form,
1431
1432
  {
1432
1433
  onSubmit: (event) => {
1433
1434
  event.preventDefault();
@@ -1438,32 +1439,32 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1438
1439
  onCreate({ name, description });
1439
1440
  event.currentTarget.reset();
1440
1441
  },
1441
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
1442
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
1443
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
1444
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "submit", children: labels.create }) })
1442
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
1443
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
1444
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
1445
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", children: labels.create }) })
1445
1446
  ] })
1446
1447
  }
1447
1448
  )
1448
1449
  ] }),
1449
1450
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1450
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
1451
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Table, { children: [
1452
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.TableRow, { children: [
1453
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.name }),
1454
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.description }),
1455
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.version }),
1456
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.status }),
1457
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableHeader, { children: labels.actions })
1451
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
1452
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.Table, { children: [
1453
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.TableRow, { children: [
1454
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHeader, { children: labels.name }),
1455
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHeader, { children: labels.description }),
1456
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHeader, { children: labels.version }),
1457
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHeader, { children: labels.status }),
1458
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableHeader, { children: labels.actions })
1458
1459
  ] }) }),
1459
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.TableRow, { children: [
1460
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: workflow.name }),
1461
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: workflow.description }),
1462
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: String(workflow.version) }),
1463
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
1464
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1460
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.TableRow, { children: [
1461
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableCell, { children: workflow.name }),
1462
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableCell, { children: workflow.description }),
1463
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableCell, { children: String(workflow.version) }),
1464
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
1465
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1465
1466
  /* @__PURE__ */ jsxRuntime.jsx(
1466
- chunkGCYYGSHU_js.Form,
1467
+ chunkR4EKPXX3_js.Form,
1467
1468
  {
1468
1469
  onSubmit: (event) => {
1469
1470
  event.preventDefault();
@@ -1473,17 +1474,17 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1473
1474
  description: workflow.description ?? ""
1474
1475
  });
1475
1476
  },
1476
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
1477
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
1477
1478
  }
1478
1479
  ),
1479
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
1480
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
1480
1481
  ] }) })
1481
1482
  ] }, workflow.id)) })
1482
1483
  ] })
1483
1484
  ] }),
1484
1485
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1485
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
1486
- selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkMUOTTGCX_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Text, { children: labels.empty })
1486
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
1487
+ selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkUDYEUTJC_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.Text, { children: labels.empty })
1487
1488
  ] })
1488
1489
  ] });
1489
1490
  }
@@ -1532,7 +1533,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1532
1533
  });
1533
1534
  const isEmpty = allRuns.length === 0;
1534
1535
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1535
- chunkGCYYGSHU_js.HeroSection,
1536
+ chunkR4EKPXX3_js.HeroSection,
1536
1537
  {
1537
1538
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1538
1539
  label: labels.title,
@@ -1540,7 +1541,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1540
1541
  subtitle: labels.subtitle,
1541
1542
  gradient: "from-indigo-500 to-sky-700",
1542
1543
  toolbar: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsxRuntime.jsx(
1543
- chunkGCYYGSHU_js.FormSelect,
1544
+ chunkR4EKPXX3_js.FormSelect,
1544
1545
  {
1545
1546
  name: "statusFilter",
1546
1547
  label: labels.filterStatus,
@@ -1551,9 +1552,9 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1551
1552
  ) })
1552
1553
  }
1553
1554
  );
1554
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1555
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1555
1556
  !isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
1556
- chunkGCYYGSHU_js.SearchBar,
1557
+ chunkR4EKPXX3_js.SearchBar,
1557
1558
  {
1558
1559
  searchTerm,
1559
1560
  onSearchChange: setSearchTerm,
@@ -1561,18 +1562,18 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1561
1562
  }
1562
1563
  ),
1563
1564
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
1564
- chunkGCYYGSHU_js.EntityCard,
1565
+ chunkR4EKPXX3_js.EntityCard,
1565
1566
  {
1566
1567
  accentGradient: "from-indigo-500 to-sky-700",
1567
1568
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:bg-indigo-500/20 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-6 w-6" }) }),
1568
1569
  title: run.id.slice(0, 8),
1569
1570
  subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
1570
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
1571
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
1571
1572
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1572
- onView && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
1573
- onViewTimeline && labels.timeline && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
1574
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
1575
- run.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
1573
+ onView && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
1574
+ onViewTimeline && labels.timeline && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
1575
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
1576
+ run.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
1576
1577
  ] }),
1577
1578
  children: [
1578
1579
  /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
@@ -1587,11 +1588,11 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1587
1588
  run.id
1588
1589
  )) })
1589
1590
  ] });
1590
- return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content });
1591
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content });
1591
1592
  }
1592
1593
  function RunTimelinePageView({ labels, entries, loading, runId }) {
1593
1594
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1594
- chunkGCYYGSHU_js.HeroSection,
1595
+ chunkR4EKPXX3_js.HeroSection,
1595
1596
  {
1596
1597
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1597
1598
  label: labels.title,
@@ -1601,23 +1602,23 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
1601
1602
  }
1602
1603
  );
1603
1604
  if (loading) {
1604
- return /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) });
1605
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) });
1605
1606
  }
1606
1607
  if (entries.length === 0) {
1607
1608
  return /* @__PURE__ */ jsxRuntime.jsx(
1608
- chunkGCYYGSHU_js.ManagementPageLayout,
1609
+ chunkR4EKPXX3_js.ManagementPageLayout,
1609
1610
  {
1610
1611
  hero,
1611
- content: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
1612
+ content: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
1612
1613
  }
1613
1614
  );
1614
1615
  }
1615
1616
  return /* @__PURE__ */ jsxRuntime.jsx(
1616
- chunkGCYYGSHU_js.ManagementPageLayout,
1617
+ chunkR4EKPXX3_js.ManagementPageLayout,
1617
1618
  {
1618
1619
  hero,
1619
1620
  content: /* @__PURE__ */ jsxRuntime.jsx(
1620
- chunk6ZMTJSQF_js.ExecutionTimelinePanel,
1621
+ chunkFUHNEP3Y_js.ExecutionTimelinePanel,
1621
1622
  {
1622
1623
  entries,
1623
1624
  labels
@@ -1703,7 +1704,7 @@ function ConnectionsPageView({
1703
1704
  const filteredConnections = searchTerm.trim() ? allConnections.filter((conn) => conn.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allConnections;
1704
1705
  const isEmpty = allConnections.length === 0;
1705
1706
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1706
- chunkGCYYGSHU_js.HeroSection,
1707
+ chunkR4EKPXX3_js.HeroSection,
1707
1708
  {
1708
1709
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
1709
1710
  label: labels.title,
@@ -1711,7 +1712,7 @@ function ConnectionsPageView({
1711
1712
  subtitle: labels.subtitle,
1712
1713
  gradient: "from-sky-500 to-indigo-600",
1713
1714
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
1714
- chunkGCYYGSHU_js.CreateActionButton,
1715
+ chunkR4EKPXX3_js.CreateActionButton,
1715
1716
  {
1716
1717
  mode: "desktop",
1717
1718
  label: labels.add,
@@ -1722,7 +1723,7 @@ function ConnectionsPageView({
1722
1723
  }
1723
1724
  );
1724
1725
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
1725
- chunkGCYYGSHU_js.CreateActionButton,
1726
+ chunkR4EKPXX3_js.CreateActionButton,
1726
1727
  {
1727
1728
  mode: "mobile",
1728
1729
  label: labels.add,
@@ -1730,9 +1731,9 @@ function ConnectionsPageView({
1730
1731
  accent: "sky"
1731
1732
  }
1732
1733
  );
1733
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1734
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1734
1735
  /* @__PURE__ */ jsxRuntime.jsx(
1735
- chunkGCYYGSHU_js.SearchBar,
1736
+ chunkR4EKPXX3_js.SearchBar,
1736
1737
  {
1737
1738
  searchTerm,
1738
1739
  onSearchChange: setSearchTerm,
@@ -1740,20 +1741,20 @@ function ConnectionsPageView({
1740
1741
  }
1741
1742
  ),
1742
1743
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
1743
- chunkGCYYGSHU_js.EntityCard,
1744
+ chunkR4EKPXX3_js.EntityCard,
1744
1745
  {
1745
1746
  accentGradient: "from-sky-500 to-indigo-600",
1746
1747
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-6 w-6" }) }),
1747
1748
  title: conn.name,
1748
1749
  subtitle: providerLabel(conn.providerSlug),
1749
1750
  status: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
1750
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
1751
- conn.credentialRef ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: "amber", children: "No secret" })
1751
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
1752
+ conn.credentialRef ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "amber", children: "No secret" })
1752
1753
  ] }),
1753
1754
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1754
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
1755
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
1755
1756
  /* @__PURE__ */ jsxRuntime.jsx(
1756
- chunkGCYYGSHU_js.Button,
1757
+ chunkBHOT22QL_js.Button,
1757
1758
  {
1758
1759
  type: "button",
1759
1760
  size: "sm",
@@ -1775,7 +1776,7 @@ function ConnectionsPageView({
1775
1776
  )) })
1776
1777
  ] });
1777
1778
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1778
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
1779
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
1779
1780
  createOpen && /* @__PURE__ */ jsxRuntime.jsx(
1780
1781
  ConnectionEditor,
1781
1782
  {
@@ -1889,7 +1890,7 @@ function ConnectionEditor({
1889
1890
  return preset.exampleModels?.join(", ") ?? "";
1890
1891
  }, [preset]);
1891
1892
  return /* @__PURE__ */ jsxRuntime.jsx(
1892
- chunkGCYYGSHU_js.GlassModal,
1893
+ chunkR4EKPXX3_js.GlassModal,
1893
1894
  {
1894
1895
  open: true,
1895
1896
  onClose,
@@ -1902,9 +1903,9 @@ function ConnectionEditor({
1902
1903
  void handleSubmit();
1903
1904
  },
1904
1905
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1905
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
1906
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
1906
1907
  /* @__PURE__ */ jsxRuntime.jsx(
1907
- chunkGCYYGSHU_js.FormSelect,
1908
+ chunkR4EKPXX3_js.FormSelect,
1908
1909
  {
1909
1910
  label: "Provider",
1910
1911
  value: value.providerSlug,
@@ -1915,7 +1916,7 @@ function ConnectionEditor({
1915
1916
  }
1916
1917
  ),
1917
1918
  /* @__PURE__ */ jsxRuntime.jsx(
1918
- chunkGCYYGSHU_js.FormInput,
1919
+ chunkR4EKPXX3_js.FormInput,
1919
1920
  {
1920
1921
  label: "Display name",
1921
1922
  required: true,
@@ -1925,7 +1926,7 @@ function ConnectionEditor({
1925
1926
  }
1926
1927
  ),
1927
1928
  preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
1928
- chunkGCYYGSHU_js.FormInput,
1929
+ chunkR4EKPXX3_js.FormInput,
1929
1930
  {
1930
1931
  label: "Region",
1931
1932
  value: value.region,
@@ -1934,7 +1935,7 @@ function ConnectionEditor({
1934
1935
  }
1935
1936
  ),
1936
1937
  preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
1937
- chunkGCYYGSHU_js.FormInput,
1938
+ chunkR4EKPXX3_js.FormInput,
1938
1939
  {
1939
1940
  label: "Endpoint URL",
1940
1941
  value: value.endpoint,
@@ -1944,7 +1945,7 @@ function ConnectionEditor({
1944
1945
  )
1945
1946
  ] }),
1946
1947
  /* @__PURE__ */ jsxRuntime.jsx(
1947
- chunkGCYYGSHU_js.FormInput,
1948
+ chunkR4EKPXX3_js.FormInput,
1948
1949
  {
1949
1950
  label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
1950
1951
  type: "password",
@@ -1955,7 +1956,7 @@ function ConnectionEditor({
1955
1956
  }
1956
1957
  ),
1957
1958
  /* @__PURE__ */ jsxRuntime.jsx(
1958
- chunkGCYYGSHU_js.FormInput,
1959
+ chunkR4EKPXX3_js.FormInput,
1959
1960
  {
1960
1961
  label: "Model filter (comma-separated, optional)",
1961
1962
  value: value.modelFilter,
@@ -1967,7 +1968,7 @@ function ConnectionEditor({
1967
1968
  /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 text-sm dark:border-slate-700 dark:bg-slate-900/40", children: [
1968
1969
  /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
1969
1970
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
1970
- chunkGCYYGSHU_js.FormTextarea,
1971
+ chunkR4EKPXX3_js.FormTextarea,
1971
1972
  {
1972
1973
  rows: 4,
1973
1974
  value: value.configJson,
@@ -2037,7 +2038,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2037
2038
  { value: "password", label: labels.typePassword }
2038
2039
  ];
2039
2040
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
2040
- chunkGCYYGSHU_js.HeroSection,
2041
+ chunkR4EKPXX3_js.HeroSection,
2041
2042
  {
2042
2043
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
2043
2044
  label: labels.title,
@@ -2045,7 +2046,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2045
2046
  subtitle: labels.subtitle,
2046
2047
  gradient: "from-rose-500 to-orange-600",
2047
2048
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
2048
- chunkGCYYGSHU_js.CreateActionButton,
2049
+ chunkR4EKPXX3_js.CreateActionButton,
2049
2050
  {
2050
2051
  mode: "desktop",
2051
2052
  label: labels.addCredential,
@@ -2056,7 +2057,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2056
2057
  }
2057
2058
  );
2058
2059
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
2059
- chunkGCYYGSHU_js.CreateActionButton,
2060
+ chunkR4EKPXX3_js.CreateActionButton,
2060
2061
  {
2061
2062
  mode: "mobile",
2062
2063
  label: labels.addCredential,
@@ -2064,9 +2065,9 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2064
2065
  accent: "rose"
2065
2066
  }
2066
2067
  );
2067
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2068
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2068
2069
  /* @__PURE__ */ jsxRuntime.jsx(
2069
- chunkGCYYGSHU_js.SearchBar,
2070
+ chunkR4EKPXX3_js.SearchBar,
2070
2071
  {
2071
2072
  searchTerm,
2072
2073
  onSearchChange: setSearchTerm,
@@ -2074,22 +2075,22 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2074
2075
  }
2075
2076
  ),
2076
2077
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredCredentials.map((secret) => /* @__PURE__ */ jsxRuntime.jsxs(
2077
- chunkGCYYGSHU_js.EntityCard,
2078
+ chunkR4EKPXX3_js.EntityCard,
2078
2079
  {
2079
2080
  accentGradient: "from-rose-500 to-orange-700",
2080
2081
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-rose-500/10 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6" }) }),
2081
2082
  title: secret.name,
2082
2083
  subtitle: secret.secretType,
2083
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
2084
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
2084
2085
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
2085
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.CopyableId, { id: secret.secretId }),
2086
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.CopyableId, { id: secret.secretId }),
2086
2087
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
2087
- /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
2088
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
2088
2089
  /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
2089
2090
  labels.rotate
2090
2091
  ] }),
2091
2092
  !secret.disabled && /* @__PURE__ */ jsxRuntime.jsxs(
2092
- chunkGCYYGSHU_js.Button,
2093
+ chunkBHOT22QL_js.Button,
2093
2094
  {
2094
2095
  type: "button",
2095
2096
  size: "sm",
@@ -2119,9 +2120,9 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2119
2120
  )) })
2120
2121
  ] });
2121
2122
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2122
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.ManagementPageLayout, { hero, content, mobileAction }),
2123
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
2123
2124
  /* @__PURE__ */ jsxRuntime.jsx(
2124
- chunkGCYYGSHU_js.GlassModal,
2125
+ chunkR4EKPXX3_js.GlassModal,
2125
2126
  {
2126
2127
  open: createOpen,
2127
2128
  onClose: () => setCreateOpen(false),
@@ -2139,16 +2140,16 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2139
2140
  onCreate({ name, value, secretType, description });
2140
2141
  setCreateOpen(false);
2141
2142
  },
2142
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGCYYGSHU_js.FormGrid, { children: [
2143
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
2144
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
2145
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
2146
- /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
2143
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
2144
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
2145
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
2146
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
2147
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
2147
2148
  ] })
2148
2149
  }
2149
2150
  ),
2150
2151
  /* @__PURE__ */ jsxRuntime.jsx(
2151
- chunkGCYYGSHU_js.GlassModal,
2152
+ chunkR4EKPXX3_js.GlassModal,
2152
2153
  {
2153
2154
  open: rotateFor !== null,
2154
2155
  onClose: () => setRotateFor(null),
@@ -2163,45 +2164,703 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2163
2164
  onRotate(rotateFor, value);
2164
2165
  setRotateFor(null);
2165
2166
  },
2166
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGCYYGSHU_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
2167
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
2168
+ }
2169
+ )
2170
+ ] });
2171
+ }
2172
+ var LOCALE_OPTIONS2 = [
2173
+ { value: "en", label: "English" },
2174
+ { value: "pt-BR", label: "Portugu\xEAs (Brasil)" },
2175
+ { value: "es", label: "Espa\xF1ol" },
2176
+ { value: "fr", label: "Fran\xE7ais" },
2177
+ { value: "de", label: "Deutsch" },
2178
+ { value: "it", label: "Italiano" }
2179
+ ];
2180
+ function AgentsWorkspacePageView({
2181
+ labels,
2182
+ agents,
2183
+ models,
2184
+ tools,
2185
+ connections,
2186
+ loading,
2187
+ promptsByAgent = {},
2188
+ onSelectAgent,
2189
+ onCreateAgent,
2190
+ onUpdateAgent,
2191
+ onDeleteAgent,
2192
+ onCreatePrompt,
2193
+ onActivatePrompt,
2194
+ onAttachTool,
2195
+ onDetachTool,
2196
+ onUpdateModel
2197
+ }) {
2198
+ const [searchTerm, setSearchTerm] = react.useState("");
2199
+ const [createOpen, setCreateOpen] = react.useState(false);
2200
+ const [selectedId, setSelectedId] = react.useState(null);
2201
+ react.useEffect(() => {
2202
+ if (!selectedId && agents.length > 0) {
2203
+ const first = String(agents[0].agentId ?? agents[0].id ?? "");
2204
+ if (first) {
2205
+ setSelectedId(first);
2206
+ onSelectAgent?.(first);
2207
+ }
2208
+ }
2209
+ }, [agents, selectedId, onSelectAgent]);
2210
+ const filteredAgents = react.useMemo(() => {
2211
+ const term = searchTerm.trim().toLowerCase();
2212
+ if (!term) return agents;
2213
+ return agents.filter((a) => String(a.name ?? "").toLowerCase().includes(term));
2214
+ }, [agents, searchTerm]);
2215
+ const selectedAgent = react.useMemo(() => {
2216
+ if (!selectedId) return null;
2217
+ return agents.find((a) => String(a.agentId ?? a.id ?? "") === selectedId) ?? null;
2218
+ }, [agents, selectedId]);
2219
+ const isEmpty = agents.length === 0;
2220
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
2221
+ chunkR4EKPXX3_js.HeroSection,
2222
+ {
2223
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
2224
+ label: labels.title,
2225
+ title: labels.title,
2226
+ subtitle: labels.subtitle,
2227
+ gradient: "from-violet-500 to-indigo-700",
2228
+ actions: /* @__PURE__ */ jsxRuntime.jsx(
2229
+ chunkR4EKPXX3_js.CreateActionButton,
2230
+ {
2231
+ mode: "desktop",
2232
+ label: labels.addAgent,
2233
+ onClick: () => setCreateOpen(true),
2234
+ accent: "violet"
2235
+ }
2236
+ )
2237
+ }
2238
+ );
2239
+ const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
2240
+ chunkR4EKPXX3_js.CreateActionButton,
2241
+ {
2242
+ mode: "mobile",
2243
+ label: labels.addAgent,
2244
+ onClick: () => setCreateOpen(true),
2245
+ accent: "violet"
2246
+ }
2247
+ );
2248
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
2249
+ chunkR4EKPXX3_js.PageEmptyState,
2250
+ {
2251
+ title: labels.empty,
2252
+ message: labels.emptyMessage,
2253
+ iconName: "folder-open"
2254
+ }
2255
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2256
+ /* @__PURE__ */ jsxRuntime.jsx(
2257
+ chunkR4EKPXX3_js.SearchBar,
2258
+ {
2259
+ searchTerm,
2260
+ onSearchChange: setSearchTerm,
2261
+ placeholder: labels.searchPlaceholder
2262
+ }
2263
+ ),
2264
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
2265
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
2266
+ const id = String(agent.agentId ?? agent.id ?? "");
2267
+ const active = id === selectedId;
2268
+ const initials = deriveInitials(String(agent.name ?? id));
2269
+ const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
2270
+ return /* @__PURE__ */ jsxRuntime.jsx(
2271
+ chunkR4EKPXX3_js.ListCardItem,
2272
+ {
2273
+ leading: /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.Avatar, { tone: active ? "violet" : "slate", initials }),
2274
+ trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: "emerald", children: [
2275
+ "v",
2276
+ agent.activePromptVersion
2277
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "zinc", children: "draft" }),
2278
+ pressable: true,
2279
+ onPress: () => {
2280
+ setSelectedId(id);
2281
+ onSelectAgent?.(id);
2282
+ },
2283
+ className: active ? "bg-violet-500/5 dark:bg-violet-400/10" : "",
2284
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2285
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: String(agent.name ?? id) }),
2286
+ modelName && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: modelName })
2287
+ ] })
2288
+ },
2289
+ id
2290
+ );
2291
+ }) }) }),
2292
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: selectedAgent ? /* @__PURE__ */ jsxRuntime.jsx(
2293
+ AgentDetail,
2294
+ {
2295
+ agent: selectedAgent,
2296
+ labels,
2297
+ models,
2298
+ tools,
2299
+ connections,
2300
+ prompts: promptsByAgent[String(selectedAgent.agentId ?? selectedAgent.id ?? "")] ?? [],
2301
+ onUpdateAgent,
2302
+ onDeleteAgent,
2303
+ onCreatePrompt,
2304
+ onActivatePrompt,
2305
+ onAttachTool,
2306
+ onDetachTool,
2307
+ onUpdateModel,
2308
+ onCleared: () => {
2309
+ setSelectedId(null);
2310
+ onSelectAgent?.(null);
2311
+ }
2312
+ },
2313
+ String(selectedAgent.agentId ?? selectedAgent.id ?? "")
2314
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2315
+ chunkR4EKPXX3_js.SectionCard,
2316
+ {
2317
+ header: {
2318
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
2319
+ title: labels.noSelection,
2320
+ subtitle: labels.noSelectionMessage
2321
+ },
2322
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2323
+ chunkR4EKPXX3_js.PageEmptyState,
2324
+ {
2325
+ title: labels.noSelection,
2326
+ message: labels.noSelectionMessage,
2327
+ iconName: "folder-open"
2328
+ }
2329
+ )
2330
+ }
2331
+ ) })
2332
+ ] })
2333
+ ] });
2334
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2335
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ManagementPageLayout, { hero, content, mobileAction }),
2336
+ createOpen && /* @__PURE__ */ jsxRuntime.jsx(
2337
+ CreateAgentDialog,
2338
+ {
2339
+ labels,
2340
+ models,
2341
+ onClose: () => setCreateOpen(false),
2342
+ onSubmit: async (input) => {
2343
+ await onCreateAgent(input);
2344
+ setCreateOpen(false);
2345
+ }
2346
+ }
2347
+ )
2348
+ ] });
2349
+ }
2350
+ function AgentDetail({
2351
+ agent,
2352
+ labels,
2353
+ models,
2354
+ tools,
2355
+ connections,
2356
+ prompts,
2357
+ onUpdateAgent,
2358
+ onDeleteAgent,
2359
+ onCreatePrompt,
2360
+ onActivatePrompt,
2361
+ onAttachTool,
2362
+ onDetachTool,
2363
+ onUpdateModel,
2364
+ onCleared
2365
+ }) {
2366
+ const agentId = String(agent.agentId ?? agent.id ?? "");
2367
+ return /* @__PURE__ */ jsxRuntime.jsx(
2368
+ chunkR4EKPXX3_js.SectionCard,
2369
+ {
2370
+ header: {
2371
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
2372
+ title: String(agent.name ?? agentId),
2373
+ subtitle: String(agent.description ?? "")
2374
+ },
2375
+ actions: /* @__PURE__ */ jsxRuntime.jsxs(
2376
+ chunkBHOT22QL_js.Button,
2377
+ {
2378
+ type: "button",
2379
+ size: "sm",
2380
+ color: "rose",
2381
+ onClick: async () => {
2382
+ if (window.confirm(labels.deleteConfirm)) {
2383
+ await onDeleteAgent(agentId);
2384
+ onCleared();
2385
+ }
2386
+ },
2387
+ children: [
2388
+ /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "h-4 w-4" }),
2389
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.deleteAgent })
2390
+ ]
2391
+ }
2392
+ ),
2393
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.Tabs, { defaultValue: "general", className: "w-full", children: [
2394
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.TabsList, { className: "bg-white/40 dark:bg-white/[0.06]", children: [
2395
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsTrigger, { value: "general", children: labels.generalTab }),
2396
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsTrigger, { value: "prompt", children: labels.promptTab }),
2397
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsTrigger, { value: "tools", children: labels.toolsTab }),
2398
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsTrigger, { value: "model", children: labels.modelTab })
2399
+ ] }),
2400
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsContent, { value: "general", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralTab, { agent, labels, onSubmit: (input) => onUpdateAgent(agentId, input) }) }),
2401
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsContent, { value: "prompt", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2402
+ PromptTab,
2403
+ {
2404
+ agent,
2405
+ labels,
2406
+ prompts,
2407
+ onCreate: (input) => onCreatePrompt(agentId, input),
2408
+ onActivate: (promptId) => onActivatePrompt(agentId, promptId)
2409
+ }
2410
+ ) }),
2411
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsContent, { value: "tools", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2412
+ ToolsTab,
2413
+ {
2414
+ agent,
2415
+ labels,
2416
+ tools,
2417
+ onAttach: (toolId) => onAttachTool(agentId, toolId),
2418
+ onDetach: (toolId) => onDetachTool(agentId, toolId)
2419
+ }
2420
+ ) }),
2421
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.TabsContent, { value: "model", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2422
+ ModelTab,
2423
+ {
2424
+ agent,
2425
+ labels,
2426
+ models,
2427
+ connections,
2428
+ onSubmit: (modelId, connectionId) => onUpdateModel(agentId, modelId, connectionId)
2429
+ }
2430
+ ) })
2431
+ ] })
2432
+ }
2433
+ );
2434
+ }
2435
+ function GeneralTab({
2436
+ agent,
2437
+ labels,
2438
+ onSubmit
2439
+ }) {
2440
+ const [submitting, setSubmitting] = react.useState(false);
2441
+ const initial = {
2442
+ agentId: String(agent.agentId ?? agent.id ?? ""),
2443
+ name: String(agent.name ?? ""),
2444
+ modelId: String(agent.modelId ?? ""),
2445
+ systemPrompt: String(agent.systemPrompt ?? ""),
2446
+ maxTokens: Number(agent.maxTokens ?? 2048),
2447
+ temperature: Number(agent.temperature ?? 0.2)
2448
+ };
2449
+ const initialDescription = String(agent.description ?? "");
2450
+ const initialRole = String(agent.role ?? "");
2451
+ const initialStatus = String(agent.status ?? "draft");
2452
+ return /* @__PURE__ */ jsxRuntime.jsx(
2453
+ chunkR4EKPXX3_js.SectionCard,
2454
+ {
2455
+ variant: "glass",
2456
+ header: {
2457
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
2458
+ title: labels.generalSection
2459
+ },
2460
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2461
+ "form",
2462
+ {
2463
+ onSubmit: async (event) => {
2464
+ event.preventDefault();
2465
+ setSubmitting(true);
2466
+ try {
2467
+ const form = new FormData(event.currentTarget);
2468
+ await onSubmit({
2469
+ agentId: initial.agentId,
2470
+ name: String(form.get("name") ?? "").trim() || initial.name,
2471
+ modelId: String(form.get("modelId") ?? initial.modelId),
2472
+ systemPrompt: initial.systemPrompt,
2473
+ maxTokens: Number(form.get("maxTokens") ?? initial.maxTokens),
2474
+ temperature: Number(form.get("temperature") ?? initial.temperature)
2475
+ });
2476
+ } finally {
2477
+ setSubmitting(false);
2478
+ }
2479
+ },
2480
+ className: "space-y-4",
2481
+ children: [
2482
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
2483
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name, required: true }),
2484
+ /* @__PURE__ */ jsxRuntime.jsx(
2485
+ chunkR4EKPXX3_js.FormSelect,
2486
+ {
2487
+ name: "status",
2488
+ label: labels.status,
2489
+ defaultValue: initialStatus,
2490
+ options: [
2491
+ { value: "draft", label: labels.statusDraft },
2492
+ { value: "active", label: labels.statusActive },
2493
+ { value: "archived", label: labels.statusArchived }
2494
+ ]
2495
+ }
2496
+ ),
2497
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "role", label: labels.role, placeholder: labels.rolePlaceholder, defaultValue: initialRole }),
2498
+ /* @__PURE__ */ jsxRuntime.jsx(
2499
+ chunkR4EKPXX3_js.FormInput,
2500
+ {
2501
+ name: "maxTokens",
2502
+ label: labels.maxTokens,
2503
+ type: "number",
2504
+ defaultValue: String(initial.maxTokens)
2505
+ }
2506
+ ),
2507
+ /* @__PURE__ */ jsxRuntime.jsx(
2508
+ chunkR4EKPXX3_js.FormInput,
2509
+ {
2510
+ name: "temperature",
2511
+ label: labels.temperature,
2512
+ type: "number",
2513
+ step: 0.1,
2514
+ min: 0,
2515
+ max: 2,
2516
+ defaultValue: String(initial.temperature)
2517
+ }
2518
+ )
2519
+ ] }),
2520
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "description", label: labels.description, defaultValue: initialDescription, rows: 3 }),
2521
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", color: "indigo", disabled: submitting, children: submitting ? labels.saving : labels.save }) })
2522
+ ]
2523
+ }
2524
+ )
2525
+ }
2526
+ );
2527
+ }
2528
+ function PromptTab({
2529
+ agent,
2530
+ labels,
2531
+ prompts,
2532
+ onCreate,
2533
+ onActivate
2534
+ }) {
2535
+ const [addOpen, setAddOpen] = react.useState(false);
2536
+ const agentId = String(agent.agentId ?? agent.id ?? "");
2537
+ const currentSystem = String(agent.systemPrompt ?? "");
2538
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2539
+ /* @__PURE__ */ jsxRuntime.jsx(
2540
+ chunkR4EKPXX3_js.SectionCard,
2541
+ {
2542
+ variant: "glass",
2543
+ header: {
2544
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-4 w-4" }),
2545
+ title: labels.promptSection,
2546
+ subtitle: labels.promptCurrent
2547
+ },
2548
+ children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "whitespace-pre-wrap rounded-lg border border-slate-200/70 bg-slate-50/60 p-3 text-xs text-slate-700 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-200", children: currentSystem || "\u2014" })
2549
+ }
2550
+ ),
2551
+ /* @__PURE__ */ jsxRuntime.jsx(
2552
+ chunkR4EKPXX3_js.SectionCard,
2553
+ {
2554
+ variant: "glass",
2555
+ header: {
2556
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-4 w-4" }),
2557
+ title: labels.promptVersions
2558
+ },
2559
+ actions: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setAddOpen(true), children: [
2560
+ /* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-4 w-4" }),
2561
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.addPrompt })
2562
+ ] }),
2563
+ children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ListCard, { children: prompts.map((prompt) => {
2564
+ const id = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
2565
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2566
+ chunkR4EKPXX3_js.ListCardItem,
2567
+ {
2568
+ leading: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: prompt.isActive ? "emerald" : "zinc", children: [
2569
+ "v",
2570
+ prompt.version
2571
+ ] }),
2572
+ trailing: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "emerald", children: labels.activated }) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(id), children: labels.activate }),
2573
+ children: [
2574
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-slate-700 dark:text-slate-200", children: prompt.locale }),
2575
+ prompt.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-2 text-xs text-slate-500 dark:text-slate-400", children: prompt.prompt })
2576
+ ]
2577
+ },
2578
+ id
2579
+ );
2580
+ }) })
2581
+ }
2582
+ ),
2583
+ addOpen && /* @__PURE__ */ jsxRuntime.jsx(
2584
+ chunkR4EKPXX3_js.GlassModal,
2585
+ {
2586
+ open: true,
2587
+ onClose: () => setAddOpen(false),
2588
+ title: labels.addPrompt,
2589
+ maxWidth: "2xl",
2590
+ showFormFooter: true,
2591
+ submitLabel: labels.save,
2592
+ onSubmit: async (event) => {
2593
+ const form = new FormData(event.currentTarget);
2594
+ await onCreate({
2595
+ agentId,
2596
+ locale: String(form.get("locale") ?? "en"),
2597
+ prompt: String(form.get("prompt") ?? "").trim(),
2598
+ systemPrompt: String(form.get("systemPrompt") ?? "").trim() || void 0,
2599
+ userTemplate: String(form.get("userTemplate") ?? "").trim() || void 0,
2600
+ reason: String(form.get("reason") ?? "").trim() || void 0,
2601
+ isActive: String(form.get("isActive") ?? "true") === "true"
2602
+ });
2603
+ setAddOpen(false);
2604
+ },
2605
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
2606
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormSelect, { name: "locale", label: labels.promptLocale, options: LOCALE_OPTIONS2, defaultValue: "en" }),
2607
+ /* @__PURE__ */ jsxRuntime.jsx(
2608
+ chunkR4EKPXX3_js.FormSelect,
2609
+ {
2610
+ name: "isActive",
2611
+ label: labels.promptIsActive,
2612
+ options: [
2613
+ { value: "true", label: labels.promptIsActive },
2614
+ { value: "false", label: "\u2014" }
2615
+ ],
2616
+ defaultValue: "true"
2617
+ }
2618
+ ),
2619
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "reason", label: labels.promptReason }),
2620
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "systemPrompt", label: labels.promptSystemPrompt, rows: 3 }),
2621
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "userTemplate", label: labels.promptUserTemplate, rows: 3 }),
2622
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormTextarea, { name: "prompt", label: labels.promptText, rows: 6, required: true })
2623
+ ] })
2167
2624
  }
2168
2625
  )
2169
2626
  ] });
2170
2627
  }
2628
+ function ToolsTab({
2629
+ agent,
2630
+ labels,
2631
+ tools,
2632
+ onAttach,
2633
+ onDetach
2634
+ }) {
2635
+ const raw = agent;
2636
+ const attached = react.useMemo(() => {
2637
+ const ids = raw.enabledToolIds ?? raw.toolIds;
2638
+ return Array.isArray(ids) ? ids.filter((id) => typeof id === "string") : [];
2639
+ }, [raw]);
2640
+ const attachedSet = react.useMemo(() => new Set(attached), [attached]);
2641
+ const attachedTools = tools.filter((tool) => attachedSet.has(tool.agentToolId));
2642
+ const availableTools = tools.filter((tool) => !attachedSet.has(tool.agentToolId));
2643
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2644
+ /* @__PURE__ */ jsxRuntime.jsx(
2645
+ chunkR4EKPXX3_js.SectionCard,
2646
+ {
2647
+ variant: "glass",
2648
+ header: {
2649
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
2650
+ title: labels.toolsAttached
2651
+ },
2652
+ children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ListCard, { children: attachedTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
2653
+ chunkR4EKPXX3_js.ListCardItem,
2654
+ {
2655
+ leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
2656
+ trailing: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onDetach(tool.agentToolId), children: labels.detachTool }),
2657
+ children: [
2658
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-slate-700 dark:text-slate-200", children: tool.name }),
2659
+ tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 line-clamp-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
2660
+ ]
2661
+ },
2662
+ tool.agentToolId
2663
+ )) })
2664
+ }
2665
+ ),
2666
+ /* @__PURE__ */ jsxRuntime.jsx(
2667
+ chunkR4EKPXX3_js.SectionCard,
2668
+ {
2669
+ variant: "glass",
2670
+ header: {
2671
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
2672
+ title: labels.toolsAvailable
2673
+ },
2674
+ children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.ListCard, { children: availableTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
2675
+ chunkR4EKPXX3_js.ListCardItem,
2676
+ {
2677
+ leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-slate-500/10 text-slate-600 dark:bg-slate-500/20 dark:text-slate-300", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
2678
+ trailing: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "indigo", onClick: () => onAttach(tool.agentToolId), children: [
2679
+ /* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-4 w-4" }),
2680
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.attachTool })
2681
+ ] }),
2682
+ children: [
2683
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-slate-700 dark:text-slate-200", children: tool.name }),
2684
+ tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 line-clamp-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
2685
+ ]
2686
+ },
2687
+ tool.agentToolId
2688
+ )) })
2689
+ }
2690
+ )
2691
+ ] });
2692
+ }
2693
+ function ModelTab({
2694
+ agent,
2695
+ labels,
2696
+ models,
2697
+ connections,
2698
+ onSubmit
2699
+ }) {
2700
+ const initialModelId = String(agent.modelId ?? "");
2701
+ const initialConnectionId = String(agent.connectionId ?? "");
2702
+ const [modelId, setModelId] = react.useState(initialModelId);
2703
+ const [connectionId, setConnectionId] = react.useState(initialConnectionId);
2704
+ const [submitting, setSubmitting] = react.useState(false);
2705
+ const selectedModel = models.find((m) => m.id === modelId) ?? null;
2706
+ const matchingConnections = react.useMemo(() => {
2707
+ if (!selectedModel) return connections;
2708
+ const slug = selectedModel.provider;
2709
+ if (!slug) return connections;
2710
+ const matches = connections.filter(
2711
+ (c) => (c.providerSlug ?? "") === slug || (c.providerSlug ?? "").startsWith(String(slug))
2712
+ );
2713
+ return matches.length > 0 ? matches : connections;
2714
+ }, [selectedModel, connections]);
2715
+ return /* @__PURE__ */ jsxRuntime.jsx(
2716
+ chunkR4EKPXX3_js.SectionCard,
2717
+ {
2718
+ variant: "glass",
2719
+ header: {
2720
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-4 w-4" }),
2721
+ title: labels.modelSection
2722
+ },
2723
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2724
+ "form",
2725
+ {
2726
+ onSubmit: async (event) => {
2727
+ event.preventDefault();
2728
+ setSubmitting(true);
2729
+ try {
2730
+ await onSubmit(modelId, connectionId);
2731
+ } finally {
2732
+ setSubmitting(false);
2733
+ }
2734
+ },
2735
+ className: "space-y-4",
2736
+ children: [
2737
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
2738
+ /* @__PURE__ */ jsxRuntime.jsx(
2739
+ chunkR4EKPXX3_js.FormSelect,
2740
+ {
2741
+ label: labels.model,
2742
+ value: modelId,
2743
+ onValueChange: setModelId,
2744
+ options: models.length > 0 ? models.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` })) : [{ value: "", label: labels.modelEmpty }]
2745
+ }
2746
+ ),
2747
+ /* @__PURE__ */ jsxRuntime.jsx(
2748
+ chunkR4EKPXX3_js.FormSelect,
2749
+ {
2750
+ label: labels.connection,
2751
+ value: connectionId,
2752
+ onValueChange: setConnectionId,
2753
+ options: matchingConnections.length > 0 ? matchingConnections.map((c) => ({
2754
+ value: c.id,
2755
+ label: `${c.name}${c.providerSlug ? " \xB7 " + c.providerSlug : ""}`
2756
+ })) : [{ value: "", label: labels.connectionEmpty }],
2757
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-4 w-4" })
2758
+ }
2759
+ )
2760
+ ] }),
2761
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", color: "indigo", disabled: submitting || !modelId, children: submitting ? labels.saving : labels.save }) })
2762
+ ]
2763
+ }
2764
+ )
2765
+ }
2766
+ );
2767
+ }
2768
+ function CreateAgentDialog({
2769
+ labels,
2770
+ models,
2771
+ onClose,
2772
+ onSubmit
2773
+ }) {
2774
+ const modelOptions = models.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
2775
+ return /* @__PURE__ */ jsxRuntime.jsx(
2776
+ chunkR4EKPXX3_js.GlassModal,
2777
+ {
2778
+ open: true,
2779
+ onClose,
2780
+ title: labels.createAgentTitle,
2781
+ maxWidth: "lg",
2782
+ showFormFooter: true,
2783
+ submitLabel: labels.save,
2784
+ onSubmit: async (event) => {
2785
+ const form = new FormData(event.currentTarget);
2786
+ await onSubmit({
2787
+ name: String(form.get("name") ?? "").trim(),
2788
+ modelId: String(form.get("modelId") ?? modelOptions[0]?.value ?? ""),
2789
+ systemPrompt: "",
2790
+ maxTokens: Number(form.get("maxTokens") ?? 2048),
2791
+ temperature: Number(form.get("temperature") ?? 0.2)
2792
+ });
2793
+ },
2794
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkR4EKPXX3_js.FormGrid, { children: [
2795
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "name", label: labels.name, required: true }),
2796
+ /* @__PURE__ */ jsxRuntime.jsx(
2797
+ chunkR4EKPXX3_js.FormSelect,
2798
+ {
2799
+ name: "modelId",
2800
+ label: labels.model,
2801
+ options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }],
2802
+ defaultValue: modelOptions[0]?.value ?? ""
2803
+ }
2804
+ ),
2805
+ /* @__PURE__ */ jsxRuntime.jsx(chunkR4EKPXX3_js.FormInput, { name: "maxTokens", label: labels.maxTokens, type: "number", defaultValue: "2048" }),
2806
+ /* @__PURE__ */ jsxRuntime.jsx(
2807
+ chunkR4EKPXX3_js.FormInput,
2808
+ {
2809
+ name: "temperature",
2810
+ label: labels.temperature,
2811
+ type: "number",
2812
+ step: 0.1,
2813
+ min: 0,
2814
+ max: 2,
2815
+ defaultValue: "0.2"
2816
+ }
2817
+ )
2818
+ ] })
2819
+ }
2820
+ );
2821
+ }
2822
+ function deriveInitials(name) {
2823
+ const trimmed = name.trim();
2824
+ if (!trimmed) return "?";
2825
+ const parts = trimmed.split(/\s+/);
2826
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
2827
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
2828
+ }
2171
2829
 
2172
2830
  Object.defineProperty(exports, "RolesPageView", {
2173
2831
  enumerable: true,
2174
- get: function () { return chunkMUOTTGCX_js.RolesPageView; }
2832
+ get: function () { return chunkUDYEUTJC_js.RolesPageView; }
2175
2833
  });
2176
2834
  Object.defineProperty(exports, "UsersPageView", {
2177
2835
  enumerable: true,
2178
- get: function () { return chunkMUOTTGCX_js.UsersPageView; }
2836
+ get: function () { return chunkUDYEUTJC_js.UsersPageView; }
2179
2837
  });
2180
2838
  Object.defineProperty(exports, "DIALECT_CATEGORIES", {
2181
2839
  enumerable: true,
2182
- get: function () { return chunkLVK7VXW7_js.DIALECT_CATEGORIES; }
2840
+ get: function () { return chunkDMPBNWJB_js.DIALECT_CATEGORIES; }
2183
2841
  });
2184
2842
  Object.defineProperty(exports, "DatasourceFormModal", {
2185
2843
  enumerable: true,
2186
- get: function () { return chunkLVK7VXW7_js.DatasourceFormModal; }
2844
+ get: function () { return chunkDMPBNWJB_js.DatasourceFormModal; }
2187
2845
  });
2188
2846
  Object.defineProperty(exports, "DatasourceModal", {
2189
2847
  enumerable: true,
2190
- get: function () { return chunkLVK7VXW7_js.DatasourceModal; }
2848
+ get: function () { return chunkDMPBNWJB_js.DatasourceModal; }
2191
2849
  });
2192
2850
  Object.defineProperty(exports, "findCategory", {
2193
2851
  enumerable: true,
2194
- get: function () { return chunkLVK7VXW7_js.findCategory; }
2852
+ get: function () { return chunkDMPBNWJB_js.findCategory; }
2195
2853
  });
2196
2854
  Object.defineProperty(exports, "findDialect", {
2197
2855
  enumerable: true,
2198
- get: function () { return chunkLVK7VXW7_js.findDialect; }
2856
+ get: function () { return chunkDMPBNWJB_js.findDialect; }
2199
2857
  });
2200
2858
  exports.AgentsConfigPageView = AgentsConfigPageView;
2201
2859
  exports.AgentsIndexPageView = AgentsIndexPageView;
2202
2860
  exports.AgentsModelsPageView = AgentsModelsPageView;
2203
2861
  exports.AgentsPromptsPageView = AgentsPromptsPageView;
2204
2862
  exports.AgentsToolDefinitionsPageView = AgentsToolDefinitionsPageView;
2863
+ exports.AgentsWorkspacePageView = AgentsWorkspacePageView;
2205
2864
  exports.ConnectionsPageView = ConnectionsPageView;
2206
2865
  exports.CredentialsPageView = CredentialsPageView;
2207
2866
  exports.DashboardPageView = DashboardPageView;