mcp-probe-kit 1.15.1 → 2.0.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 (162) hide show
  1. package/README.md +113 -1642
  2. package/build/index.js +75 -42
  3. package/build/lib/elicitation-helper.d.ts +73 -0
  4. package/build/lib/elicitation-helper.js +130 -0
  5. package/build/lib/response.d.ts +32 -0
  6. package/build/lib/response.js +28 -0
  7. package/build/lib/tasks-manager.d.ts +116 -0
  8. package/build/lib/tasks-manager.js +217 -0
  9. package/build/lib/toolset-manager.d.ts +48 -0
  10. package/build/lib/toolset-manager.js +112 -0
  11. package/build/schemas/basic-tools.d.ts +0 -32
  12. package/build/schemas/basic-tools.js +0 -34
  13. package/build/schemas/code-analysis-tools.d.ts +0 -36
  14. package/build/schemas/code-analysis-tools.js +0 -38
  15. package/build/schemas/code-gen-tools.d.ts +0 -44
  16. package/build/schemas/code-gen-tools.js +0 -46
  17. package/build/schemas/doc-util-tools.d.ts +0 -54
  18. package/build/schemas/doc-util-tools.js +0 -58
  19. package/build/schemas/index.d.ts +0 -188
  20. package/build/schemas/orchestration-tools.d.ts +0 -22
  21. package/build/schemas/orchestration-tools.js +0 -23
  22. package/build/schemas/output/core-tools.d.ts +817 -0
  23. package/build/schemas/output/core-tools.js +421 -0
  24. package/build/schemas/output/generation-tools.d.ts +936 -0
  25. package/build/schemas/output/generation-tools.js +446 -0
  26. package/build/schemas/output/helper-tools.d.ts +243 -0
  27. package/build/schemas/output/helper-tools.js +138 -0
  28. package/build/schemas/output/index.d.ts +76 -0
  29. package/build/schemas/output/index.js +96 -0
  30. package/build/schemas/output/project-tools.d.ts +702 -0
  31. package/build/schemas/output/project-tools.js +339 -0
  32. package/build/schemas/output/ui-ux-tools.d.ts +469 -0
  33. package/build/schemas/output/ui-ux-tools.js +218 -0
  34. package/build/schemas/output/workflow-tools.d.ts +267 -0
  35. package/build/schemas/output/workflow-tools.js +179 -0
  36. package/build/schemas/structured-output.d.ts +1317 -0
  37. package/build/schemas/structured-output.js +1017 -0
  38. package/build/tools/__tests__/start_ui.integration.test.js +5 -5
  39. package/build/tools/__tests__/start_ui.property.test.js +11 -11
  40. package/build/tools/add_feature.d.ts +1 -13
  41. package/build/tools/add_feature.js +48 -13
  42. package/build/tools/analyze_project.js +57 -18
  43. package/build/tools/check_deps.d.ts +1 -13
  44. package/build/tools/check_deps.js +24 -15
  45. package/build/tools/code_review.d.ts +1 -13
  46. package/build/tools/code_review.js +19 -16
  47. package/build/tools/debug.d.ts +1 -13
  48. package/build/tools/debug.js +18 -16
  49. package/build/tools/estimate.d.ts +1 -19
  50. package/build/tools/estimate.js +36 -6
  51. package/build/tools/fix_bug.d.ts +1 -13
  52. package/build/tools/fix_bug.js +24 -6
  53. package/build/tools/gen_mock.d.ts +1 -19
  54. package/build/tools/gen_mock.js +42 -227
  55. package/build/tools/genapi.d.ts +1 -13
  56. package/build/tools/genapi.js +18 -15
  57. package/build/tools/genchangelog.d.ts +1 -13
  58. package/build/tools/genchangelog.js +36 -212
  59. package/build/tools/gencommit.d.ts +1 -7
  60. package/build/tools/gencommit.js +21 -13
  61. package/build/tools/gendoc.d.ts +1 -13
  62. package/build/tools/gendoc.js +18 -15
  63. package/build/tools/genpr.d.ts +1 -13
  64. package/build/tools/genpr.js +28 -157
  65. package/build/tools/genreadme.d.ts +1 -13
  66. package/build/tools/genreadme.js +22 -587
  67. package/build/tools/gensql.d.ts +1 -13
  68. package/build/tools/gensql.js +24 -283
  69. package/build/tools/gentest.d.ts +1 -13
  70. package/build/tools/gentest.js +49 -16
  71. package/build/tools/index.d.ts +0 -10
  72. package/build/tools/index.js +0 -10
  73. package/build/tools/init_component_catalog.d.ts +3 -20
  74. package/build/tools/init_component_catalog.js +141 -786
  75. package/build/tools/init_project.d.ts +7 -13
  76. package/build/tools/init_project.js +54 -16
  77. package/build/tools/init_project_context.d.ts +1 -13
  78. package/build/tools/init_project_context.js +41 -14
  79. package/build/tools/perf.d.ts +1 -13
  80. package/build/tools/perf.js +18 -15
  81. package/build/tools/refactor.d.ts +1 -13
  82. package/build/tools/refactor.js +54 -15
  83. package/build/tools/render_ui.d.ts +2 -19
  84. package/build/tools/render_ui.js +201 -347
  85. package/build/tools/resolve_conflict.d.ts +1 -13
  86. package/build/tools/resolve_conflict.js +18 -15
  87. package/build/tools/security_scan.d.ts +1 -13
  88. package/build/tools/security_scan.js +16 -5
  89. package/build/tools/start_api.d.ts +7 -13
  90. package/build/tools/start_api.js +69 -157
  91. package/build/tools/start_bugfix.d.ts +1 -7
  92. package/build/tools/start_bugfix.js +38 -2
  93. package/build/tools/start_doc.d.ts +7 -13
  94. package/build/tools/start_doc.js +76 -169
  95. package/build/tools/start_feature.d.ts +1 -7
  96. package/build/tools/start_feature.js +54 -2
  97. package/build/tools/start_onboard.d.ts +1 -7
  98. package/build/tools/start_onboard.js +40 -2
  99. package/build/tools/start_ralph.d.ts +1 -7
  100. package/build/tools/start_ralph.js +88 -2
  101. package/build/tools/start_refactor.d.ts +7 -13
  102. package/build/tools/start_refactor.js +75 -148
  103. package/build/tools/start_release.d.ts +7 -13
  104. package/build/tools/start_release.js +56 -131
  105. package/build/tools/start_review.d.ts +7 -13
  106. package/build/tools/start_review.js +70 -142
  107. package/build/tools/start_ui.d.ts +1 -7
  108. package/build/tools/start_ui.js +98 -8
  109. package/build/tools/ui-ux-tools.d.ts +3 -39
  110. package/build/tools/ui-ux-tools.js +201 -125
  111. package/docs/data/tools.js +864 -0
  112. package/docs/index.html +594 -0
  113. package/docs/pages/all-tools.html +649 -0
  114. package/docs/pages/examples.html +564 -0
  115. package/docs/pages/getting-started.html +529 -0
  116. package/docs/pages/migration.html +308 -0
  117. package/docs/specs/algorithm-enhancement/roadmap.md +619 -0
  118. package/docs/specs/vnext-upgrade/00-OVERVIEW.md +258 -0
  119. package/docs/specs/vnext-upgrade/BETA_RELEASE_GUIDE.md +328 -0
  120. package/docs/specs/vnext-upgrade/GITHUB_DISCUSSION_TEMPLATE.md +236 -0
  121. package/docs/specs/vnext-upgrade/M8.9-PROGRESS-UPDATE.md +248 -0
  122. package/docs/specs/vnext-upgrade/PROGRESS-SUMMARY.md +195 -0
  123. package/docs/specs/vnext-upgrade/QUICK_REFERENCE.md +338 -0
  124. package/docs/specs/vnext-upgrade/README.md +125 -0
  125. package/docs/specs/vnext-upgrade/STATUS-UPDATE-2026-01-26.md +230 -0
  126. package/docs/specs/vnext-upgrade/TOOL_CLEANUP.md +343 -0
  127. package/docs/specs/vnext-upgrade/completed/M1-M2-SUMMARY.md +27 -0
  128. package/docs/specs/vnext-upgrade/completed/M3_COMPLETION_SUMMARY.md +273 -0
  129. package/docs/specs/vnext-upgrade/completed/M4-SUMMARY.md +19 -0
  130. package/docs/specs/vnext-upgrade/completed/M5_COMPLETION_SUMMARY.md +0 -0
  131. package/docs/specs/vnext-upgrade/completed/M8.1-SUMMARY.md +247 -0
  132. package/docs/specs/vnext-upgrade/completed/M8.2-SUMMARY.md +296 -0
  133. package/docs/specs/vnext-upgrade/completed/M8.3-SUMMARY.md +241 -0
  134. package/docs/specs/vnext-upgrade/completed/M8.3-TEST-SUMMARY.md +216 -0
  135. package/docs/specs/vnext-upgrade/completed/M8.4-SUMMARY.md +217 -0
  136. package/docs/specs/vnext-upgrade/completed/M8.4-TEST-SUMMARY.md +198 -0
  137. package/docs/specs/vnext-upgrade/completed/M8.5-SUMMARY.md +202 -0
  138. package/docs/specs/vnext-upgrade/completed/M8.5-TEST-SUMMARY.md +223 -0
  139. package/docs/specs/vnext-upgrade/completed/M8.6-SUMMARY.md +299 -0
  140. package/docs/specs/vnext-upgrade/completed/M8.8-TEST-SUMMARY.md +216 -0
  141. package/docs/specs/vnext-upgrade/completed/TOOL-CLEANUP-SUMMARY.md +210 -0
  142. package/docs/specs/vnext-upgrade/design.md +848 -0
  143. package/docs/specs/vnext-upgrade/requirements.md +221 -0
  144. package/docs/specs/vnext-upgrade/tasks/00-INDEX.md +335 -0
  145. package/docs/specs/vnext-upgrade/tasks/M8.1-SCHEMA-DEFINITION.md +300 -0
  146. package/docs/specs/vnext-upgrade/tasks/M8.2-P1-TOOLS.md +249 -0
  147. package/docs/specs/vnext-upgrade/tasks/M8.3-GENERATION-TOOLS.md +49 -0
  148. package/docs/specs/vnext-upgrade/tasks/M8.4-ORCHESTRATION-TOOLS.md +28 -0
  149. package/docs/specs/vnext-upgrade/tasks/M8.5-PROJECT-TOOLS.md +29 -0
  150. package/docs/specs/vnext-upgrade/tasks/M8.6-UI-TOOLS.md +66 -0
  151. package/docs/specs/vnext-upgrade/tasks/M8.7-HELPER-TOOLS.md +24 -0
  152. package/docs/specs/vnext-upgrade/tasks/M8.8-INTEGRATION-TESTS.md +90 -0
  153. package/docs/specs/vnext-upgrade/tasks/M8.9-DOCUMENTATION.md +103 -0
  154. package/docs/styles/docs.css +556 -0
  155. package/docs/styles/page.css +815 -0
  156. package/docs/vnext/MCP_2025-11-25_GUIDE.md +276 -0
  157. package/docs/vnext/vNext-PRD.md +488 -0
  158. package/package.json +6 -6
  159. package/docs/BEST_PRACTICES.md +0 -1185
  160. package/docs/HOW_TO_TRIGGER.md +0 -1141
  161. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +0 -544
  162. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +0 -1447
@@ -0,0 +1,469 @@
1
+ /**
2
+ * UI/UX 工具的结构化输出 Schema
3
+ * 包含: ui_design_system, ui_search, sync_ui_data, design2code, init_component_catalog, render_ui
4
+ */
5
+ /**
6
+ * Design System Schema
7
+ * 用于 ui_design_system 工具的结构化输出
8
+ */
9
+ export declare const DesignSystemSchema: {
10
+ readonly type: "object";
11
+ readonly properties: {
12
+ readonly summary: {
13
+ readonly type: "string";
14
+ };
15
+ readonly productType: {
16
+ readonly type: "string";
17
+ };
18
+ readonly colors: {
19
+ readonly type: "object";
20
+ readonly properties: {
21
+ readonly primary: {
22
+ readonly type: "object";
23
+ readonly additionalProperties: {
24
+ readonly type: "string";
25
+ };
26
+ };
27
+ readonly secondary: {
28
+ readonly type: "object";
29
+ readonly additionalProperties: {
30
+ readonly type: "string";
31
+ };
32
+ };
33
+ readonly neutral: {
34
+ readonly type: "object";
35
+ readonly additionalProperties: {
36
+ readonly type: "string";
37
+ };
38
+ };
39
+ readonly semantic: {
40
+ readonly type: "object";
41
+ readonly additionalProperties: {
42
+ readonly type: "string";
43
+ };
44
+ };
45
+ };
46
+ };
47
+ readonly typography: {
48
+ readonly type: "object";
49
+ readonly properties: {
50
+ readonly fontFamilies: {
51
+ readonly type: "object";
52
+ readonly additionalProperties: {
53
+ readonly type: "string";
54
+ };
55
+ };
56
+ readonly fontSizes: {
57
+ readonly type: "object";
58
+ readonly additionalProperties: {
59
+ readonly type: "string";
60
+ };
61
+ };
62
+ readonly fontWeights: {
63
+ readonly type: "object";
64
+ readonly additionalProperties: {
65
+ readonly type: "number";
66
+ };
67
+ };
68
+ readonly lineHeights: {
69
+ readonly type: "object";
70
+ readonly additionalProperties: {
71
+ readonly type: "string";
72
+ };
73
+ };
74
+ };
75
+ };
76
+ readonly spacing: {
77
+ readonly type: "object";
78
+ readonly additionalProperties: {
79
+ readonly type: "string";
80
+ };
81
+ };
82
+ readonly breakpoints: {
83
+ readonly type: "object";
84
+ readonly additionalProperties: {
85
+ readonly type: "string";
86
+ };
87
+ };
88
+ readonly components: {
89
+ readonly type: "array";
90
+ readonly items: {
91
+ readonly type: "object";
92
+ readonly properties: {
93
+ readonly name: {
94
+ readonly type: "string";
95
+ };
96
+ readonly variants: {
97
+ readonly type: "array";
98
+ readonly items: {
99
+ readonly type: "string";
100
+ };
101
+ };
102
+ readonly props: {
103
+ readonly type: "array";
104
+ readonly items: {
105
+ readonly type: "string";
106
+ };
107
+ };
108
+ };
109
+ };
110
+ };
111
+ readonly documentation: {
112
+ readonly type: "string";
113
+ };
114
+ };
115
+ readonly required: readonly ["summary", "productType", "colors", "typography"];
116
+ };
117
+ /**
118
+ * UI Search Result Schema
119
+ * 用于 ui_search 工具的结构化输出
120
+ */
121
+ export declare const UISearchResultSchema: {
122
+ readonly type: "object";
123
+ readonly properties: {
124
+ readonly summary: {
125
+ readonly type: "string";
126
+ };
127
+ readonly query: {
128
+ readonly type: "string";
129
+ };
130
+ readonly category: {
131
+ readonly type: "string";
132
+ };
133
+ readonly results: {
134
+ readonly type: "array";
135
+ readonly items: {
136
+ readonly type: "object";
137
+ readonly properties: {
138
+ readonly id: {
139
+ readonly type: "string";
140
+ };
141
+ readonly title: {
142
+ readonly type: "string";
143
+ };
144
+ readonly description: {
145
+ readonly type: "string";
146
+ };
147
+ readonly category: {
148
+ readonly type: "string";
149
+ };
150
+ readonly url: {
151
+ readonly type: "string";
152
+ };
153
+ readonly score: {
154
+ readonly type: "number";
155
+ };
156
+ readonly preview: {
157
+ readonly type: "string";
158
+ };
159
+ };
160
+ };
161
+ };
162
+ readonly totalResults: {
163
+ readonly type: "number";
164
+ };
165
+ };
166
+ readonly required: readonly ["summary", "query", "results", "totalResults"];
167
+ };
168
+ /**
169
+ * Sync Report Schema
170
+ * 用于 sync_ui_data 工具的结构化输出
171
+ */
172
+ export declare const SyncReportSchema: {
173
+ readonly type: "object";
174
+ readonly properties: {
175
+ readonly summary: {
176
+ readonly type: "string";
177
+ };
178
+ readonly status: {
179
+ readonly type: "string";
180
+ readonly enum: readonly ["success", "partial", "failed"];
181
+ };
182
+ readonly synced: {
183
+ readonly type: "object";
184
+ readonly properties: {
185
+ readonly colors: {
186
+ readonly type: "number";
187
+ };
188
+ readonly icons: {
189
+ readonly type: "number";
190
+ };
191
+ readonly components: {
192
+ readonly type: "number";
193
+ };
194
+ readonly patterns: {
195
+ readonly type: "number";
196
+ };
197
+ };
198
+ };
199
+ readonly version: {
200
+ readonly type: "string";
201
+ };
202
+ readonly timestamp: {
203
+ readonly type: "string";
204
+ };
205
+ readonly errors: {
206
+ readonly type: "array";
207
+ readonly items: {
208
+ readonly type: "string";
209
+ };
210
+ };
211
+ };
212
+ readonly required: readonly ["summary", "status", "synced"];
213
+ };
214
+ /**
215
+ * Design2Code Schema
216
+ * 用于 design2code 工具的结构化输出
217
+ */
218
+ export declare const Design2CodeSchema: {
219
+ readonly type: "object";
220
+ readonly properties: {
221
+ readonly summary: {
222
+ readonly type: "string";
223
+ };
224
+ readonly framework: {
225
+ readonly type: "string";
226
+ readonly enum: readonly ["react", "vue", "angular", "svelte", "html"];
227
+ };
228
+ readonly componentType: {
229
+ readonly type: "string";
230
+ readonly enum: readonly ["page", "component"];
231
+ };
232
+ readonly code: {
233
+ readonly type: "string";
234
+ readonly description: "生成的代码";
235
+ };
236
+ readonly styles: {
237
+ readonly type: "string";
238
+ readonly description: "样式代码";
239
+ };
240
+ readonly assets: {
241
+ readonly type: "array";
242
+ readonly items: {
243
+ readonly type: "object";
244
+ readonly properties: {
245
+ readonly type: {
246
+ readonly type: "string";
247
+ };
248
+ readonly url: {
249
+ readonly type: "string";
250
+ };
251
+ readonly localPath: {
252
+ readonly type: "string";
253
+ };
254
+ };
255
+ };
256
+ };
257
+ readonly components: {
258
+ readonly type: "array";
259
+ readonly items: {
260
+ readonly type: "object";
261
+ readonly properties: {
262
+ readonly name: {
263
+ readonly type: "string";
264
+ };
265
+ readonly path: {
266
+ readonly type: "string";
267
+ };
268
+ readonly props: {
269
+ readonly type: "array";
270
+ readonly items: {
271
+ readonly type: "string";
272
+ };
273
+ };
274
+ };
275
+ };
276
+ };
277
+ };
278
+ readonly required: readonly ["summary", "framework", "componentType", "code"];
279
+ };
280
+ /**
281
+ * Component Catalog Schema
282
+ * 用于 init_component_catalog 工具的结构化输出(内部工具)
283
+ */
284
+ export declare const ComponentCatalogSchema: {
285
+ readonly type: "object";
286
+ readonly properties: {
287
+ readonly summary: {
288
+ readonly type: "string";
289
+ };
290
+ readonly components: {
291
+ readonly type: "array";
292
+ readonly items: {
293
+ readonly type: "object";
294
+ readonly properties: {
295
+ readonly name: {
296
+ readonly type: "string";
297
+ };
298
+ readonly category: {
299
+ readonly type: "string";
300
+ };
301
+ readonly description: {
302
+ readonly type: "string";
303
+ };
304
+ readonly props: {
305
+ readonly type: "array";
306
+ readonly items: {
307
+ readonly type: "object";
308
+ readonly properties: {
309
+ readonly name: {
310
+ readonly type: "string";
311
+ };
312
+ readonly type: {
313
+ readonly type: "string";
314
+ };
315
+ readonly required: {
316
+ readonly type: "boolean";
317
+ };
318
+ readonly default: {
319
+ readonly type: "string";
320
+ };
321
+ };
322
+ };
323
+ };
324
+ readonly variants: {
325
+ readonly type: "array";
326
+ readonly items: {
327
+ readonly type: "string";
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
333
+ readonly catalogPath: {
334
+ readonly type: "string";
335
+ };
336
+ };
337
+ readonly required: readonly ["summary", "components", "catalogPath"];
338
+ };
339
+ /**
340
+ * Render Result Schema
341
+ * 用于 render_ui 工具的结构化输出(内部工具)
342
+ */
343
+ export declare const RenderResultSchema: {
344
+ readonly type: "object";
345
+ readonly properties: {
346
+ readonly summary: {
347
+ readonly type: "string";
348
+ };
349
+ readonly framework: {
350
+ readonly type: "string";
351
+ readonly enum: readonly ["react", "vue", "html"];
352
+ };
353
+ readonly code: {
354
+ readonly type: "string";
355
+ readonly description: "渲染的代码";
356
+ };
357
+ readonly styles: {
358
+ readonly type: "string";
359
+ readonly description: "应用的样式";
360
+ };
361
+ readonly usedComponents: {
362
+ readonly type: "array";
363
+ readonly items: {
364
+ readonly type: "string";
365
+ };
366
+ };
367
+ readonly designTokens: {
368
+ readonly type: "object";
369
+ readonly description: "使用的设计令牌";
370
+ readonly additionalProperties: {
371
+ readonly type: "string";
372
+ };
373
+ };
374
+ };
375
+ readonly required: readonly ["summary", "framework", "code"];
376
+ };
377
+ export interface DesignSystem {
378
+ summary: string;
379
+ productType: string;
380
+ colors: {
381
+ primary?: Record<string, string>;
382
+ secondary?: Record<string, string>;
383
+ neutral?: Record<string, string>;
384
+ semantic?: Record<string, string>;
385
+ };
386
+ typography: {
387
+ fontFamilies?: Record<string, string>;
388
+ fontSizes?: Record<string, string>;
389
+ fontWeights?: Record<string, number>;
390
+ lineHeights?: Record<string, string>;
391
+ };
392
+ spacing?: Record<string, string>;
393
+ breakpoints?: Record<string, string>;
394
+ components?: Array<{
395
+ name?: string;
396
+ variants?: string[];
397
+ props?: string[];
398
+ }>;
399
+ documentation?: string;
400
+ }
401
+ export interface UISearchResult {
402
+ summary: string;
403
+ query: string;
404
+ category?: string;
405
+ results: Array<{
406
+ id?: string;
407
+ title?: string;
408
+ description?: string;
409
+ category?: string;
410
+ url?: string;
411
+ score?: number;
412
+ preview?: string;
413
+ }>;
414
+ totalResults: number;
415
+ }
416
+ export interface SyncReport {
417
+ summary: string;
418
+ status: 'success' | 'partial' | 'failed';
419
+ synced: {
420
+ colors?: number;
421
+ icons?: number;
422
+ components?: number;
423
+ patterns?: number;
424
+ };
425
+ version?: string;
426
+ timestamp?: string;
427
+ errors?: string[];
428
+ }
429
+ export interface Design2Code {
430
+ summary: string;
431
+ framework: 'react' | 'vue' | 'angular' | 'svelte' | 'html';
432
+ componentType: 'page' | 'component';
433
+ code: string;
434
+ styles?: string;
435
+ assets?: Array<{
436
+ type?: string;
437
+ url?: string;
438
+ localPath?: string;
439
+ }>;
440
+ components?: Array<{
441
+ name?: string;
442
+ path?: string;
443
+ props?: string[];
444
+ }>;
445
+ }
446
+ export interface ComponentCatalog {
447
+ summary: string;
448
+ components: Array<{
449
+ name?: string;
450
+ category?: string;
451
+ description?: string;
452
+ props?: Array<{
453
+ name?: string;
454
+ type?: string;
455
+ required?: boolean;
456
+ default?: string;
457
+ }>;
458
+ variants?: string[];
459
+ }>;
460
+ catalogPath: string;
461
+ }
462
+ export interface RenderResult {
463
+ summary: string;
464
+ framework: 'react' | 'vue' | 'html';
465
+ code: string;
466
+ styles?: string;
467
+ usedComponents?: string[];
468
+ designTokens?: Record<string, string>;
469
+ }
@@ -0,0 +1,218 @@
1
+ /**
2
+ * UI/UX 工具的结构化输出 Schema
3
+ * 包含: ui_design_system, ui_search, sync_ui_data, design2code, init_component_catalog, render_ui
4
+ */
5
+ /**
6
+ * Design System Schema
7
+ * 用于 ui_design_system 工具的结构化输出
8
+ */
9
+ export const DesignSystemSchema = {
10
+ type: 'object',
11
+ properties: {
12
+ summary: { type: 'string' },
13
+ productType: { type: 'string' },
14
+ colors: {
15
+ type: 'object',
16
+ properties: {
17
+ primary: { type: 'object', additionalProperties: { type: 'string' } },
18
+ secondary: { type: 'object', additionalProperties: { type: 'string' } },
19
+ neutral: { type: 'object', additionalProperties: { type: 'string' } },
20
+ semantic: { type: 'object', additionalProperties: { type: 'string' } },
21
+ },
22
+ },
23
+ typography: {
24
+ type: 'object',
25
+ properties: {
26
+ fontFamilies: { type: 'object', additionalProperties: { type: 'string' } },
27
+ fontSizes: { type: 'object', additionalProperties: { type: 'string' } },
28
+ fontWeights: { type: 'object', additionalProperties: { type: 'number' } },
29
+ lineHeights: { type: 'object', additionalProperties: { type: 'string' } },
30
+ },
31
+ },
32
+ spacing: {
33
+ type: 'object',
34
+ additionalProperties: { type: 'string' },
35
+ },
36
+ breakpoints: {
37
+ type: 'object',
38
+ additionalProperties: { type: 'string' },
39
+ },
40
+ components: {
41
+ type: 'array',
42
+ items: {
43
+ type: 'object',
44
+ properties: {
45
+ name: { type: 'string' },
46
+ variants: { type: 'array', items: { type: 'string' } },
47
+ props: { type: 'array', items: { type: 'string' } },
48
+ },
49
+ },
50
+ },
51
+ documentation: { type: 'string' },
52
+ },
53
+ required: ['summary', 'productType', 'colors', 'typography'],
54
+ };
55
+ /**
56
+ * UI Search Result Schema
57
+ * 用于 ui_search 工具的结构化输出
58
+ */
59
+ export const UISearchResultSchema = {
60
+ type: 'object',
61
+ properties: {
62
+ summary: { type: 'string' },
63
+ query: { type: 'string' },
64
+ category: { type: 'string' },
65
+ results: {
66
+ type: 'array',
67
+ items: {
68
+ type: 'object',
69
+ properties: {
70
+ id: { type: 'string' },
71
+ title: { type: 'string' },
72
+ description: { type: 'string' },
73
+ category: { type: 'string' },
74
+ url: { type: 'string' },
75
+ score: { type: 'number' },
76
+ preview: { type: 'string' },
77
+ },
78
+ },
79
+ },
80
+ totalResults: { type: 'number' },
81
+ },
82
+ required: ['summary', 'query', 'results', 'totalResults'],
83
+ };
84
+ /**
85
+ * Sync Report Schema
86
+ * 用于 sync_ui_data 工具的结构化输出
87
+ */
88
+ export const SyncReportSchema = {
89
+ type: 'object',
90
+ properties: {
91
+ summary: { type: 'string' },
92
+ status: {
93
+ type: 'string',
94
+ enum: ['success', 'partial', 'failed'],
95
+ },
96
+ synced: {
97
+ type: 'object',
98
+ properties: {
99
+ colors: { type: 'number' },
100
+ icons: { type: 'number' },
101
+ components: { type: 'number' },
102
+ patterns: { type: 'number' },
103
+ },
104
+ },
105
+ version: { type: 'string' },
106
+ timestamp: { type: 'string' },
107
+ errors: {
108
+ type: 'array',
109
+ items: { type: 'string' },
110
+ },
111
+ },
112
+ required: ['summary', 'status', 'synced'],
113
+ };
114
+ /**
115
+ * Design2Code Schema
116
+ * 用于 design2code 工具的结构化输出
117
+ */
118
+ export const Design2CodeSchema = {
119
+ type: 'object',
120
+ properties: {
121
+ summary: { type: 'string' },
122
+ framework: {
123
+ type: 'string',
124
+ enum: ['react', 'vue', 'angular', 'svelte', 'html'],
125
+ },
126
+ componentType: {
127
+ type: 'string',
128
+ enum: ['page', 'component'],
129
+ },
130
+ code: { type: 'string', description: '生成的代码' },
131
+ styles: { type: 'string', description: '样式代码' },
132
+ assets: {
133
+ type: 'array',
134
+ items: {
135
+ type: 'object',
136
+ properties: {
137
+ type: { type: 'string' },
138
+ url: { type: 'string' },
139
+ localPath: { type: 'string' },
140
+ },
141
+ },
142
+ },
143
+ components: {
144
+ type: 'array',
145
+ items: {
146
+ type: 'object',
147
+ properties: {
148
+ name: { type: 'string' },
149
+ path: { type: 'string' },
150
+ props: { type: 'array', items: { type: 'string' } },
151
+ },
152
+ },
153
+ },
154
+ },
155
+ required: ['summary', 'framework', 'componentType', 'code'],
156
+ };
157
+ /**
158
+ * Component Catalog Schema
159
+ * 用于 init_component_catalog 工具的结构化输出(内部工具)
160
+ */
161
+ export const ComponentCatalogSchema = {
162
+ type: 'object',
163
+ properties: {
164
+ summary: { type: 'string' },
165
+ components: {
166
+ type: 'array',
167
+ items: {
168
+ type: 'object',
169
+ properties: {
170
+ name: { type: 'string' },
171
+ category: { type: 'string' },
172
+ description: { type: 'string' },
173
+ props: {
174
+ type: 'array',
175
+ items: {
176
+ type: 'object',
177
+ properties: {
178
+ name: { type: 'string' },
179
+ type: { type: 'string' },
180
+ required: { type: 'boolean' },
181
+ default: { type: 'string' },
182
+ },
183
+ },
184
+ },
185
+ variants: { type: 'array', items: { type: 'string' } },
186
+ },
187
+ },
188
+ },
189
+ catalogPath: { type: 'string' },
190
+ },
191
+ required: ['summary', 'components', 'catalogPath'],
192
+ };
193
+ /**
194
+ * Render Result Schema
195
+ * 用于 render_ui 工具的结构化输出(内部工具)
196
+ */
197
+ export const RenderResultSchema = {
198
+ type: 'object',
199
+ properties: {
200
+ summary: { type: 'string' },
201
+ framework: {
202
+ type: 'string',
203
+ enum: ['react', 'vue', 'html'],
204
+ },
205
+ code: { type: 'string', description: '渲染的代码' },
206
+ styles: { type: 'string', description: '应用的样式' },
207
+ usedComponents: {
208
+ type: 'array',
209
+ items: { type: 'string' },
210
+ },
211
+ designTokens: {
212
+ type: 'object',
213
+ description: '使用的设计令牌',
214
+ additionalProperties: { type: 'string' },
215
+ },
216
+ },
217
+ required: ['summary', 'framework', 'code'],
218
+ };