@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
2
  import { formatRelativeTime as t } from "../utils/formatters.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "../components/Card.js";
5
- import { Button as c } from "../components/Button.js";
6
- import { Badge as l } from "../components/Badge.js";
7
- import { EmptyState as u } from "../components/EmptyState.js";
8
- import { Input as d } from "../components/Input.js";
9
- import { ErrorState as f } from "../components/ErrorState.js";
10
- import { storePackageName as p, useInstalledPackages as ee, usePinPackageVersion as m, useUninstallPackage as te, useUpdateInstalledPackage as h } from "../hooks/useStore.js";
3
+ import { BOTMANOR_PERMISSIONS as n } from "../permissions/botmanorPermissions.js";
4
+ import { BotmanorPermissionGate as r } from "../permissions/useBotmanorPermissions.js";
5
+ import { PageLayout as i } from "../components/PageLayout.js";
6
+ import { Button as a } from "../components/Button.js";
7
+ import "../permissions/index.js";
8
+ import { Card as o, CardContent as s, CardDescription as c, CardHeader as l, CardTitle as u } from "../components/Card.js";
9
+ import { Badge as d } from "../components/Badge.js";
10
+ import { EmptyState as f } from "../components/EmptyState.js";
11
+ import { Input as p } from "../components/Input.js";
12
+ import { ErrorState as m } from "../components/ErrorState.js";
13
+ import { storePackageName as h, useInstalledPackages as ee, usePinPackageVersion as g, useUninstallPackage as te, useUpdateInstalledPackage as _ } from "../hooks/useStore.js";
11
14
  import "../hooks/index.js";
12
- import { PackageKind as g } from "../../generated/wspace-types.js";
13
- import { useMemo as _, useState as v } from "react";
14
- import { GlassCard as y, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
15
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
15
+ import { PackageKind as v } from "../../generated/wspace-types.js";
16
+ import { useMemo as y, useState as b } from "react";
17
+ import { GlassCard as x, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
18
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
16
19
  import { Link as re } from "react-router";
17
- import { ArrowUpCircle as C, Copy as ie, Download as ae, ExternalLink as oe, GitBranch as w, Link2 as T, Package as E, RefreshCw as se, Search as ce, Settings as le, Trash2 as D } from "lucide-react";
18
- import { toast as O } from "sonner";
20
+ import { ArrowUpCircle as T, Copy as ie, Download as ae, ExternalLink as oe, GitBranch as E, Link2 as D, Package as O, RefreshCw as se, Search as ce, Settings as le, Trash2 as k } from "lucide-react";
21
+ import { toast as A } from "sonner";
19
22
  //#region src/botlit/pages/InstalledPackagesPage.tsx
20
- var k = [
23
+ var j = [
21
24
  "DEV",
22
25
  "STAGING",
23
26
  "PROD"
24
- ], A = {
27
+ ], M = {
25
28
  APP: {
26
29
  label: "Bot",
27
30
  icon: "📱"
@@ -86,146 +89,146 @@ var k = [
86
89
  label: "Workflow",
87
90
  icon: "🔀"
88
91
  }
89
- }, j = {
92
+ }, N = {
90
93
  label: "Package",
91
94
  icon: "📦"
92
95
  };
93
- function M(e) {
96
+ function P(e) {
94
97
  return e.package?.slug ?? e.packageId;
95
98
  }
96
- function N(e) {
99
+ function F(e) {
97
100
  return e.package?.kind;
98
101
  }
99
- function P(e) {
100
- let t = N(e);
101
- return t && A[t] || j;
102
+ function I(e) {
103
+ let t = F(e);
104
+ return t && M[t] || N;
102
105
  }
103
- function F(e) {
106
+ function L(e) {
104
107
  let t = e.package?.version;
105
108
  return !!(t && t !== e.installedVersion);
106
109
  }
107
- function I(e, t) {
110
+ function R(e, t) {
108
111
  let n = e.pinnedByEnv?.[t];
109
112
  return typeof n == "string" && n !== "" ? n : void 0;
110
113
  }
111
- var L = () => {
112
- let { navigateTo: A, getPath: j } = e(), { data: L, loading: R, error: z, refetch: B } = ee(), { uninstall: V, loading: H } = te(), { update: U, loading: ue } = h(), { pin: de } = m(), [W, fe] = v(""), [pe, G] = v(!1), [K, me] = v("all"), [q, J] = v(null), Y = _(() => {
114
+ var z = () => {
115
+ let { navigateTo: M, getPath: N } = e(), { data: z, loading: B, error: V, refetch: H } = ee(), { uninstall: U, loading: ue } = te(), { update: de, loading: fe } = _(), { pin: pe } = g(), [W, me] = b(""), [he, G] = b(!1), [K, ge] = b("all"), [q, J] = b(null), Y = y(() => {
113
116
  let e = W.trim().toLowerCase();
114
- return L.filter((t) => {
115
- let n = !e || M(t).toLowerCase().includes(e) || p(t.package).toLowerCase().includes(e), r = K === "all" || N(t) === K;
117
+ return z.filter((t) => {
118
+ let n = !e || P(t).toLowerCase().includes(e) || h(t.package).toLowerCase().includes(e), r = K === "all" || F(t) === K;
116
119
  return n && r;
117
120
  });
118
121
  }, [
119
- L,
122
+ z,
120
123
  W,
121
124
  K
122
- ]), X = _(() => L.find((e) => e.id === q) ?? null, [L, q]), he = _(() => L.filter(F).length, [L]), ge = async () => {
125
+ ]), X = y(() => z.find((e) => e.id === q) ?? null, [z, q]), _e = y(() => z.filter(L).length, [z]), ve = async () => {
123
126
  G(!0);
124
127
  try {
125
- await B();
128
+ await H();
126
129
  } finally {
127
130
  G(!1);
128
131
  }
129
132
  }, Z = async (e) => {
130
133
  if (confirm("Are you sure you want to uninstall this package?")) try {
131
- await V(e.id), O.success(`Uninstalled "${p(e.package) || M(e)}"`), J(null), B();
134
+ await U(e.id), A.success(`Uninstalled "${h(e.package) || P(e)}"`), J(null), H();
132
135
  } catch (e) {
133
- O.error(e instanceof Error ? e.message : "Failed to uninstall package");
136
+ A.error(e instanceof Error ? e.message : "Failed to uninstall package");
134
137
  }
135
- }, _e = async (e) => {
138
+ }, ye = async (e) => {
136
139
  let t = e.package?.version;
137
140
  if (t) try {
138
- await U({
141
+ await de({
139
142
  installedId: e.id,
140
143
  input: { installedVersion: t }
141
- }), O.success(`Updated to v${t}`), B();
144
+ }), A.success(`Updated to v${t}`), H();
142
145
  } catch (e) {
143
- O.error(e instanceof Error ? e.message : "Failed to update package");
146
+ A.error(e instanceof Error ? e.message : "Failed to update package");
144
147
  }
145
148
  }, Q = async (e, t, n) => {
146
149
  try {
147
- await de({
150
+ await pe({
148
151
  installedId: e.id,
149
152
  environment: t,
150
153
  version: n,
151
154
  pinnedByEnv: e.pinnedByEnv
152
- }), O.success(n ? `Pinned ${t} to v${n}` : `Unpinned ${t}`), B();
155
+ }), A.success(n ? `Pinned ${t} to v${n}` : `Unpinned ${t}`), H();
153
156
  } catch (e) {
154
- O.error(e instanceof Error ? e.message : "Failed to change version pin");
157
+ A.error(e instanceof Error ? e.message : "Failed to change version pin");
155
158
  }
156
- }, $ = (e) => e === "LINKED" ? /* @__PURE__ */ x(T, { className: "h-4 w-4 text-status-info-text" }) : /* @__PURE__ */ x(ie, { className: "h-4 w-4 text-status-warning-text" }), ve = ({ pkg: e }) => {
157
- let n = P(e), a = M(e), o = F(e), s = k.filter((t) => I(e, t));
158
- return /* @__PURE__ */ x(r, {
159
+ }, $ = (e) => e === "LINKED" ? /* @__PURE__ */ C(D, { className: "h-4 w-4 text-status-info-text" }) : /* @__PURE__ */ C(ie, { className: "h-4 w-4 text-status-warning-text" }), be = ({ pkg: e }) => {
160
+ let i = I(e), c = P(e), l = L(e), u = j.filter((t) => R(e, t));
161
+ return /* @__PURE__ */ C(o, {
159
162
  className: "hover:shadow-md transition-shadow cursor-pointer",
160
163
  onClick: () => J(e.id),
161
- children: /* @__PURE__ */ S(i, {
164
+ children: /* @__PURE__ */ w(s, {
162
165
  className: "pt-6",
163
166
  children: [
164
- /* @__PURE__ */ S("div", {
167
+ /* @__PURE__ */ w("div", {
165
168
  className: "flex items-start justify-between",
166
- children: [/* @__PURE__ */ S("div", {
169
+ children: [/* @__PURE__ */ w("div", {
167
170
  className: "flex items-start gap-3",
168
- children: [/* @__PURE__ */ x("div", {
171
+ children: [/* @__PURE__ */ C("div", {
169
172
  className: "p-2 rounded-lg bg-bg-sunken text-2xl",
170
- children: n.icon
171
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
173
+ children: i.icon
174
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
172
175
  className: "flex items-center gap-2",
173
- children: [/* @__PURE__ */ x("h3", {
176
+ children: [/* @__PURE__ */ C("h3", {
174
177
  className: "font-semibold",
175
- children: p(e.package) || a
176
- }), o && /* @__PURE__ */ S(l, {
178
+ children: h(e.package) || c
179
+ }), l && /* @__PURE__ */ w(d, {
177
180
  variant: "warning",
178
181
  className: "gap-1",
179
- children: [/* @__PURE__ */ x(C, { className: "h-3 w-3" }), "Update"]
182
+ children: [/* @__PURE__ */ C(T, { className: "h-3 w-3" }), "Update"]
180
183
  })]
181
- }), /* @__PURE__ */ x("p", {
184
+ }), /* @__PURE__ */ C("p", {
182
185
  className: "text-sm text-text-secondary font-mono",
183
- children: a
186
+ children: c
184
187
  })] })]
185
- }), /* @__PURE__ */ S("div", {
188
+ }), /* @__PURE__ */ w("div", {
186
189
  className: "flex items-center gap-2",
187
- children: [$(e.mode), /* @__PURE__ */ x(l, {
190
+ children: [$(e.mode), /* @__PURE__ */ C(d, {
188
191
  variant: "outline",
189
- children: n.label
192
+ children: i.label
190
193
  })]
191
194
  })]
192
195
  }),
193
- /* @__PURE__ */ S("div", {
196
+ /* @__PURE__ */ w("div", {
194
197
  className: "mt-4 grid grid-cols-3 gap-4 text-sm",
195
198
  children: [
196
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
199
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
197
200
  className: "text-text-secondary",
198
201
  children: "Installed Version"
199
- }), /* @__PURE__ */ S("p", {
202
+ }), /* @__PURE__ */ w("p", {
200
203
  className: "font-medium font-mono",
201
204
  children: ["v", e.installedVersion]
202
205
  })] }),
203
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
206
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
204
207
  className: "text-text-secondary",
205
208
  children: "Mode"
206
- }), /* @__PURE__ */ S("p", {
209
+ }), /* @__PURE__ */ w("p", {
207
210
  className: "font-medium flex items-center gap-1",
208
211
  children: [$(e.mode), e.mode]
209
212
  })] }),
210
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
213
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
211
214
  className: "text-text-secondary",
212
215
  children: "Installed"
213
- }), /* @__PURE__ */ x("p", {
216
+ }), /* @__PURE__ */ C("p", {
214
217
  className: "font-medium",
215
218
  children: t(e.installedAt)
216
219
  })] })
217
220
  ]
218
221
  }),
219
- s.length > 0 && /* @__PURE__ */ S("div", {
222
+ u.length > 0 && /* @__PURE__ */ w("div", {
220
223
  className: "mt-4 pt-4 border-t border-border-subtle",
221
- children: [/* @__PURE__ */ x("p", {
224
+ children: [/* @__PURE__ */ C("p", {
222
225
  className: "text-xs text-text-secondary mb-2",
223
226
  children: "Pinned Versions"
224
- }), /* @__PURE__ */ x("div", {
227
+ }), /* @__PURE__ */ C("div", {
225
228
  className: "flex gap-2",
226
- children: k.map((t) => {
227
- let n = I(e, t);
228
- return /* @__PURE__ */ S(l, {
229
+ children: j.map((t) => {
230
+ let n = R(e, t);
231
+ return /* @__PURE__ */ w(d, {
229
232
  variant: n ? "default" : "outline",
230
233
  className: "text-xs",
231
234
  children: [
@@ -237,36 +240,42 @@ var L = () => {
237
240
  })
238
241
  })]
239
242
  }),
240
- /* @__PURE__ */ S("div", {
243
+ /* @__PURE__ */ w("div", {
241
244
  className: "mt-4 flex justify-end gap-2",
242
245
  children: [
243
- /* @__PURE__ */ S(c, {
246
+ /* @__PURE__ */ w(a, {
244
247
  variant: "ghost",
245
248
  size: "sm",
246
249
  onClick: (e) => {
247
- e.stopPropagation(), A(`store/package/${a}`);
250
+ e.stopPropagation(), M(`store/package/${c}`);
248
251
  },
249
- children: [/* @__PURE__ */ x(oe, { className: "h-4 w-4 mr-1" }), "View in Store"]
252
+ children: [/* @__PURE__ */ C(oe, { className: "h-4 w-4 mr-1" }), "View in Store"]
250
253
  }),
251
- o && /* @__PURE__ */ S(c, {
252
- variant: "outline",
253
- size: "sm",
254
- onClick: (t) => {
255
- t.stopPropagation(), _e(e);
256
- },
257
- isLoading: ue,
258
- children: [/* @__PURE__ */ x(C, { className: "h-4 w-4 mr-1" }), "Update"]
254
+ l && /* @__PURE__ */ C(r, {
255
+ permission: n.STORE_UPDATE,
256
+ children: /* @__PURE__ */ w(a, {
257
+ variant: "outline",
258
+ size: "sm",
259
+ onClick: (t) => {
260
+ t.stopPropagation(), ye(e);
261
+ },
262
+ isLoading: fe,
263
+ children: [/* @__PURE__ */ C(T, { className: "h-4 w-4 mr-1" }), "Update"]
264
+ })
259
265
  }),
260
- /* @__PURE__ */ x(c, {
261
- variant: "ghost",
262
- size: "sm",
263
- "aria-label": "Uninstall package",
264
- className: "text-status-error-text hover:text-status-error-text",
265
- onClick: (t) => {
266
- t.stopPropagation(), Z(e);
267
- },
268
- isLoading: H,
269
- children: /* @__PURE__ */ x(D, { className: "h-4 w-4" })
266
+ /* @__PURE__ */ C(r, {
267
+ permission: n.STORE_DELETE,
268
+ children: /* @__PURE__ */ C(a, {
269
+ variant: "ghost",
270
+ size: "sm",
271
+ "aria-label": "Uninstall package",
272
+ className: "text-status-error-text hover:text-status-error-text",
273
+ onClick: (t) => {
274
+ t.stopPropagation(), Z(e);
275
+ },
276
+ isLoading: ue,
277
+ children: /* @__PURE__ */ C(k, { className: "h-4 w-4" })
278
+ })
270
279
  })
271
280
  ]
272
281
  })
@@ -274,307 +283,313 @@ var L = () => {
274
283
  })
275
284
  });
276
285
  };
277
- return R ? /* @__PURE__ */ x(n, {
286
+ return B ? /* @__PURE__ */ C(i, {
278
287
  title: "Installed Packages",
279
288
  description: "Manage installed store packages",
280
- children: /* @__PURE__ */ x("div", {
289
+ children: /* @__PURE__ */ C("div", {
281
290
  className: "space-y-4",
282
291
  children: [
283
292
  1,
284
293
  2,
285
294
  3
286
- ].map((e) => /* @__PURE__ */ x("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
295
+ ].map((e) => /* @__PURE__ */ C("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
287
296
  })
288
- }) : /* @__PURE__ */ S(n, {
297
+ }) : /* @__PURE__ */ w(i, {
289
298
  title: "Installed Packages",
290
299
  description: "Manage packages installed from the BotManor Store",
291
- actions: /* @__PURE__ */ S("div", {
300
+ actions: /* @__PURE__ */ w("div", {
292
301
  className: "flex gap-2",
293
- children: [/* @__PURE__ */ x(c, {
302
+ children: [/* @__PURE__ */ C(a, {
294
303
  variant: "outline",
295
- leftIcon: /* @__PURE__ */ x(se, { size: 16 }),
296
- onClick: () => void ge(),
297
- isLoading: pe,
304
+ leftIcon: /* @__PURE__ */ C(se, { size: 16 }),
305
+ onClick: () => void ve(),
306
+ isLoading: he,
298
307
  children: "Check Updates"
299
- }), /* @__PURE__ */ x(c, {
300
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
301
- onClick: () => A("store"),
308
+ }), /* @__PURE__ */ C(a, {
309
+ leftIcon: /* @__PURE__ */ C(O, { size: 16 }),
310
+ onClick: () => M("store"),
302
311
  children: "Browse Store"
303
312
  })]
304
313
  }),
305
314
  children: [
306
- /* @__PURE__ */ x(ne, {
315
+ /* @__PURE__ */ C(ne, {
307
316
  className: "mb-6",
308
- icon: /* @__PURE__ */ x(E, { size: 18 }),
317
+ icon: /* @__PURE__ */ C(O, { size: 18 }),
309
318
  children: "These are the packages you have installed from the BotManor Store and how they are wired into your workspace. Manage each one’s installation mode (linked, so it auto-updates, or forked as an independent copy), pin specific versions per environment, and update or uninstall — this is your dependency manager for everything you pulled from the store."
310
319
  }),
311
- z ? /* @__PURE__ */ x(f, {
320
+ V ? /* @__PURE__ */ C(m, {
312
321
  resource: "installed packages",
313
- error: z,
314
- onRetry: () => void B()
315
- }) : /* @__PURE__ */ S(b, { children: [
316
- /* @__PURE__ */ S("div", {
322
+ error: V,
323
+ onRetry: () => void H()
324
+ }) : /* @__PURE__ */ w(S, { children: [
325
+ /* @__PURE__ */ w("div", {
317
326
  className: "grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",
318
327
  children: [
319
- /* @__PURE__ */ S(y, {
328
+ /* @__PURE__ */ w(x, {
320
329
  treatment: "glass",
321
330
  glow: !0,
322
331
  className: "p-6 text-center",
323
- children: [/* @__PURE__ */ x("p", {
332
+ children: [/* @__PURE__ */ C("p", {
324
333
  className: "text-3xl font-bold tabular-nums text-text-primary",
325
- children: L.length
326
- }), /* @__PURE__ */ x("p", {
334
+ children: z.length
335
+ }), /* @__PURE__ */ C("p", {
327
336
  className: "text-sm text-text-secondary",
328
337
  children: "Total Installed"
329
338
  })]
330
339
  }),
331
- /* @__PURE__ */ S(y, {
340
+ /* @__PURE__ */ w(x, {
332
341
  treatment: "metric",
333
342
  className: "p-6 text-center",
334
- children: [/* @__PURE__ */ x("p", {
343
+ children: [/* @__PURE__ */ C("p", {
335
344
  className: "text-3xl font-bold tabular-nums text-text-primary",
336
- children: L.filter((e) => e.mode === "LINKED").length
337
- }), /* @__PURE__ */ x("p", {
345
+ children: z.filter((e) => e.mode === "LINKED").length
346
+ }), /* @__PURE__ */ C("p", {
338
347
  className: "text-sm text-text-secondary",
339
348
  children: "Linked"
340
349
  })]
341
350
  }),
342
- /* @__PURE__ */ S(y, {
351
+ /* @__PURE__ */ w(x, {
343
352
  treatment: "metric",
344
353
  className: "p-6 text-center",
345
- children: [/* @__PURE__ */ x("p", {
354
+ children: [/* @__PURE__ */ C("p", {
346
355
  className: "text-3xl font-bold tabular-nums text-text-primary",
347
- children: L.filter((e) => e.mode === "FORKED").length
348
- }), /* @__PURE__ */ x("p", {
356
+ children: z.filter((e) => e.mode === "FORKED").length
357
+ }), /* @__PURE__ */ C("p", {
349
358
  className: "text-sm text-text-secondary",
350
359
  children: "Forked"
351
360
  })]
352
361
  }),
353
- /* @__PURE__ */ S(y, {
362
+ /* @__PURE__ */ w(x, {
354
363
  treatment: "metric",
355
364
  className: "p-6 text-center",
356
- children: [/* @__PURE__ */ x("p", {
365
+ children: [/* @__PURE__ */ C("p", {
357
366
  className: "text-3xl font-bold tabular-nums text-text-primary",
358
- children: he
359
- }), /* @__PURE__ */ x("p", {
367
+ children: _e
368
+ }), /* @__PURE__ */ C("p", {
360
369
  className: "text-sm text-text-secondary",
361
370
  children: "Updates Available"
362
371
  })]
363
372
  })
364
373
  ]
365
374
  }),
366
- /* @__PURE__ */ S("div", {
375
+ /* @__PURE__ */ w("div", {
367
376
  className: "flex flex-col md:flex-row gap-4 mb-6",
368
- children: [/* @__PURE__ */ S("div", {
377
+ children: [/* @__PURE__ */ w("div", {
369
378
  className: "relative flex-1",
370
- children: [/* @__PURE__ */ x(ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x(d, {
379
+ children: [/* @__PURE__ */ C(ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C(p, {
371
380
  placeholder: "Search packages...",
372
381
  value: W,
373
- onChange: (e) => fe(e.target.value),
382
+ onChange: (e) => me(e.target.value),
374
383
  className: "pl-9"
375
384
  })]
376
- }), /* @__PURE__ */ x("div", {
385
+ }), /* @__PURE__ */ C("div", {
377
386
  className: "flex gap-2",
378
- children: /* @__PURE__ */ S("select", {
387
+ children: /* @__PURE__ */ w("select", {
379
388
  "aria-label": "Filter by package type",
380
389
  className: "flex h-10 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
381
390
  value: K,
382
- onChange: (e) => me(e.target.value),
391
+ onChange: (e) => ge(e.target.value),
383
392
  children: [
384
- /* @__PURE__ */ x("option", {
393
+ /* @__PURE__ */ C("option", {
385
394
  value: "all",
386
395
  children: "All Types"
387
396
  }),
388
- /* @__PURE__ */ x("option", {
389
- value: g.Agent,
397
+ /* @__PURE__ */ C("option", {
398
+ value: v.Agent,
390
399
  children: "Agents"
391
400
  }),
392
- /* @__PURE__ */ x("option", {
393
- value: g.Skill,
401
+ /* @__PURE__ */ C("option", {
402
+ value: v.Skill,
394
403
  children: "Skills"
395
404
  }),
396
- /* @__PURE__ */ x("option", {
397
- value: g.McpPack,
405
+ /* @__PURE__ */ C("option", {
406
+ value: v.McpPack,
398
407
  children: "MCP Packs"
399
408
  }),
400
- /* @__PURE__ */ x("option", {
401
- value: g.PromptTemplate,
409
+ /* @__PURE__ */ C("option", {
410
+ value: v.PromptTemplate,
402
411
  children: "Templates"
403
412
  }),
404
- /* @__PURE__ */ x("option", {
405
- value: g.RetrievalProfile,
413
+ /* @__PURE__ */ C("option", {
414
+ value: v.RetrievalProfile,
406
415
  children: "Retrieval Profiles"
407
416
  })
408
417
  ]
409
418
  })
410
419
  })]
411
420
  }),
412
- Y.length > 0 ? /* @__PURE__ */ x("div", {
421
+ Y.length > 0 ? /* @__PURE__ */ C("div", {
413
422
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
414
- children: Y.map((e) => /* @__PURE__ */ x(ve, { pkg: e }, e.id))
415
- }) : /* @__PURE__ */ x(u, {
423
+ children: Y.map((e) => /* @__PURE__ */ C(be, { pkg: e }, e.id))
424
+ }) : /* @__PURE__ */ C(f, {
416
425
  illustration: "empty-generic",
417
426
  title: W || K !== "all" ? "No matching packages" : "No packages installed",
418
427
  description: W || K !== "all" ? "Try adjusting your search or type filter." : "Browse the BotManor Store to find agents, skills, and tools to install.",
419
- action: /* @__PURE__ */ x(c, {
420
- onClick: () => A("store"),
421
- leftIcon: /* @__PURE__ */ x(ae, { className: "h-4 w-4" }),
428
+ action: /* @__PURE__ */ C(a, {
429
+ onClick: () => M("store"),
430
+ leftIcon: /* @__PURE__ */ C(ae, { className: "h-4 w-4" }),
422
431
  children: "Browse Store"
423
432
  })
424
433
  })
425
434
  ] }),
426
- X && /* @__PURE__ */ x(({ pkg: e, onClose: n }) => {
427
- let l = P(e), u = M(e), d = e.bindings ?? {};
428
- return /* @__PURE__ */ x("div", {
435
+ X && /* @__PURE__ */ C(({ pkg: e, onClose: i }) => {
436
+ let d = I(e), f = P(e), p = e.bindings ?? {};
437
+ return /* @__PURE__ */ C("div", {
429
438
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
430
- children: /* @__PURE__ */ S("div", {
439
+ children: /* @__PURE__ */ w("div", {
431
440
  className: "bg-bg-surface rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto",
432
441
  children: [
433
- /* @__PURE__ */ x("div", {
442
+ /* @__PURE__ */ C("div", {
434
443
  className: "p-6 border-b border-border-subtle",
435
- children: /* @__PURE__ */ S("div", {
444
+ children: /* @__PURE__ */ w("div", {
436
445
  className: "flex items-start justify-between",
437
- children: [/* @__PURE__ */ S("div", {
446
+ children: [/* @__PURE__ */ w("div", {
438
447
  className: "flex items-start gap-3",
439
- children: [/* @__PURE__ */ x("div", {
448
+ children: [/* @__PURE__ */ C("div", {
440
449
  className: "p-3 rounded-lg bg-bg-sunken text-3xl",
441
- children: l.icon
442
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
450
+ children: d.icon
451
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h2", {
443
452
  className: "text-xl font-bold",
444
- children: p(e.package) || u
445
- }), /* @__PURE__ */ x("p", {
453
+ children: h(e.package) || f
454
+ }), /* @__PURE__ */ C("p", {
446
455
  className: "text-sm text-text-secondary font-mono",
447
- children: u
456
+ children: f
448
457
  })] })]
449
- }), /* @__PURE__ */ x(c, {
458
+ }), /* @__PURE__ */ C(a, {
450
459
  variant: "ghost",
451
460
  size: "sm",
452
461
  "aria-label": "Close",
453
- onClick: n,
462
+ onClick: i,
454
463
  children: "×"
455
464
  })]
456
465
  })
457
466
  }),
458
- /* @__PURE__ */ S("div", {
467
+ /* @__PURE__ */ w("div", {
459
468
  className: "p-6 space-y-6",
460
469
  children: [
461
- /* @__PURE__ */ S(r, { children: [/* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(s, {
470
+ /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(l, { children: /* @__PURE__ */ C(u, {
462
471
  className: "text-base",
463
472
  children: "Version Information"
464
- }) }), /* @__PURE__ */ S(i, {
473
+ }) }), /* @__PURE__ */ w(s, {
465
474
  className: "space-y-4",
466
- children: [/* @__PURE__ */ S("div", {
475
+ children: [/* @__PURE__ */ w("div", {
467
476
  className: "grid grid-cols-2 gap-4",
468
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
477
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
469
478
  className: "text-sm text-text-secondary",
470
479
  children: "Installed Version"
471
- }), /* @__PURE__ */ S("p", {
480
+ }), /* @__PURE__ */ w("p", {
472
481
  className: "font-mono font-medium",
473
482
  children: ["v", e.installedVersion]
474
- })] }), e.package && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
483
+ })] }), e.package && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
475
484
  className: "text-sm text-text-secondary",
476
485
  children: "Latest Version"
477
- }), /* @__PURE__ */ S("p", {
486
+ }), /* @__PURE__ */ w("p", {
478
487
  className: "font-mono font-medium",
479
488
  children: ["v", e.package.version]
480
489
  })] })]
481
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
490
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
482
491
  className: "text-sm text-text-secondary mb-2",
483
492
  children: "Installation Mode"
484
- }), /* @__PURE__ */ S("div", {
493
+ }), /* @__PURE__ */ w("div", {
485
494
  className: "flex items-center gap-2",
486
495
  children: [
487
496
  $(e.mode),
488
- /* @__PURE__ */ x("span", {
497
+ /* @__PURE__ */ C("span", {
489
498
  className: "font-medium",
490
499
  children: e.mode
491
500
  }),
492
- /* @__PURE__ */ x("span", {
501
+ /* @__PURE__ */ C("span", {
493
502
  className: "text-sm text-text-secondary",
494
503
  children: e.mode === "LINKED" ? "- Receives updates automatically" : "- Independent copy, no auto-updates"
495
504
  })
496
505
  ]
497
506
  })] })]
498
507
  })] }),
499
- /* @__PURE__ */ S(r, { children: [/* @__PURE__ */ S(o, { children: [/* @__PURE__ */ S(s, {
508
+ /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ w(l, { children: [/* @__PURE__ */ w(u, {
500
509
  className: "text-base flex items-center gap-2",
501
- children: [/* @__PURE__ */ x(w, { className: "h-4 w-4" }), "Environment Version Pins"]
502
- }), /* @__PURE__ */ x(a, { children: "Pin specific versions for each environment" })] }), /* @__PURE__ */ x(i, { children: /* @__PURE__ */ x("div", {
510
+ children: [/* @__PURE__ */ C(E, { className: "h-4 w-4" }), "Environment Version Pins"]
511
+ }), /* @__PURE__ */ C(c, { children: "Pin specific versions for each environment" })] }), /* @__PURE__ */ C(s, { children: /* @__PURE__ */ C("div", {
503
512
  className: "space-y-3",
504
- children: k.map((t) => {
505
- let n = I(e, t);
506
- return /* @__PURE__ */ S("div", {
513
+ children: j.map((t) => {
514
+ let i = R(e, t);
515
+ return /* @__PURE__ */ w("div", {
507
516
  className: "flex items-center justify-between p-3 bg-bg-sunken rounded-lg",
508
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
517
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
509
518
  className: "font-medium",
510
519
  children: t
511
- }), /* @__PURE__ */ x("p", {
520
+ }), /* @__PURE__ */ C("p", {
512
521
  className: "text-sm text-text-secondary font-mono",
513
- children: n ? `v${n}` : "Using latest"
514
- })] }), /* @__PURE__ */ x("div", {
522
+ children: i ? `v${i}` : "Using latest"
523
+ })] }), /* @__PURE__ */ C("div", {
515
524
  className: "flex gap-2",
516
- children: n ? /* @__PURE__ */ x(c, {
517
- variant: "outline",
518
- size: "sm",
519
- onClick: () => void Q(e, t, ""),
520
- children: "Unpin"
521
- }) : /* @__PURE__ */ x(c, {
522
- variant: "outline",
523
- size: "sm",
524
- onClick: () => void Q(e, t, e.installedVersion),
525
- children: "Pin Current"
525
+ children: i ? /* @__PURE__ */ C(r, {
526
+ permission: n.STORE_UPDATE,
527
+ children: /* @__PURE__ */ C(a, {
528
+ variant: "outline",
529
+ size: "sm",
530
+ onClick: () => void Q(e, t, ""),
531
+ children: "Unpin"
532
+ })
533
+ }) : /* @__PURE__ */ C(r, {
534
+ permission: n.STORE_UPDATE,
535
+ children: /* @__PURE__ */ C(a, {
536
+ variant: "outline",
537
+ size: "sm",
538
+ onClick: () => void Q(e, t, e.installedVersion),
539
+ children: "Pin Current"
540
+ })
526
541
  })
527
542
  })]
528
543
  }, t);
529
544
  })
530
545
  }) })] }),
531
- Object.keys(d).length > 0 && /* @__PURE__ */ S(r, { children: [/* @__PURE__ */ x(o, { children: /* @__PURE__ */ S(s, {
546
+ Object.keys(p).length > 0 && /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(l, { children: /* @__PURE__ */ w(u, {
532
547
  className: "text-base flex items-center gap-2",
533
- children: [/* @__PURE__ */ x(le, { className: "h-4 w-4" }), "Configuration Bindings"]
534
- }) }), /* @__PURE__ */ x(i, { children: /* @__PURE__ */ x("div", {
548
+ children: [/* @__PURE__ */ C(le, { className: "h-4 w-4" }), "Configuration Bindings"]
549
+ }) }), /* @__PURE__ */ C(s, { children: /* @__PURE__ */ C("div", {
535
550
  className: "space-y-2",
536
- children: Object.entries(d).map(([e, t]) => /* @__PURE__ */ S("div", {
551
+ children: Object.entries(p).map(([e, t]) => /* @__PURE__ */ w("div", {
537
552
  className: "flex justify-between p-2 bg-bg-sunken rounded",
538
- children: [/* @__PURE__ */ x("span", {
553
+ children: [/* @__PURE__ */ C("span", {
539
554
  className: "font-mono text-sm",
540
555
  children: e
541
- }), /* @__PURE__ */ x("span", {
556
+ }), /* @__PURE__ */ C("span", {
542
557
  className: "font-mono text-sm text-text-secondary",
543
558
  children: typeof t == "string" ? t : JSON.stringify(t)
544
559
  })]
545
560
  }, e))
546
561
  }) })] }),
547
- /* @__PURE__ */ S(r, { children: [/* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(s, {
562
+ /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(l, { children: /* @__PURE__ */ C(u, {
548
563
  className: "text-base",
549
564
  children: "Metadata"
550
- }) }), /* @__PURE__ */ x(i, { children: /* @__PURE__ */ S("div", {
565
+ }) }), /* @__PURE__ */ C(s, { children: /* @__PURE__ */ w("div", {
551
566
  className: "grid grid-cols-2 gap-4 text-sm",
552
567
  children: [
553
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
568
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
554
569
  className: "text-text-secondary",
555
570
  children: "Installed At"
556
- }), /* @__PURE__ */ x("p", {
571
+ }), /* @__PURE__ */ C("p", {
557
572
  className: "font-medium",
558
573
  children: t(e.installedAt)
559
574
  })] }),
560
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
575
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
561
576
  className: "text-text-secondary",
562
577
  children: "Installed By"
563
- }), /* @__PURE__ */ x("p", {
578
+ }), /* @__PURE__ */ C("p", {
564
579
  className: "font-medium",
565
580
  children: e.installedBy
566
581
  })] }),
567
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
582
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
568
583
  className: "text-text-secondary",
569
584
  children: "Package ID"
570
- }), /* @__PURE__ */ x("p", {
585
+ }), /* @__PURE__ */ C("p", {
571
586
  className: "font-mono text-xs",
572
587
  children: e.packageId
573
588
  })] }),
574
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
589
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
575
590
  className: "text-text-secondary",
576
591
  children: "Installation ID"
577
- }), /* @__PURE__ */ x("p", {
592
+ }), /* @__PURE__ */ C("p", {
578
593
  className: "font-mono text-xs",
579
594
  children: e.id
580
595
  })] })
@@ -582,23 +597,26 @@ var L = () => {
582
597
  }) })] })
583
598
  ]
584
599
  }),
585
- /* @__PURE__ */ S("div", {
600
+ /* @__PURE__ */ w("div", {
586
601
  className: "p-6 border-t border-border-subtle flex justify-between",
587
- children: [/* @__PURE__ */ S(c, {
588
- variant: "destructive",
589
- onClick: () => void Z(e),
590
- children: [/* @__PURE__ */ x(D, { className: "h-4 w-4 mr-2" }), "Uninstall"]
591
- }), /* @__PURE__ */ S("div", {
602
+ children: [/* @__PURE__ */ C(r, {
603
+ permission: n.STORE_DELETE,
604
+ children: /* @__PURE__ */ w(a, {
605
+ variant: "destructive",
606
+ onClick: () => void Z(e),
607
+ children: [/* @__PURE__ */ C(k, { className: "h-4 w-4 mr-2" }), "Uninstall"]
608
+ })
609
+ }), /* @__PURE__ */ w("div", {
592
610
  className: "flex gap-2",
593
- children: [/* @__PURE__ */ x(re, {
594
- to: j(`store/package/${u}`),
595
- children: /* @__PURE__ */ x(c, {
611
+ children: [/* @__PURE__ */ C(re, {
612
+ to: N(`store/package/${f}`),
613
+ children: /* @__PURE__ */ C(a, {
596
614
  variant: "outline",
597
615
  children: "View in Store"
598
616
  })
599
- }), /* @__PURE__ */ x(c, {
617
+ }), /* @__PURE__ */ C(a, {
600
618
  variant: "outline",
601
- onClick: n,
619
+ onClick: i,
602
620
  children: "Close"
603
621
  })]
604
622
  })]
@@ -614,6 +632,6 @@ var L = () => {
614
632
  });
615
633
  };
616
634
  //#endregion
617
- export { L as InstalledPackagesPage };
635
+ export { z as InstalledPackagesPage };
618
636
 
619
637
  //# sourceMappingURL=InstalledPackagesPage.js.map