@burdenoff/microfe-botmanor 2026.1120.25 → 2026.1120.27

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 (47) hide show
  1. package/dist/botlit/BotmanorRootInner.js +43 -41
  2. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  3. package/dist/botlit/components/ChannelRoutesPanel.js +8 -8
  4. package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
  5. package/dist/botlit/components/CreateChannelRouteDialog.js +7 -7
  6. package/dist/botlit/components/GettingStartedChecklist.d.ts +13 -0
  7. package/dist/botlit/components/GettingStartedChecklist.js +126 -0
  8. package/dist/botlit/components/GettingStartedChecklist.js.map +1 -0
  9. package/dist/botlit/components/PageLayout.d.ts +7 -0
  10. package/dist/botlit/components/PageLayout.js +4 -1
  11. package/dist/botlit/components/PageLayout.js.map +1 -1
  12. package/dist/botlit/hooks/useBuckets.js +97 -94
  13. package/dist/botlit/hooks/useBuckets.js.map +1 -1
  14. package/dist/botlit/hooks/useStorePublishing.d.ts +1 -1
  15. package/dist/botlit/index.d.ts +1 -0
  16. package/dist/botlit/index.js +2 -1
  17. package/dist/botlit/pages/AgentsListPage.js +1 -0
  18. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  19. package/dist/botlit/pages/BotChannelsTab.js +58 -58
  20. package/dist/botlit/pages/BotsListPage.js +1 -0
  21. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  22. package/dist/botlit/pages/BucketDetailPage.js +54 -50
  23. package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
  24. package/dist/botlit/pages/BucketsPage.js +3 -3
  25. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  26. package/dist/botlit/pages/ChannelDetailPage.js +12 -12
  27. package/dist/botlit/pages/ChannelsPage.js +6 -6
  28. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  29. package/dist/botlit/pages/ChatPage.js +1 -0
  30. package/dist/botlit/pages/ChatPage.js.map +1 -1
  31. package/dist/botlit/pages/DashboardPage.js +33 -26
  32. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  33. package/dist/botlit/pages/ExecutionsPage.js +9 -8
  34. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  35. package/dist/botlit/pages/KnowledgeBasesPage.js +1 -0
  36. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  37. package/dist/botlit/tours/tourRoutes.d.ts +25 -0
  38. package/dist/botlit/tours/tourRoutes.js +108 -0
  39. package/dist/botlit/tours/tourRoutes.js.map +1 -0
  40. package/dist/botlit/utils/gettingStarted.d.ts +16 -0
  41. package/dist/botlit/utils/gettingStarted.js +7 -0
  42. package/dist/botlit/utils/gettingStarted.js.map +1 -0
  43. package/dist/generated/wspace-operations.d.ts +33 -0
  44. package/dist/generated/wspace-operations.js +93 -87
  45. package/dist/generated/wspace-operations.js.map +1 -1
  46. package/dist/index.js +2 -1
  47. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":["PageLayout","cn","className","hero","AuroraBackground","leading","meta","title","description","actions"],"sources":["../../../src/botlit/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module botlit/components\n *\n * Boff UI 2.0: the page header uses a seam border and can optionally host the\n * living-glass `AuroraBackground` (the ONE hero backdrop per MFE — opt in via\n * `hero`). The aurora sits behind the header content at -z-10 and never moves\n * page content. Reduced-motion is honoured by the primitive.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AuroraBackground } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n /** The page heading. Keep it to the page's name: everything in here is part of the `h1`'s accessible name. */\n title: ReactNode;\n /** Rendered before the heading, outside it (for example a Back button). */\n leading?: ReactNode;\n /** Rendered beside the heading, outside it (for example a status badge). */\n meta?: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n /** Render the aurora hero backdrop behind the header (one per MFE). */\n hero?: boolean;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n leading,\n meta,\n description,\n actions,\n children,\n className,\n hero = false,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n {/* Page Header */}\n <div\n className={cn(\n 'relative flex items-center justify-between gap-4 px-6 py-4 border-b border-border-seam',\n hero ? 'overflow-hidden bg-hero-mesh' : 'bg-bg-surface'\n )}\n >\n {hero && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"flex min-w-0 items-center gap-3\">\n {leading}\n <div className=\"min-w-0\">\n {meta ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-text-primary\">{title}</h1>\n {meta}\n </div>\n ) : (\n <h1 className=\"text-2xl font-semibold tracking-tight text-text-primary\">{title}</h1>\n )}\n {description && <p className=\"mt-1 text-sm text-text-secondary\">{description}</p>}\n </div>\n </div>\n {actions && <div className=\"flex flex-shrink-0 items-center gap-3\">{actions}</div>}\n </div>\n\n {/* Page Content */}\n <div className=\"flex-1 overflow-auto p-6\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;AA6BA,IAAaA,KAAmC,EAC9C,UACA,YACA,SACA,gBACA,YACA,aACA,cACA,UAAO,SAGL,kBAAC,OAAD;CAAK,WAAWC,EAAG,wBAAwBC,CAAS;CAApD,UAAA,CAEE,kBAAC,OAAD;EACE,WAAWD,EACT,0FACAE,IAAO,iCAAiC,eAC1C;EAJF,UAAA;GAMGA,KAAQ,kBAACC,GAAD,EAAkB,WAAU,SAAU,CAAA;GAC/C,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACGC,GACD,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACGC,IACC,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,MAAD;OAAI,WAAU;OAA2D,UAAAC;MAAU,CAAA,GAClFD,CACE;KAEL,CAAA,IAAA,kBAAC,MAAD;MAAI,WAAU;MAA2D,UAAAC;KAAU,CAAA,GAEpFC,KAAe,kBAAC,KAAD;MAAG,WAAU;MAAoC,UAAAA;KAAe,CAAA,CAC7E;IACF,CAAA,CAAA;;GACJC,KAAW,kBAAC,OAAD;IAAK,WAAU;IAAyC,UAAAA;GAAa,CAAA;EAC9E;CAGL,CAAA,GAAA,kBAAC,OAAD;EAAK,WAAU;EAA4B;CAAc,CAAA,CACtD"}
1
+ {"version":3,"file":"PageLayout.js","names":["PageLayout","cn","className","tourId","hero","AuroraBackground","leading","meta","title","description","actions"],"sources":["../../../src/botlit/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module botlit/components\n *\n * Boff UI 2.0: the page header uses a seam border and can optionally host the\n * living-glass `AuroraBackground` (the ONE hero backdrop per MFE — opt in via\n * `hero`). The aurora sits behind the header content at -z-10 and never moves\n * page content. Reduced-motion is honoured by the primitive.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AuroraBackground } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n /** The page heading. Keep it to the page's name: everything in here is part of the `h1`'s accessible name. */\n title: ReactNode;\n /** Rendered before the heading, outside it (for example a Back button). */\n leading?: ReactNode;\n /** Rendered beside the heading, outside it (for example a status badge). */\n meta?: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n /** Render the aurora hero backdrop behind the header (one per MFE). */\n hero?: boolean;\n /**\n * Product-tour anchor prefix (BOFF-15482), e.g. `botmanor-bots`. Adds\n * `data-tour=\"<id>-header\"`, `-actions` and `-content` so tours stored in the\n * tours service can spotlight the page in every state (loading, empty, error).\n * See `tours/tourRoutes.ts` for the anchors tours may rely on.\n */\n tourId?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n leading,\n meta,\n description,\n actions,\n children,\n className,\n hero = false,\n tourId,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n {/* Page Header */}\n <div\n data-tour={tourId ? `${tourId}-header` : undefined}\n className={cn(\n 'relative flex items-center justify-between gap-4 px-6 py-4 border-b border-border-seam',\n hero ? 'overflow-hidden bg-hero-mesh' : 'bg-bg-surface'\n )}\n >\n {hero && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"flex min-w-0 items-center gap-3\">\n {leading}\n <div className=\"min-w-0\">\n {meta ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-text-primary\">{title}</h1>\n {meta}\n </div>\n ) : (\n <h1 className=\"text-2xl font-semibold tracking-tight text-text-primary\">{title}</h1>\n )}\n {description && <p className=\"mt-1 text-sm text-text-secondary\">{description}</p>}\n </div>\n </div>\n {actions && (\n <div\n data-tour={tourId ? `${tourId}-actions` : undefined}\n className=\"flex flex-shrink-0 items-center gap-3\"\n >\n {actions}\n </div>\n )}\n </div>\n\n {/* Page Content */}\n <div\n data-tour={tourId ? `${tourId}-content` : undefined}\n className=\"flex-1 overflow-auto p-6\"\n >\n {children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAoCA,IAAaA,KAAmC,EAC9C,UACA,YACA,SACA,gBACA,YACA,aACA,cACA,UAAO,IACP,gBAGE,kBAAC,OAAD;CAAK,WAAWC,EAAG,wBAAwBC,CAAS;CAApD,UAAA,CAEE,kBAAC,OAAD;EACE,aAAWC,IAAS,GAAGA,EAAO,WAAW,KAAA;EACzC,WAAWF,EACT,0FACAG,IAAO,iCAAiC,eAC1C;EALF,UAAA;GAOGA,KAAQ,kBAACC,GAAD,EAAkB,WAAU,SAAU,CAAA;GAC/C,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACGC,GACD,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACGC,IACC,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,MAAD;OAAI,WAAU;OAA2D,UAAAC;MAAU,CAAA,GAClFD,CACE;KAEL,CAAA,IAAA,kBAAC,MAAD;MAAI,WAAU;MAA2D,UAAAC;KAAU,CAAA,GAEpFC,KAAe,kBAAC,KAAD;MAAG,WAAU;MAAoC,UAAAA;KAAe,CAAA,CAC7E;IACF,CAAA,CAAA;;GACJC,KACC,kBAAC,OAAD;IACE,aAAWP,IAAS,GAAGA,EAAO,YAAY,KAAA;IAC1C,WAAU;IAET,UAAAO;GACE,CAAA;EAEJ;CAGL,CAAA,GAAA,kBAAC,OAAD;EACE,aAAWP,IAAS,GAAGA,EAAO,YAAY,KAAA;EAC1C,WAAU;EAET;CACE,CAAA,CACF"}
@@ -1,8 +1,9 @@
1
1
  import { CountBucketsDocument as e, CreateBucketDocument as t, DeleteBucketDocument as n, GetBucketContentsDocument as r, GetBucketDocument as i, ListBucketsDocument as a, SearchBucketsDocument as o, UpdateBucketDocument as s } from "../../generated/wspace-operations.js";
2
- import { buildMutationInput as c, fieldsOf as l } from "./internal/mutationInput.js";
3
- import { useWorkspaceAllPagesQuery as u, useWorkspaceId as d, useWorkspaceMutation as f, useWorkspacePaginatedQuery as p, useWorkspaceQuery as m } from "./internal/workspaceGateway.js";
4
- import { useCallback as h, useMemo as g } from "react";
5
- var _ = l({
2
+ import { useTr as c } from "../../shared/hooks/useTr.js";
3
+ import { buildMutationInput as l, fieldsOf as u } from "./internal/mutationInput.js";
4
+ import { useWorkspaceAllPagesQuery as d, useWorkspaceId as f, useWorkspaceMutation as p, useWorkspacePaginatedQuery as m, useWorkspaceQuery as h } from "./internal/workspaceGateway.js";
5
+ import { useCallback as g, useMemo as _ } from "react";
6
+ var v = u({
6
7
  color: !0,
7
8
  context: !0,
8
9
  description: !0,
@@ -12,7 +13,7 @@ var _ = l({
12
13
  parentBucketId: !0,
13
14
  slug: !0,
14
15
  workspaceId: !0
15
- }), v = l({
16
+ }), y = u({
16
17
  color: !0,
17
18
  context: !0,
18
19
  description: !0,
@@ -21,17 +22,17 @@ var _ = l({
21
22
  name: !0,
22
23
  parentBucketId: !0,
23
24
  slug: !0
24
- }), y = [], b = [];
25
- function x(e) {
26
- return e?.listBuckets ?? y;
27
- }
25
+ }), b = [], x = [];
28
26
  function S(e) {
29
- return e;
27
+ return e?.listBuckets ?? b;
30
28
  }
31
29
  function C(e) {
32
- return e?.getBucket ?? null;
30
+ return e;
33
31
  }
34
32
  function w(e) {
33
+ return e?.getBucket ?? null;
34
+ }
35
+ function T(e) {
35
36
  let t = /* @__PURE__ */ new Map();
36
37
  for (let n of e) t.has(n.id) || t.set(n.id, {
37
38
  ...n,
@@ -48,7 +49,7 @@ function w(e) {
48
49
  };
49
50
  return i(n), n;
50
51
  }
51
- function T(e) {
52
+ function E(e) {
52
53
  let t = /* @__PURE__ */ new Map();
53
54
  for (let n of e) {
54
55
  for (let e of n.ancestors) t.set(e.id, e);
@@ -56,140 +57,142 @@ function T(e) {
56
57
  }
57
58
  return [...t.values()];
58
59
  }
59
- function E(e, t = !0) {
60
- let n = d(), r = g(() => ({ filters: {
61
- workspaceId: n,
60
+ function D(e, t = !0) {
61
+ let n = c(), r = f(), i = _(() => ({ filters: {
62
+ workspaceId: r,
62
63
  parentBucketId: e
63
- } }), [n, e]);
64
- return p({
64
+ } }), [r, e]);
65
+ return m({
65
66
  document: a,
66
- variables: r,
67
+ variables: i,
67
68
  pageSize: 50,
68
- extractRows: x,
69
- select: S,
70
- fallback: y,
71
- enabled: !!n && t,
72
- errorMessage: "Failed to load buckets"
69
+ extractRows: S,
70
+ select: C,
71
+ fallback: b,
72
+ enabled: !!r && t,
73
+ errorMessage: n("botlit.buckets.errors.loadListFailed", "Failed to load buckets")
73
74
  });
74
75
  }
75
- function D() {
76
- let e = d(), t = g(() => ({ filters: { workspaceId: e } }), [e]);
77
- return p({
76
+ function O() {
77
+ let e = c(), t = f(), n = _(() => ({ filters: { workspaceId: t } }), [t]);
78
+ return m({
78
79
  document: a,
79
- variables: t,
80
+ variables: n,
80
81
  pageSize: 50,
81
- extractRows: x,
82
- select: S,
83
- fallback: y,
84
- enabled: !!e,
85
- errorMessage: "Failed to load buckets"
82
+ extractRows: S,
83
+ select: C,
84
+ fallback: b,
85
+ enabled: !!t,
86
+ errorMessage: e("botlit.buckets.errors.loadListFailed", "Failed to load buckets")
86
87
  });
87
88
  }
88
- function O(e = !0) {
89
- let t = d(), n = g(() => ({ filters: { workspaceId: t } }), [t]);
90
- return u({
89
+ function k(e = !0) {
90
+ let t = c(), n = f(), r = _(() => ({ filters: { workspaceId: n } }), [n]);
91
+ return d({
91
92
  document: a,
92
- variables: n,
93
+ variables: r,
93
94
  pageSize: 50,
94
- extractRows: x,
95
- select: S,
96
- fallback: y,
97
- enabled: !!t && e,
98
- errorMessage: "Failed to load buckets"
95
+ extractRows: S,
96
+ select: C,
97
+ fallback: b,
98
+ enabled: !!n && e,
99
+ errorMessage: t("botlit.buckets.errors.loadListFailed", "Failed to load buckets")
99
100
  });
100
101
  }
101
- function k(e) {
102
- let t = d(), n = e.trim(), r = g(() => ({ filters: {
103
- workspaceId: t,
104
- search: n
105
- } }), [t, n]);
106
- return p({
102
+ function A(e) {
103
+ let t = c(), n = f(), r = e.trim(), i = _(() => ({ filters: {
104
+ workspaceId: n,
105
+ search: r
106
+ } }), [n, r]);
107
+ return m({
107
108
  document: o,
108
- variables: r,
109
+ variables: i,
109
110
  pageSize: 50,
110
- extractRows: (e) => e?.listBuckets ?? b,
111
- select: S,
112
- fallback: b,
113
- enabled: !!t && n.length > 0,
114
- errorMessage: "Failed to search buckets"
111
+ extractRows: (e) => e?.listBuckets ?? x,
112
+ select: C,
113
+ fallback: x,
114
+ enabled: !!n && r.length > 0,
115
+ errorMessage: t("botlit.buckets.errors.searchFailed", "Failed to search buckets")
115
116
  });
116
117
  }
117
- function A(t) {
118
- let n = d(), { parentBucketId: r, search: i } = t, a = "parentBucketId" in t, o = g(() => ({ filters: {
119
- workspaceId: n,
120
- ...a ? { parentBucketId: r ?? null } : {},
121
- ...i?.trim() ? { search: i.trim() } : {}
118
+ function j(t) {
119
+ let n = c(), r = f(), { parentBucketId: i, search: a } = t, o = "parentBucketId" in t, s = _(() => ({ filters: {
120
+ workspaceId: r,
121
+ ...o ? { parentBucketId: i ?? null } : {},
122
+ ...a?.trim() ? { search: a.trim() } : {}
122
123
  } }), [
123
- n,
124
- a,
125
124
  r,
126
- i
125
+ o,
126
+ i,
127
+ a
127
128
  ]);
128
- return m({
129
+ return h({
129
130
  document: e,
130
- variables: o,
131
+ variables: s,
131
132
  select: (e) => e?.countBuckets ?? null,
132
133
  fallback: null,
133
- enabled: !!n,
134
- errorMessage: "Failed to count buckets"
134
+ enabled: !!r,
135
+ errorMessage: n("botlit.buckets.errors.countFailed", "Failed to count buckets")
135
136
  });
136
137
  }
137
- function j(e) {
138
- return E(e ?? null, !!e);
139
- }
140
138
  function M(e) {
141
- let t = g(() => ({ id: e ?? "" }), [e]);
142
- return m({
139
+ return D(e ?? null, !!e);
140
+ }
141
+ function N(e) {
142
+ let t = c(), n = _(() => ({ id: e ?? "" }), [e]);
143
+ return h({
143
144
  document: i,
144
- variables: t,
145
- select: C,
145
+ variables: n,
146
+ select: w,
146
147
  fallback: null,
147
148
  enabled: !!e,
148
- errorMessage: "Failed to load bucket"
149
+ errorMessage: t("botlit.buckets.errors.loadFailed", "Failed to load bucket")
149
150
  });
150
151
  }
151
- function N(e) {
152
- let t = g(() => ({ id: e ?? "" }), [e]);
153
- return m({
152
+ function P(e) {
153
+ let t = c(), n = _(() => ({ id: e ?? "" }), [e]);
154
+ return h({
154
155
  document: r,
155
- variables: t,
156
+ variables: n,
156
157
  select: (e) => e?.getBucket?.contents ?? null,
157
158
  fallback: null,
158
159
  enabled: !!e,
159
- errorMessage: "Failed to load the bucket contents"
160
+ errorMessage: t("botlit.buckets.errors.contentsFailed", "Failed to load the bucket contents")
160
161
  });
161
162
  }
162
- function P() {
163
- let e = d(), n = h((t) => ({ input: c({
164
- ...t,
165
- workspaceId: e
166
- }, _) }), [e]);
167
- return f({
163
+ function F() {
164
+ let e = c(), n = f(), r = g((e) => ({ input: l({
165
+ ...e,
166
+ workspaceId: n
167
+ }, v) }), [n]);
168
+ return p({
168
169
  document: t,
169
- variables: n,
170
+ variables: r,
170
171
  select: (e) => e?.createBucket,
171
- errorMessage: "Failed to create bucket"
172
+ errorMessage: e("botlit.buckets.errors.createFailed", "Failed to create bucket")
172
173
  });
173
174
  }
174
- function F() {
175
- return f({
175
+ function I() {
176
+ let e = c();
177
+ return p({
176
178
  document: s,
177
179
  variables: ({ bucketId: e, input: t }) => ({
178
180
  id: e,
179
- input: c(t, v)
181
+ input: l(t, y)
180
182
  }),
181
183
  select: (e) => e?.updateBucket,
182
- errorMessage: "Failed to update bucket"
184
+ errorMessage: e("botlit.buckets.errors.updateFailed", "Failed to update bucket")
183
185
  });
184
186
  }
185
- function I() {
186
- return f({
187
+ function L() {
188
+ let e = c();
189
+ return p({
187
190
  document: n,
188
191
  variables: (e) => ({ id: e }),
189
192
  select: (e) => e?.deleteBucket,
190
- errorMessage: "Failed to delete bucket"
193
+ errorMessage: e("botlit.buckets.errors.deleteFailed", "Failed to delete bucket")
191
194
  });
192
195
  }
193
- export { w as buildBucketTree, T as searchTreeRows, O as useAllBuckets, M as useBucket, E as useBucketBranch, N as useBucketContents, A as useBucketCount, k as useBucketSearch, D as useBuckets, j as useChildBuckets, P as useCreateBucket, I as useDeleteBucket, F as useUpdateBucket };
196
+ export { T as buildBucketTree, E as searchTreeRows, k as useAllBuckets, N as useBucket, D as useBucketBranch, P as useBucketContents, j as useBucketCount, A as useBucketSearch, O as useBuckets, M as useChildBuckets, F as useCreateBucket, L as useDeleteBucket, I as useUpdateBucket };
194
197
 
195
198
  //# sourceMappingURL=useBuckets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBuckets.js","names":["CREATE_BUCKET_FIELDS","fieldsOf","UPDATE_BUCKET_FIELDS","NO_BUCKETS","NO_MATCHES","selectBucketRows","data","identity","rows","selectBucket","buildBucketTree","nodes","bucket","buckets","roots","node","parent","byName","a","b","sortRecursively","child","list","searchTreeRows","match","matches","ancestor","useBucketBranch","workspaceId","useWorkspaceId","variables","useMemo","parentBucketId","useWorkspacePaginatedQuery","ListBucketsDocument","enabled","useBuckets","useAllBuckets","useWorkspaceAllPagesQuery","useBucketSearch","term","search","SearchBucketsDocument","useBucketCount","filters","hasParentFilter","useWorkspaceQuery","CountBucketsDocument","useChildBuckets","useBucket","bucketId","GetBucketDocument","useBucketContents","GetBucketContentsDocument","useCreateBucket","useCallback","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` / `countBuckets` / `getBucket` /\n * `createBucket` / `updateBucket` / `deleteBucket` operations on\n * wspace-botmanor-svc.\n *\n * The tree loads one branch at a time (BOFF-12685): the top level first, then\n * the children of a bucket when it is opened, each branch paged. Search runs\n * on the server across the whole tree, and each match brings its ancestors so\n * the tree can open the branches that lead to it (BOFF-12681).\n */\n\nimport { useCallback, useMemo } from 'react';\nimport {\n CountBucketsDocument,\n CreateBucketDocument,\n DeleteBucketDocument,\n GetBucketContentsDocument,\n GetBucketDocument,\n ListBucketsDocument,\n SearchBucketsDocument,\n UpdateBucketDocument,\n type CountBucketsQuery,\n type CreateBucketMutation,\n type DeleteBucketMutation,\n type GetBucketContentsQuery,\n type GetBucketQuery,\n type ListBucketsQuery,\n type SearchBucketsQuery,\n type UpdateBucketMutation,\n} from '../../generated/wspace-operations';\nimport type { CreateBucketInput, UpdateBucketInput } from '../../generated/wspace-types';\nimport { buildMutationInput, fieldsOf, type GraphQLInput } from './internal/mutationInput';\nimport {\n useWorkspaceAllPagesQuery,\n useWorkspaceId,\n useWorkspaceMutation,\n useWorkspacePaginatedQuery,\n useWorkspaceQuery,\n type PaginatedQueryResult,\n type QueryResult,\n} from './internal/workspaceGateway';\n\n/** Rows per request for one branch, the list view or a search. */\nexport const BUCKET_PAGE_SIZE = 50;\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 search tree renders. */\nexport interface BucketTreeNode extends BucketRecord {\n children: BucketTreeNode[];\n}\n\n/** How many child buckets and items a bucket holds. */\nexport interface BucketContentsRecord {\n childBuckets: number;\n bots: number;\n agents: number;\n policies: number;\n skills: number;\n promptTemplates: number;\n retrievalProfiles: number;\n channelConnectors: number;\n a2aRegistryEntries: number;\n items: number;\n}\n\n/** A search match with the buckets above it, top level first. */\nexport interface BucketSearchMatch extends BucketRecord {\n ancestors: BucketRecord[];\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_MATCHES: BucketSearchMatch[] = [];\n\nfunction selectBucketRows(data: ListBucketsQuery | undefined): BucketRecord[] {\n return data?.listBuckets ?? NO_BUCKETS;\n}\n\nfunction identity<T>(rows: T[]): T[] {\n return rows;\n}\n\nfunction selectBucket(data: GetBucketQuery | undefined): BucketRecord | null {\n return data?.getBucket ?? null;\n}\n\n/**\n * Builds the parent → children tree from a set of buckets that is closed under\n * \"parent of\" (search matches plus their ancestors). A bucket whose parent is\n * not in the set is a top-level node of the result.\n */\nexport function buildBucketTree(buckets: readonly BucketRecord[]): BucketTreeNode[] {\n const nodes = new Map<string, BucketTreeNode>();\n for (const bucket of buckets) {\n if (!nodes.has(bucket.id)) nodes.set(bucket.id, { ...bucket, children: [] });\n }\n\n const roots: BucketTreeNode[] = [];\n for (const node of nodes.values()) {\n const parent = node.parentBucketId ? nodes.get(node.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\n/** The search matches and every ancestor they bring, without duplicates. */\nexport function searchTreeRows(matches: readonly BucketSearchMatch[]): BucketRecord[] {\n const rows = new Map<string, BucketRecord>();\n for (const match of matches) {\n for (const ancestor of match.ancestors) rows.set(ancestor.id, ancestor);\n // A match is a bucket row; its extra `ancestors` field is ignored by the tree.\n rows.set(match.id, match);\n }\n return [...rows.values()];\n}\n\nexport const bucketKeys = {\n all: ['buckets'] as const,\n lists: () => [...bucketKeys.all, 'list'] as const,\n details: () => [...bucketKeys.all, 'detail'] as const,\n detail: (id: string) => [...bucketKeys.details(), id] as const,\n};\n\n/**\n * One level of the tree: the top level (`parentBucketId` null) or the children\n * of one bucket, paged.\n */\nexport function useBucketBranch(\n parentBucketId: string | null,\n enabled = true\n): PaginatedQueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n const variables = useMemo(\n () => ({ filters: { workspaceId, parentBucketId } }),\n [workspaceId, parentBucketId]\n );\n\n return useWorkspacePaginatedQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId) && enabled,\n errorMessage: 'Failed to load buckets',\n });\n}\n\n/** Every bucket at any level, paged and ordered by name: the list view. */\nexport function useBuckets(): PaginatedQueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n const variables = useMemo(() => ({ filters: { workspaceId } }), [workspaceId]);\n\n return useWorkspacePaginatedQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to load buckets',\n });\n}\n\n/** Every bucket in the workspace, all pages: for the parent picker. */\nexport function useAllBuckets(enabled = true): QueryResult<BucketRecord[]> {\n const workspaceId = useWorkspaceId();\n const variables = useMemo(() => ({ filters: { workspaceId } }), [workspaceId]);\n\n return useWorkspaceAllPagesQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId) && enabled,\n errorMessage: 'Failed to load buckets',\n });\n}\n\n/** Server-side search across the whole tree (blank search: disabled). */\nexport function useBucketSearch(search: string): PaginatedQueryResult<BucketSearchMatch[]> {\n const workspaceId = useWorkspaceId();\n const term = search.trim();\n const variables = useMemo(\n () => ({ filters: { workspaceId, search: term } }),\n [workspaceId, term]\n );\n\n return useWorkspacePaginatedQuery<SearchBucketsQuery, BucketSearchMatch, BucketSearchMatch[]>({\n document: SearchBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: (data) => data?.listBuckets ?? NO_MATCHES,\n select: identity,\n fallback: NO_MATCHES,\n enabled: Boolean(workspaceId) && term.length > 0,\n errorMessage: 'Failed to search buckets',\n });\n}\n\n/**\n * How many buckets match: all of them, the top level (`parentBucketId: null`)\n * or the matches of a search.\n */\nexport function useBucketCount(filters: {\n parentBucketId?: string | null;\n search?: string;\n}): QueryResult<number | null> {\n const workspaceId = useWorkspaceId();\n const { parentBucketId, search } = filters;\n const hasParentFilter = 'parentBucketId' in filters;\n const variables = useMemo(\n () => ({\n filters: {\n workspaceId,\n ...(hasParentFilter ? { parentBucketId: parentBucketId ?? null } : {}),\n ...(search?.trim() ? { search: search.trim() } : {}),\n },\n }),\n [workspaceId, hasParentFilter, parentBucketId, search]\n );\n\n return useWorkspaceQuery<CountBucketsQuery, number | null>({\n document: CountBucketsDocument,\n variables,\n select: (data) => data?.countBuckets ?? null,\n fallback: null,\n enabled: Boolean(workspaceId),\n errorMessage: 'Failed to count buckets',\n });\n}\n\n/**\n * Direct children of one bucket, via the `parentBucketId` filter. Powers the\n * sub-bucket section of the bucket detail page.\n */\nexport function useChildBuckets(\n parentBucketId: string | undefined\n): PaginatedQueryResult<BucketRecord[]> {\n return useBucketBranch(parentBucketId ?? null, Boolean(parentBucketId));\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\n/** What a bucket holds (BOFF-12679): read before offering a delete. */\nexport function useBucketContents(\n bucketId: string | null | undefined\n): QueryResult<BucketContentsRecord | null> {\n const variables = useMemo(() => ({ id: bucketId ?? '' }), [bucketId]);\n\n return useWorkspaceQuery<GetBucketContentsQuery, BucketContentsRecord | null>({\n document: GetBucketContentsDocument,\n variables,\n select: (data) => data?.getBucket?.contents ?? null,\n fallback: null,\n enabled: Boolean(bucketId),\n errorMessage: 'Failed to load the bucket contents',\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":";;;;AAuGA,IAAMA,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,IAAkC,CAAC;AAEzC,SAASC,EAAiB,GAAoD;CAC5E,OAAOC,GAAM,eAAeH;AAC9B;AAEA,SAASI,EAAY,GAAgB;CACnC,OAAOC;AACT;AAEA,SAASC,EAAa,GAAuD;CAC3E,OAAOH,GAAM,aAAa;AAC5B;AAOA,SAAgBI,EAAgB,GAAoD;CAClF,IAAMC,oBAAQ,IAAI,IAA4B;CAC9C,KAAK,IAAMC,KAAUC,GACnB,AAAKF,EAAM,IAAIC,EAAO,EAAE,KAAGD,EAAM,IAAIC,EAAO,IAAI;EAAE,GAAGA;E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K,KAAkB,MAAM,EAAQA,CAAe;AACxE;AAEA,SAAgBiB,EAAU,GAAgE;CACxF,IAAMnB,IAAYC,SAAe,EAAE,IAAImB,KAAY,GAAG,IAAI,CAACA,CAAQ,CAAC;CAEpE,OAAOJ,EAAuD;EAC5D,UAAUK;EACV;EACA,QAAQ1C;EACR,UAAU;EACV,SAAS,EAAQyC;EACjB,cAAc;CAChB,CAAC;AACH;AAGA,SAAgBE,EACd,GAC0C;CAC1C,IAAMtB,IAAYC,SAAe,EAAE,IAAImB,KAAY,GAAG,IAAI,CAACA,CAAQ,CAAC;CAEpE,OAAOJ,EAAuE;EAC5E,UAAUO;EACV;EACA,SAAS,MAAS/C,GAAM,WAAW,YAAY;EAC/C,UAAU;EACV,SAAS,EAAQ4C;EACjB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBI,IAAkB;CAChC,IAAM1B,IAAcC,EAAe,GAE7BC,IAAYyB,GACf,OAAkC,EACjC,OAAOC,EAAmB;EAAE,GAAGC;EAAO;CAAY,GAAGzD,CAAoB,EAC3E,IACA,CAAC4B,CAAW,CACd;CAEA,OAAO8B,EAAgF;EACrF,UAAUC;EACV;EACA,SAAS,MAASrD,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBsD,IAAkB;CAChC,OAAOF,EAAgF;EACrF,UAAUG;EACV,YAAY,EAAE,aAAU,gBAAa;GACnC,IAAIX;GACJ,OAAOM,EAAmBC,GAAOvD,CAAoB;EACvD;EACA,SAAS,MAASI,GAAM;EACxB,cAAc;CAChB,CAAC;AACH;AAEA,SAAgBwD,IAAkB;CAChC,OAAOJ,EAA4D;EACjE,UAAUK;EACV,YAAY,OAAc,EAAE,IAAIb,EAAS;EACzC,SAAS,MAAS5C,GAAM;EACxB,cAAc;CAChB,CAAC;AACH"}
1
+ {"version":3,"file":"useBuckets.js","names":["CREATE_BUCKET_FIELDS","fieldsOf","UPDATE_BUCKET_FIELDS","NO_BUCKETS","NO_MATCHES","selectBucketRows","data","identity","rows","selectBucket","buildBucketTree","nodes","bucket","buckets","roots","node","parent","byName","a","b","sortRecursively","child","list","searchTreeRows","match","matches","ancestor","useBucketBranch","tr","useTr","workspaceId","useWorkspaceId","variables","useMemo","parentBucketId","useWorkspacePaginatedQuery","ListBucketsDocument","enabled","useBuckets","useAllBuckets","useWorkspaceAllPagesQuery","useBucketSearch","term","search","SearchBucketsDocument","useBucketCount","filters","hasParentFilter","useWorkspaceQuery","CountBucketsDocument","useChildBuckets","useBucket","bucketId","GetBucketDocument","useBucketContents","GetBucketContentsDocument","useCreateBucket","useCallback","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` / `countBuckets` / `getBucket` /\n * `createBucket` / `updateBucket` / `deleteBucket` operations on\n * wspace-botmanor-svc.\n *\n * The tree loads one branch at a time (BOFF-12685): the top level first, then\n * the children of a bucket when it is opened, each branch paged. Search runs\n * on the server across the whole tree, and each match brings its ancestors so\n * the tree can open the branches that lead to it (BOFF-12681).\n */\n\nimport { useCallback, useMemo } from 'react';\nimport {\n CountBucketsDocument,\n CreateBucketDocument,\n DeleteBucketDocument,\n GetBucketContentsDocument,\n GetBucketDocument,\n ListBucketsDocument,\n SearchBucketsDocument,\n UpdateBucketDocument,\n type CountBucketsQuery,\n type CreateBucketMutation,\n type DeleteBucketMutation,\n type GetBucketContentsQuery,\n type GetBucketQuery,\n type ListBucketsQuery,\n type SearchBucketsQuery,\n type UpdateBucketMutation,\n} from '../../generated/wspace-operations';\nimport type { CreateBucketInput, UpdateBucketInput } from '../../generated/wspace-types';\nimport { useTr } from '../../shared/hooks/useTr';\nimport { buildMutationInput, fieldsOf, type GraphQLInput } from './internal/mutationInput';\nimport {\n useWorkspaceAllPagesQuery,\n useWorkspaceId,\n useWorkspaceMutation,\n useWorkspacePaginatedQuery,\n useWorkspaceQuery,\n type PaginatedQueryResult,\n type QueryResult,\n} from './internal/workspaceGateway';\n\n/** Rows per request for one branch, the list view or a search. */\nexport const BUCKET_PAGE_SIZE = 50;\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 search tree renders. */\nexport interface BucketTreeNode extends BucketRecord {\n children: BucketTreeNode[];\n}\n\n/** How many child buckets and items a bucket holds. */\nexport interface BucketContentsRecord {\n childBuckets: number;\n bots: number;\n agents: number;\n policies: number;\n skills: number;\n promptTemplates: number;\n retrievalProfiles: number;\n channelConnectors: number;\n a2aRegistryEntries: number;\n items: number;\n}\n\n/** A search match with the buckets above it, top level first. */\nexport interface BucketSearchMatch extends BucketRecord {\n ancestors: BucketRecord[];\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_MATCHES: BucketSearchMatch[] = [];\n\nfunction selectBucketRows(data: ListBucketsQuery | undefined): BucketRecord[] {\n return data?.listBuckets ?? NO_BUCKETS;\n}\n\nfunction identity<T>(rows: T[]): T[] {\n return rows;\n}\n\nfunction selectBucket(data: GetBucketQuery | undefined): BucketRecord | null {\n return data?.getBucket ?? null;\n}\n\n/**\n * Builds the parent → children tree from a set of buckets that is closed under\n * \"parent of\" (search matches plus their ancestors). A bucket whose parent is\n * not in the set is a top-level node of the result.\n */\nexport function buildBucketTree(buckets: readonly BucketRecord[]): BucketTreeNode[] {\n const nodes = new Map<string, BucketTreeNode>();\n for (const bucket of buckets) {\n if (!nodes.has(bucket.id)) nodes.set(bucket.id, { ...bucket, children: [] });\n }\n\n const roots: BucketTreeNode[] = [];\n for (const node of nodes.values()) {\n const parent = node.parentBucketId ? nodes.get(node.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\n/** The search matches and every ancestor they bring, without duplicates. */\nexport function searchTreeRows(matches: readonly BucketSearchMatch[]): BucketRecord[] {\n const rows = new Map<string, BucketRecord>();\n for (const match of matches) {\n for (const ancestor of match.ancestors) rows.set(ancestor.id, ancestor);\n // A match is a bucket row; its extra `ancestors` field is ignored by the tree.\n rows.set(match.id, match);\n }\n return [...rows.values()];\n}\n\nexport const bucketKeys = {\n all: ['buckets'] as const,\n lists: () => [...bucketKeys.all, 'list'] as const,\n details: () => [...bucketKeys.all, 'detail'] as const,\n detail: (id: string) => [...bucketKeys.details(), id] as const,\n};\n\n/**\n * One level of the tree: the top level (`parentBucketId` null) or the children\n * of one bucket, paged.\n */\nexport function useBucketBranch(\n parentBucketId: string | null,\n enabled = true\n): PaginatedQueryResult<BucketRecord[]> {\n const tr = useTr();\n const workspaceId = useWorkspaceId();\n const variables = useMemo(\n () => ({ filters: { workspaceId, parentBucketId } }),\n [workspaceId, parentBucketId]\n );\n\n return useWorkspacePaginatedQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId) && enabled,\n errorMessage: tr('botlit.buckets.errors.loadListFailed', 'Failed to load buckets'),\n });\n}\n\n/** Every bucket at any level, paged and ordered by name: the list view. */\nexport function useBuckets(): PaginatedQueryResult<BucketRecord[]> {\n const tr = useTr();\n const workspaceId = useWorkspaceId();\n const variables = useMemo(() => ({ filters: { workspaceId } }), [workspaceId]);\n\n return useWorkspacePaginatedQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId),\n errorMessage: tr('botlit.buckets.errors.loadListFailed', 'Failed to load buckets'),\n });\n}\n\n/** Every bucket in the workspace, all pages: for the parent picker. */\nexport function useAllBuckets(enabled = true): QueryResult<BucketRecord[]> {\n const tr = useTr();\n const workspaceId = useWorkspaceId();\n const variables = useMemo(() => ({ filters: { workspaceId } }), [workspaceId]);\n\n return useWorkspaceAllPagesQuery<ListBucketsQuery, BucketRecord, BucketRecord[]>({\n document: ListBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: selectBucketRows,\n select: identity,\n fallback: NO_BUCKETS,\n enabled: Boolean(workspaceId) && enabled,\n errorMessage: tr('botlit.buckets.errors.loadListFailed', 'Failed to load buckets'),\n });\n}\n\n/** Server-side search across the whole tree (blank search: disabled). */\nexport function useBucketSearch(search: string): PaginatedQueryResult<BucketSearchMatch[]> {\n const tr = useTr();\n const workspaceId = useWorkspaceId();\n const term = search.trim();\n const variables = useMemo(\n () => ({ filters: { workspaceId, search: term } }),\n [workspaceId, term]\n );\n\n return useWorkspacePaginatedQuery<SearchBucketsQuery, BucketSearchMatch, BucketSearchMatch[]>({\n document: SearchBucketsDocument,\n variables,\n pageSize: BUCKET_PAGE_SIZE,\n extractRows: (data) => data?.listBuckets ?? NO_MATCHES,\n select: identity,\n fallback: NO_MATCHES,\n enabled: Boolean(workspaceId) && term.length > 0,\n errorMessage: tr('botlit.buckets.errors.searchFailed', 'Failed to search buckets'),\n });\n}\n\n/**\n * How many buckets match: all of them, the top level (`parentBucketId: null`)\n * or the matches of a search.\n */\nexport function useBucketCount(filters: {\n parentBucketId?: string | null;\n search?: string;\n}): QueryResult<number | null> {\n const tr = useTr();\n const workspaceId = useWorkspaceId();\n const { parentBucketId, search } = filters;\n const hasParentFilter = 'parentBucketId' in filters;\n const variables = useMemo(\n () => ({\n filters: {\n workspaceId,\n ...(hasParentFilter ? { parentBucketId: parentBucketId ?? null } : {}),\n ...(search?.trim() ? { search: search.trim() } : {}),\n },\n }),\n [workspaceId, hasParentFilter, parentBucketId, search]\n );\n\n return useWorkspaceQuery<CountBucketsQuery, number | null>({\n document: CountBucketsDocument,\n variables,\n select: (data) => data?.countBuckets ?? null,\n fallback: null,\n enabled: Boolean(workspaceId),\n errorMessage: tr('botlit.buckets.errors.countFailed', 'Failed to count buckets'),\n });\n}\n\n/**\n * Direct children of one bucket, via the `parentBucketId` filter. Powers the\n * sub-bucket section of the bucket detail page.\n */\nexport function useChildBuckets(\n parentBucketId: string | undefined\n): PaginatedQueryResult<BucketRecord[]> {\n return useBucketBranch(parentBucketId ?? null, Boolean(parentBucketId));\n}\n\nexport function useBucket(bucketId: string | undefined): QueryResult<BucketRecord | null> {\n const tr = useTr();\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: tr('botlit.buckets.errors.loadFailed', 'Failed to load bucket'),\n });\n}\n\n/** What a bucket holds (BOFF-12679): read before offering a delete. */\nexport function useBucketContents(\n bucketId: string | null | undefined\n): QueryResult<BucketContentsRecord | null> {\n const tr = useTr();\n const variables = useMemo(() => ({ id: bucketId ?? '' }), [bucketId]);\n\n return useWorkspaceQuery<GetBucketContentsQuery, BucketContentsRecord | null>({\n document: GetBucketContentsDocument,\n variables,\n select: (data) => data?.getBucket?.contents ?? null,\n fallback: null,\n enabled: Boolean(bucketId),\n errorMessage: tr('botlit.buckets.errors.contentsFailed', 'Failed to load the bucket contents'),\n });\n}\n\nexport function useCreateBucket() {\n const tr = useTr();\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: tr('botlit.buckets.errors.createFailed', 'Failed to create bucket'),\n });\n}\n\nexport function useUpdateBucket() {\n const tr = useTr();\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: tr('botlit.buckets.errors.updateFailed', 'Failed to update bucket'),\n });\n}\n\nexport function useDeleteBucket() {\n const tr = useTr();\n return useWorkspaceMutation<DeleteBucketMutation, string, boolean>({\n document: DeleteBucketDocument,\n variables: (bucketId) => ({ id: bucketId }),\n select: (data) => data?.deleteBucket,\n errorMessage: tr('botlit.buckets.errors.deleteFailed', 'Failed to delete bucket'),\n });\n}\n"],"mappings":";;;;;AAwGA,IAAMA,IAAuBC,EAA4B;CACvD,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACN,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,MAAM;CACN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AS,MAASjD,GAAM,WAAW,YAAY;EAC/C,UAAU;EACV,SAAS,EAAQ8C;EACjB,cAAcxB,EAAG,wCAAwC,oCAAoC;CAC/F,CAAC;AACH;AAEA,SAAgB4B,IAAkB;CAChC,IAAM5B,IAAKC,EAAM,GACXC,IAAcC,EAAe,GAE7BC,IAAYyB,GACf,OAAkC,EACjC,OAAOC,EAAmB;EAAE,GAAGC;EAAO;CAAY,GAAG3D,CAAoB,EAC3E,IACA,CAAC8B,CAAW,CACd;CAEA,OAAO8B,EAAgF;EACrF,UAAUC;EACV;EACA,SAAS,MAASvD,GAAM;EACxB,cAAcsB,EAAG,sCAAsC,yBAAyB;CAClF,CAAC;AACH;AAEA,SAAgBkC,IAAkB;CAChC,IAAMlC,IAAKC,EAAM;CACjB,OAAO+B,EAAgF;EACrF,UAAUG;EACV,YAAY,EAAE,aAAU,gBAAa;GACnC,IAAIX;GACJ,OAAOM,EAAmBC,GAAOzD,CAAoB;EACvD;EACA,SAAS,MAASI,GAAM;EACxB,cAAcsB,EAAG,sCAAsC,yBAAyB;CAClF,CAAC;AACH;AAEA,SAAgBoC,IAAkB;CAChC,IAAMpC,IAAKC,EAAM;CACjB,OAAO+B,EAA4D;EACjE,UAAUK;EACV,YAAY,OAAc,EAAE,IAAIb,EAAS;EACzC,SAAS,MAAS9C,GAAM;EACxB,cAAcsB,EAAG,sCAAsC,yBAAyB;CAClF,CAAC;AACH"}
@@ -143,7 +143,7 @@ interface PublishingResult {
143
143
  export declare function useStorePublishingActions(): {
144
144
  validate: (draft: PackageDraftValues) => Promise<PackageValidation>;
145
145
  run: <A extends RunnableAction>(action: A) => Promise<PublishingResult[A["kind"]]>;
146
- pending: "submit" | "update" | "delete" | "create" | "review" | "validate" | "bundle" | "withdraw" | "unpublish" | null;
146
+ pending: "submit" | "update" | "create" | "delete" | "review" | "validate" | "bundle" | "withdraw" | "unpublish" | null;
147
147
  };
148
148
  /** Badge variant for a submission status. */
149
149
  export declare function submissionStatusVariant(status: SubmissionStatus): 'default' | 'secondary' | 'success' | 'warning' | 'destructive' | 'outline';
@@ -13,3 +13,4 @@ export { useLLMProviders, useConfigureLLMProvider } from './hooks/useLLMProvider
13
13
  export { useMCPServers, useCreateMCPServer } from './hooks/useMCPServers';
14
14
  export { cn } from './utils/cn';
15
15
  export { formatDate, formatRelativeTime } from './utils/formatters';
16
+ export { BOTMANOR_TOUR_ANCHORS, BOTMANOR_TOUR_MODULE_ID, BOTMANOR_TOUR_PRODUCT_ID, BOTMANOR_TOUR_ROUTES, botmanorTourRoutes, resolveBotmanorTourPageId, } from './tours/tourRoutes';
@@ -8,4 +8,5 @@ import { useConfigureLLMProvider as v, useLLMProviders as y } from "./hooks/useL
8
8
  import { useCreateMCPServer as b, useMCPServers as x } from "./hooks/useMCPServers.js";
9
9
  import { cn as S } from "./utils/cn.js";
10
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 };
11
+ import { BOTMANOR_TOUR_ANCHORS as T, BOTMANOR_TOUR_MODULE_ID as E, BOTMANOR_TOUR_PRODUCT_ID as D, BOTMANOR_TOUR_ROUTES as O, botmanorTourRoutes as k, resolveBotmanorTourPageId as A } from "./tours/tourRoutes.js";
12
+ export { T as BOTMANOR_TOUR_ANCHORS, E as BOTMANOR_TOUR_MODULE_ID, D as BOTMANOR_TOUR_PRODUCT_ID, O as BOTMANOR_TOUR_ROUTES, t as BotlitProvider, e as BotmanorRoot, k as botmanorTourRoutes, S as cn, C as formatDate, w as formatRelativeTime, A as resolveBotmanorTourPageId, 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 };
@@ -317,6 +317,7 @@ var w = () => {
317
317
  }) }, e.id);
318
318
  };
319
319
  return /* @__PURE__ */ y(i, {
320
+ tourId: "botmanor-agents",
320
321
  title: E ? w("botlit.agentsList.titleBot", "Bot Agents") : w("botlit.agentsList.title", "All Agents"),
321
322
  description: E ? w("botlit.agentsList.descriptionBot", "Manage agents for this bot") : w("botlit.agentsList.description", "View and manage all your AI agents"),
322
323
  actions: /* @__PURE__ */ b("div", {