plugin-build-guide-block 1.1.4 → 1.1.6

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 (41) hide show
  1. package/dist/client/index.js +2 -2
  2. package/dist/externalVersion.js +7 -7
  3. package/dist/node_modules/sanitize-html/index.js +1 -1
  4. package/dist/node_modules/sanitize-html/package.json +1 -1
  5. package/dist/server/actions/build.js +682 -83
  6. package/dist/server/collections/ai-build-guide-spaces.js +20 -0
  7. package/dist/server/plugin.js +21 -19
  8. package/dist/server/tools/search-guides.js +41 -30
  9. package/package.json +2 -2
  10. package/src/client/components/BuildButton.tsx +20 -9
  11. package/src/server/actions/build.ts +768 -86
  12. package/src/server/collections/ai-build-guide-spaces.ts +77 -57
  13. package/src/server/plugin.ts +170 -163
  14. package/src/server/tools/search-guides.ts +113 -95
  15. package/dist/client/UserGuideBlock.d.ts +0 -2
  16. package/dist/client/UserGuideBlockInitializer.d.ts +0 -2
  17. package/dist/client/UserGuideBlockProvider.d.ts +0 -2
  18. package/dist/client/UserGuideManager.d.ts +0 -2
  19. package/dist/client/components/BuildButton.d.ts +0 -2
  20. package/dist/client/components/LLMServiceSelect.d.ts +0 -2
  21. package/dist/client/components/ModelSelect.d.ts +0 -2
  22. package/dist/client/components/SpaceSelect.d.ts +0 -2
  23. package/dist/client/components/StatusTag.d.ts +0 -2
  24. package/dist/client/index.d.ts +0 -1
  25. package/dist/client/locale.d.ts +0 -3
  26. package/dist/client/models/UserGuideBlockModel.d.ts +0 -9
  27. package/dist/client/models/index.d.ts +0 -9
  28. package/dist/client/plugin.d.ts +0 -5
  29. package/dist/client/schemaSettings.d.ts +0 -2
  30. package/dist/client/schemas/spacesSchema.d.ts +0 -437
  31. package/dist/index.d.ts +0 -2
  32. package/dist/locale/namespace.d.ts +0 -6
  33. package/dist/server/actions/build.d.ts +0 -2
  34. package/dist/server/actions/getHtml.d.ts +0 -2
  35. package/dist/server/actions/getMarkdown.d.ts +0 -2
  36. package/dist/server/collections/ai-build-guide-pages.d.ts +0 -2
  37. package/dist/server/collections/ai-build-guide-spaces.d.ts +0 -2
  38. package/dist/server/index.d.ts +0 -2
  39. package/dist/server/plugin.d.ts +0 -16
  40. package/dist/server/tools/index.d.ts +0 -1
  41. package/dist/server/tools/search-guides.d.ts +0 -28
@@ -1,437 +0,0 @@
1
- export declare const MIN_TARGET_CHAPTER_COUNT = 1;
2
- export declare const MAX_TARGET_CHAPTER_COUNT = 12;
3
- export declare const DEFAULT_TARGET_CHAPTER_COUNT = 5;
4
- export declare const spacesSchema: {
5
- type: string;
6
- name: string;
7
- properties: {
8
- card: {
9
- type: string;
10
- 'x-component': string;
11
- 'x-decorator': string;
12
- 'x-decorator-props': {
13
- collection: string;
14
- action: string;
15
- rowKey: string;
16
- params: {
17
- appends: string[];
18
- sort: string[];
19
- };
20
- };
21
- properties: {
22
- actions: {
23
- type: string;
24
- 'x-component': string;
25
- 'x-component-props': {
26
- style: {
27
- marginBottom: number;
28
- };
29
- };
30
- properties: {
31
- create: {
32
- type: string;
33
- 'x-component': string;
34
- 'x-component-props': {
35
- type: string;
36
- title: string;
37
- icon: string;
38
- };
39
- properties: {
40
- drawer: {
41
- type: string;
42
- 'x-component': string;
43
- 'x-component-props': {
44
- title: string;
45
- };
46
- properties: {
47
- form: {
48
- type: string;
49
- 'x-component': string;
50
- 'x-use-component-props': string;
51
- properties: {
52
- title: {
53
- type: string;
54
- title: string;
55
- required: boolean;
56
- 'x-decorator': string;
57
- 'x-component': string;
58
- };
59
- llmService: {
60
- type: string;
61
- title: string;
62
- required: boolean;
63
- 'x-decorator': string;
64
- 'x-component': string;
65
- };
66
- model: {
67
- type: string;
68
- title: string;
69
- required: boolean;
70
- 'x-decorator': string;
71
- 'x-component': string;
72
- 'x-reactions': {
73
- dependencies: string[];
74
- fulfill: {
75
- state: {
76
- value: string;
77
- };
78
- };
79
- };
80
- };
81
- outputFormat: {
82
- type: string;
83
- title: string;
84
- required: boolean;
85
- default: string;
86
- 'x-decorator': string;
87
- 'x-component': string;
88
- enum: {
89
- label: string;
90
- value: string;
91
- }[];
92
- };
93
- targetChapterCount: {
94
- type: string;
95
- title: string;
96
- required: boolean;
97
- default: number;
98
- 'x-decorator': string;
99
- 'x-component': string;
100
- 'x-component-props': {
101
- min: number;
102
- max: number;
103
- precision: number;
104
- style: {
105
- width: string;
106
- };
107
- };
108
- };
109
- chapterGuidance: {
110
- type: string;
111
- title: string;
112
- 'x-decorator': string;
113
- 'x-component': string;
114
- 'x-component-props': {
115
- rows: number;
116
- placeholder: string;
117
- };
118
- };
119
- systemPrompt: {
120
- type: string;
121
- title: string;
122
- 'x-decorator': string;
123
- 'x-component': string;
124
- 'x-component-props': {
125
- rows: number;
126
- };
127
- default: string;
128
- };
129
- documents: {
130
- type: string;
131
- title: string;
132
- 'x-decorator': string;
133
- 'x-component': string;
134
- 'x-component-props': {
135
- multiple: boolean;
136
- action: string;
137
- maxCount: number;
138
- };
139
- };
140
- footer: {
141
- type: string;
142
- 'x-component': string;
143
- properties: {
144
- cancel: {
145
- type: string;
146
- title: string;
147
- 'x-component': string;
148
- 'x-use-component-props': string;
149
- };
150
- submit: {
151
- type: string;
152
- title: string;
153
- 'x-component': string;
154
- 'x-use-component-props': string;
155
- };
156
- };
157
- };
158
- };
159
- };
160
- };
161
- };
162
- };
163
- };
164
- };
165
- };
166
- table: {
167
- type: string;
168
- 'x-component': string;
169
- 'x-use-component-props': string;
170
- 'x-component-props': {
171
- rowKey: string;
172
- rowSelection: {
173
- type: string;
174
- };
175
- };
176
- properties: {
177
- title: {
178
- type: string;
179
- title: string;
180
- 'x-decorator': string;
181
- 'x-component': string;
182
- properties: {
183
- title: {
184
- type: string;
185
- 'x-component': string;
186
- 'x-read-pretty': boolean;
187
- };
188
- };
189
- };
190
- status: {
191
- type: string;
192
- title: string;
193
- 'x-decorator': string;
194
- 'x-component': string;
195
- properties: {
196
- status: {
197
- type: string;
198
- 'x-component': string;
199
- 'x-read-pretty': boolean;
200
- };
201
- };
202
- };
203
- buildPhase: {
204
- type: string;
205
- title: string;
206
- 'x-decorator': string;
207
- 'x-component': string;
208
- properties: {
209
- buildPhase: {
210
- type: string;
211
- 'x-component': string;
212
- 'x-read-pretty': boolean;
213
- };
214
- };
215
- };
216
- pageCount: {
217
- type: string;
218
- title: string;
219
- 'x-decorator': string;
220
- 'x-component': string;
221
- properties: {
222
- pageCount: {
223
- type: string;
224
- 'x-component': string;
225
- 'x-read-pretty': boolean;
226
- };
227
- };
228
- };
229
- buildLog: {
230
- type: string;
231
- title: string;
232
- 'x-decorator': string;
233
- 'x-component': string;
234
- properties: {
235
- buildLog: {
236
- type: string;
237
- 'x-component': string;
238
- 'x-read-pretty': boolean;
239
- };
240
- };
241
- };
242
- actions: {
243
- type: string;
244
- title: string;
245
- 'x-decorator': string;
246
- 'x-component': string;
247
- properties: {
248
- actions: {
249
- type: string;
250
- 'x-component': string;
251
- 'x-component-props': {
252
- split: string;
253
- };
254
- properties: {
255
- build: {
256
- type: string;
257
- 'x-component': string;
258
- };
259
- update: {
260
- type: string;
261
- title: string;
262
- 'x-component': string;
263
- 'x-component-props': {
264
- type: string;
265
- };
266
- properties: {
267
- drawer: {
268
- type: string;
269
- 'x-component': string;
270
- 'x-component-props': {
271
- title: string;
272
- };
273
- properties: {
274
- form: {
275
- type: string;
276
- 'x-component': string;
277
- 'x-use-component-props': string;
278
- properties: {
279
- title: {
280
- type: string;
281
- title: string;
282
- required: boolean;
283
- 'x-decorator': string;
284
- 'x-component': string;
285
- };
286
- llmService: {
287
- type: string;
288
- title: string;
289
- required: boolean;
290
- 'x-decorator': string;
291
- 'x-component': string;
292
- };
293
- model: {
294
- type: string;
295
- title: string;
296
- required: boolean;
297
- 'x-decorator': string;
298
- 'x-component': string;
299
- };
300
- outputFormat: {
301
- type: string;
302
- title: string;
303
- required: boolean;
304
- 'x-decorator': string;
305
- 'x-component': string;
306
- enum: {
307
- label: string;
308
- value: string;
309
- }[];
310
- };
311
- targetChapterCount: {
312
- type: string;
313
- title: string;
314
- required: boolean;
315
- default: number;
316
- 'x-decorator': string;
317
- 'x-component': string;
318
- 'x-component-props': {
319
- min: number;
320
- max: number;
321
- precision: number;
322
- style: {
323
- width: string;
324
- };
325
- };
326
- };
327
- chapterGuidance: {
328
- type: string;
329
- title: string;
330
- 'x-decorator': string;
331
- 'x-component': string;
332
- 'x-component-props': {
333
- rows: number;
334
- placeholder: string;
335
- };
336
- };
337
- systemPrompt: {
338
- type: string;
339
- title: string;
340
- 'x-decorator': string;
341
- 'x-component': string;
342
- 'x-component-props': {
343
- rows: number;
344
- };
345
- };
346
- documents: {
347
- type: string;
348
- title: string;
349
- 'x-decorator': string;
350
- 'x-component': string;
351
- 'x-component-props': {
352
- multiple: boolean;
353
- action: string;
354
- maxCount: number;
355
- };
356
- };
357
- generatedHtml: {
358
- type: string;
359
- title: string;
360
- 'x-decorator': string;
361
- 'x-component': string;
362
- 'x-component-props': {
363
- rows: number;
364
- };
365
- 'x-read-pretty': boolean;
366
- };
367
- generatedMarkdown: {
368
- type: string;
369
- title: string;
370
- 'x-decorator': string;
371
- 'x-component': string;
372
- 'x-component-props': {
373
- rows: number;
374
- };
375
- 'x-read-pretty': boolean;
376
- 'x-reactions': {
377
- dependencies: string[];
378
- fulfill: {
379
- state: {
380
- visible: string;
381
- };
382
- };
383
- };
384
- };
385
- buildLog: {
386
- type: string;
387
- title: string;
388
- 'x-decorator': string;
389
- 'x-component': string;
390
- 'x-read-pretty': boolean;
391
- };
392
- footer: {
393
- type: string;
394
- 'x-component': string;
395
- properties: {
396
- cancel: {
397
- type: string;
398
- title: string;
399
- 'x-component': string;
400
- 'x-use-component-props': string;
401
- };
402
- submit: {
403
- type: string;
404
- title: string;
405
- 'x-component': string;
406
- 'x-use-component-props': string;
407
- };
408
- };
409
- };
410
- };
411
- };
412
- };
413
- };
414
- };
415
- };
416
- delete: {
417
- type: string;
418
- title: string;
419
- 'x-component': string;
420
- 'x-use-component-props': string;
421
- 'x-component-props': {
422
- confirm: {
423
- title: string;
424
- content: string;
425
- };
426
- };
427
- };
428
- };
429
- };
430
- };
431
- };
432
- };
433
- };
434
- };
435
- };
436
- };
437
- };
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './server';
2
- export { default } from './server';
@@ -1,6 +0,0 @@
1
- /**
2
- * Shared namespace constant.
3
- * Matches the namespace already used in inline schema strings
4
- * such as {{t("...", { ns: "build-guide-block" })}}.
5
- */
6
- export declare const name = "build-guide-block";
@@ -1,2 +0,0 @@
1
- import { Context, Next } from '@nocobase/actions';
2
- export declare function build(ctx: Context, next: Next): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { Context, Next } from '@nocobase/actions';
2
- export declare function getHtml(ctx: Context, next: Next): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { Context, Next } from '@nocobase/actions';
2
- export declare function getMarkdown(ctx: Context, next: Next): Promise<void>;
@@ -1,2 +0,0 @@
1
- declare const _default: import("@nocobase/database").CollectionOptions;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("@nocobase/database").CollectionOptions;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- export { default } from './plugin';
2
- export declare const namespace = "plugin-build-guide-block";
@@ -1,16 +0,0 @@
1
- import { InstallOptions, Plugin } from '@nocobase/server';
2
- export declare class PluginBuildGuideBlockServer extends Plugin {
3
- private readonly schemaCollections;
4
- afterAdd(): void;
5
- beforeLoad(): void;
6
- load(): Promise<void>;
7
- private registerAITools;
8
- private ensureCollectionSchema;
9
- private ensureSchema;
10
- install(options?: InstallOptions): Promise<void>;
11
- upgrade(): Promise<void>;
12
- afterEnable(): Promise<void>;
13
- afterDisable(): Promise<void>;
14
- remove(): Promise<void>;
15
- }
16
- export default PluginBuildGuideBlockServer;
@@ -1 +0,0 @@
1
- export { default as searchBuildGuidesTool } from './search-guides';
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- declare const _default: {
3
- groupName: string;
4
- tool: {
5
- name: string;
6
- title: string;
7
- description: string;
8
- execution: string;
9
- schema: z.ZodObject<{
10
- action: z.ZodEnum<{
11
- list_spaces: "list_spaces";
12
- search_pages: "search_pages";
13
- read_page: "read_page";
14
- }>;
15
- query: z.ZodOptional<z.ZodString>;
16
- pageId: z.ZodOptional<z.ZodString>;
17
- }, z.core.$strip>;
18
- invoke: (args: {
19
- action: string;
20
- query?: string;
21
- pageId?: string;
22
- }, ctx: any) => Promise<{
23
- status: string;
24
- content: any;
25
- }>;
26
- };
27
- };
28
- export default _default;