mcp-probe-kit 1.15.0 → 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 (165) 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/css_order.js +55 -55
  48. package/build/tools/debug.d.ts +1 -13
  49. package/build/tools/debug.js +18 -16
  50. package/build/tools/estimate.d.ts +1 -19
  51. package/build/tools/estimate.js +36 -6
  52. package/build/tools/fix_bug.d.ts +1 -13
  53. package/build/tools/fix_bug.js +24 -6
  54. package/build/tools/gen_mock.d.ts +1 -19
  55. package/build/tools/gen_mock.js +42 -227
  56. package/build/tools/genapi.d.ts +1 -13
  57. package/build/tools/genapi.js +18 -15
  58. package/build/tools/genchangelog.d.ts +1 -13
  59. package/build/tools/genchangelog.js +36 -212
  60. package/build/tools/gencommit.d.ts +1 -7
  61. package/build/tools/gencommit.js +21 -13
  62. package/build/tools/gendoc.d.ts +1 -13
  63. package/build/tools/gendoc.js +18 -15
  64. package/build/tools/genpr.d.ts +1 -13
  65. package/build/tools/genpr.js +28 -157
  66. package/build/tools/genreadme.d.ts +1 -13
  67. package/build/tools/genreadme.js +22 -587
  68. package/build/tools/gensql.d.ts +1 -13
  69. package/build/tools/gensql.js +24 -283
  70. package/build/tools/gentest.d.ts +1 -13
  71. package/build/tools/gentest.js +49 -16
  72. package/build/tools/index.d.ts +0 -10
  73. package/build/tools/index.js +0 -10
  74. package/build/tools/init_component_catalog.d.ts +3 -20
  75. package/build/tools/init_component_catalog.js +141 -786
  76. package/build/tools/init_project.d.ts +7 -13
  77. package/build/tools/init_project.js +54 -16
  78. package/build/tools/init_project_context.d.ts +1 -13
  79. package/build/tools/init_project_context.js +41 -14
  80. package/build/tools/perf.d.ts +1 -13
  81. package/build/tools/perf.js +18 -15
  82. package/build/tools/refactor.d.ts +1 -13
  83. package/build/tools/refactor.js +54 -15
  84. package/build/tools/render_ui.d.ts +2 -19
  85. package/build/tools/render_ui.js +201 -347
  86. package/build/tools/resolve_conflict.d.ts +1 -13
  87. package/build/tools/resolve_conflict.js +18 -15
  88. package/build/tools/security_scan.d.ts +1 -13
  89. package/build/tools/security_scan.js +16 -5
  90. package/build/tools/start_api.d.ts +7 -13
  91. package/build/tools/start_api.js +69 -157
  92. package/build/tools/start_bugfix.d.ts +1 -7
  93. package/build/tools/start_bugfix.js +38 -2
  94. package/build/tools/start_doc.d.ts +7 -13
  95. package/build/tools/start_doc.js +76 -169
  96. package/build/tools/start_feature.d.ts +1 -7
  97. package/build/tools/start_feature.js +54 -2
  98. package/build/tools/start_onboard.d.ts +1 -7
  99. package/build/tools/start_onboard.js +40 -2
  100. package/build/tools/start_ralph.d.ts +1 -7
  101. package/build/tools/start_ralph.js +88 -2
  102. package/build/tools/start_refactor.d.ts +7 -13
  103. package/build/tools/start_refactor.js +75 -148
  104. package/build/tools/start_release.d.ts +7 -13
  105. package/build/tools/start_release.js +56 -131
  106. package/build/tools/start_review.d.ts +7 -13
  107. package/build/tools/start_review.js +70 -142
  108. package/build/tools/start_ui.d.ts +1 -7
  109. package/build/tools/start_ui.js +98 -8
  110. package/build/tools/ui-ux-tools.d.ts +3 -39
  111. package/build/tools/ui-ux-tools.js +201 -125
  112. package/docs/data/tools.js +864 -0
  113. package/docs/index.html +594 -0
  114. package/docs/pages/all-tools.html +649 -0
  115. package/docs/pages/examples.html +564 -0
  116. package/docs/pages/getting-started.html +529 -0
  117. package/docs/pages/migration.html +308 -0
  118. package/docs/specs/algorithm-enhancement/roadmap.md +619 -0
  119. package/docs/specs/vnext-upgrade/00-OVERVIEW.md +258 -0
  120. package/docs/specs/vnext-upgrade/BETA_RELEASE_GUIDE.md +328 -0
  121. package/docs/specs/vnext-upgrade/GITHUB_DISCUSSION_TEMPLATE.md +236 -0
  122. package/docs/specs/vnext-upgrade/M8.9-PROGRESS-UPDATE.md +248 -0
  123. package/docs/specs/vnext-upgrade/PROGRESS-SUMMARY.md +195 -0
  124. package/docs/specs/vnext-upgrade/QUICK_REFERENCE.md +338 -0
  125. package/docs/specs/vnext-upgrade/README.md +125 -0
  126. package/docs/specs/vnext-upgrade/STATUS-UPDATE-2026-01-26.md +230 -0
  127. package/docs/specs/vnext-upgrade/TOOL_CLEANUP.md +343 -0
  128. package/docs/specs/vnext-upgrade/completed/M1-M2-SUMMARY.md +27 -0
  129. package/docs/specs/vnext-upgrade/completed/M3_COMPLETION_SUMMARY.md +273 -0
  130. package/docs/specs/vnext-upgrade/completed/M4-SUMMARY.md +19 -0
  131. package/docs/specs/vnext-upgrade/completed/M5_COMPLETION_SUMMARY.md +0 -0
  132. package/docs/specs/vnext-upgrade/completed/M8.1-SUMMARY.md +247 -0
  133. package/docs/specs/vnext-upgrade/completed/M8.2-SUMMARY.md +296 -0
  134. package/docs/specs/vnext-upgrade/completed/M8.3-SUMMARY.md +241 -0
  135. package/docs/specs/vnext-upgrade/completed/M8.3-TEST-SUMMARY.md +216 -0
  136. package/docs/specs/vnext-upgrade/completed/M8.4-SUMMARY.md +217 -0
  137. package/docs/specs/vnext-upgrade/completed/M8.4-TEST-SUMMARY.md +198 -0
  138. package/docs/specs/vnext-upgrade/completed/M8.5-SUMMARY.md +202 -0
  139. package/docs/specs/vnext-upgrade/completed/M8.5-TEST-SUMMARY.md +223 -0
  140. package/docs/specs/vnext-upgrade/completed/M8.6-SUMMARY.md +299 -0
  141. package/docs/specs/vnext-upgrade/completed/M8.8-TEST-SUMMARY.md +216 -0
  142. package/docs/specs/vnext-upgrade/completed/TOOL-CLEANUP-SUMMARY.md +210 -0
  143. package/docs/specs/vnext-upgrade/design.md +848 -0
  144. package/docs/specs/vnext-upgrade/requirements.md +221 -0
  145. package/docs/specs/vnext-upgrade/tasks/00-INDEX.md +335 -0
  146. package/docs/specs/vnext-upgrade/tasks/M8.1-SCHEMA-DEFINITION.md +300 -0
  147. package/docs/specs/vnext-upgrade/tasks/M8.2-P1-TOOLS.md +249 -0
  148. package/docs/specs/vnext-upgrade/tasks/M8.3-GENERATION-TOOLS.md +49 -0
  149. package/docs/specs/vnext-upgrade/tasks/M8.4-ORCHESTRATION-TOOLS.md +28 -0
  150. package/docs/specs/vnext-upgrade/tasks/M8.5-PROJECT-TOOLS.md +29 -0
  151. package/docs/specs/vnext-upgrade/tasks/M8.6-UI-TOOLS.md +66 -0
  152. package/docs/specs/vnext-upgrade/tasks/M8.7-HELPER-TOOLS.md +24 -0
  153. package/docs/specs/vnext-upgrade/tasks/M8.8-INTEGRATION-TESTS.md +90 -0
  154. package/docs/specs/vnext-upgrade/tasks/M8.9-DOCUMENTATION.md +103 -0
  155. package/docs/styles/docs.css +556 -0
  156. package/docs/styles/page.css +815 -0
  157. package/docs/vnext/MCP_2025-11-25_GUIDE.md +276 -0
  158. package/docs/vnext/vNext-PRD.md +488 -0
  159. package/package.json +4 -4
  160. package/build/utils/design-docs-generator.d.ts +0 -1
  161. package/build/utils/design-docs-generator.js +0 -1
  162. package/docs/BEST_PRACTICES.md +0 -1185
  163. package/docs/HOW_TO_TRIGGER.md +0 -1141
  164. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +0 -544
  165. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +0 -1447
@@ -0,0 +1,1317 @@
1
+ /**
2
+ * 结构化输出 Schema 定义(P0 工具)
3
+ * 用于 MCP 2025-11-25 协议的 structuredContent
4
+ *
5
+ * 注意:其他工具的 Schema 已按功能分类到 src/schemas/output/ 目录:
6
+ * - core-tools.ts: 核心开发工具 (code_review, debug, fix_bug, gentest, refactor, security_scan, perf)
7
+ * - generation-tools.ts: 代码生成工具 (gendoc, genapi, gensql, genreadme, genui, gen_mock, etc.)
8
+ * - workflow-tools.ts: 工作流编排工具 (start_review, start_release, start_refactor, start_api, start_doc)
9
+ * - project-tools.ts: 项目管理工具 (init_project, add_feature, analyze_project, estimate, etc.)
10
+ * - ui-ux-tools.ts: UI/UX 工具 (ui_design_system, ui_search, design2code, etc.)
11
+ * - helper-tools.ts: 辅助工具 (detect_shell, init_setting, gen_skill)
12
+ *
13
+ * 使用方式:
14
+ * import { CodeReviewReportSchema, DebugReportSchema } from '@/schemas/output';
15
+ */
16
+ /**
17
+ * Commit Message Schema
18
+ * 用于 gencommit 工具的结构化输出
19
+ */
20
+ export declare const CommitMessageSchema: {
21
+ readonly type: "object";
22
+ readonly properties: {
23
+ readonly type: {
24
+ readonly type: "string";
25
+ readonly description: "Commit 类型:feat/fix/docs/refactor/test/chore/style/perf";
26
+ readonly enum: readonly ["feat", "fix", "docs", "refactor", "test", "chore", "style", "perf", "ci", "build", "revert"];
27
+ };
28
+ readonly scope: {
29
+ readonly type: "string";
30
+ readonly description: "Commit 范围(可选)";
31
+ };
32
+ readonly subject: {
33
+ readonly type: "string";
34
+ readonly description: "Commit 主题(简短描述)";
35
+ };
36
+ readonly body: {
37
+ readonly type: "string";
38
+ readonly description: "Commit 正文(详细描述)";
39
+ };
40
+ readonly footer: {
41
+ readonly type: "string";
42
+ readonly description: "Commit 页脚(Breaking Changes、Issue 引用等)";
43
+ };
44
+ readonly fullMessage: {
45
+ readonly type: "string";
46
+ readonly description: "完整的 commit message(可直接使用)";
47
+ };
48
+ readonly emoji: {
49
+ readonly type: "string";
50
+ readonly description: "Emoji 前缀(如果使用 conventional+emoji 风格)";
51
+ };
52
+ };
53
+ readonly required: readonly ["type", "subject", "fullMessage"];
54
+ };
55
+ /**
56
+ * Workflow Report Schema
57
+ * 用于 start_* 编排工具的结构化输出
58
+ */
59
+ export declare const WorkflowReportSchema: {
60
+ readonly type: "object";
61
+ readonly properties: {
62
+ readonly summary: {
63
+ readonly type: "string";
64
+ readonly description: "工作流执行摘要(一句话)";
65
+ };
66
+ readonly status: {
67
+ readonly type: "string";
68
+ readonly description: "执行状态";
69
+ readonly enum: readonly ["success", "partial", "failed", "pending"];
70
+ };
71
+ readonly steps: {
72
+ readonly type: "array";
73
+ readonly description: "执行步骤列表";
74
+ readonly items: {
75
+ readonly type: "object";
76
+ readonly properties: {
77
+ readonly name: {
78
+ readonly type: "string";
79
+ readonly description: "步骤名称";
80
+ };
81
+ readonly status: {
82
+ readonly type: "string";
83
+ readonly description: "步骤状态";
84
+ readonly enum: readonly ["completed", "skipped", "failed", "pending"];
85
+ };
86
+ readonly description: {
87
+ readonly type: "string";
88
+ readonly description: "步骤描述";
89
+ };
90
+ readonly output: {
91
+ readonly type: "string";
92
+ readonly description: "步骤输出(可选)";
93
+ };
94
+ };
95
+ readonly required: readonly ["name", "status"];
96
+ };
97
+ };
98
+ readonly artifacts: {
99
+ readonly type: "array";
100
+ readonly description: "生成的文件/产物";
101
+ readonly items: {
102
+ readonly type: "object";
103
+ readonly properties: {
104
+ readonly path: {
105
+ readonly type: "string";
106
+ readonly description: "文件路径";
107
+ };
108
+ readonly type: {
109
+ readonly type: "string";
110
+ readonly description: "文件类型";
111
+ readonly enum: readonly ["code", "doc", "config", "test", "spec"];
112
+ };
113
+ readonly purpose: {
114
+ readonly type: "string";
115
+ readonly description: "文件用途";
116
+ };
117
+ readonly content: {
118
+ readonly type: "string";
119
+ readonly description: "文件内容(可选)";
120
+ };
121
+ };
122
+ readonly required: readonly ["path", "type", "purpose"];
123
+ };
124
+ };
125
+ readonly nextSteps: {
126
+ readonly type: "array";
127
+ readonly description: "后续建议步骤";
128
+ readonly items: {
129
+ readonly type: "string";
130
+ };
131
+ };
132
+ readonly warnings: {
133
+ readonly type: "array";
134
+ readonly description: "警告信息";
135
+ readonly items: {
136
+ readonly type: "string";
137
+ };
138
+ };
139
+ readonly metadata: {
140
+ readonly type: "object";
141
+ readonly description: "额外元数据(工具特定)";
142
+ readonly additionalProperties: true;
143
+ };
144
+ };
145
+ readonly required: readonly ["summary", "status", "steps"];
146
+ };
147
+ /**
148
+ * Bug Fix Report Schema
149
+ * 用于 start_bugfix 的特定字段
150
+ */
151
+ export declare const BugFixReportSchema: {
152
+ readonly type: "object";
153
+ readonly allOf: readonly [{
154
+ readonly $ref: "#/definitions/WorkflowReport";
155
+ }];
156
+ readonly properties: {
157
+ readonly rootCause: {
158
+ readonly type: "string";
159
+ readonly description: "根本原因分析";
160
+ };
161
+ readonly fixPlan: {
162
+ readonly type: "string";
163
+ readonly description: "修复方案";
164
+ };
165
+ readonly testPlan: {
166
+ readonly type: "string";
167
+ readonly description: "测试计划";
168
+ };
169
+ readonly commitDraft: {
170
+ readonly type: "object";
171
+ readonly description: "提交草稿(使用 CommitMessageSchema)";
172
+ };
173
+ readonly affectedFiles: {
174
+ readonly type: "array";
175
+ readonly description: "受影响的文件";
176
+ readonly items: {
177
+ readonly type: "string";
178
+ };
179
+ };
180
+ };
181
+ readonly required: readonly ["rootCause", "fixPlan", "testPlan"];
182
+ };
183
+ /**
184
+ * Feature Development Report Schema
185
+ * 用于 start_feature 的特定字段
186
+ */
187
+ export declare const FeatureReportSchema: {
188
+ readonly type: "object";
189
+ readonly allOf: readonly [{
190
+ readonly $ref: "#/definitions/WorkflowReport";
191
+ }];
192
+ readonly properties: {
193
+ readonly specArtifacts: {
194
+ readonly type: "array";
195
+ readonly description: "规格文档产物";
196
+ readonly items: {
197
+ readonly type: "object";
198
+ readonly properties: {
199
+ readonly path: {
200
+ readonly type: "string";
201
+ readonly description: "文档路径";
202
+ };
203
+ readonly type: {
204
+ readonly type: "string";
205
+ readonly description: "文档类型";
206
+ readonly enum: readonly ["requirements", "design", "tasks", "api-spec"];
207
+ };
208
+ };
209
+ readonly required: readonly ["path", "type"];
210
+ };
211
+ };
212
+ readonly estimate: {
213
+ readonly type: "object";
214
+ readonly description: "工作量估算";
215
+ readonly properties: {
216
+ readonly storyPoints: {
217
+ readonly type: "number";
218
+ readonly description: "故事点";
219
+ };
220
+ readonly optimistic: {
221
+ readonly type: "string";
222
+ readonly description: "乐观估计(如 \"2-3天\")";
223
+ };
224
+ readonly normal: {
225
+ readonly type: "string";
226
+ readonly description: "正常估计";
227
+ };
228
+ readonly pessimistic: {
229
+ readonly type: "string";
230
+ readonly description: "悲观估计";
231
+ };
232
+ };
233
+ };
234
+ readonly dependencies: {
235
+ readonly type: "array";
236
+ readonly description: "依赖项";
237
+ readonly items: {
238
+ readonly type: "string";
239
+ };
240
+ };
241
+ };
242
+ readonly required: readonly ["specArtifacts", "estimate"];
243
+ };
244
+ /**
245
+ * UI Development Report Schema
246
+ * 用于 start_ui 的特定字段
247
+ */
248
+ export declare const UIReportSchema: {
249
+ readonly type: "object";
250
+ readonly allOf: readonly [{
251
+ readonly $ref: "#/definitions/WorkflowReport";
252
+ }];
253
+ readonly properties: {
254
+ readonly designSystem: {
255
+ readonly type: "object";
256
+ readonly description: "设计系统配置";
257
+ readonly properties: {
258
+ readonly colors: {
259
+ readonly type: "object";
260
+ readonly description: "色彩系统";
261
+ };
262
+ readonly typography: {
263
+ readonly type: "object";
264
+ readonly description: "字体系统";
265
+ };
266
+ readonly spacing: {
267
+ readonly type: "object";
268
+ readonly description: "间距系统";
269
+ };
270
+ };
271
+ };
272
+ readonly catalog: {
273
+ readonly type: "object";
274
+ readonly description: "组件目录";
275
+ readonly properties: {
276
+ readonly components: {
277
+ readonly type: "array";
278
+ readonly description: "可用组件列表";
279
+ readonly items: {
280
+ readonly type: "object";
281
+ readonly properties: {
282
+ readonly name: {
283
+ readonly type: "string";
284
+ };
285
+ readonly category: {
286
+ readonly type: "string";
287
+ };
288
+ };
289
+ };
290
+ };
291
+ };
292
+ };
293
+ readonly renderedCode: {
294
+ readonly type: "object";
295
+ readonly description: "渲染的代码";
296
+ readonly properties: {
297
+ readonly framework: {
298
+ readonly type: "string";
299
+ readonly description: "框架";
300
+ readonly enum: readonly ["react", "vue", "html"];
301
+ };
302
+ readonly code: {
303
+ readonly type: "string";
304
+ readonly description: "生成的代码";
305
+ };
306
+ };
307
+ };
308
+ readonly consistencyRules: {
309
+ readonly type: "array";
310
+ readonly description: "一致性规则";
311
+ readonly items: {
312
+ readonly type: "string";
313
+ };
314
+ };
315
+ };
316
+ readonly required: readonly ["designSystem", "renderedCode"];
317
+ };
318
+ /**
319
+ * Onboarding Report Schema
320
+ * 用于 start_onboard 的特定字段
321
+ */
322
+ export declare const OnboardingReportSchema: {
323
+ readonly type: "object";
324
+ readonly allOf: readonly [{
325
+ readonly $ref: "#/definitions/WorkflowReport";
326
+ }];
327
+ readonly properties: {
328
+ readonly projectSummary: {
329
+ readonly type: "object";
330
+ readonly description: "项目概览";
331
+ readonly properties: {
332
+ readonly name: {
333
+ readonly type: "string";
334
+ };
335
+ readonly description: {
336
+ readonly type: "string";
337
+ };
338
+ readonly techStack: {
339
+ readonly type: "array";
340
+ readonly items: {
341
+ readonly type: "string";
342
+ };
343
+ };
344
+ readonly architecture: {
345
+ readonly type: "string";
346
+ };
347
+ };
348
+ };
349
+ readonly architectureNotes: {
350
+ readonly type: "string";
351
+ readonly description: "架构说明";
352
+ };
353
+ readonly quickstart: {
354
+ readonly type: "object";
355
+ readonly description: "快速开始指南";
356
+ readonly properties: {
357
+ readonly setup: {
358
+ readonly type: "array";
359
+ readonly description: "设置步骤";
360
+ readonly items: {
361
+ readonly type: "string";
362
+ };
363
+ };
364
+ readonly commonTasks: {
365
+ readonly type: "array";
366
+ readonly description: "常见任务";
367
+ readonly items: {
368
+ readonly type: "object";
369
+ readonly properties: {
370
+ readonly task: {
371
+ readonly type: "string";
372
+ };
373
+ readonly command: {
374
+ readonly type: "string";
375
+ };
376
+ };
377
+ };
378
+ };
379
+ };
380
+ };
381
+ readonly keyFiles: {
382
+ readonly type: "array";
383
+ readonly description: "关键文件";
384
+ readonly items: {
385
+ readonly type: "object";
386
+ readonly properties: {
387
+ readonly path: {
388
+ readonly type: "string";
389
+ };
390
+ readonly purpose: {
391
+ readonly type: "string";
392
+ };
393
+ };
394
+ };
395
+ };
396
+ };
397
+ readonly required: readonly ["projectSummary", "quickstart"];
398
+ };
399
+ /**
400
+ * Ralph Loop Report Schema
401
+ * 用于 start_ralph 的特定字段
402
+ */
403
+ export declare const RalphLoopReportSchema: {
404
+ readonly type: "object";
405
+ readonly allOf: readonly [{
406
+ readonly $ref: "#/definitions/WorkflowReport";
407
+ }];
408
+ readonly properties: {
409
+ readonly loopPolicy: {
410
+ readonly type: "object";
411
+ readonly description: "循环策略";
412
+ readonly properties: {
413
+ readonly maxIterations: {
414
+ readonly type: "number";
415
+ readonly description: "最大迭代次数";
416
+ };
417
+ readonly maxMinutes: {
418
+ readonly type: "number";
419
+ readonly description: "最大运行分钟数";
420
+ };
421
+ readonly confirmEvery: {
422
+ readonly type: "number";
423
+ readonly description: "每几轮确认一次";
424
+ };
425
+ readonly cooldownSeconds: {
426
+ readonly type: "number";
427
+ readonly description: "冷却秒数";
428
+ };
429
+ };
430
+ };
431
+ readonly iterations: {
432
+ readonly type: "array";
433
+ readonly description: "迭代历史";
434
+ readonly items: {
435
+ readonly type: "object";
436
+ readonly properties: {
437
+ readonly iteration: {
438
+ readonly type: "number";
439
+ };
440
+ readonly status: {
441
+ readonly type: "string";
442
+ readonly enum: readonly ["success", "failed", "stopped"];
443
+ };
444
+ readonly testsPass: {
445
+ readonly type: "boolean";
446
+ };
447
+ readonly changes: {
448
+ readonly type: "string";
449
+ readonly description: "Git diff 摘要";
450
+ };
451
+ };
452
+ };
453
+ };
454
+ readonly stopConditions: {
455
+ readonly type: "object";
456
+ readonly description: "停止条件";
457
+ readonly properties: {
458
+ readonly reason: {
459
+ readonly type: "string";
460
+ readonly description: "停止原因";
461
+ };
462
+ readonly metConditions: {
463
+ readonly type: "array";
464
+ readonly description: "满足的条件";
465
+ readonly items: {
466
+ readonly type: "string";
467
+ };
468
+ };
469
+ };
470
+ };
471
+ readonly safetyChecks: {
472
+ readonly type: "array";
473
+ readonly description: "安全检查结果";
474
+ readonly items: {
475
+ readonly type: "object";
476
+ readonly properties: {
477
+ readonly check: {
478
+ readonly type: "string";
479
+ };
480
+ readonly passed: {
481
+ readonly type: "boolean";
482
+ };
483
+ readonly message: {
484
+ readonly type: "string";
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ readonly required: readonly ["loopPolicy", "iterations", "stopConditions"];
491
+ };
492
+ /**
493
+ * TypeScript 类型定义
494
+ */
495
+ export interface CommitMessage {
496
+ type: 'feat' | 'fix' | 'docs' | 'refactor' | 'test' | 'chore' | 'style' | 'perf' | 'ci' | 'build' | 'revert';
497
+ scope?: string;
498
+ subject: string;
499
+ body?: string;
500
+ footer?: string;
501
+ fullMessage: string;
502
+ emoji?: string;
503
+ }
504
+ export interface WorkflowStep {
505
+ name: string;
506
+ status: 'completed' | 'skipped' | 'failed' | 'pending';
507
+ description?: string;
508
+ output?: string;
509
+ }
510
+ export interface Artifact {
511
+ path: string;
512
+ type: 'code' | 'doc' | 'config' | 'test' | 'spec';
513
+ purpose: string;
514
+ content?: string;
515
+ }
516
+ export interface WorkflowReport {
517
+ summary: string;
518
+ status: 'success' | 'partial' | 'failed' | 'pending';
519
+ steps: WorkflowStep[];
520
+ artifacts?: Artifact[];
521
+ nextSteps?: string[];
522
+ warnings?: string[];
523
+ metadata?: Record<string, any>;
524
+ }
525
+ export interface BugFixReport extends WorkflowReport {
526
+ rootCause: string;
527
+ fixPlan: string;
528
+ testPlan: string;
529
+ commitDraft?: CommitMessage;
530
+ affectedFiles?: string[];
531
+ }
532
+ export interface FeatureReport extends WorkflowReport {
533
+ specArtifacts: Array<{
534
+ path: string;
535
+ type: 'requirements' | 'design' | 'tasks' | 'api-spec';
536
+ }>;
537
+ estimate: {
538
+ storyPoints?: number;
539
+ optimistic?: string;
540
+ normal?: string;
541
+ pessimistic?: string;
542
+ };
543
+ dependencies?: string[];
544
+ }
545
+ export interface UIReport extends WorkflowReport {
546
+ designSystem: {
547
+ colors?: any;
548
+ typography?: any;
549
+ spacing?: any;
550
+ };
551
+ catalog?: {
552
+ components?: Array<{
553
+ name: string;
554
+ category: string;
555
+ }>;
556
+ };
557
+ renderedCode: {
558
+ framework: 'react' | 'vue' | 'html';
559
+ code: string;
560
+ };
561
+ consistencyRules?: string[];
562
+ }
563
+ export interface OnboardingReport extends WorkflowReport {
564
+ projectSummary: {
565
+ name?: string;
566
+ description?: string;
567
+ techStack?: string[];
568
+ architecture?: string;
569
+ };
570
+ architectureNotes?: string;
571
+ quickstart: {
572
+ setup?: string[];
573
+ commonTasks?: Array<{
574
+ task: string;
575
+ command: string;
576
+ }>;
577
+ };
578
+ keyFiles?: Array<{
579
+ path: string;
580
+ purpose: string;
581
+ }>;
582
+ }
583
+ export interface RalphLoopReport extends WorkflowReport {
584
+ loopPolicy: {
585
+ maxIterations?: number;
586
+ maxMinutes?: number;
587
+ confirmEvery?: number;
588
+ cooldownSeconds?: number;
589
+ };
590
+ iterations: Array<{
591
+ iteration: number;
592
+ status: 'success' | 'failed' | 'stopped';
593
+ testsPass?: boolean;
594
+ changes?: string;
595
+ }>;
596
+ stopConditions: {
597
+ reason: string;
598
+ metConditions?: string[];
599
+ };
600
+ safetyChecks?: Array<{
601
+ check: string;
602
+ passed: boolean;
603
+ message?: string;
604
+ }>;
605
+ }
606
+ /**
607
+ * Code Review Report Schema
608
+ * 用于 code_review 工具的结构化输出
609
+ */
610
+ export declare const CodeReviewReportSchema: {
611
+ readonly type: "object";
612
+ readonly properties: {
613
+ readonly summary: {
614
+ readonly type: "string";
615
+ readonly description: "审查总结";
616
+ };
617
+ readonly overallScore: {
618
+ readonly type: "number";
619
+ readonly minimum: 0;
620
+ readonly maximum: 100;
621
+ readonly description: "总体评分(0-100)";
622
+ };
623
+ readonly issues: {
624
+ readonly type: "array";
625
+ readonly description: "问题列表";
626
+ readonly items: {
627
+ readonly type: "object";
628
+ readonly properties: {
629
+ readonly severity: {
630
+ readonly type: "string";
631
+ readonly enum: readonly ["critical", "high", "medium", "low", "info"];
632
+ readonly description: "严重程度";
633
+ };
634
+ readonly category: {
635
+ readonly type: "string";
636
+ readonly enum: readonly ["security", "performance", "quality", "style", "best-practice"];
637
+ readonly description: "问题类别";
638
+ };
639
+ readonly line: {
640
+ readonly type: "number";
641
+ readonly description: "行号";
642
+ };
643
+ readonly file: {
644
+ readonly type: "string";
645
+ readonly description: "文件路径";
646
+ };
647
+ readonly message: {
648
+ readonly type: "string";
649
+ readonly description: "问题描述";
650
+ };
651
+ readonly suggestion: {
652
+ readonly type: "string";
653
+ readonly description: "修复建议";
654
+ };
655
+ readonly code: {
656
+ readonly type: "string";
657
+ readonly description: "问题代码片段";
658
+ };
659
+ };
660
+ readonly required: readonly ["severity", "category", "message"];
661
+ };
662
+ };
663
+ readonly strengths: {
664
+ readonly type: "array";
665
+ readonly items: {
666
+ readonly type: "string";
667
+ };
668
+ readonly description: "代码优点";
669
+ };
670
+ readonly recommendations: {
671
+ readonly type: "array";
672
+ readonly items: {
673
+ readonly type: "string";
674
+ };
675
+ readonly description: "改进建议";
676
+ };
677
+ readonly metrics: {
678
+ readonly type: "object";
679
+ readonly description: "代码指标";
680
+ readonly properties: {
681
+ readonly complexity: {
682
+ readonly type: "number";
683
+ readonly description: "复杂度";
684
+ };
685
+ readonly maintainability: {
686
+ readonly type: "number";
687
+ readonly description: "可维护性";
688
+ };
689
+ readonly testCoverage: {
690
+ readonly type: "number";
691
+ readonly description: "测试覆盖率";
692
+ };
693
+ };
694
+ };
695
+ };
696
+ readonly required: readonly ["summary", "overallScore", "issues"];
697
+ };
698
+ /**
699
+ * Debug Report Schema
700
+ * 用于 debug 工具的结构化输出
701
+ */
702
+ export declare const DebugReportSchema: {
703
+ readonly type: "object";
704
+ readonly properties: {
705
+ readonly summary: {
706
+ readonly type: "string";
707
+ readonly description: "调试摘要";
708
+ };
709
+ readonly rootCause: {
710
+ readonly type: "string";
711
+ readonly description: "根本原因分析";
712
+ };
713
+ readonly errorType: {
714
+ readonly type: "string";
715
+ readonly enum: readonly ["syntax", "runtime", "logic", "performance", "memory", "network", "unknown"];
716
+ readonly description: "错误类型";
717
+ };
718
+ readonly location: {
719
+ readonly type: "object";
720
+ readonly description: "错误位置";
721
+ readonly properties: {
722
+ readonly file: {
723
+ readonly type: "string";
724
+ };
725
+ readonly line: {
726
+ readonly type: "number";
727
+ };
728
+ readonly column: {
729
+ readonly type: "number";
730
+ };
731
+ readonly function: {
732
+ readonly type: "string";
733
+ };
734
+ };
735
+ };
736
+ readonly stackTrace: {
737
+ readonly type: "array";
738
+ readonly description: "堆栈跟踪";
739
+ readonly items: {
740
+ readonly type: "object";
741
+ readonly properties: {
742
+ readonly file: {
743
+ readonly type: "string";
744
+ };
745
+ readonly line: {
746
+ readonly type: "number";
747
+ };
748
+ readonly function: {
749
+ readonly type: "string";
750
+ };
751
+ };
752
+ };
753
+ };
754
+ readonly debugStrategy: {
755
+ readonly type: "array";
756
+ readonly description: "调试策略";
757
+ readonly items: {
758
+ readonly type: "string";
759
+ };
760
+ };
761
+ readonly solutions: {
762
+ readonly type: "array";
763
+ readonly description: "解决方案列表";
764
+ readonly items: {
765
+ readonly type: "object";
766
+ readonly properties: {
767
+ readonly title: {
768
+ readonly type: "string";
769
+ };
770
+ readonly description: {
771
+ readonly type: "string";
772
+ };
773
+ readonly code: {
774
+ readonly type: "string";
775
+ };
776
+ readonly priority: {
777
+ readonly type: "string";
778
+ readonly enum: readonly ["high", "medium", "low"];
779
+ };
780
+ };
781
+ readonly required: readonly ["title", "description"];
782
+ };
783
+ };
784
+ readonly relatedIssues: {
785
+ readonly type: "array";
786
+ readonly description: "相关问题";
787
+ readonly items: {
788
+ readonly type: "string";
789
+ };
790
+ };
791
+ };
792
+ readonly required: readonly ["summary", "rootCause", "errorType", "solutions"];
793
+ };
794
+ /**
795
+ * Bug Analysis Schema
796
+ * 用于 fix_bug 工具的结构化输出
797
+ */
798
+ export declare const BugAnalysisSchema: {
799
+ readonly type: "object";
800
+ readonly properties: {
801
+ readonly summary: {
802
+ readonly type: "string";
803
+ readonly description: "Bug 摘要";
804
+ };
805
+ readonly bugType: {
806
+ readonly type: "string";
807
+ readonly enum: readonly ["functional", "performance", "security", "ui", "data", "integration"];
808
+ readonly description: "Bug 类型";
809
+ };
810
+ readonly severity: {
811
+ readonly type: "string";
812
+ readonly enum: readonly ["critical", "high", "medium", "low"];
813
+ readonly description: "严重程度";
814
+ };
815
+ readonly rootCause: {
816
+ readonly type: "string";
817
+ readonly description: "根本原因";
818
+ };
819
+ readonly affectedComponents: {
820
+ readonly type: "array";
821
+ readonly description: "受影响的组件";
822
+ readonly items: {
823
+ readonly type: "string";
824
+ };
825
+ };
826
+ readonly affectedFiles: {
827
+ readonly type: "array";
828
+ readonly description: "受影响的文件";
829
+ readonly items: {
830
+ readonly type: "string";
831
+ };
832
+ };
833
+ readonly fixPlan: {
834
+ readonly type: "object";
835
+ readonly description: "修复计划";
836
+ readonly properties: {
837
+ readonly steps: {
838
+ readonly type: "array";
839
+ readonly items: {
840
+ readonly type: "string";
841
+ };
842
+ };
843
+ readonly estimatedTime: {
844
+ readonly type: "string";
845
+ };
846
+ readonly risks: {
847
+ readonly type: "array";
848
+ readonly items: {
849
+ readonly type: "string";
850
+ };
851
+ };
852
+ };
853
+ readonly required: readonly ["steps"];
854
+ };
855
+ readonly testPlan: {
856
+ readonly type: "object";
857
+ readonly description: "测试计划";
858
+ readonly properties: {
859
+ readonly unitTests: {
860
+ readonly type: "array";
861
+ readonly items: {
862
+ readonly type: "string";
863
+ };
864
+ };
865
+ readonly integrationTests: {
866
+ readonly type: "array";
867
+ readonly items: {
868
+ readonly type: "string";
869
+ };
870
+ };
871
+ readonly manualTests: {
872
+ readonly type: "array";
873
+ readonly items: {
874
+ readonly type: "string";
875
+ };
876
+ };
877
+ };
878
+ };
879
+ readonly preventionMeasures: {
880
+ readonly type: "array";
881
+ readonly description: "预防措施";
882
+ readonly items: {
883
+ readonly type: "string";
884
+ };
885
+ };
886
+ };
887
+ readonly required: readonly ["summary", "bugType", "severity", "rootCause", "fixPlan", "testPlan"];
888
+ };
889
+ /**
890
+ * Test Suite Schema
891
+ * 用于 gentest 工具的结构化输出
892
+ */
893
+ export declare const TestSuiteSchema: {
894
+ readonly type: "object";
895
+ readonly properties: {
896
+ readonly summary: {
897
+ readonly type: "string";
898
+ readonly description: "测试套件摘要";
899
+ };
900
+ readonly framework: {
901
+ readonly type: "string";
902
+ readonly enum: readonly ["jest", "vitest", "mocha", "jasmine", "pytest", "junit"];
903
+ readonly description: "测试框架";
904
+ };
905
+ readonly testCases: {
906
+ readonly type: "array";
907
+ readonly description: "测试用例列表";
908
+ readonly items: {
909
+ readonly type: "object";
910
+ readonly properties: {
911
+ readonly name: {
912
+ readonly type: "string";
913
+ readonly description: "测试名称";
914
+ };
915
+ readonly description: {
916
+ readonly type: "string";
917
+ readonly description: "测试描述";
918
+ };
919
+ readonly type: {
920
+ readonly type: "string";
921
+ readonly enum: readonly ["unit", "integration", "e2e", "performance"];
922
+ readonly description: "测试类型";
923
+ };
924
+ readonly code: {
925
+ readonly type: "string";
926
+ readonly description: "测试代码";
927
+ };
928
+ readonly assertions: {
929
+ readonly type: "array";
930
+ readonly items: {
931
+ readonly type: "string";
932
+ };
933
+ readonly description: "断言列表";
934
+ };
935
+ };
936
+ readonly required: readonly ["name", "type", "code"];
937
+ };
938
+ };
939
+ readonly edgeCases: {
940
+ readonly type: "array";
941
+ readonly description: "边界条件测试";
942
+ readonly items: {
943
+ readonly type: "object";
944
+ readonly properties: {
945
+ readonly scenario: {
946
+ readonly type: "string";
947
+ };
948
+ readonly input: {
949
+ readonly type: "string";
950
+ };
951
+ readonly expectedOutput: {
952
+ readonly type: "string";
953
+ };
954
+ };
955
+ };
956
+ };
957
+ readonly mockData: {
958
+ readonly type: "object";
959
+ readonly description: "Mock 数据定义";
960
+ readonly additionalProperties: true;
961
+ };
962
+ readonly coverage: {
963
+ readonly type: "object";
964
+ readonly description: "覆盖率目标";
965
+ readonly properties: {
966
+ readonly statements: {
967
+ readonly type: "number";
968
+ };
969
+ readonly branches: {
970
+ readonly type: "number";
971
+ };
972
+ readonly functions: {
973
+ readonly type: "number";
974
+ };
975
+ readonly lines: {
976
+ readonly type: "number";
977
+ };
978
+ };
979
+ };
980
+ };
981
+ readonly required: readonly ["summary", "framework", "testCases"];
982
+ };
983
+ /**
984
+ * Refactor Plan Schema
985
+ * 用于 refactor 工具的结构化输出
986
+ */
987
+ export declare const RefactorPlanSchema: {
988
+ readonly type: "object";
989
+ readonly properties: {
990
+ readonly summary: {
991
+ readonly type: "string";
992
+ readonly description: "重构摘要";
993
+ };
994
+ readonly goal: {
995
+ readonly type: "string";
996
+ readonly enum: readonly ["improve_readability", "reduce_complexity", "improve_performance", "improve_maintainability", "modernize"];
997
+ readonly description: "重构目标";
998
+ };
999
+ readonly currentIssues: {
1000
+ readonly type: "array";
1001
+ readonly description: "当前问题";
1002
+ readonly items: {
1003
+ readonly type: "string";
1004
+ };
1005
+ };
1006
+ readonly refactoringSteps: {
1007
+ readonly type: "array";
1008
+ readonly description: "重构步骤";
1009
+ readonly items: {
1010
+ readonly type: "object";
1011
+ readonly properties: {
1012
+ readonly step: {
1013
+ readonly type: "number";
1014
+ };
1015
+ readonly title: {
1016
+ readonly type: "string";
1017
+ };
1018
+ readonly description: {
1019
+ readonly type: "string";
1020
+ };
1021
+ readonly before: {
1022
+ readonly type: "string";
1023
+ readonly description: "重构前代码";
1024
+ };
1025
+ readonly after: {
1026
+ readonly type: "string";
1027
+ readonly description: "重构后代码";
1028
+ };
1029
+ readonly rationale: {
1030
+ readonly type: "string";
1031
+ readonly description: "重构理由";
1032
+ };
1033
+ };
1034
+ readonly required: readonly ["step", "title", "description"];
1035
+ };
1036
+ };
1037
+ readonly riskAssessment: {
1038
+ readonly type: "object";
1039
+ readonly description: "风险评估";
1040
+ readonly properties: {
1041
+ readonly level: {
1042
+ readonly type: "string";
1043
+ readonly enum: readonly ["low", "medium", "high"];
1044
+ };
1045
+ readonly risks: {
1046
+ readonly type: "array";
1047
+ readonly items: {
1048
+ readonly type: "string";
1049
+ };
1050
+ };
1051
+ readonly mitigations: {
1052
+ readonly type: "array";
1053
+ readonly items: {
1054
+ readonly type: "string";
1055
+ };
1056
+ };
1057
+ };
1058
+ readonly required: readonly ["level", "risks"];
1059
+ };
1060
+ readonly rollbackPlan: {
1061
+ readonly type: "string";
1062
+ readonly description: "回滚计划";
1063
+ };
1064
+ readonly estimatedEffort: {
1065
+ readonly type: "object";
1066
+ readonly description: "预估工作量";
1067
+ readonly properties: {
1068
+ readonly hours: {
1069
+ readonly type: "number";
1070
+ };
1071
+ readonly complexity: {
1072
+ readonly type: "string";
1073
+ readonly enum: readonly ["low", "medium", "high"];
1074
+ };
1075
+ };
1076
+ };
1077
+ readonly expectedBenefits: {
1078
+ readonly type: "array";
1079
+ readonly description: "预期收益";
1080
+ readonly items: {
1081
+ readonly type: "string";
1082
+ };
1083
+ };
1084
+ };
1085
+ readonly required: readonly ["summary", "goal", "refactoringSteps", "riskAssessment"];
1086
+ };
1087
+ /**
1088
+ * Security Report Schema
1089
+ * 用于 security_scan 工具的结构化输出
1090
+ */
1091
+ export declare const SecurityReportSchema: {
1092
+ readonly type: "object";
1093
+ readonly properties: {
1094
+ readonly summary: {
1095
+ readonly type: "string";
1096
+ readonly description: "安全扫描摘要";
1097
+ };
1098
+ readonly overallRisk: {
1099
+ readonly type: "string";
1100
+ readonly enum: readonly ["critical", "high", "medium", "low", "none"];
1101
+ readonly description: "总体风险等级";
1102
+ };
1103
+ readonly vulnerabilities: {
1104
+ readonly type: "array";
1105
+ readonly description: "漏洞列表";
1106
+ readonly items: {
1107
+ readonly type: "object";
1108
+ readonly properties: {
1109
+ readonly id: {
1110
+ readonly type: "string";
1111
+ readonly description: "漏洞ID";
1112
+ };
1113
+ readonly type: {
1114
+ readonly type: "string";
1115
+ readonly enum: readonly ["injection", "xss", "csrf", "auth", "crypto", "data-exposure", "dos", "other"];
1116
+ readonly description: "漏洞类型";
1117
+ };
1118
+ readonly severity: {
1119
+ readonly type: "string";
1120
+ readonly enum: readonly ["critical", "high", "medium", "low"];
1121
+ readonly description: "严重程度";
1122
+ };
1123
+ readonly title: {
1124
+ readonly type: "string";
1125
+ };
1126
+ readonly description: {
1127
+ readonly type: "string";
1128
+ };
1129
+ readonly location: {
1130
+ readonly type: "object";
1131
+ readonly properties: {
1132
+ readonly file: {
1133
+ readonly type: "string";
1134
+ };
1135
+ readonly line: {
1136
+ readonly type: "number";
1137
+ };
1138
+ readonly code: {
1139
+ readonly type: "string";
1140
+ };
1141
+ };
1142
+ };
1143
+ readonly cwe: {
1144
+ readonly type: "string";
1145
+ readonly description: "CWE编号";
1146
+ };
1147
+ readonly cvss: {
1148
+ readonly type: "number";
1149
+ readonly description: "CVSS评分";
1150
+ };
1151
+ readonly remediation: {
1152
+ readonly type: "string";
1153
+ readonly description: "修复建议";
1154
+ };
1155
+ readonly references: {
1156
+ readonly type: "array";
1157
+ readonly items: {
1158
+ readonly type: "string";
1159
+ };
1160
+ readonly description: "参考链接";
1161
+ };
1162
+ };
1163
+ readonly required: readonly ["type", "severity", "title", "description"];
1164
+ };
1165
+ };
1166
+ readonly complianceChecks: {
1167
+ readonly type: "array";
1168
+ readonly description: "合规性检查";
1169
+ readonly items: {
1170
+ readonly type: "object";
1171
+ readonly properties: {
1172
+ readonly standard: {
1173
+ readonly type: "string";
1174
+ readonly description: "标准名称(如OWASP Top 10)";
1175
+ };
1176
+ readonly passed: {
1177
+ readonly type: "boolean";
1178
+ };
1179
+ readonly details: {
1180
+ readonly type: "string";
1181
+ };
1182
+ };
1183
+ };
1184
+ };
1185
+ readonly recommendations: {
1186
+ readonly type: "array";
1187
+ readonly description: "安全建议";
1188
+ readonly items: {
1189
+ readonly type: "string";
1190
+ };
1191
+ };
1192
+ };
1193
+ readonly required: readonly ["summary", "overallRisk", "vulnerabilities"];
1194
+ };
1195
+ /**
1196
+ * Performance Report Schema
1197
+ * 用于 perf 工具的结构化输出
1198
+ */
1199
+ export declare const PerformanceReportSchema: {
1200
+ readonly type: "object";
1201
+ readonly properties: {
1202
+ readonly summary: {
1203
+ readonly type: "string";
1204
+ readonly description: "性能分析摘要";
1205
+ };
1206
+ readonly overallScore: {
1207
+ readonly type: "number";
1208
+ readonly minimum: 0;
1209
+ readonly maximum: 100;
1210
+ readonly description: "总体性能评分";
1211
+ };
1212
+ readonly bottlenecks: {
1213
+ readonly type: "array";
1214
+ readonly description: "性能瓶颈";
1215
+ readonly items: {
1216
+ readonly type: "object";
1217
+ readonly properties: {
1218
+ readonly type: {
1219
+ readonly type: "string";
1220
+ readonly enum: readonly ["algorithm", "memory", "database", "network", "rendering", "io"];
1221
+ readonly description: "瓶颈类型";
1222
+ };
1223
+ readonly severity: {
1224
+ readonly type: "string";
1225
+ readonly enum: readonly ["critical", "high", "medium", "low"];
1226
+ };
1227
+ readonly location: {
1228
+ readonly type: "object";
1229
+ readonly properties: {
1230
+ readonly file: {
1231
+ readonly type: "string";
1232
+ };
1233
+ readonly line: {
1234
+ readonly type: "number";
1235
+ };
1236
+ readonly function: {
1237
+ readonly type: "string";
1238
+ };
1239
+ };
1240
+ };
1241
+ readonly description: {
1242
+ readonly type: "string";
1243
+ };
1244
+ readonly impact: {
1245
+ readonly type: "string";
1246
+ readonly description: "性能影响";
1247
+ };
1248
+ readonly currentMetric: {
1249
+ readonly type: "string";
1250
+ readonly description: "当前指标";
1251
+ };
1252
+ };
1253
+ readonly required: readonly ["type", "severity", "description"];
1254
+ };
1255
+ };
1256
+ readonly metrics: {
1257
+ readonly type: "object";
1258
+ readonly description: "性能指标";
1259
+ readonly properties: {
1260
+ readonly executionTime: {
1261
+ readonly type: "number";
1262
+ readonly description: "执行时间(ms)";
1263
+ };
1264
+ readonly memoryUsage: {
1265
+ readonly type: "number";
1266
+ readonly description: "内存使用(MB)";
1267
+ };
1268
+ readonly cpuUsage: {
1269
+ readonly type: "number";
1270
+ readonly description: "CPU使用率(%)";
1271
+ };
1272
+ readonly throughput: {
1273
+ readonly type: "number";
1274
+ readonly description: "吞吐量";
1275
+ };
1276
+ readonly latency: {
1277
+ readonly type: "number";
1278
+ readonly description: "延迟(ms)";
1279
+ };
1280
+ };
1281
+ };
1282
+ readonly optimizations: {
1283
+ readonly type: "array";
1284
+ readonly description: "优化建议";
1285
+ readonly items: {
1286
+ readonly type: "object";
1287
+ readonly properties: {
1288
+ readonly title: {
1289
+ readonly type: "string";
1290
+ };
1291
+ readonly description: {
1292
+ readonly type: "string";
1293
+ };
1294
+ readonly priority: {
1295
+ readonly type: "string";
1296
+ readonly enum: readonly ["high", "medium", "low"];
1297
+ };
1298
+ readonly expectedImprovement: {
1299
+ readonly type: "string";
1300
+ readonly description: "预期提升";
1301
+ };
1302
+ readonly implementation: {
1303
+ readonly type: "string";
1304
+ readonly description: "实现方法";
1305
+ };
1306
+ };
1307
+ readonly required: readonly ["title", "description", "priority"];
1308
+ };
1309
+ };
1310
+ readonly benchmarks: {
1311
+ readonly type: "object";
1312
+ readonly description: "基准测试结果";
1313
+ readonly additionalProperties: true;
1314
+ };
1315
+ };
1316
+ readonly required: readonly ["summary", "overallScore", "bottlenecks", "optimizations"];
1317
+ };