@burdenoff/microfe-botmanor 2026.1117.1 → 2026.1118.1

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 (72) hide show
  1. package/dist/botlit/BotlitRoutes.js +59 -55
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/components/AgentA2APanel.d.ts +13 -0
  4. package/dist/botlit/components/AgentA2APanel.js +149 -0
  5. package/dist/botlit/components/AgentA2APanel.js.map +1 -0
  6. package/dist/botlit/components/BotAgentsPanel.d.ts +15 -0
  7. package/dist/botlit/components/BotAgentsPanel.js +341 -0
  8. package/dist/botlit/components/BotAgentsPanel.js.map +1 -0
  9. package/dist/botlit/components/BotFormFields.d.ts +4 -0
  10. package/dist/botlit/components/BotFormFields.js +108 -74
  11. package/dist/botlit/components/BotFormFields.js.map +1 -1
  12. package/dist/botlit/components/BotRoutingSummary.d.ts +13 -0
  13. package/dist/botlit/components/BotRoutingSummary.js +126 -0
  14. package/dist/botlit/components/BotRoutingSummary.js.map +1 -0
  15. package/dist/botlit/components/BotVersionHistoryPanel.d.ts +8 -0
  16. package/dist/botlit/components/BotVersionHistoryPanel.js +172 -0
  17. package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -0
  18. package/dist/botlit/components/CreateFromTemplate.d.ts +12 -0
  19. package/dist/botlit/components/CreateFromTemplate.js +129 -0
  20. package/dist/botlit/components/CreateFromTemplate.js.map +1 -0
  21. package/dist/botlit/components/EntityTags.d.ts +24 -0
  22. package/dist/botlit/components/EntityTags.js +72 -0
  23. package/dist/botlit/components/EntityTags.js.map +1 -0
  24. package/dist/botlit/components/GuardrailPoliciesPanel.d.ts +10 -0
  25. package/dist/botlit/components/GuardrailPoliciesPanel.js +91 -0
  26. package/dist/botlit/components/GuardrailPoliciesPanel.js.map +1 -0
  27. package/dist/botlit/hooks/useA2AConnections.d.ts +21 -0
  28. package/dist/botlit/hooks/useA2AConnections.js +82 -0
  29. package/dist/botlit/hooks/useA2AConnections.js.map +1 -0
  30. package/dist/botlit/hooks/useAgentTestChat.d.ts +29 -0
  31. package/dist/botlit/hooks/useAgentTestChat.js +35 -0
  32. package/dist/botlit/hooks/useAgentTestChat.js.map +1 -0
  33. package/dist/botlit/hooks/useAgents.d.ts +3 -0
  34. package/dist/botlit/hooks/useAgents.js +4 -0
  35. package/dist/botlit/hooks/useAgents.js.map +1 -1
  36. package/dist/botlit/hooks/useBotAgents.d.ts +22 -1
  37. package/dist/botlit/hooks/useBotAgents.js +46 -12
  38. package/dist/botlit/hooks/useBotAgents.js.map +1 -1
  39. package/dist/botlit/hooks/useBotVersions.d.ts +25 -0
  40. package/dist/botlit/hooks/useBotVersions.js +69 -0
  41. package/dist/botlit/hooks/useBotVersions.js.map +1 -0
  42. package/dist/botlit/hooks/useBots.d.ts +3 -0
  43. package/dist/botlit/hooks/useBots.js +4 -0
  44. package/dist/botlit/hooks/useBots.js.map +1 -1
  45. package/dist/botlit/hooks/useLLMProviders.js +40 -32
  46. package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
  47. package/dist/botlit/hooks/useTemplates.d.ts +19 -0
  48. package/dist/botlit/hooks/useTemplates.js +71 -0
  49. package/dist/botlit/hooks/useTemplates.js.map +1 -0
  50. package/dist/botlit/pages/AgentBuilderPage.js +388 -347
  51. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  52. package/dist/botlit/pages/AgentDetailPage.js +237 -247
  53. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  54. package/dist/botlit/pages/AgentTestChatPage.d.ts +2 -0
  55. package/dist/botlit/pages/AgentTestChatPage.js +176 -0
  56. package/dist/botlit/pages/AgentTestChatPage.js.map +1 -0
  57. package/dist/botlit/pages/AgentsListPage.js +2 -2
  58. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  59. package/dist/botlit/pages/BotDetailPage.js +398 -447
  60. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/ChatPage.js +19 -12
  62. package/dist/botlit/pages/ChatPage.js.map +1 -1
  63. package/dist/botlit/pages/SettingsPage.d.ts +7 -0
  64. package/dist/botlit/pages/SettingsPage.js +120 -85
  65. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  66. package/dist/botlit/pages/index.d.ts +1 -0
  67. package/dist/botlit/utils/botRouting.d.ts +42 -0
  68. package/dist/botlit/utils/botRouting.js +52 -0
  69. package/dist/botlit/utils/botRouting.js.map +1 -0
  70. package/dist/generated/wspace-operations.js +41 -43
  71. package/dist/generated/wspace-operations.js.map +1 -1
  72. package/package.json +10 -12
@@ -8,27 +8,28 @@ import { EmptyState as u } from "../components/EmptyState.js";
8
8
  import { ErrorState as d } from "../components/ErrorState.js";
9
9
  import { BOTMANOR_PERMISSIONS as f } from "../permissions/botmanorPermissions.js";
10
10
  import { useBotmanorCan as ee } from "../permissions/useBotmanorPermissions.js";
11
- import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
12
- import { useAgent as g, useCreateAgent as te, useUpdateAgent as ne } from "../hooks/useAgents.js";
13
- import { useBot as re, useUpdateBot as ie } from "../hooks/useBots.js";
14
- import { useLinkAgentToBot as ae } from "../hooks/useBotAgents.js";
15
- import { useKnowledgeBases as oe } from "../hooks/useKnowledgeBases.js";
16
- import { useLLMModels as se, useLLMProviders as ce } from "../hooks/useLLMProviders.js";
17
- import { useMCPServers as le } from "../hooks/useMCPServers.js";
18
- import { AGENT_DEFAULTS as _, AGENT_FIELD_MESSAGES as ue, AGENT_FIELD_TAB as v, AGENT_MAX_CONCURRENT_RANGE as y, AGENT_MAX_TOKENS_RANGE as b, AGENT_TEMPERATURE_RANGE as x, OFFERED_CAPABILITIES as de, agentSlugFor as fe, capabilityWarnings as pe, parseNumberField as S, validateAgentForm as me } from "../utils/agentSettings.js";
11
+ import { FormField as p, Input as m, Textarea as te } from "../components/Input.js";
12
+ import { useAgent as h, useCreateAgent as ne, useUpdateAgent as re } from "../hooks/useAgents.js";
13
+ import { useBot as ie, useUpdateBot as ae } from "../hooks/useBots.js";
14
+ import { useLinkAgentToBot as oe } from "../hooks/useBotAgents.js";
15
+ import { CreateFromTemplate as se } from "../components/CreateFromTemplate.js";
16
+ import { useKnowledgeBases as ce } from "../hooks/useKnowledgeBases.js";
17
+ import { useLLMModels as le, useLLMProviders as ue } from "../hooks/useLLMProviders.js";
18
+ import { useMCPServers as de } from "../hooks/useMCPServers.js";
19
+ import { AGENT_DEFAULTS as g, AGENT_FIELD_MESSAGES as fe, AGENT_FIELD_TAB as pe, AGENT_MAX_CONCURRENT_RANGE as _, AGENT_MAX_TOKENS_RANGE as v, AGENT_TEMPERATURE_RANGE as y, OFFERED_CAPABILITIES as me, agentSlugFor as he, capabilityWarnings as ge, parseNumberField as b, validateAgentForm as _e } from "../utils/agentSettings.js";
19
20
  import "../permissions/index.js";
20
- import { cn as he } from "../utils/cn.js";
21
- import { configuredAnswerModels as ge } from "../utils/embedding-models.js";
22
- import { slugify as _e } from "../utils/botIdentity.js";
23
- import { toUnion as ve } from "../utils/unions.js";
24
- import { useMemo as ye, useRef as be, useState as C } from "react";
25
- import { PagePurpose as xe } from "@burdenoff/fe-libs/ui";
26
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
27
- import { useParams as E } from "react-router";
28
- import { AlertTriangle as D, ArrowLeft as Se, Brain as Ce, Save as we, Settings as Te, Sparkles as Ee, Wrench as De } from "lucide-react";
29
- import { toast as O } from "sonner";
21
+ import { cn as ve } from "../utils/cn.js";
22
+ import { configuredAnswerModels as ye } from "../utils/embedding-models.js";
23
+ import { slugify as be } from "../utils/botIdentity.js";
24
+ import { toUnion as x } from "../utils/unions.js";
25
+ import { useMemo as xe, useRef as Se, useState as S } from "react";
26
+ import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
27
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
28
+ import { useParams as T } from "react-router";
29
+ import { AlertTriangle as E, ArrowLeft as we, Brain as Te, Save as Ee, Settings as De, Sparkles as Oe, Wrench as ke } from "lucide-react";
30
+ import { toast as D } from "sonner";
30
31
  // src/botlit/pages/AgentBuilderPage.tsx
31
- var k = [
32
+ var O = [
32
33
  "MCP_TOOLS",
33
34
  "RAG",
34
35
  "REASONING",
@@ -37,19 +38,19 @@ var k = [
37
38
  "CODE_EXECUTION",
38
39
  "A2A",
39
40
  "WEB_BROWSING"
40
- ], Oe = [
41
+ ], Ae = [
41
42
  "ASSISTANT",
42
43
  "ANALYST",
43
44
  "AUTOMATION",
44
45
  "SPECIALIST"
45
46
  ];
46
- function ke(e) {
47
+ function je(e) {
47
48
  return e.flatMap((e) => {
48
- let t = k.find((t) => t === e);
49
+ let t = O.find((t) => t === e);
49
50
  return t ? [t] : [];
50
51
  });
51
52
  }
52
- var A = "🤖", Ae = [
53
+ var k = "🤖", Me = [
53
54
  {
54
55
  emoji: "🤖",
55
56
  key: "robot",
@@ -110,19 +111,20 @@ var A = "🤖", Ae = [
110
111
  key: "rocket",
111
112
  label: "Rocket"
112
113
  }
113
- ], j = "You are a helpful AI assistant. Be concise, accurate, and friendly.", M = [
114
+ ], A = "You are a helpful AI assistant. Be concise, accurate, and friendly.", j = [
114
115
  "basics",
115
116
  "prompt",
116
117
  "model",
117
118
  "tools"
118
119
  ];
119
- function je(e) {
120
+ function Ne(e) {
120
121
  return e ? {
121
122
  name: e.name,
122
123
  slug: e.slug,
123
124
  description: e.description ?? "",
124
- avatar: e.avatar || A,
125
+ avatar: e.avatar || k,
125
126
  type: e.type || "ASSISTANT",
127
+ visibility: x(e.visibility, Pe, "PRIVATE"),
126
128
  systemPrompt: e.systemPrompt ?? "",
127
129
  temperature: e.temperature == null ? "" : String(e.temperature),
128
130
  maxTokens: e.maxTokens == null ? "" : String(e.maxTokens),
@@ -135,9 +137,10 @@ function je(e) {
135
137
  name: "",
136
138
  slug: "",
137
139
  description: "",
138
- avatar: A,
140
+ avatar: k,
139
141
  type: "ASSISTANT",
140
- systemPrompt: j,
142
+ visibility: "PRIVATE",
143
+ systemPrompt: A,
141
144
  temperature: "",
142
145
  maxTokens: "",
143
146
  maxConcurrentExecutions: "",
@@ -147,263 +150,275 @@ function je(e) {
147
150
  mcpConnectionIds: []
148
151
  };
149
152
  }
150
- var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", N = () => {
151
- let r = e(), { agentId: i, botId: a } = E(), { navigateTo: o } = t(), { data: s, loading: l, error: f, refetch: ee } = g(i);
152
- return i ? l ? /* @__PURE__ */ w(n, {
153
+ var Pe = [
154
+ "PRIVATE",
155
+ "WORKSPACE",
156
+ "PUBLIC"
157
+ ], Fe = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", M = () => {
158
+ let r = e(), { agentId: i, botId: a } = T(), { navigateTo: o } = t(), { data: s, loading: l, error: f, refetch: ee } = h(i);
159
+ return i ? l ? /* @__PURE__ */ C(n, {
153
160
  title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
154
- children: /* @__PURE__ */ w("div", {
161
+ children: /* @__PURE__ */ C("div", {
155
162
  role: "status",
156
163
  "aria-busy": "true",
157
164
  "aria-label": r("botlit.common.loading", "Loading..."),
158
165
  className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
159
166
  })
160
- }) : f ? /* @__PURE__ */ w(n, {
167
+ }) : f ? /* @__PURE__ */ C(n, {
161
168
  title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
162
- children: /* @__PURE__ */ w(d, {
169
+ children: /* @__PURE__ */ C(d, {
163
170
  resource: r("botlit.agentBuilder.resource", "this agent"),
164
171
  error: f,
165
172
  onRetry: () => void ee()
166
173
  })
167
- }) : s ? /* @__PURE__ */ w(P, {
174
+ }) : s ? /* @__PURE__ */ C(N, {
168
175
  agent: s,
169
176
  botId: a
170
- }, s.id) : /* @__PURE__ */ w(n, {
177
+ }, s.id) : /* @__PURE__ */ C(n, {
171
178
  title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
172
- children: /* @__PURE__ */ w(u, {
179
+ children: /* @__PURE__ */ C(u, {
173
180
  illustration: "empty-agents",
174
181
  title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
175
182
  description: r("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
176
- action: /* @__PURE__ */ w(c, {
183
+ action: /* @__PURE__ */ C(c, {
177
184
  onClick: () => o(a ? `bots/${a}/agents` : "agents"),
178
185
  children: r("botlit.agentDetail.notFound.backAction", "Back to Agents")
179
186
  })
180
187
  })
181
- }) : /* @__PURE__ */ w(P, { botId: a });
182
- }, P = ({ agent: u, botId: g }) => {
183
- let E = e(), { navigateTo: k, workspaceId: A } = t(), j = !!u, N = g ? `bots/${g}/agents` : "agents", P = u ? `${N}/${u.id}` : N, [F, Pe] = C(() => je(u)), [I, Fe] = C("basics"), [L, Ie] = C(!1), Le = be({}), [Re, ze] = te(), [Be, Ve] = ne(), [He] = ae(), [Ue] = ie(), { data: We, loading: Ge, error: R, refetch: Ke } = re(g), qe = ee(), z = ze.loading || Ve.loading, B = !!g && !u, { data: V, loading: Je, error: Ye, refetch: Xe } = ce(), { data: Ze, loading: Qe, error: $e, refetch: et } = se(), H = Je || Qe, U = Ye || $e, W = ge(Ze ?? [], V ?? []), { data: G, loading: tt, error: nt, refetch: rt } = oe(), { data: it, loading: at, error: ot, refetch: st } = le(), K = ye(() => me(F), [F]), ct = Object.keys(K).length, lt = (e) => L && Object.keys(K).some((t) => v[t] === e), q = pe({
184
- capabilities: F.capabilities,
185
- mcpServerCount: F.mcpConnectionIds.length,
186
- knowledgeBaseCount: F.knowledgeBaseIds.length
187
- }), ut = F.llmModelId === "", J = (e, t) => Pe((n) => ({
188
+ }) : /* @__PURE__ */ C(N, { botId: a });
189
+ }, N = ({ agent: u, botId: h }) => {
190
+ let T = e(), { navigateTo: O, workspaceId: k } = t(), A = !!u, M = h ? `bots/${h}/agents` : "agents", N = u ? `${M}/${u.id}` : M, [P, F] = S(() => Ne(u)), [I, Le] = S("basics"), [L, Re] = S(!1), ze = Se({}), [Be, Ve] = ne(), [He, Ue] = re(), [We] = oe(), [Ge] = ae(), { data: Ke, loading: qe, error: R, refetch: Je } = ie(h), Ye = ee(), z = Ve.loading || Ue.loading, B = !!h && !u, { data: V, loading: Xe, error: Ze, refetch: Qe } = ue(), { data: $e, loading: et, error: tt, refetch: nt } = le(), H = Xe || et, U = Ze || tt, W = ye($e ?? [], V ?? []), { data: G, loading: rt, error: it, refetch: at } = ce(), { data: ot, loading: st, error: ct, refetch: lt } = de(), K = xe(() => _e(P), [P]), ut = Object.keys(K).length, dt = (e) => L && Object.keys(K).some((t) => pe[t] === e), q = ge({
191
+ capabilities: P.capabilities,
192
+ mcpServerCount: P.mcpConnectionIds.length,
193
+ knowledgeBaseCount: P.knowledgeBaseIds.length
194
+ }), ft = P.llmModelId === "", J = (e, t) => F((n) => ({
188
195
  ...n,
189
196
  [e]: t
190
- })), Y = (e, t) => Pe((n) => ({
197
+ })), Y = (e, t) => F((n) => ({
191
198
  ...n,
192
199
  [e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
193
200
  })), X = (e) => {
194
201
  let t = L ? K[e] : void 0;
195
- if (t) return E(`botlit.agentBuilder.errors.${t}`, ue[t]);
202
+ if (t) return T(`botlit.agentBuilder.errors.${t}`, fe[t]);
196
203
  }, Z = (e) => `agent-form-${e}`, Q = (e) => {
197
- Fe(e), Le.current[e]?.focus();
198
- }, dt = (e, t) => {
199
- let n = M.length - 1, r = e.key === "ArrowRight" ? (t + 1) % M.length : e.key === "ArrowLeft" ? (t - 1 + M.length) % M.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
200
- r !== void 0 && (e.preventDefault(), Q(M[r]));
201
- }, ft = [
204
+ Le(e), ze.current[e]?.focus();
205
+ }, pt = (e, t) => {
206
+ let n = j.length - 1, r = e.key === "ArrowRight" ? (t + 1) % j.length : e.key === "ArrowLeft" ? (t - 1 + j.length) % j.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
207
+ r !== void 0 && (e.preventDefault(), Q(j[r]));
208
+ }, mt = [
202
209
  {
203
210
  id: "basics",
204
- label: E("botlit.agentBuilder.tabs.basics", "Basic Info"),
205
- icon: /* @__PURE__ */ w(Ee, { size: 18 })
211
+ label: T("botlit.agentBuilder.tabs.basics", "Basic Info"),
212
+ icon: /* @__PURE__ */ C(Oe, { size: 18 })
206
213
  },
207
214
  {
208
215
  id: "prompt",
209
- label: E("botlit.agentBuilder.tabs.prompt", "Prompt"),
210
- icon: /* @__PURE__ */ w(Ce, { size: 18 })
216
+ label: T("botlit.agentBuilder.tabs.prompt", "Prompt"),
217
+ icon: /* @__PURE__ */ C(Te, { size: 18 })
211
218
  },
212
219
  {
213
220
  id: "model",
214
- label: E("botlit.agentBuilder.tabs.model", "LLM Model"),
215
- icon: /* @__PURE__ */ w(Te, { size: 18 })
221
+ label: T("botlit.agentBuilder.tabs.model", "LLM Model"),
222
+ icon: /* @__PURE__ */ C(De, { size: 18 })
216
223
  },
217
224
  {
218
225
  id: "tools",
219
- label: E("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
220
- icon: /* @__PURE__ */ w(De, { size: 18 })
226
+ label: T("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
227
+ icon: /* @__PURE__ */ C(ke, { size: 18 })
221
228
  }
222
- ], pt = async (e) => {
223
- if (e.preventDefault(), z || B && Ge) return;
229
+ ], ht = async (e) => {
230
+ if (e.preventDefault(), z || B && qe) return;
224
231
  if (B && R) {
225
- O.error(E("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
232
+ D.error(T("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
226
233
  return;
227
234
  }
228
- if (!A) {
229
- O.error(E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
235
+ if (!k) {
236
+ D.error(T("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
230
237
  return;
231
238
  }
232
- if (ct > 0) {
233
- Ie(!0);
234
- let e = M.find((e) => Object.keys(K).some((t) => v[t] === e));
239
+ if (ut > 0) {
240
+ Re(!0);
241
+ let e = j.find((e) => Object.keys(K).some((t) => pe[t] === e));
235
242
  e && Q(e);
236
243
  return;
237
244
  }
238
- let t = F.llmModelId !== (u?.llmModelId ?? "");
239
- if (F.llmModelId && t) {
245
+ let t = P.llmModelId !== (u?.llmModelId ?? "");
246
+ if (P.llmModelId && t) {
240
247
  if (H) {
241
- O.error(E("botlit.agentBuilder.modelLoading", "The model list is still loading. Try again in a moment.")), Q("model");
248
+ D.error(T("botlit.agentBuilder.modelLoading", "The model list is still loading. Try again in a moment.")), Q("model");
242
249
  return;
243
250
  }
244
- if (U || !W.some((e) => e.id === F.llmModelId)) {
245
- O.error(E("botlit.agentBuilder.modelUnavailable", "Choose an active answer model from the available catalog.")), Q("model");
251
+ if (U || !W.some((e) => e.id === P.llmModelId)) {
252
+ D.error(T("botlit.agentBuilder.modelUnavailable", "Choose an active answer model from the available catalog.")), Q("model");
246
253
  return;
247
254
  }
248
255
  }
249
- let n = F.name.trim(), r = fe(n, F.slug), i = S(F.temperature), a = S(F.maxTokens), o = S(F.maxConcurrentExecutions), s = F.description.trim(), c = ve(F.type, Oe, "ASSISTANT"), l = ke(F.capabilities);
256
+ let n = P.name.trim(), r = he(n, P.slug), i = b(P.temperature), a = b(P.maxTokens), o = b(P.maxConcurrentExecutions), s = P.description.trim(), c = x(P.type, Ae, "ASSISTANT"), l = je(P.capabilities);
250
257
  try {
251
258
  if (u) {
252
- await Be({
259
+ await He({
253
260
  agentId: u.id,
254
261
  input: {
255
262
  name: n,
256
263
  slug: r,
257
264
  description: s === "" ? null : s,
258
- avatar: F.avatar,
259
- systemPrompt: F.systemPrompt.trim(),
265
+ avatar: P.avatar,
266
+ systemPrompt: P.systemPrompt.trim(),
260
267
  temperature: i ?? null,
261
268
  maxTokens: a ?? null,
262
269
  maxConcurrentExecutions: o ?? null,
263
270
  capabilities: l,
264
- llmModelId: F.llmModelId === "" ? null : F.llmModelId,
265
- knowledgeBaseIds: F.knowledgeBaseIds,
266
- mcpConnectionIds: F.mcpConnectionIds,
267
- type: c
271
+ llmModelId: P.llmModelId === "" ? null : P.llmModelId,
272
+ knowledgeBaseIds: P.knowledgeBaseIds,
273
+ mcpConnectionIds: P.mcpConnectionIds,
274
+ type: c,
275
+ visibility: P.visibility
268
276
  }
269
- }), O.success(E("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), k(P);
277
+ }), D.success(T("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), O(N);
270
278
  return;
271
279
  }
272
- let e = await Re({
273
- workspaceId: A,
280
+ let e = await Be({
281
+ workspaceId: k,
274
282
  name: n,
275
283
  slug: r,
276
284
  type: c,
277
285
  description: s === "" ? void 0 : s,
278
- avatar: F.avatar,
279
- systemPrompt: F.systemPrompt.trim(),
286
+ avatar: P.avatar,
287
+ systemPrompt: P.systemPrompt.trim(),
280
288
  temperature: i,
281
289
  maxTokens: a,
282
290
  maxConcurrentExecutions: o,
283
291
  capabilities: l,
284
- llmModelId: F.llmModelId === "" ? void 0 : F.llmModelId,
285
- knowledgeBaseIds: F.knowledgeBaseIds,
286
- mcpConnectionIds: F.mcpConnectionIds
292
+ llmModelId: P.llmModelId === "" ? void 0 : P.llmModelId,
293
+ knowledgeBaseIds: P.knowledgeBaseIds,
294
+ mcpConnectionIds: P.mcpConnectionIds,
295
+ visibility: P.visibility
287
296
  });
288
- if (O.success(E("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), g) {
289
- if (!qe(f.APP_AGENT_CREATE)) {
290
- O.error(E("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), k(`agents/${e.id}`);
297
+ if (D.success(T("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), h) {
298
+ if (!Ye(f.APP_AGENT_CREATE)) {
299
+ D.error(T("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), O(`agents/${e.id}`);
291
300
  return;
292
301
  }
293
302
  try {
294
- await He({
295
- botId: g,
303
+ await We({
304
+ botId: h,
296
305
  agentId: e.id
297
306
  });
298
307
  } catch (t) {
299
- O.error(t instanceof Error ? E("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : E("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), k(`agents/${e.id}`);
308
+ D.error(t instanceof Error ? T("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : T("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), O(`agents/${e.id}`);
300
309
  return;
301
310
  }
302
- if (We && !We.defaultAgentId && qe(f.APP_UPDATE)) try {
303
- await Ue({
304
- botId: g,
311
+ if (Ke && !Ke.defaultAgentId && Ye(f.APP_UPDATE)) try {
312
+ await Ge({
313
+ botId: h,
305
314
  input: { defaultAgentId: e.id }
306
315
  });
307
316
  } catch (e) {
308
- O.error(e instanceof Error ? E("botlit.agentBuilder.defaultFailed", "The agent was linked, but it could not be set as the bot default: {{message}}", { message: e.message }) : E("botlit.agentBuilder.defaultFailedShort", "The agent was linked, but it could not be set as the bot default"));
317
+ D.error(e instanceof Error ? T("botlit.agentBuilder.defaultFailed", "The agent was linked, but it could not be set as the bot default: {{message}}", { message: e.message }) : T("botlit.agentBuilder.defaultFailedShort", "The agent was linked, but it could not be set as the bot default"));
309
318
  }
310
- k(`bots/${g}/agents`);
319
+ O(`bots/${h}/agents`);
311
320
  return;
312
321
  }
313
- k(`agents/${e.id}`);
322
+ O(`agents/${e.id}`);
314
323
  } catch (e) {
315
- O.error(e instanceof Error ? e.message : E("botlit.agentBuilder.saveFailed", "Failed to save agent"));
324
+ D.error(e instanceof Error ? e.message : T("botlit.agentBuilder.saveFailed", "Failed to save agent"));
316
325
  }
317
- }, $ = j ? E("botlit.agentBuilder.save", "Save Changes") : E("botlit.agentBuilder.create", "Create Agent"), mt = (e) => {
326
+ }, gt = A ? T("botlit.agentBuilder.save", "Save Changes") : T("botlit.agentBuilder.create", "Create Agent"), _t = (e) => {
318
327
  switch (e) {
319
- case "mcpToolsNeedsServer": return E("botlit.agentBuilder.warnings.mcpToolsNeedsServer", "MCP Tools is on but no MCP server is attached, so the agent has no tools. Attach a server on the Tools & Knowledge tab or turn it off.");
320
- case "ragNeedsKnowledgeBase": return E("botlit.agentBuilder.warnings.ragNeedsKnowledgeBase", "RAG is on but no knowledge base is attached, so nothing is retrieved. Attach a knowledge base or turn it off.");
321
- case "serversNeedMcpTools": return E("botlit.agentBuilder.warnings.serversNeedMcpTools", "MCP servers are attached but MCP Tools is off, so the agent ignores them. Turn MCP Tools on or detach the servers.");
322
- case "knowledgeBasesNeedRag": return E("botlit.agentBuilder.warnings.knowledgeBasesNeedRag", "Knowledge bases are attached but RAG is off, so the agent ignores them. Turn RAG on or detach them.");
328
+ case "mcpToolsNeedsServer": return T("botlit.agentBuilder.warnings.mcpToolsNeedsServer", "MCP Tools is on but no MCP server is attached, so the agent has no tools. Attach a server on the Tools & Knowledge tab or turn it off.");
329
+ case "ragNeedsKnowledgeBase": return T("botlit.agentBuilder.warnings.ragNeedsKnowledgeBase", "RAG is on but no knowledge base is attached, so nothing is retrieved. Attach a knowledge base or turn it off.");
330
+ case "serversNeedMcpTools": return T("botlit.agentBuilder.warnings.serversNeedMcpTools", "MCP servers are attached but MCP Tools is off, so the agent ignores them. Turn MCP Tools on or detach the servers.");
331
+ case "knowledgeBasesNeedRag": return T("botlit.agentBuilder.warnings.knowledgeBasesNeedRag", "Knowledge bases are attached but RAG is off, so the agent ignores them. Turn RAG on or detach them.");
323
332
  }
324
- }, ht = {
333
+ }, vt = {
325
334
  MCP_TOOLS: {
326
- label: E("botlit.agentBuilder.capabilities.mcpTools", "MCP Tools"),
327
- description: E("botlit.agentBuilder.capabilities.mcpToolsDescription", "Let the agent call the tools of the MCP servers attached below.")
335
+ label: T("botlit.agentBuilder.capabilities.mcpTools", "MCP Tools"),
336
+ description: T("botlit.agentBuilder.capabilities.mcpToolsDescription", "Let the agent call the tools of the MCP servers attached below.")
328
337
  },
329
338
  RAG: {
330
- label: E("botlit.agentBuilder.capabilities.rag", "RAG"),
331
- description: E("botlit.agentBuilder.capabilities.ragDescription", "Answer from the knowledge bases attached below (retrieval-augmented generation).")
339
+ label: T("botlit.agentBuilder.capabilities.rag", "RAG"),
340
+ description: T("botlit.agentBuilder.capabilities.ragDescription", "Answer from the knowledge bases attached below (retrieval-augmented generation).")
332
341
  },
333
342
  A2A: {
334
- label: E("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
335
- description: E("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
343
+ label: T("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
344
+ description: T("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
336
345
  }
337
- }, gt = F.capabilities.filter((e) => !de.includes(e)), _t = new Set(G.map((e) => e.id)), vt = new Set(it.map((e) => e.id)), yt = F.knowledgeBaseIds.filter((e) => !_t.has(e)), bt = G.filter((e) => F.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), xt = F.mcpConnectionIds.filter((e) => !vt.has(e)), St = F.llmModelId !== "" && !H && !U && !W.some((e) => e.id === F.llmModelId);
346
+ }, yt = P.capabilities.filter((e) => !me.includes(e)), bt = new Set(G.map((e) => e.id)), xt = new Set(ot.map((e) => e.id)), St = P.knowledgeBaseIds.filter((e) => !bt.has(e)), $ = G.filter((e) => P.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), Ct = P.mcpConnectionIds.filter((e) => !xt.has(e)), wt = P.llmModelId !== "" && !H && !U && !W.some((e) => e.id === P.llmModelId);
338
347
  return /* @__PURE__ */ w(n, {
339
- title: j ? E("botlit.agentBuilder.editTitle", "Edit Agent") : E("botlit.agentBuilder.createTitle", "Create New Agent"),
340
- leading: /* @__PURE__ */ w(c, {
348
+ title: A ? T("botlit.agentBuilder.editTitle", "Edit Agent") : T("botlit.agentBuilder.createTitle", "Create New Agent"),
349
+ leading: /* @__PURE__ */ C(c, {
341
350
  variant: "ghost",
342
351
  size: "icon",
343
- "aria-label": E("botlit.agentBuilder.back", "Back"),
344
- onClick: () => k(P),
345
- children: /* @__PURE__ */ w(Se, {
352
+ "aria-label": T("botlit.agentBuilder.back", "Back"),
353
+ onClick: () => O(N),
354
+ children: /* @__PURE__ */ C(we, {
346
355
  size: 20,
347
356
  "aria-hidden": "true"
348
357
  })
349
358
  }),
350
- actions: /* @__PURE__ */ T("div", {
359
+ actions: /* @__PURE__ */ w("div", {
351
360
  className: "flex gap-2",
352
- children: [/* @__PURE__ */ w(c, {
361
+ children: [/* @__PURE__ */ C(c, {
353
362
  variant: "outline",
354
- onClick: () => k(P),
355
- children: E("botlit.common.cancel", "Cancel")
356
- }), /* @__PURE__ */ w(c, {
363
+ onClick: () => O(N),
364
+ children: T("botlit.common.cancel", "Cancel")
365
+ }), /* @__PURE__ */ C(c, {
357
366
  type: "submit",
358
367
  form: "agent-builder-form",
359
- leftIcon: /* @__PURE__ */ w(we, { size: 16 }),
360
- isLoading: z || B && Ge,
361
- children: $
368
+ leftIcon: /* @__PURE__ */ C(Ee, { size: 16 }),
369
+ isLoading: z || B && qe,
370
+ children: gt
362
371
  })]
363
372
  }),
364
- children: /* @__PURE__ */ T("form", {
373
+ children: [!u && !h && /* @__PURE__ */ C("div", {
374
+ className: "mx-auto mb-6 max-w-4xl",
375
+ children: /* @__PURE__ */ C(se, {
376
+ kind: "agent",
377
+ onCreated: (e) => O(`agents/${e}`)
378
+ })
379
+ }), /* @__PURE__ */ w("form", {
365
380
  id: "agent-builder-form",
366
- onSubmit: (e) => void pt(e),
381
+ onSubmit: (e) => void ht(e),
367
382
  noValidate: !0,
368
383
  className: "max-w-4xl mx-auto",
369
384
  children: [
370
- /* @__PURE__ */ w(xe, {
385
+ /* @__PURE__ */ C(Ce, {
371
386
  className: "mb-6",
372
- icon: /* @__PURE__ */ w(Ee, { size: 18 }),
373
- children: E("botlit.agentBuilder.purpose", "This guided builder walks you through everything an agent needs: its identity and system prompt, the model and settings it runs on, and the tools and knowledge it can reach. Work through the steps, then save the agent and test it in chat. You can come back and edit any step later.")
387
+ icon: /* @__PURE__ */ C(Oe, { size: 18 }),
388
+ children: T("botlit.agentBuilder.purpose", "This guided builder walks you through everything an agent needs: its identity and system prompt, the model and settings it runs on, and the tools and knowledge it can reach. Work through the steps, then save the agent and test it in chat. You can come back and edit any step later.")
374
389
  }),
375
- B && R && /* @__PURE__ */ w("div", {
390
+ B && R && /* @__PURE__ */ C("div", {
376
391
  role: "alert",
377
392
  className: "mb-4",
378
- children: /* @__PURE__ */ w(d, {
379
- resource: E("botlit.agentBuilder.botResource", "this bot"),
393
+ children: /* @__PURE__ */ C(d, {
394
+ resource: T("botlit.agentBuilder.botResource", "this bot"),
380
395
  error: R,
381
- onRetry: () => void Ke()
396
+ onRetry: () => void Je()
382
397
  })
383
398
  }),
384
- !A && /* @__PURE__ */ w("p", {
399
+ !k && /* @__PURE__ */ C("p", {
385
400
  role: "status",
386
401
  className: "mb-4 text-sm text-text-secondary",
387
- children: E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
402
+ children: T("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
388
403
  }),
389
- L && ct > 0 && /* @__PURE__ */ T("div", {
404
+ L && ut > 0 && /* @__PURE__ */ w("div", {
390
405
  role: "alert",
391
406
  className: "mb-4 flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-text-primary",
392
- children: [/* @__PURE__ */ w(D, {
407
+ children: [/* @__PURE__ */ C(E, {
393
408
  size: 16,
394
409
  className: "mt-0.5 text-status-error-text",
395
410
  "aria-hidden": "true"
396
- }), /* @__PURE__ */ w("p", { children: E("botlit.agentBuilder.errorSummary", "Fix the highlighted fields before saving. Tabs with a problem are marked.") })]
411
+ }), /* @__PURE__ */ C("p", { children: T("botlit.agentBuilder.errorSummary", "Fix the highlighted fields before saving. Tabs with a problem are marked.") })]
397
412
  }),
398
- /* @__PURE__ */ w("div", {
413
+ /* @__PURE__ */ C("div", {
399
414
  role: "tablist",
400
- "aria-label": E("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
415
+ "aria-label": T("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
401
416
  className: "mb-8 flex flex-wrap items-center gap-2",
402
- children: ft.map((e, t) => {
403
- let n = I === e.id, r = lt(e.id);
404
- return /* @__PURE__ */ T("button", {
417
+ children: mt.map((e, t) => {
418
+ let n = I === e.id, r = dt(e.id);
419
+ return /* @__PURE__ */ w("button", {
405
420
  ref: (t) => {
406
- Le.current[e.id] = t;
421
+ ze.current[e.id] = t;
407
422
  },
408
423
  type: "button",
409
424
  role: "tab",
@@ -411,136 +426,162 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
411
426
  "aria-selected": n,
412
427
  "aria-controls": `agent-panel-${e.id}`,
413
428
  tabIndex: n ? 0 : -1,
414
- onClick: () => Fe(e.id),
415
- onKeyDown: (e) => dt(e, t),
416
- className: he("flex items-center gap-2 rounded-lg px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent", r && "ring-2 ring-status-error-border"),
429
+ onClick: () => Le(e.id),
430
+ onKeyDown: (e) => pt(e, t),
431
+ className: ve("flex items-center gap-2 rounded-lg px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent", r && "ring-2 ring-status-error-border"),
417
432
  children: [
418
433
  e.icon,
419
- /* @__PURE__ */ w("span", {
434
+ /* @__PURE__ */ C("span", {
420
435
  className: "font-medium",
421
436
  children: e.label
422
437
  }),
423
- r && /* @__PURE__ */ T("span", {
438
+ r && /* @__PURE__ */ w("span", {
424
439
  className: "text-status-error-text",
425
- children: [/* @__PURE__ */ w(D, {
440
+ children: [/* @__PURE__ */ C(E, {
426
441
  size: 14,
427
442
  "aria-hidden": "true"
428
- }), /* @__PURE__ */ w("span", {
443
+ }), /* @__PURE__ */ C("span", {
429
444
  className: "sr-only",
430
- children: E("botlit.agentBuilder.tabHasProblem", "This step has a problem")
445
+ children: T("botlit.agentBuilder.tabHasProblem", "This step has a problem")
431
446
  })]
432
447
  })
433
448
  ]
434
449
  }, e.id);
435
450
  })
436
451
  }),
437
- /* @__PURE__ */ T("div", {
452
+ /* @__PURE__ */ w("div", {
438
453
  className: "space-y-6",
439
454
  children: [
440
- /* @__PURE__ */ w("div", {
455
+ /* @__PURE__ */ C("div", {
441
456
  role: "tabpanel",
442
457
  id: "agent-panel-basics",
443
458
  "aria-labelledby": "agent-tab-basics",
444
459
  hidden: I !== "basics",
445
- children: /* @__PURE__ */ T(r, {
460
+ children: /* @__PURE__ */ w(r, {
446
461
  treatment: "glass",
447
462
  glow: !0,
448
- children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.basics.title", "Basic Information") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.basics.description", "Set up the agent's identity and purpose") })] }), /* @__PURE__ */ T(i, {
463
+ children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.basics.title", "Basic Information") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.basics.description", "Set up the agent's identity and purpose") })] }), /* @__PURE__ */ w(i, {
449
464
  className: "space-y-6",
450
465
  children: [
451
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
466
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
452
467
  className: "mb-2 text-sm font-medium",
453
- children: E("botlit.agentBuilder.avatar", "Avatar")
454
- }), /* @__PURE__ */ w(l, {
455
- value: F.avatar,
468
+ children: T("botlit.agentBuilder.avatar", "Avatar")
469
+ }), /* @__PURE__ */ C(l, {
470
+ value: P.avatar,
456
471
  onChange: (e) => J("avatar", e),
457
- choices: Ae,
458
- groupLabel: E("botlit.agentBuilder.avatar", "Avatar"),
459
- optionLabel: (e) => E(`botlit.agentBuilder.avatars.${e.key}`, e.label),
460
- currentLabel: E("botlit.agentBuilder.avatars.current", "Current avatar")
472
+ choices: Me,
473
+ groupLabel: T("botlit.agentBuilder.avatar", "Avatar"),
474
+ optionLabel: (e) => T(`botlit.agentBuilder.avatars.${e.key}`, e.label),
475
+ currentLabel: T("botlit.agentBuilder.avatars.current", "Current avatar")
461
476
  })] }),
462
- /* @__PURE__ */ w(p, {
463
- label: E("botlit.agentBuilder.name", "Agent Name"),
477
+ /* @__PURE__ */ C(p, {
478
+ label: T("botlit.agentBuilder.name", "Agent Name"),
464
479
  required: !0,
465
480
  htmlFor: Z("name"),
466
481
  error: X("name"),
467
- children: /* @__PURE__ */ w(m, {
482
+ children: /* @__PURE__ */ C(m, {
468
483
  id: Z("name"),
469
484
  required: !0,
470
485
  "aria-invalid": X("name") ? !0 : void 0,
471
486
  "aria-describedby": X("name") ? `${Z("name")}-error` : void 0,
472
487
  maxLength: 120,
473
- placeholder: E("botlit.agentBuilder.namePlaceholder", "e.g., Customer Support Agent"),
474
- value: F.name,
488
+ placeholder: T("botlit.agentBuilder.namePlaceholder", "e.g., Customer Support Agent"),
489
+ value: P.name,
475
490
  onChange: (e) => J("name", e.target.value)
476
491
  })
477
492
  }),
478
- /* @__PURE__ */ w(p, {
479
- label: E("botlit.agentBuilder.slug", "Slug"),
493
+ /* @__PURE__ */ C(p, {
494
+ label: T("botlit.agentBuilder.slug", "Slug"),
480
495
  htmlFor: Z("slug"),
481
496
  error: X("slug"),
482
- description: F.slug.trim() === "" && _e(F.name) !== "" ? E("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: _e(F.name) }) : E("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
483
- children: /* @__PURE__ */ w(m, {
497
+ description: P.slug.trim() === "" && be(P.name) !== "" ? T("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: be(P.name) }) : T("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
498
+ children: /* @__PURE__ */ C(m, {
484
499
  id: Z("slug"),
485
500
  "aria-invalid": X("slug") ? !0 : void 0,
486
501
  "aria-describedby": X("slug") ? `${Z("slug")}-error` : `${Z("slug")}-description`,
487
502
  placeholder: "customer-support-agent",
488
- value: F.slug,
503
+ value: P.slug,
489
504
  onChange: (e) => J("slug", e.target.value)
490
505
  })
491
506
  }),
492
- /* @__PURE__ */ w(p, {
493
- label: E("botlit.agentBuilder.descriptionLabel", "Description"),
507
+ /* @__PURE__ */ C(p, {
508
+ label: T("botlit.agentBuilder.descriptionLabel", "Description"),
494
509
  htmlFor: Z("description"),
495
- children: /* @__PURE__ */ w(h, {
510
+ children: /* @__PURE__ */ C(te, {
496
511
  id: Z("description"),
497
- placeholder: E("botlit.agentBuilder.descriptionPlaceholder", "Describe what this agent does..."),
498
- value: F.description,
512
+ placeholder: T("botlit.agentBuilder.descriptionPlaceholder", "Describe what this agent does..."),
513
+ value: P.description,
499
514
  onChange: (e) => J("description", e.target.value),
500
515
  rows: 3
501
516
  })
502
517
  }),
503
- /* @__PURE__ */ T("fieldset", { children: [
504
- /* @__PURE__ */ w("legend", {
518
+ /* @__PURE__ */ C(p, {
519
+ label: T("botlit.agentBuilder.visibilityLabel", "Visibility"),
520
+ htmlFor: Z("visibility"),
521
+ description: T("botlit.agentBuilder.visibilityHelp", "Private: only you. Workspace: everyone in this workspace. Public: shareable outside it."),
522
+ children: /* @__PURE__ */ w("select", {
523
+ id: Z("visibility"),
524
+ "aria-describedby": `${Z("visibility")}-description`,
525
+ className: Fe,
526
+ value: P.visibility,
527
+ onChange: (e) => J("visibility", x(e.target.value, Pe, "PRIVATE")),
528
+ children: [
529
+ /* @__PURE__ */ C("option", {
530
+ value: "PRIVATE",
531
+ children: T("botlit.agentBuilder.visibility.private", "Private")
532
+ }),
533
+ /* @__PURE__ */ C("option", {
534
+ value: "WORKSPACE",
535
+ children: T("botlit.agentBuilder.visibility.workspace", "Workspace")
536
+ }),
537
+ /* @__PURE__ */ C("option", {
538
+ value: "PUBLIC",
539
+ children: T("botlit.agentBuilder.visibility.public", "Public")
540
+ })
541
+ ]
542
+ })
543
+ }),
544
+ /* @__PURE__ */ w("fieldset", { children: [
545
+ /* @__PURE__ */ C("legend", {
505
546
  className: "mb-1 text-sm font-medium",
506
- children: E("botlit.agentBuilder.capabilitiesLabel", "Capabilities")
547
+ children: T("botlit.agentBuilder.capabilitiesLabel", "Capabilities")
507
548
  }),
508
- /* @__PURE__ */ w("p", {
549
+ /* @__PURE__ */ C("p", {
509
550
  className: "mb-3 text-xs text-text-secondary",
510
- children: E("botlit.agentBuilder.capabilitiesHelp", "Capabilities are off until you turn them on. Each one only does something once what it needs is attached on the Tools & Knowledge tab.")
551
+ children: T("botlit.agentBuilder.capabilitiesHelp", "Capabilities are off until you turn them on. Each one only does something once what it needs is attached on the Tools & Knowledge tab.")
511
552
  }),
512
- /* @__PURE__ */ w("div", {
553
+ /* @__PURE__ */ C("div", {
513
554
  className: "grid grid-cols-1 gap-3 md:grid-cols-3",
514
- children: de.map((e) => /* @__PURE__ */ T("label", {
555
+ children: me.map((e) => /* @__PURE__ */ w("label", {
515
556
  className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
516
- children: [/* @__PURE__ */ w("input", {
557
+ children: [/* @__PURE__ */ C("input", {
517
558
  type: "checkbox",
518
559
  className: "mt-0.5 h-4 w-4 rounded border-border-default",
519
- checked: F.capabilities.includes(e),
560
+ checked: P.capabilities.includes(e),
520
561
  onChange: () => Y("capabilities", e)
521
- }), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("span", {
562
+ }), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("span", {
522
563
  className: "block text-sm font-medium",
523
- children: ht[e].label
524
- }), /* @__PURE__ */ w("span", {
564
+ children: vt[e].label
565
+ }), /* @__PURE__ */ C("span", {
525
566
  className: "block text-xs text-text-secondary",
526
- children: ht[e].description
567
+ children: vt[e].description
527
568
  })] })]
528
569
  }, e))
529
570
  }),
530
- gt.length > 0 && /* @__PURE__ */ w("p", {
571
+ yt.length > 0 && /* @__PURE__ */ C("p", {
531
572
  className: "mt-3 text-xs text-text-secondary",
532
- children: E("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: gt.join(", ") })
573
+ children: T("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: yt.join(", ") })
533
574
  }),
534
- q.length > 0 && /* @__PURE__ */ w("ul", {
575
+ q.length > 0 && /* @__PURE__ */ C("ul", {
535
576
  role: "status",
536
577
  className: "mt-3 space-y-1 text-sm text-status-warning-text",
537
- children: q.map((e) => /* @__PURE__ */ T("li", {
578
+ children: q.map((e) => /* @__PURE__ */ w("li", {
538
579
  className: "flex items-start gap-2",
539
- children: [/* @__PURE__ */ w(D, {
580
+ children: [/* @__PURE__ */ C(E, {
540
581
  size: 14,
541
582
  className: "mt-0.5 shrink-0",
542
583
  "aria-hidden": "true"
543
- }), mt(e)]
584
+ }), _t(e)]
544
585
  }, e))
545
586
  })
546
587
  ] })
@@ -548,99 +589,99 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
548
589
  })]
549
590
  })
550
591
  }),
551
- /* @__PURE__ */ w("div", {
592
+ /* @__PURE__ */ C("div", {
552
593
  role: "tabpanel",
553
594
  id: "agent-panel-prompt",
554
595
  "aria-labelledby": "agent-tab-prompt",
555
596
  hidden: I !== "prompt",
556
- children: /* @__PURE__ */ T(r, {
597
+ children: /* @__PURE__ */ w(r, {
557
598
  treatment: "glass",
558
599
  glow: !0,
559
- children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.prompt.title", "Prompt Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.prompt.description", "Define how the agent communicates and behaves") })] }), /* @__PURE__ */ T(i, {
600
+ children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.prompt.title", "Prompt Configuration") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.prompt.description", "Define how the agent communicates and behaves") })] }), /* @__PURE__ */ w(i, {
560
601
  className: "space-y-6",
561
- children: [/* @__PURE__ */ w(p, {
562
- label: E("botlit.agentBuilder.systemPrompt", "System Prompt"),
602
+ children: [/* @__PURE__ */ C(p, {
603
+ label: T("botlit.agentBuilder.systemPrompt", "System Prompt"),
563
604
  required: !0,
564
605
  htmlFor: Z("prompt"),
565
606
  error: X("systemPrompt"),
566
- description: E("botlit.agentBuilder.systemPromptHelp", "The core instructions that define the agent's behavior"),
567
- children: /* @__PURE__ */ w(h, {
607
+ description: T("botlit.agentBuilder.systemPromptHelp", "The core instructions that define the agent's behavior"),
608
+ children: /* @__PURE__ */ C(te, {
568
609
  id: Z("prompt"),
569
610
  required: !0,
570
611
  "aria-invalid": X("systemPrompt") ? !0 : void 0,
571
612
  "aria-describedby": X("systemPrompt") ? `${Z("prompt")}-error` : `${Z("prompt")}-description`,
572
- placeholder: E("botlit.agentBuilder.systemPromptPlaceholder", "You are a helpful assistant..."),
573
- value: F.systemPrompt,
613
+ placeholder: T("botlit.agentBuilder.systemPromptPlaceholder", "You are a helpful assistant..."),
614
+ value: P.systemPrompt,
574
615
  onChange: (e) => J("systemPrompt", e.target.value),
575
616
  rows: 8,
576
617
  className: "font-mono text-sm"
577
618
  })
578
- }), /* @__PURE__ */ T("div", {
619
+ }), /* @__PURE__ */ w("div", {
579
620
  className: "grid grid-cols-1 gap-4 md:grid-cols-3",
580
621
  children: [
581
- /* @__PURE__ */ w(p, {
582
- label: E("botlit.agentBuilder.temperature", "Temperature"),
622
+ /* @__PURE__ */ C(p, {
623
+ label: T("botlit.agentBuilder.temperature", "Temperature"),
583
624
  htmlFor: Z("temperature"),
584
625
  error: X("temperature"),
585
- description: E("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
586
- min: x.min,
587
- max: x.max,
588
- default: _.temperature
626
+ description: T("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
627
+ min: y.min,
628
+ max: y.max,
629
+ default: g.temperature
589
630
  }),
590
- children: /* @__PURE__ */ w(m, {
631
+ children: /* @__PURE__ */ C(m, {
591
632
  id: Z("temperature"),
592
633
  type: "number",
593
634
  step: "0.1",
594
- min: x.min,
595
- max: x.max,
596
- placeholder: String(_.temperature),
635
+ min: y.min,
636
+ max: y.max,
637
+ placeholder: String(g.temperature),
597
638
  "aria-invalid": X("temperature") ? !0 : void 0,
598
639
  "aria-describedby": X("temperature") ? `${Z("temperature")}-error` : `${Z("temperature")}-description`,
599
- value: F.temperature,
640
+ value: P.temperature,
600
641
  onChange: (e) => J("temperature", e.target.value)
601
642
  })
602
643
  }),
603
- /* @__PURE__ */ w(p, {
604
- label: E("botlit.agentBuilder.maxTokens", "Max Tokens"),
644
+ /* @__PURE__ */ C(p, {
645
+ label: T("botlit.agentBuilder.maxTokens", "Max Tokens"),
605
646
  htmlFor: Z("max-tokens"),
606
647
  error: X("maxTokens"),
607
- description: E("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
608
- min: b.min,
609
- max: b.max,
610
- default: _.maxTokens
648
+ description: T("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
649
+ min: v.min,
650
+ max: v.max,
651
+ default: g.maxTokens
611
652
  }),
612
- children: /* @__PURE__ */ w(m, {
653
+ children: /* @__PURE__ */ C(m, {
613
654
  id: Z("max-tokens"),
614
655
  type: "number",
615
656
  step: "1",
616
- min: b.min,
617
- max: b.max,
618
- placeholder: String(_.maxTokens),
657
+ min: v.min,
658
+ max: v.max,
659
+ placeholder: String(g.maxTokens),
619
660
  "aria-invalid": X("maxTokens") ? !0 : void 0,
620
661
  "aria-describedby": X("maxTokens") ? `${Z("max-tokens")}-error` : `${Z("max-tokens")}-description`,
621
- value: F.maxTokens,
662
+ value: P.maxTokens,
622
663
  onChange: (e) => J("maxTokens", e.target.value)
623
664
  })
624
665
  }),
625
- /* @__PURE__ */ w(p, {
626
- label: E("botlit.agentBuilder.maxConcurrent", "Max Concurrent Runs"),
666
+ /* @__PURE__ */ C(p, {
667
+ label: T("botlit.agentBuilder.maxConcurrent", "Max Concurrent Runs"),
627
668
  htmlFor: Z("max-concurrent"),
628
669
  error: X("maxConcurrentExecutions"),
629
- description: E("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
630
- min: y.min,
631
- max: y.max,
632
- default: _.maxConcurrentExecutions
670
+ description: T("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
671
+ min: _.min,
672
+ max: _.max,
673
+ default: g.maxConcurrentExecutions
633
674
  }),
634
- children: /* @__PURE__ */ w(m, {
675
+ children: /* @__PURE__ */ C(m, {
635
676
  id: Z("max-concurrent"),
636
677
  type: "number",
637
678
  step: "1",
638
- min: y.min,
639
- max: y.max,
640
- placeholder: String(_.maxConcurrentExecutions),
679
+ min: _.min,
680
+ max: _.max,
681
+ placeholder: String(g.maxConcurrentExecutions),
641
682
  "aria-invalid": X("maxConcurrentExecutions") ? !0 : void 0,
642
683
  "aria-describedby": X("maxConcurrentExecutions") ? `${Z("max-concurrent")}-error` : `${Z("max-concurrent")}-description`,
643
- value: F.maxConcurrentExecutions,
684
+ value: P.maxConcurrentExecutions,
644
685
  onChange: (e) => J("maxConcurrentExecutions", e.target.value)
645
686
  })
646
687
  })
@@ -649,54 +690,54 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
649
690
  })]
650
691
  })
651
692
  }),
652
- /* @__PURE__ */ w("div", {
693
+ /* @__PURE__ */ C("div", {
653
694
  role: "tabpanel",
654
695
  id: "agent-panel-model",
655
696
  "aria-labelledby": "agent-tab-model",
656
697
  hidden: I !== "model",
657
- children: /* @__PURE__ */ T(r, {
698
+ children: /* @__PURE__ */ w(r, {
658
699
  treatment: "glass",
659
700
  glow: !0,
660
- children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.model.title", "LLM Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.model.description", "Select the LLM model for this agent") })] }), /* @__PURE__ */ T(i, {
701
+ children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(s, { children: T("botlit.agentBuilder.model.title", "LLM Configuration") }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.model.description", "Select the LLM model for this agent") })] }), /* @__PURE__ */ w(i, {
661
702
  className: "space-y-6",
662
703
  children: [
663
- /* @__PURE__ */ T(p, {
664
- label: E("botlit.agentBuilder.model.label", "LLM Model"),
704
+ /* @__PURE__ */ w(p, {
705
+ label: T("botlit.agentBuilder.model.label", "LLM Model"),
665
706
  htmlFor: Z("model"),
666
- description: E("botlit.agentBuilder.model.help", "An agent needs a model before it can go live. You can save it as a draft without one and test it in chat once a model is set."),
707
+ description: T("botlit.agentBuilder.model.help", "An agent needs a model before it can go live. You can save it as a draft without one and test it in chat once a model is set."),
667
708
  children: [
668
- H && /* @__PURE__ */ w("p", {
709
+ H && /* @__PURE__ */ C("p", {
669
710
  role: "status",
670
- children: E("botlit.agentBuilder.model.loading", "Loading answer models…")
711
+ children: T("botlit.agentBuilder.model.loading", "Loading answer models…")
671
712
  }),
672
- U && /* @__PURE__ */ T("div", {
713
+ U && /* @__PURE__ */ w("div", {
673
714
  role: "alert",
674
- children: [/* @__PURE__ */ w("p", { children: E("botlit.agentBuilder.model.loadFailed", "Could not load answer models.") }), /* @__PURE__ */ w(c, {
715
+ children: [/* @__PURE__ */ C("p", { children: T("botlit.agentBuilder.model.loadFailed", "Could not load answer models.") }), /* @__PURE__ */ C(c, {
675
716
  type: "button",
676
717
  variant: "secondary",
677
718
  onClick: () => {
678
- et(), Xe();
719
+ nt(), Qe();
679
720
  },
680
- children: E("botlit.agentBuilder.model.retry", "Retry model catalog")
721
+ children: T("botlit.agentBuilder.model.retry", "Retry model catalog")
681
722
  })]
682
723
  }),
683
- /* @__PURE__ */ T("select", {
724
+ /* @__PURE__ */ w("select", {
684
725
  id: Z("model"),
685
726
  "aria-describedby": `${Z("model")}-description`,
686
727
  disabled: H || !!U,
687
- className: Me,
688
- value: F.llmModelId,
728
+ className: Fe,
729
+ value: P.llmModelId,
689
730
  onChange: (e) => J("llmModelId", e.target.value),
690
731
  children: [
691
- /* @__PURE__ */ w("option", {
732
+ /* @__PURE__ */ C("option", {
692
733
  value: "",
693
- children: E("botlit.agentBuilder.model.none", "Select a model...")
734
+ children: T("botlit.agentBuilder.model.none", "Select a model...")
694
735
  }),
695
- St && /* @__PURE__ */ w("option", {
696
- value: F.llmModelId,
697
- children: E("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: F.llmModelId })
736
+ wt && /* @__PURE__ */ C("option", {
737
+ value: P.llmModelId,
738
+ children: T("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: P.llmModelId })
698
739
  }),
699
- W.map((e) => /* @__PURE__ */ T("option", {
740
+ W.map((e) => /* @__PURE__ */ w("option", {
700
741
  value: e.id,
701
742
  children: [
702
743
  e.name,
@@ -709,34 +750,34 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
709
750
  })
710
751
  ]
711
752
  }),
712
- ut && !H && !U && /* @__PURE__ */ T("div", {
753
+ ft && !H && !U && /* @__PURE__ */ w("div", {
713
754
  role: "status",
714
755
  className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
715
- children: [/* @__PURE__ */ w(D, {
756
+ children: [/* @__PURE__ */ C(E, {
716
757
  size: 16,
717
758
  className: "mt-0.5 shrink-0 text-status-warning-text",
718
759
  "aria-hidden": "true"
719
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", { children: W.length === 0 ? E("botlit.agentBuilder.model.noneConfigured", "No provider or model is configured in this workspace yet, so this agent cannot go live. Add a provider and a model in Settings first.") : E("botlit.agentBuilder.model.noneChosen", "No model is chosen. The agent can be saved as a draft, but it cannot go live until it has one.") }), W.length === 0 && /* @__PURE__ */ w(c, {
760
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", { children: W.length === 0 ? T("botlit.agentBuilder.model.noneConfigured", "No provider or model is configured in this workspace yet, so this agent cannot go live. Add a provider and a model in Settings first.") : T("botlit.agentBuilder.model.noneChosen", "No model is chosen. The agent can be saved as a draft, but it cannot go live until it has one.") }), W.length === 0 && /* @__PURE__ */ C(c, {
720
761
  type: "button",
721
762
  variant: "ghost",
722
763
  className: "px-0",
723
- onClick: () => k("settings"),
724
- children: E("botlit.agentBuilder.model.openSettings", "Open Settings")
764
+ onClick: () => O("settings"),
765
+ children: T("botlit.agentBuilder.model.openSettings", "Open Settings")
725
766
  })] })]
726
767
  }),
727
- /* @__PURE__ */ T("div", {
768
+ /* @__PURE__ */ w("div", {
728
769
  className: "rounded-lg bg-bg-sunken p-4",
729
- children: [/* @__PURE__ */ w("h4", {
770
+ children: [/* @__PURE__ */ C("h4", {
730
771
  className: "mb-2 text-sm font-medium",
731
- children: E("botlit.agentBuilder.model.providers", "Available Providers")
732
- }), /* @__PURE__ */ T("div", {
772
+ children: T("botlit.agentBuilder.model.providers", "Available Providers")
773
+ }), /* @__PURE__ */ w("div", {
733
774
  className: "grid grid-cols-2 gap-2",
734
- children: [V?.map((e) => /* @__PURE__ */ T("div", {
775
+ children: [V?.map((e) => /* @__PURE__ */ w("div", {
735
776
  className: "text-sm",
736
- children: [/* @__PURE__ */ w("span", {
777
+ children: [/* @__PURE__ */ C("span", {
737
778
  className: "font-medium",
738
779
  children: e.name
739
- }), /* @__PURE__ */ T("span", {
780
+ }), /* @__PURE__ */ w("span", {
740
781
  className: "ml-2 text-text-secondary",
741
782
  children: [
742
783
  "(",
@@ -744,9 +785,9 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
744
785
  ")"
745
786
  ]
746
787
  })]
747
- }, e.id)), !H && !U && !V?.length && /* @__PURE__ */ w("p", {
788
+ }, e.id)), !H && !U && !V?.length && /* @__PURE__ */ C("p", {
748
789
  className: "text-sm text-text-secondary",
749
- children: E("botlit.agentBuilder.model.noProviders", "No providers configured")
790
+ children: T("botlit.agentBuilder.model.noProviders", "No providers configured")
750
791
  })]
751
792
  })]
752
793
  })
@@ -754,89 +795,89 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
754
795
  })]
755
796
  })
756
797
  }),
757
- /* @__PURE__ */ w("div", {
798
+ /* @__PURE__ */ C("div", {
758
799
  role: "tabpanel",
759
800
  id: "agent-panel-tools",
760
801
  "aria-labelledby": "agent-tab-tools",
761
802
  hidden: I !== "tools",
762
- children: /* @__PURE__ */ T("div", {
803
+ children: /* @__PURE__ */ w("div", {
763
804
  className: "space-y-6",
764
805
  children: [
765
- /* @__PURE__ */ T(r, {
806
+ /* @__PURE__ */ w(r, {
766
807
  treatment: "glass",
767
808
  glow: !0,
768
- children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ T(s, {
809
+ children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ w(s, {
769
810
  className: "flex items-center gap-2",
770
- children: [/* @__PURE__ */ w(De, {
811
+ children: [/* @__PURE__ */ C(ke, {
771
812
  size: 18,
772
813
  "aria-hidden": "true"
773
- }), E("botlit.agentBuilder.tools.title", "MCP servers")]
774
- }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Ne, {
775
- legend: E("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
776
- items: it.map((e) => ({
814
+ }), T("botlit.agentBuilder.tools.title", "MCP servers")]
815
+ }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ C(i, { children: /* @__PURE__ */ C(Ie, {
816
+ legend: T("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
817
+ items: ot.map((e) => ({
777
818
  id: e.id,
778
819
  name: e.name,
779
820
  detail: e.status
780
821
  })),
781
- selected: F.mcpConnectionIds,
782
- missing: xt,
783
- loading: at,
784
- error: ot,
785
- onRetry: () => void st(),
822
+ selected: P.mcpConnectionIds,
823
+ missing: Ct,
824
+ loading: st,
825
+ error: ct,
826
+ onRetry: () => void lt(),
786
827
  onToggle: (e) => Y("mcpConnectionIds", e),
787
- emptyText: E("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
788
- resource: E("botlit.agentBuilder.tools.resource", "MCP servers")
828
+ emptyText: T("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
829
+ resource: T("botlit.agentBuilder.tools.resource", "MCP servers")
789
830
  }) })]
790
831
  }),
791
- /* @__PURE__ */ T(r, {
832
+ /* @__PURE__ */ w(r, {
792
833
  treatment: "glass",
793
834
  glow: !0,
794
- children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ T(s, {
835
+ children: [/* @__PURE__ */ w(o, { children: [/* @__PURE__ */ w(s, {
795
836
  className: "flex items-center gap-2",
796
- children: [/* @__PURE__ */ w(Ce, {
837
+ children: [/* @__PURE__ */ C(Te, {
797
838
  size: 18,
798
839
  "aria-hidden": "true"
799
- }), E("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
800
- }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Ne, {
801
- legend: E("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
840
+ }), T("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
841
+ }), /* @__PURE__ */ C(a, { children: T("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ C(i, { children: /* @__PURE__ */ C(Ie, {
842
+ legend: T("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
802
843
  items: G.map((e) => ({
803
844
  id: e.id,
804
845
  name: e.name,
805
846
  detail: e.indexStatus
806
847
  })),
807
- selected: F.knowledgeBaseIds,
808
- missing: yt,
809
- loading: tt,
810
- error: nt,
811
- onRetry: () => void rt(),
848
+ selected: P.knowledgeBaseIds,
849
+ missing: St,
850
+ loading: rt,
851
+ error: it,
852
+ onRetry: () => void at(),
812
853
  onToggle: (e) => Y("knowledgeBaseIds", e),
813
- emptyText: E("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
814
- resource: E("botlit.agentBuilder.knowledge.resource", "knowledge bases")
854
+ emptyText: T("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
855
+ resource: T("botlit.agentBuilder.knowledge.resource", "knowledge bases")
815
856
  }) })]
816
857
  }),
817
- q.length > 0 && /* @__PURE__ */ w("ul", {
858
+ q.length > 0 && /* @__PURE__ */ C("ul", {
818
859
  role: "status",
819
860
  className: "space-y-1 text-sm text-status-warning-text",
820
- children: q.map((e) => /* @__PURE__ */ T("li", {
861
+ children: q.map((e) => /* @__PURE__ */ w("li", {
821
862
  className: "flex items-start gap-2",
822
- children: [/* @__PURE__ */ w(D, {
863
+ children: [/* @__PURE__ */ C(E, {
823
864
  size: 14,
824
865
  className: "mt-0.5 shrink-0",
825
866
  "aria-hidden": "true"
826
- }), mt(e)]
867
+ }), _t(e)]
827
868
  }, e))
828
869
  }),
829
- bt.length > 0 && /* @__PURE__ */ w("ul", {
870
+ $.length > 0 && /* @__PURE__ */ C("ul", {
830
871
  role: "status",
831
872
  "data-testid": "builder-knowledge-not-ready",
832
873
  className: "space-y-1 text-sm text-status-warning-text",
833
- children: bt.map((e) => /* @__PURE__ */ T("li", {
874
+ children: $.map((e) => /* @__PURE__ */ w("li", {
834
875
  className: "flex items-start gap-2",
835
- children: [/* @__PURE__ */ w(D, {
876
+ children: [/* @__PURE__ */ C(E, {
836
877
  size: 14,
837
878
  className: "mt-0.5 shrink-0",
838
879
  "aria-hidden": "true"
839
- }), E("botlit.agentBuilder.knowledge.notReady", "\"{{name}}\" is {{status}}. An agent with RAG on cannot answer until it is ready.", {
880
+ }), T("botlit.agentBuilder.knowledge.notReady", "\"{{name}}\" is {{status}}. An agent with RAG on cannot answer until it is ready.", {
840
881
  name: e.name,
841
882
  status: e.indexStatus.toLowerCase()
842
883
  })]
@@ -845,80 +886,80 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
845
886
  ]
846
887
  })
847
888
  }),
848
- /* @__PURE__ */ T("div", {
889
+ /* @__PURE__ */ w("div", {
849
890
  className: "flex justify-between pt-6",
850
- children: [/* @__PURE__ */ w(c, {
891
+ children: [/* @__PURE__ */ C(c, {
851
892
  type: "button",
852
893
  variant: "outline",
853
- onClick: () => Q(M[Math.max(0, M.indexOf(I) - 1)]),
854
- disabled: I === M[0],
855
- children: E("botlit.agentBuilder.previous", "Previous")
856
- }), I === M[M.length - 1] ? /* @__PURE__ */ w(c, {
894
+ onClick: () => Q(j[Math.max(0, j.indexOf(I) - 1)]),
895
+ disabled: I === j[0],
896
+ children: T("botlit.agentBuilder.previous", "Previous")
897
+ }), I === j[j.length - 1] ? /* @__PURE__ */ C(c, {
857
898
  type: "submit",
858
- leftIcon: /* @__PURE__ */ w(we, { size: 16 }),
899
+ leftIcon: /* @__PURE__ */ C(Ee, { size: 16 }),
859
900
  isLoading: z,
860
- children: $
861
- }) : /* @__PURE__ */ w(c, {
901
+ children: gt
902
+ }, "submit") : /* @__PURE__ */ C(c, {
862
903
  type: "button",
863
- onClick: () => Q(M[M.indexOf(I) + 1]),
864
- children: E("botlit.agentBuilder.next", "Next")
865
- })]
904
+ onClick: () => Q(j[j.indexOf(I) + 1]),
905
+ children: T("botlit.agentBuilder.next", "Next")
906
+ }, "next")]
866
907
  })
867
908
  ]
868
909
  })
869
910
  ]
870
- })
911
+ })]
871
912
  });
872
- }, Ne = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
913
+ }, Ie = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
873
914
  let f = e();
874
- return a ? /* @__PURE__ */ w("p", {
915
+ return a ? /* @__PURE__ */ C("p", {
875
916
  role: "status",
876
917
  "aria-busy": "true",
877
918
  className: "text-sm text-text-secondary",
878
919
  children: f("botlit.agentBuilder.attachments.loading", "Loading {{resource}}…", { resource: u })
879
- }) : o ? /* @__PURE__ */ w(d, {
920
+ }) : o ? /* @__PURE__ */ C(d, {
880
921
  resource: u,
881
922
  error: o,
882
923
  onRetry: s
883
- }) : n.length === 0 && i.length === 0 ? /* @__PURE__ */ w("p", {
924
+ }) : n.length === 0 && i.length === 0 ? /* @__PURE__ */ C("p", {
884
925
  className: "text-sm text-text-secondary",
885
926
  children: l
886
- }) : /* @__PURE__ */ T("fieldset", { children: [/* @__PURE__ */ w("legend", {
927
+ }) : /* @__PURE__ */ w("fieldset", { children: [/* @__PURE__ */ C("legend", {
887
928
  className: "sr-only",
888
929
  children: t
889
- }), /* @__PURE__ */ T("ul", {
930
+ }), /* @__PURE__ */ w("ul", {
890
931
  className: "grid grid-cols-1 gap-2 md:grid-cols-2",
891
- children: [n.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("label", {
932
+ children: [n.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("label", {
892
933
  className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
893
- children: [/* @__PURE__ */ w("input", {
934
+ children: [/* @__PURE__ */ C("input", {
894
935
  type: "checkbox",
895
936
  className: "mt-0.5 h-4 w-4 rounded border-border-default",
896
937
  checked: r.includes(e.id),
897
938
  onChange: () => c(e.id)
898
- }), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("span", {
939
+ }), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("span", {
899
940
  className: "block text-sm font-medium",
900
941
  children: e.name
901
- }), e.detail && /* @__PURE__ */ w("span", {
942
+ }), e.detail && /* @__PURE__ */ C("span", {
902
943
  className: "block text-xs text-text-secondary",
903
944
  children: e.detail
904
945
  })] })]
905
- }) }, e.id)), i.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("label", {
946
+ }) }, e.id)), i.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("label", {
906
947
  className: "flex cursor-pointer items-start gap-3 rounded-lg border border-status-warning-border p-3",
907
- children: [/* @__PURE__ */ w("input", {
948
+ children: [/* @__PURE__ */ C("input", {
908
949
  type: "checkbox",
909
950
  className: "mt-0.5 h-4 w-4 rounded border-border-default",
910
951
  checked: !0,
911
952
  onChange: () => c(e)
912
- }), /* @__PURE__ */ T("span", { children: [
913
- /* @__PURE__ */ w("span", {
953
+ }), /* @__PURE__ */ w("span", { children: [
954
+ /* @__PURE__ */ C("span", {
914
955
  className: "block text-sm font-medium",
915
956
  children: f("botlit.agentBuilder.attachments.missing", "No longer available")
916
957
  }),
917
- /* @__PURE__ */ w("span", {
958
+ /* @__PURE__ */ C("span", {
918
959
  className: "block font-mono text-xs text-text-secondary",
919
960
  children: e
920
961
  }),
921
- /* @__PURE__ */ w("span", {
962
+ /* @__PURE__ */ C("span", {
922
963
  className: "block text-xs text-text-secondary",
923
964
  children: f("botlit.agentBuilder.attachments.missingHelp", "Untick to remove it from this agent.")
924
965
  })
@@ -926,6 +967,6 @@ var Me = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
926
967
  }) }, e))]
927
968
  })] });
928
969
  };
929
- export { N as AgentBuilderPage };
970
+ export { M as AgentBuilderPage };
930
971
 
931
972
  //# sourceMappingURL=AgentBuilderPage.js.map