@burdenoff/microfe-botmanor 2026.1109.1 → 2026.1109.2
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.
- package/dist/botlit/BotlitRoutes.js +34 -45
- package/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/hooks/index.d.ts +1 -2
- package/dist/botlit/hooks/index.js +15 -16
- package/dist/botlit/hooks/useBuckets.d.ts +5 -0
- package/dist/botlit/hooks/useBuckets.js +72 -38
- package/dist/botlit/hooks/useBuckets.js.map +1 -1
- package/dist/botlit/index.d.ts +0 -1
- package/dist/botlit/index.js +5 -6
- package/dist/botlit/pages/BucketDetailPage.d.ts +2 -0
- package/dist/botlit/pages/BucketDetailPage.js +251 -0
- package/dist/botlit/pages/BucketDetailPage.js.map +1 -0
- package/dist/botlit/pages/index.d.ts +1 -2
- package/dist/generated/wspace-operations.js +67 -67
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +5 -6
- package/package.json +1 -1
- package/dist/botlit/hooks/useConversations.d.ts +0 -42
- package/dist/botlit/hooks/useConversations.js +0 -63
- package/dist/botlit/hooks/useConversations.js.map +0 -1
- package/dist/botlit/pages/ConversationDetailPage.d.ts +0 -2
- package/dist/botlit/pages/ConversationsPage.d.ts +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CreateBucketDocument as e, DeleteBucketDocument as t,
|
|
2
|
-
import { buildMutationInput as
|
|
3
|
-
import { useWorkspaceId as
|
|
4
|
-
import { useCallback as
|
|
1
|
+
import { CreateBucketDocument as e, DeleteBucketDocument as t, GetBucketDocument as n, ListBucketsDocument as r, UpdateBucketDocument as i } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { buildMutationInput as a, fieldsOf as o } from "./internal/mutationInput.js";
|
|
3
|
+
import { useWorkspaceId as s, useWorkspaceMutation as c, useWorkspaceQuery as l } from "./internal/workspaceGateway.js";
|
|
4
|
+
import { useCallback as u, useMemo as d } from "react";
|
|
5
5
|
// src/botlit/hooks/useBuckets.ts
|
|
6
|
-
var
|
|
6
|
+
var f = 100, p = o({
|
|
7
7
|
color: !0,
|
|
8
8
|
context: !0,
|
|
9
9
|
description: !0,
|
|
@@ -13,7 +13,7 @@ var d = 100, f = a({
|
|
|
13
13
|
parentBucketId: !0,
|
|
14
14
|
slug: !0,
|
|
15
15
|
workspaceId: !0
|
|
16
|
-
}),
|
|
16
|
+
}), m = o({
|
|
17
17
|
color: !0,
|
|
18
18
|
context: !0,
|
|
19
19
|
description: !0,
|
|
@@ -22,11 +22,14 @@ var d = 100, f = a({
|
|
|
22
22
|
name: !0,
|
|
23
23
|
parentBucketId: !0,
|
|
24
24
|
slug: !0
|
|
25
|
-
}),
|
|
26
|
-
function g(e) {
|
|
27
|
-
return e?.listBuckets ?? m;
|
|
28
|
-
}
|
|
25
|
+
}), h = [], g = [];
|
|
29
26
|
function _(e) {
|
|
27
|
+
return e?.listBuckets ?? h;
|
|
28
|
+
}
|
|
29
|
+
function v(e) {
|
|
30
|
+
return e?.getBucket ?? null;
|
|
31
|
+
}
|
|
32
|
+
function y(e) {
|
|
30
33
|
let t = /* @__PURE__ */ new Map();
|
|
31
34
|
for (let n of e) t.set(n.id, {
|
|
32
35
|
...n,
|
|
@@ -45,74 +48,105 @@ function _(e) {
|
|
|
45
48
|
};
|
|
46
49
|
return i(n), n;
|
|
47
50
|
}
|
|
48
|
-
function
|
|
49
|
-
let t =
|
|
51
|
+
function b(e) {
|
|
52
|
+
let t = s(), n = e?.search, i = d(() => ({
|
|
50
53
|
filters: {
|
|
51
54
|
workspaceId: t,
|
|
52
|
-
search:
|
|
55
|
+
search: n || void 0
|
|
53
56
|
},
|
|
54
57
|
pagination: {
|
|
55
|
-
limit:
|
|
58
|
+
limit: f,
|
|
56
59
|
offset: 0
|
|
57
60
|
}
|
|
58
|
-
}), [t,
|
|
59
|
-
return
|
|
60
|
-
document:
|
|
61
|
+
}), [t, n]);
|
|
62
|
+
return l({
|
|
63
|
+
document: r,
|
|
61
64
|
variables: i,
|
|
62
|
-
select:
|
|
63
|
-
fallback:
|
|
65
|
+
select: _,
|
|
66
|
+
fallback: h,
|
|
64
67
|
enabled: !!t,
|
|
65
68
|
errorMessage: "Failed to load buckets"
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
|
-
function
|
|
69
|
-
let e =
|
|
71
|
+
function x() {
|
|
72
|
+
let e = s(), t = d(() => ({
|
|
70
73
|
filters: { workspaceId: e },
|
|
71
74
|
pagination: {
|
|
72
|
-
limit:
|
|
75
|
+
limit: f,
|
|
73
76
|
offset: 0
|
|
74
77
|
}
|
|
75
|
-
}), [e]),
|
|
76
|
-
return
|
|
77
|
-
document:
|
|
78
|
+
}), [e]), n = u((e) => y(e?.listBuckets ?? h), []);
|
|
79
|
+
return l({
|
|
80
|
+
document: r,
|
|
78
81
|
variables: t,
|
|
79
|
-
select:
|
|
80
|
-
fallback:
|
|
82
|
+
select: n,
|
|
83
|
+
fallback: g,
|
|
81
84
|
enabled: !!e,
|
|
82
85
|
errorMessage: "Failed to load the bucket tree"
|
|
83
86
|
});
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
let t =
|
|
88
|
+
function S(e) {
|
|
89
|
+
let t = s(), n = d(() => ({
|
|
90
|
+
filters: {
|
|
91
|
+
workspaceId: t,
|
|
92
|
+
parentBucketId: e ?? ""
|
|
93
|
+
},
|
|
94
|
+
pagination: {
|
|
95
|
+
limit: f,
|
|
96
|
+
offset: 0
|
|
97
|
+
}
|
|
98
|
+
}), [t, e]);
|
|
99
|
+
return l({
|
|
100
|
+
document: r,
|
|
101
|
+
variables: n,
|
|
102
|
+
select: _,
|
|
103
|
+
fallback: h,
|
|
104
|
+
enabled: !!(t && e),
|
|
105
|
+
errorMessage: "Failed to load sub-buckets"
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function C(e) {
|
|
109
|
+
let t = d(() => ({ id: e ?? "" }), [e]);
|
|
110
|
+
return l({
|
|
111
|
+
document: n,
|
|
112
|
+
variables: t,
|
|
113
|
+
select: v,
|
|
114
|
+
fallback: null,
|
|
115
|
+
enabled: !!e,
|
|
116
|
+
errorMessage: "Failed to load bucket"
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function w() {
|
|
120
|
+
let t = s(), n = u((e) => ({ input: a({
|
|
87
121
|
...e,
|
|
88
122
|
workspaceId: t
|
|
89
|
-
},
|
|
90
|
-
return
|
|
123
|
+
}, p) }), [t]);
|
|
124
|
+
return c({
|
|
91
125
|
document: e,
|
|
92
126
|
variables: n,
|
|
93
127
|
select: (e) => e?.createBucket,
|
|
94
128
|
errorMessage: "Failed to create bucket"
|
|
95
129
|
});
|
|
96
130
|
}
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
-
document:
|
|
131
|
+
function T() {
|
|
132
|
+
return c({
|
|
133
|
+
document: i,
|
|
100
134
|
variables: ({ bucketId: e, input: t }) => ({
|
|
101
135
|
id: e,
|
|
102
|
-
input:
|
|
136
|
+
input: a(t, m)
|
|
103
137
|
}),
|
|
104
138
|
select: (e) => e?.updateBucket,
|
|
105
139
|
errorMessage: "Failed to update bucket"
|
|
106
140
|
});
|
|
107
141
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
142
|
+
function E() {
|
|
143
|
+
return c({
|
|
110
144
|
document: t,
|
|
111
145
|
variables: (e) => ({ id: e }),
|
|
112
146
|
select: (e) => e?.deleteBucket,
|
|
113
147
|
errorMessage: "Failed to delete bucket"
|
|
114
148
|
});
|
|
115
149
|
}
|
|
116
|
-
export {
|
|
150
|
+
export { y as buildBucketTree, C as useBucket, x as useBucketTree, b as useBuckets, S as useChildBuckets, w as useCreateBucket, E as useDeleteBucket, T as useUpdateBucket };
|
|
117
151
|
|
|
118
152
|
//# sourceMappingURL=useBuckets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuckets.js","names":["LIST_LIMIT","CREATE_BUCKET_FIELDS","fieldsOf","UPDATE_BUCKET_FIELDS","NO_BUCKETS","NO_BUCKET_TREE","selectBuckets","data","buildBucketTree","nodes","bucket","buckets","roots","node","parent","byName","a","b","sortRecursively","child","list","useBuckets","workspaceId","useWorkspaceId","search","filter","variables","useMemo","useWorkspaceQuery","ListBucketsDocument","useBucketTree","select","useCallback","useCreateBucket","buildMutationInput","input","useWorkspaceMutation","CreateBucketDocument","useUpdateBucket","UpdateBucketDocument","bucketId","useDeleteBucket","DeleteBucketDocument"],"sources":["../../../src/botlit/hooks/useBuckets.ts"],"sourcesContent":["/**\n * Buckets Hooks\n * @module botlit/hooks\n *\n * Backed by the live `listBuckets` / `getBucket` / `createBucket` / `updateBucket`\n * / `deleteBucket` operations on wspace-botlit-svc.\n */\n\nimport { useCallback, useMemo } from 'react';\nimport {\n CreateBucketDocument,\n DeleteBucketDocument,\n GetBucketDocument,\n ListBucketsDocument,\n UpdateBucketDocument,\n type CreateBucketMutation,\n type DeleteBucketMutation,\n type GetBucketQuery,\n type ListBucketsQuery,\n type UpdateBucketMutation,\n} from '../../generated/wspace-operations';\nimport type { CreateBucketInput, UpdateBucketInput } from '../../generated/wspace-types';\nimport type { BaseFilter } from '../types';\nimport { buildMutationInput, fieldsOf, type GraphQLInput } from './internal/mutationInput';\nimport {\n useWorkspaceId,\n useWorkspaceMutation,\n useWorkspaceQuery,\n type QueryResult,\n} from './internal/workspaceGateway';\n\nconst LIST_LIMIT = 100;\n\nexport interface BucketRecord {\n id: string;\n name: string;\n slug: string;\n path: string;\n description?: string | null;\n color?: string | null;\n icon?: string | null;\n parentBucketId?: string | null;\n metadata?: Record<string, unknown> | null;\n deletedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n createdById: string;\n updatedById: string;\n workspaceId: string;\n}\n\n/** A bucket plus its resolved children — the shape the tree view renders. */\nexport interface BucketTreeNode extends BucketRecord {\n children: BucketTreeNode[];\n}\n\n/**\n * `CreateBucketInput` minus the `workspaceId`/`context` the hook supplies.\n */\nexport type CreateBucketVariables = Omit<\n GraphQLInput<CreateBucketInput>,\n 'workspaceId' | 'context'\n>;\n\nexport interface UpdateBucketVariables {\n bucketId: string;\n input: GraphQLInput<UpdateBucketInput>;\n}\n\nconst CREATE_BUCKET_FIELDS = fieldsOf<CreateBucketInput>({\n color: true,\n context: true,\n description: true,\n icon: true,\n metadata: true,\n name: true,\n parentBucketId: true,\n slug: true,\n workspaceId: true,\n});\n\nconst UPDATE_BUCKET_FIELDS = fieldsOf<UpdateBucketInput>({\n color: true,\n context: true,\n description: true,\n icon: true,\n metadata: true,\n name: true,\n parentBucketId: true,\n slug: true,\n});\n\nconst NO_BUCKETS: BucketRecord[] = [];\nconst NO_BUCKET_TREE: BucketTreeNode[] = [];\n\nfunction selectBuckets(data: ListBucketsQuery | undefined): BucketRecord[] {\n return data?.listBuckets ?? NO_BUCKETS;\n}\n\nfunction selectBucket(data: GetBucketQuery | undefined): BucketRecord | null {\n return data?.getBucket ?? null;\n}\n\n/**\n * Builds the parent → children tree. Buckets whose parent is not in the result\n * set (filtered out, or not readable) are surfaced at the root rather than\n * silently dropped.\n */\nexport function buildBucketTree(buckets: readonly BucketRecord[]): BucketTreeNode[] {\n const nodes = new Map<string, BucketTreeNode>();\n for (const bucket of buckets) {\n nodes.set(bucket.id, { ...bucket, children: [] });\n }\n\n const roots: BucketTreeNode[] = [];\n for (const bucket of buckets) {\n const node = nodes.get(bucket.id);\n if (!node) continue;\n const parent = bucket.parentBucketId ? nodes.get(bucket.parentBucketId) : undefined;\n if (parent && parent !== node) {\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n const byName = (a: BucketTreeNode, b: BucketTreeNode) => a.name.localeCompare(b.name);\n const sortRecursively = (list: BucketTreeNode[]) => {\n list.sort(byName);\n for (const child of list) sortRecursively(child.children);\n };\n sortRecursively(roots);\n\n return roots;\n}\n\nexport const bucketKeys = {\n all: ['buckets'] as const,\n lists: () => [...bucketKeys.all, 'list'] as const,\n list: (filter?: BaseFilter) => [...bucketKeys.lists(), filter] as const,\n tree: () => [...bucketKeys.all, 'tree'] as const,\n details: () => [...bucketKeys.all, 'detail'] as const,\n detail: (id: string) => [...bucketKeys.details(), id] as const,\n};\n\nexport function useBuckets(filter?: BaseFilter): QueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n const search = filter?.search;\n\n const variables = useMemo(\n () => ({\n filters: { workspaceId, search: search || undefined },\n pagination: { limit: LIST_LIMIT, offset: 0 },\n }),\n [workspaceId, search]\n );\n\n return useWorkspaceQuery<ListBucketsQuery, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n select: selectBuckets,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to load buckets',\n });\n}\n\n/**\n * The bucket hierarchy. Derived from `listBuckets` — the service exposes the\n * parent link on every bucket, so no separate tree operation is needed.\n */\nexport function useBucketTree(): QueryResult<BucketTreeNode[]> {\n const workspaceId = useWorkspaceId();\n\n const variables = useMemo(\n () => ({\n filters: { workspaceId },\n pagination: { limit: LIST_LIMIT, offset: 0 },\n }),\n [workspaceId]\n );\n\n const select = useCallback(\n (data: ListBucketsQuery | undefined) => buildBucketTree(data?.listBuckets ?? NO_BUCKETS),\n []\n );\n\n return useWorkspaceQuery<ListBucketsQuery, BucketTreeNode[]>({\n document: ListBucketsDocument,\n variables,\n select,\n fallback: NO_BUCKET_TREE,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to load the bucket tree',\n });\n}\n\nexport function useBucket(bucketId: string | undefined): QueryResult<BucketRecord | null> {\n const variables = useMemo(() => ({ id: bucketId ?? '' }), [bucketId]);\n\n return useWorkspaceQuery<GetBucketQuery, BucketRecord | null>({\n document: GetBucketDocument,\n variables,\n select: selectBucket,\n fallback: null,\n enabled: Boolean(bucketId),\n errorMessage: 'Failed to load bucket',\n });\n}\n\nexport function useCreateBucket() {\n const workspaceId = useWorkspaceId();\n\n const variables = useCallback(\n (input: CreateBucketVariables) => ({\n input: buildMutationInput({ ...input, workspaceId }, CREATE_BUCKET_FIELDS),\n }),\n [workspaceId]\n );\n\n return useWorkspaceMutation<CreateBucketMutation, CreateBucketVariables, BucketRecord>({\n document: CreateBucketDocument,\n variables,\n select: (data) => data?.createBucket,\n errorMessage: 'Failed to create bucket',\n });\n}\n\nexport function useUpdateBucket() {\n return useWorkspaceMutation<UpdateBucketMutation, UpdateBucketVariables, BucketRecord>({\n document: UpdateBucketDocument,\n variables: ({ bucketId, input }) => ({\n id: bucketId,\n input: buildMutationInput(input, UPDATE_BUCKET_FIELDS),\n }),\n select: (data) => data?.updateBucket,\n errorMessage: 'Failed to update bucket',\n });\n}\n\nexport function useDeleteBucket() {\n return useWorkspaceMutation<DeleteBucketMutation, string, boolean>({\n document: DeleteBucketDocument,\n variables: (bucketId) => ({ id: bucketId }),\n select: (data) => data?.deleteBucket,\n errorMessage: 'Failed to delete bucket',\n });\n}\n"],"mappings":";;;;;AA+BA,IAAMA,IAAa,KAsCbC,IAAuBC,EAA4B;CACvD,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACN,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,MAAM;CACN,aAAa;AACf,CAAC,GAEKC,IAAuBD,EAA4B;CACvD,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACN,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,MAAM;AACR,CAAC,GAEKE,IAA6B,CAAC,GAC9BC,IAAmC,CAAC;AAE1C,SAASC,EAAc,GAAoD;CACzE,OAAOC,GAAM,eAAeH;AAC9B;AAWA,SAAgBI,EAAgB,GAAoD;CAClF,IAAMC,oBAAQ,IAAI,IAA4B;CAC9C,KAAK,IAAMC,KAAUC,GACnB,EAAM,IAAID,EAAO,IAAI;EAAE,GAAGA;EAAQ,UAAU,CAAC;CAAE,CAAC;CAGlD,IAAME,IAA0B,CAAC;CACjC,KAAK,IAAMF,KAAUC,GAAS;EAC5B,IAAME,IAAOJ,EAAM,IAAIC,EAAO,EAAE;EAChC,IAAI,CAACG,GAAM;EAC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CACd;CAEA,OAAOc,EAAgF;EACrF,UAAUC;EACV;EACA,SAAS,MAAS9B,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgB+B,IAAkB;CAChC,OAAOF,EAAgF;EACrF,UAAUG;EACV,YAAY,EAAE,aAAU,gBAAa;GACnC,IAAIC;GACJ,OAAON,EAAmBC,GAAOhC,CAAoB;EACvD;EACA,SAAS,MAASI,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBkC,IAAkB;CAChC,OAAOL,EAA4D;EACjE,UAAUM;EACV,YAAY,OAAc,EAAE,IAAIF,EAAS;EACzC,SAAS,MAASjC,GAAM;EACxB,cAAc;CAChB,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"useBuckets.js","names":["LIST_LIMIT","CREATE_BUCKET_FIELDS","fieldsOf","UPDATE_BUCKET_FIELDS","NO_BUCKETS","NO_BUCKET_TREE","selectBuckets","data","selectBucket","buildBucketTree","nodes","bucket","buckets","roots","node","parent","byName","a","b","sortRecursively","child","list","useBuckets","workspaceId","useWorkspaceId","search","filter","variables","useMemo","useWorkspaceQuery","ListBucketsDocument","useBucketTree","select","useCallback","useChildBuckets","parentBucketId","useBucket","bucketId","GetBucketDocument","useCreateBucket","buildMutationInput","input","useWorkspaceMutation","CreateBucketDocument","useUpdateBucket","UpdateBucketDocument","useDeleteBucket","DeleteBucketDocument"],"sources":["../../../src/botlit/hooks/useBuckets.ts"],"sourcesContent":["/**\n * Buckets Hooks\n * @module botlit/hooks\n *\n * Backed by the live `listBuckets` / `getBucket` / `createBucket` / `updateBucket`\n * / `deleteBucket` operations on wspace-botlit-svc.\n */\n\nimport { useCallback, useMemo } from 'react';\nimport {\n CreateBucketDocument,\n DeleteBucketDocument,\n GetBucketDocument,\n ListBucketsDocument,\n UpdateBucketDocument,\n type CreateBucketMutation,\n type DeleteBucketMutation,\n type GetBucketQuery,\n type ListBucketsQuery,\n type UpdateBucketMutation,\n} from '../../generated/wspace-operations';\nimport type { CreateBucketInput, UpdateBucketInput } from '../../generated/wspace-types';\nimport type { BaseFilter } from '../types';\nimport { buildMutationInput, fieldsOf, type GraphQLInput } from './internal/mutationInput';\nimport {\n useWorkspaceId,\n useWorkspaceMutation,\n useWorkspaceQuery,\n type QueryResult,\n} from './internal/workspaceGateway';\n\nconst LIST_LIMIT = 100;\n\nexport interface BucketRecord {\n id: string;\n name: string;\n slug: string;\n path: string;\n description?: string | null;\n color?: string | null;\n icon?: string | null;\n parentBucketId?: string | null;\n metadata?: Record<string, unknown> | null;\n deletedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n createdById: string;\n updatedById: string;\n workspaceId: string;\n}\n\n/** A bucket plus its resolved children — the shape the tree view renders. */\nexport interface BucketTreeNode extends BucketRecord {\n children: BucketTreeNode[];\n}\n\n/**\n * `CreateBucketInput` minus the `workspaceId`/`context` the hook supplies.\n */\nexport type CreateBucketVariables = Omit<\n GraphQLInput<CreateBucketInput>,\n 'workspaceId' | 'context'\n>;\n\nexport interface UpdateBucketVariables {\n bucketId: string;\n input: GraphQLInput<UpdateBucketInput>;\n}\n\nconst CREATE_BUCKET_FIELDS = fieldsOf<CreateBucketInput>({\n color: true,\n context: true,\n description: true,\n icon: true,\n metadata: true,\n name: true,\n parentBucketId: true,\n slug: true,\n workspaceId: true,\n});\n\nconst UPDATE_BUCKET_FIELDS = fieldsOf<UpdateBucketInput>({\n color: true,\n context: true,\n description: true,\n icon: true,\n metadata: true,\n name: true,\n parentBucketId: true,\n slug: true,\n});\n\nconst NO_BUCKETS: BucketRecord[] = [];\nconst NO_BUCKET_TREE: BucketTreeNode[] = [];\n\nfunction selectBuckets(data: ListBucketsQuery | undefined): BucketRecord[] {\n return data?.listBuckets ?? NO_BUCKETS;\n}\n\nfunction selectBucket(data: GetBucketQuery | undefined): BucketRecord | null {\n return data?.getBucket ?? null;\n}\n\n/**\n * Builds the parent → children tree. Buckets whose parent is not in the result\n * set (filtered out, or not readable) are surfaced at the root rather than\n * silently dropped.\n */\nexport function buildBucketTree(buckets: readonly BucketRecord[]): BucketTreeNode[] {\n const nodes = new Map<string, BucketTreeNode>();\n for (const bucket of buckets) {\n nodes.set(bucket.id, { ...bucket, children: [] });\n }\n\n const roots: BucketTreeNode[] = [];\n for (const bucket of buckets) {\n const node = nodes.get(bucket.id);\n if (!node) continue;\n const parent = bucket.parentBucketId ? nodes.get(bucket.parentBucketId) : undefined;\n if (parent && parent !== node) {\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n const byName = (a: BucketTreeNode, b: BucketTreeNode) => a.name.localeCompare(b.name);\n const sortRecursively = (list: BucketTreeNode[]) => {\n list.sort(byName);\n for (const child of list) sortRecursively(child.children);\n };\n sortRecursively(roots);\n\n return roots;\n}\n\nexport const bucketKeys = {\n all: ['buckets'] as const,\n lists: () => [...bucketKeys.all, 'list'] as const,\n list: (filter?: BaseFilter) => [...bucketKeys.lists(), filter] as const,\n tree: () => [...bucketKeys.all, 'tree'] as const,\n details: () => [...bucketKeys.all, 'detail'] as const,\n detail: (id: string) => [...bucketKeys.details(), id] as const,\n};\n\nexport function useBuckets(filter?: BaseFilter): QueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n const search = filter?.search;\n\n const variables = useMemo(\n () => ({\n filters: { workspaceId, search: search || undefined },\n pagination: { limit: LIST_LIMIT, offset: 0 },\n }),\n [workspaceId, search]\n );\n\n return useWorkspaceQuery<ListBucketsQuery, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n select: selectBuckets,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to load buckets',\n });\n}\n\n/**\n * The bucket hierarchy. Derived from `listBuckets` — the service exposes the\n * parent link on every bucket, so no separate tree operation is needed.\n */\nexport function useBucketTree(): QueryResult<BucketTreeNode[]> {\n const workspaceId = useWorkspaceId();\n\n const variables = useMemo(\n () => ({\n filters: { workspaceId },\n pagination: { limit: LIST_LIMIT, offset: 0 },\n }),\n [workspaceId]\n );\n\n const select = useCallback(\n (data: ListBucketsQuery | undefined) => buildBucketTree(data?.listBuckets ?? NO_BUCKETS),\n []\n );\n\n return useWorkspaceQuery<ListBucketsQuery, BucketTreeNode[]>({\n document: ListBucketsDocument,\n variables,\n select,\n fallback: NO_BUCKET_TREE,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to load the bucket tree',\n });\n}\n\n/**\n * Direct children of one bucket, resolved via the `parentBucketId` filter on\n * `listBuckets`. Powers the sub-bucket section of the bucket detail page.\n */\nexport function useChildBuckets(parentBucketId: string | undefined): QueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n\n const variables = useMemo(\n () => ({\n filters: { workspaceId, parentBucketId: parentBucketId ?? '' },\n pagination: { limit: LIST_LIMIT, offset: 0 },\n }),\n [workspaceId, parentBucketId]\n );\n\n return useWorkspaceQuery<ListBucketsQuery, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n select: selectBuckets,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId && parentBucketId),\n errorMessage: 'Failed to load sub-buckets',\n });\n}\n\nexport function useBucket(bucketId: string | undefined): QueryResult<BucketRecord | null> {\n const variables = useMemo(() => ({ id: bucketId ?? '' }), [bucketId]);\n\n return useWorkspaceQuery<GetBucketQuery, BucketRecord | null>({\n document: GetBucketDocument,\n variables,\n select: selectBucket,\n fallback: null,\n enabled: Boolean(bucketId),\n errorMessage: 'Failed to load bucket',\n });\n}\n\nexport function useCreateBucket() {\n const workspaceId = useWorkspaceId();\n\n const variables = useCallback(\n (input: CreateBucketVariables) => ({\n input: buildMutationInput({ ...input, workspaceId }, CREATE_BUCKET_FIELDS),\n }),\n [workspaceId]\n );\n\n return useWorkspaceMutation<CreateBucketMutation, CreateBucketVariables, BucketRecord>({\n document: CreateBucketDocument,\n variables,\n select: (data) => data?.createBucket,\n errorMessage: 'Failed to create bucket',\n });\n}\n\nexport function useUpdateBucket() {\n return useWorkspaceMutation<UpdateBucketMutation, UpdateBucketVariables, BucketRecord>({\n document: UpdateBucketDocument,\n variables: ({ bucketId, input }) => ({\n id: bucketId,\n input: buildMutationInput(input, UPDATE_BUCKET_FIELDS),\n }),\n select: (data) => data?.updateBucket,\n errorMessage: 'Failed to update bucket',\n });\n}\n\nexport function useDeleteBucket() {\n return useWorkspaceMutation<DeleteBucketMutation, string, boolean>({\n document: DeleteBucketDocument,\n variables: (bucketId) => ({ id: bucketId }),\n select: (data) => data?.deleteBucket,\n errorMessage: 'Failed to delete bucket',\n });\n}\n"],"mappings":";;;;;AA+BA,IAAMA,IAAa,KAsCbC,IAAuBC,EAA4B;CACvD,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACN,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,MAAM;CACN,aAAa;AACf,CAAC,GAEKC,IAAuBD,EAA4B;CACvD,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACN,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,MAAM;AACR,CAAC,GAEKE,IAA6B,CAAC,GAC9BC,IAAmC,CAAC;AAE1C,SAASC,EAAc,GAAoD;CACzE,OAAOC,GAAM,eAAeH;AAC9B;AAEA,SAASI,EAAa,GAAuD;CAC3E,OAAOD,GAAM,aAAa;AAC5B;AAOA,SAAgBE,EAAgB,GAAoD;CAClF,IAAMC,oBAAQ,IAAI,IAA4B;CAC9C,KAAK,IAAMC,KAAUC,GACnB,EAAM,IAAID,EAAO,IAAI;EAAE,GAAGA;EAAQ,UAAU,CAAC;CAAE,CAAC;CAGlD,IAAME,IAA0B,CAAC;CACjC,KAAK,IAAMF,KAAUC,GAAS;EAC5B,IAAME,IAAOJ,EAAM,IAAIC,EAAO,EAAE;EAChC,IAAI,CAACG,GAAM;EACX,IAAMC,IAASJ,EAAO,iBAAiBD,EAAM,IAAIC,EAAO,cAAc,IAAI,KAAA;EAC1E,AAAII,KAAUA,MAAWD,IACvBC,EAAO,SAAS,KAAKD,CAAI,IAEzBD,EAAM,KAAKC,CAAI;CAEnB;CA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EA,SAAgBC,EAAU,GAAgE;CACxF,IAAMT,IAAYC,SAAe,EAAE,IAAIS,KAAY,GAAG,IAAI,CAACA,CAAQ,CAAC;CAEpE,OAAOR,EAAuD;EAC5D,UAAUS;EACV;EACA,QAAQ9B;EACR,UAAU;EACV,SAAS,EAAQ6B;EACjB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBE,IAAkB;CAChC,IAAMhB,IAAcC,EAAe,GAE7BG,IAAYM,GACf,OAAkC,EACjC,OAAOO,EAAmB;EAAE,GAAGC;EAAO;CAAY,GAAGxC,CAAoB,EAC3E,IACA,CAACsB,CAAW,CACd;CAEA,OAAOmB,EAAgF;EACrF,UAAUC;EACV;EACA,SAAS,MAASpC,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBqC,IAAkB;CAChC,OAAOF,EAAgF;EACrF,UAAUG;EACV,YAAY,EAAE,aAAU,gBAAa;GACnC,IAAIR;GACJ,OAAOG,EAAmBC,GAAOtC,CAAoB;EACvD;EACA,SAAS,MAASI,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBuC,IAAkB;CAChC,OAAOJ,EAA4D;EACjE,UAAUK;EACV,YAAY,OAAc,EAAE,IAAIV,EAAS;EACzC,SAAS,MAAS9B,GAAM;EACxB,cAAc;CAChB,CAAC;AACH"}
|
package/dist/botlit/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export { useBotlitStore } from './store/botlitStore';
|
|
|
9
9
|
export { useBots, useBot, useCreateBot, useUpdateBot, useDeleteBot } from './hooks/useBots';
|
|
10
10
|
export { useAgents, useAgent, useCreateAgent, useUpdateAgent, useDeleteAgent, } from './hooks/useAgents';
|
|
11
11
|
export { useKnowledgeBases, useKnowledgeBase, useKnowledgeDocuments, useCreateKnowledgeBase, } from './hooks/useKnowledgeBases';
|
|
12
|
-
export { useConversations, useConversation, useSendMessage } from './hooks/useConversations';
|
|
13
12
|
export { useLLMProviders, useConfigureLLMProvider } from './hooks/useLLMProviders';
|
|
14
13
|
export { useMCPServers, useCreateMCPServer } from './hooks/useMCPServers';
|
|
15
14
|
export { cn } from './utils/cn';
|
package/dist/botlit/index.js
CHANGED
|
@@ -4,9 +4,8 @@ import { useBotlitStore as r } from "./store/botlitStore.js";
|
|
|
4
4
|
import { useBot as i, useBots as a, useCreateBot as o, useDeleteBot as s, useUpdateBot as c } from "./hooks/useBots.js";
|
|
5
5
|
import { useAgent as l, useAgents as u, useCreateAgent as d, useDeleteAgent as f, useUpdateAgent as p } from "./hooks/useAgents.js";
|
|
6
6
|
import { useCreateKnowledgeBase as m, useKnowledgeBase as h, useKnowledgeBases as g, useKnowledgeDocuments as _ } from "./hooks/useKnowledgeBases.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
export { t as BotlitProvider, e as BotmanorRoot, T as cn, E as formatDate, D as formatRelativeTime, l as useAgent, u as useAgents, i as useBot, n as useBotlit, r as useBotlitStore, a as useBots, x as useConfigureLLMProvider, v as useConversation, y as useConversations, d as useCreateAgent, o as useCreateBot, m as useCreateKnowledgeBase, C as useCreateMCPServer, f as useDeleteAgent, s as useDeleteBot, h as useKnowledgeBase, g as useKnowledgeBases, _ as useKnowledgeDocuments, S as useLLMProviders, w as useMCPServers, b as useSendMessage, p as useUpdateAgent, c as useUpdateBot };
|
|
7
|
+
import { useConfigureLLMProvider as v, useLLMProviders as y } from "./hooks/useLLMProviders.js";
|
|
8
|
+
import { useCreateMCPServer as b, useMCPServers as x } from "./hooks/useMCPServers.js";
|
|
9
|
+
import { cn as S } from "./utils/cn.js";
|
|
10
|
+
import { formatDate as C, formatRelativeTime as w } from "./utils/formatters.js";
|
|
11
|
+
export { t as BotlitProvider, e as BotmanorRoot, S as cn, C as formatDate, w as formatRelativeTime, l as useAgent, u as useAgents, i as useBot, n as useBotlit, r as useBotlitStore, a as useBots, v as useConfigureLLMProvider, d as useCreateAgent, o as useCreateBot, m as useCreateKnowledgeBase, b as useCreateMCPServer, f as useDeleteAgent, s as useDeleteBot, h as useKnowledgeBase, g as useKnowledgeBases, _ as useKnowledgeDocuments, y as useLLMProviders, x as useMCPServers, p as useUpdateAgent, c as useUpdateBot };
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
|
+
import { useBots as t } from "../hooks/useBots.js";
|
|
3
|
+
import { useAgents as n } from "../hooks/useAgents.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { Card as i, CardContent as a, CardDescription as o, CardHeader as s, CardTitle as c } from "../components/Card.js";
|
|
6
|
+
import { Button as l } from "../components/Button.js";
|
|
7
|
+
import { EmptyState as u } from "../components/EmptyState.js";
|
|
8
|
+
import { ErrorState as d } from "../components/ErrorState.js";
|
|
9
|
+
import { StatusBadge as f } from "../components/Badge.js";
|
|
10
|
+
import "../hooks/index.js";
|
|
11
|
+
import { useChannelConnectors as p } from "../hooks/useChannels.js";
|
|
12
|
+
import { usePolicies as m } from "../hooks/usePolicies.js";
|
|
13
|
+
import { useBucket as h, useChildBuckets as g } from "../hooks/useBuckets.js";
|
|
14
|
+
import { formatRelativeTime as _ } from "../utils/formatters.js";
|
|
15
|
+
import { PagePurpose as v } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
17
|
+
import { Link as x, useParams as S } from "react-router";
|
|
18
|
+
import { ArrowLeft as C, Bot as w, Folder as T, FolderOpen as E, MessageSquare as D, Shield as O, Users as k } from "lucide-react";
|
|
19
|
+
// src/botlit/pages/BucketDetailPage.tsx
|
|
20
|
+
var A = ({ title: e, icon: t, loading: n, error: r, onRetry: o, children: l }) => /* @__PURE__ */ b(i, { children: [/* @__PURE__ */ y(s, { children: /* @__PURE__ */ b(c, {
|
|
21
|
+
className: "flex items-center gap-2",
|
|
22
|
+
children: [t, e]
|
|
23
|
+
}) }), /* @__PURE__ */ y(a, { children: n ? /* @__PURE__ */ y("div", {
|
|
24
|
+
className: "space-y-2",
|
|
25
|
+
children: [1, 2].map((e) => /* @__PURE__ */ y("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
|
|
26
|
+
}) : r ? /* @__PURE__ */ y(d, {
|
|
27
|
+
resource: e.toLowerCase(),
|
|
28
|
+
error: r,
|
|
29
|
+
onRetry: () => void o()
|
|
30
|
+
}) : l })] }), j = () => {
|
|
31
|
+
let { bucketId: j } = S(), { getPath: M } = e(), { data: N, loading: P, error: F, refetch: I } = h(j), { data: L, loading: R, error: z, refetch: B } = g(N?.id), V = h(N?.parentBucketId ?? void 0), H = n(N?.id ? { bucketId: N.id } : void 0), U = t(N?.id ? { bucketId: N.id } : void 0), W = p(N?.id ? { bucketId: N.id } : void 0), G = m(N?.id ? { bucketId: N.id } : void 0);
|
|
32
|
+
if (P) return /* @__PURE__ */ y(r, {
|
|
33
|
+
title: "Bucket",
|
|
34
|
+
children: /* @__PURE__ */ y("div", {
|
|
35
|
+
className: "space-y-4",
|
|
36
|
+
children: [
|
|
37
|
+
1,
|
|
38
|
+
2,
|
|
39
|
+
3
|
|
40
|
+
].map((e) => /* @__PURE__ */ y("div", { className: "h-24 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
if (F) return /* @__PURE__ */ y(r, {
|
|
44
|
+
title: "Bucket",
|
|
45
|
+
children: /* @__PURE__ */ y(d, {
|
|
46
|
+
resource: "bucket",
|
|
47
|
+
error: F,
|
|
48
|
+
onRetry: () => void I()
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
if (!N) return /* @__PURE__ */ y(r, {
|
|
52
|
+
title: "Bucket not found",
|
|
53
|
+
children: /* @__PURE__ */ y(u, {
|
|
54
|
+
illustration: "empty-search",
|
|
55
|
+
title: "Bucket not found",
|
|
56
|
+
description: "This bucket may have been deleted, or the link is out of date.",
|
|
57
|
+
action: /* @__PURE__ */ y(l, {
|
|
58
|
+
leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
|
|
59
|
+
children: /* @__PURE__ */ y(x, {
|
|
60
|
+
to: M("buckets"),
|
|
61
|
+
children: "Back to Buckets"
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
let K = N.metadata && typeof N.metadata.visibility == "string" ? N.metadata.visibility : null, q = L;
|
|
67
|
+
return /* @__PURE__ */ y(r, {
|
|
68
|
+
title: N.name,
|
|
69
|
+
description: N.path,
|
|
70
|
+
actions: /* @__PURE__ */ y(l, {
|
|
71
|
+
variant: "outline",
|
|
72
|
+
leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
|
|
73
|
+
children: /* @__PURE__ */ y(x, {
|
|
74
|
+
to: M("buckets"),
|
|
75
|
+
children: "Back to Buckets"
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
children: /* @__PURE__ */ b("div", {
|
|
79
|
+
className: "space-y-6",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ y(v, {
|
|
82
|
+
icon: /* @__PURE__ */ y(T, { size: 18 }),
|
|
83
|
+
children: "Buckets group your agents, bots, channels and policies. This bucket contains its sub-buckets and every resource assigned to it, inherited down the hierarchy."
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ b(i, { children: [/* @__PURE__ */ b(s, { children: [/* @__PURE__ */ y(c, { children: "Details" }), /* @__PURE__ */ y(o, { children: N.description ?? "No description" })] }), /* @__PURE__ */ y(a, { children: /* @__PURE__ */ b("dl", {
|
|
86
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
89
|
+
className: "text-xs text-text-secondary",
|
|
90
|
+
children: "Slug"
|
|
91
|
+
}), /* @__PURE__ */ y("dd", {
|
|
92
|
+
className: "mt-1 text-sm font-medium",
|
|
93
|
+
children: N.slug
|
|
94
|
+
})] }),
|
|
95
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
96
|
+
className: "text-xs text-text-secondary",
|
|
97
|
+
children: "Visibility"
|
|
98
|
+
}), /* @__PURE__ */ y("dd", {
|
|
99
|
+
className: "mt-1 text-sm font-medium",
|
|
100
|
+
children: K ?? "—"
|
|
101
|
+
})] }),
|
|
102
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
103
|
+
className: "text-xs text-text-secondary",
|
|
104
|
+
children: "Created"
|
|
105
|
+
}), /* @__PURE__ */ y("dd", {
|
|
106
|
+
className: "mt-1 text-sm font-medium",
|
|
107
|
+
children: _(N.createdAt)
|
|
108
|
+
})] }),
|
|
109
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
110
|
+
className: "text-xs text-text-secondary",
|
|
111
|
+
children: "Parent bucket"
|
|
112
|
+
}), /* @__PURE__ */ y("dd", {
|
|
113
|
+
className: "mt-1 text-sm font-medium",
|
|
114
|
+
children: N.parentBucketId ? V.data ? /* @__PURE__ */ y(x, {
|
|
115
|
+
to: M(`buckets/${V.data.id}`),
|
|
116
|
+
className: "text-primary hover:underline",
|
|
117
|
+
children: V.data.name
|
|
118
|
+
}) : "—" : "Top level"
|
|
119
|
+
})] })
|
|
120
|
+
]
|
|
121
|
+
}) })] }),
|
|
122
|
+
/* @__PURE__ */ b(i, { children: [/* @__PURE__ */ b(s, { children: [/* @__PURE__ */ b(c, {
|
|
123
|
+
className: "flex items-center gap-2",
|
|
124
|
+
children: [/* @__PURE__ */ y(E, { size: 18 }), "Sub-buckets"]
|
|
125
|
+
}), /* @__PURE__ */ y(o, { children: "Direct children of this bucket" })] }), /* @__PURE__ */ y(a, { children: R ? /* @__PURE__ */ y("div", {
|
|
126
|
+
className: "space-y-2",
|
|
127
|
+
children: [1, 2].map((e) => /* @__PURE__ */ y("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
|
|
128
|
+
}) : z ? /* @__PURE__ */ y(d, {
|
|
129
|
+
resource: "sub-buckets",
|
|
130
|
+
error: z,
|
|
131
|
+
onRetry: () => void B()
|
|
132
|
+
}) : q.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
133
|
+
className: "divide-y divide-border-subtle",
|
|
134
|
+
children: q.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
135
|
+
to: M(`buckets/${e.id}`),
|
|
136
|
+
className: "flex items-center gap-2 py-2 text-sm hover:text-primary",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ y(T, {
|
|
139
|
+
size: 16,
|
|
140
|
+
className: "text-text-secondary"
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ y("span", {
|
|
143
|
+
className: "font-medium",
|
|
144
|
+
children: e.name
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ y("span", {
|
|
147
|
+
className: "text-xs text-text-secondary",
|
|
148
|
+
children: e.path
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}) }, e.id))
|
|
152
|
+
}) : /* @__PURE__ */ y("p", {
|
|
153
|
+
className: "text-sm text-text-secondary",
|
|
154
|
+
children: "No sub-buckets."
|
|
155
|
+
}) })] }),
|
|
156
|
+
/* @__PURE__ */ b("div", {
|
|
157
|
+
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ y(A, {
|
|
160
|
+
title: "Agents",
|
|
161
|
+
icon: /* @__PURE__ */ y(w, { size: 18 }),
|
|
162
|
+
loading: H.loading,
|
|
163
|
+
error: H.error,
|
|
164
|
+
onRetry: H.refetch,
|
|
165
|
+
children: H.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
166
|
+
className: "divide-y divide-border-subtle",
|
|
167
|
+
children: H.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
168
|
+
to: M(`agents/${e.id}`),
|
|
169
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
170
|
+
children: [/* @__PURE__ */ y("span", {
|
|
171
|
+
className: "font-medium",
|
|
172
|
+
children: e.name
|
|
173
|
+
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
174
|
+
}) }, e.id))
|
|
175
|
+
}) : /* @__PURE__ */ y("p", {
|
|
176
|
+
className: "text-sm text-text-secondary",
|
|
177
|
+
children: "No agents in this bucket."
|
|
178
|
+
})
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ y(A, {
|
|
181
|
+
title: "Bots",
|
|
182
|
+
icon: /* @__PURE__ */ y(k, { size: 18 }),
|
|
183
|
+
loading: U.loading,
|
|
184
|
+
error: U.error,
|
|
185
|
+
onRetry: U.refetch,
|
|
186
|
+
children: U.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
187
|
+
className: "divide-y divide-border-subtle",
|
|
188
|
+
children: U.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
189
|
+
to: M(`bots/${e.id}`),
|
|
190
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
191
|
+
children: [/* @__PURE__ */ y("span", {
|
|
192
|
+
className: "font-medium",
|
|
193
|
+
children: e.name
|
|
194
|
+
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
195
|
+
}) }, e.id))
|
|
196
|
+
}) : /* @__PURE__ */ y("p", {
|
|
197
|
+
className: "text-sm text-text-secondary",
|
|
198
|
+
children: "No bots in this bucket."
|
|
199
|
+
})
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ y(A, {
|
|
202
|
+
title: "Channels",
|
|
203
|
+
icon: /* @__PURE__ */ y(D, { size: 18 }),
|
|
204
|
+
loading: W.loading,
|
|
205
|
+
error: W.error,
|
|
206
|
+
onRetry: W.refetch,
|
|
207
|
+
children: W.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
208
|
+
className: "divide-y divide-border-subtle",
|
|
209
|
+
children: W.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
210
|
+
to: M(`channels/${e.id}`),
|
|
211
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
212
|
+
children: [/* @__PURE__ */ y("span", {
|
|
213
|
+
className: "font-medium",
|
|
214
|
+
children: e.name
|
|
215
|
+
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
216
|
+
}) }, e.id))
|
|
217
|
+
}) : /* @__PURE__ */ y("p", {
|
|
218
|
+
className: "text-sm text-text-secondary",
|
|
219
|
+
children: "No channels in this bucket."
|
|
220
|
+
})
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ y(A, {
|
|
223
|
+
title: "Policies",
|
|
224
|
+
icon: /* @__PURE__ */ y(O, { size: 18 }),
|
|
225
|
+
loading: G.loading,
|
|
226
|
+
error: G.error,
|
|
227
|
+
onRetry: G.refetch,
|
|
228
|
+
children: G.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
229
|
+
className: "divide-y divide-border-subtle",
|
|
230
|
+
children: G.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
231
|
+
to: M(`policies/${e.id}`),
|
|
232
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
233
|
+
children: [/* @__PURE__ */ y("span", {
|
|
234
|
+
className: "font-medium",
|
|
235
|
+
children: e.name
|
|
236
|
+
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
237
|
+
}) }, e.id))
|
|
238
|
+
}) : /* @__PURE__ */ y("p", {
|
|
239
|
+
className: "text-sm text-text-secondary",
|
|
240
|
+
children: "No policies in this bucket."
|
|
241
|
+
})
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
export { j as BucketDetailPage };
|
|
250
|
+
|
|
251
|
+
//# sourceMappingURL=BucketDetailPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BucketDetailPage.js","names":["ItemSection","Card","CardHeader","CardTitle","icon","title","CardContent","loading","i","error","ErrorState","onRetry","children","BucketDetailPage","useParams","useBotlit","bucket","bucketLoading","bucketError","refetchBucket","useBucket","bucketId","childrenLoading","childrenError","refetchChildren","useChildBuckets","parent","agents","useAgents","bots","useBots","channels","useChannelConnectors","policies","usePolicies","PageLayout","EmptyState","Button","ArrowLeft","Link","getPath","visibility","childList","PagePurpose","Folder","CardDescription","formatRelativeTime","FolderOpen","child","Bot","agent","StatusBadge","Users","bot","MessageSquare","channel","Shield","policy"],"sources":["../../../src/botlit/pages/BucketDetailPage.tsx"],"sourcesContent":["/**\n * Bucket Detail Page\n * @module botlit/pages\n *\n * A `Bucket` on wspace-botlit-svc is a hierarchical folder for BotManor\n * resources. The detail view reads the existing `getBucket` /\n * `listBuckets(filters: { parentBucketId })` operations plus the\n * `bucketId` filters every contained entity already exposes (agents, bots,\n * channels, policies) — no backend change is required.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { Link, useParams } from 'react-router';\nimport { ArrowLeft, Bot, Folder, FolderOpen, MessageSquare, Shield, Users } from 'lucide-react';\nimport { PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { PageLayout } from '../components/PageLayout';\nimport { Card, CardHeader, CardTitle, CardContent, CardDescription } from '../components/Card';\nimport { Button } from '../components/Button';\nimport { EmptyState } from '../components/EmptyState';\nimport { ErrorState } from '../components/ErrorState';\nimport { StatusBadge } from '../components/Badge';\nimport {\n useBucket,\n useChildBuckets,\n useAgents,\n useBots,\n useChannelConnectors,\n usePolicies,\n} from '../hooks';\nimport { formatRelativeTime, MISSING_VALUE } from '../utils/formatters';\n\n/** One \"contained items\" section: entities of a single type living in the bucket. */\nconst ItemSection: FC<{\n title: string;\n icon: ReactNode;\n loading: boolean;\n error: Error | undefined;\n onRetry: () => Promise<void>;\n children: ReactNode;\n}> = ({ title, icon, loading, error, onRetry, children }) => (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n {icon}\n {title}\n </CardTitle>\n </CardHeader>\n <CardContent>\n {loading ? (\n <div className=\"space-y-2\">\n {[1, 2].map((i) => (\n <div key={i} className=\"h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded\" />\n ))}\n </div>\n ) : error ? (\n <ErrorState resource={title.toLowerCase()} error={error} onRetry={() => void onRetry()} />\n ) : (\n children\n )}\n </CardContent>\n </Card>\n);\n\nexport const BucketDetailPage: FC = () => {\n const { bucketId } = useParams();\n const { getPath } = useBotlit();\n\n const {\n data: bucket,\n loading: bucketLoading,\n error: bucketError,\n refetch: refetchBucket,\n } = useBucket(bucketId);\n const {\n data: children,\n loading: childrenLoading,\n error: childrenError,\n refetch: refetchChildren,\n } = useChildBuckets(bucket?.id);\n const parent = useBucket(bucket?.parentBucketId ?? undefined);\n\n const agents = useAgents(bucket?.id ? { bucketId: bucket.id } : undefined);\n const bots = useBots(bucket?.id ? { bucketId: bucket.id } : undefined);\n const channels = useChannelConnectors(bucket?.id ? { bucketId: bucket.id } : undefined);\n const policies = usePolicies(bucket?.id ? { bucketId: bucket.id } : undefined);\n\n if (bucketLoading) {\n return (\n <PageLayout title=\"Bucket\">\n <div className=\"space-y-4\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"h-24 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg\" />\n ))}\n </div>\n </PageLayout>\n );\n }\n\n if (bucketError) {\n return (\n <PageLayout title=\"Bucket\">\n <ErrorState resource=\"bucket\" error={bucketError} onRetry={() => void refetchBucket()} />\n </PageLayout>\n );\n }\n\n if (!bucket) {\n return (\n <PageLayout title=\"Bucket not found\">\n <EmptyState\n illustration=\"empty-search\"\n title=\"Bucket not found\"\n description=\"This bucket may have been deleted, or the link is out of date.\"\n action={\n <Button leftIcon={<ArrowLeft size={16} />}>\n <Link to={getPath('buckets')}>Back to Buckets</Link>\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n const visibility =\n bucket.metadata && typeof bucket.metadata.visibility === 'string'\n ? bucket.metadata.visibility\n : null;\n const childList = children;\n\n return (\n <PageLayout\n title={bucket.name}\n description={bucket.path}\n actions={\n <Button variant=\"outline\" leftIcon={<ArrowLeft size={16} />}>\n <Link to={getPath('buckets')}>Back to Buckets</Link>\n </Button>\n }\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Folder size={18} />}>\n Buckets group your agents, bots, channels and policies. This bucket contains its\n sub-buckets and every resource assigned to it, inherited down the hierarchy.\n </PagePurpose>\n\n {/* Overview */}\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n <CardDescription>{bucket.description ?? 'No description'}</CardDescription>\n </CardHeader>\n <CardContent>\n <dl className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <div>\n <dt className=\"text-xs text-text-secondary\">Slug</dt>\n <dd className=\"mt-1 text-sm font-medium\">{bucket.slug}</dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">Visibility</dt>\n <dd className=\"mt-1 text-sm font-medium\">{visibility ?? MISSING_VALUE}</dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">Created</dt>\n <dd className=\"mt-1 text-sm font-medium\">{formatRelativeTime(bucket.createdAt)}</dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">Parent bucket</dt>\n <dd className=\"mt-1 text-sm font-medium\">\n {bucket.parentBucketId ? (\n parent.data ? (\n <Link\n to={getPath(`buckets/${parent.data.id}`)}\n className=\"text-primary hover:underline\"\n >\n {parent.data.name}\n </Link>\n ) : (\n MISSING_VALUE\n )\n ) : (\n 'Top level'\n )}\n </dd>\n </div>\n </dl>\n </CardContent>\n </Card>\n\n {/* Sub-buckets */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <FolderOpen size={18} />\n Sub-buckets\n </CardTitle>\n <CardDescription>Direct children of this bucket</CardDescription>\n </CardHeader>\n <CardContent>\n {childrenLoading ? (\n <div className=\"space-y-2\">\n {[1, 2].map((i) => (\n <div\n key={i}\n className=\"h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded\"\n />\n ))}\n </div>\n ) : childrenError ? (\n <ErrorState\n resource=\"sub-buckets\"\n error={childrenError}\n onRetry={() => void refetchChildren()}\n />\n ) : childList.length > 0 ? (\n <ul className=\"divide-y divide-border-subtle\">\n {childList.map((child) => (\n <li key={child.id}>\n <Link\n to={getPath(`buckets/${child.id}`)}\n className=\"flex items-center gap-2 py-2 text-sm hover:text-primary\"\n >\n <Folder size={16} className=\"text-text-secondary\" />\n <span className=\"font-medium\">{child.name}</span>\n <span className=\"text-xs text-text-secondary\">{child.path}</span>\n </Link>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">No sub-buckets.</p>\n )}\n </CardContent>\n </Card>\n\n {/* Contained items */}\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-2\">\n <ItemSection\n title=\"Agents\"\n icon={<Bot size={18} />}\n loading={agents.loading}\n error={agents.error}\n onRetry={agents.refetch}\n >\n {agents.data.length > 0 ? (\n <ul className=\"divide-y divide-border-subtle\">\n {agents.data.map((agent) => (\n <li key={agent.id}>\n <Link\n to={getPath(`agents/${agent.id}`)}\n className=\"flex items-center justify-between gap-2 py-2 text-sm hover:text-primary\"\n >\n <span className=\"font-medium\">{agent.name}</span>\n <StatusBadge status={agent.status} />\n </Link>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">No agents in this bucket.</p>\n )}\n </ItemSection>\n\n <ItemSection\n title=\"Bots\"\n icon={<Users size={18} />}\n loading={bots.loading}\n error={bots.error}\n onRetry={bots.refetch}\n >\n {bots.data.length > 0 ? (\n <ul className=\"divide-y divide-border-subtle\">\n {bots.data.map((bot) => (\n <li key={bot.id}>\n <Link\n to={getPath(`bots/${bot.id}`)}\n className=\"flex items-center justify-between gap-2 py-2 text-sm hover:text-primary\"\n >\n <span className=\"font-medium\">{bot.name}</span>\n <StatusBadge status={bot.status} />\n </Link>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">No bots in this bucket.</p>\n )}\n </ItemSection>\n\n <ItemSection\n title=\"Channels\"\n icon={<MessageSquare size={18} />}\n loading={channels.loading}\n error={channels.error}\n onRetry={channels.refetch}\n >\n {channels.data.length > 0 ? (\n <ul className=\"divide-y divide-border-subtle\">\n {channels.data.map((channel) => (\n <li key={channel.id}>\n <Link\n to={getPath(`channels/${channel.id}`)}\n className=\"flex items-center justify-between gap-2 py-2 text-sm hover:text-primary\"\n >\n <span className=\"font-medium\">{channel.name}</span>\n <StatusBadge status={channel.status} />\n </Link>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">No channels in this bucket.</p>\n )}\n </ItemSection>\n\n <ItemSection\n title=\"Policies\"\n icon={<Shield size={18} />}\n loading={policies.loading}\n error={policies.error}\n onRetry={policies.refetch}\n >\n {policies.data.length > 0 ? (\n <ul className=\"divide-y divide-border-subtle\">\n {policies.data.map((policy) => (\n <li key={policy.id}>\n <Link\n to={getPath(`policies/${policy.id}`)}\n className=\"flex items-center justify-between gap-2 py-2 text-sm hover:text-primary\"\n >\n <span className=\"font-medium\">{policy.name}</span>\n <StatusBadge status={policy.status} />\n </Link>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">No policies in this bucket.</p>\n )}\n </ItemSection>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,KAOA,EAAE,UAAO,SAAM,YAAS,UAAO,YAAS,kBAC5C,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD;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S;OAClB,OAAOA,EAAS;OAChB,SAASA,EAAS;OAEjB,UAAAA,EAAS,KAAK,SAAS,IACtB,kBAAC,MAAD;QAAI,WAAU;QACX,UAAAA,EAAS,KAAK,KAAK,MAClB,kBAAC,MAAD,EAAA,UACE,kBAACM,GAAD;SACE,IAAIC,EAAQ,YAAYiB,EAAO,IAAI;SACnC,WAAU;SAFZ,UAAA,CAIE,kBAAC,QAAD;UAAM,WAAU;UAAe,UAAAA,EAAO;SAAW,CAAA,GACjD,kBAACN,GAAD,EAAa,QAAQM,EAAO,OAAS,CAAA,CACjC;QACJ,CAAA,EAAA,GARKA,EAAO,EAQZ,CACL;OACC,CAAA,IAEJ,kBAAC,KAAD;QAAG,WAAU;QAA8B,UAAA;OAA8B,CAAA;MAEhE,CAAA;KACV;;GACF;;CACK,CAAA;AAEhB"}
|
|
@@ -30,10 +30,9 @@ export { ExecutionsPage } from './ExecutionsPage';
|
|
|
30
30
|
export { AiOperationsPage } from './AiOperationsPage';
|
|
31
31
|
export { ExecutionDetailPage } from './ExecutionDetailPage';
|
|
32
32
|
export { BucketsPage } from './BucketsPage';
|
|
33
|
+
export { BucketDetailPage } from './BucketDetailPage';
|
|
33
34
|
export { StorePage } from './StorePage';
|
|
34
35
|
export { StorePackageDetailPage } from './StorePackageDetailPage';
|
|
35
36
|
export { InstalledPackagesPage } from './InstalledPackagesPage';
|
|
36
|
-
export { ConversationsPage } from './ConversationsPage';
|
|
37
|
-
export { ConversationDetailPage } from './ConversationDetailPage';
|
|
38
37
|
export { ChatPage } from './ChatPage';
|
|
39
38
|
export { SettingsPage } from './SettingsPage';
|