@burdenoff/microfe-botmanor 2026.1119.2 → 2026.1119.4

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.
@@ -14,20 +14,21 @@ import { useAgent as g, useCreateAgent as ne, useUpdateAgent as re } from "../ho
14
14
  import { useBot as ie, useUpdateBot as ae } from "../hooks/useBots.js";
15
15
  import { useLinkAgentToBot as oe } from "../hooks/useBotAgents.js";
16
16
  import { CreateFromTemplate as se } from "../components/CreateFromTemplate.js";
17
- import { useKnowledgeBases as ce } from "../hooks/useKnowledgeBases.js";
18
- import { useLLMModels as le, useLLMProviders as ue } from "../hooks/useLLMProviders.js";
19
- import { useMCPServers as de } from "../hooks/useMCPServers.js";
20
- import { AGENT_DEFAULTS as _, AGENT_FIELD_MESSAGES as fe, AGENT_FIELD_TAB as pe, AGENT_MAX_CONCURRENT_RANGE as v, AGENT_MAX_TOKENS_RANGE as y, AGENT_TEMPERATURE_RANGE as b, OFFERED_CAPABILITIES as me, agentSlugFor as he, capabilityWarnings as ge, parseNumberField as x, validateAgentForm as _e } from "../utils/agentSettings.js";
17
+ import { DescribeBotDialog as ce } from "../components/DescribeBotDialog.js";
18
+ import { useKnowledgeBases as le } from "../hooks/useKnowledgeBases.js";
19
+ import { useLLMModels as ue, useLLMProviders as de } from "../hooks/useLLMProviders.js";
20
+ import { useMCPServers as fe } from "../hooks/useMCPServers.js";
21
+ import { AGENT_DEFAULTS as _, AGENT_FIELD_MESSAGES as pe, 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 me, agentSlugFor as he, capabilityWarnings as ge, parseNumberField as S, validateAgentForm as _e } from "../utils/agentSettings.js";
21
22
  import "../permissions/index.js";
22
23
  import { cn as ve } from "../utils/cn.js";
23
24
  import { configuredAnswerModels as ye } from "../utils/embedding-models.js";
24
- import { slugify as S } from "../utils/botIdentity.js";
25
+ import { slugify as be } from "../utils/botIdentity.js";
25
26
  import { toUnion as C } from "../utils/unions.js";
26
- import { useMemo as be, useRef as xe, useState as w } from "react";
27
- import { PagePurpose as Se } from "@burdenoff/fe-libs/ui";
27
+ import { useMemo as xe, useRef as Se, useState as w } from "react";
28
+ import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
28
29
  import { jsx as T, jsxs as E } from "react/jsx-runtime";
29
30
  import { useParams as D } from "react-router";
30
- import { AlertTriangle as O, ArrowLeft as Ce, Brain as we, Save as Te, Settings as Ee, Sparkles as De, Wrench as Oe } from "lucide-react";
31
+ import { AlertTriangle as O, ArrowLeft as we, Brain as Te, Save as Ee, Settings as De, Sparkles as Oe, Wrench as ke } from "lucide-react";
31
32
  import { toast as k } from "sonner";
32
33
  // src/botlit/pages/AgentBuilderPage.tsx
33
34
  var A = [
@@ -39,19 +40,19 @@ var A = [
39
40
  "CODE_EXECUTION",
40
41
  "A2A",
41
42
  "WEB_BROWSING"
42
- ], ke = [
43
+ ], Ae = [
43
44
  "ASSISTANT",
44
45
  "ANALYST",
45
46
  "AUTOMATION",
46
47
  "SPECIALIST"
47
48
  ];
48
- function Ae(e) {
49
+ function je(e) {
49
50
  return e.flatMap((e) => {
50
51
  let t = A.find((t) => t === e);
51
52
  return t ? [t] : [];
52
53
  });
53
54
  }
54
- var j = "🤖", je = [
55
+ var j = "🤖", Me = [
55
56
  {
56
57
  emoji: "🤖",
57
58
  key: "robot",
@@ -118,14 +119,14 @@ var j = "🤖", je = [
118
119
  "model",
119
120
  "tools"
120
121
  ];
121
- function Me(e) {
122
+ function Ne(e) {
122
123
  return e ? {
123
124
  name: e.name,
124
125
  slug: e.slug,
125
126
  description: e.description ?? "",
126
127
  avatar: e.avatar || j,
127
128
  type: e.type || "ASSISTANT",
128
- visibility: C(e.visibility, Ne, "PRIVATE"),
129
+ visibility: C(e.visibility, Pe, "PRIVATE"),
129
130
  systemPrompt: e.systemPrompt ?? "",
130
131
  temperature: e.temperature == null ? "" : String(e.temperature),
131
132
  maxTokens: e.maxTokens == null ? "" : String(e.maxTokens),
@@ -153,11 +154,11 @@ function Me(e) {
153
154
  mcpConnectionIds: []
154
155
  };
155
156
  }
156
- var Ne = [
157
+ var Pe = [
157
158
  "PRIVATE",
158
159
  "WORKSPACE",
159
160
  "PUBLIC"
160
- ], Pe = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", P = () => {
161
+ ], Fe = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", P = () => {
161
162
  let r = e(), { agentId: i, botId: a } = D(), { navigateTo: o } = t(), { data: s, loading: l, error: d, refetch: f } = g(i);
162
163
  return i ? l ? /* @__PURE__ */ T(n, {
163
164
  title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
@@ -190,47 +191,47 @@ var Ne = [
190
191
  })
191
192
  }) : /* @__PURE__ */ T(F, { botId: a });
192
193
  }, F = ({ agent: u, botId: g }) => {
193
- let D = e(), { navigateTo: A, workspaceId: j } = t(), M = !!u, P = g ? `bots/${g}/agents` : "agents", F = u ? `${P}/${u.id}` : P, [I, Ie] = w(() => Me(u)), [L, Le] = w("basics"), [R, Re] = w(!1), ze = xe({}), [Be, Ve] = ne(), [He, Ue] = re(), [We] = oe(), [Ge] = ae(), { data: Ke, loading: qe, error: z, refetch: Je } = ie(g), Ye = ee(), B = Ve.loading || Ue.loading, V = !!g && !u, { data: H, loading: Xe, error: Ze, refetch: Qe } = ue(), { data: $e, loading: et, error: tt, refetch: nt } = le(), U = Xe || et, W = Ze || tt, G = ye($e ?? [], H ?? []), { data: K, loading: rt, error: it, refetch: at } = ce(), { data: ot, loading: st, error: ct, refetch: lt } = de(), q = be(() => _e(I), [I]), ut = Object.keys(q).length, dt = (e) => R && Object.keys(q).some((t) => pe[t] === e), J = ge({
194
+ let D = e(), { navigateTo: A, workspaceId: j } = t(), M = !!u, P = g ? `bots/${g}/agents` : "agents", F = u ? `${P}/${u.id}` : P, [I, Le] = w(() => Ne(u)), [L, Re] = w("basics"), [R, ze] = w(!1), Be = Se({}), [Ve, He] = ne(), [Ue, We] = re(), [Ge] = oe(), [Ke] = ae(), { data: qe, loading: Je, error: z, refetch: Ye } = ie(g), Xe = ee(), B = He.loading || We.loading, V = !!g && !u, { data: H, loading: Ze, error: Qe, refetch: $e } = de(), { data: et, loading: tt, error: nt, refetch: rt } = ue(), U = Ze || tt, W = Qe || nt, G = ye(et ?? [], H ?? []), { data: K, loading: it, error: at, refetch: ot } = le(), { data: st, loading: ct, error: lt, refetch: ut } = fe(), q = xe(() => _e(I), [I]), dt = Object.keys(q).length, ft = (e) => R && Object.keys(q).some((t) => v[t] === e), J = ge({
194
195
  capabilities: I.capabilities,
195
196
  mcpServerCount: I.mcpConnectionIds.length,
196
197
  knowledgeBaseCount: I.knowledgeBaseIds.length
197
- }), ft = I.llmModelId === "", Y = (e, t) => Ie((n) => ({
198
+ }), pt = I.llmModelId === "", Y = (e, t) => Le((n) => ({
198
199
  ...n,
199
200
  [e]: t
200
- })), X = (e, t) => Ie((n) => ({
201
+ })), X = (e, t) => Le((n) => ({
201
202
  ...n,
202
203
  [e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
203
204
  })), Z = (e) => {
204
205
  let t = R ? q[e] : void 0;
205
- if (t) return D(`botlit.agentBuilder.errors.${t}`, fe[t]);
206
+ if (t) return D(`botlit.agentBuilder.errors.${t}`, pe[t]);
206
207
  }, Q = (e) => `agent-form-${e}`, $ = (e) => {
207
- Le(e), ze.current[e]?.focus();
208
- }, pt = (e, t) => {
208
+ Re(e), Be.current[e]?.focus();
209
+ }, mt = (e, t) => {
209
210
  let n = N.length - 1, r = e.key === "ArrowRight" ? (t + 1) % N.length : e.key === "ArrowLeft" ? (t - 1 + N.length) % N.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
210
211
  r !== void 0 && (e.preventDefault(), $(N[r]));
211
- }, mt = [
212
+ }, ht = [
212
213
  {
213
214
  id: "basics",
214
215
  label: D("botlit.agentBuilder.tabs.basics", "Basic Info"),
215
- icon: /* @__PURE__ */ T(De, { size: 18 })
216
+ icon: /* @__PURE__ */ T(Oe, { size: 18 })
216
217
  },
217
218
  {
218
219
  id: "prompt",
219
220
  label: D("botlit.agentBuilder.tabs.prompt", "Prompt"),
220
- icon: /* @__PURE__ */ T(we, { size: 18 })
221
+ icon: /* @__PURE__ */ T(Te, { size: 18 })
221
222
  },
222
223
  {
223
224
  id: "model",
224
225
  label: D("botlit.agentBuilder.tabs.model", "LLM Model"),
225
- icon: /* @__PURE__ */ T(Ee, { size: 18 })
226
+ icon: /* @__PURE__ */ T(De, { size: 18 })
226
227
  },
227
228
  {
228
229
  id: "tools",
229
230
  label: D("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
230
- icon: /* @__PURE__ */ T(Oe, { size: 18 })
231
+ icon: /* @__PURE__ */ T(ke, { size: 18 })
231
232
  }
232
- ], ht = async (e) => {
233
- if (e.preventDefault(), B || V && qe) return;
233
+ ], gt = async (e) => {
234
+ if (e.preventDefault(), B || V && Je) return;
234
235
  if (V && z) {
235
236
  k.error(D("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
236
237
  return;
@@ -239,9 +240,9 @@ var Ne = [
239
240
  k.error(D("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
240
241
  return;
241
242
  }
242
- if (ut > 0) {
243
- Re(!0);
244
- let e = N.find((e) => Object.keys(q).some((t) => pe[t] === e));
243
+ if (dt > 0) {
244
+ ze(!0);
245
+ let e = N.find((e) => Object.keys(q).some((t) => v[t] === e));
245
246
  e && $(e);
246
247
  return;
247
248
  }
@@ -256,10 +257,10 @@ var Ne = [
256
257
  return;
257
258
  }
258
259
  }
259
- let n = I.name.trim(), r = he(n, I.slug), i = x(I.temperature), a = x(I.maxTokens), o = x(I.maxConcurrentExecutions), s = I.description.trim(), c = C(I.type, ke, "ASSISTANT"), l = Ae(I.capabilities);
260
+ let n = I.name.trim(), r = he(n, I.slug), i = S(I.temperature), a = S(I.maxTokens), o = S(I.maxConcurrentExecutions), s = I.description.trim(), c = C(I.type, Ae, "ASSISTANT"), l = je(I.capabilities);
260
261
  try {
261
262
  if (u) {
262
- await He({
263
+ await Ue({
263
264
  agentId: u.id,
264
265
  input: {
265
266
  name: n,
@@ -281,7 +282,7 @@ var Ne = [
281
282
  }), k.success(D("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), A(F);
282
283
  return;
283
284
  }
284
- let e = await Be({
285
+ let e = await Ve({
285
286
  workspaceId: j,
286
287
  name: n,
287
288
  slug: r,
@@ -300,12 +301,12 @@ var Ne = [
300
301
  visibility: I.visibility
301
302
  });
302
303
  if (k.success(D("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), g) {
303
- if (!Ye(f.APP_AGENT_CREATE)) {
304
+ if (!Xe(f.APP_AGENT_CREATE)) {
304
305
  k.error(D("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), A(`agents/${e.id}`);
305
306
  return;
306
307
  }
307
308
  try {
308
- await We({
309
+ await Ge({
309
310
  botId: g,
310
311
  agentId: e.id
311
312
  });
@@ -313,8 +314,8 @@ var Ne = [
313
314
  k.error(t instanceof Error ? D("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : D("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), A(`agents/${e.id}`);
314
315
  return;
315
316
  }
316
- if (Ke && !Ke.defaultAgentId && Ye(f.APP_UPDATE)) try {
317
- await Ge({
317
+ if (qe && !qe.defaultAgentId && Xe(f.APP_UPDATE)) try {
318
+ await Ke({
318
319
  botId: g,
319
320
  input: { defaultAgentId: e.id }
320
321
  });
@@ -328,14 +329,14 @@ var Ne = [
328
329
  } catch (e) {
329
330
  k.error(e instanceof Error ? e.message : D("botlit.agentBuilder.saveFailed", "Failed to save agent"));
330
331
  }
331
- }, gt = M ? D("botlit.agentBuilder.save", "Save Changes") : D("botlit.agentBuilder.create", "Create Agent"), _t = (e) => {
332
+ }, _t = M ? D("botlit.agentBuilder.save", "Save Changes") : D("botlit.agentBuilder.create", "Create Agent"), vt = (e) => {
332
333
  switch (e) {
333
334
  case "mcpToolsNeedsServer": return D("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.");
334
335
  case "ragNeedsKnowledgeBase": return D("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.");
335
336
  case "serversNeedMcpTools": return D("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.");
336
337
  case "knowledgeBasesNeedRag": return D("botlit.agentBuilder.warnings.knowledgeBasesNeedRag", "Knowledge bases are attached but RAG is off, so the agent ignores them. Turn RAG on or detach them.");
337
338
  }
338
- }, vt = {
339
+ }, yt = {
339
340
  MCP_TOOLS: {
340
341
  label: D("botlit.agentBuilder.capabilities.mcpTools", "MCP Tools"),
341
342
  description: D("botlit.agentBuilder.capabilities.mcpToolsDescription", "Let the agent call the tools of the MCP servers attached below.")
@@ -348,7 +349,7 @@ var Ne = [
348
349
  label: D("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
349
350
  description: D("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
350
351
  }
351
- }, yt = I.capabilities.filter((e) => !me.includes(e)), bt = new Set(K.map((e) => e.id)), xt = new Set(ot.map((e) => e.id)), St = I.knowledgeBaseIds.filter((e) => !bt.has(e)), Ct = K.filter((e) => I.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), wt = I.mcpConnectionIds.filter((e) => !xt.has(e)), Tt = I.llmModelId !== "" && !U && !W && !G.some((e) => e.id === I.llmModelId);
352
+ }, bt = I.capabilities.filter((e) => !me.includes(e)), xt = new Set(K.map((e) => e.id)), St = new Set(st.map((e) => e.id)), Ct = I.knowledgeBaseIds.filter((e) => !xt.has(e)), wt = K.filter((e) => I.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), Tt = I.mcpConnectionIds.filter((e) => !St.has(e)), Et = I.llmModelId !== "" && !U && !W && !G.some((e) => e.id === I.llmModelId);
352
353
  return /* @__PURE__ */ E(n, {
353
354
  title: M ? D("botlit.agentBuilder.editTitle", "Edit Agent") : D("botlit.agentBuilder.createTitle", "Create New Agent"),
354
355
  leading: /* @__PURE__ */ T(c, {
@@ -356,7 +357,7 @@ var Ne = [
356
357
  size: "icon",
357
358
  "aria-label": D("botlit.agentBuilder.back", "Back"),
358
359
  onClick: () => A(F),
359
- children: /* @__PURE__ */ T(Ce, {
360
+ children: /* @__PURE__ */ T(we, {
360
361
  size: 20,
361
362
  "aria-hidden": "true"
362
363
  })
@@ -370,26 +371,32 @@ var Ne = [
370
371
  }), /* @__PURE__ */ T(c, {
371
372
  type: "submit",
372
373
  form: "agent-builder-form",
373
- leftIcon: /* @__PURE__ */ T(Te, { size: 16 }),
374
- isLoading: B || V && qe,
375
- children: gt
374
+ leftIcon: /* @__PURE__ */ T(Ee, { size: 16 }),
375
+ isLoading: B || V && Je,
376
+ children: _t
376
377
  })]
377
378
  }),
378
- children: [!u && !g && /* @__PURE__ */ T("div", {
379
- className: "mx-auto mb-6 max-w-4xl",
380
- children: /* @__PURE__ */ T(se, {
379
+ children: [!u && !g && /* @__PURE__ */ E("div", {
380
+ className: "mx-auto mb-6 max-w-4xl space-y-6",
381
+ children: [/* @__PURE__ */ T(ce, {
382
+ scope: "AGENTS",
383
+ onCreated: (e) => {
384
+ let t = e.agents[0];
385
+ A(e.agents.length === 1 && t ? `agents/${t.id}` : "agents");
386
+ }
387
+ }), /* @__PURE__ */ T(se, {
381
388
  kind: "agent",
382
389
  onCreated: (e) => A(`agents/${e}`)
383
- })
390
+ })]
384
391
  }), /* @__PURE__ */ E("form", {
385
392
  id: "agent-builder-form",
386
- onSubmit: (e) => void ht(e),
393
+ onSubmit: (e) => void gt(e),
387
394
  noValidate: !0,
388
395
  className: "max-w-4xl mx-auto",
389
396
  children: [
390
- /* @__PURE__ */ T(Se, {
397
+ /* @__PURE__ */ T(Ce, {
391
398
  className: "mb-6",
392
- icon: /* @__PURE__ */ T(De, { size: 18 }),
399
+ icon: /* @__PURE__ */ T(Oe, { size: 18 }),
393
400
  children: D("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.")
394
401
  }),
395
402
  V && z && /* @__PURE__ */ T("div", {
@@ -398,7 +405,7 @@ var Ne = [
398
405
  children: /* @__PURE__ */ T(p, {
399
406
  resource: D("botlit.agentBuilder.botResource", "this bot"),
400
407
  error: z,
401
- onRetry: () => void Je()
408
+ onRetry: () => void Ye()
402
409
  })
403
410
  }),
404
411
  !j && /* @__PURE__ */ T("p", {
@@ -406,7 +413,7 @@ var Ne = [
406
413
  className: "mb-4 text-sm text-text-secondary",
407
414
  children: D("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
408
415
  }),
409
- R && ut > 0 && /* @__PURE__ */ E("div", {
416
+ R && dt > 0 && /* @__PURE__ */ E("div", {
410
417
  role: "alert",
411
418
  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",
412
419
  children: [/* @__PURE__ */ T(O, {
@@ -419,11 +426,11 @@ var Ne = [
419
426
  role: "tablist",
420
427
  "aria-label": D("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
421
428
  className: "mb-8 flex flex-wrap items-center gap-2",
422
- children: mt.map((e, t) => {
423
- let n = L === e.id, r = dt(e.id);
429
+ children: ht.map((e, t) => {
430
+ let n = L === e.id, r = ft(e.id);
424
431
  return /* @__PURE__ */ E("button", {
425
432
  ref: (t) => {
426
- ze.current[e.id] = t;
433
+ Be.current[e.id] = t;
427
434
  },
428
435
  type: "button",
429
436
  role: "tab",
@@ -431,8 +438,8 @@ var Ne = [
431
438
  "aria-selected": n,
432
439
  "aria-controls": `agent-panel-${e.id}`,
433
440
  tabIndex: n ? 0 : -1,
434
- onClick: () => Le(e.id),
435
- onKeyDown: (e) => pt(e, t),
441
+ onClick: () => Re(e.id),
442
+ onKeyDown: (e) => mt(e, t),
436
443
  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"),
437
444
  children: [
438
445
  e.icon,
@@ -474,7 +481,7 @@ var Ne = [
474
481
  }), /* @__PURE__ */ T(l, {
475
482
  value: I.avatar,
476
483
  onChange: (e) => Y("avatar", e),
477
- choices: je,
484
+ choices: Me,
478
485
  groupLabel: D("botlit.agentBuilder.avatar", "Avatar"),
479
486
  optionLabel: (e) => D(`botlit.agentBuilder.avatars.${e.key}`, e.label),
480
487
  currentLabel: D("botlit.agentBuilder.avatars.current", "Current avatar")
@@ -499,7 +506,7 @@ var Ne = [
499
506
  label: D("botlit.agentBuilder.slug", "Slug"),
500
507
  htmlFor: Q("slug"),
501
508
  error: Z("slug"),
502
- description: I.slug.trim() === "" && S(I.name) !== "" ? D("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: S(I.name) }) : D("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
509
+ description: I.slug.trim() === "" && be(I.name) !== "" ? D("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: be(I.name) }) : D("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
503
510
  children: /* @__PURE__ */ T(h, {
504
511
  id: Q("slug"),
505
512
  "aria-invalid": Z("slug") ? !0 : void 0,
@@ -527,9 +534,9 @@ var Ne = [
527
534
  children: /* @__PURE__ */ E("select", {
528
535
  id: Q("visibility"),
529
536
  "aria-describedby": `${Q("visibility")}-description`,
530
- className: Pe,
537
+ className: Fe,
531
538
  value: I.visibility,
532
- onChange: (e) => Y("visibility", C(e.target.value, Ne, "PRIVATE")),
539
+ onChange: (e) => Y("visibility", C(e.target.value, Pe, "PRIVATE")),
533
540
  children: [
534
541
  /* @__PURE__ */ T("option", {
535
542
  value: "PRIVATE",
@@ -566,16 +573,16 @@ var Ne = [
566
573
  onChange: () => X("capabilities", e)
567
574
  }), /* @__PURE__ */ E("span", { children: [/* @__PURE__ */ T("span", {
568
575
  className: "block text-sm font-medium",
569
- children: vt[e].label
576
+ children: yt[e].label
570
577
  }), /* @__PURE__ */ T("span", {
571
578
  className: "block text-xs text-text-secondary",
572
- children: vt[e].description
579
+ children: yt[e].description
573
580
  })] })]
574
581
  }, e))
575
582
  }),
576
- yt.length > 0 && /* @__PURE__ */ T("p", {
583
+ bt.length > 0 && /* @__PURE__ */ T("p", {
577
584
  className: "mt-3 text-xs text-text-secondary",
578
- children: D("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: yt.join(", ") })
585
+ children: D("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: bt.join(", ") })
579
586
  }),
580
587
  J.length > 0 && /* @__PURE__ */ T("ul", {
581
588
  role: "status",
@@ -586,7 +593,7 @@ var Ne = [
586
593
  size: 14,
587
594
  className: "mt-0.5 shrink-0",
588
595
  "aria-hidden": "true"
589
- }), _t(e)]
596
+ }), vt(e)]
590
597
  }, e))
591
598
  })
592
599
  ] })
@@ -629,16 +636,16 @@ var Ne = [
629
636
  htmlFor: Q("temperature"),
630
637
  error: Z("temperature"),
631
638
  description: D("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
632
- min: b.min,
633
- max: b.max,
639
+ min: x.min,
640
+ max: x.max,
634
641
  default: _.temperature
635
642
  }),
636
643
  children: /* @__PURE__ */ T(h, {
637
644
  id: Q("temperature"),
638
645
  type: "number",
639
646
  step: "0.1",
640
- min: b.min,
641
- max: b.max,
647
+ min: x.min,
648
+ max: x.max,
642
649
  placeholder: String(_.temperature),
643
650
  "aria-invalid": Z("temperature") ? !0 : void 0,
644
651
  "aria-describedby": Z("temperature") ? `${Q("temperature")}-error` : `${Q("temperature")}-description`,
@@ -651,16 +658,16 @@ var Ne = [
651
658
  htmlFor: Q("max-tokens"),
652
659
  error: Z("maxTokens"),
653
660
  description: D("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
654
- min: y.min,
655
- max: y.max,
661
+ min: b.min,
662
+ max: b.max,
656
663
  default: _.maxTokens
657
664
  }),
658
665
  children: /* @__PURE__ */ T(h, {
659
666
  id: Q("max-tokens"),
660
667
  type: "number",
661
668
  step: "1",
662
- min: y.min,
663
- max: y.max,
669
+ min: b.min,
670
+ max: b.max,
664
671
  placeholder: String(_.maxTokens),
665
672
  "aria-invalid": Z("maxTokens") ? !0 : void 0,
666
673
  "aria-describedby": Z("maxTokens") ? `${Q("max-tokens")}-error` : `${Q("max-tokens")}-description`,
@@ -673,16 +680,16 @@ var Ne = [
673
680
  htmlFor: Q("max-concurrent"),
674
681
  error: Z("maxConcurrentExecutions"),
675
682
  description: D("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
676
- min: v.min,
677
- max: v.max,
683
+ min: y.min,
684
+ max: y.max,
678
685
  default: _.maxConcurrentExecutions
679
686
  }),
680
687
  children: /* @__PURE__ */ T(h, {
681
688
  id: Q("max-concurrent"),
682
689
  type: "number",
683
690
  step: "1",
684
- min: v.min,
685
- max: v.max,
691
+ min: y.min,
692
+ max: y.max,
686
693
  placeholder: String(_.maxConcurrentExecutions),
687
694
  "aria-invalid": Z("maxConcurrentExecutions") ? !0 : void 0,
688
695
  "aria-describedby": Z("maxConcurrentExecutions") ? `${Q("max-concurrent")}-error` : `${Q("max-concurrent")}-description`,
@@ -721,7 +728,7 @@ var Ne = [
721
728
  type: "button",
722
729
  variant: "secondary",
723
730
  onClick: () => {
724
- nt(), Qe();
731
+ rt(), $e();
725
732
  },
726
733
  children: D("botlit.agentBuilder.model.retry", "Retry model catalog")
727
734
  })]
@@ -730,7 +737,7 @@ var Ne = [
730
737
  id: Q("model"),
731
738
  "aria-describedby": `${Q("model")}-description`,
732
739
  disabled: U || !!W,
733
- className: Pe,
740
+ className: Fe,
734
741
  value: I.llmModelId,
735
742
  onChange: (e) => Y("llmModelId", e.target.value),
736
743
  children: [
@@ -738,7 +745,7 @@ var Ne = [
738
745
  value: "",
739
746
  children: D("botlit.agentBuilder.model.none", "Select a model...")
740
747
  }),
741
- Tt && /* @__PURE__ */ T("option", {
748
+ Et && /* @__PURE__ */ T("option", {
742
749
  value: I.llmModelId,
743
750
  children: D("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: I.llmModelId })
744
751
  }),
@@ -767,7 +774,7 @@ var Ne = [
767
774
  providerName: H?.find((t) => t.id === e.providerId)?.name
768
775
  }))
769
776
  }),
770
- ft && !U && !W && /* @__PURE__ */ E("div", {
777
+ pt && !U && !W && /* @__PURE__ */ E("div", {
771
778
  role: "status",
772
779
  className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
773
780
  children: [/* @__PURE__ */ T(O, {
@@ -825,22 +832,22 @@ var Ne = [
825
832
  glow: !0,
826
833
  children: [/* @__PURE__ */ E(o, { children: [/* @__PURE__ */ E(s, {
827
834
  className: "flex items-center gap-2",
828
- children: [/* @__PURE__ */ T(Oe, {
835
+ children: [/* @__PURE__ */ T(ke, {
829
836
  size: 18,
830
837
  "aria-hidden": "true"
831
838
  }), D("botlit.agentBuilder.tools.title", "MCP servers")]
832
- }), /* @__PURE__ */ T(a, { children: D("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(Fe, {
839
+ }), /* @__PURE__ */ T(a, { children: D("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(Ie, {
833
840
  legend: D("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
834
- items: ot.map((e) => ({
841
+ items: st.map((e) => ({
835
842
  id: e.id,
836
843
  name: e.name,
837
844
  detail: e.status
838
845
  })),
839
846
  selected: I.mcpConnectionIds,
840
- missing: wt,
841
- loading: st,
842
- error: ct,
843
- onRetry: () => void lt(),
847
+ missing: Tt,
848
+ loading: ct,
849
+ error: lt,
850
+ onRetry: () => void ut(),
844
851
  onToggle: (e) => X("mcpConnectionIds", e),
845
852
  emptyText: D("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
846
853
  resource: D("botlit.agentBuilder.tools.resource", "MCP servers")
@@ -851,11 +858,11 @@ var Ne = [
851
858
  glow: !0,
852
859
  children: [/* @__PURE__ */ E(o, { children: [/* @__PURE__ */ E(s, {
853
860
  className: "flex items-center gap-2",
854
- children: [/* @__PURE__ */ T(we, {
861
+ children: [/* @__PURE__ */ T(Te, {
855
862
  size: 18,
856
863
  "aria-hidden": "true"
857
864
  }), D("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
858
- }), /* @__PURE__ */ T(a, { children: D("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(Fe, {
865
+ }), /* @__PURE__ */ T(a, { children: D("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(Ie, {
859
866
  legend: D("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
860
867
  items: K.map((e) => ({
861
868
  id: e.id,
@@ -863,10 +870,10 @@ var Ne = [
863
870
  detail: e.indexStatus
864
871
  })),
865
872
  selected: I.knowledgeBaseIds,
866
- missing: St,
867
- loading: rt,
868
- error: it,
869
- onRetry: () => void at(),
873
+ missing: Ct,
874
+ loading: it,
875
+ error: at,
876
+ onRetry: () => void ot(),
870
877
  onToggle: (e) => X("knowledgeBaseIds", e),
871
878
  emptyText: D("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
872
879
  resource: D("botlit.agentBuilder.knowledge.resource", "knowledge bases")
@@ -881,14 +888,14 @@ var Ne = [
881
888
  size: 14,
882
889
  className: "mt-0.5 shrink-0",
883
890
  "aria-hidden": "true"
884
- }), _t(e)]
891
+ }), vt(e)]
885
892
  }, e))
886
893
  }),
887
- Ct.length > 0 && /* @__PURE__ */ T("ul", {
894
+ wt.length > 0 && /* @__PURE__ */ T("ul", {
888
895
  role: "status",
889
896
  "data-testid": "builder-knowledge-not-ready",
890
897
  className: "space-y-1 text-sm text-status-warning-text",
891
- children: Ct.map((e) => /* @__PURE__ */ E("li", {
898
+ children: wt.map((e) => /* @__PURE__ */ E("li", {
892
899
  className: "flex items-start gap-2",
893
900
  children: [/* @__PURE__ */ T(O, {
894
901
  size: 14,
@@ -913,9 +920,9 @@ var Ne = [
913
920
  children: D("botlit.agentBuilder.previous", "Previous")
914
921
  }), L === N[N.length - 1] ? /* @__PURE__ */ T(c, {
915
922
  type: "submit",
916
- leftIcon: /* @__PURE__ */ T(Te, { size: 16 }),
923
+ leftIcon: /* @__PURE__ */ T(Ee, { size: 16 }),
917
924
  isLoading: B,
918
- children: gt
925
+ children: _t
919
926
  }, "submit") : /* @__PURE__ */ T(c, {
920
927
  type: "button",
921
928
  onClick: () => $(N[N.indexOf(L) + 1]),
@@ -927,7 +934,7 @@ var Ne = [
927
934
  ]
928
935
  })]
929
936
  });
930
- }, Fe = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
937
+ }, Ie = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
931
938
  let d = e();
932
939
  return a ? /* @__PURE__ */ T("p", {
933
940
  role: "status",