@burdenoff/microfe-botmanor 2026.1120.10 → 2026.1120.12

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 (38) hide show
  1. package/dist/botlit/components/ExecutionFeedback.d.ts +5 -0
  2. package/dist/botlit/components/ExecutionFeedback.js +55 -0
  3. package/dist/botlit/components/ExecutionFeedback.js.map +1 -0
  4. package/dist/botlit/components/KnowledgeReviewSchedule.d.ts +7 -0
  5. package/dist/botlit/components/KnowledgeReviewSchedule.js +92 -0
  6. package/dist/botlit/components/KnowledgeReviewSchedule.js.map +1 -0
  7. package/dist/botlit/components/SuggestionsPanel.d.ts +12 -0
  8. package/dist/botlit/components/SuggestionsPanel.js +219 -0
  9. package/dist/botlit/components/SuggestionsPanel.js.map +1 -0
  10. package/dist/botlit/hooks/index.d.ts +2 -2
  11. package/dist/botlit/hooks/index.js +2 -2
  12. package/dist/botlit/hooks/useAgentTuning.d.ts +87 -0
  13. package/dist/botlit/hooks/useAgentTuning.js +170 -0
  14. package/dist/botlit/hooks/useAgentTuning.js.map +1 -0
  15. package/dist/botlit/hooks/useAiOperations.js +1 -1
  16. package/dist/botlit/hooks/useAiOperations.js.map +1 -1
  17. package/dist/botlit/hooks/useExecutions.d.ts +30 -18
  18. package/dist/botlit/hooks/useExecutions.js +42 -49
  19. package/dist/botlit/hooks/useExecutions.js.map +1 -1
  20. package/dist/botlit/pages/AgentDetailPage.js +75 -70
  21. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  22. package/dist/botlit/pages/ExecutionDetailPage.js +259 -190
  23. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  24. package/dist/botlit/pages/ExecutionsPage.js +333 -210
  25. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  26. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +356 -354
  27. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  28. package/dist/botlit/utils/executionStatus.d.ts +16 -0
  29. package/dist/botlit/utils/executionStatus.js +32 -0
  30. package/dist/botlit/utils/executionStatus.js.map +1 -0
  31. package/dist/botlit/utils/formatters.js +4 -2
  32. package/dist/botlit/utils/formatters.js.map +1 -1
  33. package/dist/generated/wspace-operations.d.ts +67 -0
  34. package/dist/generated/wspace-operations.js +101 -73
  35. package/dist/generated/wspace-operations.js.map +1 -1
  36. package/dist/generated/wspace-types.d.ts +55 -0
  37. package/dist/generated/wspace-types.js.map +1 -1
  38. package/package.json +1 -1
@@ -1,324 +1,393 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { isNative as t, nativeCopyText as n, nativeToast as r } from "../../utils/nativeBridge.js";
3
- import { BOTMANOR_PERMISSIONS as i } from "../permissions/botmanorPermissions.js";
4
- import { BotmanorPermissionGate as a } from "../permissions/useBotmanorPermissions.js";
5
- import { PageLayout as o } from "../components/PageLayout.js";
6
- import { EmptyState as s } from "../components/EmptyState.js";
7
- import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
8
- import { Button as p } from "../components/Button.js";
9
- import { Badge as m } from "../components/Badge.js";
10
- import { ErrorState as h } from "../components/ErrorState.js";
11
- import { ExecutionModelFallback as g } from "../components/ExecutionModelFallback.js";
12
- import { useExecution as _ } from "../hooks/useExecutions.js";
13
- import { useRerunExecution as v } from "../hooks/useRerunExecution.js";
14
- import { useLiveExecution as y } from "../hooks/useExecutionLiveUpdates.js";
15
- import { LiveIndicator as b } from "../components/LiveIndicator.js";
16
- import { formatCurrency as x, formatDuration as S, formatNumber as C, formatRelativeTime as w } from "../utils/formatters.js";
17
- import { ExecutionStatus as T } from "../../generated/wspace-types.js";
3
+ import { useTr as i } from "../../shared/hooks/useTr.js";
4
+ import { BOTMANOR_PERMISSIONS as a } from "../permissions/botmanorPermissions.js";
5
+ import { BotmanorPermissionGate as o } from "../permissions/useBotmanorPermissions.js";
6
+ import { PageLayout as s } from "../components/PageLayout.js";
7
+ import { EmptyState as c } from "../components/EmptyState.js";
8
+ import { Card as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p } from "../components/Card.js";
9
+ import { Button as m } from "../components/Button.js";
10
+ import { Badge as h } from "../components/Badge.js";
11
+ import { ErrorState as g } from "../components/ErrorState.js";
12
+ import { ExecutionModelFallback as ee } from "../components/ExecutionModelFallback.js";
13
+ import { ExecutionFeedback as te } from "../components/ExecutionFeedback.js";
14
+ import { useExecution as ne } from "../hooks/useExecutions.js";
15
+ import { useRerunExecution as _ } from "../hooks/useRerunExecution.js";
16
+ import { useLiveExecution as v } from "../hooks/useExecutionLiveUpdates.js";
17
+ import { LiveIndicator as re } from "../components/LiveIndicator.js";
18
+ import { formatCurrency as ie, formatDuration as y, formatNumber as b, formatRelativeTime as x } from "../utils/formatters.js";
19
+ import { ExecutionStatus as S } from "../../generated/wspace-types.js";
18
20
  import "../permissions/index.js";
19
- import { useEffect as E } from "react";
20
- import { PagePurpose as D } from "@burdenoff/fe-libs/ui";
21
- import { jsx as O, jsxs as k } from "react/jsx-runtime";
22
- import { useParams as A } from "react-router";
23
- import { AlertTriangle as j, ArrowLeft as M, CheckCircle as N, Clock as P, Copy as F, DollarSign as I, Hourglass as L, Play as R, RefreshCw as z, XCircle as B, Zap as V } from "lucide-react";
21
+ import { executionStatusLabel as ae, readablePayload as C } from "../utils/executionStatus.js";
22
+ import { useEffect as w } from "react";
23
+ import { PagePurpose as T } from "@burdenoff/fe-libs/ui";
24
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
25
+ import { useParams as k } from "react-router";
26
+ import { AlertTriangle as A, ArrowLeft as oe, Ban as j, CheckCircle as M, Clock as N, Copy as P, DollarSign as F, Hourglass as I, Play as L, RefreshCw as R, Timer as z, XCircle as B, Zap as V } from "lucide-react";
24
27
  import { toast as H } from "sonner";
25
28
  // src/botlit/pages/ExecutionDetailPage.tsx
26
29
  var U = 3e3, W = /* @__PURE__ */ new Set(["AGENT", "APP"]), G = (e) => {
27
30
  switch (e) {
28
- case T.Completed: return /* @__PURE__ */ O(N, {
31
+ case S.Completed: return /* @__PURE__ */ D(M, {
29
32
  className: "text-status-success-text",
30
33
  size: 20
31
34
  });
32
- case T.Failed:
33
- case T.Timeout: return /* @__PURE__ */ O(B, {
35
+ case S.Failed: return /* @__PURE__ */ D(B, {
34
36
  className: "text-status-error-text",
35
37
  size: 20
36
38
  });
37
- case T.Cancelled: return /* @__PURE__ */ O(B, {
39
+ case S.Timeout: return /* @__PURE__ */ D(z, {
40
+ className: "text-status-error-text",
41
+ size: 20
42
+ });
43
+ case S.Cancelled: return /* @__PURE__ */ D(j, {
38
44
  className: "text-text-secondary",
39
45
  size: 20
40
46
  });
41
- case T.Running: return /* @__PURE__ */ O(z, {
47
+ case S.Running: return /* @__PURE__ */ D(R, {
42
48
  className: "text-status-info-text motion-safe:animate-spin",
43
49
  size: 20
44
50
  });
45
- case T.Pending: return /* @__PURE__ */ O(L, {
51
+ case S.Pending: return /* @__PURE__ */ D(I, {
46
52
  className: "text-status-warning-text",
47
53
  size: 20
48
54
  });
49
- default: return /* @__PURE__ */ O(j, {
55
+ default: return /* @__PURE__ */ D(A, {
50
56
  className: "text-text-secondary",
51
57
  size: 20
52
58
  });
53
59
  }
54
60
  }, K = (e) => {
55
61
  switch (e) {
56
- case T.Completed: return "success";
57
- case T.Failed:
58
- case T.Timeout: return "destructive";
59
- case T.Pending: return "warning";
60
- case T.Running: return "default";
62
+ case S.Completed: return "success";
63
+ case S.Failed:
64
+ case S.Timeout: return "destructive";
65
+ case S.Pending: return "warning";
66
+ case S.Running: return "default";
61
67
  default: return "secondary";
62
68
  }
63
- }, q = () => {
64
- let { executionId: N } = A(), { navigateTo: L } = e(), { data: B, loading: q, error: J, refetch: Y } = _(N), X = v(), Z = B?.status, Q = y(N, Z, () => void Y());
65
- if (E(() => {
66
- if (Q === "live" || Z !== T.Pending && Z !== T.Running) return;
67
- let e = setInterval(() => void Y(), U);
69
+ };
70
+ function q(e, t) {
71
+ let n = e?.[t];
72
+ return typeof n == "string" && n ? n : void 0;
73
+ }
74
+ function J(e, t) {
75
+ let n = e?.[t];
76
+ return typeof n == "number" && Number.isFinite(n) ? n : void 0;
77
+ }
78
+ var Y = ({ label: e, children: t, mono: n }) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
79
+ className: "text-sm text-text-secondary",
80
+ children: e
81
+ }), /* @__PURE__ */ D("dd", {
82
+ className: n ? "font-mono text-sm break-all" : "font-medium break-words",
83
+ children: t
84
+ })] }), X = ({ name: e, id: t }) => t ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
85
+ className: "block",
86
+ children: e ?? t
87
+ }), e && /* @__PURE__ */ D("span", {
88
+ className: "block font-mono text-xs text-text-secondary",
89
+ children: t
90
+ })] }) : /* @__PURE__ */ D(E, { children: "—" }), se = ({ execution: e, t }) => {
91
+ let n = e.metadata, r = e.metrics, i = q(n, "model"), a = q(n, "providerType"), o = q(n, "agentVersionId"), s = r?.ragChunks ?? J(n, "ragChunksUsed"), c = J(n, "delegationCount"), m = n?.policyBlockedOutput === !0, h = t("botlit.executions.detail.notRecorded", "Not recorded");
92
+ return /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D(p, { children: t("botlit.executions.detail.howAnswered", "How it was answered") }), /* @__PURE__ */ D(d, { children: t("botlit.executions.detail.howAnsweredHint", "What the runtime recorded for this run. Individual model and tool calls are not stored step by step.") })] }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ O("dl", {
93
+ className: "grid grid-cols-1 gap-6 md:grid-cols-3",
94
+ children: [
95
+ /* @__PURE__ */ D(Y, {
96
+ label: t("botlit.executions.detail.model", "Model"),
97
+ children: i ? a ? `${i} (${a})` : i : h
98
+ }),
99
+ /* @__PURE__ */ D(Y, {
100
+ label: t("botlit.executions.detail.agentVersion", "Agent version"),
101
+ mono: !0,
102
+ children: o ?? h
103
+ }),
104
+ /* @__PURE__ */ D(Y, {
105
+ label: t("botlit.executions.detail.tokenSplit", "Input / output tokens"),
106
+ children: r ? `${b(r.inputTokens)} / ${b(r.outputTokens)}` : h
107
+ }),
108
+ /* @__PURE__ */ D(Y, {
109
+ label: t("botlit.executions.detail.toolCalls", "Tool calls"),
110
+ children: r?.toolCalls ?? h
111
+ }),
112
+ /* @__PURE__ */ D(Y, {
113
+ label: t("botlit.executions.detail.knowledgeChunks", "Knowledge passages used"),
114
+ children: s ?? 0
115
+ }),
116
+ /* @__PURE__ */ D(Y, {
117
+ label: t("botlit.executions.detail.delegations", "Delegations to other agents"),
118
+ children: c ?? 0
119
+ }),
120
+ m && /* @__PURE__ */ D(Y, {
121
+ label: t("botlit.executions.detail.policy", "Policy"),
122
+ children: t("botlit.executions.detail.outputBlocked", "The answer was replaced because a content policy blocked it.")
123
+ })
124
+ ]
125
+ }) })] });
126
+ }, Z = () => {
127
+ let E = i(), { executionId: j } = k(), { navigateTo: M } = e(), { data: I, loading: z, error: B, refetch: q } = ne(j), J = _(), Z = I?.status, Q = v(j, Z, () => void q());
128
+ if (w(() => {
129
+ if (Q === "live" || Z !== S.Pending && Z !== S.Running) return;
130
+ let e = setInterval(() => void q(), U);
68
131
  return () => clearInterval(e);
69
132
  }, [
70
133
  Q,
71
134
  Z,
72
- Y
73
- ]), q && !B) return /* @__PURE__ */ O(o, {
74
- title: "Loading...",
75
- children: /* @__PURE__ */ O("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
135
+ q
136
+ ]), z && !I) return /* @__PURE__ */ D(s, {
137
+ title: E("botlit.executions.detail.loading", "Loading…"),
138
+ children: /* @__PURE__ */ D("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
76
139
  });
77
- if (J) return /* @__PURE__ */ O(o, {
78
- title: "Execution",
79
- children: /* @__PURE__ */ O(h, {
140
+ if (B) return /* @__PURE__ */ D(s, {
141
+ title: E("botlit.executions.detail.title", "Execution"),
142
+ children: /* @__PURE__ */ D(g, {
80
143
  resource: "this execution",
81
- error: J,
82
- onRetry: () => void Y()
144
+ error: B,
145
+ onRetry: () => void q()
83
146
  })
84
147
  });
85
- if (!B) return /* @__PURE__ */ O(o, {
86
- title: "Execution Not Found",
87
- children: /* @__PURE__ */ O(s, {
88
- illustration: "empty-search",
89
- title: "Execution Not Found",
90
- description: "The execution doesn't exist.",
91
- action: /* @__PURE__ */ O(p, {
92
- onClick: () => L("executions"),
93
- children: "Back to Executions"
148
+ if (!I) {
149
+ let e = E("botlit.executions.detail.notFound", "Execution not found");
150
+ return /* @__PURE__ */ D(s, {
151
+ title: e,
152
+ children: /* @__PURE__ */ D(c, {
153
+ illustration: "empty-search",
154
+ title: e,
155
+ description: E("botlit.executions.detail.notFoundHint", "This execution does not exist in this workspace."),
156
+ action: /* @__PURE__ */ D(m, {
157
+ onClick: () => M("executions"),
158
+ children: E("botlit.executions.detail.back", "Back to Executions")
159
+ })
94
160
  })
95
- })
96
- });
97
- let $ = async () => {
161
+ });
162
+ }
163
+ let ce = ae(E, I.status), $ = C(I.output), le = async () => {
98
164
  try {
99
- let e = await X.mutateAsync(B.id);
100
- H.success("Re-run started"), L(`executions/${e.id}`);
165
+ let e = await J.mutateAsync(I.id);
166
+ H.success("Re-run started"), M(`executions/${e.id}`);
101
167
  } catch (e) {
102
168
  H.error(e instanceof Error ? e.message : "Failed to re-run execution");
103
169
  }
104
170
  };
105
- return /* @__PURE__ */ O(o, {
106
- title: /* @__PURE__ */ k("div", {
171
+ return /* @__PURE__ */ D(s, {
172
+ title: /* @__PURE__ */ O("div", {
107
173
  className: "flex items-center gap-3",
108
174
  children: [
109
- /* @__PURE__ */ O(p, {
175
+ /* @__PURE__ */ D(m, {
110
176
  variant: "ghost",
111
177
  size: "icon",
112
- onClick: () => L("executions"),
113
- children: /* @__PURE__ */ O(M, { size: 20 })
178
+ onClick: () => M("executions"),
179
+ "aria-label": E("botlit.executions.detail.back", "Back to Executions"),
180
+ children: /* @__PURE__ */ D(oe, { size: 20 })
114
181
  }),
115
- G(B.status),
116
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
182
+ G(I.status),
183
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
117
184
  className: "flex items-center gap-2",
118
185
  children: [
119
- /* @__PURE__ */ k("span", { children: [
120
- "Execution ",
121
- B.id.slice(0, 8),
122
- "…"
123
- ] }),
124
- /* @__PURE__ */ O(m, {
125
- variant: K(B.status),
126
- children: B.status
186
+ /* @__PURE__ */ D("span", { children: E("botlit.executions.detail.heading", "Execution {{id}}…", { id: I.id.slice(0, 8) }) }),
187
+ /* @__PURE__ */ D(h, {
188
+ variant: K(I.status),
189
+ children: ce
127
190
  }),
128
- /* @__PURE__ */ O(b, { state: Q })
191
+ /* @__PURE__ */ D(re, { state: Q })
129
192
  ]
130
- }), /* @__PURE__ */ k("p", {
193
+ }), /* @__PURE__ */ O("p", {
131
194
  className: "text-sm font-normal text-text-secondary",
132
195
  children: [
133
- B.appId ?? "—",
134
- " / ",
135
- B.agentId ?? "—"
196
+ I.appName ?? I.appId ?? "—",
197
+ " /",
198
+ " ",
199
+ I.agentName ?? I.agentId ?? "—"
136
200
  ]
137
201
  })] })
138
202
  ]
139
203
  }),
140
- actions: /* @__PURE__ */ k("div", {
204
+ actions: /* @__PURE__ */ O("div", {
141
205
  className: "flex gap-2",
142
- children: [/* @__PURE__ */ O(p, {
206
+ children: [/* @__PURE__ */ D(m, {
143
207
  variant: "outline",
144
- leftIcon: /* @__PURE__ */ O(F, { size: 16 }),
208
+ leftIcon: /* @__PURE__ */ D(P, { size: 16 }),
145
209
  onClick: () => {
146
- n(B.id), t() && r("Copied");
210
+ n(I.id), t() && r(E("botlit.executions.detail.copied", "Copied"));
147
211
  },
148
- children: "Copy ID"
149
- }), W.has(B.type) && /* @__PURE__ */ O(a, {
150
- permission: i.EXECUTION_CREATE,
151
- children: /* @__PURE__ */ O(p, {
152
- leftIcon: /* @__PURE__ */ O(R, { size: 16 }),
153
- onClick: () => void $(),
154
- isLoading: X.isPending,
212
+ children: E("botlit.executions.detail.copyId", "Copy ID")
213
+ }), W.has(I.type) && /* @__PURE__ */ D(o, {
214
+ permission: a.EXECUTION_CREATE,
215
+ children: /* @__PURE__ */ D(m, {
216
+ leftIcon: /* @__PURE__ */ D(L, { size: 16 }),
217
+ onClick: () => void le(),
218
+ isLoading: J.isPending,
155
219
  children: "Run again"
156
220
  })
157
221
  })]
158
222
  }),
159
- children: /* @__PURE__ */ k("div", {
223
+ children: /* @__PURE__ */ O("div", {
160
224
  className: "space-y-6",
161
225
  children: [
162
- /* @__PURE__ */ O(D, {
163
- icon: /* @__PURE__ */ O(P, { size: 18 }),
164
- children: "This is the record of one agent run — its status, how long it took, the tokens and cost it consumed, and the input and output that produced the result. Use it to debug a failure, understand an unexpected answer, or audit exactly what the agent did on a given request."
226
+ /* @__PURE__ */ D(T, {
227
+ icon: /* @__PURE__ */ D(N, { size: 18 }),
228
+ children: E("botlit.executions.detail.purpose", "This is the record of one agent run — its status, how long it took, the tokens and cost it consumed, the model and agent version that answered, and its input and output. Use it to debug a failure, understand an unexpected answer, or audit what the agent did on a given request.")
165
229
  }),
166
- /* @__PURE__ */ k("div", {
230
+ /* @__PURE__ */ O("div", {
167
231
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
168
232
  children: [
169
- /* @__PURE__ */ O(c, {
233
+ /* @__PURE__ */ D(l, {
170
234
  treatment: "glass",
171
235
  glow: !0,
172
- children: /* @__PURE__ */ k(l, {
236
+ children: /* @__PURE__ */ O(u, {
173
237
  className: "pt-6 text-center",
174
238
  children: [
175
- /* @__PURE__ */ O(P, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
176
- /* @__PURE__ */ O("p", {
239
+ /* @__PURE__ */ D(N, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
240
+ /* @__PURE__ */ D("p", {
177
241
  className: "text-2xl font-bold tabular-nums",
178
- children: B.duration === null || B.duration === void 0 ? "—" : S(B.duration)
242
+ children: y(I.duration)
179
243
  }),
180
- /* @__PURE__ */ O("p", {
244
+ /* @__PURE__ */ D("p", {
181
245
  className: "text-sm text-text-secondary",
182
- children: "Duration"
246
+ children: E("botlit.executions.table.duration", "Duration")
183
247
  })
184
248
  ]
185
249
  })
186
250
  }),
187
- /* @__PURE__ */ O(c, {
251
+ /* @__PURE__ */ D(l, {
188
252
  treatment: "metric",
189
- children: /* @__PURE__ */ k(l, {
253
+ children: /* @__PURE__ */ O(u, {
190
254
  className: "pt-6 text-center",
191
255
  children: [
192
- /* @__PURE__ */ O(V, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
193
- /* @__PURE__ */ O("p", {
256
+ /* @__PURE__ */ D(V, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
257
+ /* @__PURE__ */ D("p", {
194
258
  className: "text-2xl font-bold tabular-nums",
195
- children: C(B.tokensUsed)
259
+ children: I.tokensUsed === null || I.tokensUsed === void 0 ? "—" : b(I.tokensUsed)
196
260
  }),
197
- /* @__PURE__ */ O("p", {
261
+ /* @__PURE__ */ D("p", {
198
262
  className: "text-sm text-text-secondary",
199
- children: "Tokens"
263
+ children: E("botlit.executions.table.tokens", "Tokens")
200
264
  })
201
265
  ]
202
266
  })
203
267
  }),
204
- /* @__PURE__ */ O(c, {
268
+ /* @__PURE__ */ D(l, {
205
269
  treatment: "metric",
206
- children: /* @__PURE__ */ k(l, {
270
+ children: /* @__PURE__ */ O(u, {
207
271
  className: "pt-6 text-center",
208
272
  children: [
209
- /* @__PURE__ */ O(I, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
210
- /* @__PURE__ */ O("p", {
273
+ /* @__PURE__ */ D(F, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
274
+ /* @__PURE__ */ D("p", {
211
275
  className: "text-2xl font-bold tabular-nums",
212
- children: x(B.cost)
276
+ children: ie(I.cost)
213
277
  }),
214
- /* @__PURE__ */ O("p", {
278
+ /* @__PURE__ */ D("p", {
215
279
  className: "text-sm text-text-secondary",
216
- children: "Cost"
280
+ children: I.cost === null || I.cost === void 0 ? E("botlit.executions.detail.costUnknown", "Cost (price unknown)") : E("botlit.executions.table.cost", "Cost")
217
281
  })
218
282
  ]
219
283
  })
220
284
  }),
221
- /* @__PURE__ */ O(c, {
285
+ /* @__PURE__ */ D(l, {
222
286
  treatment: "metric",
223
- children: /* @__PURE__ */ k(l, {
287
+ children: /* @__PURE__ */ O(u, {
224
288
  className: "pt-6 text-center",
225
289
  children: [
226
- /* @__PURE__ */ O(z, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
227
- /* @__PURE__ */ O("p", {
290
+ /* @__PURE__ */ D(R, { className: "h-6 w-6 mx-auto mb-2 text-text-secondary" }),
291
+ /* @__PURE__ */ D("p", {
228
292
  className: "text-2xl font-bold capitalize",
229
- children: B.type.toLowerCase()
293
+ children: I.type.toLowerCase()
230
294
  }),
231
- /* @__PURE__ */ O("p", {
295
+ /* @__PURE__ */ D("p", {
232
296
  className: "text-sm text-text-secondary",
233
- children: "Type"
297
+ children: E("botlit.executions.detail.type", "Type")
234
298
  })
235
299
  ]
236
300
  })
237
301
  })
238
302
  ]
239
303
  }),
240
- (B.errorMessage || B.errorCode) && /* @__PURE__ */ k(c, { children: [/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ k(f, {
304
+ (I.errorMessage || I.errorCode) && /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ O(f, { children: [/* @__PURE__ */ O(p, {
241
305
  className: "flex items-center gap-2 text-status-error-text",
242
- children: [/* @__PURE__ */ O(j, { size: 18 }), "Failure"]
243
- }), B.errorCode && /* @__PURE__ */ O(u, { children: B.errorCode })] }), /* @__PURE__ */ k(l, {
306
+ children: [/* @__PURE__ */ D(A, { size: 18 }), E("botlit.executions.detail.failure", "Failure")]
307
+ }), I.errorCode && /* @__PURE__ */ D(d, { children: I.errorCode })] }), /* @__PURE__ */ O(u, {
244
308
  className: "space-y-3",
245
- children: [B.errorMessage && /* @__PURE__ */ O("p", {
246
- className: "text-sm text-text-primary",
247
- children: B.errorMessage
248
- }), B.errorDetails && /* @__PURE__ */ O("pre", {
249
- className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
250
- children: JSON.stringify(B.errorDetails, null, 2)
251
- })]
309
+ children: [
310
+ I.errorCode === "ORPHANED" && /* @__PURE__ */ D("p", {
311
+ className: "text-sm text-text-primary",
312
+ children: E("botlit.executions.detail.orphanedHint", "This run never finished, so the cleanup job closed it as failed.")
313
+ }),
314
+ I.errorMessage && /* @__PURE__ */ D("p", {
315
+ className: "text-sm text-text-primary",
316
+ children: I.errorMessage
317
+ }),
318
+ I.errorDetails && /* @__PURE__ */ D("pre", {
319
+ className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
320
+ children: JSON.stringify(I.errorDetails, null, 2)
321
+ })
322
+ ]
252
323
  })] }),
253
- /* @__PURE__ */ k(c, { children: [/* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, { children: "Run Details" }) }), /* @__PURE__ */ O(l, { children: /* @__PURE__ */ k("div", {
324
+ /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.runDetails", "Run details") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ O("dl", {
254
325
  className: "grid grid-cols-1 gap-6 md:grid-cols-3",
255
326
  children: [
256
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
257
- className: "text-sm text-text-secondary",
258
- children: "Execution ID"
259
- }), /* @__PURE__ */ O("p", {
260
- className: "font-mono text-sm break-all",
261
- children: B.id
262
- })] }),
263
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
264
- className: "text-sm text-text-secondary",
265
- children: "Bot"
266
- }), /* @__PURE__ */ O("p", {
267
- className: "font-mono text-sm break-all",
268
- children: B.appId ?? "—"
269
- })] }),
270
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
271
- className: "text-sm text-text-secondary",
272
- children: "Agent"
273
- }), /* @__PURE__ */ O("p", {
274
- className: "font-mono text-sm break-all",
275
- children: B.agentId ?? "—"
276
- })] }),
277
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
278
- className: "text-sm text-text-secondary",
279
- children: "Conversation"
280
- }), /* @__PURE__ */ O("p", {
281
- className: "font-mono text-sm break-all",
282
- children: B.conversationId ?? "—"
283
- })] }),
284
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
285
- className: "text-sm text-text-secondary",
286
- children: "Started"
287
- }), /* @__PURE__ */ O("p", {
288
- className: "font-medium",
289
- children: w(B.createdAt)
290
- })] }),
291
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
292
- className: "text-sm text-text-secondary",
293
- children: "Completed"
294
- }), /* @__PURE__ */ O("p", {
295
- className: "font-medium",
296
- children: w(B.completedAt)
297
- })] })
327
+ /* @__PURE__ */ D(Y, {
328
+ label: E("botlit.executions.detail.executionId", "Execution ID"),
329
+ mono: !0,
330
+ children: I.id
331
+ }),
332
+ /* @__PURE__ */ D(Y, {
333
+ label: E("botlit.executions.filters.bot", "Bot"),
334
+ children: /* @__PURE__ */ D(X, {
335
+ name: I.appName,
336
+ id: I.appId
337
+ })
338
+ }),
339
+ /* @__PURE__ */ D(Y, {
340
+ label: E("botlit.executions.filters.agent", "Agent"),
341
+ children: /* @__PURE__ */ D(X, {
342
+ name: I.agentName,
343
+ id: I.agentId
344
+ })
345
+ }),
346
+ /* @__PURE__ */ D(Y, {
347
+ label: E("botlit.executions.detail.conversation", "Conversation"),
348
+ mono: !0,
349
+ children: I.conversationId ?? "—"
350
+ }),
351
+ /* @__PURE__ */ D(Y, {
352
+ label: E("botlit.executions.table.started", "Started"),
353
+ children: x(I.createdAt)
354
+ }),
355
+ /* @__PURE__ */ D(Y, {
356
+ label: E("botlit.executions.detail.completed", "Completed"),
357
+ children: x(I.completedAt)
358
+ })
298
359
  ]
299
360
  }) })] }),
300
- /* @__PURE__ */ k("div", {
361
+ /* @__PURE__ */ D(se, {
362
+ execution: I,
363
+ t: E
364
+ }),
365
+ /* @__PURE__ */ O("div", {
301
366
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
302
- children: [/* @__PURE__ */ k(c, { children: [/* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, { children: "Input" }) }), /* @__PURE__ */ O(l, { children: /* @__PURE__ */ O("pre", {
303
- className: "max-h-96 overflow-auto whitespace-pre-wrap rounded-lg bg-bg-sunken p-3 text-sm",
304
- children: B.input
305
- }) })] }), /* @__PURE__ */ k(c, { children: [/* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, { children: "Output" }) }), /* @__PURE__ */ O(l, { children: B.output ? /* @__PURE__ */ O("pre", {
306
- className: "max-h-96 overflow-auto whitespace-pre-wrap rounded-lg bg-bg-sunken p-3 text-sm",
307
- children: B.output
308
- }) : /* @__PURE__ */ O("p", {
367
+ children: [/* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.input", "Input") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D("pre", {
368
+ className: "max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-3 font-sans text-sm",
369
+ children: C(I.input) || "—"
370
+ }) })] }), /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.output", "Output") }) }), /* @__PURE__ */ D(u, { children: $ ? /* @__PURE__ */ D("pre", {
371
+ className: "max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-3 font-sans text-sm",
372
+ children: $
373
+ }) : /* @__PURE__ */ D("p", {
309
374
  className: "text-sm text-text-secondary",
310
- children: "This run has not produced an output yet."
375
+ children: E("botlit.executions.detail.noOutput", "This run has not produced an output.")
311
376
  }) })] })]
312
377
  }),
313
- /* @__PURE__ */ O(g, { metadata: B.metadata }),
314
- B.metadata && Object.keys(B.metadata).length > 0 && /* @__PURE__ */ k(c, { children: [/* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, { children: "Metadata" }) }), /* @__PURE__ */ O(l, { children: /* @__PURE__ */ O("pre", {
378
+ /* @__PURE__ */ D(ee, { metadata: I.metadata }),
379
+ /* @__PURE__ */ D(te, {
380
+ executionId: I.id,
381
+ status: I.status
382
+ }),
383
+ I.metadata && Object.keys(I.metadata).length > 0 && /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: E("botlit.executions.detail.rawMetadata", "Recorded metadata") }) }), /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D("pre", {
315
384
  className: "max-h-64 overflow-auto rounded-lg bg-bg-sunken p-3 font-mono text-xs",
316
- children: JSON.stringify(B.metadata, null, 2)
385
+ children: JSON.stringify(I.metadata, null, 2)
317
386
  }) })] })
318
387
  ]
319
388
  })
320
389
  });
321
390
  };
322
- export { q as ExecutionDetailPage };
391
+ export { Z as ExecutionDetailPage };
323
392
 
324
393
  //# sourceMappingURL=ExecutionDetailPage.js.map