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