@burdenoff/microfe-botmanor 2026.1120.7 β†’ 2026.1120.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/botlit/components/DashboardUsagePanel.d.ts +8 -0
  2. package/dist/botlit/components/DashboardUsagePanel.js +277 -0
  3. package/dist/botlit/components/DashboardUsagePanel.js.map +1 -0
  4. package/dist/botlit/components/LiveIndicator.d.ts +9 -0
  5. package/dist/botlit/components/LiveIndicator.js +21 -0
  6. package/dist/botlit/components/LiveIndicator.js.map +1 -0
  7. package/dist/botlit/components/RunStatsCard.d.ts +9 -0
  8. package/dist/botlit/components/RunStatsCard.js +138 -0
  9. package/dist/botlit/components/RunStatsCard.js.map +1 -0
  10. package/dist/botlit/hooks/useExecutionLiveUpdates.d.ts +29 -0
  11. package/dist/botlit/hooks/useExecutionLiveUpdates.js +124 -0
  12. package/dist/botlit/hooks/useExecutionLiveUpdates.js.map +1 -0
  13. package/dist/botlit/hooks/useUsageStats.d.ts +71 -0
  14. package/dist/botlit/hooks/useUsageStats.js +115 -0
  15. package/dist/botlit/hooks/useUsageStats.js.map +1 -0
  16. package/dist/botlit/pages/AgentDetailPage.js +48 -43
  17. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  18. package/dist/botlit/pages/BotDetailPage.js +317 -309
  19. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  20. package/dist/botlit/pages/DashboardPage.js +155 -153
  21. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  22. package/dist/botlit/pages/ExecutionDetailPage.js +142 -132
  23. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  24. package/dist/botlit/pages/ExecutionsPage.js +150 -141
  25. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  26. package/dist/botlit/pages/PromptStudioPage.js +172 -172
  27. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  28. package/dist/botlit/permissions/botmanorPermissions.d.ts +1 -0
  29. package/dist/botlit/permissions/botmanorPermissions.js +1 -0
  30. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -1
  31. package/dist/botlit/utils/formatters.js +6 -2
  32. package/dist/botlit/utils/formatters.js.map +1 -1
  33. package/dist/generated/wspace-operations.d.ts +264 -0
  34. package/dist/generated/wspace-operations.js +95 -6
  35. package/dist/generated/wspace-operations.js.map +1 -1
  36. package/dist/generated/wspace-types.d.ts +98 -0
  37. package/dist/generated/wspace-types.js +8 -4
  38. package/dist/generated/wspace-types.js.map +1 -1
  39. package/package.json +1 -1
@@ -28,15 +28,16 @@ import { formatRelativeTime as p } from "../utils/formatters.js";
28
28
  import { cn as Ce } from "../utils/cn.js";
29
29
  import { agentDeleteMessage as we } from "../utils/agentDelete.js";
30
30
  import { confirmAction as m } from "../utils/confirmAction.js";
31
+ import { RunStatsCard as Te } from "../components/RunStatsCard.js";
31
32
  import "../permissions/index.js";
32
- import { useState as Te } from "react";
33
- import { GlassCard as Ee, NextSteps as De, PagePurpose as Oe } from "@burdenoff/fe-libs/ui";
33
+ import { useState as Ee } from "react";
34
+ import { GlassCard as De, NextSteps as Oe, PagePurpose as ke } from "@burdenoff/fe-libs/ui";
34
35
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
35
- import { useParams as ke, useSearchParams as Ae } from "react-router";
36
- import { ArrowLeft as je, BarChart3 as Me, BookOpen as v, Brain as y, Edit as Ne, FileText as b, Headset as Pe, History as Fe, MessageSquare as Ie, Play as x, Settings as S, Share2 as C, Shield as Le, ShieldCheck as Re, Trash2 as ze, Wrench as w } from "lucide-react";
36
+ import { useParams as Ae, useSearchParams as je } from "react-router";
37
+ import { ArrowLeft as Me, BarChart3 as Ne, BookOpen as v, Brain as y, Edit as Pe, FileText as b, Headset as Fe, History as Ie, MessageSquare as Le, Play as x, Settings as S, Share2 as C, Shield as Re, ShieldCheck as ze, Trash2 as Be, Wrench as w } from "lucide-react";
37
38
  import { toast as T } from "sonner";
38
39
  // src/botlit/pages/AgentDetailPage.tsx
39
- var Be = "πŸ€–", Ve = [
40
+ var Ve = "πŸ€–", He = [
40
41
  "overview",
41
42
  "prompt",
42
43
  "llm",
@@ -68,7 +69,7 @@ var Be = "πŸ€–", Ve = [
68
69
  to: "ARCHIVED",
69
70
  variant: "outline",
70
71
  confirm: !0
71
- }, He = {
72
+ }, Ue = {
72
73
  DRAFT: [E, k],
73
74
  ACTIVE: [O, k],
74
75
  PAUSED: [D, k],
@@ -80,8 +81,8 @@ var Be = "πŸ€–", Ve = [
80
81
  confirm: !1
81
82
  }]
82
83
  }, A = () => {
83
- let E = e(), { agentId: D, botId: O } = ke(), { navigateTo: k } = Se(), A = ne(), { data: j, loading: Ue, error: M, refetch: N } = ue(D), [P, We] = me(), [Ge, Ke] = fe(), qe = pe(), [Je] = Ae(), [F, I] = Te(() => Ve.find((e) => e === Je.get("tab")) ?? "overview"), L = ge(), R = he(), Ye = L.data, z = R.data, Xe = ae(), Ze = _e(), Qe = de(), B = O ? `bots/${O}/agents` : "agents";
84
- if (Ue) return /* @__PURE__ */ g(t, {
84
+ let E = e(), { agentId: D, botId: O } = Ae(), { navigateTo: k } = Se(), A = ne(), { data: j, loading: We, error: M, refetch: N } = ue(D), [P, Ge] = me(), [Ke, qe] = fe(), Je = pe(), [Ye] = je(), [F, I] = Ee(() => He.find((e) => e === Ye.get("tab")) ?? "overview"), L = ge(), R = he(), Xe = L.data, z = R.data, Ze = ae(), Qe = _e(), $e = de(), B = O ? `bots/${O}/agents` : "agents";
85
+ if (We) return /* @__PURE__ */ g(t, {
85
86
  title: E("botlit.common.loading", "Loading..."),
86
87
  children: /* @__PURE__ */ g("div", {
87
88
  role: "status",
@@ -110,7 +111,7 @@ var Be = "πŸ€–", Ve = [
110
111
  })
111
112
  })
112
113
  });
113
- let V = j.systemPrompt || "", H = j.llmModelId || "", U = (Ze.data ?? []).find((e) => e.id === H), W = U ? `${U.name} (${U.modelId})` : H || "Not configured", $e = j.temperature, et = j.maxTokens, G = j.mcpConnectionIds ?? [], K = j.knowledgeBaseIds ?? [], q = j.workflowIds ?? [], J = j.capabilities ?? [], Y = j.maxConcurrentExecutions || 10, X = !!Xe.data?.requireActivationApproval && (j.status === "DRAFT" || j.status === "ARCHIVED") && !j.currentVersionId, Z = new Map(Ye.map((e) => [e.id, e.name])), Q = new Map(z.map((e) => [e.id, e.name])), tt = J.includes("RAG") && !R.loading && !R.error ? K.flatMap((e) => {
114
+ let V = j.systemPrompt || "", H = j.llmModelId || "", U = (Qe.data ?? []).find((e) => e.id === H), W = U ? `${U.name} (${U.modelId})` : H || "Not configured", et = j.temperature, tt = j.maxTokens, G = j.mcpConnectionIds ?? [], K = j.knowledgeBaseIds ?? [], q = j.workflowIds ?? [], J = j.capabilities ?? [], Y = j.maxConcurrentExecutions || 10, X = !!Ze.data?.requireActivationApproval && (j.status === "DRAFT" || j.status === "ARCHIVED") && !j.currentVersionId, Z = new Map(Xe.map((e) => [e.id, e.name])), Q = new Map(z.map((e) => [e.id, e.name])), nt = J.includes("RAG") && !R.loading && !R.error ? K.flatMap((e) => {
114
115
  let t = z.find((t) => t.id === e);
115
116
  return t ? t.indexStatus === "READY" ? [] : [{
116
117
  id: e,
@@ -121,7 +122,7 @@ var Be = "πŸ€–", Ve = [
121
122
  name: null,
122
123
  status: "MISSING"
123
124
  }];
124
- }) : [], nt = (e, t, n, r) => t.get(e) ?? (n.loading ? E("botlit.agentDetail.resourceLoading", "Loading…") : n.error ? E("botlit.agentDetail.resourceUnnamed", "Name unavailable") : E(r, "No longer available")), rt = (() => {
125
+ }) : [], rt = (e, t, n, r) => t.get(e) ?? (n.loading ? E("botlit.agentDetail.resourceLoading", "Loading…") : n.error ? E("botlit.agentDetail.resourceUnnamed", "Name unavailable") : E(r, "No longer available")), it = (() => {
125
126
  switch (j.status) {
126
127
  case "ACTIVE": return null;
127
128
  case "DRAFT": return X ? E("botlit.agentDetail.reason.pendingApproval", "This agent is a draft. This workspace needs a reviewer to approve it before it goes live: use Request activation.") : j.currentVersionId ? E("botlit.agentDetail.reason.deactivated", "This agent was taken out of service and is a draft again. Activate it to put it back live.") : E("botlit.agentDetail.reason.neverPublished", "This agent is a draft that was never published, so it does not answer bots yet. Activate it to publish it.");
@@ -162,7 +163,7 @@ var Be = "πŸ€–", Ve = [
162
163
  error: E("botlit.agentDetail.restore.error", "Failed to restore agent")
163
164
  };
164
165
  }
165
- }, it = async (e) => {
166
+ }, at = async (e) => {
166
167
  if (!D) return;
167
168
  let t = $(e.key, j.name);
168
169
  if (!(e.confirm && t.confirmTitle && t.confirmMessage && !await m({
@@ -178,16 +179,16 @@ var Be = "πŸ€–", Ve = [
178
179
  } catch (e) {
179
180
  T.error(e instanceof Error ? e.message : t.error);
180
181
  }
181
- }, at = async () => {
182
+ }, ot = async () => {
182
183
  if (!D) return;
183
- let e = await qe(D).catch(() => null), t = we(E, j.name, e);
184
+ let e = await Je(D).catch(() => null), t = we(E, j.name, e);
184
185
  if (await m({
185
186
  title: E("botlit.agentsList.delete.title", "Delete agent?"),
186
187
  message: t,
187
188
  confirmLabel: E("botlit.agentsList.delete.okButton", "Delete"),
188
189
  cancelLabel: E("botlit.agentsList.delete.cancelButton", "Cancel")
189
190
  })) try {
190
- if (!await Ge(D)) {
191
+ if (!await Ke(D)) {
191
192
  T.error(E("botlit.agentDetail.delete.error", "Failed to delete agent"));
192
193
  return;
193
194
  }
@@ -195,7 +196,7 @@ var Be = "πŸ€–", Ve = [
195
196
  } catch (e) {
196
197
  T.error(e instanceof Error ? e.message : E("botlit.agentDetail.delete.error", "Failed to delete agent"));
197
198
  }
198
- }, ot = [
199
+ }, st = [
199
200
  {
200
201
  id: "assistant",
201
202
  label: "Assistant setup",
@@ -204,7 +205,7 @@ var Be = "πŸ€–", Ve = [
204
205
  {
205
206
  id: "overview",
206
207
  label: E("botlit.agentDetail.tabs.overview", "Overview"),
207
- icon: /* @__PURE__ */ g(Me, { size: 16 })
208
+ icon: /* @__PURE__ */ g(Ne, { size: 16 })
208
209
  },
209
210
  {
210
211
  id: "prompt",
@@ -229,17 +230,17 @@ var Be = "πŸ€–", Ve = [
229
230
  {
230
231
  id: "guardrails",
231
232
  label: E("botlit.agentDetail.tabs.guardrails", "Guardrails"),
232
- icon: /* @__PURE__ */ g(Le, { size: 16 })
233
+ icon: /* @__PURE__ */ g(Re, { size: 16 })
233
234
  },
234
235
  {
235
236
  id: "handoff",
236
237
  label: E("botlit.agentDetail.tabs.handoff", "Handoff"),
237
- icon: /* @__PURE__ */ g(Pe, { size: 16 })
238
+ icon: /* @__PURE__ */ g(Fe, { size: 16 })
238
239
  },
239
240
  {
240
241
  id: "aiOperations",
241
242
  label: E("botlit.agentDetail.tabs.aiOperations", "AI Operations"),
242
- icon: /* @__PURE__ */ g(Re, { size: 16 })
243
+ icon: /* @__PURE__ */ g(ze, { size: 16 })
243
244
  },
244
245
  {
245
246
  id: "a2a",
@@ -249,7 +250,7 @@ var Be = "πŸ€–", Ve = [
249
250
  {
250
251
  id: "versions",
251
252
  label: E("botlit.agentDetail.tabs.versions", "Versions"),
252
- icon: /* @__PURE__ */ g(Fe, { size: 16 })
253
+ icon: /* @__PURE__ */ g(Ie, { size: 16 })
253
254
  }
254
255
  ];
255
256
  return /* @__PURE__ */ _(t, {
@@ -259,14 +260,14 @@ var Be = "πŸ€–", Ve = [
259
260
  size: "icon",
260
261
  "aria-label": E("botlit.agentDetail.back", "Back to agents"),
261
262
  onClick: () => k(B),
262
- children: /* @__PURE__ */ g(je, {
263
+ children: /* @__PURE__ */ g(Me, {
263
264
  size: 20,
264
265
  "aria-hidden": "true"
265
266
  })
266
267
  }), /* @__PURE__ */ g("span", {
267
268
  className: "text-3xl",
268
269
  "aria-hidden": "true",
269
- children: j.avatar || Be
270
+ children: j.avatar || Ve
270
271
  })] }),
271
272
  meta: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, { status: j.status }), /* @__PURE__ */ g(l, {
272
273
  variant: "outline",
@@ -287,10 +288,10 @@ var Be = "πŸ€–", Ve = [
287
288
  }));
288
289
  },
289
290
  children: E("botlit.agentApproval.requestAction", "Request activation")
290
- }) : (He[j.status] ?? []).map((e) => /* @__PURE__ */ g(c, {
291
+ }) : (Ue[j.status] ?? []).map((e) => /* @__PURE__ */ g(c, {
291
292
  variant: e.variant,
292
- isLoading: We.loading,
293
- onClick: () => void it(e),
293
+ isLoading: Ge.loading,
294
+ onClick: () => void at(e),
294
295
  children: $(e.key, j.name).label
295
296
  }, e.key))
296
297
  }),
@@ -298,7 +299,7 @@ var Be = "πŸ€–", Ve = [
298
299
  permission: d.AGENT_UPDATE,
299
300
  children: /* @__PURE__ */ g(c, {
300
301
  variant: "outline",
301
- leftIcon: /* @__PURE__ */ g(Ne, { size: 16 }),
302
+ leftIcon: /* @__PURE__ */ g(Pe, { size: 16 }),
302
303
  onClick: () => k(O ? `bots/${O}/agents/${D}/edit` : `agents/${D}/edit`),
303
304
  children: E("botlit.agentDetail.actions.editAgent", "Edit Agent")
304
305
  })
@@ -315,22 +316,22 @@ var Be = "πŸ€–", Ve = [
315
316
  permission: d.AGENT_DELETE,
316
317
  children: /* @__PURE__ */ g(c, {
317
318
  variant: "destructive",
318
- leftIcon: /* @__PURE__ */ g(ze, { size: 16 }),
319
- isLoading: Ke.loading,
320
- onClick: () => void at(),
319
+ leftIcon: /* @__PURE__ */ g(Be, { size: 16 }),
320
+ isLoading: qe.loading,
321
+ onClick: () => void ot(),
321
322
  children: E("botlit.common.delete", "Delete")
322
323
  })
323
324
  })
324
325
  ]
325
326
  }),
326
327
  children: [
327
- rt && /* @__PURE__ */ g("div", {
328
+ it && /* @__PURE__ */ g("div", {
328
329
  role: "status",
329
330
  "data-testid": "agent-status-reason",
330
331
  className: "mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm text-text-primary",
331
- children: rt
332
+ children: it
332
333
  }),
333
- tt.length > 0 && /* @__PURE__ */ _("div", {
334
+ nt.length > 0 && /* @__PURE__ */ _("div", {
334
335
  role: "status",
335
336
  "data-testid": "agent-knowledge-warning",
336
337
  className: "mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm text-text-primary",
@@ -339,7 +340,7 @@ var Be = "πŸ€–", Ve = [
339
340
  children: E("botlit.agentDetail.knowledgeWarning.title", "This agent cannot answer right now: a knowledge base it uses cannot be searched.")
340
341
  }), /* @__PURE__ */ g("ul", {
341
342
  className: "mt-1 list-disc pl-5",
342
- children: tt.map((e) => /* @__PURE__ */ g("li", { children: e.name === null ? E("botlit.agentDetail.knowledgeWarning.missing", "A knowledge base that no longer exists ({{id}}). Remove it from the agent.", { id: e.id }) : E("botlit.agentDetail.knowledgeWarning.notReady", "\"{{name}}\" is {{status}}.", {
343
+ children: nt.map((e) => /* @__PURE__ */ g("li", { children: e.name === null ? E("botlit.agentDetail.knowledgeWarning.missing", "A knowledge base that no longer exists ({{id}}). Remove it from the agent.", { id: e.id }) : E("botlit.agentDetail.knowledgeWarning.notReady", "\"{{name}}\" is {{status}}.", {
343
344
  name: e.name,
344
345
  status: E(`botlit.status.${e.status.toLowerCase()}`, e.status.toLowerCase())
345
346
  }) }, e.id))
@@ -366,13 +367,13 @@ var Be = "πŸ€–", Ve = [
366
367
  })
367
368
  ]
368
369
  }),
369
- /* @__PURE__ */ g(Oe, {
370
+ /* @__PURE__ */ g(ke, {
370
371
  icon: /* @__PURE__ */ g(y, { size: 18 }),
371
372
  children: E("botlit.agentDetail.purpose", "This is the full configuration for a single agent β€” its prompt, model settings, the tools and knowledge it can use, its guardrails and how it talks to other agents. Use the tabs to inspect or change any part, and test the agent in chat to confirm it behaves the way you expect before going live.")
372
373
  }),
373
374
  /* @__PURE__ */ g("div", {
374
375
  className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
375
- children: ot.map((e) => /* @__PURE__ */ _("button", {
376
+ children: st.map((e) => /* @__PURE__ */ _("button", {
376
377
  onClick: () => I(e.id),
377
378
  className: Ce("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", F === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
378
379
  children: [e.icon, e.label]
@@ -381,7 +382,7 @@ var Be = "πŸ€–", Ve = [
381
382
  F === "overview" && /* @__PURE__ */ _("div", {
382
383
  className: "space-y-6",
383
384
  children: [
384
- /* @__PURE__ */ g(De, {
385
+ /* @__PURE__ */ g(Oe, {
385
386
  storageKey: `botlit-agent-${D}`,
386
387
  steps: [
387
388
  {
@@ -420,6 +421,10 @@ var Be = "πŸ€–", Ve = [
420
421
  agentStatus: j.status,
421
422
  onChanged: () => void N()
422
423
  }),
424
+ /* @__PURE__ */ g(Te, {
425
+ kind: "agent",
426
+ id: D
427
+ }),
423
428
  /* @__PURE__ */ _("div", {
424
429
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
425
430
  children: [
@@ -498,7 +503,7 @@ var Be = "πŸ€–", Ve = [
498
503
  ]
499
504
  })]
500
505
  }),
501
- /* @__PURE__ */ _(Ee, {
506
+ /* @__PURE__ */ _(De, {
502
507
  treatment: "glass",
503
508
  glow: !0,
504
509
  className: "lg:col-span-2 p-6",
@@ -577,19 +582,19 @@ var Be = "πŸ€–", Ve = [
577
582
  children: "Temperature"
578
583
  }), /* @__PURE__ */ g("p", {
579
584
  className: "font-medium",
580
- children: $e ?? "Default"
585
+ children: et ?? "Default"
581
586
  })] }),
582
587
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
583
588
  className: "text-sm text-text-secondary",
584
589
  children: "Max Tokens"
585
590
  }), /* @__PURE__ */ g("p", {
586
591
  className: "font-medium",
587
- children: et ?? "Default"
592
+ children: tt ?? "Default"
588
593
  })] })
589
594
  ]
590
595
  })] }), /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
591
596
  className: "flex items-center gap-2",
592
- children: [/* @__PURE__ */ g(Ie, { size: 18 }), E("botlit.agentDetail.executionLimits.title", "Execution Limits")]
597
+ children: [/* @__PURE__ */ g(Le, { size: 18 }), E("botlit.agentDetail.executionLimits.title", "Execution Limits")]
593
598
  }) }), /* @__PURE__ */ _(i, {
594
599
  className: "space-y-4",
595
600
  children: [
@@ -634,7 +639,7 @@ var Be = "πŸ€–", Ve = [
634
639
  })
635
640
  }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
636
641
  className: "font-medium",
637
- children: nt(e, Z, L, "botlit.agentDetail.tools.unavailable")
642
+ children: rt(e, Z, L, "botlit.agentDetail.tools.unavailable")
638
643
  }), !Z.has(e) && /* @__PURE__ */ g("p", {
639
644
  className: "text-sm text-text-secondary font-mono",
640
645
  children: e
@@ -668,7 +673,7 @@ var Be = "πŸ€–", Ve = [
668
673
  className: "flex items-center justify-between",
669
674
  children: [/* @__PURE__ */ g("p", {
670
675
  className: "font-medium",
671
- children: nt(e, Q, R, "botlit.agentDetail.knowledge.unavailable")
676
+ children: rt(e, Q, R, "botlit.agentDetail.knowledge.unavailable")
672
677
  }), /* @__PURE__ */ _(l, {
673
678
  variant: "outline",
674
679
  children: ["#", t + 1]
@@ -698,7 +703,7 @@ var Be = "πŸ€–", Ve = [
698
703
  agentId: D,
699
704
  agentName: j.name,
700
705
  delegationEnabled: J.includes("A2A"),
701
- agents: Qe.data ?? []
706
+ agents: $e.data ?? []
702
707
  }),
703
708
  F === "versions" && D && /* @__PURE__ */ g(re, {
704
709
  agentId: D,