@burdenoff/microfe-botmanor 2026.1027.2 → 2026.1027.3

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 (80) hide show
  1. package/dist/botlit/BotlitRoutes.js +142 -132
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/components/AgentApprovalPanel.js +144 -126
  4. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  5. package/dist/botlit/components/ModelRegistrationPanel.js +4 -4
  6. package/dist/botlit/components/VersionHistoryPanel.js +92 -83
  7. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  8. package/dist/botlit/pages/A2AAgentDetailPage.js +212 -203
  9. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  10. package/dist/botlit/pages/A2ARegistryPage.js +129 -117
  11. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  12. package/dist/botlit/pages/AgentApprovalsPage.js +122 -110
  13. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  14. package/dist/botlit/pages/AgentBuilderPage.js +18 -18
  15. package/dist/botlit/pages/AgentDetailPage.js +298 -273
  16. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  17. package/dist/botlit/pages/AgentsListPage.js +145 -121
  18. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  19. package/dist/botlit/pages/BotChannelsTab.js +238 -226
  20. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  21. package/dist/botlit/pages/BotDetailPage.js +307 -288
  22. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  23. package/dist/botlit/pages/BotWorkflowTab.js +125 -116
  24. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  25. package/dist/botlit/pages/BotsListPage.js +159 -144
  26. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  27. package/dist/botlit/pages/BucketsPage.js +279 -258
  28. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  29. package/dist/botlit/pages/ChannelDetailPage.js +346 -328
  30. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  31. package/dist/botlit/pages/ChannelRoutesPage.js +10 -10
  32. package/dist/botlit/pages/ChannelsPage.js +163 -148
  33. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  34. package/dist/botlit/pages/DashboardPage.js +129 -114
  35. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  36. package/dist/botlit/pages/ExecutionDetailPage.js +145 -139
  37. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  38. package/dist/botlit/pages/ExecutionsPage.js +14 -14
  39. package/dist/botlit/pages/InstalledPackagesPage.js +245 -227
  40. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  41. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +168 -156
  42. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  43. package/dist/botlit/pages/KnowledgeBasesPage.js +91 -79
  44. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  45. package/dist/botlit/pages/MCPServerDetailPage.js +200 -188
  46. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  47. package/dist/botlit/pages/MCPServersPage.js +170 -155
  48. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  49. package/dist/botlit/pages/PoliciesPage.js +113 -104
  50. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  51. package/dist/botlit/pages/PolicyDetailPage.js +145 -133
  52. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  53. package/dist/botlit/pages/PromptStudioPage.js +106 -97
  54. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  55. package/dist/botlit/pages/PromptTemplateDetailPage.js +359 -347
  56. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  57. package/dist/botlit/pages/PromptTemplatesPage.js +127 -112
  58. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  59. package/dist/botlit/pages/RetrievalProfileDetailPage.js +219 -210
  60. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/RetrievalProfilesPage.js +112 -103
  62. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  63. package/dist/botlit/pages/SettingsPage.js +264 -252
  64. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  65. package/dist/botlit/pages/SkillDetailPage.js +235 -226
  66. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  67. package/dist/botlit/pages/SkillsPage.js +115 -106
  68. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  69. package/dist/botlit/pages/StorePackageDetailPage.js +194 -188
  70. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  71. package/dist/botlit/pages/StorePage.js +161 -155
  72. package/dist/botlit/pages/StorePage.js.map +1 -1
  73. package/dist/botlit/permissions/PermissionRequired.js +45 -0
  74. package/dist/botlit/permissions/PermissionRequired.js.map +1 -0
  75. package/dist/botlit/permissions/botmanorPermissions.js +72 -0
  76. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -0
  77. package/dist/botlit/permissions/index.js +3 -0
  78. package/dist/botlit/permissions/useBotmanorPermissions.js +19 -0
  79. package/dist/botlit/permissions/useBotmanorPermissions.js.map +1 -0
  80. package/package.json +1 -1
@@ -1,32 +1,35 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { useBotlit as t } from "../providers/BotlitProvider.js";
3
- import { useBot as n, useCreateBot as r, useDeleteBot as ee, useUpdateBot as te } from "../hooks/useBots.js";
3
+ import { useBot as n, useCreateBot as ee, useDeleteBot as r, useUpdateBot as te } from "../hooks/useBots.js";
4
4
  import { useAgents as ne } from "../hooks/useAgents.js";
5
5
  import { cn as re } from "../utils/cn.js";
6
- import { formatNumber as ie, formatRelativeTime as i } from "../utils/formatters.js";
7
- import { PageLayout as a } from "../components/PageLayout.js";
8
- import { Card as o, CardContent as s, CardDescription as c, CardHeader as l, CardTitle as u } from "../components/Card.js";
9
- import { Button as d } from "../components/Button.js";
10
- import { Badge as f, StatusBadge as p } from "../components/Badge.js";
11
- import { EmptyState as ae } from "../components/EmptyState.js";
12
- import { FormField as m, Input as h, Textarea as g } from "../components/Input.js";
13
- import { toUnion as _ } from "../utils/unions.js";
14
- import { QuotaExhaustedDialog as oe } from "../components/QuotaExhaustedDialog.js";
15
- import { BotChannelsTab as se } from "./BotChannelsTab.js";
16
- import { Suspense as ce, lazy as v, useEffect as y, useState as b } from "react";
17
- import { GlassCard as le, NextSteps as ue, PagePurpose as de } from "@burdenoff/fe-libs/ui";
18
- import { Fragment as fe, jsx as x, jsxs as S } from "react/jsx-runtime";
19
- import { Link as pe, useParams as me, useSearchParams as he } from "react-router";
20
- import { isQuotaExhaustedError as ge } from "@burdenoff/fe-libs/shared/utils";
21
- import { ArrowLeft as C, BarChart3 as _e, Bot as w, Edit as ve, GitBranch as ye, Layers as T, MessageSquare as E, Radio as D, Save as O, Shield as k, Trash2 as A, Workflow as j } from "lucide-react";
22
- import { toast as M } from "sonner";
6
+ import { formatNumber as ie, formatRelativeTime as ae } from "../utils/formatters.js";
7
+ import { BOTMANOR_PERMISSIONS as i } from "../permissions/botmanorPermissions.js";
8
+ import { BotmanorPermissionGate as a, useBotmanorCan as oe } from "../permissions/useBotmanorPermissions.js";
9
+ import { PageLayout as o } from "../components/PageLayout.js";
10
+ import { Button as s } from "../components/Button.js";
11
+ import "../permissions/index.js";
12
+ import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
13
+ import { Badge as p, StatusBadge as m } from "../components/Badge.js";
14
+ import { EmptyState as se } from "../components/EmptyState.js";
15
+ import { FormField as h, Input as g, Textarea as _ } from "../components/Input.js";
16
+ import { toUnion as v } from "../utils/unions.js";
17
+ import { QuotaExhaustedDialog as ce } from "../components/QuotaExhaustedDialog.js";
18
+ import { BotChannelsTab as le } from "./BotChannelsTab.js";
19
+ import { Suspense as ue, lazy as y, useEffect as de, useState as b } from "react";
20
+ import { GlassCard as fe, NextSteps as pe, PagePurpose as me } from "@burdenoff/fe-libs/ui";
21
+ import { Fragment as he, jsx as x, jsxs as S } from "react/jsx-runtime";
22
+ import { Link as ge, useParams as _e, useSearchParams as ve } from "react-router";
23
+ import { isQuotaExhaustedError as ye } from "@burdenoff/fe-libs/shared/utils";
24
+ import { ArrowLeft as C, BarChart3 as be, Bot as w, Edit as xe, GitBranch as T, Layers as E, MessageSquare as D, Radio as O, Save as k, Shield as A, Trash2 as j, Workflow as M } from "lucide-react";
25
+ import { toast as N } from "sonner";
23
26
  //#region src/botlit/pages/BotDetailPage.tsx
24
- var N = v(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkflowTab }))), P = [
27
+ var Se = y(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkflowTab }))), P = [
25
28
  "SINGLE",
26
29
  "ROUND_ROBIN",
27
30
  "INTELLIGENT",
28
31
  "CUSTOM"
29
- ], be = "ASSISTANT", F = {
32
+ ], Ce = "ASSISTANT", F = {
30
33
  name: "",
31
34
  slug: "",
32
35
  description: "",
@@ -36,13 +39,13 @@ var N = v(() => import("./BotWorkflowTab.js").then((e) => ({ default: e.BotWorkf
36
39
  fallbackMessage: "",
37
40
  defaultAgentId: ""
38
41
  };
39
- function xe(e) {
42
+ function we(e) {
40
43
  return {
41
44
  name: e.name,
42
45
  slug: e.slug,
43
46
  description: e.description ?? "",
44
47
  icon: e.icon || F.icon,
45
- routingStrategy: _(e.routingStrategy, P, "SINGLE"),
48
+ routingStrategy: v(e.routingStrategy, P, "SINGLE"),
46
49
  welcomeMessage: e.welcomeMessage ?? "",
47
50
  fallbackMessage: e.fallbackMessage ?? "",
48
51
  defaultAgentId: e.defaultAgentId ?? ""
@@ -57,82 +60,82 @@ var I = [
57
60
  "guardrails",
58
61
  "releases"
59
62
  ];
60
- function Se(e) {
63
+ function Te(e) {
61
64
  if (e.get("code") && e.get("state")) return "channels";
62
65
  let t = e.get("tab");
63
66
  return I.find((e) => e === t) ?? "overview";
64
67
  }
65
- var L = ({ isNew: v, isEditing: I }) => {
66
- let L = e(), { botId: R } = me(), [Ce] = he(), { navigateTo: z, getPath: we, workspaceId: B, navigate: V } = t(), { data: H, loading: Te, refetch: U } = n(v ? void 0 : R), { data: W } = ne(), [Ee, De] = r(), [G, K] = te(), [Oe, ke] = ee(), [q, J] = b(() => Se(Ce)), [Y, X] = b(F), [Ae, Z] = b(!1), je = () => {
67
- if (V) {
68
- V("/billing");
68
+ var L = ({ isNew: y, isEditing: I }) => {
69
+ let L = e(), { botId: R } = _e(), [z] = ve(), Ee = oe(), { navigateTo: B, getPath: De, workspaceId: V, navigate: H } = t(), { data: U, loading: Oe, refetch: W } = n(y ? void 0 : R), { data: G } = ne(), [ke, Ae] = ee(), [K, q] = te(), [je, Me] = r(), [J, Y] = b(() => Te(z)), [X, Z] = b(F), [Ne, Q] = b(!1), Pe = () => {
70
+ if (H) {
71
+ H("/billing");
69
72
  return;
70
73
  }
71
74
  window.location.assign("/billing");
72
75
  };
73
- y(() => {
74
- H && !v && X(xe(H));
75
- }, [H, v]);
76
- let Q = async () => {
77
- if (!(!Y.name || !B)) try {
78
- let e = await Ee({
79
- workspaceId: B,
80
- name: Y.name,
81
- slug: Y.slug || Y.name.toLowerCase().replace(/\s+/g, "-"),
82
- type: be,
83
- routingStrategy: Y.routingStrategy,
84
- description: Y.description || void 0,
85
- icon: Y.icon || void 0
76
+ de(() => {
77
+ U && !y && Z(we(U));
78
+ }, [U, y]);
79
+ let Fe = async () => {
80
+ if (!(!X.name || !V)) try {
81
+ let e = await ke({
82
+ workspaceId: V,
83
+ name: X.name,
84
+ slug: X.slug || X.name.toLowerCase().replace(/\s+/g, "-"),
85
+ type: Ce,
86
+ routingStrategy: X.routingStrategy,
87
+ description: X.description || void 0,
88
+ icon: X.icon || void 0
86
89
  });
87
- M.success(`${L("botlit.botDetail.create.successPrefix", "Bot")} "${Y.name}" ${L("botlit.botDetail.create.successSuffix", "created successfully")}`), e?.id && z(`bots/${e.id}?tab=workflow`);
90
+ N.success(`${L("botlit.botDetail.create.successPrefix", "Bot")} "${X.name}" ${L("botlit.botDetail.create.successSuffix", "created successfully")}`), e?.id && B(`bots/${e.id}?tab=workflow`);
88
91
  } catch (e) {
89
- if (ge(e)) {
90
- Z(!0);
92
+ if (ye(e)) {
93
+ Q(!0);
91
94
  return;
92
95
  }
93
96
  let t = e instanceof Error ? e.message : L("botlit.botDetail.create.error", "Failed to create bot");
94
- M.error(t);
97
+ N.error(t);
95
98
  }
96
- }, Me = async () => {
99
+ }, Ie = async () => {
97
100
  if (R) try {
98
- await G({
101
+ await K({
99
102
  botId: R,
100
103
  input: {
101
- name: Y.name,
102
- slug: Y.slug,
103
- description: Y.description || null,
104
- icon: Y.icon || null,
105
- routingStrategy: Y.routingStrategy,
106
- welcomeMessage: Y.welcomeMessage || null,
107
- fallbackMessage: Y.fallbackMessage || null,
108
- defaultAgentId: Y.defaultAgentId || null
104
+ name: X.name,
105
+ slug: X.slug,
106
+ description: X.description || null,
107
+ icon: X.icon || null,
108
+ routingStrategy: X.routingStrategy,
109
+ welcomeMessage: X.welcomeMessage || null,
110
+ fallbackMessage: X.fallbackMessage || null,
111
+ defaultAgentId: X.defaultAgentId || null
109
112
  }
110
- }), await U(), M.success(`${L("botlit.botDetail.update.successPrefix", "Bot")} "${Y.name}" ${L("botlit.botDetail.update.successSuffix", "updated successfully")}`), I && z(`bots/${R}`);
113
+ }), await W(), N.success(`${L("botlit.botDetail.update.successPrefix", "Bot")} "${X.name}" ${L("botlit.botDetail.update.successSuffix", "updated successfully")}`), I && B(`bots/${R}`);
111
114
  } catch (e) {
112
115
  let t = e instanceof Error ? e.message : L("botlit.botDetail.update.error", "Failed to update bot");
113
- M.error(t);
116
+ N.error(t);
114
117
  }
115
118
  };
116
- if (v) return /* @__PURE__ */ S(fe, { children: [/* @__PURE__ */ x(a, {
119
+ if (y) return /* @__PURE__ */ S(he, { children: [/* @__PURE__ */ x(o, {
117
120
  title: L("botlit.botDetail.createPage.title", "Create New Bot"),
118
121
  description: L("botlit.botDetail.createPage.description", "Set up a new AI-powered bot"),
119
122
  actions: /* @__PURE__ */ S("div", {
120
123
  className: "flex gap-2",
121
- children: [/* @__PURE__ */ x(d, {
124
+ children: [/* @__PURE__ */ x(s, {
122
125
  variant: "outline",
123
- onClick: () => z("bots"),
126
+ onClick: () => B("bots"),
124
127
  children: L("botlit.common.cancel", "Cancel")
125
- }), /* @__PURE__ */ x(d, {
126
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
127
- onClick: Q,
128
- isLoading: De.loading,
129
- disabled: !Y.name || !B,
128
+ }), /* @__PURE__ */ x(s, {
129
+ leftIcon: /* @__PURE__ */ x(k, { size: 16 }),
130
+ onClick: Fe,
131
+ isLoading: Ae.loading,
132
+ disabled: !X.name || !V,
130
133
  children: L("botlit.botDetail.createPage.actions.createBot", "Create Bot")
131
134
  })]
132
135
  }),
133
- children: /* @__PURE__ */ x(o, {
136
+ children: /* @__PURE__ */ x(c, {
134
137
  className: "max-w-2xl",
135
- children: /* @__PURE__ */ S(s, {
138
+ children: /* @__PURE__ */ S(l, {
136
139
  className: "pt-6 space-y-6",
137
140
  children: [
138
141
  /* @__PURE__ */ S("div", {
@@ -151,67 +154,67 @@ var L = ({ isNew: v, isEditing: I }) => {
151
154
  "💡",
152
155
  "🚀",
153
156
  "⚡"
154
- ], t = e.indexOf(Y.icon);
155
- X({
156
- ...Y,
157
+ ], t = e.indexOf(X.icon);
158
+ Z({
159
+ ...X,
157
160
  icon: e[(t + 1) % e.length]
158
161
  });
159
162
  },
160
- children: Y.icon
163
+ children: X.icon
161
164
  }), /* @__PURE__ */ x("p", {
162
165
  className: "text-sm text-text-secondary",
163
166
  children: L("botlit.botDetail.form.clickToChangeIcon", "Click to change icon")
164
167
  })]
165
168
  }),
166
- /* @__PURE__ */ x(m, {
169
+ /* @__PURE__ */ x(h, {
167
170
  label: L("botlit.botDetail.form.botName", "Bot Name"),
168
171
  required: !0,
169
172
  htmlFor: "name",
170
- children: /* @__PURE__ */ x(h, {
173
+ children: /* @__PURE__ */ x(g, {
171
174
  id: "name",
172
175
  placeholder: L("botlit.botDetail.form.botNamePlaceholder", "e.g., Customer Support Bot"),
173
- value: Y.name,
174
- onChange: (e) => X({
175
- ...Y,
176
+ value: X.name,
177
+ onChange: (e) => Z({
178
+ ...X,
176
179
  name: e.target.value
177
180
  })
178
181
  })
179
182
  }),
180
- /* @__PURE__ */ x(m, {
183
+ /* @__PURE__ */ x(h, {
181
184
  label: L("botlit.botDetail.form.slug", "Slug"),
182
185
  htmlFor: "slug",
183
- children: /* @__PURE__ */ x(h, {
186
+ children: /* @__PURE__ */ x(g, {
184
187
  id: "slug",
185
188
  placeholder: L("botlit.botDetail.form.slugPlaceholder", "customer-support-bot"),
186
- value: Y.slug,
187
- onChange: (e) => X({
188
- ...Y,
189
+ value: X.slug,
190
+ onChange: (e) => Z({
191
+ ...X,
189
192
  slug: e.target.value
190
193
  })
191
194
  })
192
195
  }),
193
- /* @__PURE__ */ x(m, {
196
+ /* @__PURE__ */ x(h, {
194
197
  label: L("botlit.botDetail.form.description", "Description"),
195
198
  htmlFor: "description",
196
- children: /* @__PURE__ */ x(g, {
199
+ children: /* @__PURE__ */ x(_, {
197
200
  id: "description",
198
201
  placeholder: L("botlit.botDetail.form.descriptionPlaceholder", "Describe what this bot does..."),
199
- value: Y.description,
200
- onChange: (e) => X({
201
- ...Y,
202
+ value: X.description,
203
+ onChange: (e) => Z({
204
+ ...X,
202
205
  description: e.target.value
203
206
  }),
204
207
  rows: 4
205
208
  })
206
209
  }),
207
- /* @__PURE__ */ x(m, {
210
+ /* @__PURE__ */ x(h, {
208
211
  label: L("botlit.botDetail.form.routingStrategy", "Routing Strategy"),
209
212
  children: /* @__PURE__ */ S("select", {
210
213
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
211
- value: Y.routingStrategy,
212
- onChange: (e) => X({
213
- ...Y,
214
- routingStrategy: _(e.target.value, P, "SINGLE")
214
+ value: X.routingStrategy,
215
+ onChange: (e) => Z({
216
+ ...X,
217
+ routingStrategy: v(e.target.value, P, "SINGLE")
215
218
  }),
216
219
  children: [
217
220
  /* @__PURE__ */ x("option", {
@@ -236,56 +239,56 @@ var L = ({ isNew: v, isEditing: I }) => {
236
239
  ]
237
240
  })
238
241
  })
239
- }), /* @__PURE__ */ x(oe, {
240
- open: Ae,
242
+ }), /* @__PURE__ */ x(ce, {
243
+ open: Ne,
241
244
  title: L("botlit.usage.botQuota.title", "Bot Limit Reached"),
242
245
  description: L("botlit.usage.botQuota.description", "You have reached the number of bots allowed on your current plan."),
243
- onClose: () => Z(!1),
244
- onViewBilling: je
246
+ onClose: () => Q(!1),
247
+ onViewBilling: Pe
245
248
  })] });
246
- if (Te) return /* @__PURE__ */ x(a, {
249
+ if (Oe) return /* @__PURE__ */ x(o, {
247
250
  title: L("botlit.common.loading", "Loading..."),
248
251
  children: /* @__PURE__ */ x("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
249
252
  });
250
- if (!H) return /* @__PURE__ */ x(a, {
253
+ if (!U) return /* @__PURE__ */ x(o, {
251
254
  title: L("botlit.botDetail.notFound.title", "Bot Not Found"),
252
- children: /* @__PURE__ */ x(ae, {
255
+ children: /* @__PURE__ */ x(se, {
253
256
  illustration: "empty-agents",
254
257
  title: L("botlit.botDetail.notFound.title", "Bot Not Found"),
255
258
  description: L("botlit.botDetail.notFound.description", "The bot you're looking for doesn't exist."),
256
- action: /* @__PURE__ */ x(d, {
257
- onClick: () => z("bots"),
259
+ action: /* @__PURE__ */ x(s, {
260
+ onClick: () => B("bots"),
258
261
  children: L("botlit.botDetail.notFound.backAction", "Back to Bots")
259
262
  })
260
263
  })
261
264
  });
262
- if (I && H) return /* @__PURE__ */ x(a, {
265
+ if (I && U) return /* @__PURE__ */ x(o, {
263
266
  title: /* @__PURE__ */ S("div", {
264
267
  className: "flex items-center gap-3",
265
- children: [/* @__PURE__ */ x(d, {
268
+ children: [/* @__PURE__ */ x(s, {
266
269
  variant: "ghost",
267
270
  size: "icon",
268
- onClick: () => z(`bots/${R}`),
271
+ onClick: () => B(`bots/${R}`),
269
272
  children: /* @__PURE__ */ x(C, { size: 20 })
270
273
  }), /* @__PURE__ */ x("span", { children: L("botlit.botDetail.editPage.title", "Edit Bot") })]
271
274
  }),
272
275
  actions: /* @__PURE__ */ S("div", {
273
276
  className: "flex gap-2",
274
- children: [/* @__PURE__ */ x(d, {
277
+ children: [/* @__PURE__ */ x(s, {
275
278
  variant: "outline",
276
- onClick: () => z(`bots/${R}`),
279
+ onClick: () => B(`bots/${R}`),
277
280
  children: L("botlit.common.cancel", "Cancel")
278
- }), /* @__PURE__ */ x(d, {
279
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
280
- onClick: Me,
281
- isLoading: K.loading,
282
- disabled: !Y.name,
281
+ }), /* @__PURE__ */ x(s, {
282
+ leftIcon: /* @__PURE__ */ x(k, { size: 16 }),
283
+ onClick: Ie,
284
+ isLoading: q.loading,
285
+ disabled: !X.name,
283
286
  children: L("botlit.botDetail.editPage.actions.saveChanges", "Save Changes")
284
287
  })]
285
288
  }),
286
- children: /* @__PURE__ */ x(o, {
289
+ children: /* @__PURE__ */ x(c, {
287
290
  className: "max-w-2xl",
288
- children: /* @__PURE__ */ S(s, {
291
+ children: /* @__PURE__ */ S(l, {
289
292
  className: "pt-6 space-y-6",
290
293
  children: [
291
294
  /* @__PURE__ */ S("div", {
@@ -304,67 +307,67 @@ var L = ({ isNew: v, isEditing: I }) => {
304
307
  "💡",
305
308
  "🚀",
306
309
  "⚡"
307
- ], t = Y.icon, n = e.indexOf(t);
308
- X({
309
- ...Y,
310
+ ], t = X.icon, n = e.indexOf(t);
311
+ Z({
312
+ ...X,
310
313
  icon: e[(n + 1) % e.length]
311
314
  });
312
315
  },
313
- children: Y.icon
316
+ children: X.icon
314
317
  }), /* @__PURE__ */ x("p", {
315
318
  className: "text-sm text-text-secondary",
316
319
  children: L("botlit.botDetail.form.clickToChangeIcon", "Click to change icon")
317
320
  })]
318
321
  }),
319
- /* @__PURE__ */ x(m, {
322
+ /* @__PURE__ */ x(h, {
320
323
  label: L("botlit.botDetail.form.botName", "Bot Name"),
321
324
  required: !0,
322
325
  htmlFor: "edit-name",
323
- children: /* @__PURE__ */ x(h, {
326
+ children: /* @__PURE__ */ x(g, {
324
327
  id: "edit-name",
325
328
  placeholder: L("botlit.botDetail.form.botNamePlaceholder", "e.g., Customer Support Bot"),
326
- value: Y.name,
327
- onChange: (e) => X({
328
- ...Y,
329
+ value: X.name,
330
+ onChange: (e) => Z({
331
+ ...X,
329
332
  name: e.target.value
330
333
  })
331
334
  })
332
335
  }),
333
- /* @__PURE__ */ x(m, {
336
+ /* @__PURE__ */ x(h, {
334
337
  label: L("botlit.botDetail.form.slug", "Slug"),
335
338
  htmlFor: "edit-slug",
336
- children: /* @__PURE__ */ x(h, {
339
+ children: /* @__PURE__ */ x(g, {
337
340
  id: "edit-slug",
338
341
  placeholder: L("botlit.botDetail.form.slugPlaceholder", "customer-support-bot"),
339
- value: Y.slug,
340
- onChange: (e) => X({
341
- ...Y,
342
+ value: X.slug,
343
+ onChange: (e) => Z({
344
+ ...X,
342
345
  slug: e.target.value
343
346
  })
344
347
  })
345
348
  }),
346
- /* @__PURE__ */ x(m, {
349
+ /* @__PURE__ */ x(h, {
347
350
  label: L("botlit.botDetail.form.description", "Description"),
348
351
  htmlFor: "edit-description",
349
- children: /* @__PURE__ */ x(g, {
352
+ children: /* @__PURE__ */ x(_, {
350
353
  id: "edit-description",
351
354
  placeholder: L("botlit.botDetail.form.descriptionPlaceholder", "Describe what this bot does..."),
352
- value: Y.description,
353
- onChange: (e) => X({
354
- ...Y,
355
+ value: X.description,
356
+ onChange: (e) => Z({
357
+ ...X,
355
358
  description: e.target.value
356
359
  }),
357
360
  rows: 4
358
361
  })
359
362
  }),
360
- /* @__PURE__ */ x(m, {
363
+ /* @__PURE__ */ x(h, {
361
364
  label: L("botlit.botDetail.form.routingStrategy", "Routing Strategy"),
362
365
  children: /* @__PURE__ */ S("select", {
363
366
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
364
- value: Y.routingStrategy,
365
- onChange: (e) => X({
366
- ...Y,
367
- routingStrategy: _(e.target.value, P, "SINGLE")
367
+ value: X.routingStrategy,
368
+ onChange: (e) => Z({
369
+ ...X,
370
+ routingStrategy: v(e.target.value, P, "SINGLE")
368
371
  }),
369
372
  children: [
370
373
  /* @__PURE__ */ x("option", {
@@ -386,46 +389,46 @@ var L = ({ isNew: v, isEditing: I }) => {
386
389
  ]
387
390
  })
388
391
  }),
389
- /* @__PURE__ */ x(m, {
392
+ /* @__PURE__ */ x(h, {
390
393
  label: L("botlit.botDetail.form.welcomeMessage", "Welcome Message"),
391
394
  htmlFor: "edit-welcome",
392
- children: /* @__PURE__ */ x(g, {
395
+ children: /* @__PURE__ */ x(_, {
393
396
  id: "edit-welcome",
394
397
  placeholder: L("botlit.botDetail.form.welcomeMessagePlaceholder", "Welcome message shown to users..."),
395
- value: Y.welcomeMessage,
396
- onChange: (e) => X({
397
- ...Y,
398
+ value: X.welcomeMessage,
399
+ onChange: (e) => Z({
400
+ ...X,
398
401
  welcomeMessage: e.target.value
399
402
  }),
400
403
  rows: 3
401
404
  })
402
405
  }),
403
- /* @__PURE__ */ x(m, {
406
+ /* @__PURE__ */ x(h, {
404
407
  label: L("botlit.botDetail.form.fallbackMessage", "Fallback Message"),
405
408
  htmlFor: "edit-fallback",
406
- children: /* @__PURE__ */ x(h, {
409
+ children: /* @__PURE__ */ x(g, {
407
410
  id: "edit-fallback",
408
411
  placeholder: L("botlit.botDetail.form.fallbackMessagePlaceholder", "Message when agent can't respond..."),
409
- value: Y.fallbackMessage,
410
- onChange: (e) => X({
411
- ...Y,
412
+ value: X.fallbackMessage,
413
+ onChange: (e) => Z({
414
+ ...X,
412
415
  fallbackMessage: e.target.value
413
416
  })
414
417
  })
415
418
  }),
416
- /* @__PURE__ */ x(m, {
419
+ /* @__PURE__ */ x(h, {
417
420
  label: L("botlit.botDetail.form.defaultAgent", "Default Agent"),
418
421
  children: /* @__PURE__ */ S("select", {
419
422
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
420
- value: Y.defaultAgentId,
421
- onChange: (e) => X({
422
- ...Y,
423
+ value: X.defaultAgentId,
424
+ onChange: (e) => Z({
425
+ ...X,
423
426
  defaultAgentId: e.target.value
424
427
  }),
425
428
  children: [/* @__PURE__ */ x("option", {
426
429
  value: "",
427
430
  children: L("botlit.botDetail.form.noDefaultAgent", "No default agent")
428
- }), W?.map((e) => /* @__PURE__ */ x("option", {
431
+ }), G?.map((e) => /* @__PURE__ */ x("option", {
429
432
  value: e.id,
430
433
  children: e.name
431
434
  }, e.id))]
@@ -435,21 +438,21 @@ var L = ({ isNew: v, isEditing: I }) => {
435
438
  })
436
439
  })
437
440
  });
438
- let Ne = [
441
+ let Le = [
439
442
  {
440
443
  id: "overview",
441
444
  label: L("botlit.botDetail.tabs.overview", "Overview"),
442
- icon: /* @__PURE__ */ x(_e, { size: 16 })
445
+ icon: /* @__PURE__ */ x(be, { size: 16 })
443
446
  },
444
447
  {
445
448
  id: "workflow",
446
449
  label: L("botlit.botDetail.tabs.workflow", "Workflow"),
447
- icon: /* @__PURE__ */ x(j, { size: 16 })
450
+ icon: /* @__PURE__ */ x(M, { size: 16 })
448
451
  },
449
452
  {
450
453
  id: "routing",
451
454
  label: L("botlit.botDetail.tabs.routing", "Routing"),
452
- icon: /* @__PURE__ */ x(ye, { size: 16 })
455
+ icon: /* @__PURE__ */ x(T, { size: 16 })
453
456
  },
454
457
  {
455
458
  id: "agents",
@@ -459,205 +462,220 @@ var L = ({ isNew: v, isEditing: I }) => {
459
462
  {
460
463
  id: "channels",
461
464
  label: L("botlit.botDetail.tabs.channels", "Channels"),
462
- icon: /* @__PURE__ */ x(D, { size: 16 })
465
+ icon: /* @__PURE__ */ x(O, { size: 16 })
463
466
  },
464
467
  {
465
468
  id: "guardrails",
466
469
  label: L("botlit.botDetail.tabs.guardrails", "Guardrails"),
467
- icon: /* @__PURE__ */ x(k, { size: 16 })
470
+ icon: /* @__PURE__ */ x(A, { size: 16 })
468
471
  },
469
472
  {
470
473
  id: "releases",
471
474
  label: L("botlit.botDetail.tabs.releases", "Releases"),
472
- icon: /* @__PURE__ */ x(T, { size: 16 })
475
+ icon: /* @__PURE__ */ x(E, { size: 16 })
473
476
  }
474
- ], $ = H.defaultAgentId ? W?.find((e) => e.id === H.defaultAgentId) : null;
475
- return /* @__PURE__ */ x(a, {
477
+ ], $ = U.defaultAgentId ? G?.find((e) => e.id === U.defaultAgentId) : null;
478
+ return /* @__PURE__ */ x(o, {
476
479
  title: /* @__PURE__ */ S("div", {
477
480
  className: "flex items-center gap-3",
478
481
  children: [
479
- /* @__PURE__ */ x(d, {
482
+ /* @__PURE__ */ x(s, {
480
483
  variant: "ghost",
481
484
  size: "icon",
482
- onClick: () => z("bots"),
485
+ onClick: () => B("bots"),
483
486
  children: /* @__PURE__ */ x(C, { size: 20 })
484
487
  }),
485
488
  /* @__PURE__ */ x("span", {
486
489
  className: "text-3xl",
487
- children: H.icon
490
+ children: U.icon
488
491
  }),
489
492
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
490
493
  className: "flex items-center gap-2",
491
494
  children: [
492
- /* @__PURE__ */ x("span", { children: H.name }),
493
- /* @__PURE__ */ x(p, { status: H.status }),
494
- /* @__PURE__ */ x(f, {
495
+ /* @__PURE__ */ x("span", { children: U.name }),
496
+ /* @__PURE__ */ x(m, { status: U.status }),
497
+ /* @__PURE__ */ x(p, {
495
498
  variant: "outline",
496
- children: H.slug
499
+ children: U.slug
497
500
  })
498
501
  ]
499
502
  }), /* @__PURE__ */ x("p", {
500
503
  className: "text-sm font-normal text-text-secondary",
501
- children: H.description
504
+ children: U.description
502
505
  })] })
503
506
  ]
504
507
  }),
505
508
  actions: /* @__PURE__ */ S("div", {
506
509
  className: "flex gap-2",
507
510
  children: [
508
- H.status === "DRAFT" || H.status === "ARCHIVED" ? /* @__PURE__ */ x(d, {
509
- variant: "default",
510
- isLoading: K.loading,
511
- onClick: async () => {
512
- try {
513
- if (!R) return;
514
- await G({
515
- botId: R,
516
- input: { status: "ACTIVE" }
517
- }), await U(), M.success(`${L("botlit.botDetail.activate.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.activate.successSuffix", "activated")}`);
518
- } catch (e) {
519
- M.error(e instanceof Error ? e.message : L("botlit.botDetail.activate.error", "Failed to activate bot"));
520
- }
521
- },
522
- children: L("botlit.botDetail.actions.activate", "Activate")
523
- }) : /* @__PURE__ */ x(d, {
524
- variant: "outline",
525
- isLoading: K.loading,
526
- onClick: async () => {
527
- try {
528
- if (!R) return;
529
- await G({
530
- botId: R,
531
- input: { status: "DRAFT" }
532
- }), await U(), M.success(`${L("botlit.botDetail.deactivate.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.deactivate.successSuffix", "deactivated")}`);
533
- } catch (e) {
534
- M.error(e instanceof Error ? e.message : L("botlit.botDetail.deactivate.error", "Failed to deactivate bot"));
535
- }
536
- },
537
- children: L("botlit.botDetail.actions.deactivate", "Deactivate")
511
+ U.status === "DRAFT" || U.status === "ARCHIVED" ? /* @__PURE__ */ x(a, {
512
+ permission: i.APP_UPDATE,
513
+ children: /* @__PURE__ */ x(s, {
514
+ variant: "default",
515
+ isLoading: q.loading,
516
+ onClick: async () => {
517
+ try {
518
+ if (!R) return;
519
+ await K({
520
+ botId: R,
521
+ input: { status: "ACTIVE" }
522
+ }), await W(), N.success(`${L("botlit.botDetail.activate.successPrefix", "Bot")} "${U.name}" ${L("botlit.botDetail.activate.successSuffix", "activated")}`);
523
+ } catch (e) {
524
+ N.error(e instanceof Error ? e.message : L("botlit.botDetail.activate.error", "Failed to activate bot"));
525
+ }
526
+ },
527
+ children: L("botlit.botDetail.actions.activate", "Activate")
528
+ })
529
+ }) : /* @__PURE__ */ x(a, {
530
+ permission: i.APP_UPDATE,
531
+ children: /* @__PURE__ */ x(s, {
532
+ variant: "outline",
533
+ isLoading: q.loading,
534
+ onClick: async () => {
535
+ try {
536
+ if (!R) return;
537
+ await K({
538
+ botId: R,
539
+ input: { status: "DRAFT" }
540
+ }), await W(), N.success(`${L("botlit.botDetail.deactivate.successPrefix", "Bot")} "${U.name}" ${L("botlit.botDetail.deactivate.successSuffix", "deactivated")}`);
541
+ } catch (e) {
542
+ N.error(e instanceof Error ? e.message : L("botlit.botDetail.deactivate.error", "Failed to deactivate bot"));
543
+ }
544
+ },
545
+ children: L("botlit.botDetail.actions.deactivate", "Deactivate")
546
+ })
538
547
  }),
539
- /* @__PURE__ */ x(d, {
540
- variant: "outline",
541
- leftIcon: /* @__PURE__ */ x(ve, { size: 16 }),
542
- onClick: () => z(`bots/${R}/edit`),
543
- children: L("botlit.botDetail.actions.editBot", "Edit Bot")
548
+ /* @__PURE__ */ x(a, {
549
+ permission: i.APP_UPDATE,
550
+ children: /* @__PURE__ */ x(s, {
551
+ variant: "outline",
552
+ leftIcon: /* @__PURE__ */ x(xe, { size: 16 }),
553
+ onClick: () => B(`bots/${R}/edit`),
554
+ children: L("botlit.botDetail.actions.editBot", "Edit Bot")
555
+ })
544
556
  }),
545
- /* @__PURE__ */ x(d, {
546
- variant: "outline",
547
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
548
- onClick: () => {
549
- let e = H?.defaultAgentId;
550
- z(e ? `chat/${e}` : "chat");
551
- },
552
- children: L("botlit.botDetail.actions.testBot", "Test Bot")
557
+ /* @__PURE__ */ x(a, {
558
+ permission: i.AGENT_EXECUTE,
559
+ children: /* @__PURE__ */ x(s, {
560
+ variant: "outline",
561
+ leftIcon: /* @__PURE__ */ x(D, { size: 16 }),
562
+ onClick: () => {
563
+ let e = U?.defaultAgentId;
564
+ B(e ? `chat/${e}` : "chat");
565
+ },
566
+ children: L("botlit.botDetail.actions.testBot", "Test Bot")
567
+ })
553
568
  }),
554
- /* @__PURE__ */ x(d, {
555
- variant: "destructive",
556
- leftIcon: /* @__PURE__ */ x(A, { size: 16 }),
557
- isLoading: ke.loading,
558
- onClick: async () => {
559
- if (R && confirm(`${L("botlit.botDetail.delete.confirmPrefix", "Are you sure you want to delete")} "${H.name}"? ${L("botlit.botDetail.delete.confirmSuffix", "This action cannot be undone.")}`)) try {
560
- await Oe(R), M.success(`${L("botlit.botDetail.delete.successPrefix", "Bot")} "${H.name}" ${L("botlit.botDetail.delete.successSuffix", "deleted successfully")}`), z("bots");
561
- } catch (e) {
562
- M.error(e instanceof Error ? e.message : L("botlit.botDetail.delete.error", "Failed to delete bot"));
563
- }
564
- },
565
- children: L("botlit.common.delete", "Delete")
569
+ /* @__PURE__ */ x(a, {
570
+ permission: i.APP_DELETE,
571
+ children: /* @__PURE__ */ x(s, {
572
+ variant: "destructive",
573
+ leftIcon: /* @__PURE__ */ x(j, { size: 16 }),
574
+ isLoading: Me.loading,
575
+ onClick: async () => {
576
+ if (R && confirm(`${L("botlit.botDetail.delete.confirmPrefix", "Are you sure you want to delete")} "${U.name}"? ${L("botlit.botDetail.delete.confirmSuffix", "This action cannot be undone.")}`)) try {
577
+ await je(R), N.success(`${L("botlit.botDetail.delete.successPrefix", "Bot")} "${U.name}" ${L("botlit.botDetail.delete.successSuffix", "deleted successfully")}`), B("bots");
578
+ } catch (e) {
579
+ N.error(e instanceof Error ? e.message : L("botlit.botDetail.delete.error", "Failed to delete bot"));
580
+ }
581
+ },
582
+ children: L("botlit.common.delete", "Delete")
583
+ })
566
584
  })
567
585
  ]
568
586
  }),
569
587
  children: /* @__PURE__ */ S("div", {
570
588
  className: "space-y-6",
571
589
  children: [
572
- /* @__PURE__ */ x(de, {
590
+ /* @__PURE__ */ x(me, {
573
591
  icon: /* @__PURE__ */ x(w, { size: 18 }),
574
592
  children: L("botlit.botDetail.purpose", "This is everything that makes up a single bot — the agent that answers, how requests are routed, which channels it is live on, its guardrails and its release history. Use the tabs to wire it up: assign a default agent, connect a channel and activate it so real users can start chatting.")
575
593
  }),
576
594
  /* @__PURE__ */ x("div", {
577
595
  className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
578
- children: Ne.map((e) => /* @__PURE__ */ S("button", {
579
- onClick: () => J(e.id),
580
- className: re("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", q === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
596
+ children: Le.map((e) => /* @__PURE__ */ S("button", {
597
+ onClick: () => Y(e.id),
598
+ className: re("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", J === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
581
599
  children: [e.icon, e.label]
582
600
  }, e.id))
583
601
  }),
584
- q === "overview" && /* @__PURE__ */ S("div", {
602
+ J === "overview" && /* @__PURE__ */ S("div", {
585
603
  className: "space-y-6",
586
- children: [/* @__PURE__ */ x(ue, {
604
+ children: [/* @__PURE__ */ x(pe, {
587
605
  storageKey: `botlit-bot-${R}`,
588
606
  steps: [
589
607
  {
590
608
  id: "workflow",
591
609
  label: L("botlit.botDetail.nextSteps.workflow", "Design the workflow"),
592
610
  description: L("botlit.botDetail.nextSteps.workflowDesc", "Lay out what the bot does on the FluidGrids canvas."),
593
- icon: /* @__PURE__ */ x(j, { size: 16 }),
594
- onClick: () => J("workflow"),
595
- done: !!H.workflowId
611
+ icon: /* @__PURE__ */ x(M, { size: 16 }),
612
+ onClick: () => Y("workflow"),
613
+ done: !!U.workflowId
596
614
  },
597
615
  {
598
616
  id: "agent",
599
617
  label: L("botlit.botDetail.nextSteps.agent", "Assign a default agent"),
600
618
  description: L("botlit.botDetail.nextSteps.agentDesc", "Choose which agent answers when this bot is messaged."),
601
619
  icon: /* @__PURE__ */ x(w, { size: 16 }),
602
- onClick: () => J("agents"),
603
- done: !!H.defaultAgentId
620
+ onClick: () => Y("agents"),
621
+ done: !!U.defaultAgentId
604
622
  },
605
623
  {
606
624
  id: "channel",
607
625
  label: L("botlit.botDetail.nextSteps.channel", "Connect a channel"),
608
626
  description: L("botlit.botDetail.nextSteps.channelDesc", "Put the bot on Slack, a web widget or another channel."),
609
- icon: /* @__PURE__ */ x(D, { size: 16 }),
610
- onClick: () => J("channels")
627
+ icon: /* @__PURE__ */ x(O, { size: 16 }),
628
+ onClick: () => Y("channels")
611
629
  },
612
630
  {
613
631
  id: "test",
614
632
  label: L("botlit.botDetail.nextSteps.test", "Test the bot"),
615
633
  description: L("botlit.botDetail.nextSteps.testDesc", "Send a message to check the experience end to end."),
616
- icon: /* @__PURE__ */ x(E, { size: 16 }),
634
+ icon: /* @__PURE__ */ x(D, { size: 16 }),
617
635
  onClick: () => {
618
- let e = H?.defaultAgentId;
619
- z(e ? `chat/${e}` : "chat");
636
+ let e = U?.defaultAgentId;
637
+ B(e ? `chat/${e}` : "chat");
620
638
  }
621
639
  },
622
640
  {
623
641
  id: "activate",
624
642
  label: L("botlit.botDetail.nextSteps.activate", "Activate the bot"),
625
643
  description: L("botlit.botDetail.nextSteps.activateDesc", "Make it live so it starts handling conversations."),
626
- icon: /* @__PURE__ */ x(k, { size: 16 }),
627
- onClick: () => z(`bots/${R}/edit`),
628
- done: H.status === "ACTIVE"
644
+ icon: /* @__PURE__ */ x(A, { size: 16 }),
645
+ onClick: () => B(`bots/${R}/edit`),
646
+ done: U.status === "ACTIVE"
629
647
  }
630
648
  ]
631
649
  }), /* @__PURE__ */ S("div", {
632
650
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
633
651
  children: [
634
- /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ x(l, { children: /* @__PURE__ */ x(u, { children: "Details" }) }), /* @__PURE__ */ S(s, {
652
+ /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(d, { children: /* @__PURE__ */ x(f, { children: "Details" }) }), /* @__PURE__ */ S(l, {
635
653
  className: "space-y-4",
636
654
  children: [
637
655
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
638
656
  className: "text-sm text-text-secondary",
639
657
  children: "Status"
640
- }), /* @__PURE__ */ x(p, { status: H.status })] }),
658
+ }), /* @__PURE__ */ x(m, { status: U.status })] }),
641
659
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
642
660
  className: "text-sm text-text-secondary",
643
661
  children: "Visibility"
644
- }), /* @__PURE__ */ x(f, {
662
+ }), /* @__PURE__ */ x(p, {
645
663
  variant: "outline",
646
- children: H.visibility
664
+ children: U.visibility
647
665
  })] }),
648
666
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
649
667
  className: "text-sm text-text-secondary",
650
668
  children: "Routing Strategy"
651
- }), /* @__PURE__ */ x(f, {
669
+ }), /* @__PURE__ */ x(p, {
652
670
  variant: "outline",
653
- children: H.routingStrategy
671
+ children: U.routingStrategy
654
672
  })] }),
655
673
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
656
674
  className: "text-sm text-text-secondary",
657
675
  children: "Default Agent"
658
676
  }), /* @__PURE__ */ x("p", {
659
677
  className: "font-medium",
660
- children: H.defaultAgentId ? "1 agent assigned" : "No agents"
678
+ children: U.defaultAgentId ? "1 agent assigned" : "No agents"
661
679
  })] }),
662
680
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
663
681
  className: "text-sm text-text-secondary",
@@ -671,18 +689,18 @@ var L = ({ isNew: v, isEditing: I }) => {
671
689
  children: "Created"
672
690
  }), /* @__PURE__ */ x("p", {
673
691
  className: "font-medium",
674
- children: i(H.createdAt)
692
+ children: ae(U.createdAt)
675
693
  })] }),
676
694
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
677
695
  className: "text-sm text-text-secondary",
678
696
  children: "Executions"
679
697
  }), /* @__PURE__ */ x("p", {
680
698
  className: "font-medium",
681
- children: ie(H.executionCount)
699
+ children: ie(U.executionCount)
682
700
  })] })
683
701
  ]
684
702
  })] }),
685
- /* @__PURE__ */ S(le, {
703
+ /* @__PURE__ */ S(fe, {
686
704
  treatment: "glass",
687
705
  glow: !0,
688
706
  className: "lg:col-span-2 p-6",
@@ -694,16 +712,16 @@ var L = ({ isNew: v, isEditing: I }) => {
694
712
  }), /* @__PURE__ */ x("p", {
695
713
  className: "text-sm text-text-secondary",
696
714
  children: "Agent configured for this bot"
697
- })] }), /* @__PURE__ */ x(d, {
715
+ })] }), /* @__PURE__ */ x(s, {
698
716
  size: "sm",
699
717
  variant: "outline",
700
- onClick: () => J("agents"),
718
+ onClick: () => Y("agents"),
701
719
  children: "Manage"
702
720
  })]
703
721
  }), /* @__PURE__ */ x("div", { children: $ ? /* @__PURE__ */ x("div", {
704
722
  className: "space-y-3",
705
- children: /* @__PURE__ */ S(pe, {
706
- to: we(`agents/${$.id}`),
723
+ children: /* @__PURE__ */ S(ge, {
724
+ to: De(`agents/${$.id}`),
707
725
  className: "flex items-center justify-between p-3 rounded-lg border border-border-subtle hover:bg-accent transition-colors",
708
726
  children: [/* @__PURE__ */ S("div", {
709
727
  className: "flex items-center gap-3",
@@ -717,27 +735,27 @@ var L = ({ isNew: v, isEditing: I }) => {
717
735
  className: "text-xs text-text-secondary",
718
736
  children: "Default Agent"
719
737
  })] })]
720
- }), /* @__PURE__ */ x(p, { status: $.status })]
738
+ }), /* @__PURE__ */ x(m, { status: $.status })]
721
739
  })
722
740
  }) : /* @__PURE__ */ S("div", {
723
741
  className: "text-center py-8 text-text-secondary",
724
742
  children: [
725
743
  /* @__PURE__ */ x(w, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
726
744
  /* @__PURE__ */ x("p", { children: "No default agent assigned" }),
727
- /* @__PURE__ */ x(d, {
745
+ /* @__PURE__ */ x(s, {
728
746
  size: "sm",
729
747
  className: "mt-3",
730
- onClick: () => J("agents"),
748
+ onClick: () => Y("agents"),
731
749
  children: "Assign Agent"
732
750
  })
733
751
  ]
734
752
  }) })]
735
753
  }),
736
- (H.tagIds || []).length > 0 && /* @__PURE__ */ S(o, {
754
+ (U.tagIds || []).length > 0 && /* @__PURE__ */ S(c, {
737
755
  className: "lg:col-span-3",
738
- children: [/* @__PURE__ */ x(l, { children: /* @__PURE__ */ x(u, { children: "Tags" }) }), /* @__PURE__ */ x(s, { children: /* @__PURE__ */ x("div", {
756
+ children: [/* @__PURE__ */ x(d, { children: /* @__PURE__ */ x(f, { children: "Tags" }) }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ x("div", {
739
757
  className: "flex flex-wrap gap-2",
740
- children: (H.tagIds || []).map((e) => /* @__PURE__ */ x(f, {
758
+ children: (U.tagIds || []).map((e) => /* @__PURE__ */ x(p, {
741
759
  variant: "outline",
742
760
  children: e
743
761
  }, e))
@@ -746,44 +764,44 @@ var L = ({ isNew: v, isEditing: I }) => {
746
764
  ]
747
765
  })]
748
766
  }),
749
- q === "workflow" && R && /* @__PURE__ */ x(ce, {
767
+ J === "workflow" && R && /* @__PURE__ */ x(ue, {
750
768
  fallback: /* @__PURE__ */ x("div", { className: "h-64 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
751
- children: /* @__PURE__ */ x(N, {
769
+ children: /* @__PURE__ */ x(Se, {
752
770
  botId: R,
753
- botName: H.name,
754
- workflowId: H.workflowId,
771
+ botName: U.name,
772
+ workflowId: U.workflowId,
755
773
  onWorkflowChanged: async () => {
756
- await U();
774
+ await W();
757
775
  }
758
776
  })
759
777
  }),
760
- q === "routing" && /* @__PURE__ */ S("div", {
778
+ J === "routing" && /* @__PURE__ */ S("div", {
761
779
  className: "space-y-6",
762
- children: [/* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(u, { children: "Routing Configuration" }), /* @__PURE__ */ x(c, { children: "How requests are routed to agents" })] }), /* @__PURE__ */ x(s, {
780
+ children: [/* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, { children: "Routing Configuration" }), /* @__PURE__ */ x(u, { children: "How requests are routed to agents" })] }), /* @__PURE__ */ x(l, {
763
781
  className: "space-y-4",
764
782
  children: /* @__PURE__ */ S("div", {
765
783
  className: "grid grid-cols-2 gap-4",
766
784
  children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
767
785
  className: "text-sm text-text-secondary",
768
786
  children: "Strategy"
769
- }), /* @__PURE__ */ x(f, {
787
+ }), /* @__PURE__ */ x(p, {
770
788
  variant: "outline",
771
789
  className: "mt-1",
772
- children: H.routingStrategy
773
- })] }), H.defaultAgentId && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
790
+ children: U.routingStrategy
791
+ })] }), U.defaultAgentId && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
774
792
  className: "text-sm text-text-secondary",
775
793
  children: "Default Agent"
776
794
  }), /* @__PURE__ */ x("p", {
777
795
  className: "font-mono text-sm mt-1",
778
- children: H.defaultAgentId
796
+ children: U.defaultAgentId
779
797
  })] })]
780
798
  })
781
- })] }), /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(u, { children: "Routing Rules" }), /* @__PURE__ */ x(c, { children: "No routing rules configured" })] }), /* @__PURE__ */ x(s, { children: /* @__PURE__ */ x("p", {
799
+ })] }), /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, { children: "Routing Rules" }), /* @__PURE__ */ x(u, { children: "No routing rules configured" })] }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ x("p", {
782
800
  className: "text-text-secondary",
783
801
  children: "No routing rules configured. Routing rules will be available in a future update."
784
802
  }) })] })]
785
803
  }),
786
- q === "agents" && /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(u, { children: "Default Agent" }), /* @__PURE__ */ x(c, { children: "Select the default agent for this bot" })] }), /* @__PURE__ */ S(s, {
804
+ J === "agents" && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, { children: "Default Agent" }), /* @__PURE__ */ x(u, { children: "Select the default agent for this bot" })] }), /* @__PURE__ */ S(l, {
787
805
  className: "space-y-4",
788
806
  children: [
789
807
  $ && /* @__PURE__ */ S("div", {
@@ -796,51 +814,52 @@ var L = ({ isNew: v, isEditing: I }) => {
796
814
  }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
797
815
  className: "font-medium",
798
816
  children: $.name
799
- }), /* @__PURE__ */ x(f, {
817
+ }), /* @__PURE__ */ x(p, {
800
818
  variant: "success",
801
819
  children: "Default"
802
820
  })] })]
803
- }), /* @__PURE__ */ x(p, { status: $.status })]
821
+ }), /* @__PURE__ */ x(m, { status: $.status })]
804
822
  }),
805
823
  /* @__PURE__ */ x("div", {
806
824
  className: "flex items-center gap-3",
807
825
  children: /* @__PURE__ */ S("select", {
808
826
  className: "flex h-10 flex-1 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
809
- value: H.defaultAgentId || "",
827
+ value: U.defaultAgentId || "",
828
+ disabled: !Ee(i.APP_UPDATE),
810
829
  onChange: async (e) => {
811
830
  if (R) try {
812
- await G({
831
+ await K({
813
832
  botId: R,
814
833
  input: { defaultAgentId: e.target.value || null }
815
- }), M.success(e.target.value ? "Default agent assigned" : "Default agent removed");
834
+ }), N.success(e.target.value ? "Default agent assigned" : "Default agent removed");
816
835
  } catch (e) {
817
836
  let t = e instanceof Error ? e.message : "Failed to assign agent";
818
- M.error(t);
837
+ N.error(t);
819
838
  }
820
839
  },
821
840
  children: [/* @__PURE__ */ x("option", {
822
841
  value: "",
823
842
  children: "No default agent"
824
- }), W?.map((e) => /* @__PURE__ */ x("option", {
843
+ }), G?.map((e) => /* @__PURE__ */ x("option", {
825
844
  value: e.id,
826
845
  children: e.name
827
846
  }, e.id))]
828
847
  })
829
848
  }),
830
- !$ && !W?.length && /* @__PURE__ */ S("div", {
849
+ !$ && !G?.length && /* @__PURE__ */ S("div", {
831
850
  className: "text-center py-8 text-text-secondary",
832
851
  children: [/* @__PURE__ */ x(w, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ x("p", { children: "No agents available. Create an agent first." })]
833
852
  })
834
853
  ]
835
854
  })] }),
836
- q === "channels" && R && /* @__PURE__ */ x(se, {
855
+ J === "channels" && R && /* @__PURE__ */ x(le, {
837
856
  botId: R,
838
- botName: H.name
857
+ botName: U.name
839
858
  }),
840
- q === "guardrails" && /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(u, { children: "Policy Bindings" }), /* @__PURE__ */ x(c, { children: "Guardrails and policies attached to this bot" })] }), /* @__PURE__ */ x(s, { children: /* @__PURE__ */ S("div", {
859
+ J === "guardrails" && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, { children: "Policy Bindings" }), /* @__PURE__ */ x(u, { children: "Guardrails and policies attached to this bot" })] }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ S("div", {
841
860
  className: "text-center py-8 text-text-secondary",
842
861
  children: [
843
- /* @__PURE__ */ x(k, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
862
+ /* @__PURE__ */ x(A, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
844
863
  /* @__PURE__ */ x("p", { children: "Not configured" }),
845
864
  /* @__PURE__ */ x("p", {
846
865
  className: "text-sm mt-1",
@@ -848,10 +867,10 @@ var L = ({ isNew: v, isEditing: I }) => {
848
867
  })
849
868
  ]
850
869
  }) })] }),
851
- q === "releases" && /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(u, { children: "Release Tracks" }), /* @__PURE__ */ x(c, { children: "Version deployments across environments" })] }), /* @__PURE__ */ x(s, { children: /* @__PURE__ */ S("div", {
870
+ J === "releases" && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, { children: "Release Tracks" }), /* @__PURE__ */ x(u, { children: "Version deployments across environments" })] }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ S("div", {
852
871
  className: "text-center py-8 text-text-secondary",
853
872
  children: [
854
- /* @__PURE__ */ x(T, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
873
+ /* @__PURE__ */ x(E, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
855
874
  /* @__PURE__ */ x("p", { children: "Not configured" }),
856
875
  /* @__PURE__ */ x("p", {
857
876
  className: "text-sm mt-1",