@burdenoff/microfe-botmanor 2026.813.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 (160) hide show
  1. package/README.md +12 -0
  2. package/dist/botlit/BotlitRoutes.js +357 -0
  3. package/dist/botlit/BotlitRoutes.js.map +1 -0
  4. package/dist/botlit/BotmanorRoot.js +12 -0
  5. package/dist/botlit/BotmanorRoot.js.map +1 -0
  6. package/dist/botlit/BotmanorRootInner.js +101 -0
  7. package/dist/botlit/BotmanorRootInner.js.map +1 -0
  8. package/dist/botlit/components/Badge.js +39 -0
  9. package/dist/botlit/components/Badge.js.map +1 -0
  10. package/dist/botlit/components/Button.js +46 -0
  11. package/dist/botlit/components/Button.js.map +1 -0
  12. package/dist/botlit/components/Card.js +31 -0
  13. package/dist/botlit/components/Card.js.map +1 -0
  14. package/dist/botlit/components/ChannelSelectorSheet.js +130 -0
  15. package/dist/botlit/components/ChannelSelectorSheet.js.map +1 -0
  16. package/dist/botlit/components/EmptyState.js +35 -0
  17. package/dist/botlit/components/EmptyState.js.map +1 -0
  18. package/dist/botlit/components/ErrorState.js +33 -0
  19. package/dist/botlit/components/ErrorState.js.map +1 -0
  20. package/dist/botlit/components/Input.js +59 -0
  21. package/dist/botlit/components/Input.js.map +1 -0
  22. package/dist/botlit/components/PageLayout.js +34 -0
  23. package/dist/botlit/components/PageLayout.js.map +1 -0
  24. package/dist/botlit/components/QuotaExhaustedDialog.js +20 -0
  25. package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -0
  26. package/dist/botlit/components/RouteLoader.js +52 -0
  27. package/dist/botlit/components/RouteLoader.js.map +1 -0
  28. package/dist/botlit/components/VersionHistoryPanel.js +144 -0
  29. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -0
  30. package/dist/botlit/components/WorkspaceRequired.js +70 -0
  31. package/dist/botlit/components/WorkspaceRequired.js.map +1 -0
  32. package/dist/botlit/hooks/index.js +16 -0
  33. package/dist/botlit/hooks/internal/mutationInput.js +16 -0
  34. package/dist/botlit/hooks/internal/mutationInput.js.map +1 -0
  35. package/dist/botlit/hooks/internal/workspaceGateway.js +99 -0
  36. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -0
  37. package/dist/botlit/hooks/useA2A.js +184 -0
  38. package/dist/botlit/hooks/useA2A.js.map +1 -0
  39. package/dist/botlit/hooks/useAgents.js +469 -0
  40. package/dist/botlit/hooks/useAgents.js.map +1 -0
  41. package/dist/botlit/hooks/useBots.js +306 -0
  42. package/dist/botlit/hooks/useBots.js.map +1 -0
  43. package/dist/botlit/hooks/useBuckets.js +119 -0
  44. package/dist/botlit/hooks/useBuckets.js.map +1 -0
  45. package/dist/botlit/hooks/useChannels.js +213 -0
  46. package/dist/botlit/hooks/useChannels.js.map +1 -0
  47. package/dist/botlit/hooks/useConversations.js +64 -0
  48. package/dist/botlit/hooks/useConversations.js.map +1 -0
  49. package/dist/botlit/hooks/useExecutions.js +86 -0
  50. package/dist/botlit/hooks/useExecutions.js.map +1 -0
  51. package/dist/botlit/hooks/useKnowledgeBases.js +113 -0
  52. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -0
  53. package/dist/botlit/hooks/useLLMProviders.js +83 -0
  54. package/dist/botlit/hooks/useLLMProviders.js.map +1 -0
  55. package/dist/botlit/hooks/useMCPServers.js +134 -0
  56. package/dist/botlit/hooks/useMCPServers.js.map +1 -0
  57. package/dist/botlit/hooks/usePolicies.js +120 -0
  58. package/dist/botlit/hooks/usePolicies.js.map +1 -0
  59. package/dist/botlit/hooks/usePromptTemplates.js +161 -0
  60. package/dist/botlit/hooks/usePromptTemplates.js.map +1 -0
  61. package/dist/botlit/hooks/useRetrievalProfiles.js +146 -0
  62. package/dist/botlit/hooks/useRetrievalProfiles.js.map +1 -0
  63. package/dist/botlit/hooks/useSkills.js +132 -0
  64. package/dist/botlit/hooks/useSkills.js.map +1 -0
  65. package/dist/botlit/hooks/useStore.js +167 -0
  66. package/dist/botlit/hooks/useStore.js.map +1 -0
  67. package/dist/botlit/hooks/useUserPlatformConnection.js +172 -0
  68. package/dist/botlit/hooks/useUserPlatformConnection.js.map +1 -0
  69. package/dist/botlit/index.js +11 -0
  70. package/dist/botlit/pages/A2AAgentDetailPage.js +589 -0
  71. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -0
  72. package/dist/botlit/pages/A2ARegistryPage.js +240 -0
  73. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -0
  74. package/dist/botlit/pages/AgentBuilderPage.js +486 -0
  75. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -0
  76. package/dist/botlit/pages/AgentDetailPage.js +517 -0
  77. package/dist/botlit/pages/AgentDetailPage.js.map +1 -0
  78. package/dist/botlit/pages/AgentsListPage.js +294 -0
  79. package/dist/botlit/pages/AgentsListPage.js.map +1 -0
  80. package/dist/botlit/pages/BotChannelsTab.js +530 -0
  81. package/dist/botlit/pages/BotChannelsTab.js.map +1 -0
  82. package/dist/botlit/pages/BotDetailPage.js +872 -0
  83. package/dist/botlit/pages/BotDetailPage.js.map +1 -0
  84. package/dist/botlit/pages/BotWorkflowTab.js +229 -0
  85. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -0
  86. package/dist/botlit/pages/BotsListPage.js +313 -0
  87. package/dist/botlit/pages/BotsListPage.js.map +1 -0
  88. package/dist/botlit/pages/BucketsPage.js +604 -0
  89. package/dist/botlit/pages/BucketsPage.js.map +1 -0
  90. package/dist/botlit/pages/ChannelDetailPage.js +955 -0
  91. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -0
  92. package/dist/botlit/pages/ChannelRoutesPage.js +218 -0
  93. package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -0
  94. package/dist/botlit/pages/ChannelsPage.js +304 -0
  95. package/dist/botlit/pages/ChannelsPage.js.map +1 -0
  96. package/dist/botlit/pages/ChatPage.js +247 -0
  97. package/dist/botlit/pages/ChatPage.js.map +1 -0
  98. package/dist/botlit/pages/DashboardPage.js +318 -0
  99. package/dist/botlit/pages/DashboardPage.js.map +1 -0
  100. package/dist/botlit/pages/ExecutionDetailPage.js +313 -0
  101. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -0
  102. package/dist/botlit/pages/ExecutionsPage.js +294 -0
  103. package/dist/botlit/pages/ExecutionsPage.js.map +1 -0
  104. package/dist/botlit/pages/InstalledPackagesPage.js +619 -0
  105. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -0
  106. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +473 -0
  107. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -0
  108. package/dist/botlit/pages/KnowledgeBasesPage.js +150 -0
  109. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -0
  110. package/dist/botlit/pages/MCPServerDetailPage.js +550 -0
  111. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -0
  112. package/dist/botlit/pages/MCPServersPage.js +321 -0
  113. package/dist/botlit/pages/MCPServersPage.js.map +1 -0
  114. package/dist/botlit/pages/PoliciesPage.js +224 -0
  115. package/dist/botlit/pages/PoliciesPage.js.map +1 -0
  116. package/dist/botlit/pages/PolicyDetailPage.js +861 -0
  117. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -0
  118. package/dist/botlit/pages/PromptStudioPage.js +236 -0
  119. package/dist/botlit/pages/PromptStudioPage.js.map +1 -0
  120. package/dist/botlit/pages/PromptTemplateDetailPage.js +812 -0
  121. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -0
  122. package/dist/botlit/pages/PromptTemplatesPage.js +269 -0
  123. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -0
  124. package/dist/botlit/pages/RetrievalProfileDetailPage.js +559 -0
  125. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -0
  126. package/dist/botlit/pages/RetrievalProfilesPage.js +219 -0
  127. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -0
  128. package/dist/botlit/pages/SettingsPage.js +655 -0
  129. package/dist/botlit/pages/SettingsPage.js.map +1 -0
  130. package/dist/botlit/pages/SkillDetailPage.js +778 -0
  131. package/dist/botlit/pages/SkillDetailPage.js.map +1 -0
  132. package/dist/botlit/pages/SkillsPage.js +206 -0
  133. package/dist/botlit/pages/SkillsPage.js.map +1 -0
  134. package/dist/botlit/pages/StorePackageDetailPage.js +462 -0
  135. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -0
  136. package/dist/botlit/pages/StorePage.js +315 -0
  137. package/dist/botlit/pages/StorePage.js.map +1 -0
  138. package/dist/botlit/providers/BotlitProvider.js +93 -0
  139. package/dist/botlit/providers/BotlitProvider.js.map +1 -0
  140. package/dist/botlit/store/botlitStore.js +101 -0
  141. package/dist/botlit/store/botlitStore.js.map +1 -0
  142. package/dist/botlit/utils/cn.js +10 -0
  143. package/dist/botlit/utils/cn.js.map +1 -0
  144. package/dist/botlit/utils/formatters.js +37 -0
  145. package/dist/botlit/utils/formatters.js.map +1 -0
  146. package/dist/botlit/utils/navigation.js +9 -0
  147. package/dist/botlit/utils/navigation.js.map +1 -0
  148. package/dist/botlit/utils/unions.js +14 -0
  149. package/dist/botlit/utils/unions.js.map +1 -0
  150. package/dist/generated/global-operations.js +66 -0
  151. package/dist/generated/global-operations.js.map +1 -0
  152. package/dist/generated/global-types.js +8 -0
  153. package/dist/generated/global-types.js.map +1 -0
  154. package/dist/generated/wspace-operations.js +1591 -0
  155. package/dist/generated/wspace-operations.js.map +1 -0
  156. package/dist/generated/wspace-types.js +12 -0
  157. package/dist/generated/wspace-types.js.map +1 -0
  158. package/dist/index.js +13 -0
  159. package/dist/utils/nativeBridge.js +2 -0
  160. package/package.json +133 -0
@@ -0,0 +1,604 @@
1
+ import { useBotlit as e } from "../providers/BotlitProvider.js";
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 { isNative as l, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
7
+ import { EmptyState as f } from "../components/EmptyState.js";
8
+ import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
9
+ import { ErrorState as g } from "../components/ErrorState.js";
10
+ import { useBucketTree as ee, useBuckets as te, useCreateBucket as ne, useDeleteBucket as re, useUpdateBucket as ie } from "../hooks/useBuckets.js";
11
+ import "../hooks/index.js";
12
+ import { useState as _ } from "react";
13
+ import { GlassCard as v, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
14
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ import { Link as S } from "react-router";
16
+ import { ChevronDown as C, ChevronRight as w, Edit as T, Folder as E, FolderOpen as D, FolderTree as O, MoreHorizontal as k, Plus as A, Save as j, Search as oe, Settings as se, Trash2 as M, X as N } from "lucide-react";
17
+ import { toast as P } from "sonner";
18
+ //#region src/botlit/pages/BucketsPage.tsx
19
+ var F = ({ bucket: e, level: t, expanded: n, onToggle: r, getPath: i, onEdit: a, onDelete: o, onCreateChild: s, activeMenu: l, setActiveMenu: u }) => {
20
+ let d = n.has(e.id), f = e.children.length > 0, p = l === e.id;
21
+ return /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(S, {
22
+ to: i(`buckets/${e.id}`),
23
+ children: /* @__PURE__ */ x("div", {
24
+ className: "flex items-center gap-2 px-3 py-2 hover:bg-accent rounded-md transition-colors cursor-pointer group",
25
+ style: { paddingLeft: `${t * 24 + 12}px` },
26
+ children: [
27
+ f ? /* @__PURE__ */ b("button", {
28
+ onClick: (t) => {
29
+ t.preventDefault(), r(e.id);
30
+ },
31
+ className: "p-0.5 hover:bg-bg-sunken rounded",
32
+ children: b(d ? C : w, {
33
+ size: 16,
34
+ className: "text-text-secondary"
35
+ })
36
+ }) : /* @__PURE__ */ b("div", { className: "w-5" }),
37
+ d ? /* @__PURE__ */ b(D, {
38
+ size: 18,
39
+ className: "text-primary"
40
+ }) : /* @__PURE__ */ b(E, {
41
+ size: 18,
42
+ className: "text-text-secondary"
43
+ }),
44
+ /* @__PURE__ */ b("span", {
45
+ className: "flex-1 font-medium",
46
+ children: e.name
47
+ }),
48
+ /* @__PURE__ */ x("div", {
49
+ className: "relative",
50
+ children: [/* @__PURE__ */ b(c, {
51
+ variant: "ghost",
52
+ size: "icon",
53
+ className: "h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",
54
+ onClick: (t) => {
55
+ t.preventDefault(), t.stopPropagation(), u(p ? null : e.id);
56
+ },
57
+ children: /* @__PURE__ */ b(k, { size: 14 })
58
+ }), p && /* @__PURE__ */ x("div", {
59
+ className: "absolute right-0 top-8 bg-popover border rounded-md shadow-lg z-50 py-1 min-w-[160px]",
60
+ children: [
61
+ /* @__PURE__ */ x("button", {
62
+ className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-left",
63
+ onClick: (t) => {
64
+ t.preventDefault(), t.stopPropagation(), s(e.id);
65
+ },
66
+ children: [/* @__PURE__ */ b(A, { size: 14 }), "Add Sub-Bucket"]
67
+ }),
68
+ /* @__PURE__ */ x("button", {
69
+ className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-left",
70
+ onClick: (t) => {
71
+ t.preventDefault(), t.stopPropagation(), a(e);
72
+ },
73
+ children: [/* @__PURE__ */ b(T, { size: 14 }), "Edit"]
74
+ }),
75
+ /* @__PURE__ */ x("button", {
76
+ className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-status-error-text text-left",
77
+ onClick: (t) => {
78
+ t.preventDefault(), t.stopPropagation(), o(e.id);
79
+ },
80
+ children: [/* @__PURE__ */ b(M, { size: 14 }), "Delete"]
81
+ })
82
+ ]
83
+ })]
84
+ })
85
+ ]
86
+ })
87
+ }), d && e.children.map((e) => /* @__PURE__ */ b(F, {
88
+ bucket: e,
89
+ level: t + 1,
90
+ expanded: n,
91
+ onToggle: r,
92
+ getPath: i,
93
+ onEdit: a,
94
+ onDelete: o,
95
+ onCreateChild: s,
96
+ activeMenu: l,
97
+ setActiveMenu: u
98
+ }, e.id))] });
99
+ }, I = () => {
100
+ let { getPath: C } = e(), [w, T] = _(""), [D, k] = _("tree"), [I, L] = _(new Set(["bucket-1"])), [ce, R] = _(!1), [z, B] = _(null), [V, H] = _(null), [le, U] = _(null), [W, G] = _({
101
+ name: "",
102
+ description: "",
103
+ visibility: "PRIVATE",
104
+ parentBucketId: void 0
105
+ }), { data: K, loading: ue, error: de, refetch: q } = te({ search: w }), { data: J, loading: fe, error: pe, refetch: Y } = ee(), [me, he] = ne(), [ge, _e] = ie(), [ve, ye] = re(), be = (e) => {
106
+ L((t) => {
107
+ let n = new Set(t);
108
+ return n.has(e) ? n.delete(e) : n.add(e), n;
109
+ });
110
+ }, xe = () => {
111
+ if (J) {
112
+ let e = /* @__PURE__ */ new Set(), t = (n) => {
113
+ for (let r of n) e.add(r.id), r.children && t(r.children);
114
+ };
115
+ t(J), L(e);
116
+ }
117
+ }, Se = () => {
118
+ L(/* @__PURE__ */ new Set());
119
+ }, X = D === "tree" ? fe : ue, Z = D === "tree" ? pe : de, Q = D === "tree" ? Y : q, Ce = async () => {
120
+ if (W.name) {
121
+ try {
122
+ await me({
123
+ name: W.name,
124
+ slug: W.name.toLowerCase().replace(/\s+/g, "-"),
125
+ description: W.description,
126
+ parentBucketId: W.parentBucketId,
127
+ metadata: { visibility: W.visibility }
128
+ });
129
+ } catch (e) {
130
+ P.error(e instanceof Error ? e.message : "Failed to create bucket");
131
+ return;
132
+ }
133
+ P.success(`Bucket "${W.name}" created`), q(), Y(), R(!1), G({
134
+ name: "",
135
+ description: "",
136
+ visibility: "PRIVATE",
137
+ parentBucketId: void 0
138
+ });
139
+ }
140
+ }, we = async () => {
141
+ if (!(!V || !W.name)) {
142
+ try {
143
+ await ge({
144
+ bucketId: V.id,
145
+ input: {
146
+ name: W.name,
147
+ description: W.description
148
+ }
149
+ });
150
+ } catch (e) {
151
+ P.error(e instanceof Error ? e.message : "Failed to update bucket");
152
+ return;
153
+ }
154
+ P.success("Bucket updated"), q(), Y(), H(null);
155
+ }
156
+ }, Te = async (e) => {
157
+ try {
158
+ await ve(e), l() && d("success"), P.success("Bucket deleted"), q(), Y();
159
+ } catch (e) {
160
+ l() && d("error"), P.error(e instanceof Error ? e.message : "Failed to delete bucket");
161
+ return;
162
+ }
163
+ B(null);
164
+ }, Ee = (e) => {
165
+ G({
166
+ name: e.name,
167
+ description: e.description ?? "",
168
+ visibility: "PRIVATE",
169
+ parentBucketId: void 0
170
+ }), H(e), U(null);
171
+ }, $ = (e) => {
172
+ G({
173
+ name: "",
174
+ description: "",
175
+ visibility: "PRIVATE",
176
+ parentBucketId: e
177
+ }), R(!0);
178
+ };
179
+ return /* @__PURE__ */ b(n, {
180
+ title: "Buckets",
181
+ description: "Organize your agents, apps, and resources into hierarchical folders",
182
+ actions: /* @__PURE__ */ b(c, {
183
+ leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
184
+ onClick: () => $(),
185
+ children: "Create Bucket"
186
+ }),
187
+ children: /* @__PURE__ */ x("div", {
188
+ className: "space-y-6",
189
+ children: [
190
+ /* @__PURE__ */ b(ae, {
191
+ icon: /* @__PURE__ */ b(O, { size: 18 }),
192
+ children: "Buckets are folders for everything you build in Botlit — agents, bots, skills, knowledge and more — arranged in a hierarchy that mirrors how your team works. Group resources by team, project or environment so they stay organised, easy to find and simple to share as your account grows. Browse the tree or list view to manage that structure."
193
+ }),
194
+ K.length > 0 ? /* @__PURE__ */ x("div", {
195
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-2",
196
+ children: [/* @__PURE__ */ x(v, {
197
+ treatment: "glass",
198
+ glow: !0,
199
+ className: "p-4",
200
+ children: [/* @__PURE__ */ b("p", {
201
+ className: "text-sm text-text-secondary",
202
+ children: "Total buckets"
203
+ }), /* @__PURE__ */ b("p", {
204
+ className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
205
+ children: K.length
206
+ })]
207
+ }), /* @__PURE__ */ x(v, {
208
+ treatment: "metric",
209
+ className: "p-4",
210
+ children: [/* @__PURE__ */ b("p", {
211
+ className: "text-sm text-text-secondary",
212
+ children: "Top-level buckets"
213
+ }), /* @__PURE__ */ b("p", {
214
+ className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
215
+ children: J.length
216
+ })]
217
+ })]
218
+ }) : null,
219
+ /* @__PURE__ */ x("div", {
220
+ className: "flex items-center justify-between gap-4",
221
+ children: [/* @__PURE__ */ x("div", {
222
+ className: "relative flex-1 max-w-md",
223
+ children: [/* @__PURE__ */ b(oe, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ b(m, {
224
+ placeholder: "Search buckets...",
225
+ value: w,
226
+ onChange: (e) => T(e.target.value),
227
+ className: "pl-9"
228
+ })]
229
+ }), /* @__PURE__ */ x("div", {
230
+ className: "flex items-center gap-2",
231
+ children: [
232
+ /* @__PURE__ */ b(c, {
233
+ variant: "outline",
234
+ size: "sm",
235
+ onClick: xe,
236
+ children: "Expand All"
237
+ }),
238
+ /* @__PURE__ */ b(c, {
239
+ variant: "outline",
240
+ size: "sm",
241
+ onClick: Se,
242
+ children: "Collapse All"
243
+ }),
244
+ /* @__PURE__ */ x("div", {
245
+ className: "flex border border-border-subtle rounded-md overflow-hidden",
246
+ children: [/* @__PURE__ */ b(c, {
247
+ variant: D === "tree" ? "default" : "ghost",
248
+ size: "sm",
249
+ className: "rounded-none",
250
+ onClick: () => k("tree"),
251
+ children: /* @__PURE__ */ b(O, { size: 16 })
252
+ }), /* @__PURE__ */ b(c, {
253
+ variant: D === "list" ? "default" : "ghost",
254
+ size: "sm",
255
+ className: "rounded-none",
256
+ onClick: () => k("list"),
257
+ children: /* @__PURE__ */ b(se, { size: 16 })
258
+ })]
259
+ })
260
+ ]
261
+ })]
262
+ }),
263
+ D === "tree" && /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
264
+ className: "p-2",
265
+ children: X ? /* @__PURE__ */ b("div", {
266
+ className: "space-y-2 p-4",
267
+ children: [
268
+ 1,
269
+ 2,
270
+ 3,
271
+ 4
272
+ ].map((e) => /* @__PURE__ */ b("div", { className: "h-10 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
273
+ }) : Z ? /* @__PURE__ */ b(g, {
274
+ resource: "buckets",
275
+ error: Z,
276
+ onRetry: () => void Q()
277
+ }) : J.length > 0 ? /* @__PURE__ */ b("div", {
278
+ className: "py-2",
279
+ onClick: () => U(null),
280
+ children: J.map((e) => /* @__PURE__ */ b(F, {
281
+ bucket: e,
282
+ level: 0,
283
+ expanded: I,
284
+ onToggle: be,
285
+ getPath: C,
286
+ onEdit: Ee,
287
+ onDelete: (e) => B(e),
288
+ onCreateChild: (e) => $(e),
289
+ activeMenu: le,
290
+ setActiveMenu: U
291
+ }, e.id))
292
+ }) : /* @__PURE__ */ b(f, {
293
+ illustration: "empty-files",
294
+ title: "No buckets created",
295
+ description: "Create buckets to organize your Botlit resources.",
296
+ action: /* @__PURE__ */ b(c, {
297
+ leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
298
+ onClick: () => $(),
299
+ children: "Create Bucket"
300
+ })
301
+ })
302
+ }) }),
303
+ D === "list" && /* @__PURE__ */ b(y, { children: X ? /* @__PURE__ */ b("div", {
304
+ className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
305
+ children: [
306
+ 1,
307
+ 2,
308
+ 3
309
+ ].map((e) => /* @__PURE__ */ b("div", { className: "h-32 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
310
+ }) : Z ? /* @__PURE__ */ b(g, {
311
+ resource: "buckets",
312
+ error: Z,
313
+ onRetry: () => void Q()
314
+ }) : K.length > 0 ? /* @__PURE__ */ b("div", {
315
+ className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
316
+ children: K.map((e) => /* @__PURE__ */ b(S, {
317
+ to: C(`buckets/${e.id}`),
318
+ children: /* @__PURE__ */ x(r, {
319
+ className: "h-full hover:border-primary/50 transition-colors cursor-pointer",
320
+ children: [/* @__PURE__ */ b(o, {
321
+ className: "pb-2",
322
+ children: /* @__PURE__ */ b("div", {
323
+ className: "flex items-start justify-between",
324
+ children: /* @__PURE__ */ x("div", {
325
+ className: "flex items-center gap-3",
326
+ children: [/* @__PURE__ */ b(E, { className: "h-5 w-5 text-primary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(s, {
327
+ className: "text-base",
328
+ children: e.name
329
+ }), /* @__PURE__ */ b(a, {
330
+ className: "text-xs",
331
+ children: e.path
332
+ })] })]
333
+ })
334
+ })
335
+ }), /* @__PURE__ */ b(i, { children: /* @__PURE__ */ x("div", {
336
+ className: "flex items-center justify-between text-sm",
337
+ children: [/* @__PURE__ */ b("span", {
338
+ className: "text-text-secondary",
339
+ children: e.slug
340
+ }), /* @__PURE__ */ b("span", {
341
+ className: "text-xs text-text-secondary",
342
+ children: t(e.createdAt)
343
+ })]
344
+ }) })]
345
+ })
346
+ }, e.id))
347
+ }) : /* @__PURE__ */ b(f, {
348
+ illustration: "empty-search",
349
+ title: "No buckets found",
350
+ description: "Create buckets to organize your Botlit resources.",
351
+ action: /* @__PURE__ */ b(c, {
352
+ leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
353
+ onClick: () => $(),
354
+ children: "Create Bucket"
355
+ })
356
+ }) }),
357
+ /* @__PURE__ */ x(r, { children: [/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
358
+ className: "flex items-center gap-2",
359
+ children: [/* @__PURE__ */ b(O, { size: 18 }), "Organizing with Buckets"]
360
+ }), /* @__PURE__ */ b(a, { children: "Buckets help you organize and manage permissions for your resources" })] }), /* @__PURE__ */ b(i, { children: /* @__PURE__ */ x("div", {
361
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6",
362
+ children: [
363
+ /* @__PURE__ */ x("div", {
364
+ className: "space-y-2",
365
+ children: [/* @__PURE__ */ b("h4", {
366
+ className: "font-medium",
367
+ children: "Hierarchical Organization"
368
+ }), /* @__PURE__ */ b("p", {
369
+ className: "text-sm text-text-secondary",
370
+ children: "Create nested folder structures to organize apps, agents, and other resources by team, project, or domain."
371
+ })]
372
+ }),
373
+ /* @__PURE__ */ x("div", {
374
+ className: "space-y-2",
375
+ children: [/* @__PURE__ */ b("h4", {
376
+ className: "font-medium",
377
+ children: "Inherited Permissions"
378
+ }), /* @__PURE__ */ b("p", {
379
+ className: "text-sm text-text-secondary",
380
+ children: "Set owners, editors, and viewers at the bucket level. Permissions cascade to all items within."
381
+ })]
382
+ }),
383
+ /* @__PURE__ */ x("div", {
384
+ className: "space-y-2",
385
+ children: [/* @__PURE__ */ b("h4", {
386
+ className: "font-medium",
387
+ children: "Default Policies"
388
+ }), /* @__PURE__ */ b("p", {
389
+ className: "text-sm text-text-secondary",
390
+ children: "Configure default policy bindings for buckets. All new items inherit these policies automatically."
391
+ })]
392
+ })
393
+ ]
394
+ }) })] }),
395
+ ce && /* @__PURE__ */ b("div", {
396
+ className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
397
+ children: /* @__PURE__ */ x(r, {
398
+ className: "w-full max-w-md mx-4",
399
+ children: [
400
+ /* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
401
+ className: "flex items-center justify-between",
402
+ children: [/* @__PURE__ */ b("span", { children: "Create Bucket" }), /* @__PURE__ */ b(c, {
403
+ variant: "ghost",
404
+ size: "icon",
405
+ onClick: () => R(!1),
406
+ children: /* @__PURE__ */ b(N, { size: 16 })
407
+ })]
408
+ }), /* @__PURE__ */ b(a, { children: W.parentBucketId ? "Create a new sub-bucket" : "Create a new root bucket" })] }),
409
+ /* @__PURE__ */ x(i, {
410
+ className: "space-y-4",
411
+ children: [
412
+ /* @__PURE__ */ b(p, {
413
+ label: "Bucket Name",
414
+ required: !0,
415
+ children: /* @__PURE__ */ b(m, {
416
+ placeholder: "e.g., Marketing Team",
417
+ value: W.name,
418
+ onChange: (e) => G({
419
+ ...W,
420
+ name: e.target.value
421
+ })
422
+ })
423
+ }),
424
+ /* @__PURE__ */ b(p, {
425
+ label: "Description",
426
+ children: /* @__PURE__ */ b(h, {
427
+ placeholder: "What is this bucket for?",
428
+ value: W.description,
429
+ onChange: (e) => G({
430
+ ...W,
431
+ description: e.target.value
432
+ }),
433
+ rows: 2
434
+ })
435
+ }),
436
+ /* @__PURE__ */ b(p, {
437
+ label: "Visibility",
438
+ children: /* @__PURE__ */ x("select", {
439
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
440
+ value: W.visibility,
441
+ onChange: (e) => G({
442
+ ...W,
443
+ visibility: e.target.value
444
+ }),
445
+ children: [
446
+ /* @__PURE__ */ b("option", {
447
+ value: "PRIVATE",
448
+ children: "Private"
449
+ }),
450
+ /* @__PURE__ */ b("option", {
451
+ value: "WORKSPACE",
452
+ children: "Workspace"
453
+ }),
454
+ /* @__PURE__ */ b("option", {
455
+ value: "PUBLIC",
456
+ children: "Public"
457
+ })
458
+ ]
459
+ })
460
+ })
461
+ ]
462
+ }),
463
+ /* @__PURE__ */ x("div", {
464
+ className: "flex justify-end gap-2 p-4 border-t",
465
+ children: [/* @__PURE__ */ b(c, {
466
+ variant: "outline",
467
+ onClick: () => R(!1),
468
+ children: "Cancel"
469
+ }), /* @__PURE__ */ b(c, {
470
+ onClick: Ce,
471
+ isLoading: he.loading,
472
+ disabled: !W.name,
473
+ leftIcon: /* @__PURE__ */ b(j, { size: 16 }),
474
+ children: "Create Bucket"
475
+ })]
476
+ })
477
+ ]
478
+ })
479
+ }),
480
+ V && /* @__PURE__ */ b("div", {
481
+ className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
482
+ children: /* @__PURE__ */ x(r, {
483
+ className: "w-full max-w-md mx-4",
484
+ children: [
485
+ /* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
486
+ className: "flex items-center justify-between",
487
+ children: [/* @__PURE__ */ b("span", { children: "Edit Bucket" }), /* @__PURE__ */ b(c, {
488
+ variant: "ghost",
489
+ size: "icon",
490
+ onClick: () => H(null),
491
+ children: /* @__PURE__ */ b(N, { size: 16 })
492
+ })]
493
+ }), /* @__PURE__ */ b(a, { children: "Update bucket details" })] }),
494
+ /* @__PURE__ */ x(i, {
495
+ className: "space-y-4",
496
+ children: [
497
+ /* @__PURE__ */ b(p, {
498
+ label: "Bucket Name",
499
+ required: !0,
500
+ children: /* @__PURE__ */ b(m, {
501
+ placeholder: "e.g., Marketing Team",
502
+ value: W.name,
503
+ onChange: (e) => G({
504
+ ...W,
505
+ name: e.target.value
506
+ })
507
+ })
508
+ }),
509
+ /* @__PURE__ */ b(p, {
510
+ label: "Description",
511
+ children: /* @__PURE__ */ b(h, {
512
+ placeholder: "What is this bucket for?",
513
+ value: W.description,
514
+ onChange: (e) => G({
515
+ ...W,
516
+ description: e.target.value
517
+ }),
518
+ rows: 2
519
+ })
520
+ }),
521
+ /* @__PURE__ */ b(p, {
522
+ label: "Visibility",
523
+ children: /* @__PURE__ */ x("select", {
524
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
525
+ value: W.visibility,
526
+ onChange: (e) => G({
527
+ ...W,
528
+ visibility: e.target.value
529
+ }),
530
+ children: [
531
+ /* @__PURE__ */ b("option", {
532
+ value: "PRIVATE",
533
+ children: "Private"
534
+ }),
535
+ /* @__PURE__ */ b("option", {
536
+ value: "WORKSPACE",
537
+ children: "Workspace"
538
+ }),
539
+ /* @__PURE__ */ b("option", {
540
+ value: "PUBLIC",
541
+ children: "Public"
542
+ })
543
+ ]
544
+ })
545
+ })
546
+ ]
547
+ }),
548
+ /* @__PURE__ */ x("div", {
549
+ className: "flex justify-end gap-2 p-4 border-t",
550
+ children: [/* @__PURE__ */ b(c, {
551
+ variant: "outline",
552
+ onClick: () => H(null),
553
+ children: "Cancel"
554
+ }), /* @__PURE__ */ b(c, {
555
+ onClick: we,
556
+ isLoading: _e.loading,
557
+ disabled: !W.name,
558
+ leftIcon: /* @__PURE__ */ b(j, { size: 16 }),
559
+ children: "Save Changes"
560
+ })]
561
+ })
562
+ ]
563
+ })
564
+ }),
565
+ z && /* @__PURE__ */ b("div", {
566
+ className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
567
+ children: /* @__PURE__ */ x(r, {
568
+ className: "w-full max-w-md mx-4",
569
+ children: [
570
+ /* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
571
+ className: "flex items-center gap-2 text-status-error-text",
572
+ children: [/* @__PURE__ */ b(M, { size: 18 }), "Delete Bucket"]
573
+ }), /* @__PURE__ */ b(a, { children: "Are you sure you want to delete this bucket? This action cannot be undone." })] }),
574
+ /* @__PURE__ */ b(i, { children: /* @__PURE__ */ b("p", {
575
+ className: "text-sm text-text-secondary",
576
+ children: "Note: Buckets with children or items cannot be deleted. You must delete or move all contents first."
577
+ }) }),
578
+ /* @__PURE__ */ x("div", {
579
+ className: "flex justify-end gap-2 p-4 border-t",
580
+ children: [/* @__PURE__ */ b(c, {
581
+ variant: "outline",
582
+ onClick: () => B(null),
583
+ children: "Cancel"
584
+ }), /* @__PURE__ */ b(c, {
585
+ variant: "destructive",
586
+ onClick: () => {
587
+ u("medium"), Te(z);
588
+ },
589
+ isLoading: ye.loading,
590
+ leftIcon: /* @__PURE__ */ b(M, { size: 16 }),
591
+ children: "Delete Bucket"
592
+ })]
593
+ })
594
+ ]
595
+ })
596
+ })
597
+ ]
598
+ })
599
+ });
600
+ };
601
+ //#endregion
602
+ export { I as BucketsPage };
603
+
604
+ //# sourceMappingURL=BucketsPage.js.map