@burdenoff/microfe-botmanor 2026.1027.2 → 2026.1028.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/botlit/BotlitRoutes.js +142 -132
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/components/AgentApprovalPanel.js +144 -126
  4. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  5. package/dist/botlit/components/ModelRegistrationPanel.js +4 -4
  6. package/dist/botlit/components/RetentionStatusPanel.js +95 -0
  7. package/dist/botlit/components/RetentionStatusPanel.js.map +1 -0
  8. package/dist/botlit/components/VersionHistoryPanel.js +92 -83
  9. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  10. package/dist/botlit/hooks/index.js +1 -0
  11. package/dist/botlit/hooks/useRetention.js +31 -0
  12. package/dist/botlit/hooks/useRetention.js.map +1 -0
  13. package/dist/botlit/pages/A2AAgentDetailPage.js +212 -203
  14. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  15. package/dist/botlit/pages/A2ARegistryPage.js +129 -117
  16. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  17. package/dist/botlit/pages/AgentApprovalsPage.js +122 -110
  18. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  19. package/dist/botlit/pages/AgentBuilderPage.js +18 -18
  20. package/dist/botlit/pages/AgentDetailPage.js +298 -273
  21. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  22. package/dist/botlit/pages/AgentsListPage.js +145 -121
  23. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  24. package/dist/botlit/pages/BotChannelsTab.js +238 -226
  25. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  26. package/dist/botlit/pages/BotDetailPage.js +307 -288
  27. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  28. package/dist/botlit/pages/BotWorkflowTab.js +125 -116
  29. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  30. package/dist/botlit/pages/BotsListPage.js +159 -144
  31. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  32. package/dist/botlit/pages/BucketsPage.js +279 -258
  33. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  34. package/dist/botlit/pages/ChannelDetailPage.js +346 -328
  35. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  36. package/dist/botlit/pages/ChannelRoutesPage.js +10 -10
  37. package/dist/botlit/pages/ChannelsPage.js +163 -148
  38. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  39. package/dist/botlit/pages/DashboardPage.js +129 -114
  40. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  41. package/dist/botlit/pages/ExecutionDetailPage.js +145 -139
  42. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  43. package/dist/botlit/pages/ExecutionsPage.js +14 -14
  44. package/dist/botlit/pages/InstalledPackagesPage.js +245 -227
  45. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  46. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +168 -156
  47. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  48. package/dist/botlit/pages/KnowledgeBasesPage.js +91 -79
  49. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  50. package/dist/botlit/pages/MCPServerDetailPage.js +200 -188
  51. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  52. package/dist/botlit/pages/MCPServersPage.js +170 -155
  53. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  54. package/dist/botlit/pages/PoliciesPage.js +115 -104
  55. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  56. package/dist/botlit/pages/PolicyDetailPage.js +368 -324
  57. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  58. package/dist/botlit/pages/PromptStudioPage.js +106 -97
  59. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  60. package/dist/botlit/pages/PromptTemplateDetailPage.js +359 -347
  61. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  62. package/dist/botlit/pages/PromptTemplatesPage.js +127 -112
  63. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  64. package/dist/botlit/pages/RetrievalProfileDetailPage.js +219 -210
  65. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  66. package/dist/botlit/pages/RetrievalProfilesPage.js +112 -103
  67. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  68. package/dist/botlit/pages/SettingsPage.js +264 -252
  69. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  70. package/dist/botlit/pages/SkillDetailPage.js +235 -226
  71. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  72. package/dist/botlit/pages/SkillsPage.js +115 -106
  73. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  74. package/dist/botlit/pages/StorePackageDetailPage.js +194 -188
  75. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  76. package/dist/botlit/pages/StorePage.js +161 -155
  77. package/dist/botlit/pages/StorePage.js.map +1 -1
  78. package/dist/botlit/permissions/PermissionRequired.js +45 -0
  79. package/dist/botlit/permissions/PermissionRequired.js.map +1 -0
  80. package/dist/botlit/permissions/botmanorPermissions.js +72 -0
  81. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -0
  82. package/dist/botlit/permissions/index.js +3 -0
  83. package/dist/botlit/permissions/useBotmanorPermissions.js +19 -0
  84. package/dist/botlit/permissions/useBotmanorPermissions.js.map +1 -0
  85. package/dist/botlit/utils/policyConfig.js +67 -42
  86. package/dist/botlit/utils/policyConfig.js.map +1 -1
  87. package/dist/generated/global-types.js.map +1 -1
  88. package/dist/generated/wspace-operations.js +90 -54
  89. package/dist/generated/wspace-operations.js.map +1 -1
  90. package/dist/generated/wspace-types.js.map +1 -1
  91. package/package.json +1 -1
@@ -1,27 +1,30 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
- import { useCreateKnowledgeBase as t, useKnowledgeBase as n, useKnowledgeDocuments as ee, useRebuildKnowledgeBaseIndex as r, useUpdateKnowledgeBase as i } from "../hooks/useKnowledgeBases.js";
3
- import { useLLMModels as te, useLLMProviders as ne } from "../hooks/useLLMProviders.js";
2
+ import { useCreateKnowledgeBase as t, useKnowledgeBase as n, useKnowledgeDocuments as ee, useRebuildKnowledgeBaseIndex as te, useUpdateKnowledgeBase as ne } from "../hooks/useKnowledgeBases.js";
3
+ import { useLLMModels as r, useLLMProviders as i } from "../hooks/useLLMProviders.js";
4
4
  import { formatRelativeTime as a } from "../utils/formatters.js";
5
- import { PageLayout as o } from "../components/PageLayout.js";
6
- import { Card as s, CardContent as c, CardDescription as l, CardHeader as u, CardTitle as d } from "../components/Card.js";
7
- import { Button as f } from "../components/Button.js";
8
- import { StatusBadge as p } from "../components/Badge.js";
5
+ import { BOTMANOR_PERMISSIONS as o } from "../permissions/botmanorPermissions.js";
6
+ import { BotmanorPermissionGate as s } from "../permissions/useBotmanorPermissions.js";
7
+ import { PageLayout as c } from "../components/PageLayout.js";
8
+ import { Button as l } from "../components/Button.js";
9
+ import "../permissions/index.js";
10
+ import { Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m } from "../components/Card.js";
11
+ import { StatusBadge as h } from "../components/Badge.js";
9
12
  import { EmptyState as re } from "../components/EmptyState.js";
10
- import { FormField as m, Input as h, Textarea as ie } from "../components/Input.js";
13
+ import { FormField as g, Input as _, Textarea as ie } from "../components/Input.js";
11
14
  import { configuredEmbeddingModels as ae } from "../utils/embedding-models.js";
12
15
  import { KnowledgeSourceImportPanel as oe } from "../components/KnowledgeSourceImportPanel.js";
13
- import { useEffect as g, useMemo as _, useState as v } from "react";
14
- import { GlassCard as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
15
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
16
+ import { useEffect as v, useMemo as y, useState as b } from "react";
17
+ import { GlassCard as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
18
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
16
19
  import { useParams as se } from "react-router";
17
- import { ArrowLeft as ce, Boxes as le, Database as w, FileText as ue, Layers as de, RefreshCw as fe, Save as T, Settings as E } from "lucide-react";
18
- import { toast as D } from "sonner";
20
+ import { ArrowLeft as ce, Boxes as le, Database as E, FileText as ue, Layers as de, RefreshCw as fe, Save as D, Settings as O } from "lucide-react";
21
+ import { toast as k } from "sonner";
19
22
  //#region src/botlit/pages/KnowledgeBaseDetailPage.tsx
20
23
  var pe = [
21
24
  "RECURSIVE",
22
25
  "FIXED",
23
26
  "SENTENCE"
24
- ], O = {
27
+ ], A = {
25
28
  name: "",
26
29
  description: "",
27
30
  embeddingModel: "",
@@ -30,7 +33,7 @@ var pe = [
30
33
  chunkSize: 512,
31
34
  chunkOverlap: 50
32
35
  };
33
- function k(e) {
36
+ function j(e) {
34
37
  return {
35
38
  name: e.name,
36
39
  description: e.description ?? "",
@@ -41,27 +44,27 @@ function k(e) {
41
44
  chunkOverlap: e.chunkOverlap
42
45
  };
43
46
  }
44
- function A(e, t) {
47
+ function M(e, t) {
45
48
  let n = Number(e);
46
49
  return e.trim() !== "" && Number.isFinite(n) ? n : t;
47
50
  }
48
- var j = ({ isNew: j }) => {
49
- let { kbId: M } = se(), { data: N, loading: P, error: F, refetch: I } = te(), { data: L, loading: R, error: z, refetch: B } = ne(), V = P || R, H = F || z, U = _(() => ae(N ?? [], L ?? []), [N, L]), { navigateTo: W } = e(), { data: G, loading: me, refetch: K } = n(j ? void 0 : M), { data: q } = ee(j ? void 0 : M), [he, ge] = t(), [_e, ve] = i(), [J, ye] = r(), [Y, X] = v(!1), [Z, Q] = v(O);
50
- g(() => {
51
- G && !j && Q(k(G));
52
- }, [G, j]);
53
- let be = async () => {
51
+ var N = ({ isNew: N }) => {
52
+ let { kbId: P } = se(), { data: F, loading: I, error: L, refetch: R } = r(), { data: z, loading: B, error: me, refetch: he } = i(), V = I || B, H = L || me, U = y(() => ae(F ?? [], z ?? []), [F, z]), { navigateTo: W } = e(), { data: G, loading: ge, refetch: K } = n(N ? void 0 : P), { data: q } = ee(N ? void 0 : P), [_e, ve] = t(), [ye, be] = ne(), [xe, J] = te(), [Y, X] = b(!1), [Z, Q] = b(A);
53
+ v(() => {
54
+ G && !N && Q(j(G));
55
+ }, [G, N]);
56
+ let Se = async () => {
54
57
  if (!(V || H)) {
55
58
  if (!Z.name.trim()) {
56
- D.error("Name is required");
59
+ k.error("Name is required");
57
60
  return;
58
61
  }
59
62
  if (!U.some((e) => e.id === Z.embeddingModel)) {
60
- D.error("Choose a configured embedding model. Register one in Settings first.");
63
+ k.error("Choose a configured embedding model. Register one in Settings first.");
61
64
  return;
62
65
  }
63
66
  try {
64
- let e = await he({
67
+ let e = await _e({
65
68
  name: Z.name.trim(),
66
69
  description: Z.description.trim() || null,
67
70
  embeddingModel: Z.embeddingModel,
@@ -70,19 +73,19 @@ var j = ({ isNew: j }) => {
70
73
  chunkSize: Z.chunkSize,
71
74
  chunkOverlap: Z.chunkOverlap
72
75
  });
73
- D.success(`Knowledge base "${e.name}" created`), W(`knowledge/${e.id}`);
76
+ k.success(`Knowledge base "${e.name}" created`), W(`knowledge/${e.id}`);
74
77
  } catch (e) {
75
- D.error(e instanceof Error ? e.message : "Failed to create knowledge base");
78
+ k.error(e instanceof Error ? e.message : "Failed to create knowledge base");
76
79
  }
77
80
  }
78
- }, xe = async () => {
79
- if (!M || !Z.name.trim()) {
80
- D.error("Name is required");
81
+ }, Ce = async () => {
82
+ if (!P || !Z.name.trim()) {
83
+ k.error("Name is required");
81
84
  return;
82
85
  }
83
86
  try {
84
- await _e({
85
- kbId: M,
87
+ await ye({
88
+ kbId: P,
86
89
  input: {
87
90
  name: Z.name.trim(),
88
91
  description: Z.description.trim() || null,
@@ -90,21 +93,21 @@ var j = ({ isNew: j }) => {
90
93
  chunkSize: Z.chunkSize,
91
94
  chunkOverlap: Z.chunkOverlap
92
95
  }
93
- }), await K(), D.success("Knowledge base updated"), X(!1);
96
+ }), await K(), k.success("Knowledge base updated"), X(!1);
94
97
  } catch (e) {
95
- D.error(e instanceof Error ? e.message : "Failed to update knowledge base");
98
+ k.error(e instanceof Error ? e.message : "Failed to update knowledge base");
96
99
  }
97
- }, Se = async () => {
98
- if (M) try {
99
- await J(M), await K(), D.success("Re-indexing started");
100
+ }, we = async () => {
101
+ if (P) try {
102
+ await xe(P), await K(), k.success("Re-indexing started");
100
103
  } catch (e) {
101
- D.error(e instanceof Error ? e.message : "Failed to rebuild the index");
104
+ k.error(e instanceof Error ? e.message : "Failed to rebuild the index");
102
105
  }
103
- }, $ = (e) => /* @__PURE__ */ C(x, { children: [
104
- /* @__PURE__ */ S(m, {
106
+ }, $ = (e) => /* @__PURE__ */ T(C, { children: [
107
+ /* @__PURE__ */ w(g, {
105
108
  label: "Name",
106
109
  required: !0,
107
- children: /* @__PURE__ */ S(h, {
110
+ children: /* @__PURE__ */ w(_, {
108
111
  placeholder: "e.g., Product Documentation",
109
112
  value: Z.name,
110
113
  onChange: (e) => Q({
@@ -113,9 +116,9 @@ var j = ({ isNew: j }) => {
113
116
  })
114
117
  })
115
118
  }),
116
- /* @__PURE__ */ S(m, {
119
+ /* @__PURE__ */ w(g, {
117
120
  label: "Description",
118
- children: /* @__PURE__ */ S(ie, {
121
+ children: /* @__PURE__ */ w(ie, {
119
122
  placeholder: "What kind of knowledge will this store?",
120
123
  value: Z.description,
121
124
  onChange: (e) => Q({
@@ -125,11 +128,11 @@ var j = ({ isNew: j }) => {
125
128
  rows: 3
126
129
  })
127
130
  }),
128
- e && /* @__PURE__ */ C(m, {
131
+ e && /* @__PURE__ */ T(g, {
129
132
  label: "Embedding Model",
130
133
  required: !0,
131
134
  children: [
132
- /* @__PURE__ */ C("select", {
135
+ /* @__PURE__ */ T("select", {
133
136
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
134
137
  "aria-label": "Embedding Model",
135
138
  disabled: V || !!H,
@@ -142,10 +145,10 @@ var j = ({ isNew: j }) => {
142
145
  embeddingDimensions: t?.dimensions ?? Z.embeddingDimensions
143
146
  });
144
147
  },
145
- children: [/* @__PURE__ */ S("option", {
148
+ children: [/* @__PURE__ */ w("option", {
146
149
  value: "",
147
150
  children: "Choose a configured embedding model"
148
- }), U.map((e) => /* @__PURE__ */ C("option", {
151
+ }), U.map((e) => /* @__PURE__ */ T("option", {
149
152
  value: e.id,
150
153
  children: [
151
154
  e.label,
@@ -155,274 +158,283 @@ var j = ({ isNew: j }) => {
155
158
  ]
156
159
  }, e.id))]
157
160
  }),
158
- V && /* @__PURE__ */ S("p", {
161
+ V && /* @__PURE__ */ w("p", {
159
162
  role: "status",
160
163
  children: "Loading configured embedding models…"
161
164
  }),
162
- H && /* @__PURE__ */ C("div", {
165
+ H && /* @__PURE__ */ T("div", {
163
166
  role: "alert",
164
- children: [/* @__PURE__ */ S("p", { children: "Could not load configured models. Try loading the catalog again." }), /* @__PURE__ */ S(f, {
167
+ children: [/* @__PURE__ */ w("p", { children: "Could not load configured models. Try loading the catalog again." }), /* @__PURE__ */ w(l, {
165
168
  variant: "secondary",
166
169
  onClick: () => {
167
- I(), B();
170
+ R(), he();
168
171
  },
169
172
  children: "Retry model catalog"
170
173
  })]
171
174
  }),
172
- !V && !H && U.length === 0 && /* @__PURE__ */ S("p", {
175
+ !V && !H && U.length === 0 && /* @__PURE__ */ w("p", {
173
176
  className: "text-sm text-text-secondary",
174
177
  children: "Register an embedding model with an active provider in Settings first."
175
178
  })
176
179
  ]
177
180
  }),
178
- /* @__PURE__ */ C("div", {
181
+ /* @__PURE__ */ T("div", {
179
182
  className: "grid grid-cols-3 gap-4",
180
183
  children: [
181
- /* @__PURE__ */ S(m, {
184
+ /* @__PURE__ */ w(g, {
182
185
  label: "Chunking Strategy",
183
- children: /* @__PURE__ */ S("select", {
186
+ children: /* @__PURE__ */ w("select", {
184
187
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
185
188
  value: Z.chunkingStrategy,
186
189
  onChange: (e) => Q({
187
190
  ...Z,
188
191
  chunkingStrategy: e.target.value
189
192
  }),
190
- children: pe.map((e) => /* @__PURE__ */ S("option", {
193
+ children: pe.map((e) => /* @__PURE__ */ w("option", {
191
194
  value: e,
192
195
  children: e
193
196
  }, e))
194
197
  })
195
198
  }),
196
- /* @__PURE__ */ S(m, {
199
+ /* @__PURE__ */ w(g, {
197
200
  label: "Chunk Size",
198
- children: /* @__PURE__ */ S(h, {
201
+ children: /* @__PURE__ */ w(_, {
199
202
  type: "number",
200
203
  value: Z.chunkSize,
201
204
  onChange: (e) => Q({
202
205
  ...Z,
203
- chunkSize: A(e.target.value, O.chunkSize)
206
+ chunkSize: M(e.target.value, A.chunkSize)
204
207
  })
205
208
  })
206
209
  }),
207
- /* @__PURE__ */ S(m, {
210
+ /* @__PURE__ */ w(g, {
208
211
  label: "Chunk Overlap",
209
- children: /* @__PURE__ */ S(h, {
212
+ children: /* @__PURE__ */ w(_, {
210
213
  type: "number",
211
214
  value: Z.chunkOverlap,
212
215
  onChange: (e) => Q({
213
216
  ...Z,
214
- chunkOverlap: A(e.target.value, O.chunkOverlap)
217
+ chunkOverlap: M(e.target.value, A.chunkOverlap)
215
218
  })
216
219
  })
217
220
  })
218
221
  ]
219
222
  })
220
223
  ] });
221
- return j ? /* @__PURE__ */ S(o, {
224
+ return N ? /* @__PURE__ */ w(c, {
222
225
  title: "Create Knowledge Base",
223
226
  description: "Set up an embedding index your agents can retrieve from",
224
- actions: /* @__PURE__ */ C("div", {
227
+ actions: /* @__PURE__ */ T("div", {
225
228
  className: "flex gap-2",
226
- children: [/* @__PURE__ */ S(f, {
229
+ children: [/* @__PURE__ */ w(l, {
227
230
  variant: "outline",
228
231
  onClick: () => W("knowledge"),
229
232
  children: "Cancel"
230
- }), /* @__PURE__ */ S(f, {
231
- leftIcon: /* @__PURE__ */ S(T, { size: 16 }),
232
- onClick: be,
233
- isLoading: ge.loading,
233
+ }), /* @__PURE__ */ w(l, {
234
+ leftIcon: /* @__PURE__ */ w(D, { size: 16 }),
235
+ onClick: Se,
236
+ isLoading: ve.loading,
234
237
  disabled: V || !!H || !Z.name.trim(),
235
238
  children: "Create"
236
239
  })]
237
240
  }),
238
- children: /* @__PURE__ */ S("div", {
241
+ children: /* @__PURE__ */ w("div", {
239
242
  className: "max-w-3xl space-y-6",
240
- children: /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(u, { children: [/* @__PURE__ */ S(d, { children: "Index Configuration" }), /* @__PURE__ */ S(l, { children: "The embedding model and its vector width are fixed once documents are indexed." })] }), /* @__PURE__ */ S(c, {
243
+ children: /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ w(m, { children: "Index Configuration" }), /* @__PURE__ */ w(f, { children: "The embedding model and its vector width are fixed once documents are indexed." })] }), /* @__PURE__ */ w(d, {
241
244
  className: "space-y-4",
242
245
  children: $(!0)
243
246
  })] })
244
247
  })
245
- }) : me ? /* @__PURE__ */ S(o, {
248
+ }) : ge ? /* @__PURE__ */ w(c, {
246
249
  title: "Loading...",
247
- children: /* @__PURE__ */ S("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
248
- }) : G ? /* @__PURE__ */ S(o, {
249
- title: /* @__PURE__ */ C("div", {
250
+ children: /* @__PURE__ */ w("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
251
+ }) : G ? /* @__PURE__ */ w(c, {
252
+ title: /* @__PURE__ */ T("div", {
250
253
  className: "flex items-center gap-3",
251
- children: [/* @__PURE__ */ S(f, {
254
+ children: [/* @__PURE__ */ w(l, {
252
255
  variant: "ghost",
253
256
  size: "icon",
254
257
  onClick: () => W("knowledge"),
255
- children: /* @__PURE__ */ S(ce, { size: 20 })
256
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
258
+ children: /* @__PURE__ */ w(ce, { size: 20 })
259
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
257
260
  className: "flex items-center gap-2",
258
- children: [/* @__PURE__ */ S("span", { children: G.name }), /* @__PURE__ */ S(p, { status: G.indexStatus })]
259
- }), G.description && /* @__PURE__ */ S("p", {
261
+ children: [/* @__PURE__ */ w("span", { children: G.name }), /* @__PURE__ */ w(h, { status: G.indexStatus })]
262
+ }), G.description && /* @__PURE__ */ w("p", {
260
263
  className: "text-sm font-normal text-text-secondary",
261
264
  children: G.description
262
265
  })] })]
263
266
  }),
264
- actions: /* @__PURE__ */ C("div", {
267
+ actions: /* @__PURE__ */ T("div", {
265
268
  className: "flex gap-2",
266
- children: [/* @__PURE__ */ S(f, {
267
- variant: "outline",
268
- leftIcon: /* @__PURE__ */ S(fe, { size: 16 }),
269
- onClick: Se,
270
- isLoading: ye.loading,
271
- children: "Rebuild Index"
272
- }), Y ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(f, {
269
+ children: [/* @__PURE__ */ w(s, {
270
+ permission: o.KNOWLEDGE_MANAGE,
271
+ children: /* @__PURE__ */ w(l, {
272
+ variant: "outline",
273
+ leftIcon: /* @__PURE__ */ w(fe, { size: 16 }),
274
+ onClick: we,
275
+ isLoading: J.loading,
276
+ children: "Rebuild Index"
277
+ })
278
+ }), Y ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(l, {
273
279
  variant: "outline",
274
280
  onClick: () => {
275
- Q(k(G)), X(!1);
281
+ Q(j(G)), X(!1);
276
282
  },
277
283
  children: "Cancel"
278
- }), /* @__PURE__ */ S(f, {
279
- leftIcon: /* @__PURE__ */ S(T, { size: 16 }),
280
- onClick: xe,
281
- isLoading: ve.loading,
284
+ }), /* @__PURE__ */ w(l, {
285
+ leftIcon: /* @__PURE__ */ w(D, { size: 16 }),
286
+ onClick: Ce,
287
+ isLoading: be.loading,
282
288
  children: "Save"
283
- })] }) : /* @__PURE__ */ S(f, {
284
- leftIcon: /* @__PURE__ */ S(E, { size: 16 }),
285
- onClick: () => X(!0),
286
- children: "Configure"
289
+ })] }) : /* @__PURE__ */ w(s, {
290
+ permission: o.KNOWLEDGE_UPDATE,
291
+ children: /* @__PURE__ */ w(l, {
292
+ leftIcon: /* @__PURE__ */ w(O, { size: 16 }),
293
+ onClick: () => X(!0),
294
+ children: "Configure"
295
+ })
287
296
  })]
288
297
  }),
289
- children: /* @__PURE__ */ C("div", {
298
+ children: /* @__PURE__ */ T("div", {
290
299
  className: "space-y-6",
291
300
  children: [
292
- /* @__PURE__ */ S(b, {
293
- icon: /* @__PURE__ */ S(w, { size: 18 }),
301
+ /* @__PURE__ */ w(S, {
302
+ icon: /* @__PURE__ */ w(E, { size: 18 }),
294
303
  children: "This knowledge base is one searchable library your agents can draw on. Review how its documents are chunked and indexed, rebuild the index when content changes, and confirm it is healthy — so agents retrieve accurate, up-to-date passages and can cite them in their answers."
295
304
  }),
296
- /* @__PURE__ */ C("div", {
305
+ /* @__PURE__ */ T("div", {
297
306
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
298
307
  children: [
299
- /* @__PURE__ */ C(y, {
308
+ /* @__PURE__ */ T(x, {
300
309
  treatment: "glass",
301
310
  glow: !0,
302
311
  className: "p-6 text-center",
303
312
  children: [
304
- /* @__PURE__ */ S("div", {
313
+ /* @__PURE__ */ w("div", {
305
314
  className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
306
- children: /* @__PURE__ */ S(w, { className: "h-5 w-5 text-primary" })
315
+ children: /* @__PURE__ */ w(E, { className: "h-5 w-5 text-primary" })
307
316
  }),
308
- /* @__PURE__ */ S("p", {
317
+ /* @__PURE__ */ w("p", {
309
318
  className: "text-lg font-bold text-text-primary capitalize",
310
319
  children: G.indexStatus.toLowerCase()
311
320
  }),
312
- /* @__PURE__ */ S("p", {
321
+ /* @__PURE__ */ w("p", {
313
322
  className: "text-sm text-text-secondary",
314
323
  children: "Index Status"
315
324
  })
316
325
  ]
317
326
  }),
318
- /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, {
327
+ /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
319
328
  className: "pt-6 text-center",
320
- children: [/* @__PURE__ */ S("p", {
329
+ children: [/* @__PURE__ */ w("p", {
321
330
  className: "text-3xl font-bold text-text-primary",
322
331
  children: G.totalDocuments
323
- }), /* @__PURE__ */ S("p", {
332
+ }), /* @__PURE__ */ w("p", {
324
333
  className: "text-sm text-text-secondary",
325
334
  children: "Documents"
326
335
  })]
327
336
  }) }),
328
- /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, {
337
+ /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
329
338
  className: "pt-6 text-center",
330
- children: [/* @__PURE__ */ S("p", {
339
+ children: [/* @__PURE__ */ w("p", {
331
340
  className: "text-3xl font-bold text-text-primary",
332
341
  children: G.totalChunks
333
- }), /* @__PURE__ */ S("p", {
342
+ }), /* @__PURE__ */ w("p", {
334
343
  className: "text-sm text-text-secondary",
335
344
  children: "Chunks"
336
345
  })]
337
346
  }) }),
338
- /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, {
347
+ /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
339
348
  className: "pt-6 text-center",
340
- children: [/* @__PURE__ */ S("p", {
349
+ children: [/* @__PURE__ */ w("p", {
341
350
  className: "text-3xl font-bold text-text-primary",
342
351
  children: G.vectorCount
343
- }), /* @__PURE__ */ S("p", {
352
+ }), /* @__PURE__ */ w("p", {
344
353
  className: "text-sm text-text-secondary",
345
354
  children: "Vectors"
346
355
  })]
347
356
  }) })
348
357
  ]
349
358
  }),
350
- /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(u, { children: [/* @__PURE__ */ C(d, {
359
+ /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ T(m, {
351
360
  className: "flex items-center gap-2",
352
- children: [/* @__PURE__ */ S(de, { size: 18 }), "Index Configuration"]
353
- }), /* @__PURE__ */ S(l, { children: "How documents are embedded and split before they are indexed" })] }), /* @__PURE__ */ S(c, {
361
+ children: [/* @__PURE__ */ w(de, { size: 18 }), "Index Configuration"]
362
+ }), /* @__PURE__ */ w(f, { children: "How documents are embedded and split before they are indexed" })] }), /* @__PURE__ */ w(d, {
354
363
  className: "space-y-4",
355
- children: Y ? $(!1) : /* @__PURE__ */ C("div", {
364
+ children: Y ? $(!1) : /* @__PURE__ */ T("div", {
356
365
  className: "grid grid-cols-2 md:grid-cols-3 gap-6",
357
366
  children: [
358
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
367
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
359
368
  className: "text-sm text-text-secondary",
360
369
  children: "Embedding Model"
361
- }), /* @__PURE__ */ S("p", {
370
+ }), /* @__PURE__ */ w("p", {
362
371
  className: "font-medium font-mono text-sm",
363
372
  children: G.embeddingModel
364
373
  })] }),
365
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
374
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
366
375
  className: "text-sm text-text-secondary",
367
376
  children: "Dimensions"
368
- }), /* @__PURE__ */ S("p", {
377
+ }), /* @__PURE__ */ w("p", {
369
378
  className: "font-medium",
370
379
  children: G.embeddingDimensions
371
380
  })] }),
372
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
381
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
373
382
  className: "text-sm text-text-secondary",
374
383
  children: "Chunking Strategy"
375
- }), /* @__PURE__ */ S("p", {
384
+ }), /* @__PURE__ */ w("p", {
376
385
  className: "font-medium",
377
386
  children: G.chunkingStrategy
378
387
  })] }),
379
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
388
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
380
389
  className: "text-sm text-text-secondary",
381
390
  children: "Chunk Size"
382
- }), /* @__PURE__ */ S("p", {
391
+ }), /* @__PURE__ */ w("p", {
383
392
  className: "font-medium",
384
393
  children: G.chunkSize
385
394
  })] }),
386
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
395
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
387
396
  className: "text-sm text-text-secondary",
388
397
  children: "Chunk Overlap"
389
- }), /* @__PURE__ */ S("p", {
398
+ }), /* @__PURE__ */ w("p", {
390
399
  className: "font-medium",
391
400
  children: G.chunkOverlap
392
401
  })] }),
393
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
402
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
394
403
  className: "text-sm text-text-secondary",
395
404
  children: "Last Indexed"
396
- }), /* @__PURE__ */ S("p", {
405
+ }), /* @__PURE__ */ w("p", {
397
406
  className: "font-medium",
398
407
  children: G.lastIndexedAt ? a(G.lastIndexedAt) : "Never"
399
408
  })] })
400
409
  ]
401
410
  })
402
411
  })] }),
403
- !j && M && /* @__PURE__ */ S(oe, { knowledgeBaseId: M }),
404
- /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(u, { children: [/* @__PURE__ */ C(d, {
412
+ !N && P && /* @__PURE__ */ w(s, {
413
+ permission: o.KNOWLEDGE_MANAGE,
414
+ children: /* @__PURE__ */ w(oe, { knowledgeBaseId: P })
415
+ }),
416
+ /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ T(m, {
405
417
  className: "flex items-center gap-2",
406
418
  children: [
407
- /* @__PURE__ */ S(ue, { size: 18 }),
419
+ /* @__PURE__ */ w(ue, { size: 18 }),
408
420
  "Documents (",
409
421
  q.length,
410
422
  ")"
411
423
  ]
412
- }), /* @__PURE__ */ S(l, { children: "Source documents indexed into this knowledge base" })] }), /* @__PURE__ */ S(c, {
424
+ }), /* @__PURE__ */ w(f, { children: "Source documents indexed into this knowledge base" })] }), /* @__PURE__ */ w(d, {
413
425
  className: "p-0",
414
- children: q.length > 0 ? /* @__PURE__ */ S("div", {
426
+ children: q.length > 0 ? /* @__PURE__ */ w("div", {
415
427
  className: "divide-y divide-border-subtle",
416
- children: q.map((e) => /* @__PURE__ */ C("div", {
428
+ children: q.map((e) => /* @__PURE__ */ T("div", {
417
429
  className: "flex items-center justify-between gap-4 p-4",
418
- children: [/* @__PURE__ */ C("div", {
430
+ children: [/* @__PURE__ */ T("div", {
419
431
  className: "min-w-0",
420
432
  children: [
421
- /* @__PURE__ */ S("p", {
433
+ /* @__PURE__ */ w("p", {
422
434
  className: "font-medium truncate",
423
435
  children: e.title
424
436
  }),
425
- /* @__PURE__ */ C("p", {
437
+ /* @__PURE__ */ T("p", {
426
438
  className: "text-sm text-text-secondary",
427
439
  children: [
428
440
  e.chunkCount,
@@ -430,42 +442,42 @@ var j = ({ isNew: j }) => {
430
442
  a(e.addedAt)
431
443
  ]
432
444
  }),
433
- e.processingError && /* @__PURE__ */ S("p", {
445
+ e.processingError && /* @__PURE__ */ w("p", {
434
446
  className: "mt-1 text-sm text-status-error-text",
435
447
  children: e.processingError
436
448
  })
437
449
  ]
438
- }), /* @__PURE__ */ S(p, { status: e.status })]
450
+ }), /* @__PURE__ */ w(h, { status: e.status })]
439
451
  }, e.id))
440
- }) : /* @__PURE__ */ C("div", {
452
+ }) : /* @__PURE__ */ T("div", {
441
453
  className: "p-8 text-center text-text-secondary",
442
- children: [/* @__PURE__ */ S(le, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ S("p", { children: "No documents indexed yet" })]
454
+ children: [/* @__PURE__ */ w(le, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ w("p", { children: "No documents indexed yet" })]
443
455
  })
444
456
  })] }),
445
- /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(u, { children: /* @__PURE__ */ C(d, {
457
+ /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(p, { children: /* @__PURE__ */ T(m, {
446
458
  className: "flex items-center gap-2",
447
- children: [/* @__PURE__ */ S(E, { size: 18 }), "Metadata"]
448
- }) }), /* @__PURE__ */ S(c, { children: /* @__PURE__ */ C("div", {
459
+ children: [/* @__PURE__ */ w(O, { size: 18 }), "Metadata"]
460
+ }) }), /* @__PURE__ */ w(d, { children: /* @__PURE__ */ T("div", {
449
461
  className: "grid grid-cols-2 md:grid-cols-3 gap-6 text-sm",
450
462
  children: [
451
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
463
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
452
464
  className: "text-text-secondary",
453
465
  children: "Created"
454
- }), /* @__PURE__ */ S("p", {
466
+ }), /* @__PURE__ */ w("p", {
455
467
  className: "font-medium",
456
468
  children: a(G.createdAt)
457
469
  })] }),
458
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
470
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
459
471
  className: "text-text-secondary",
460
472
  children: "Updated"
461
- }), /* @__PURE__ */ S("p", {
473
+ }), /* @__PURE__ */ w("p", {
462
474
  className: "font-medium",
463
475
  children: a(G.updatedAt)
464
476
  })] }),
465
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
477
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
466
478
  className: "text-text-secondary",
467
479
  children: "Last Indexed"
468
- }), /* @__PURE__ */ S("p", {
480
+ }), /* @__PURE__ */ w("p", {
469
481
  className: "font-medium",
470
482
  children: G.lastIndexedAt ? a(G.lastIndexedAt) : "—"
471
483
  })] })
@@ -473,13 +485,13 @@ var j = ({ isNew: j }) => {
473
485
  }) })] })
474
486
  ]
475
487
  })
476
- }) : /* @__PURE__ */ S(o, {
488
+ }) : /* @__PURE__ */ w(c, {
477
489
  title: "Knowledge Base Not Found",
478
- children: /* @__PURE__ */ S(re, {
490
+ children: /* @__PURE__ */ w(re, {
479
491
  illustration: "empty-files",
480
492
  title: "Knowledge Base Not Found",
481
493
  description: "This knowledge base doesn't exist.",
482
- action: /* @__PURE__ */ S(f, {
494
+ action: /* @__PURE__ */ w(l, {
483
495
  onClick: () => W("knowledge"),
484
496
  children: "Back to Knowledge Bases"
485
497
  })
@@ -487,6 +499,6 @@ var j = ({ isNew: j }) => {
487
499
  });
488
500
  };
489
501
  //#endregion
490
- export { j as KnowledgeBaseDetailPage };
502
+ export { N as KnowledgeBaseDetailPage };
491
503
 
492
504
  //# sourceMappingURL=KnowledgeBaseDetailPage.js.map