@datatechsolutions/ui 2.11.83 → 2.11.84

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 (101) hide show
  1. package/dist/astrlabe/index.d.mts +3 -52
  2. package/dist/astrlabe/index.d.ts +3 -52
  3. package/dist/astrlabe/index.js +107 -107
  4. package/dist/astrlabe/index.mjs +4 -4
  5. package/dist/astrlabe/workflow-canvas.js +4 -4
  6. package/dist/astrlabe/workflow-canvas.mjs +3 -3
  7. package/dist/chunk-3T2WGL47.js +44 -0
  8. package/dist/chunk-3T2WGL47.js.map +1 -0
  9. package/dist/{chunk-UVGMKHWH.mjs → chunk-63AL2RN5.mjs} +4 -4
  10. package/dist/{chunk-UVGMKHWH.mjs.map → chunk-63AL2RN5.mjs.map} +1 -1
  11. package/dist/chunk-64G2HBRQ.mjs +481 -0
  12. package/dist/chunk-64G2HBRQ.mjs.map +1 -0
  13. package/dist/{chunk-J3OYJ44D.mjs → chunk-BH2AU3LG.mjs} +3 -3
  14. package/dist/{chunk-J3OYJ44D.mjs.map → chunk-BH2AU3LG.mjs.map} +1 -1
  15. package/dist/chunk-CCRBT7TA.mjs +941 -0
  16. package/dist/chunk-CCRBT7TA.mjs.map +1 -0
  17. package/dist/chunk-CHLJUSXX.mjs +128 -0
  18. package/dist/chunk-CHLJUSXX.mjs.map +1 -0
  19. package/dist/chunk-CXIQWPBH.js +214 -0
  20. package/dist/chunk-CXIQWPBH.js.map +1 -0
  21. package/dist/chunk-EDE36MKE.mjs +412 -0
  22. package/dist/chunk-EDE36MKE.mjs.map +1 -0
  23. package/dist/{chunk-M7P2TQ6X.js → chunk-EFREXNZB.js} +64 -64
  24. package/dist/{chunk-M7P2TQ6X.js.map → chunk-EFREXNZB.js.map} +1 -1
  25. package/dist/chunk-FAGDZEKM.js +23 -0
  26. package/dist/chunk-FAGDZEKM.js.map +1 -0
  27. package/dist/{chunk-TUEYBNWL.js → chunk-GV6WJCEB.js} +3 -3
  28. package/dist/{chunk-TUEYBNWL.js.map → chunk-GV6WJCEB.js.map} +1 -1
  29. package/dist/chunk-HU3EAHFO.mjs +20 -0
  30. package/dist/chunk-HU3EAHFO.mjs.map +1 -0
  31. package/dist/{chunk-LLFU42KC.mjs → chunk-I6WYV2AN.mjs} +3 -3
  32. package/dist/{chunk-LLFU42KC.mjs.map → chunk-I6WYV2AN.mjs.map} +1 -1
  33. package/dist/chunk-JJWFMKZY.js +132 -0
  34. package/dist/chunk-JJWFMKZY.js.map +1 -0
  35. package/dist/{chunk-JFWZHROG.js → chunk-L6FVIWAJ.js} +128 -128
  36. package/dist/{chunk-JFWZHROG.js.map → chunk-L6FVIWAJ.js.map} +1 -1
  37. package/dist/chunk-MNQEZL7B.mjs +210 -0
  38. package/dist/chunk-MNQEZL7B.mjs.map +1 -0
  39. package/dist/chunk-SGJ24J2Q.js +943 -0
  40. package/dist/chunk-SGJ24J2Q.js.map +1 -0
  41. package/dist/chunk-SW6TVAIJ.js +418 -0
  42. package/dist/chunk-SW6TVAIJ.js.map +1 -0
  43. package/dist/chunk-SYNVNTLJ.mjs +20 -0
  44. package/dist/chunk-SYNVNTLJ.mjs.map +1 -0
  45. package/dist/chunk-UQXVCVAN.mjs +41 -0
  46. package/dist/chunk-UQXVCVAN.mjs.map +1 -0
  47. package/dist/chunk-WGELLCOZ.js +22 -0
  48. package/dist/chunk-WGELLCOZ.js.map +1 -0
  49. package/dist/chunk-YXPHJ2BQ.js +541 -0
  50. package/dist/chunk-YXPHJ2BQ.js.map +1 -0
  51. package/dist/index.d.mts +3 -47
  52. package/dist/index.d.ts +3 -47
  53. package/dist/index.js +765 -765
  54. package/dist/index.mjs +2 -2
  55. package/dist/navigation-BiWVffAN.d.mts +49 -0
  56. package/dist/navigation-BiWVffAN.d.ts +49 -0
  57. package/dist/platform/agents-workspace.d.mts +19 -0
  58. package/dist/platform/agents-workspace.d.ts +19 -0
  59. package/dist/platform/agents-workspace.js +26 -0
  60. package/dist/platform/agents-workspace.js.map +1 -0
  61. package/dist/platform/agents-workspace.mjs +17 -0
  62. package/dist/platform/agents-workspace.mjs.map +1 -0
  63. package/dist/platform/app-shell.d.mts +58 -0
  64. package/dist/platform/app-shell.d.ts +58 -0
  65. package/dist/platform/app-shell.js +17 -0
  66. package/dist/platform/app-shell.js.map +1 -0
  67. package/dist/platform/app-shell.mjs +8 -0
  68. package/dist/platform/app-shell.mjs.map +1 -0
  69. package/dist/platform/index.d.mts +100 -3
  70. package/dist/platform/index.d.ts +100 -3
  71. package/dist/platform/index.js +499 -28
  72. package/dist/platform/index.js.map +1 -1
  73. package/dist/platform/index.mjs +472 -27
  74. package/dist/platform/index.mjs.map +1 -1
  75. package/dist/platform/pages/index.d.mts +243 -82
  76. package/dist/platform/pages/index.d.ts +243 -82
  77. package/dist/platform/pages/index.js +886 -614
  78. package/dist/platform/pages/index.js.map +1 -1
  79. package/dist/platform/pages/index.mjs +756 -511
  80. package/dist/platform/pages/index.mjs.map +1 -1
  81. package/dist/platform/utils/index.js +18 -56
  82. package/dist/platform/utils/index.js.map +1 -1
  83. package/dist/platform/utils/index.mjs +3 -53
  84. package/dist/platform/utils/index.mjs.map +1 -1
  85. package/dist/platform/workflow-api-client.d.mts +6 -0
  86. package/dist/platform/workflow-api-client.d.ts +6 -0
  87. package/dist/platform/workflow-api-client.js +246 -0
  88. package/dist/platform/workflow-api-client.js.map +1 -0
  89. package/dist/platform/workflow-api-client.mjs +5 -0
  90. package/dist/platform/workflow-api-client.mjs.map +1 -0
  91. package/dist/platform/workflow-canvas-shell.d.mts +18 -0
  92. package/dist/platform/workflow-canvas-shell.d.ts +18 -0
  93. package/dist/platform/workflow-canvas-shell.js +20 -0
  94. package/dist/platform/workflow-canvas-shell.js.map +1 -0
  95. package/dist/platform/workflow-canvas-shell.mjs +11 -0
  96. package/dist/platform/workflow-canvas-shell.mjs.map +1 -0
  97. package/dist/{rule-form-F5jBOeqk.d.mts → rule-form-BYJzyork.d.mts} +50 -1
  98. package/dist/{rule-form-F5jBOeqk.d.ts → rule-form-BYJzyork.d.ts} +50 -1
  99. package/dist/workflow-api-client-C8gPn_D1.d.mts +386 -0
  100. package/dist/workflow-api-client-Dy1Ph8W-.d.ts +386 -0
  101. package/package.json +21 -1
@@ -1,123 +1,26 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkJFWZHROG_js = require('../../chunk-JFWZHROG.js');
4
+ var chunk3T2WGL47_js = require('../../chunk-3T2WGL47.js');
5
+ var chunkCXIQWPBH_js = require('../../chunk-CXIQWPBH.js');
6
+ var chunkSW6TVAIJ_js = require('../../chunk-SW6TVAIJ.js');
7
+ var chunkL6FVIWAJ_js = require('../../chunk-L6FVIWAJ.js');
5
8
  require('../../chunk-55H6WZQP.js');
6
9
  require('../../chunk-5UU3RQRB.js');
7
- require('../../chunk-M7P2TQ6X.js');
8
- var chunkTUEYBNWL_js = require('../../chunk-TUEYBNWL.js');
9
- require('../../chunk-YXN2K77G.js');
10
- require('../../chunk-S7KHTUHA.js');
10
+ require('../../chunk-EFREXNZB.js');
11
+ var chunkGV6WJCEB_js = require('../../chunk-GV6WJCEB.js');
12
+ var chunkS7KHTUHA_js = require('../../chunk-S7KHTUHA.js');
11
13
  require('../../chunk-UZ3CMNUJ.js');
14
+ require('../../chunk-YXN2K77G.js');
12
15
  require('../../chunk-P4YYEM4B.js');
13
16
  require('../../chunk-C7BI5LQ6.js');
14
- var react = require('react');
15
17
  var outline = require('@heroicons/react/24/outline');
16
18
  var jsxRuntime = require('react/jsx-runtime');
19
+ var react = require('react');
17
20
 
18
- var ROLE_OPTIONS = [
19
- { value: "admin", label: "Admin" },
20
- { value: "manager", label: "Manager" },
21
- { value: "analyst", label: "Analyst" },
22
- { value: "viewer", label: "Viewer" }
23
- ];
24
- function UsersPageView({ labels, users, onCreateUser, onUpdateRole }) {
25
- const [createOpen, setCreateOpen] = react.useState(false);
26
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
27
- /* @__PURE__ */ jsxRuntime.jsx(
28
- chunkTUEYBNWL_js.HeroSection,
29
- {
30
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.UserGroupIcon, { className: "h-5 w-5" }),
31
- label: labels.title,
32
- title: labels.title,
33
- subtitle: labels.subtitle,
34
- gradient: "from-violet-500 to-indigo-600",
35
- toolbar: /* @__PURE__ */ jsxRuntime.jsx(
36
- chunkTUEYBNWL_js.CreateActionButton,
37
- {
38
- mode: "desktop",
39
- label: labels.create,
40
- onClick: () => setCreateOpen(true),
41
- accent: "violet"
42
- }
43
- )
44
- }
45
- ),
46
- /* @__PURE__ */ jsxRuntime.jsx(
47
- chunkTUEYBNWL_js.CreateActionButton,
48
- {
49
- mode: "mobile",
50
- label: labels.create,
51
- onClick: () => setCreateOpen(true),
52
- accent: "violet"
53
- }
54
- ),
55
- /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
56
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: labels.list }),
57
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: users.map((user) => /* @__PURE__ */ jsxRuntime.jsx(
58
- chunkTUEYBNWL_js.EntityCard,
59
- {
60
- accentGradient: "from-violet-500 to-indigo-700",
61
- 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.UserGroupIcon, { className: "h-6 w-6" }) }),
62
- title: user.name,
63
- subtitle: user.email,
64
- status: /* @__PURE__ */ jsxRuntime.jsx(
65
- "span",
66
- {
67
- className: `shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold ${user.active ? "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-300" : "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-300"}`,
68
- children: user.active ? labels.statusActive : labels.statusInactive
69
- }
70
- ),
71
- footer: /* @__PURE__ */ jsxRuntime.jsx(
72
- "form",
73
- {
74
- onSubmit: (event) => {
75
- event.preventDefault();
76
- const formData = new FormData(event.currentTarget);
77
- const role = String(formData.get("role") ?? "viewer");
78
- onUpdateRole({ email: user.email, role });
79
- },
80
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.InlineForm, { children: [
81
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormSelect, { name: "role", options: ROLE_OPTIONS, defaultValue: user.role }),
82
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "submit", outline: true, size: "sm", children: labels.save })
83
- ] })
84
- }
85
- )
86
- },
87
- user.email
88
- )) })
89
- ] }),
90
- /* @__PURE__ */ jsxRuntime.jsx(
91
- chunkTUEYBNWL_js.GlassModal,
92
- {
93
- open: createOpen,
94
- onClose: () => setCreateOpen(false),
95
- title: labels.create,
96
- maxWidth: "lg",
97
- showFormFooter: true,
98
- cancelLabel: labels.list,
99
- submitLabel: labels.add,
100
- onSubmit: (event) => {
101
- const formData = new FormData(event.currentTarget);
102
- const name = String(formData.get("name") ?? "").trim();
103
- const email = String(formData.get("email") ?? "").trim().toLowerCase();
104
- const role = String(formData.get("role") ?? "viewer");
105
- if (!name || !email) return;
106
- onCreateUser({ name, email, role });
107
- setCreateOpen(false);
108
- },
109
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
110
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "name", label: labels.name, placeholder: labels.userNamePlaceholder, required: true }),
111
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "email", label: labels.email, placeholder: labels.userEmailPlaceholder, required: true, type: "email" }),
112
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormSelect, { name: "role", label: labels.role, options: ROLE_OPTIONS })
113
- ] })
114
- }
115
- )
116
- ] });
117
- }
118
21
  function AgentsModelsPageView({ labels, models, loading }) {
119
22
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
120
- chunkTUEYBNWL_js.HeroSection,
23
+ chunkGV6WJCEB_js.HeroSection,
121
24
  {
122
25
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
123
26
  label: labels.title,
@@ -126,25 +29,25 @@ function AgentsModelsPageView({ labels, models, loading }) {
126
29
  gradient: "from-emerald-500 to-teal-700"
127
30
  }
128
31
  );
129
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.PageLoadingState, {}) : models.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_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: models.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
130
- chunkTUEYBNWL_js.EntityCard,
32
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : models.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: models.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
33
+ chunkGV6WJCEB_js.EntityCard,
131
34
  {
132
35
  accentGradient: "from-emerald-500 to-teal-700",
133
36
  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" }) }),
134
37
  title: model.name,
135
38
  subtitle: `${labels.provider}: ${model.provider}`,
136
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
39
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
137
40
  },
138
41
  model.id
139
42
  )) });
140
- return /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.ManagementPageLayout, { hero, content });
43
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content });
141
44
  }
142
45
  function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
143
46
  const [editing, setEditing] = react.useState(null);
144
47
  const [createOpen, setCreateOpen] = react.useState(false);
145
48
  const modelOptions = models.map((model) => ({ value: model.id, label: `${model.name} (${model.provider})` }));
146
49
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
147
- chunkTUEYBNWL_js.HeroSection,
50
+ chunkGV6WJCEB_js.HeroSection,
148
51
  {
149
52
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
150
53
  label: labels.title,
@@ -152,7 +55,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
152
55
  subtitle: labels.subtitle,
153
56
  gradient: "from-violet-500 to-indigo-700",
154
57
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
155
- chunkTUEYBNWL_js.CreateActionButton,
58
+ chunkGV6WJCEB_js.CreateActionButton,
156
59
  {
157
60
  mode: "desktop",
158
61
  label: labels.addAgent,
@@ -163,7 +66,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
163
66
  }
164
67
  );
165
68
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
166
- chunkTUEYBNWL_js.CreateActionButton,
69
+ chunkGV6WJCEB_js.CreateActionButton,
167
70
  {
168
71
  mode: "mobile",
169
72
  label: labels.addAgent,
@@ -171,23 +74,23 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
171
74
  accent: "violet"
172
75
  }
173
76
  );
174
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.PageLoadingState, {}) : agents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_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: agents.map((agent) => {
77
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : agents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: agents.map((agent) => {
175
78
  const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
176
79
  return /* @__PURE__ */ jsxRuntime.jsx(
177
- chunkTUEYBNWL_js.EntityCard,
80
+ chunkGV6WJCEB_js.EntityCard,
178
81
  {
179
82
  accentGradient: "from-violet-500 to-indigo-700",
180
83
  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" }) }),
181
84
  title: String(agent.name ?? ""),
182
85
  subtitle: String(modelRecord?.name ?? agent.modelId ?? ""),
183
- status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.Badge, { color: "emerald", children: [
86
+ status: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.Badge, { color: "emerald", children: [
184
87
  "v",
185
88
  agent.activePromptVersion
186
89
  ] }) : null,
187
90
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
188
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(agent), children: labels.edit }),
91
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(agent), children: labels.edit }),
189
92
  /* @__PURE__ */ jsxRuntime.jsx(
190
- chunkTUEYBNWL_js.Button,
93
+ chunkGV6WJCEB_js.Button,
191
94
  {
192
95
  type: "button",
193
96
  size: "sm",
@@ -211,7 +114,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
211
114
  );
212
115
  }) });
213
116
  const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
214
- chunkTUEYBNWL_js.GlassModal,
117
+ chunkGV6WJCEB_js.GlassModal,
215
118
  {
216
119
  open: true,
217
120
  onClose: () => {
@@ -234,18 +137,18 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
234
137
  outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
235
138
  });
236
139
  },
237
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
238
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
239
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
240
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
241
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
242
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
243
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
140
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
141
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
142
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
143
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
144
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
145
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
146
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
244
147
  ] })
245
148
  }
246
149
  );
247
150
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
248
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.ManagementPageLayout, { hero, content, mobileAction }),
151
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
249
152
  createOpen && renderForm({ title: labels.createTitle }, (input) => {
250
153
  onCreate(input);
251
154
  setCreateOpen(false);
@@ -294,7 +197,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
294
197
  return map;
295
198
  }, [agents]);
296
199
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
297
- chunkTUEYBNWL_js.HeroSection,
200
+ chunkGV6WJCEB_js.HeroSection,
298
201
  {
299
202
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
300
203
  label: labels.title,
@@ -302,7 +205,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
302
205
  subtitle: labels.subtitle,
303
206
  gradient: "from-sky-500 to-blue-700",
304
207
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
305
- chunkTUEYBNWL_js.CreateActionButton,
208
+ chunkGV6WJCEB_js.CreateActionButton,
306
209
  {
307
210
  mode: "desktop",
308
211
  label: labels.addPrompt,
@@ -313,7 +216,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
313
216
  }
314
217
  );
315
218
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
316
- chunkTUEYBNWL_js.CreateActionButton,
219
+ chunkGV6WJCEB_js.CreateActionButton,
317
220
  {
318
221
  mode: "mobile",
319
222
  label: labels.addPrompt,
@@ -321,21 +224,21 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
321
224
  accent: "sky"
322
225
  }
323
226
  );
324
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.PageLoadingState, {}) : prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_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: prompts.map((prompt) => {
227
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: prompts.map((prompt) => {
325
228
  const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
326
229
  const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
327
230
  return /* @__PURE__ */ jsxRuntime.jsx(
328
- chunkTUEYBNWL_js.EntityCard,
231
+ chunkGV6WJCEB_js.EntityCard,
329
232
  {
330
233
  accentGradient: "from-sky-500 to-blue-700",
331
234
  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" }) }),
332
235
  title: agentName,
333
236
  subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
334
- status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: "emerald", children: labels.isActive }) : null,
237
+ status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: "emerald", children: labels.isActive }) : null,
335
238
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
336
- !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
239
+ !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
337
240
  /* @__PURE__ */ jsxRuntime.jsx(
338
- chunkTUEYBNWL_js.Button,
241
+ chunkGV6WJCEB_js.Button,
339
242
  {
340
243
  type: "button",
341
244
  size: "sm",
@@ -353,9 +256,9 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
353
256
  );
354
257
  }) });
355
258
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
356
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.ManagementPageLayout, { hero, content, mobileAction }),
259
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
357
260
  /* @__PURE__ */ jsxRuntime.jsx(
358
- chunkTUEYBNWL_js.GlassModal,
261
+ chunkGV6WJCEB_js.GlassModal,
359
262
  {
360
263
  open: createOpen,
361
264
  onClose: () => setCreateOpen(false),
@@ -379,11 +282,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
379
282
  });
380
283
  setCreateOpen(false);
381
284
  },
382
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
383
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
384
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
285
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
286
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
287
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
385
288
  /* @__PURE__ */ jsxRuntime.jsx(
386
- chunkTUEYBNWL_js.FormSelect,
289
+ chunkGV6WJCEB_js.FormSelect,
387
290
  {
388
291
  name: "isActive",
389
292
  label: labels.isActive,
@@ -391,10 +294,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
391
294
  defaultValue: "true"
392
295
  }
393
296
  ),
394
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "reason", label: labels.reason }),
395
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
396
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
397
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
297
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "reason", label: labels.reason }),
298
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
299
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
300
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
398
301
  ] })
399
302
  }
400
303
  )
@@ -425,7 +328,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
425
328
  const [editing, setEditing] = react.useState(null);
426
329
  const [createOpen, setCreateOpen] = react.useState(false);
427
330
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
428
- chunkTUEYBNWL_js.HeroSection,
331
+ chunkGV6WJCEB_js.HeroSection,
429
332
  {
430
333
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
431
334
  label: labels.title,
@@ -433,7 +336,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
433
336
  subtitle: labels.subtitle,
434
337
  gradient: "from-amber-500 to-orange-700",
435
338
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
436
- chunkTUEYBNWL_js.CreateActionButton,
339
+ chunkGV6WJCEB_js.CreateActionButton,
437
340
  {
438
341
  mode: "desktop",
439
342
  label: labels.addTool,
@@ -444,7 +347,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
444
347
  }
445
348
  );
446
349
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
447
- chunkTUEYBNWL_js.CreateActionButton,
350
+ chunkGV6WJCEB_js.CreateActionButton,
448
351
  {
449
352
  mode: "mobile",
450
353
  label: labels.addTool,
@@ -452,18 +355,18 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
452
355
  accent: "amber"
453
356
  }
454
357
  );
455
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.PageLoadingState, {}) : tools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_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: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
456
- chunkTUEYBNWL_js.EntityCard,
358
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : tools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
359
+ chunkGV6WJCEB_js.EntityCard,
457
360
  {
458
361
  accentGradient: "from-amber-500 to-orange-700",
459
362
  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" }) }),
460
363
  title: tool.name,
461
364
  subtitle: toolTypeLabel(tool),
462
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
365
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
463
366
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
464
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
367
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
465
368
  /* @__PURE__ */ jsxRuntime.jsx(
466
- chunkTUEYBNWL_js.Button,
369
+ chunkGV6WJCEB_js.Button,
467
370
  {
468
371
  type: "button",
469
372
  size: "sm",
@@ -480,7 +383,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
480
383
  tool.agentToolId
481
384
  )) });
482
385
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
483
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.ManagementPageLayout, { hero, content, mobileAction }),
386
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
484
387
  createOpen && /* @__PURE__ */ jsxRuntime.jsx(
485
388
  ToolEditor,
486
389
  {
@@ -538,7 +441,7 @@ function ToolEditor({
538
441
  setValue((v) => ({ ...v, [key]: next }));
539
442
  };
540
443
  return /* @__PURE__ */ jsxRuntime.jsx(
541
- chunkTUEYBNWL_js.GlassModal,
444
+ chunkGV6WJCEB_js.GlassModal,
542
445
  {
543
446
  open: true,
544
447
  onClose,
@@ -551,9 +454,9 @@ function ToolEditor({
551
454
  handleSubmit();
552
455
  },
553
456
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
554
- /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
457
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
555
458
  /* @__PURE__ */ jsxRuntime.jsx(
556
- chunkTUEYBNWL_js.FormInput,
459
+ chunkGV6WJCEB_js.FormInput,
557
460
  {
558
461
  label: "Name",
559
462
  required: true,
@@ -563,7 +466,7 @@ function ToolEditor({
563
466
  }
564
467
  ),
565
468
  /* @__PURE__ */ jsxRuntime.jsx(
566
- chunkTUEYBNWL_js.FormSelect,
469
+ chunkGV6WJCEB_js.FormSelect,
567
470
  {
568
471
  label: "Tool type",
569
472
  value: value.toolType,
@@ -573,7 +476,7 @@ function ToolEditor({
573
476
  }
574
477
  ),
575
478
  /* @__PURE__ */ jsxRuntime.jsx(
576
- chunkTUEYBNWL_js.FormSelect,
479
+ chunkGV6WJCEB_js.FormSelect,
577
480
  {
578
481
  label: "Enabled",
579
482
  value: value.enabled ? "true" : "false",
@@ -582,7 +485,7 @@ function ToolEditor({
582
485
  }
583
486
  ),
584
487
  /* @__PURE__ */ jsxRuntime.jsx(
585
- chunkTUEYBNWL_js.FormInput,
488
+ chunkGV6WJCEB_js.FormInput,
586
489
  {
587
490
  label: "Icon (optional)",
588
491
  value: value.icon ?? "",
@@ -592,7 +495,7 @@ function ToolEditor({
592
495
  )
593
496
  ] }),
594
497
  /* @__PURE__ */ jsxRuntime.jsx(
595
- chunkTUEYBNWL_js.FormTextarea,
498
+ chunkGV6WJCEB_js.FormTextarea,
596
499
  {
597
500
  label: "Description",
598
501
  rows: 2,
@@ -640,7 +543,7 @@ function ParametersEditor({
640
543
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
641
544
  parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
642
545
  /* @__PURE__ */ jsxRuntime.jsx(
643
- chunkTUEYBNWL_js.FormInput,
546
+ chunkGV6WJCEB_js.FormInput,
644
547
  {
645
548
  label: "Name",
646
549
  value: param.name,
@@ -649,7 +552,7 @@ function ParametersEditor({
649
552
  }
650
553
  ),
651
554
  /* @__PURE__ */ jsxRuntime.jsx(
652
- chunkTUEYBNWL_js.FormSelect,
555
+ chunkGV6WJCEB_js.FormSelect,
653
556
  {
654
557
  label: "Type",
655
558
  value: param.type,
@@ -658,7 +561,7 @@ function ParametersEditor({
658
561
  }
659
562
  ),
660
563
  /* @__PURE__ */ jsxRuntime.jsx(
661
- chunkTUEYBNWL_js.FormInput,
564
+ chunkGV6WJCEB_js.FormInput,
662
565
  {
663
566
  label: "Description",
664
567
  value: param.description,
@@ -677,9 +580,9 @@ function ParametersEditor({
677
580
  ),
678
581
  "Required"
679
582
  ] }),
680
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
583
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
681
584
  ] }, index)),
682
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add parameter" })
585
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add parameter" })
683
586
  ] })
684
587
  ] });
685
588
  }
@@ -692,9 +595,9 @@ function HandlerConfigEditor({
692
595
  if (toolType === "http") {
693
596
  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: [
694
597
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
695
- /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
598
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
696
599
  /* @__PURE__ */ jsxRuntime.jsx(
697
- chunkTUEYBNWL_js.FormSelect,
600
+ chunkGV6WJCEB_js.FormSelect,
698
601
  {
699
602
  label: "Method",
700
603
  value: stringProp(config, "method", "GET"),
@@ -703,7 +606,7 @@ function HandlerConfigEditor({
703
606
  }
704
607
  ),
705
608
  /* @__PURE__ */ jsxRuntime.jsx(
706
- chunkTUEYBNWL_js.FormInput,
609
+ chunkGV6WJCEB_js.FormInput,
707
610
  {
708
611
  label: "URL template",
709
612
  value: stringProp(config, "url"),
@@ -713,7 +616,7 @@ function HandlerConfigEditor({
713
616
  )
714
617
  ] }),
715
618
  /* @__PURE__ */ jsxRuntime.jsx(
716
- chunkTUEYBNWL_js.FormTextarea,
619
+ chunkGV6WJCEB_js.FormTextarea,
717
620
  {
718
621
  label: "Headers (JSON)",
719
622
  rows: 3,
@@ -723,7 +626,7 @@ function HandlerConfigEditor({
723
626
  }
724
627
  ),
725
628
  /* @__PURE__ */ jsxRuntime.jsx(
726
- chunkTUEYBNWL_js.FormTextarea,
629
+ chunkGV6WJCEB_js.FormTextarea,
727
630
  {
728
631
  label: "Body template",
729
632
  rows: 3,
@@ -738,7 +641,7 @@ function HandlerConfigEditor({
738
641
  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: [
739
642
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
740
643
  /* @__PURE__ */ jsxRuntime.jsx(
741
- chunkTUEYBNWL_js.FormInput,
644
+ chunkGV6WJCEB_js.FormInput,
742
645
  {
743
646
  label: "Implementation key",
744
647
  value: stringProp(config, "implementationKey"),
@@ -752,9 +655,9 @@ function HandlerConfigEditor({
752
655
  if (toolType === "database_query") {
753
656
  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: [
754
657
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
755
- /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
658
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
756
659
  /* @__PURE__ */ jsxRuntime.jsx(
757
- chunkTUEYBNWL_js.FormInput,
660
+ chunkGV6WJCEB_js.FormInput,
758
661
  {
759
662
  label: "Datasource ID",
760
663
  value: stringProp(config, "datasourceId"),
@@ -763,7 +666,7 @@ function HandlerConfigEditor({
763
666
  }
764
667
  ),
765
668
  /* @__PURE__ */ jsxRuntime.jsx(
766
- chunkTUEYBNWL_js.FormInput,
669
+ chunkGV6WJCEB_js.FormInput,
767
670
  {
768
671
  label: "Max rows",
769
672
  type: "number",
@@ -773,7 +676,7 @@ function HandlerConfigEditor({
773
676
  )
774
677
  ] }),
775
678
  /* @__PURE__ */ jsxRuntime.jsx(
776
- chunkTUEYBNWL_js.FormTextarea,
679
+ chunkGV6WJCEB_js.FormTextarea,
777
680
  {
778
681
  label: "Query template",
779
682
  rows: 4,
@@ -789,7 +692,7 @@ function HandlerConfigEditor({
789
692
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
790
693
  /* @__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." }),
791
694
  /* @__PURE__ */ jsxRuntime.jsx(
792
- chunkTUEYBNWL_js.FormSelect,
695
+ chunkGV6WJCEB_js.FormSelect,
793
696
  {
794
697
  label: "Language",
795
698
  value: stringProp(config, "language", "javascript"),
@@ -801,7 +704,7 @@ function HandlerConfigEditor({
801
704
  }
802
705
  ),
803
706
  /* @__PURE__ */ jsxRuntime.jsx(
804
- chunkTUEYBNWL_js.FormTextarea,
707
+ chunkGV6WJCEB_js.FormTextarea,
805
708
  {
806
709
  label: "Code",
807
710
  rows: 6,
@@ -814,9 +717,9 @@ function HandlerConfigEditor({
814
717
  }
815
718
  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: [
816
719
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
817
- /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
720
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
818
721
  /* @__PURE__ */ jsxRuntime.jsx(
819
- chunkTUEYBNWL_js.FormInput,
722
+ chunkGV6WJCEB_js.FormInput,
820
723
  {
821
724
  label: "URL",
822
725
  value: stringProp(config, "url"),
@@ -824,7 +727,7 @@ function HandlerConfigEditor({
824
727
  }
825
728
  ),
826
729
  /* @__PURE__ */ jsxRuntime.jsx(
827
- chunkTUEYBNWL_js.FormSelect,
730
+ chunkGV6WJCEB_js.FormSelect,
828
731
  {
829
732
  label: "Auth",
830
733
  value: stringProp(config, "authType", "bearer"),
@@ -838,7 +741,7 @@ function HandlerConfigEditor({
838
741
  }
839
742
  ),
840
743
  /* @__PURE__ */ jsxRuntime.jsx(
841
- chunkTUEYBNWL_js.FormInput,
744
+ chunkGV6WJCEB_js.FormInput,
842
745
  {
843
746
  label: "Credential secret id",
844
747
  value: stringProp(config, "credentialRef"),
@@ -967,7 +870,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
967
870
  const [createOpen, setCreateOpen] = react.useState(false);
968
871
  const [editing, setEditing] = react.useState(null);
969
872
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
970
- chunkTUEYBNWL_js.HeroSection,
873
+ chunkGV6WJCEB_js.HeroSection,
971
874
  {
972
875
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
973
876
  label: labels.title,
@@ -975,7 +878,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
975
878
  subtitle: labels.subtitle,
976
879
  gradient: "from-fuchsia-500 to-purple-700",
977
880
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
978
- chunkTUEYBNWL_js.CreateActionButton,
881
+ chunkGV6WJCEB_js.CreateActionButton,
979
882
  {
980
883
  mode: "desktop",
981
884
  label: labels.addRule,
@@ -986,7 +889,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
986
889
  }
987
890
  );
988
891
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
989
- chunkTUEYBNWL_js.CreateActionButton,
892
+ chunkGV6WJCEB_js.CreateActionButton,
990
893
  {
991
894
  mode: "mobile",
992
895
  label: labels.addRule,
@@ -994,18 +897,18 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
994
897
  accent: "fuchsia"
995
898
  }
996
899
  );
997
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.PageLoadingState, {}) : rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_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: rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
998
- chunkTUEYBNWL_js.EntityCard,
900
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
901
+ chunkGV6WJCEB_js.EntityCard,
999
902
  {
1000
903
  accentGradient: "from-fuchsia-500 to-purple-700",
1001
904
  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" }) }),
1002
905
  title: rule.name,
1003
906
  subtitle: `${labels.order}: ${rule.order ?? 0}`,
1004
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
907
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
1005
908
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1006
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
909
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
1007
910
  /* @__PURE__ */ jsxRuntime.jsx(
1008
- chunkTUEYBNWL_js.Button,
911
+ chunkGV6WJCEB_js.Button,
1009
912
  {
1010
913
  type: "button",
1011
914
  size: "sm",
@@ -1022,13 +925,13 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
1022
925
  rule.ruleId
1023
926
  )) });
1024
927
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1025
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.ManagementPageLayout, { hero, content, mobileAction }),
928
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
1026
929
  createOpen && /* @__PURE__ */ jsxRuntime.jsx(
1027
930
  RuleEditor,
1028
931
  {
1029
932
  title: labels.createTitle,
1030
933
  saveLabel: labels.save,
1031
- initial: chunkJFWZHROG_js.defaultRuleForm(),
934
+ initial: chunkL6FVIWAJ_js.defaultRuleForm(),
1032
935
  onClose: () => setCreateOpen(false),
1033
936
  onSubmit: (value) => {
1034
937
  onCreate(value);
@@ -1060,7 +963,7 @@ function RuleEditor({
1060
963
  }) {
1061
964
  const [value, setValue] = react.useState(initial);
1062
965
  return /* @__PURE__ */ jsxRuntime.jsx(
1063
- chunkTUEYBNWL_js.GlassModal,
966
+ chunkGV6WJCEB_js.GlassModal,
1064
967
  {
1065
968
  open: true,
1066
969
  onClose,
@@ -1072,12 +975,12 @@ function RuleEditor({
1072
975
  event.preventDefault();
1073
976
  onSubmit(value);
1074
977
  },
1075
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkJFWZHROG_js.RuleForm, { value, onChange: setValue })
978
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkL6FVIWAJ_js.RuleForm, { value, onChange: setValue })
1076
979
  }
1077
980
  );
1078
981
  }
1079
982
  function ruleToFormValue(rule) {
1080
- const base = chunkJFWZHROG_js.defaultRuleForm();
983
+ const base = chunkL6FVIWAJ_js.defaultRuleForm();
1081
984
  const rawCondition = rule.condition ?? rule.conditions;
1082
985
  const rawAction = pickAction(rule);
1083
986
  return {
@@ -1108,408 +1011,6 @@ function pickAction(rule) {
1108
1011
  }
1109
1012
  return void 0;
1110
1013
  }
1111
- var DIALECT_CATEGORIES = [
1112
- {
1113
- id: "relational",
1114
- labelKey: "categoryRelational",
1115
- icon: outline.CircleStackIcon,
1116
- gradient: "from-blue-500 to-indigo-600",
1117
- dialects: [
1118
- { value: "postgres", label: "PostgreSQL", defaultPort: 5432, formType: "standard" },
1119
- { value: "mysql", label: "MySQL", defaultPort: 3306, formType: "standard" },
1120
- { value: "mariadb", label: "MariaDB", defaultPort: 3306, formType: "standard" },
1121
- { value: "mssql", label: "SQL Server", defaultPort: 1433, formType: "standard" },
1122
- { value: "oracle", label: "Oracle", defaultPort: 1521, formType: "standard" },
1123
- { value: "db2", label: "IBM Db2", defaultPort: 5e4, formType: "standard" },
1124
- { value: "cockroachdb", label: "CockroachDB", defaultPort: 26257, formType: "standard" },
1125
- { value: "timescaledb", label: "TimescaleDB", defaultPort: 5432, formType: "standard" },
1126
- { value: "sqlite", label: "SQLite", formType: "connection-string" },
1127
- { value: "duckdb", label: "DuckDB", formType: "connection-string" }
1128
- ]
1129
- },
1130
- {
1131
- id: "nosql",
1132
- labelKey: "categoryNoSql",
1133
- icon: outline.ServerStackIcon,
1134
- gradient: "from-emerald-500 to-teal-600",
1135
- dialects: [
1136
- { value: "mongodb", label: "MongoDB", defaultPort: 27017, formType: "connection-string" },
1137
- { value: "cassandra", label: "Cassandra", defaultPort: 9042, formType: "standard" },
1138
- { value: "scylladb", label: "ScyllaDB", defaultPort: 9042, formType: "standard" },
1139
- { value: "dynamodb", label: "DynamoDB", formType: "cloud-key" },
1140
- { value: "cosmosdb", label: "CosmosDB", formType: "connection-string" },
1141
- { value: "arangodb", label: "ArangoDB", defaultPort: 8529, formType: "standard" }
1142
- ]
1143
- },
1144
- {
1145
- id: "warehouse",
1146
- labelKey: "categoryWarehouse",
1147
- icon: outline.CloudIcon,
1148
- gradient: "from-purple-500 to-violet-600",
1149
- dialects: [
1150
- { value: "bigquery", label: "BigQuery", formType: "cloud-bigquery" },
1151
- { value: "snowflake", label: "Snowflake", formType: "cloud-snowflake" },
1152
- { value: "clickhouse", label: "ClickHouse", defaultPort: 8123, formType: "standard" }
1153
- ]
1154
- },
1155
- {
1156
- id: "timeseries",
1157
- labelKey: "categoryTimeSeries",
1158
- icon: outline.ClockIcon,
1159
- gradient: "from-sky-500 to-cyan-600",
1160
- dialects: [
1161
- { value: "influxdb", label: "InfluxDB", formType: "cloud-key" },
1162
- { value: "timestream", label: "Timestream", formType: "cloud-key" }
1163
- ]
1164
- },
1165
- {
1166
- id: "graph",
1167
- labelKey: "categoryGraph",
1168
- icon: outline.ShareIcon,
1169
- gradient: "from-pink-500 to-rose-600",
1170
- dialects: [
1171
- { value: "neo4j", label: "Neo4j", defaultPort: 7687, formType: "standard" },
1172
- { value: "neptune", label: "Neptune", formType: "connection-string" }
1173
- ]
1174
- },
1175
- {
1176
- id: "keyvalue",
1177
- labelKey: "categoryKeyValue",
1178
- icon: outline.KeyIcon,
1179
- gradient: "from-red-500 to-orange-600",
1180
- dialects: [
1181
- { value: "redis", label: "Redis", defaultPort: 6379, formType: "standard" }
1182
- ]
1183
- },
1184
- {
1185
- id: "search",
1186
- labelKey: "categorySearch",
1187
- icon: outline.MagnifyingGlassIcon,
1188
- gradient: "from-amber-500 to-yellow-600",
1189
- dialects: [
1190
- { value: "elasticsearch", label: "Elasticsearch", defaultPort: 9200, formType: "standard" },
1191
- { value: "opensearch", label: "OpenSearch", defaultPort: 9200, formType: "standard" },
1192
- { value: "pinecone", label: "Pinecone", formType: "vector-key" },
1193
- { value: "qdrant", label: "Qdrant", defaultPort: 6333, formType: "standard" },
1194
- { value: "weaviate", label: "Weaviate", defaultPort: 8080, formType: "standard" },
1195
- { value: "milvus", label: "Milvus", defaultPort: 19530, formType: "standard" },
1196
- { value: "chromadb", label: "ChromaDB", defaultPort: 8e3, formType: "standard" }
1197
- ]
1198
- }
1199
- ];
1200
- function findDialect(value) {
1201
- for (const category of DIALECT_CATEGORIES) {
1202
- const found = category.dialects.find((d) => d.value === value);
1203
- if (found) return found;
1204
- }
1205
- return void 0;
1206
- }
1207
- function findCategory(dialectValue) {
1208
- return DIALECT_CATEGORIES.find((c) => c.dialects.some((d) => d.value === dialectValue));
1209
- }
1210
- function DialectPicker({
1211
- labels,
1212
- onSelect
1213
- }) {
1214
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1215
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: labels.stepSelectType }),
1216
- DIALECT_CATEGORIES.map((category) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1217
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
1218
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br ${category.gradient}`, children: /* @__PURE__ */ jsxRuntime.jsx(category.icon, { className: "h-4 w-4 text-white" }) }),
1219
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-gray-700 dark:text-gray-200", children: labels[category.labelKey] ?? category.id })
1220
- ] }),
1221
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3", children: category.dialects.map((dialect) => /* @__PURE__ */ jsxRuntime.jsxs(
1222
- "button",
1223
- {
1224
- type: "button",
1225
- onClick: () => onSelect(dialect.value),
1226
- className: "group flex items-center gap-2 rounded-xl border border-gray-200/60 bg-white/60 px-3 py-2.5 text-left text-sm font-medium text-gray-700 transition-all hover:border-amber-400/60 hover:bg-amber-50/50 hover:text-amber-700 active:scale-[0.97] dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:hover:border-amber-400/40 dark:hover:bg-amber-500/10 dark:hover:text-amber-300",
1227
- children: [
1228
- /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-4 w-4 shrink-0 text-gray-400 transition-colors group-hover:text-amber-500 dark:text-gray-500" }),
1229
- dialect.label
1230
- ]
1231
- },
1232
- dialect.value
1233
- )) })
1234
- ] }, category.id))
1235
- ] });
1236
- }
1237
- function ConnectionForm({
1238
- dialect,
1239
- labels,
1240
- onBack,
1241
- onSubmit
1242
- }) {
1243
- const [testStatus, setTestStatus] = react.useState("idle");
1244
- const category = findCategory(dialect.value);
1245
- function handleSubmit(event) {
1246
- event.preventDefault();
1247
- const formData = new FormData(event.currentTarget);
1248
- const data = {
1249
- name: String(formData.get("name") ?? "").trim(),
1250
- dialect: dialect.value
1251
- };
1252
- for (const key of ["host", "database", "username", "password", "schema", "connectionString", "projectId", "dataset", "keyFile", "account", "warehouse", "region", "bucket", "token", "apiKey", "environment", "index", "url"]) {
1253
- const val = String(formData.get(key) ?? "").trim();
1254
- if (val) data[key] = val;
1255
- }
1256
- const port = String(formData.get("port") ?? "").trim();
1257
- if (port) data.port = Number(port);
1258
- data.ssl = formData.get("ssl") === "on";
1259
- data.readOnly = formData.get("readOnly") === "on";
1260
- const maxPoolSize = String(formData.get("maxPoolSize") ?? "").trim();
1261
- if (maxPoolSize) {
1262
- const parsed = Number(maxPoolSize);
1263
- if (Number.isFinite(parsed) && parsed > 0) data.maxPoolSize = parsed;
1264
- }
1265
- const timeoutMs = String(formData.get("timeoutMs") ?? "").trim();
1266
- if (timeoutMs) {
1267
- const parsed = Number(timeoutMs);
1268
- if (Number.isFinite(parsed) && parsed > 0) data.timeoutMs = parsed;
1269
- }
1270
- const allowedTables = splitList(String(formData.get("allowedTables") ?? ""));
1271
- if (allowedTables.length > 0) data.allowedTables = allowedTables;
1272
- const blockedColumns = splitList(String(formData.get("blockedColumns") ?? ""));
1273
- if (blockedColumns.length > 0) data.blockedColumns = blockedColumns;
1274
- onSubmit(data);
1275
- }
1276
- function handleTestConnection() {
1277
- setTestStatus("testing");
1278
- setTimeout(() => {
1279
- setTestStatus("success");
1280
- setTimeout(() => setTestStatus("idle"), 3e3);
1281
- }, 1500);
1282
- }
1283
- function renderFields() {
1284
- switch (dialect.formType) {
1285
- case "standard":
1286
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1287
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "host", label: labels.fieldHost, placeholder: labels.fieldHostPlaceholder, required: true }),
1288
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "port", label: labels.fieldPort, type: "number", defaultValue: dialect.defaultPort }),
1289
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "database", label: labels.fieldDatabase, placeholder: labels.fieldDatabasePlaceholder, required: true }),
1290
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "username", label: labels.fieldUsername, placeholder: labels.fieldUsernamePlaceholder }),
1291
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "password", label: labels.fieldPassword, type: "password", placeholder: labels.fieldPasswordPlaceholder }),
1292
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "schema", label: labels.fieldSchema, placeholder: labels.fieldSchemaPlaceholder })
1293
- ] });
1294
- case "connection-string":
1295
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "connectionString", label: labels.fieldConnectionString, placeholder: labels.fieldConnectionStringPlaceholder, required: true }) });
1296
- case "cloud-bigquery":
1297
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1298
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "projectId", label: labels.fieldProjectId, placeholder: labels.fieldProjectIdPlaceholder, required: true }),
1299
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "dataset", label: labels.fieldDataset, placeholder: labels.fieldDatasetPlaceholder, required: true }),
1300
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "keyFile", label: labels.fieldKeyFile, placeholder: labels.fieldKeyFilePlaceholder }) })
1301
- ] });
1302
- case "cloud-snowflake":
1303
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1304
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "account", label: labels.fieldAccount, placeholder: labels.fieldAccountPlaceholder, required: true }),
1305
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "warehouse", label: labels.fieldWarehouse, placeholder: labels.fieldWarehousePlaceholder, required: true }),
1306
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "database", label: labels.fieldDatabase, placeholder: labels.fieldDatabasePlaceholder, required: true }),
1307
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "username", label: labels.fieldUsername, placeholder: labels.fieldUsernamePlaceholder, required: true }),
1308
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "password", label: labels.fieldPassword, type: "password", placeholder: labels.fieldPasswordPlaceholder }),
1309
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "schema", label: labels.fieldSchema, placeholder: labels.fieldSchemaPlaceholder })
1310
- ] });
1311
- case "cloud-key":
1312
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1313
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "region", label: labels.fieldRegion, placeholder: labels.fieldRegionPlaceholder, required: true }),
1314
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "token", label: labels.fieldToken, type: "password", placeholder: labels.fieldTokenPlaceholder, required: true }),
1315
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "bucket", label: labels.fieldBucket, placeholder: labels.fieldBucketPlaceholder })
1316
- ] });
1317
- case "vector-key":
1318
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1319
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "apiKey", label: labels.fieldApiKey, type: "password", placeholder: labels.fieldApiKeyPlaceholder, required: true }),
1320
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "environment", label: labels.fieldEnvironment, placeholder: labels.fieldEnvironmentPlaceholder, required: true }),
1321
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "index", label: labels.fieldIndex, placeholder: labels.fieldIndexPlaceholder })
1322
- ] });
1323
- }
1324
- }
1325
- return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [
1326
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1327
- /* @__PURE__ */ jsxRuntime.jsx(
1328
- "button",
1329
- {
1330
- type: "button",
1331
- onClick: onBack,
1332
- className: "flex h-8 w-8 items-center justify-center rounded-lg text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-white/10 dark:hover:text-gray-300",
1333
- children: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowLeftIcon, { className: "h-4 w-4" })
1334
- }
1335
- ),
1336
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1337
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br ${category?.gradient ?? "from-gray-400 to-gray-500"}`, children: category ? /* @__PURE__ */ jsxRuntime.jsx(category.icon, { className: "h-4 w-4 text-white" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-4 w-4 text-white" }) }),
1338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1339
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: dialect.label }),
1340
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-gray-400", children: labels[category?.labelKey ?? ""] ?? "" })
1341
- ] })
1342
- ] })
1343
- ] }),
1344
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormInput, { name: "name", label: labels.fieldName, placeholder: labels.fieldNamePlaceholder, required: true }),
1345
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.FormGrid, { children: renderFields() }),
1346
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-6 pt-2", children: [
1347
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300", children: [
1348
- /* @__PURE__ */ jsxRuntime.jsx(
1349
- "input",
1350
- {
1351
- type: "checkbox",
1352
- name: "ssl",
1353
- defaultChecked: true,
1354
- className: "h-4 w-4 rounded border-gray-300 text-amber-600 focus:ring-amber-500 dark:border-gray-600 dark:bg-gray-800"
1355
- }
1356
- ),
1357
- labels.fieldSsl
1358
- ] }),
1359
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300", children: [
1360
- /* @__PURE__ */ jsxRuntime.jsx(
1361
- "input",
1362
- {
1363
- type: "checkbox",
1364
- name: "readOnly",
1365
- defaultChecked: true,
1366
- className: "h-4 w-4 rounded border-gray-300 text-amber-600 focus:ring-amber-500 dark:border-gray-600 dark:bg-gray-800"
1367
- }
1368
- ),
1369
- labels.fieldReadOnly
1370
- ] })
1371
- ] }),
1372
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: labels.fieldReadOnlyHelp }),
1373
- /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "rounded-xl border border-gray-200/60 bg-white/40 p-3 dark:border-white/10 dark:bg-white/5", children: [
1374
- /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer text-sm font-medium text-gray-700 dark:text-gray-300", children: labels.advancedToggle ?? "Governance & performance" }),
1375
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 space-y-3", children: [
1376
- /* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
1377
- /* @__PURE__ */ jsxRuntime.jsx(
1378
- chunkTUEYBNWL_js.FormInput,
1379
- {
1380
- name: "maxPoolSize",
1381
- label: labels.fieldMaxPoolSize ?? "Max pool size",
1382
- type: "number",
1383
- min: 1,
1384
- max: 100,
1385
- placeholder: "5"
1386
- }
1387
- ),
1388
- /* @__PURE__ */ jsxRuntime.jsx(
1389
- chunkTUEYBNWL_js.FormInput,
1390
- {
1391
- name: "timeoutMs",
1392
- label: labels.fieldTimeoutMs ?? "Timeout (ms)",
1393
- type: "number",
1394
- min: 100,
1395
- placeholder: "5000"
1396
- }
1397
- )
1398
- ] }),
1399
- /* @__PURE__ */ jsxRuntime.jsx(
1400
- chunkTUEYBNWL_js.FormInput,
1401
- {
1402
- name: "allowedTables",
1403
- label: labels.fieldAllowedTables ?? "Allowed tables (comma-separated)",
1404
- placeholder: "stations, current_prices, competitor_prices"
1405
- }
1406
- ),
1407
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: labels.fieldAllowedTablesHelp ?? "Leave blank to allow every table the credential can see. Otherwise only the listed tables are queryable from workflows." }),
1408
- /* @__PURE__ */ jsxRuntime.jsx(
1409
- chunkTUEYBNWL_js.FormInput,
1410
- {
1411
- name: "blockedColumns",
1412
- label: labels.fieldBlockedColumns ?? "Blocked columns (comma-separated)",
1413
- placeholder: "customers.ssn, employees.salary"
1414
- }
1415
- ),
1416
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: labels.fieldBlockedColumnsHelp ?? "Columns the driver must never surface, even if referenced by a workflow. Use table.column notation for specificity." })
1417
- ] })
1418
- ] }),
1419
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 border-t border-gray-200/60 pt-5 dark:border-white/10", children: [
1420
- /* @__PURE__ */ jsxRuntime.jsx(
1421
- chunkTUEYBNWL_js.Button,
1422
- {
1423
- type: "button",
1424
- size: "sm",
1425
- color: "zinc",
1426
- onClick: handleTestConnection,
1427
- disabled: testStatus === "testing",
1428
- children: testStatus === "testing" ? labels.testing : labels.testConnection
1429
- }
1430
- ),
1431
- testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 text-xs font-medium text-emerald-600 dark:text-emerald-400", children: [
1432
- /* @__PURE__ */ jsxRuntime.jsx(outline.CheckCircleIcon, { className: "h-4 w-4" }),
1433
- labels.connectionSuccess
1434
- ] }),
1435
- testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 text-xs font-medium text-red-600 dark:text-red-400", children: [
1436
- /* @__PURE__ */ jsxRuntime.jsx(outline.XCircleIcon, { className: "h-4 w-4" }),
1437
- labels.connectionFailed
1438
- ] }),
1439
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
1440
- /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "submit", size: "sm", color: "amber", children: labels.save })
1441
- ] })
1442
- ] });
1443
- }
1444
- function DatasourceFormModal({ open, onClose, labels, onSave }) {
1445
- const [selectedDialect, setSelectedDialect] = react.useState(null);
1446
- const dialect = selectedDialect ? findDialect(selectedDialect) : null;
1447
- function handleClose() {
1448
- setSelectedDialect(null);
1449
- onClose();
1450
- }
1451
- function handleSave(data) {
1452
- onSave(data);
1453
- handleClose();
1454
- }
1455
- return /* @__PURE__ */ jsxRuntime.jsx(
1456
- chunkTUEYBNWL_js.GlassModal,
1457
- {
1458
- open,
1459
- onClose: handleClose,
1460
- title: labels.createTitle,
1461
- subtitle: dialect ? labels.stepConfigure : labels.stepSelectType,
1462
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
1463
- gradient: "from-amber-500 to-orange-600",
1464
- maxWidth: "3xl",
1465
- children: dialect ? /* @__PURE__ */ jsxRuntime.jsx(
1466
- ConnectionForm,
1467
- {
1468
- dialect,
1469
- labels,
1470
- onBack: () => setSelectedDialect(null),
1471
- onSubmit: handleSave
1472
- }
1473
- ) : /* @__PURE__ */ jsxRuntime.jsx(DialectPicker, { labels, onSelect: setSelectedDialect })
1474
- }
1475
- );
1476
- }
1477
- function DatasourceModal({ open, onClose, labels, onSave }) {
1478
- const [selectedDialect, setSelectedDialect] = react.useState(null);
1479
- const dialect = selectedDialect ? findDialect(selectedDialect) : null;
1480
- function handleClose() {
1481
- setSelectedDialect(null);
1482
- onClose();
1483
- }
1484
- function handleSave(data) {
1485
- onSave(data);
1486
- handleClose();
1487
- }
1488
- return /* @__PURE__ */ jsxRuntime.jsx(
1489
- chunkTUEYBNWL_js.GlassModal,
1490
- {
1491
- open,
1492
- onClose: handleClose,
1493
- title: labels.createTitle,
1494
- subtitle: dialect ? labels.stepConfigure : labels.stepSelectType,
1495
- icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
1496
- gradient: "from-amber-500 to-orange-600",
1497
- maxWidth: "3xl",
1498
- children: dialect ? /* @__PURE__ */ jsxRuntime.jsx(
1499
- ConnectionForm,
1500
- {
1501
- dialect,
1502
- labels,
1503
- onBack: () => setSelectedDialect(null),
1504
- onSubmit: handleSave
1505
- }
1506
- ) : /* @__PURE__ */ jsxRuntime.jsx(DialectPicker, { labels, onSelect: setSelectedDialect })
1507
- }
1508
- );
1509
- }
1510
- function splitList(raw) {
1511
- return raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
1512
- }
1513
1014
  var SAMPLE_DATASOURCES = [
1514
1015
  {
1515
1016
  id: "ds_bigquery_analytics",
@@ -1610,7 +1111,7 @@ var SAMPLE_DATASOURCES = [
1610
1111
  ];
1611
1112
  function getDialectLabel(dialect) {
1612
1113
  if (!dialect) return "Unknown";
1613
- for (const category of DIALECT_CATEGORIES) {
1114
+ for (const category of chunkSW6TVAIJ_js.DIALECT_CATEGORIES) {
1614
1115
  const found = category.dialects.find((d) => d.value === dialect);
1615
1116
  if (found) return found.label;
1616
1117
  }
@@ -1618,12 +1119,12 @@ function getDialectLabel(dialect) {
1618
1119
  }
1619
1120
  function getDialectGradient(dialect) {
1620
1121
  if (!dialect) return "from-gray-400 to-gray-500";
1621
- const category = findCategory(dialect);
1122
+ const category = chunkSW6TVAIJ_js.findCategory(dialect);
1622
1123
  return category?.gradient ?? "from-gray-400 to-gray-500";
1623
1124
  }
1624
1125
  function getDialectIcon(dialect) {
1625
1126
  if (!dialect) return outline.CircleStackIcon;
1626
- const category = findCategory(dialect);
1127
+ const category = chunkSW6TVAIJ_js.findCategory(dialect);
1627
1128
  return category?.icon ?? outline.CircleStackIcon;
1628
1129
  }
1629
1130
  var DIALECT_LOGO = {
@@ -1691,7 +1192,7 @@ function DatasourcesPageView({
1691
1192
  }
1692
1193
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1693
1194
  /* @__PURE__ */ jsxRuntime.jsx(
1694
- chunkTUEYBNWL_js.HeroSection,
1195
+ chunkGV6WJCEB_js.HeroSection,
1695
1196
  {
1696
1197
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
1697
1198
  label: labels.title,
@@ -1699,7 +1200,7 @@ function DatasourcesPageView({
1699
1200
  subtitle: labels.subtitle,
1700
1201
  gradient: "from-amber-500 to-orange-600",
1701
1202
  toolbar: /* @__PURE__ */ jsxRuntime.jsx(
1702
- chunkTUEYBNWL_js.CreateActionButton,
1203
+ chunkGV6WJCEB_js.CreateActionButton,
1703
1204
  {
1704
1205
  mode: "desktop",
1705
1206
  label: labels.addDatasource,
@@ -1710,7 +1211,7 @@ function DatasourcesPageView({
1710
1211
  }
1711
1212
  ),
1712
1213
  /* @__PURE__ */ jsxRuntime.jsx(
1713
- chunkTUEYBNWL_js.CreateActionButton,
1214
+ chunkGV6WJCEB_js.CreateActionButton,
1714
1215
  {
1715
1216
  mode: "mobile",
1716
1217
  label: labels.addDatasource,
@@ -1719,7 +1220,7 @@ function DatasourcesPageView({
1719
1220
  }
1720
1221
  ),
1721
1222
  isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1722
- chunkTUEYBNWL_js.PageEmptyState,
1223
+ chunkGV6WJCEB_js.PageEmptyState,
1723
1224
  {
1724
1225
  title: labels.emptyTitle,
1725
1226
  message: labels.emptyDescription,
@@ -1733,13 +1234,13 @@ function DatasourcesPageView({
1733
1234
  const logoSrc = getDialectLogoSrc(ds.dialect);
1734
1235
  const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-white shadow-sm ring-1 ring-black/5 dark:bg-white/10 dark:ring-white/10", 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" }) });
1735
1236
  return /* @__PURE__ */ jsxRuntime.jsx(
1736
- chunkTUEYBNWL_js.EntityCard,
1237
+ chunkGV6WJCEB_js.EntityCard,
1737
1238
  {
1738
1239
  accentGradient: gradient,
1739
1240
  icon: iconElement,
1740
1241
  title: ds.name ?? ds.id,
1741
1242
  subtitle: dialectLabel,
1742
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
1243
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
1743
1244
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500", children: [
1744
1245
  ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-semibold text-blue-700 dark:bg-blue-900/30 dark:text-blue-300", children: "Read-only" }),
1745
1246
  ds.timeoutMs && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
@@ -1763,7 +1264,7 @@ function DatasourcesPageView({
1763
1264
  );
1764
1265
  }) }),
1765
1266
  /* @__PURE__ */ jsxRuntime.jsx(
1766
- DatasourceModal,
1267
+ chunkSW6TVAIJ_js.DatasourceModal,
1767
1268
  {
1768
1269
  open: modalOpen,
1769
1270
  onClose: () => setModalOpen(false),
@@ -1773,20 +1274,791 @@ function DatasourcesPageView({
1773
1274
  )
1774
1275
  ] });
1775
1276
  }
1277
+ function DashboardPageView({ labels, appLogo }) {
1278
+ const hero = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-center", children: [
1279
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-6", children: appLogo }),
1280
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-gray-500 dark:text-gray-400", children: labels.subtitle })
1281
+ ] });
1282
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content: null });
1283
+ }
1284
+ function AgentsIndexPageView({ labels }) {
1285
+ const Link = chunkS7KHTUHA_js.useLink();
1286
+ const tiles = [
1287
+ { id: "config", title: labels.configTitle, subtitle: labels.configSubtitle, href: "/agents/config", gradient: "from-violet-500 to-indigo-700", icon: outline.CpuChipIcon },
1288
+ { id: "tools", title: labels.toolDefinitionsTitle, subtitle: labels.toolDefinitionsSubtitle, href: "/agents/tool-definitions", gradient: "from-amber-500 to-orange-700", icon: outline.WrenchScrewdriverIcon },
1289
+ { id: "models", title: labels.modelsTitle, subtitle: labels.modelsSubtitle, href: "/agents/models", gradient: "from-emerald-500 to-teal-700", icon: outline.CubeTransparentIcon },
1290
+ { id: "prompts", title: labels.promptsTitle, subtitle: labels.promptsSubtitle, href: "/agents/prompts", gradient: "from-sky-500 to-blue-700", icon: outline.ChatBubbleLeftEllipsisIcon }
1291
+ ];
1292
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
1293
+ chunkGV6WJCEB_js.HeroSection,
1294
+ {
1295
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
1296
+ label: labels.title,
1297
+ title: labels.title,
1298
+ subtitle: labels.subtitle,
1299
+ gradient: "from-violet-500 to-indigo-700"
1300
+ }
1301
+ );
1302
+ const content = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: tiles.map((tile) => {
1303
+ const Icon = tile.icon;
1304
+ return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
1305
+ chunkGV6WJCEB_js.EntityCard,
1306
+ {
1307
+ accentGradient: tile.gradient,
1308
+ 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" }) }),
1309
+ title: tile.title,
1310
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
1311
+ }
1312
+ ) }, tile.id);
1313
+ }) });
1314
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content });
1315
+ }
1316
+ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
1317
+ const selectedWorkflow = workflows[0] ?? null;
1318
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1319
+ /* @__PURE__ */ jsxRuntime.jsx(
1320
+ chunkGV6WJCEB_js.SectionHeader,
1321
+ {
1322
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
1323
+ title: labels.title,
1324
+ subtitle: labels.subtitle,
1325
+ gradient: "from-sky-500 to-indigo-600"
1326
+ }
1327
+ ),
1328
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1329
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
1330
+ /* @__PURE__ */ jsxRuntime.jsx(
1331
+ chunkGV6WJCEB_js.Form,
1332
+ {
1333
+ onSubmit: (event) => {
1334
+ event.preventDefault();
1335
+ const formData = new FormData(event.currentTarget);
1336
+ const name = String(formData.get("name") ?? "").trim();
1337
+ const description = String(formData.get("description") ?? "").trim();
1338
+ if (!name) return;
1339
+ onCreate({ name, description });
1340
+ event.currentTarget.reset();
1341
+ },
1342
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
1343
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
1344
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
1345
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "submit", children: labels.create }) })
1346
+ ] })
1347
+ }
1348
+ )
1349
+ ] }),
1350
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1351
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
1352
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.Table, { children: [
1353
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.TableRow, { children: [
1354
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHeader, { children: labels.name }),
1355
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHeader, { children: labels.description }),
1356
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHeader, { children: labels.version }),
1357
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHeader, { children: labels.status }),
1358
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableHeader, { children: labels.actions })
1359
+ ] }) }),
1360
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.TableRow, { children: [
1361
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableCell, { children: workflow.name }),
1362
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableCell, { children: workflow.description }),
1363
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableCell, { children: String(workflow.version) }),
1364
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
1365
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1366
+ /* @__PURE__ */ jsxRuntime.jsx(
1367
+ chunkGV6WJCEB_js.Form,
1368
+ {
1369
+ onSubmit: (event) => {
1370
+ event.preventDefault();
1371
+ onUpdateMeta({
1372
+ workflowId: workflow.id,
1373
+ name: workflow.name ?? "",
1374
+ description: workflow.description ?? ""
1375
+ });
1376
+ },
1377
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
1378
+ }
1379
+ ),
1380
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
1381
+ ] }) })
1382
+ ] }, workflow.id)) })
1383
+ ] })
1384
+ ] }),
1385
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1386
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
1387
+ 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(chunkCXIQWPBH_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Text, { children: labels.empty })
1388
+ ] })
1389
+ ] });
1390
+ }
1391
+ var BADGE_COLOR = {
1392
+ completed: "emerald",
1393
+ failed: "rose",
1394
+ running: "sky",
1395
+ pending: "amber",
1396
+ cancelled: "zinc"
1397
+ };
1398
+ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onView, onViewTimeline }) {
1399
+ const [statusFilter, setStatusFilter] = react.useState("all");
1400
+ const statusOptions = react.useMemo(() => [
1401
+ { value: "all", label: labels.filterAll },
1402
+ { value: "pending", label: labels.statusPending },
1403
+ { value: "running", label: labels.statusRunning },
1404
+ { value: "completed", label: labels.statusCompleted },
1405
+ { value: "failed", label: labels.statusFailed },
1406
+ { value: "cancelled", label: labels.statusCancelled }
1407
+ ], [labels]);
1408
+ const statusLabelFor = (status) => {
1409
+ switch (status) {
1410
+ case "pending":
1411
+ return labels.statusPending;
1412
+ case "running":
1413
+ return labels.statusRunning;
1414
+ case "completed":
1415
+ return labels.statusCompleted;
1416
+ case "failed":
1417
+ return labels.statusFailed;
1418
+ case "cancelled":
1419
+ return labels.statusCancelled;
1420
+ default:
1421
+ return status;
1422
+ }
1423
+ };
1424
+ const filteredRuns = statusFilter === "all" ? runs : runs.filter((run) => run.status === statusFilter);
1425
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
1426
+ chunkGV6WJCEB_js.HeroSection,
1427
+ {
1428
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1429
+ label: labels.title,
1430
+ title: labels.title,
1431
+ subtitle: labels.subtitle,
1432
+ gradient: "from-indigo-500 to-sky-700",
1433
+ toolbar: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-48", children: /* @__PURE__ */ jsxRuntime.jsx(
1434
+ chunkGV6WJCEB_js.FormSelect,
1435
+ {
1436
+ name: "statusFilter",
1437
+ label: labels.filterStatus,
1438
+ options: statusOptions,
1439
+ value: statusFilter,
1440
+ onValueChange: setStatusFilter
1441
+ }
1442
+ ) })
1443
+ }
1444
+ );
1445
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: filteredRuns.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
1446
+ chunkGV6WJCEB_js.EntityCard,
1447
+ {
1448
+ accentGradient: "from-indigo-500 to-sky-700",
1449
+ 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" }) }),
1450
+ title: run.id.slice(0, 8),
1451
+ subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
1452
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
1453
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1454
+ onView && /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
1455
+ onViewTimeline && labels.timeline && /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
1456
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
1457
+ run.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
1458
+ ] }),
1459
+ children: [
1460
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
1461
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.duration }),
1462
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: chunk3T2WGL47_js.formatDurationMs(run.totalDurationMs) }),
1463
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.triggeredBy }),
1464
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
1465
+ ] }),
1466
+ run.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-2 text-xs text-rose-600 dark:text-rose-400", children: run.error })
1467
+ ]
1468
+ },
1469
+ run.id
1470
+ )) });
1471
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content });
1472
+ }
1473
+ function RunTimelinePageView({ labels, entries, loading, runId }) {
1474
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
1475
+ chunkGV6WJCEB_js.HeroSection,
1476
+ {
1477
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1478
+ label: labels.title,
1479
+ title: labels.title,
1480
+ subtitle: `${labels.subtitle} \u2014 ${runId.slice(0, 8)}`,
1481
+ gradient: "from-indigo-500 to-violet-700"
1482
+ }
1483
+ );
1484
+ if (loading) {
1485
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) });
1486
+ }
1487
+ if (entries.length === 0) {
1488
+ return /* @__PURE__ */ jsxRuntime.jsx(
1489
+ chunkGV6WJCEB_js.ManagementPageLayout,
1490
+ {
1491
+ hero,
1492
+ content: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
1493
+ }
1494
+ );
1495
+ }
1496
+ return /* @__PURE__ */ jsxRuntime.jsx(
1497
+ chunkGV6WJCEB_js.ManagementPageLayout,
1498
+ {
1499
+ hero,
1500
+ content: /* @__PURE__ */ jsxRuntime.jsx(
1501
+ chunkL6FVIWAJ_js.ExecutionTimelinePanel,
1502
+ {
1503
+ entries,
1504
+ labels
1505
+ }
1506
+ )
1507
+ }
1508
+ );
1509
+ }
1510
+ var PROVIDER_PRESETS = {
1511
+ anthropic_api: {
1512
+ label: "Anthropic API",
1513
+ description: "Claude Opus, Sonnet, Haiku via api.anthropic.com",
1514
+ exampleModels: ["claude-opus-4-7", "claude-sonnet-4-6"]
1515
+ },
1516
+ openai_api: {
1517
+ label: "OpenAI API",
1518
+ description: "GPT-4o, o3, o4-mini via api.openai.com",
1519
+ exampleModels: ["gpt-4o", "gpt-4o-mini"]
1520
+ },
1521
+ aws_bedrock: {
1522
+ label: "AWS Bedrock",
1523
+ description: "Anthropic / Meta / Mistral / Nova served through Bedrock",
1524
+ needsRegion: true,
1525
+ defaultRegion: "us-east-1",
1526
+ exampleModels: ["amazon.nova-lite-v1:0", "anthropic.claude-3-5-sonnet-20241022-v2:0"]
1527
+ },
1528
+ google_vertex: {
1529
+ label: "Google Vertex AI",
1530
+ description: "Gemini + third-party models on Vertex",
1531
+ needsRegion: true,
1532
+ defaultRegion: "us-central1",
1533
+ exampleModels: ["gemini-2.0-flash-exp", "gemini-1.5-pro"]
1534
+ },
1535
+ azure_openai: {
1536
+ label: "Azure OpenAI",
1537
+ description: "OpenAI deployments hosted on Azure",
1538
+ needsRegion: true,
1539
+ needsEndpoint: true,
1540
+ defaultRegion: "eastus"
1541
+ },
1542
+ groq: {
1543
+ label: "Groq",
1544
+ description: "Low-latency Llama / Mixtral inference via api.groq.com"
1545
+ },
1546
+ mistral: {
1547
+ label: "Mistral API",
1548
+ description: "mistral.ai hosted open-weight + commercial models"
1549
+ },
1550
+ huggingface: {
1551
+ label: "Hugging Face",
1552
+ description: "Inference endpoints + serverless inference API",
1553
+ needsEndpoint: true
1554
+ },
1555
+ ollama: {
1556
+ label: "Ollama",
1557
+ description: "Self-hosted Ollama server \u2014 provide the base URL",
1558
+ needsEndpoint: true
1559
+ },
1560
+ custom: {
1561
+ label: "Custom / OpenAI-compatible",
1562
+ description: "Any OpenAI-API-compatible HTTP endpoint",
1563
+ needsEndpoint: true
1564
+ }
1565
+ };
1566
+ var PROVIDER_OPTIONS = Object.keys(PROVIDER_PRESETS).map((slug) => ({
1567
+ value: slug,
1568
+ label: PROVIDER_PRESETS[slug].label
1569
+ }));
1570
+ function ConnectionsPageView({
1571
+ labels,
1572
+ connections,
1573
+ loading,
1574
+ onCreate,
1575
+ onUpdate,
1576
+ onDelete,
1577
+ onCreateSecret,
1578
+ secretNamePrefix = "platform"
1579
+ }) {
1580
+ const [createOpen, setCreateOpen] = react.useState(false);
1581
+ const [editing, setEditing] = react.useState(null);
1582
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
1583
+ chunkGV6WJCEB_js.HeroSection,
1584
+ {
1585
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
1586
+ label: labels.title,
1587
+ title: labels.title,
1588
+ subtitle: labels.subtitle,
1589
+ gradient: "from-sky-500 to-indigo-600",
1590
+ toolbar: /* @__PURE__ */ jsxRuntime.jsx(
1591
+ chunkGV6WJCEB_js.CreateActionButton,
1592
+ {
1593
+ mode: "desktop",
1594
+ label: labels.add,
1595
+ onClick: () => setCreateOpen(true),
1596
+ accent: "sky"
1597
+ }
1598
+ )
1599
+ }
1600
+ );
1601
+ const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
1602
+ chunkGV6WJCEB_js.CreateActionButton,
1603
+ {
1604
+ mode: "mobile",
1605
+ label: labels.add,
1606
+ onClick: () => setCreateOpen(true),
1607
+ accent: "sky"
1608
+ }
1609
+ );
1610
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : connections.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: connections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
1611
+ chunkGV6WJCEB_js.EntityCard,
1612
+ {
1613
+ accentGradient: "from-sky-500 to-indigo-600",
1614
+ 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" }) }),
1615
+ title: conn.name,
1616
+ subtitle: providerLabel(conn.providerSlug),
1617
+ status: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
1618
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
1619
+ conn.credentialRef ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: "amber", children: "No secret" })
1620
+ ] }),
1621
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1622
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
1623
+ /* @__PURE__ */ jsxRuntime.jsx(
1624
+ chunkGV6WJCEB_js.Button,
1625
+ {
1626
+ type: "button",
1627
+ size: "sm",
1628
+ color: "rose",
1629
+ onClick: async () => {
1630
+ if (window.confirm(labels.deleteConfirm)) await onDelete(conn);
1631
+ },
1632
+ children: labels.delete
1633
+ }
1634
+ )
1635
+ ] }),
1636
+ children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-1 space-y-0.5 text-xs text-slate-500 dark:text-slate-400", children: [
1637
+ conn.region && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Region", value: conn.region }),
1638
+ conn.endpoint && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Endpoint", value: conn.endpoint }),
1639
+ conn.modelFilter && conn.modelFilter.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Models", value: conn.modelFilter.join(", ") })
1640
+ ] })
1641
+ },
1642
+ conn.id
1643
+ )) });
1644
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1645
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
1646
+ createOpen && /* @__PURE__ */ jsxRuntime.jsx(
1647
+ ConnectionEditor,
1648
+ {
1649
+ title: labels.createTitle,
1650
+ saveLabel: labels.save,
1651
+ initial: defaultConnectionFormValue(),
1652
+ mode: "create",
1653
+ onClose: () => setCreateOpen(false),
1654
+ onCreateSecret,
1655
+ secretNamePrefix,
1656
+ onSubmit: async (wire) => {
1657
+ await onCreate(wire);
1658
+ setCreateOpen(false);
1659
+ }
1660
+ }
1661
+ ),
1662
+ editing && /* @__PURE__ */ jsxRuntime.jsx(
1663
+ ConnectionEditor,
1664
+ {
1665
+ title: labels.editTitle,
1666
+ saveLabel: labels.save,
1667
+ initial: modelToFormValue(editing),
1668
+ mode: "edit",
1669
+ onClose: () => setEditing(null),
1670
+ onCreateSecret,
1671
+ secretNamePrefix,
1672
+ onSubmit: async (wire) => {
1673
+ await onUpdate(editing.id, wire);
1674
+ setEditing(null);
1675
+ }
1676
+ }
1677
+ )
1678
+ ] });
1679
+ }
1680
+ function ConnectionEditor({
1681
+ title,
1682
+ saveLabel,
1683
+ initial,
1684
+ mode,
1685
+ onClose,
1686
+ onSubmit,
1687
+ onCreateSecret,
1688
+ secretNamePrefix
1689
+ }) {
1690
+ const [value, setValue] = react.useState(initial);
1691
+ const [submitting, setSubmitting] = react.useState(false);
1692
+ const [error, setError] = react.useState(null);
1693
+ const preset = PROVIDER_PRESETS[value.providerSlug];
1694
+ const handleSubmit = async () => {
1695
+ setError(null);
1696
+ setSubmitting(true);
1697
+ try {
1698
+ let credentialRef = value.credentialRef;
1699
+ if (value.apiKey.trim().length > 0) {
1700
+ const secret = await onCreateSecret(`${secretNamePrefix}-${value.providerSlug}-${Date.now()}`, value.apiKey.trim());
1701
+ credentialRef = secret.id;
1702
+ }
1703
+ const modelFilter = parseCsv(value.modelFilter);
1704
+ let config;
1705
+ const trimmed = value.configJson.trim();
1706
+ if (trimmed.length > 0) {
1707
+ try {
1708
+ const parsed = JSON.parse(trimmed);
1709
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
1710
+ throw new Error("config must be a JSON object");
1711
+ }
1712
+ config = parsed;
1713
+ } catch (e) {
1714
+ throw new Error(`Invalid config JSON: ${e.message}`);
1715
+ }
1716
+ }
1717
+ if (mode === "create") {
1718
+ const wire = {
1719
+ providerSlug: value.providerSlug,
1720
+ name: value.name.trim(),
1721
+ ...value.region.trim() && { region: value.region.trim() },
1722
+ ...value.endpoint.trim() && { endpoint: value.endpoint.trim() },
1723
+ ...credentialRef && { credentialRef },
1724
+ ...modelFilter.length > 0 && { modelFilter },
1725
+ ...config && { config }
1726
+ };
1727
+ await onSubmit(wire);
1728
+ } else {
1729
+ const wire = {
1730
+ name: value.name.trim() || void 0,
1731
+ region: value.region.trim() || void 0,
1732
+ endpoint: value.endpoint.trim() || void 0,
1733
+ ...credentialRef && { credentialRef },
1734
+ ...modelFilter.length > 0 ? { modelFilter } : {},
1735
+ ...config && { config }
1736
+ };
1737
+ await onSubmit(wire);
1738
+ }
1739
+ } catch (e) {
1740
+ setError(e.message);
1741
+ } finally {
1742
+ setSubmitting(false);
1743
+ }
1744
+ };
1745
+ react.useEffect(() => {
1746
+ if (mode === "create" && preset.needsRegion && !value.region && preset.defaultRegion) {
1747
+ setValue((v) => ({ ...v, region: preset.defaultRegion ?? "" }));
1748
+ }
1749
+ }, [mode, preset, value.region]);
1750
+ const placeholderModels = react.useMemo(() => {
1751
+ return preset.exampleModels?.join(", ") ?? "";
1752
+ }, [preset]);
1753
+ return /* @__PURE__ */ jsxRuntime.jsx(
1754
+ chunkGV6WJCEB_js.GlassModal,
1755
+ {
1756
+ open: true,
1757
+ onClose,
1758
+ title,
1759
+ maxWidth: "2xl",
1760
+ showFormFooter: true,
1761
+ submitLabel: submitting ? "\u2026" : saveLabel,
1762
+ onSubmit: (event) => {
1763
+ event.preventDefault();
1764
+ void handleSubmit();
1765
+ },
1766
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1767
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
1768
+ /* @__PURE__ */ jsxRuntime.jsx(
1769
+ chunkGV6WJCEB_js.FormSelect,
1770
+ {
1771
+ label: "Provider",
1772
+ value: value.providerSlug,
1773
+ options: PROVIDER_OPTIONS,
1774
+ onValueChange: (slug) => setValue((v) => ({ ...v, providerSlug: slug })),
1775
+ disabled: mode === "edit",
1776
+ hint: preset.description
1777
+ }
1778
+ ),
1779
+ /* @__PURE__ */ jsxRuntime.jsx(
1780
+ chunkGV6WJCEB_js.FormInput,
1781
+ {
1782
+ label: "Display name",
1783
+ required: true,
1784
+ value: value.name,
1785
+ onValueChange: (name) => setValue((v) => ({ ...v, name })),
1786
+ placeholder: "Production Bedrock, Claude dev, \u2026"
1787
+ }
1788
+ ),
1789
+ preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
1790
+ chunkGV6WJCEB_js.FormInput,
1791
+ {
1792
+ label: "Region",
1793
+ value: value.region,
1794
+ onValueChange: (region) => setValue((v) => ({ ...v, region })),
1795
+ placeholder: preset.defaultRegion
1796
+ }
1797
+ ),
1798
+ preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
1799
+ chunkGV6WJCEB_js.FormInput,
1800
+ {
1801
+ label: "Endpoint URL",
1802
+ value: value.endpoint,
1803
+ onValueChange: (endpoint) => setValue((v) => ({ ...v, endpoint })),
1804
+ placeholder: "https://..."
1805
+ }
1806
+ )
1807
+ ] }),
1808
+ /* @__PURE__ */ jsxRuntime.jsx(
1809
+ chunkGV6WJCEB_js.FormInput,
1810
+ {
1811
+ label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
1812
+ type: "password",
1813
+ value: value.apiKey,
1814
+ onValueChange: (apiKey) => setValue((v) => ({ ...v, apiKey })),
1815
+ placeholder: value.credentialRef ? "\u2022\u2022\u2022 stored in vault" : "sk-...",
1816
+ hint: value.credentialRef ? `Stored secret: ${value.credentialRef.slice(0, 8)}\u2026` : "Plaintext \u2014 pushed to windsock vault on save, never persisted here."
1817
+ }
1818
+ ),
1819
+ /* @__PURE__ */ jsxRuntime.jsx(
1820
+ chunkGV6WJCEB_js.FormInput,
1821
+ {
1822
+ label: "Model filter (comma-separated, optional)",
1823
+ value: value.modelFilter,
1824
+ onValueChange: (modelFilter) => setValue((v) => ({ ...v, modelFilter })),
1825
+ placeholder: placeholderModels,
1826
+ hint: "Leave blank to allow all models the provider exposes."
1827
+ }
1828
+ ),
1829
+ /* @__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: [
1830
+ /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
1831
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
1832
+ chunkGV6WJCEB_js.FormTextarea,
1833
+ {
1834
+ rows: 4,
1835
+ value: value.configJson,
1836
+ onValueChange: (configJson) => setValue((v) => ({ ...v, configJson })),
1837
+ placeholder: '{\n "temperature": 0.2\n}',
1838
+ hint: "Free-form JSON passed to the runtime provider \u2014 e.g. Bedrock guardrail ids, Azure deployment overrides."
1839
+ }
1840
+ ) })
1841
+ ] }),
1842
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-lg border border-red-400/40 bg-red-500/10 p-2 text-xs text-red-600 dark:text-red-300", children: error })
1843
+ ] })
1844
+ }
1845
+ );
1846
+ }
1847
+ function Row({ label, value }) {
1848
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1 truncate", children: [
1849
+ /* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "font-medium", children: [
1850
+ label,
1851
+ ":"
1852
+ ] }),
1853
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "truncate", children: value })
1854
+ ] });
1855
+ }
1856
+ function providerLabel(slug) {
1857
+ if (!slug) return "Unknown provider";
1858
+ const key = slug;
1859
+ return PROVIDER_PRESETS[key]?.label ?? slug;
1860
+ }
1861
+ function parseCsv(raw) {
1862
+ return raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
1863
+ }
1864
+ function defaultConnectionFormValue() {
1865
+ return {
1866
+ providerSlug: "anthropic_api",
1867
+ name: "",
1868
+ region: "",
1869
+ endpoint: "",
1870
+ apiKey: "",
1871
+ credentialRef: "",
1872
+ modelFilter: "",
1873
+ configJson: ""
1874
+ };
1875
+ }
1876
+ function modelToFormValue(conn) {
1877
+ return {
1878
+ providerSlug: conn.providerSlug ?? "custom",
1879
+ name: conn.name,
1880
+ region: conn.region ?? "",
1881
+ endpoint: conn.endpoint ?? "",
1882
+ apiKey: "",
1883
+ credentialRef: conn.credentialRef ?? "",
1884
+ modelFilter: (conn.modelFilter ?? []).join(", "),
1885
+ configJson: conn.config ? JSON.stringify(conn.config, null, 2) : ""
1886
+ };
1887
+ }
1888
+ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate, onDisable }) {
1889
+ const [createOpen, setCreateOpen] = react.useState(false);
1890
+ const [rotateFor, setRotateFor] = react.useState(null);
1891
+ const typeOptions = [
1892
+ { value: "generic", label: labels.typeGeneric },
1893
+ { value: "api_key", label: labels.typeApiKey },
1894
+ { value: "oauth", label: labels.typeOAuth },
1895
+ { value: "password", label: labels.typePassword }
1896
+ ];
1897
+ const hero = /* @__PURE__ */ jsxRuntime.jsx(
1898
+ chunkGV6WJCEB_js.HeroSection,
1899
+ {
1900
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
1901
+ label: labels.title,
1902
+ title: labels.title,
1903
+ subtitle: labels.subtitle,
1904
+ gradient: "from-rose-500 to-orange-600",
1905
+ toolbar: /* @__PURE__ */ jsxRuntime.jsx(
1906
+ chunkGV6WJCEB_js.CreateActionButton,
1907
+ {
1908
+ mode: "desktop",
1909
+ label: labels.addCredential,
1910
+ onClick: () => setCreateOpen(true),
1911
+ accent: "rose"
1912
+ }
1913
+ )
1914
+ }
1915
+ );
1916
+ const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
1917
+ chunkGV6WJCEB_js.CreateActionButton,
1918
+ {
1919
+ mode: "mobile",
1920
+ label: labels.addCredential,
1921
+ onClick: () => setCreateOpen(true),
1922
+ accent: "rose"
1923
+ }
1924
+ );
1925
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.PageLoadingState, {}) : credentials.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_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: credentials.map((secret) => /* @__PURE__ */ jsxRuntime.jsxs(
1926
+ chunkGV6WJCEB_js.EntityCard,
1927
+ {
1928
+ accentGradient: "from-rose-500 to-orange-700",
1929
+ 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" }) }),
1930
+ title: secret.name,
1931
+ subtitle: secret.secretType,
1932
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
1933
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
1934
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.CopyableId, { id: secret.secretId }),
1935
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1936
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
1937
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
1938
+ labels.rotate
1939
+ ] }),
1940
+ !secret.disabled && /* @__PURE__ */ jsxRuntime.jsxs(
1941
+ chunkGV6WJCEB_js.Button,
1942
+ {
1943
+ type: "button",
1944
+ size: "sm",
1945
+ color: "rose",
1946
+ onClick: () => {
1947
+ if (window.confirm(labels.disableConfirm)) onDisable(secret);
1948
+ },
1949
+ children: [
1950
+ /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "mr-1 h-3.5 w-3.5" }),
1951
+ labels.disable
1952
+ ]
1953
+ }
1954
+ )
1955
+ ] })
1956
+ ] }),
1957
+ children: [
1958
+ secret.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: secret.description }),
1959
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
1960
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.createdAt }),
1961
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: new Date(secret.createdAt).toLocaleDateString() }),
1962
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.expiresAt }),
1963
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: secret.expiresAt ? new Date(secret.expiresAt).toLocaleDateString() : labels.neverExpires })
1964
+ ] })
1965
+ ]
1966
+ },
1967
+ secret.secretId
1968
+ )) });
1969
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1970
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.ManagementPageLayout, { hero, content, mobileAction }),
1971
+ /* @__PURE__ */ jsxRuntime.jsx(
1972
+ chunkGV6WJCEB_js.GlassModal,
1973
+ {
1974
+ open: createOpen,
1975
+ onClose: () => setCreateOpen(false),
1976
+ title: labels.createTitle,
1977
+ maxWidth: "lg",
1978
+ showFormFooter: true,
1979
+ submitLabel: labels.save,
1980
+ onSubmit: (event) => {
1981
+ const formData = new FormData(event.currentTarget);
1982
+ const name = String(formData.get("name") ?? "").trim();
1983
+ const value = String(formData.get("value") ?? "");
1984
+ const secretType = String(formData.get("secretType") ?? "generic");
1985
+ const description = String(formData.get("description") ?? "").trim() || void 0;
1986
+ if (!name || !value) return;
1987
+ onCreate({ name, value, secretType, description });
1988
+ setCreateOpen(false);
1989
+ },
1990
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGV6WJCEB_js.FormGrid, { children: [
1991
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
1992
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
1993
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
1994
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
1995
+ ] })
1996
+ }
1997
+ ),
1998
+ /* @__PURE__ */ jsxRuntime.jsx(
1999
+ chunkGV6WJCEB_js.GlassModal,
2000
+ {
2001
+ open: rotateFor !== null,
2002
+ onClose: () => setRotateFor(null),
2003
+ title: `${labels.rotate}: ${rotateFor?.name ?? ""}`,
2004
+ maxWidth: "md",
2005
+ showFormFooter: true,
2006
+ submitLabel: labels.rotate,
2007
+ onSubmit: (event) => {
2008
+ const formData = new FormData(event.currentTarget);
2009
+ const value = String(formData.get("value") ?? "");
2010
+ if (!value || !rotateFor) return;
2011
+ onRotate(rotateFor, value);
2012
+ setRotateFor(null);
2013
+ },
2014
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGV6WJCEB_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
2015
+ }
2016
+ )
2017
+ ] });
2018
+ }
1776
2019
 
2020
+ Object.defineProperty(exports, "RolesPageView", {
2021
+ enumerable: true,
2022
+ get: function () { return chunkCXIQWPBH_js.RolesPageView; }
2023
+ });
2024
+ Object.defineProperty(exports, "UsersPageView", {
2025
+ enumerable: true,
2026
+ get: function () { return chunkCXIQWPBH_js.UsersPageView; }
2027
+ });
2028
+ Object.defineProperty(exports, "DIALECT_CATEGORIES", {
2029
+ enumerable: true,
2030
+ get: function () { return chunkSW6TVAIJ_js.DIALECT_CATEGORIES; }
2031
+ });
2032
+ Object.defineProperty(exports, "DatasourceFormModal", {
2033
+ enumerable: true,
2034
+ get: function () { return chunkSW6TVAIJ_js.DatasourceFormModal; }
2035
+ });
2036
+ Object.defineProperty(exports, "DatasourceModal", {
2037
+ enumerable: true,
2038
+ get: function () { return chunkSW6TVAIJ_js.DatasourceModal; }
2039
+ });
2040
+ Object.defineProperty(exports, "findCategory", {
2041
+ enumerable: true,
2042
+ get: function () { return chunkSW6TVAIJ_js.findCategory; }
2043
+ });
2044
+ Object.defineProperty(exports, "findDialect", {
2045
+ enumerable: true,
2046
+ get: function () { return chunkSW6TVAIJ_js.findDialect; }
2047
+ });
1777
2048
  exports.AgentsConfigPageView = AgentsConfigPageView;
2049
+ exports.AgentsIndexPageView = AgentsIndexPageView;
1778
2050
  exports.AgentsModelsPageView = AgentsModelsPageView;
1779
2051
  exports.AgentsPromptsPageView = AgentsPromptsPageView;
1780
2052
  exports.AgentsToolDefinitionsPageView = AgentsToolDefinitionsPageView;
1781
- exports.DIALECT_CATEGORIES = DIALECT_CATEGORIES;
1782
- exports.DatasourceFormModal = DatasourceFormModal;
1783
- exports.DatasourceModal = DatasourceModal;
2053
+ exports.ConnectionsPageView = ConnectionsPageView;
2054
+ exports.CredentialsPageView = CredentialsPageView;
2055
+ exports.DashboardPageView = DashboardPageView;
1784
2056
  exports.DatasourcesPageView = DatasourcesPageView;
1785
2057
  exports.RulesPageView = RulesPageView;
2058
+ exports.RunTimelinePageView = RunTimelinePageView;
1786
2059
  exports.TOOL_TYPES = TOOL_TYPES;
1787
- exports.UsersPageView = UsersPageView;
1788
- exports.findCategory = findCategory;
1789
- exports.findDialect = findDialect;
2060
+ exports.WorkflowRunsPageView = WorkflowRunsPageView;
2061
+ exports.WorkflowsPageView = WorkflowsPageView;
1790
2062
  exports.jsonSchemaToParameters = jsonSchemaToParameters;
1791
2063
  exports.parametersToJsonSchema = parametersToJsonSchema;
1792
2064
  //# sourceMappingURL=index.js.map