@btst/stack 4.3.0 → 4.4.0

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 (85) hide show
  1. package/README.md +2 -2
  2. package/dist/packages/stack/src/plugins/ai-chat/api/compaction.cjs +249 -0
  3. package/dist/packages/stack/src/plugins/ai-chat/api/compaction.mjs +241 -0
  4. package/dist/packages/stack/src/plugins/ai-chat/api/operations.cjs +20 -0
  5. package/dist/packages/stack/src/plugins/ai-chat/api/operations.mjs +20 -0
  6. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +5 -0
  7. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +5 -0
  8. package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.cjs +38 -3
  9. package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.mjs +38 -3
  10. package/dist/packages/stack/src/plugins/ai-chat/client/context-checkpoint.cjs +30 -0
  11. package/dist/packages/stack/src/plugins/ai-chat/client/context-checkpoint.mjs +27 -0
  12. package/dist/packages/stack/src/plugins/ai-chat/schemas.cjs +2 -0
  13. package/dist/packages/stack/src/plugins/ai-chat/schemas.mjs +2 -0
  14. package/dist/packages/ui/src/components/markdown-content.cjs +9 -9
  15. package/dist/packages/ui/src/components/markdown-content.mjs +9 -9
  16. package/dist/plugins/ai-chat/api/index.d.cts +2 -2
  17. package/dist/plugins/ai-chat/api/index.d.mts +2 -2
  18. package/dist/plugins/ai-chat/api/index.d.ts +2 -2
  19. package/dist/plugins/ai-chat/client/components/index.d.cts +1 -1
  20. package/dist/plugins/ai-chat/client/components/index.d.mts +1 -1
  21. package/dist/plugins/ai-chat/client/components/index.d.ts +1 -1
  22. package/dist/plugins/ai-chat/client/hooks/index.d.cts +2 -2
  23. package/dist/plugins/ai-chat/client/hooks/index.d.mts +2 -2
  24. package/dist/plugins/ai-chat/client/hooks/index.d.ts +2 -2
  25. package/dist/plugins/ai-chat/client/index.d.cts +3 -3
  26. package/dist/plugins/ai-chat/client/index.d.mts +3 -3
  27. package/dist/plugins/ai-chat/client/index.d.ts +3 -3
  28. package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
  29. package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
  30. package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
  31. package/dist/plugins/blog/api/index.d.cts +2 -2
  32. package/dist/plugins/blog/api/index.d.mts +2 -2
  33. package/dist/plugins/blog/api/index.d.ts +2 -2
  34. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  35. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  36. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  37. package/dist/plugins/blog/client/index.d.cts +2 -2
  38. package/dist/plugins/blog/client/index.d.mts +2 -2
  39. package/dist/plugins/blog/client/index.d.ts +2 -2
  40. package/dist/plugins/blog/query-keys.d.cts +2 -2
  41. package/dist/plugins/blog/query-keys.d.mts +2 -2
  42. package/dist/plugins/blog/query-keys.d.ts +2 -2
  43. package/dist/plugins/cms/api/index.d.cts +1 -1
  44. package/dist/plugins/cms/api/index.d.mts +1 -1
  45. package/dist/plugins/cms/api/index.d.ts +1 -1
  46. package/dist/plugins/cms/query-keys.d.cts +1 -1
  47. package/dist/plugins/cms/query-keys.d.mts +1 -1
  48. package/dist/plugins/cms/query-keys.d.ts +1 -1
  49. package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
  50. package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
  51. package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
  52. package/dist/plugins/ui-builder/client/index.d.cts +1 -1
  53. package/dist/plugins/ui-builder/client/index.d.mts +1 -1
  54. package/dist/plugins/ui-builder/client/index.d.ts +1 -1
  55. package/dist/plugins/ui-builder/query-keys.d.cts +1 -1
  56. package/dist/plugins/ui-builder/query-keys.d.mts +1 -1
  57. package/dist/plugins/ui-builder/query-keys.d.ts +1 -1
  58. package/dist/shared/{stack.rmWRtSjs.d.cts → stack.BGzgFx3R.d.cts} +4 -4
  59. package/dist/shared/{stack.DBH1Bjko.d.ts → stack.C4zspX0T.d.ts} +13 -2
  60. package/dist/shared/{stack.D2y4gl03.d.mts → stack.CjCSDfWy.d.mts} +4 -4
  61. package/dist/shared/{stack.DQpyA3Cq.d.ts → stack.Clil75lW.d.ts} +86 -86
  62. package/dist/shared/{stack.DzJgoNqJ.d.cts → stack.DDQlE2Pm.d.cts} +1 -0
  63. package/dist/shared/{stack.DiYg7Jw1.d.cts → stack.DNw6Hv5o.d.cts} +86 -86
  64. package/dist/shared/{stack.CZ1h_T4k.d.mts → stack.DhZtP2JZ.d.mts} +86 -86
  65. package/dist/shared/{stack.qMp2VzNw.d.ts → stack.DlehgNZZ.d.ts} +1 -0
  66. package/dist/shared/{stack.CnDMBj4z.d.ts → stack.Dpg_JjIo.d.ts} +4 -4
  67. package/dist/shared/{stack.B7Mj74BQ.d.mts → stack.Ps3MDhTC.d.mts} +13 -2
  68. package/dist/shared/{stack.CHrtGKLz.d.mts → stack.tAUeRAtd.d.mts} +1 -0
  69. package/dist/shared/{stack.Dgt3MCtW.d.cts → stack.ymWsP4HZ.d.cts} +13 -2
  70. package/package.json +1 -1
  71. package/src/__tests__/markdown-link-navigation.test.tsx +29 -0
  72. package/src/plugins/ai-chat/__tests__/compaction.test.ts +272 -0
  73. package/src/plugins/ai-chat/api/compaction.ts +310 -0
  74. package/src/plugins/ai-chat/api/operations.ts +25 -0
  75. package/src/plugins/ai-chat/api/plugin.ts +14 -0
  76. package/src/plugins/ai-chat/client/components/chat-interface.tsx +58 -3
  77. package/src/plugins/ai-chat/client/context-checkpoint.ts +47 -0
  78. package/src/plugins/ai-chat/client/localization/index.ts +1 -0
  79. package/src/plugins/ai-chat/schemas.ts +2 -0
  80. package/dist/shared/{stack.lsbdKRj7.d.mts → stack.B8PG21zX.d.mts} +16 -16
  81. package/dist/shared/{stack.DtZgEX84.d.cts → stack.Csi-4Mgz.d.cts} +6 -6
  82. package/dist/shared/{stack.DtZgEX84.d.mts → stack.Csi-4Mgz.d.mts} +6 -6
  83. package/dist/shared/{stack.DtZgEX84.d.ts → stack.Csi-4Mgz.d.ts} +6 -6
  84. package/dist/shared/{stack.BMlTZnZp.d.ts → stack.CyalJ0j6.d.ts} +16 -16
  85. package/dist/shared/{stack.BV0uNV4f.d.cts → stack.D6Pg-ufX.d.cts} +16 -16
@@ -1,9 +1,9 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, p as UseNextPreviousPostsOptions, q as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, s as UseRecentPostsOptions, t as UseRecentPostsResult, l as useCreatePost, n as useDeletePost, r as useNextPreviousPosts, g as usePost, k as usePostForm, o as usePostSearch, u as usePosts, v as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, m as useUpdatePost } from '../../../../shared/stack.CnDMBj4z.js';
1
+ export { P as PostCreateInput, e as PostUpdateInput, p as UseNextPreviousPostsOptions, q as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, s as UseRecentPostsOptions, t as UseRecentPostsResult, l as useCreatePost, n as useDeletePost, r as useNextPreviousPosts, g as usePost, k as usePostForm, o as usePostSearch, u as usePosts, v as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, m as useUpdatePost } from '../../../../shared/stack.Dpg_JjIo.js';
2
2
  export { useDebounce } from '@btst/stack/plugins/client/hooks';
3
3
  import '@tanstack/react-query';
4
4
  import 'zod';
5
5
  import '../../../../shared/stack.Dsatjh0B.js';
6
- import '../../../../shared/stack.DtZgEX84.js';
6
+ import '../../../../shared/stack.Csi-4Mgz.js';
7
7
 
8
8
  declare function useThrottle<T>(value: T, wait?: number): T;
9
9
 
@@ -4,11 +4,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ComponentType, ReactNode } from 'react';
5
5
  import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.cjs';
6
6
  import { N as NewPostPageComponent } from '../../../shared/stack.Bz-YPsuX.cjs';
7
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.rmWRtSjs.cjs';
7
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.BGzgFx3R.cjs';
8
8
  import '@tanstack/react-query';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client/hooks';
11
- import '../../../shared/stack.DtZgEX84.cjs';
11
+ import '../../../shared/stack.Csi-4Mgz.cjs';
12
12
 
13
13
  declare const BLOG_LOCALIZATION: {
14
14
  BLOG_FORMS_TITLE_LABEL: string;
@@ -4,11 +4,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ComponentType, ReactNode } from 'react';
5
5
  import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.mjs';
6
6
  import { N as NewPostPageComponent } from '../../../shared/stack.Bz-YPsuX.mjs';
7
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.D2y4gl03.mjs';
7
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.CjCSDfWy.mjs';
8
8
  import '@tanstack/react-query';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client/hooks';
11
- import '../../../shared/stack.DtZgEX84.mjs';
11
+ import '../../../shared/stack.Csi-4Mgz.mjs';
12
12
 
13
13
  declare const BLOG_LOCALIZATION: {
14
14
  BLOG_FORMS_TITLE_LABEL: string;
@@ -4,11 +4,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ComponentType, ReactNode } from 'react';
5
5
  import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.js';
6
6
  import { N as NewPostPageComponent } from '../../../shared/stack.Bz-YPsuX.js';
7
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.CnDMBj4z.js';
7
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.Dpg_JjIo.js';
8
8
  import '@tanstack/react-query';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client/hooks';
11
- import '../../../shared/stack.DtZgEX84.js';
11
+ import '../../../shared/stack.Csi-4Mgz.js';
12
12
 
13
13
  declare const BLOG_LOCALIZATION: {
14
14
  BLOG_FORMS_TITLE_LABEL: string;
@@ -1,7 +1,7 @@
1
1
  import '@btst/stack/plugins/client';
2
- export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.DiYg7Jw1.cjs';
2
+ export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.DNw6Hv5o.cjs';
3
3
  import 'zod';
4
- import '../../shared/stack.DtZgEX84.cjs';
4
+ import '../../shared/stack.Csi-4Mgz.cjs';
5
5
  import '../../shared/stack.Dsatjh0B.cjs';
6
6
  import '@btst/stack/plugins/api';
7
7
  import '../../authorization/index.cjs';
@@ -1,7 +1,7 @@
1
1
  import '@btst/stack/plugins/client';
2
- export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.CZ1h_T4k.mjs';
2
+ export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.DhZtP2JZ.mjs';
3
3
  import 'zod';
4
- import '../../shared/stack.DtZgEX84.mjs';
4
+ import '../../shared/stack.Csi-4Mgz.mjs';
5
5
  import '../../shared/stack.Dsatjh0B.mjs';
6
6
  import '@btst/stack/plugins/api';
7
7
  import '../../authorization/index.mjs';
@@ -1,7 +1,7 @@
1
1
  import '@btst/stack/plugins/client';
2
- export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.DQpyA3Cq.js';
2
+ export { D as blogResources, d as createBlogQueryKeys } from '../../shared/stack.Clil75lW.js';
3
3
  import 'zod';
4
- import '../../shared/stack.DtZgEX84.js';
4
+ import '../../shared/stack.Csi-4Mgz.js';
5
5
  import '../../shared/stack.Dsatjh0B.js';
6
6
  import '@btst/stack/plugins/api';
7
7
  import '../../authorization/index.js';
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.BV0uNV4f.cjs';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.D6Pg-ufX.cjs';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.cjs';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.cjs';
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.lsbdKRj7.mjs';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.B8PG21zX.mjs';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.mjs';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.mjs';
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.BMlTZnZp.js';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.CyalJ0j6.js';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.js';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.js';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BV0uNV4f.cjs';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.D6Pg-ufX.cjs';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.cjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/index.cjs';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.lsbdKRj7.mjs';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.B8PG21zX.mjs';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.mjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/index.mjs';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BMlTZnZp.js';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.CyalJ0j6.js';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.js';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/index.js';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.cjs';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.BV0uNV4f.cjs';
12
+ import '../../../../shared/stack.D6Pg-ufX.cjs';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.cjs';
15
15
  import 'better-call';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.mjs';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.lsbdKRj7.mjs';
12
+ import '../../../../shared/stack.B8PG21zX.mjs';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.mjs';
15
15
  import 'better-call';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.js';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.BMlTZnZp.js';
12
+ import '../../../../shared/stack.CyalJ0j6.js';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.js';
15
15
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.cjs';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.BV0uNV4f.cjs';
18
+ import '../../../shared/stack.D6Pg-ufX.cjs';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.cjs';
21
21
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.mjs';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.lsbdKRj7.mjs';
18
+ import '../../../shared/stack.B8PG21zX.mjs';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.mjs';
21
21
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.js';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.BMlTZnZp.js';
18
+ import '../../../shared/stack.CyalJ0j6.js';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.js';
21
21
  import 'better-call';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.BV0uNV4f.cjs';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.D6Pg-ufX.cjs';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.DmpPDPxA.cjs';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.cjs';
6
6
  import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.cjs';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.lsbdKRj7.mjs';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.B8PG21zX.mjs';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.B1srlBud.mjs';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.mjs';
6
6
  import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.mjs';
@@ -1,6 +1,6 @@
1
1
  import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.BMlTZnZp.js';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.CyalJ0j6.js';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.BK9Z2dcL.js';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.js';
6
6
  import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.js';
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { z } from 'zod';
3
3
  import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
4
4
  import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.cjs';
5
- import { c as createPostSchema, u as updatePostSchema } from './stack.DtZgEX84.cjs';
5
+ import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.cjs';
6
6
 
7
7
  /**
8
8
  * Options for the usePosts hook
@@ -136,8 +136,6 @@ declare function useSuspenseTags(): {
136
136
  declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, SerializedPost | null, SerializedPost | null>): ResourceFormResult<TValues, SerializedPost | null, SerializedPost | null>;
137
137
  /** Create a new post */
138
138
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
139
- published: boolean;
140
- title: string;
141
139
  tags: ({
142
140
  name: string;
143
141
  } | {
@@ -145,12 +143,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
145
143
  name: string;
146
144
  slug: string;
147
145
  })[];
146
+ title: string;
148
147
  content: string;
149
148
  excerpt: string;
149
+ published: boolean;
150
150
  slug?: string | undefined;
151
+ publishedAt?: Date | undefined;
151
152
  createdAt?: Date | undefined;
152
153
  updatedAt?: Date | undefined;
153
- publishedAt?: Date | undefined;
154
154
  image?: string | undefined;
155
155
  }>;
156
156
  /** Update an existing post by id */
@@ -55,6 +55,12 @@ interface AiChatPageContentConfig {
55
55
  description?: string;
56
56
  }
57
57
 
58
+ /** Opt-in context compaction for public, text-only conversations. */
59
+ interface AiChatCompactionConfig {
60
+ /** Actual context window. Configure the model's output limit at or below 20% of this. */
61
+ contextWindowTokens: number;
62
+ }
63
+
58
64
  type AiChatAccess = "authorized" | "public";
59
65
  /** Runtime input for one conversation operation. */
60
66
  declare const ConversationOperationInputSchema: z.ZodObject<{
@@ -85,6 +91,7 @@ type ChatOperationInput = {
85
91
  readonly metadata?: any;
86
92
  })[];
87
93
  readonly conversationId?: string;
94
+ readonly contextSummary?: string;
88
95
  readonly model?: string;
89
96
  readonly pageContext?: string;
90
97
  readonly availableTools?: readonly string[];
@@ -221,6 +228,8 @@ interface AiChatBackendConfig {
221
228
  */
222
229
  access?: AiChatAccess;
223
230
  systemPrompt?: string;
231
+ /** Automatically summarize older context in public text chats; off by default. */
232
+ compaction?: AiChatCompactionConfig;
224
233
  tools?: Record<string, Tool>;
225
234
  /** Enable the standard readPage server tool for full page content. Reserves the readPage tool name. */
226
235
  pageContent?: AiChatPageContentConfig;
@@ -253,6 +262,7 @@ declare const aiChatBackendPlugin: <TTools extends Record<string, Tool> = Record
253
262
  metadata?: any;
254
263
  })[];
255
264
  conversationId?: string | undefined;
265
+ contextSummary?: string | undefined;
256
266
  model?: string | undefined;
257
267
  pageContext?: string | undefined;
258
268
  availableTools?: string[] | undefined;
@@ -273,6 +283,7 @@ declare const aiChatBackendPlugin: <TTools extends Record<string, Tool> = Record
273
283
  metadata?: any;
274
284
  })[];
275
285
  conversationId?: string | undefined;
286
+ contextSummary?: string | undefined;
276
287
  model?: string | undefined;
277
288
  pageContext?: string | undefined;
278
289
  availableTools?: string[] | undefined;
@@ -519,5 +530,5 @@ declare function createAiChatQueryKeys(client: ReturnType<typeof createApiClient
519
530
  }>;
520
531
  type AiChatQueryKeys = ReturnType<typeof createAiChatQueryKeys>;
521
532
 
522
- export { UpdateConversationOperationInputSchema as U, aiChatIdentityKey as d, aiChatResources as e, createAiChatQueryKeys as f, aiChatBackendPlugin as i, AI_CHAT_OPERATION_INVENTORY as o, AI_CHAT_RAW_ESCAPE_HATCH_INVENTORY as p, AiChatOperationError as q, ChatOperationInputSchema as r, ConversationOperationInputSchema as s };
523
- export type { AiChatIdentityPartition as A, ConversationWithMessages as C, Message as M, RenameConversationInput as R, SerializedConversation as S, SerializedMessage as a, CreateConversationInput as b, Conversation as c, AiChatQueryKeys as g, AiChatBackendConfig as h, AiChatApiRouter as j, AiChatPageContentConfig as k, AiChatAccess as l, AiChatBackendHooks as m, ChatApiContext as n };
533
+ export { UpdateConversationOperationInputSchema as U, aiChatIdentityKey as d, aiChatResources as e, createAiChatQueryKeys as f, aiChatBackendPlugin as i, AI_CHAT_OPERATION_INVENTORY as p, AI_CHAT_RAW_ESCAPE_HATCH_INVENTORY as q, AiChatOperationError as r, ChatOperationInputSchema as s, ConversationOperationInputSchema as t };
534
+ export type { AiChatIdentityPartition as A, ConversationWithMessages as C, Message as M, RenameConversationInput as R, SerializedConversation as S, SerializedMessage as a, CreateConversationInput as b, Conversation as c, AiChatQueryKeys as g, AiChatBackendConfig as h, AiChatApiRouter as j, AiChatCompactionConfig as k, AiChatPageContentConfig as l, AiChatAccess as m, AiChatBackendHooks as n, ChatApiContext as o };
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { z } from 'zod';
3
3
  import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
4
4
  import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.mjs';
5
- import { c as createPostSchema, u as updatePostSchema } from './stack.DtZgEX84.mjs';
5
+ import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.mjs';
6
6
 
7
7
  /**
8
8
  * Options for the usePosts hook
@@ -136,8 +136,6 @@ declare function useSuspenseTags(): {
136
136
  declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, SerializedPost | null, SerializedPost | null>): ResourceFormResult<TValues, SerializedPost | null, SerializedPost | null>;
137
137
  /** Create a new post */
138
138
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
139
- published: boolean;
140
- title: string;
141
139
  tags: ({
142
140
  name: string;
143
141
  } | {
@@ -145,12 +143,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
145
143
  name: string;
146
144
  slug: string;
147
145
  })[];
146
+ title: string;
148
147
  content: string;
149
148
  excerpt: string;
149
+ published: boolean;
150
150
  slug?: string | undefined;
151
+ publishedAt?: Date | undefined;
151
152
  createdAt?: Date | undefined;
152
153
  updatedAt?: Date | undefined;
153
- publishedAt?: Date | undefined;
154
154
  image?: string | undefined;
155
155
  }>;
156
156
  /** Update an existing post by id */