@burdenoff/microfe-botmanor 2026.1115.2 → 2026.1116.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 (39) hide show
  1. package/dist/botlit/components/BotFormFields.js +66 -87
  2. package/dist/botlit/components/BotFormFields.js.map +1 -1
  3. package/dist/botlit/components/EmojiPicker.d.ts +20 -0
  4. package/dist/botlit/components/EmojiPicker.js +42 -0
  5. package/dist/botlit/components/EmojiPicker.js.map +1 -0
  6. package/dist/botlit/components/index.d.ts +1 -0
  7. package/dist/botlit/hooks/internal/allPages.d.ts +2 -0
  8. package/dist/botlit/hooks/internal/allPages.js +25 -0
  9. package/dist/botlit/hooks/internal/allPages.js.map +1 -0
  10. package/dist/botlit/hooks/useAgents.d.ts +24 -3
  11. package/dist/botlit/hooks/useAgents.js +158 -109
  12. package/dist/botlit/hooks/useAgents.js.map +1 -1
  13. package/dist/botlit/hooks/useBotAgents.d.ts +23 -0
  14. package/dist/botlit/hooks/useBotAgents.js +69 -0
  15. package/dist/botlit/hooks/useBotAgents.js.map +1 -0
  16. package/dist/botlit/hooks/useBots.js +2 -2
  17. package/dist/botlit/hooks/useBots.js.map +1 -1
  18. package/dist/botlit/hooks/useKnowledgeBases.js +40 -44
  19. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
  20. package/dist/botlit/hooks/useMCPServers.js +53 -57
  21. package/dist/botlit/hooks/useMCPServers.js.map +1 -1
  22. package/dist/botlit/pages/AgentBuilderPage.js +832 -425
  23. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  24. package/dist/botlit/pages/AgentDetailPage.js +407 -325
  25. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  26. package/dist/botlit/pages/AgentsListPage.js +487 -291
  27. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  28. package/dist/botlit/types/index.d.ts +4 -1
  29. package/dist/botlit/utils/agentDelete.d.ts +5 -0
  30. package/dist/botlit/utils/agentDelete.js +15 -0
  31. package/dist/botlit/utils/agentDelete.js.map +1 -0
  32. package/dist/botlit/utils/agentSettings.d.ts +77 -0
  33. package/dist/botlit/utils/agentSettings.js +78 -0
  34. package/dist/botlit/utils/agentSettings.js.map +1 -0
  35. package/dist/generated/wspace-operations.d.ts +4 -0
  36. package/dist/generated/wspace-operations.js.map +1 -1
  37. package/dist/generated/wspace-types.d.ts +43 -0
  38. package/dist/generated/wspace-types.js.map +1 -1
  39. package/package.json +1 -1
@@ -1,405 +1,487 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { PageLayout as t } from "../components/PageLayout.js";
3
- import { HandoffConfigPanel as ee } from "../components/HandoffConfigPanel.js";
4
- import { Card as n, CardContent as r, CardDescription as i, CardHeader as a, CardTitle as o } from "../components/Card.js";
5
- import { Button as s } from "../components/Button.js";
6
- import { BOTMANOR_PERMISSIONS as c } from "../permissions/botmanorPermissions.js";
7
- import { BotmanorPermissionGate as l, useBotmanorCan as te } from "../permissions/useBotmanorPermissions.js";
8
- import { Badge as u, StatusBadge as d } from "../components/Badge.js";
9
- import { EmptyState as ne } from "../components/EmptyState.js";
3
+ import { HandoffConfigPanel as n } from "../components/HandoffConfigPanel.js";
4
+ import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "../components/Card.js";
5
+ import { Button as c } from "../components/Button.js";
6
+ import { Badge as l, StatusBadge as u } from "../components/Badge.js";
7
+ import { EmptyState as ee } from "../components/EmptyState.js";
8
+ import { BOTMANOR_PERMISSIONS as d } from "../permissions/botmanorPermissions.js";
9
+ import { BotmanorPermissionGate as f, useBotmanorCan as te } from "../permissions/useBotmanorPermissions.js";
10
+ import { ErrorState as ne } from "../components/ErrorState.js";
10
11
  import { VersionHistoryPanel as re } from "../components/VersionHistoryPanel.js";
11
12
  import { AgentApprovalPanel as ie } from "../components/AgentApprovalPanel.js";
12
13
  import { useAgentApprovalSettings as ae } from "../hooks/useAgentApprovals.js";
13
- import { AssistantRuntimeSetupPanel as f } from "../components/AssistantRuntimeSetupPanel.js";
14
- import { AssistantChannelPanel as p } from "../components/AssistantChannelPanel.js";
15
- import { AssistantWebsitePanel as m } from "../components/AssistantWebsitePanel.js";
16
- import { AiOperationsPanel as h } from "../components/AiOperationsPanel.js";
17
- import { useAgent as g, useDeleteAgent as _, useUpdateAgent as v } from "../hooks/useAgents.js";
18
- import { useBotlit as y } from "../providers/BotlitProvider.js";
19
- import { formatRelativeTime as b } from "../utils/formatters.js";
20
- import { cn as oe } from "../utils/cn.js";
14
+ import { AssistantRuntimeSetupPanel as oe } from "../components/AssistantRuntimeSetupPanel.js";
15
+ import { AssistantChannelPanel as se } from "../components/AssistantChannelPanel.js";
16
+ import { AssistantWebsitePanel as ce } from "../components/AssistantWebsitePanel.js";
17
+ import { AiOperationsPanel as le } from "../components/AiOperationsPanel.js";
18
+ import { useAgent as ue, useDeleteAgent as de, useLoadAgentUsage as fe, useUpdateAgent as pe } from "../hooks/useAgents.js";
19
+ import { useKnowledgeBases as me } from "../hooks/useKnowledgeBases.js";
20
+ import { useMCPServers as he } from "../hooks/useMCPServers.js";
21
+ import { useBotlit as ge } from "../providers/BotlitProvider.js";
22
+ import { formatRelativeTime as p } from "../utils/formatters.js";
23
+ import { cn as _e } from "../utils/cn.js";
24
+ import { agentDeleteMessage as ve } from "../utils/agentDelete.js";
25
+ import { confirmAction as m } from "../utils/confirmAction.js";
21
26
  import "../permissions/index.js";
22
- import { useState as se } from "react";
23
- import { GlassCard as ce, NextSteps as le, PagePurpose as ue } from "@burdenoff/fe-libs/ui";
24
- import { Fragment as de, jsx as x, jsxs as S } from "react/jsx-runtime";
25
- import { useParams as fe } from "react-router";
26
- import { ArrowLeft as pe, BarChart3 as me, BookOpen as C, Brain as w, Edit as he, FileText as T, Headset as ge, History as _e, MessageSquare as ve, Play as E, Settings as D, Share2 as O, Shield as k, ShieldCheck as A, Trash2 as j, Wrench as M } from "lucide-react";
27
- import { toast as N } from "sonner";
27
+ import { useState as ye } from "react";
28
+ import { GlassCard as be, NextSteps as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
29
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
30
+ import { useParams as Ce } from "react-router";
31
+ import { ArrowLeft as we, BarChart3 as Te, BookOpen as v, Brain as y, Edit as Ee, FileText as b, Headset as De, History as Oe, MessageSquare as ke, Play as x, Settings as S, Share2 as C, Shield as w, ShieldCheck as Ae, Trash2 as je, Wrench as T } from "lucide-react";
32
+ import { toast as E } from "sonner";
28
33
  // src/botlit/pages/AgentDetailPage.tsx
29
- var P = () => {
30
- let P = e(), { agentId: F } = fe(), { navigateTo: I } = y(), L = te(), { data: R, loading: ye, refetch: z } = g(F), [B, V] = v(), [be, xe] = _(), [H, U] = se("overview"), Se = ae();
31
- if (ye) return /* @__PURE__ */ x(t, {
32
- title: P("botlit.common.loading", "Loading..."),
33
- children: /* @__PURE__ */ x("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
34
+ var Me = "🤖", D = {
35
+ key: "activate",
36
+ to: "ACTIVE",
37
+ variant: "default",
38
+ confirm: !1
39
+ }, O = {
40
+ key: "resume",
41
+ to: "ACTIVE",
42
+ variant: "default",
43
+ confirm: !1
44
+ }, k = {
45
+ key: "pause",
46
+ to: "PAUSED",
47
+ variant: "outline",
48
+ confirm: !0
49
+ }, A = {
50
+ key: "archive",
51
+ to: "ARCHIVED",
52
+ variant: "outline",
53
+ confirm: !0
54
+ }, Ne = {
55
+ DRAFT: [D, A],
56
+ ACTIVE: [k, A],
57
+ PAUSED: [O, A],
58
+ TRAINING: [k, A],
59
+ ARCHIVED: [{
60
+ key: "restore",
61
+ to: "DRAFT",
62
+ variant: "default",
63
+ confirm: !1
64
+ }]
65
+ }, j = () => {
66
+ let D = e(), { agentId: O, botId: k } = Ce(), { navigateTo: A } = ge(), j = te(), { data: M, loading: Pe, error: N, refetch: P } = ue(O), [Fe, Ie] = pe(), [Le, Re] = de(), ze = fe(), [F, I] = ye("overview"), L = he(), R = me(), Be = L.data, Ve = R.data, He = ae(), z = k ? `bots/${k}/agents` : "agents";
67
+ if (Pe) return /* @__PURE__ */ g(t, {
68
+ title: D("botlit.common.loading", "Loading..."),
69
+ children: /* @__PURE__ */ g("div", {
70
+ role: "status",
71
+ "aria-busy": "true",
72
+ "aria-label": D("botlit.common.loading", "Loading..."),
73
+ className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
74
+ })
75
+ });
76
+ if (N) return /* @__PURE__ */ g(t, {
77
+ title: D("botlit.agentDetail.errorTitle", "Agent"),
78
+ children: /* @__PURE__ */ g(ne, {
79
+ resource: D("botlit.agentDetail.resource", "this agent"),
80
+ error: N,
81
+ onRetry: () => void P()
82
+ })
34
83
  });
35
- if (!R) return /* @__PURE__ */ x(t, {
36
- title: P("botlit.agentDetail.notFound.title", "Agent Not Found"),
37
- children: /* @__PURE__ */ x(ne, {
84
+ if (!M) return /* @__PURE__ */ g(t, {
85
+ title: D("botlit.agentDetail.notFound.title", "Agent Not Found"),
86
+ children: /* @__PURE__ */ g(ee, {
38
87
  illustration: "empty-agents",
39
- title: P("botlit.agentDetail.notFound.title", "Agent Not Found"),
40
- description: P("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
41
- action: /* @__PURE__ */ x(s, {
42
- onClick: () => I("agents"),
43
- children: P("botlit.agentDetail.notFound.backAction", "Back to Agents")
88
+ title: D("botlit.agentDetail.notFound.title", "Agent Not Found"),
89
+ description: D("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
90
+ action: /* @__PURE__ */ g(c, {
91
+ onClick: () => A(z),
92
+ children: D("botlit.agentDetail.notFound.backAction", "Back to Agents")
44
93
  })
45
94
  })
46
95
  });
47
- let W = R.systemPrompt || "", G = R.llmModelId || "", Ce = R.temperature, K = R.maxTokens, q = R.mcpConnectionIds ?? [], J = R.knowledgeBaseIds ?? [], Y = R.workflowIds ?? [], X = R.capabilities ?? [], Z = R.tagIds ?? [], Q = R.maxConcurrentExecutions || 10, $ = R.metadata ?? null, we = [
96
+ let B = M.systemPrompt || "", V = M.llmModelId || "", Ue = M.temperature, We = M.maxTokens, H = M.mcpConnectionIds ?? [], U = M.knowledgeBaseIds ?? [], W = M.workflowIds ?? [], G = M.capabilities ?? [], K = M.tagIds ?? [], q = M.maxConcurrentExecutions || 10, J = M.metadata ?? null, Y = !!He.data?.requireActivationApproval && (M.status === "DRAFT" || M.status === "ARCHIVED") && !M.currentVersionId, X = new Map(Be.map((e) => [e.id, e.name])), Z = new Map(Ve.map((e) => [e.id, e.name])), Q = (e, t, n, r) => t.get(e) ?? (n.loading ? D("botlit.agentDetail.resourceLoading", "Loading…") : n.error ? D("botlit.agentDetail.resourceUnnamed", "Name unavailable") : D(r, "No longer available")), Ge = (() => {
97
+ switch (M.status) {
98
+ case "ACTIVE": return null;
99
+ case "DRAFT": return Y ? D("botlit.agentDetail.reason.pendingApproval", "This agent is a draft. This workspace needs a reviewer to approve it before it goes live: use Request activation.") : M.currentVersionId ? D("botlit.agentDetail.reason.deactivated", "This agent was taken out of service and is a draft again. Activate it to put it back live.") : D("botlit.agentDetail.reason.neverPublished", "This agent is a draft that was never published, so it does not answer bots yet. Activate it to publish it.");
100
+ case "PAUSED": return D("botlit.agentDetail.reason.paused", "This agent is paused and does not answer bots or other agents. Resume it to put it back live.");
101
+ case "TRAINING": return D("botlit.agentDetail.reason.training", "This agent is in training and does not answer bots or other agents yet.");
102
+ case "ARCHIVED": return D("botlit.agentDetail.reason.archived", "This agent is archived and does not answer. Restore it to bring it back as a draft.");
103
+ default: return null;
104
+ }
105
+ })(), $ = (e, t) => {
106
+ switch (e) {
107
+ case "activate": return {
108
+ label: D("botlit.agentDetail.actions.activate", "Activate"),
109
+ success: D("botlit.agentDetail.activate.success", "Agent \"{{name}}\" activated", { name: t }),
110
+ error: D("botlit.agentDetail.activate.error", "Failed to activate agent")
111
+ };
112
+ case "resume": return {
113
+ label: D("botlit.agentDetail.actions.resume", "Resume"),
114
+ success: D("botlit.agentDetail.resume.success", "Agent \"{{name}}\" resumed", { name: t }),
115
+ error: D("botlit.agentDetail.resume.error", "Failed to resume agent")
116
+ };
117
+ case "pause": return {
118
+ label: D("botlit.agentDetail.actions.pause", "Pause"),
119
+ success: D("botlit.agentDetail.pause.success", "Agent \"{{name}}\" paused", { name: t }),
120
+ error: D("botlit.agentDetail.pause.error", "Failed to pause agent"),
121
+ confirmTitle: D("botlit.agentDetail.pause.confirmTitle", "Pause agent?"),
122
+ confirmMessage: D("botlit.agentDetail.pause.confirmMessage", "Pause \"{{name}}\"? It stops answering bots and other agents until you resume it.", { name: t })
123
+ };
124
+ case "archive": return {
125
+ label: D("botlit.agentDetail.actions.archive", "Archive"),
126
+ success: D("botlit.agentDetail.archive.success", "Agent \"{{name}}\" archived", { name: t }),
127
+ error: D("botlit.agentDetail.archive.error", "Failed to archive agent"),
128
+ confirmTitle: D("botlit.agentDetail.archive.confirmTitle", "Archive agent?"),
129
+ confirmMessage: D("botlit.agentDetail.archive.confirmMessage", "Archive \"{{name}}\"? It stops answering bots and other agents. You can restore it later.", { name: t })
130
+ };
131
+ case "restore": return {
132
+ label: D("botlit.agentDetail.actions.restore", "Restore"),
133
+ success: D("botlit.agentDetail.restore.success", "Agent \"{{name}}\" restored as a draft", { name: t }),
134
+ error: D("botlit.agentDetail.restore.error", "Failed to restore agent")
135
+ };
136
+ }
137
+ }, Ke = async (e) => {
138
+ if (!O) return;
139
+ let t = $(e.key, M.name);
140
+ if (!(e.confirm && t.confirmTitle && t.confirmMessage && !await m({
141
+ title: t.confirmTitle,
142
+ message: t.confirmMessage,
143
+ confirmLabel: t.label,
144
+ cancelLabel: D("botlit.common.cancel", "Cancel")
145
+ }))) try {
146
+ await Fe({
147
+ agentId: O,
148
+ input: { status: e.to }
149
+ }), await P(), E.success(t.success);
150
+ } catch (e) {
151
+ E.error(e instanceof Error ? e.message : t.error);
152
+ }
153
+ }, qe = async () => {
154
+ if (!O) return;
155
+ let e = await ze(O).catch(() => null), t = ve(D, M.name, e);
156
+ if (await m({
157
+ title: D("botlit.agentsList.delete.title", "Delete agent?"),
158
+ message: t,
159
+ confirmLabel: D("botlit.agentsList.delete.okButton", "Delete"),
160
+ cancelLabel: D("botlit.agentsList.delete.cancelButton", "Cancel")
161
+ })) try {
162
+ if (!await Le(O)) {
163
+ E.error(D("botlit.agentDetail.delete.error", "Failed to delete agent"));
164
+ return;
165
+ }
166
+ E.success(D("botlit.agentDetail.delete.success", "Agent \"{{name}}\" deleted successfully", { name: M.name })), A(z);
167
+ } catch (e) {
168
+ E.error(e instanceof Error ? e.message : D("botlit.agentDetail.delete.error", "Failed to delete agent"));
169
+ }
170
+ }, Je = [
48
171
  {
49
172
  id: "assistant",
50
173
  label: "Assistant setup",
51
- icon: /* @__PURE__ */ x(D, { size: 16 })
174
+ icon: /* @__PURE__ */ g(S, { size: 16 })
52
175
  },
53
176
  {
54
177
  id: "overview",
55
- label: P("botlit.agentDetail.tabs.overview", "Overview"),
56
- icon: /* @__PURE__ */ x(me, { size: 16 })
178
+ label: D("botlit.agentDetail.tabs.overview", "Overview"),
179
+ icon: /* @__PURE__ */ g(Te, { size: 16 })
57
180
  },
58
181
  {
59
182
  id: "prompt",
60
- label: P("botlit.agentDetail.tabs.prompt", "Prompt"),
61
- icon: /* @__PURE__ */ x(T, { size: 16 })
183
+ label: D("botlit.agentDetail.tabs.prompt", "Prompt"),
184
+ icon: /* @__PURE__ */ g(b, { size: 16 })
62
185
  },
63
186
  {
64
187
  id: "llm",
65
- label: P("botlit.agentDetail.tabs.llmConfig", "LLM Config"),
66
- icon: /* @__PURE__ */ x(w, { size: 16 })
188
+ label: D("botlit.agentDetail.tabs.llmConfig", "LLM Config"),
189
+ icon: /* @__PURE__ */ g(y, { size: 16 })
67
190
  },
68
191
  {
69
192
  id: "tools",
70
- label: P("botlit.agentDetail.tabs.tools", "Tools"),
71
- icon: /* @__PURE__ */ x(M, { size: 16 })
193
+ label: D("botlit.agentDetail.tabs.tools", "Tools"),
194
+ icon: /* @__PURE__ */ g(T, { size: 16 })
72
195
  },
73
196
  {
74
197
  id: "knowledge",
75
- label: P("botlit.agentDetail.tabs.knowledge", "Knowledge"),
76
- icon: /* @__PURE__ */ x(C, { size: 16 })
198
+ label: D("botlit.agentDetail.tabs.knowledge", "Knowledge"),
199
+ icon: /* @__PURE__ */ g(v, { size: 16 })
77
200
  },
78
201
  {
79
202
  id: "guardrails",
80
- label: P("botlit.agentDetail.tabs.guardrails", "Guardrails"),
81
- icon: /* @__PURE__ */ x(k, { size: 16 })
203
+ label: D("botlit.agentDetail.tabs.guardrails", "Guardrails"),
204
+ icon: /* @__PURE__ */ g(w, { size: 16 })
82
205
  },
83
206
  {
84
207
  id: "handoff",
85
- label: P("botlit.agentDetail.tabs.handoff", "Handoff"),
86
- icon: /* @__PURE__ */ x(ge, { size: 16 })
208
+ label: D("botlit.agentDetail.tabs.handoff", "Handoff"),
209
+ icon: /* @__PURE__ */ g(De, { size: 16 })
87
210
  },
88
211
  {
89
212
  id: "aiOperations",
90
- label: P("botlit.agentDetail.tabs.aiOperations", "AI Operations"),
91
- icon: /* @__PURE__ */ x(A, { size: 16 })
213
+ label: D("botlit.agentDetail.tabs.aiOperations", "AI Operations"),
214
+ icon: /* @__PURE__ */ g(Ae, { size: 16 })
92
215
  },
93
216
  {
94
217
  id: "a2a",
95
- label: P("botlit.agentDetail.tabs.a2a", "A2A"),
96
- icon: /* @__PURE__ */ x(O, { size: 16 })
218
+ label: D("botlit.agentDetail.tabs.a2a", "A2A"),
219
+ icon: /* @__PURE__ */ g(C, { size: 16 })
97
220
  },
98
221
  {
99
222
  id: "versions",
100
- label: P("botlit.agentDetail.tabs.versions", "Versions"),
101
- icon: /* @__PURE__ */ x(_e, { size: 16 })
223
+ label: D("botlit.agentDetail.tabs.versions", "Versions"),
224
+ icon: /* @__PURE__ */ g(Oe, { size: 16 })
102
225
  }
103
226
  ];
104
- return /* @__PURE__ */ x(t, {
105
- title: /* @__PURE__ */ S("div", {
106
- className: "flex items-center gap-3",
107
- children: [
108
- /* @__PURE__ */ x(s, {
109
- variant: "ghost",
110
- size: "icon",
111
- onClick: () => I("agents"),
112
- children: /* @__PURE__ */ x(pe, { size: 20 })
113
- }),
114
- /* @__PURE__ */ x("span", {
115
- className: "text-3xl",
116
- children: "🤖"
117
- }),
118
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
119
- className: "flex items-center gap-2",
120
- children: [
121
- /* @__PURE__ */ x("span", { children: R.name }),
122
- /* @__PURE__ */ x(d, { status: R.status }),
123
- /* @__PURE__ */ x(u, {
124
- variant: "outline",
125
- children: R.slug
126
- })
127
- ]
128
- }), /* @__PURE__ */ x("p", {
129
- className: "text-sm font-normal text-text-secondary",
130
- children: R.description
131
- })] })
132
- ]
133
- }),
134
- actions: /* @__PURE__ */ S("div", {
227
+ return /* @__PURE__ */ _(t, {
228
+ title: M.name,
229
+ leading: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(c, {
230
+ variant: "ghost",
231
+ size: "icon",
232
+ "aria-label": D("botlit.agentDetail.back", "Back to agents"),
233
+ onClick: () => A(z),
234
+ children: /* @__PURE__ */ g(we, {
235
+ size: 20,
236
+ "aria-hidden": "true"
237
+ })
238
+ }), /* @__PURE__ */ g("span", {
239
+ className: "text-3xl",
240
+ "aria-hidden": "true",
241
+ children: M.avatar || Me
242
+ })] }),
243
+ meta: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, { status: M.status }), /* @__PURE__ */ g(l, {
244
+ variant: "outline",
245
+ children: M.slug
246
+ })] }),
247
+ description: M.description,
248
+ actions: /* @__PURE__ */ _("div", {
135
249
  className: "flex gap-2",
136
250
  children: [
137
- Se.data?.requireActivationApproval && (R.status === "DRAFT" || R.status === "ARCHIVED") && !R.currentVersionId ? /* @__PURE__ */ x(l, {
138
- permission: c.AGENT_UPDATE,
139
- children: /* @__PURE__ */ x(s, {
251
+ /* @__PURE__ */ g(f, {
252
+ permission: d.AGENT_UPDATE,
253
+ children: Y ? /* @__PURE__ */ g(c, {
140
254
  variant: "default",
141
255
  onClick: () => {
142
- U("overview"), requestAnimationFrame(() => document.querySelector("[data-testid=\"agent-approval-panel\"]")?.scrollIntoView({
256
+ I("overview"), requestAnimationFrame(() => document.querySelector("[data-testid=\"agent-approval-panel\"]")?.scrollIntoView({
143
257
  behavior: "smooth",
144
258
  block: "start"
145
259
  }));
146
260
  },
147
- children: P("botlit.agentApproval.requestAction", "Request activation")
148
- })
149
- }) : R.status === "DRAFT" || R.status === "ARCHIVED" ? /* @__PURE__ */ x(l, {
150
- permission: c.AGENT_UPDATE,
151
- children: /* @__PURE__ */ x(s, {
152
- variant: "default",
153
- isLoading: V.loading,
154
- onClick: async () => {
155
- try {
156
- if (!F) return;
157
- await B({
158
- agentId: F,
159
- input: { status: "ACTIVE" }
160
- }), await z(), N.success(`${P("botlit.agentDetail.activate.successPrefix", "Agent")} "${R.name}" ${P("botlit.agentDetail.activate.successSuffix", "activated")}`);
161
- } catch (e) {
162
- N.error(e instanceof Error ? e.message : P("botlit.agentDetail.activate.error", "Failed to activate agent"));
163
- }
164
- },
165
- children: P("botlit.agentDetail.actions.activate", "Activate")
166
- })
167
- }) : /* @__PURE__ */ x(l, {
168
- permission: c.AGENT_UPDATE,
169
- children: /* @__PURE__ */ x(s, {
170
- variant: "outline",
171
- isLoading: V.loading,
172
- onClick: async () => {
173
- try {
174
- if (!F) return;
175
- await B({
176
- agentId: F,
177
- input: { status: "DRAFT" }
178
- }), await z(), N.success(`${P("botlit.agentDetail.deactivate.successPrefix", "Agent")} "${R.name}" ${P("botlit.agentDetail.deactivate.successSuffix", "deactivated")}`);
179
- } catch (e) {
180
- N.error(e instanceof Error ? e.message : P("botlit.agentDetail.deactivate.error", "Failed to deactivate agent"));
181
- }
182
- },
183
- children: P("botlit.agentDetail.actions.deactivate", "Deactivate")
184
- })
261
+ children: D("botlit.agentApproval.requestAction", "Request activation")
262
+ }) : (Ne[M.status] ?? []).map((e) => /* @__PURE__ */ g(c, {
263
+ variant: e.variant,
264
+ isLoading: Ie.loading,
265
+ onClick: () => void Ke(e),
266
+ children: $(e.key, M.name).label
267
+ }, e.key))
185
268
  }),
186
- /* @__PURE__ */ x(l, {
187
- permission: c.AGENT_UPDATE,
188
- children: /* @__PURE__ */ x(s, {
269
+ /* @__PURE__ */ g(f, {
270
+ permission: d.AGENT_UPDATE,
271
+ children: /* @__PURE__ */ g(c, {
189
272
  variant: "outline",
190
- leftIcon: /* @__PURE__ */ x(he, { size: 16 }),
191
- onClick: () => I(`agents/${F}/edit`),
192
- children: P("botlit.agentDetail.actions.editAgent", "Edit Agent")
273
+ leftIcon: /* @__PURE__ */ g(Ee, { size: 16 }),
274
+ onClick: () => A(k ? `bots/${k}/agents/${O}/edit` : `agents/${O}/edit`),
275
+ children: D("botlit.agentDetail.actions.editAgent", "Edit Agent")
193
276
  })
194
277
  }),
195
- /* @__PURE__ */ x(l, {
196
- permission: c.AGENT_EXECUTE,
197
- children: /* @__PURE__ */ x(s, {
198
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
199
- onClick: () => I(`chat/${F}`),
200
- children: P("botlit.agentDetail.actions.testAgent", "Test Agent")
278
+ /* @__PURE__ */ g(f, {
279
+ permission: d.AGENT_EXECUTE,
280
+ children: /* @__PURE__ */ g(c, {
281
+ leftIcon: /* @__PURE__ */ g(x, { size: 16 }),
282
+ onClick: () => A(`chat/${O}`),
283
+ children: D("botlit.agentDetail.actions.testAgent", "Test Agent")
201
284
  })
202
285
  }),
203
- /* @__PURE__ */ x(l, {
204
- permission: c.AGENT_DELETE,
205
- children: /* @__PURE__ */ x(s, {
286
+ /* @__PURE__ */ g(f, {
287
+ permission: d.AGENT_DELETE,
288
+ children: /* @__PURE__ */ g(c, {
206
289
  variant: "destructive",
207
- leftIcon: /* @__PURE__ */ x(j, { size: 16 }),
208
- isLoading: xe.loading,
209
- onClick: async () => {
210
- if (F && confirm(`${P("botlit.agentDetail.delete.confirmPrefix", "Are you sure you want to delete")} "${R.name}"? ${P("botlit.agentDetail.delete.confirmSuffix", "This action cannot be undone.")}`)) try {
211
- await be(F), N.success(`${P("botlit.agentDetail.delete.successPrefix", "Agent")} "${R.name}" ${P("botlit.agentDetail.delete.successSuffix", "deleted successfully")}`), I("agents");
212
- } catch (e) {
213
- N.error(e instanceof Error ? e.message : P("botlit.agentDetail.delete.error", "Failed to delete agent"));
214
- }
215
- },
216
- children: P("botlit.common.delete", "Delete")
290
+ leftIcon: /* @__PURE__ */ g(je, { size: 16 }),
291
+ isLoading: Re.loading,
292
+ onClick: () => void qe(),
293
+ children: D("botlit.common.delete", "Delete")
217
294
  })
218
295
  })
219
296
  ]
220
297
  }),
221
- children: /* @__PURE__ */ S("div", {
298
+ children: [Ge && /* @__PURE__ */ g("div", {
299
+ role: "status",
300
+ "data-testid": "agent-status-reason",
301
+ className: "mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm text-text-primary",
302
+ children: Ge
303
+ }), /* @__PURE__ */ _("div", {
222
304
  className: "space-y-6",
223
305
  children: [
224
- H === "assistant" && F && /* @__PURE__ */ S("div", {
306
+ F === "assistant" && O && /* @__PURE__ */ _("div", {
225
307
  className: "space-y-5",
226
308
  children: [
227
- L(c.AGENT_UPDATE) && /* @__PURE__ */ x(f, {
228
- agentId: F,
229
- onConfigured: () => void z()
309
+ j(d.AGENT_UPDATE) && /* @__PURE__ */ g(oe, {
310
+ agentId: O,
311
+ onConfigured: () => void P()
230
312
  }),
231
- L(c.AGENT_PUBLISH) && /* @__PURE__ */ S(de, { children: [/* @__PURE__ */ x(m, {
232
- agentId: F,
233
- knowledgeBaseIds: J
234
- }), /* @__PURE__ */ x(p, { agentId: F })] }),
235
- !L(c.AGENT_UPDATE) && !L(c.AGENT_PUBLISH) && /* @__PURE__ */ x("p", {
313
+ j(d.AGENT_PUBLISH) && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(ce, {
314
+ agentId: O,
315
+ knowledgeBaseIds: U
316
+ }), /* @__PURE__ */ g(se, { agentId: O })] }),
317
+ !j(d.AGENT_UPDATE) && !j(d.AGENT_PUBLISH) && /* @__PURE__ */ g("p", {
236
318
  role: "status",
237
319
  className: "text-sm text-text-secondary",
238
- children: P("botlit.agentDetail.assistant.readOnly", "Assistant setup and publishing are available to members who can edit or publish agents in this workspace.")
320
+ children: D("botlit.agentDetail.assistant.readOnly", "Assistant setup and publishing are available to members who can edit or publish agents in this workspace.")
239
321
  })
240
322
  ]
241
323
  }),
242
- /* @__PURE__ */ x(ue, {
243
- icon: /* @__PURE__ */ x(w, { size: 18 }),
244
- children: P("botlit.agentDetail.purpose", "This is the full configuration for a single agent — its prompt, model settings, the tools and knowledge it can use, its guardrails and how it talks to other agents. Use the tabs to inspect or change any part, and test the agent in chat to confirm it behaves the way you expect before going live.")
324
+ /* @__PURE__ */ g(Se, {
325
+ icon: /* @__PURE__ */ g(y, { size: 18 }),
326
+ children: D("botlit.agentDetail.purpose", "This is the full configuration for a single agent — its prompt, model settings, the tools and knowledge it can use, its guardrails and how it talks to other agents. Use the tabs to inspect or change any part, and test the agent in chat to confirm it behaves the way you expect before going live.")
245
327
  }),
246
- /* @__PURE__ */ x("div", {
328
+ /* @__PURE__ */ g("div", {
247
329
  className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
248
- children: we.map((e) => /* @__PURE__ */ S("button", {
249
- onClick: () => U(e.id),
250
- className: oe("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", H === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
330
+ children: Je.map((e) => /* @__PURE__ */ _("button", {
331
+ onClick: () => I(e.id),
332
+ className: _e("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", F === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
251
333
  children: [e.icon, e.label]
252
334
  }, e.id))
253
335
  }),
254
- H === "overview" && /* @__PURE__ */ S("div", {
336
+ F === "overview" && /* @__PURE__ */ _("div", {
255
337
  className: "space-y-6",
256
338
  children: [
257
- /* @__PURE__ */ x(le, {
258
- storageKey: `botlit-agent-${F}`,
339
+ /* @__PURE__ */ g(xe, {
340
+ storageKey: `botlit-agent-${O}`,
259
341
  steps: [
260
342
  {
261
343
  id: "test",
262
- label: P("botlit.agentDetail.nextSteps.test", "Test the agent in chat"),
263
- description: P("botlit.agentDetail.nextSteps.testDesc", "Send it a few real prompts to see how it responds."),
264
- icon: /* @__PURE__ */ x(E, { size: 16 }),
265
- onClick: () => I(`chat/${F}`)
344
+ label: D("botlit.agentDetail.nextSteps.test", "Test the agent in chat"),
345
+ description: D("botlit.agentDetail.nextSteps.testDesc", "Send it a few real prompts to see how it responds."),
346
+ icon: /* @__PURE__ */ g(x, { size: 16 }),
347
+ onClick: () => A(`chat/${O}`)
266
348
  },
267
349
  {
268
350
  id: "prompt",
269
- label: P("botlit.agentDetail.nextSteps.prompt", "Refine the system prompt"),
270
- description: P("botlit.agentDetail.nextSteps.promptDesc", "Tune its instructions and behaviour."),
271
- icon: /* @__PURE__ */ x(T, { size: 16 }),
272
- onClick: () => U("prompt")
351
+ label: D("botlit.agentDetail.nextSteps.prompt", "Refine the system prompt"),
352
+ description: D("botlit.agentDetail.nextSteps.promptDesc", "Tune its instructions and behaviour."),
353
+ icon: /* @__PURE__ */ g(b, { size: 16 }),
354
+ onClick: () => I("prompt")
273
355
  },
274
356
  {
275
357
  id: "tools",
276
- label: P("botlit.agentDetail.nextSteps.tools", "Connect tools & knowledge"),
277
- description: P("botlit.agentDetail.nextSteps.toolsDesc", "Give it MCP tools and knowledge bases to work with."),
278
- icon: /* @__PURE__ */ x(M, { size: 16 }),
279
- onClick: () => U("tools")
358
+ label: D("botlit.agentDetail.nextSteps.tools", "Connect tools & knowledge"),
359
+ description: D("botlit.agentDetail.nextSteps.toolsDesc", "Give it MCP tools and knowledge bases to work with."),
360
+ icon: /* @__PURE__ */ g(T, { size: 16 }),
361
+ onClick: () => I("tools")
280
362
  },
281
363
  {
282
364
  id: "activate",
283
- label: P("botlit.agentDetail.nextSteps.activate", "Activate and attach to a bot"),
284
- description: P("botlit.agentDetail.nextSteps.activateDesc", "Put it live so a bot can route conversations to it."),
285
- icon: /* @__PURE__ */ x(O, { size: 16 }),
286
- onClick: () => I(`agents/${F}/edit`),
287
- done: R.status === "ACTIVE"
365
+ label: D("botlit.agentDetail.nextSteps.activate", "Activate and attach to a bot"),
366
+ description: D("botlit.agentDetail.nextSteps.activateDesc", "Put it live so a bot can route conversations to it."),
367
+ icon: /* @__PURE__ */ g(C, { size: 16 }),
368
+ onClick: () => A(`agents/${O}/edit`),
369
+ done: M.status === "ACTIVE"
288
370
  }
289
371
  ]
290
372
  }),
291
- F && /* @__PURE__ */ x(ie, {
292
- agentId: F,
293
- agentStatus: R.status,
294
- onChanged: () => void z()
373
+ O && /* @__PURE__ */ g(ie, {
374
+ agentId: O,
375
+ agentStatus: M.status,
376
+ onChanged: () => void P()
295
377
  }),
296
- /* @__PURE__ */ S("div", {
378
+ /* @__PURE__ */ _("div", {
297
379
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
298
380
  children: [
299
- /* @__PURE__ */ S(n, {
381
+ /* @__PURE__ */ _(r, {
300
382
  className: "lg:col-span-1",
301
- children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(o, { children: "Details" }) }), /* @__PURE__ */ S(r, {
383
+ children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ g(s, { children: "Details" }) }), /* @__PURE__ */ _(i, {
302
384
  className: "space-y-4",
303
385
  children: [
304
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
386
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
305
387
  className: "text-sm text-text-secondary",
306
388
  children: "Status"
307
- }), /* @__PURE__ */ x(d, { status: R.status })] }),
308
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
389
+ }), /* @__PURE__ */ g(u, { status: M.status })] }),
390
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
309
391
  className: "text-sm text-text-secondary",
310
392
  children: "Type"
311
- }), /* @__PURE__ */ x(u, {
393
+ }), /* @__PURE__ */ g(l, {
312
394
  variant: "outline",
313
- children: R.type
395
+ children: M.type
314
396
  })] }),
315
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
397
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
316
398
  className: "text-sm text-text-secondary",
317
399
  children: "Visibility"
318
- }), /* @__PURE__ */ x(u, {
400
+ }), /* @__PURE__ */ g(l, {
319
401
  variant: "outline",
320
- children: R.visibility
402
+ children: M.visibility
321
403
  })] }),
322
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
404
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
323
405
  className: "text-sm text-text-secondary",
324
406
  children: "LLM Model"
325
- }), /* @__PURE__ */ x("p", {
407
+ }), /* @__PURE__ */ g("p", {
326
408
  className: "font-medium font-mono text-sm",
327
- children: G || "Not configured"
409
+ children: V || "Not configured"
328
410
  })] }),
329
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
411
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
330
412
  className: "text-sm text-text-secondary",
331
413
  children: "MCP Connections"
332
- }), /* @__PURE__ */ S("p", {
414
+ }), /* @__PURE__ */ _("p", {
333
415
  className: "font-medium",
334
- children: [q.length, " servers"]
416
+ children: [H.length, " servers"]
335
417
  })] }),
336
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
418
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
337
419
  className: "text-sm text-text-secondary",
338
420
  children: "Knowledge Bases"
339
- }), /* @__PURE__ */ S("p", {
421
+ }), /* @__PURE__ */ _("p", {
340
422
  className: "font-medium",
341
- children: [J.length, " KBs"]
423
+ children: [U.length, " KBs"]
342
424
  })] }),
343
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
425
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
344
426
  className: "text-sm text-text-secondary",
345
427
  children: "Max Concurrent"
346
- }), /* @__PURE__ */ x("p", {
428
+ }), /* @__PURE__ */ g("p", {
347
429
  className: "font-medium",
348
- children: Q
430
+ children: q
349
431
  })] }),
350
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
432
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
351
433
  className: "text-sm text-text-secondary",
352
434
  children: "Executions"
353
- }), /* @__PURE__ */ x("p", {
435
+ }), /* @__PURE__ */ g("p", {
354
436
  className: "font-medium",
355
- children: R.executionCount ?? 0
437
+ children: M.executionCount ?? 0
356
438
  })] }),
357
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
439
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
358
440
  className: "text-sm text-text-secondary",
359
441
  children: "Created"
360
- }), /* @__PURE__ */ x("p", {
442
+ }), /* @__PURE__ */ g("p", {
361
443
  className: "font-medium",
362
- children: b(R.createdAt)
444
+ children: p(M.createdAt)
363
445
  })] }),
364
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
446
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
365
447
  className: "text-sm text-text-secondary",
366
448
  children: "Updated"
367
- }), /* @__PURE__ */ x("p", {
449
+ }), /* @__PURE__ */ g("p", {
368
450
  className: "font-medium",
369
- children: b(R.updatedAt)
451
+ children: p(M.updatedAt)
370
452
  })] })
371
453
  ]
372
454
  })]
373
455
  }),
374
- /* @__PURE__ */ S(ce, {
456
+ /* @__PURE__ */ _(be, {
375
457
  treatment: "glass",
376
458
  glow: !0,
377
459
  className: "lg:col-span-2 p-6",
378
- children: [/* @__PURE__ */ x("h3", {
460
+ children: [/* @__PURE__ */ g("h3", {
379
461
  className: "mb-4 text-lg font-semibold tracking-tight text-text-primary",
380
- children: P("botlit.agentDetail.capabilities.title", "Capabilities")
381
- }), /* @__PURE__ */ x("div", { children: X.length > 0 ? /* @__PURE__ */ x("div", {
462
+ children: D("botlit.agentDetail.capabilities.title", "Capabilities")
463
+ }), /* @__PURE__ */ g("div", { children: G.length > 0 ? /* @__PURE__ */ g("div", {
382
464
  className: "grid grid-cols-2 md:grid-cols-3 gap-4",
383
- children: X.map((e) => /* @__PURE__ */ S("div", {
465
+ children: G.map((e) => /* @__PURE__ */ _("div", {
384
466
  className: "p-3 rounded-lg border border-status-success-border bg-status-success-bg-subtle",
385
- children: [/* @__PURE__ */ x("p", {
467
+ children: [/* @__PURE__ */ g("p", {
386
468
  className: "font-medium",
387
469
  children: e
388
- }), /* @__PURE__ */ x(u, {
470
+ }), /* @__PURE__ */ g(l, {
389
471
  variant: "success",
390
- children: P("botlit.agentDetail.capabilities.enabled", "Enabled")
472
+ children: D("botlit.agentDetail.capabilities.enabled", "Enabled")
391
473
  })]
392
474
  }, e))
393
- }) : /* @__PURE__ */ x("p", {
475
+ }) : /* @__PURE__ */ g("p", {
394
476
  className: "text-text-secondary",
395
- children: P("botlit.agentDetail.capabilities.empty", "No capabilities configured")
477
+ children: D("botlit.agentDetail.capabilities.empty", "No capabilities configured")
396
478
  }) })]
397
479
  }),
398
- Z.length > 0 && /* @__PURE__ */ S(n, {
480
+ K.length > 0 && /* @__PURE__ */ _(r, {
399
481
  className: "lg:col-span-3",
400
- children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(o, { children: P("botlit.agentDetail.tags.title", "Tags") }) }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("div", {
482
+ children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ g(s, { children: D("botlit.agentDetail.tags.title", "Tags") }) }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g("div", {
401
483
  className: "flex flex-wrap gap-2",
402
- children: Z.map((e) => /* @__PURE__ */ x(u, {
484
+ children: K.map((e) => /* @__PURE__ */ g(l, {
403
485
  variant: "outline",
404
486
  children: e
405
487
  }, e))
@@ -409,194 +491,194 @@ var P = () => {
409
491
  })
410
492
  ]
411
493
  }),
412
- H === "prompt" && /* @__PURE__ */ x("div", {
494
+ F === "prompt" && /* @__PURE__ */ g("div", {
413
495
  className: "space-y-6",
414
- children: /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(o, {
496
+ children: /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
415
497
  className: "flex items-center gap-2",
416
- children: [/* @__PURE__ */ x(T, { size: 18 }), P("botlit.agentDetail.prompt.title", "System Prompt")]
417
- }), /* @__PURE__ */ x(i, { children: P("botlit.agentDetail.prompt.description", "The system prompt that defines this agent's behavior") })] }), /* @__PURE__ */ x(r, {
498
+ children: [/* @__PURE__ */ g(b, { size: 18 }), D("botlit.agentDetail.prompt.title", "System Prompt")]
499
+ }), /* @__PURE__ */ g(a, { children: D("botlit.agentDetail.prompt.description", "The system prompt that defines this agent's behavior") })] }), /* @__PURE__ */ g(i, {
418
500
  className: "space-y-4",
419
- children: W ? /* @__PURE__ */ x("pre", {
501
+ children: B ? /* @__PURE__ */ g("pre", {
420
502
  className: "p-4 bg-bg-sunken rounded-lg text-sm whitespace-pre-wrap font-mono",
421
- children: W
422
- }) : /* @__PURE__ */ x("p", {
503
+ children: B
504
+ }) : /* @__PURE__ */ g("p", {
423
505
  className: "text-text-secondary",
424
- children: P("botlit.agentDetail.prompt.empty", "No system prompt configured")
506
+ children: D("botlit.agentDetail.prompt.empty", "No system prompt configured")
425
507
  })
426
508
  })] })
427
509
  }),
428
- H === "llm" && /* @__PURE__ */ S("div", {
510
+ F === "llm" && /* @__PURE__ */ _("div", {
429
511
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
430
- children: [/* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ S(o, {
512
+ children: [/* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
431
513
  className: "flex items-center gap-2",
432
- children: [/* @__PURE__ */ x(w, { size: 18 }), P("botlit.agentDetail.llm.title", "Model Configuration")]
433
- }) }), /* @__PURE__ */ S(r, {
514
+ children: [/* @__PURE__ */ g(y, { size: 18 }), D("botlit.agentDetail.llm.title", "Model Configuration")]
515
+ }) }), /* @__PURE__ */ _(i, {
434
516
  className: "space-y-4",
435
517
  children: [
436
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
518
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
437
519
  className: "text-sm text-text-secondary",
438
520
  children: "LLM Model ID"
439
- }), /* @__PURE__ */ x("p", {
521
+ }), /* @__PURE__ */ g("p", {
440
522
  className: "font-medium font-mono",
441
- children: G || "Not configured"
523
+ children: V || "Not configured"
442
524
  })] }),
443
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
525
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
444
526
  className: "text-sm text-text-secondary",
445
527
  children: "Temperature"
446
- }), /* @__PURE__ */ x("p", {
528
+ }), /* @__PURE__ */ g("p", {
447
529
  className: "font-medium",
448
- children: Ce ?? "Default"
530
+ children: Ue ?? "Default"
449
531
  })] }),
450
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
532
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
451
533
  className: "text-sm text-text-secondary",
452
534
  children: "Max Tokens"
453
- }), /* @__PURE__ */ x("p", {
535
+ }), /* @__PURE__ */ g("p", {
454
536
  className: "font-medium",
455
- children: K ?? "Default"
537
+ children: We ?? "Default"
456
538
  })] })
457
539
  ]
458
- })] }), /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ S(o, {
540
+ })] }), /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
459
541
  className: "flex items-center gap-2",
460
- children: [/* @__PURE__ */ x(ve, { size: 18 }), P("botlit.agentDetail.executionLimits.title", "Execution Limits")]
461
- }) }), /* @__PURE__ */ S(r, {
542
+ children: [/* @__PURE__ */ g(ke, { size: 18 }), D("botlit.agentDetail.executionLimits.title", "Execution Limits")]
543
+ }) }), /* @__PURE__ */ _(i, {
462
544
  className: "space-y-4",
463
545
  children: [
464
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
546
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
465
547
  className: "text-sm text-text-secondary",
466
548
  children: "Max Concurrent Executions"
467
- }), /* @__PURE__ */ x("p", {
549
+ }), /* @__PURE__ */ g("p", {
468
550
  className: "font-medium",
469
- children: Q
551
+ children: q
470
552
  })] }),
471
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
553
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
472
554
  className: "text-sm text-text-secondary",
473
555
  children: "Total Executions"
474
- }), /* @__PURE__ */ x("p", {
556
+ }), /* @__PURE__ */ g("p", {
475
557
  className: "font-medium",
476
- children: R.executionCount ?? 0
558
+ children: M.executionCount ?? 0
477
559
  })] }),
478
- R.lastExecutedAt && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
560
+ M.lastExecutedAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
479
561
  className: "text-sm text-text-secondary",
480
562
  children: "Last Executed"
481
- }), /* @__PURE__ */ x("p", {
563
+ }), /* @__PURE__ */ g("p", {
482
564
  className: "font-medium",
483
- children: b(R.lastExecutedAt)
565
+ children: p(M.lastExecutedAt)
484
566
  })] })
485
567
  ]
486
568
  })] })]
487
569
  }),
488
- H === "tools" && /* @__PURE__ */ S("div", {
570
+ F === "tools" && /* @__PURE__ */ _("div", {
489
571
  className: "space-y-6",
490
- children: [/* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(o, {
572
+ children: [/* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
491
573
  className: "flex items-center gap-2",
492
- children: [/* @__PURE__ */ x(M, { size: 18 }), "MCP Server Connections"]
493
- }), /* @__PURE__ */ x(i, { children: "Connected MCP servers providing tools" })] }), /* @__PURE__ */ x(r, { children: q.length > 0 ? /* @__PURE__ */ x("div", {
574
+ children: [/* @__PURE__ */ g(T, { size: 18 }), "MCP Server Connections"]
575
+ }), /* @__PURE__ */ g(a, { children: "Connected MCP servers providing tools" })] }), /* @__PURE__ */ g(i, { children: H.length > 0 ? /* @__PURE__ */ g("div", {
494
576
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
495
- children: q.map((e) => /* @__PURE__ */ S("div", {
577
+ children: H.map((e) => /* @__PURE__ */ _("div", {
496
578
  className: "flex items-center gap-3 p-4 border border-border-subtle rounded-lg",
497
- children: [/* @__PURE__ */ x("div", {
579
+ children: [/* @__PURE__ */ g("div", {
498
580
  className: "p-2 bg-action-primary-bg/10 rounded-lg",
499
- children: /* @__PURE__ */ x(M, {
581
+ children: /* @__PURE__ */ g(T, {
500
582
  size: 18,
501
583
  className: "text-primary"
502
584
  })
503
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
585
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
504
586
  className: "font-medium",
505
- children: "MCP Server"
506
- }), /* @__PURE__ */ x("p", {
587
+ children: Q(e, X, L, "botlit.agentDetail.tools.unavailable")
588
+ }), !X.has(e) && /* @__PURE__ */ g("p", {
507
589
  className: "text-sm text-text-secondary font-mono",
508
590
  children: e
509
591
  })] })]
510
592
  }, e))
511
- }) : /* @__PURE__ */ x("p", {
593
+ }) : /* @__PURE__ */ _("p", {
512
594
  className: "text-text-secondary",
513
- children: "No MCP servers connected"
514
- }) })] }), Y.length > 0 && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ S(o, {
595
+ children: [D("botlit.agentDetail.tools.none", "No MCP servers connected."), j(d.AGENT_UPDATE) && ` ${D("botlit.agentDetail.tools.attachHint", "Attach servers from Edit Agent.")}`]
596
+ }) })] }), W.length > 0 && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
515
597
  className: "flex items-center gap-2",
516
- children: [/* @__PURE__ */ x(D, { size: 18 }), "Workflows"]
517
- }) }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("div", {
598
+ children: [/* @__PURE__ */ g(S, { size: 18 }), "Workflows"]
599
+ }) }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g("div", {
518
600
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
519
- children: Y.map((e) => /* @__PURE__ */ x("div", {
601
+ children: W.map((e) => /* @__PURE__ */ g("div", {
520
602
  className: "p-4 border border-border-subtle rounded-lg",
521
- children: /* @__PURE__ */ x("p", {
603
+ children: /* @__PURE__ */ g("p", {
522
604
  className: "font-mono text-sm",
523
605
  children: e
524
606
  })
525
607
  }, e))
526
608
  }) })] })]
527
609
  }),
528
- H === "knowledge" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(o, {
610
+ F === "knowledge" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
529
611
  className: "flex items-center gap-2",
530
- children: [/* @__PURE__ */ x(C, { size: 18 }), "Knowledge Bases"]
531
- }), /* @__PURE__ */ x(i, { children: "Connected knowledge bases for RAG" })] }), /* @__PURE__ */ x(r, { children: J.length > 0 ? /* @__PURE__ */ x("div", {
612
+ children: [/* @__PURE__ */ g(v, { size: 18 }), "Knowledge Bases"]
613
+ }), /* @__PURE__ */ g(a, { children: "Connected knowledge bases for RAG" })] }), /* @__PURE__ */ g(i, { children: U.length > 0 ? /* @__PURE__ */ g("div", {
532
614
  className: "space-y-4",
533
- children: J.map((e, t) => /* @__PURE__ */ S("div", {
615
+ children: U.map((e, t) => /* @__PURE__ */ _("div", {
534
616
  className: "p-4 border border-border-subtle rounded-lg space-y-2",
535
- children: [/* @__PURE__ */ S("div", {
617
+ children: [/* @__PURE__ */ _("div", {
536
618
  className: "flex items-center justify-between",
537
- children: [/* @__PURE__ */ x("p", {
619
+ children: [/* @__PURE__ */ g("p", {
538
620
  className: "font-medium",
539
- children: "Knowledge Base"
540
- }), /* @__PURE__ */ S(u, {
621
+ children: Q(e, Z, R, "botlit.agentDetail.knowledge.unavailable")
622
+ }), /* @__PURE__ */ _(l, {
541
623
  variant: "outline",
542
624
  children: ["#", t + 1]
543
625
  })]
544
- }), /* @__PURE__ */ x("p", {
626
+ }), !Z.has(e) && /* @__PURE__ */ g("p", {
545
627
  className: "font-mono text-sm",
546
628
  children: e
547
629
  })]
548
- }, t))
549
- }) : /* @__PURE__ */ x("p", {
630
+ }, e))
631
+ }) : /* @__PURE__ */ _("p", {
550
632
  className: "text-text-secondary",
551
- children: "No knowledge bases connected"
633
+ children: [D("botlit.agentDetail.knowledge.none", "No knowledge bases connected."), j(d.AGENT_UPDATE) && ` ${D("botlit.agentDetail.knowledge.attachHint", "Attach knowledge bases from Edit Agent.")}`]
552
634
  }) })] }),
553
- H === "handoff" && F && /* @__PURE__ */ x("div", {
635
+ F === "handoff" && O && /* @__PURE__ */ g("div", {
554
636
  className: "mx-auto w-full max-w-3xl",
555
- children: /* @__PURE__ */ x(ee, { agentId: F })
637
+ children: /* @__PURE__ */ g(n, { agentId: O })
556
638
  }),
557
- H === "guardrails" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(o, {
639
+ F === "guardrails" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
558
640
  className: "flex items-center gap-2",
559
- children: [/* @__PURE__ */ x(k, { size: 18 }), "Guardrails & Policies"]
560
- }), /* @__PURE__ */ x(i, { children: "Security and policy configurations" })] }), /* @__PURE__ */ x(r, { children: $ ? /* @__PURE__ */ x("div", {
641
+ children: [/* @__PURE__ */ g(w, { size: 18 }), "Guardrails & Policies"]
642
+ }), /* @__PURE__ */ g(a, { children: "Security and policy configurations" })] }), /* @__PURE__ */ g(i, { children: J ? /* @__PURE__ */ g("div", {
561
643
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
562
- children: Object.entries($).filter(([e, t]) => t).map(([e, t]) => /* @__PURE__ */ S("div", {
644
+ children: Object.entries(J).filter(([e, t]) => t).map(([e, t]) => /* @__PURE__ */ _("div", {
563
645
  className: "p-4 border border-border-subtle rounded-lg",
564
- children: [/* @__PURE__ */ x("p", {
646
+ children: [/* @__PURE__ */ g("p", {
565
647
  className: "text-sm text-text-secondary capitalize",
566
648
  children: e.replace("Id", "").replace(/([A-Z])/g, " $1").trim()
567
- }), /* @__PURE__ */ x("p", {
649
+ }), /* @__PURE__ */ g("p", {
568
650
  className: "font-mono text-sm",
569
651
  children: String(t)
570
652
  })]
571
653
  }, e))
572
- }) : /* @__PURE__ */ x("p", {
654
+ }) : /* @__PURE__ */ g("p", {
573
655
  className: "text-text-secondary",
574
656
  children: "No policy bindings configured"
575
657
  }) })] }),
576
- H === "aiOperations" && F && /* @__PURE__ */ x(h, {
658
+ F === "aiOperations" && O && /* @__PURE__ */ g(le, {
577
659
  filter: {
578
660
  subjectType: "AGENT",
579
- subjectId: F
661
+ subjectId: O
580
662
  },
581
- description: P("botlit.agentDetail.aiOperationsDescription", "What the supervisor flagged for this agent — drift, evidence and the recommended action.")
663
+ description: D("botlit.agentDetail.aiOperationsDescription", "What the supervisor flagged for this agent — drift, evidence and the recommended action.")
582
664
  }),
583
- H === "a2a" && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(o, {
665
+ F === "a2a" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
584
666
  className: "flex items-center gap-2",
585
- children: [/* @__PURE__ */ x(O, { size: 18 }), "A2A Configuration"]
586
- }), /* @__PURE__ */ x(i, { children: "Agent-to-Agent communication settings" })] }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("p", {
667
+ children: [/* @__PURE__ */ g(C, { size: 18 }), "A2A Configuration"]
668
+ }), /* @__PURE__ */ g(a, { children: "Agent-to-Agent communication settings" })] }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g("p", {
587
669
  className: "text-text-secondary",
588
670
  children: "A2A is not enabled for this agent"
589
671
  }) })] }),
590
- H === "versions" && F && /* @__PURE__ */ x(re, {
591
- agentId: F,
592
- draftVersionId: R.draftVersionId,
593
- currentVersionId: R.currentVersionId,
594
- onChanged: () => void z()
672
+ F === "versions" && O && /* @__PURE__ */ g(re, {
673
+ agentId: O,
674
+ draftVersionId: M.draftVersionId,
675
+ currentVersionId: M.currentVersionId,
676
+ onChanged: () => void P()
595
677
  })
596
678
  ]
597
- })
679
+ })]
598
680
  });
599
681
  };
600
- export { P as AgentDetailPage };
682
+ export { j as AgentDetailPage };
601
683
 
602
684
  //# sourceMappingURL=AgentDetailPage.js.map