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.
- package/README.md +113 -1642
- package/build/index.js +75 -42
- package/build/lib/elicitation-helper.d.ts +73 -0
- package/build/lib/elicitation-helper.js +130 -0
- package/build/lib/response.d.ts +32 -0
- package/build/lib/response.js +28 -0
- package/build/lib/tasks-manager.d.ts +116 -0
- package/build/lib/tasks-manager.js +217 -0
- package/build/lib/toolset-manager.d.ts +48 -0
- package/build/lib/toolset-manager.js +112 -0
- package/build/schemas/basic-tools.d.ts +0 -32
- package/build/schemas/basic-tools.js +0 -34
- package/build/schemas/code-analysis-tools.d.ts +0 -36
- package/build/schemas/code-analysis-tools.js +0 -38
- package/build/schemas/code-gen-tools.d.ts +0 -44
- package/build/schemas/code-gen-tools.js +0 -46
- package/build/schemas/doc-util-tools.d.ts +0 -54
- package/build/schemas/doc-util-tools.js +0 -58
- package/build/schemas/index.d.ts +0 -188
- package/build/schemas/orchestration-tools.d.ts +0 -22
- package/build/schemas/orchestration-tools.js +0 -23
- package/build/schemas/output/core-tools.d.ts +817 -0
- package/build/schemas/output/core-tools.js +421 -0
- package/build/schemas/output/generation-tools.d.ts +936 -0
- package/build/schemas/output/generation-tools.js +446 -0
- package/build/schemas/output/helper-tools.d.ts +243 -0
- package/build/schemas/output/helper-tools.js +138 -0
- package/build/schemas/output/index.d.ts +76 -0
- package/build/schemas/output/index.js +96 -0
- package/build/schemas/output/project-tools.d.ts +702 -0
- package/build/schemas/output/project-tools.js +339 -0
- package/build/schemas/output/ui-ux-tools.d.ts +469 -0
- package/build/schemas/output/ui-ux-tools.js +218 -0
- package/build/schemas/output/workflow-tools.d.ts +267 -0
- package/build/schemas/output/workflow-tools.js +179 -0
- package/build/schemas/structured-output.d.ts +1317 -0
- package/build/schemas/structured-output.js +1017 -0
- package/build/tools/__tests__/start_ui.integration.test.js +5 -5
- package/build/tools/__tests__/start_ui.property.test.js +11 -11
- package/build/tools/add_feature.d.ts +1 -13
- package/build/tools/add_feature.js +48 -13
- package/build/tools/analyze_project.js +57 -18
- package/build/tools/check_deps.d.ts +1 -13
- package/build/tools/check_deps.js +24 -15
- package/build/tools/code_review.d.ts +1 -13
- package/build/tools/code_review.js +19 -16
- package/build/tools/debug.d.ts +1 -13
- package/build/tools/debug.js +18 -16
- package/build/tools/estimate.d.ts +1 -19
- package/build/tools/estimate.js +36 -6
- package/build/tools/fix_bug.d.ts +1 -13
- package/build/tools/fix_bug.js +24 -6
- package/build/tools/gen_mock.d.ts +1 -19
- package/build/tools/gen_mock.js +42 -227
- package/build/tools/genapi.d.ts +1 -13
- package/build/tools/genapi.js +18 -15
- package/build/tools/genchangelog.d.ts +1 -13
- package/build/tools/genchangelog.js +36 -212
- package/build/tools/gencommit.d.ts +1 -7
- package/build/tools/gencommit.js +21 -13
- package/build/tools/gendoc.d.ts +1 -13
- package/build/tools/gendoc.js +18 -15
- package/build/tools/genpr.d.ts +1 -13
- package/build/tools/genpr.js +28 -157
- package/build/tools/genreadme.d.ts +1 -13
- package/build/tools/genreadme.js +22 -587
- package/build/tools/gensql.d.ts +1 -13
- package/build/tools/gensql.js +24 -283
- package/build/tools/gentest.d.ts +1 -13
- package/build/tools/gentest.js +49 -16
- package/build/tools/index.d.ts +0 -10
- package/build/tools/index.js +0 -10
- package/build/tools/init_component_catalog.d.ts +3 -20
- package/build/tools/init_component_catalog.js +141 -786
- package/build/tools/init_project.d.ts +7 -13
- package/build/tools/init_project.js +54 -16
- package/build/tools/init_project_context.d.ts +1 -13
- package/build/tools/init_project_context.js +41 -14
- package/build/tools/perf.d.ts +1 -13
- package/build/tools/perf.js +18 -15
- package/build/tools/refactor.d.ts +1 -13
- package/build/tools/refactor.js +54 -15
- package/build/tools/render_ui.d.ts +2 -19
- package/build/tools/render_ui.js +201 -347
- package/build/tools/resolve_conflict.d.ts +1 -13
- package/build/tools/resolve_conflict.js +18 -15
- package/build/tools/security_scan.d.ts +1 -13
- package/build/tools/security_scan.js +16 -5
- package/build/tools/start_api.d.ts +7 -13
- package/build/tools/start_api.js +69 -157
- package/build/tools/start_bugfix.d.ts +1 -7
- package/build/tools/start_bugfix.js +38 -2
- package/build/tools/start_doc.d.ts +7 -13
- package/build/tools/start_doc.js +76 -169
- package/build/tools/start_feature.d.ts +1 -7
- package/build/tools/start_feature.js +54 -2
- package/build/tools/start_onboard.d.ts +1 -7
- package/build/tools/start_onboard.js +40 -2
- package/build/tools/start_ralph.d.ts +1 -7
- package/build/tools/start_ralph.js +88 -2
- package/build/tools/start_refactor.d.ts +7 -13
- package/build/tools/start_refactor.js +75 -148
- package/build/tools/start_release.d.ts +7 -13
- package/build/tools/start_release.js +56 -131
- package/build/tools/start_review.d.ts +7 -13
- package/build/tools/start_review.js +70 -142
- package/build/tools/start_ui.d.ts +1 -7
- package/build/tools/start_ui.js +98 -8
- package/build/tools/ui-ux-tools.d.ts +3 -39
- package/build/tools/ui-ux-tools.js +201 -125
- package/docs/data/tools.js +864 -0
- package/docs/index.html +594 -0
- package/docs/pages/all-tools.html +649 -0
- package/docs/pages/examples.html +564 -0
- package/docs/pages/getting-started.html +529 -0
- package/docs/pages/migration.html +308 -0
- package/docs/specs/algorithm-enhancement/roadmap.md +619 -0
- package/docs/specs/vnext-upgrade/00-OVERVIEW.md +258 -0
- package/docs/specs/vnext-upgrade/BETA_RELEASE_GUIDE.md +328 -0
- package/docs/specs/vnext-upgrade/GITHUB_DISCUSSION_TEMPLATE.md +236 -0
- package/docs/specs/vnext-upgrade/M8.9-PROGRESS-UPDATE.md +248 -0
- package/docs/specs/vnext-upgrade/PROGRESS-SUMMARY.md +195 -0
- package/docs/specs/vnext-upgrade/QUICK_REFERENCE.md +338 -0
- package/docs/specs/vnext-upgrade/README.md +125 -0
- package/docs/specs/vnext-upgrade/STATUS-UPDATE-2026-01-26.md +230 -0
- package/docs/specs/vnext-upgrade/TOOL_CLEANUP.md +343 -0
- package/docs/specs/vnext-upgrade/completed/M1-M2-SUMMARY.md +27 -0
- package/docs/specs/vnext-upgrade/completed/M3_COMPLETION_SUMMARY.md +273 -0
- package/docs/specs/vnext-upgrade/completed/M4-SUMMARY.md +19 -0
- package/docs/specs/vnext-upgrade/completed/M5_COMPLETION_SUMMARY.md +0 -0
- package/docs/specs/vnext-upgrade/completed/M8.1-SUMMARY.md +247 -0
- package/docs/specs/vnext-upgrade/completed/M8.2-SUMMARY.md +296 -0
- package/docs/specs/vnext-upgrade/completed/M8.3-SUMMARY.md +241 -0
- package/docs/specs/vnext-upgrade/completed/M8.3-TEST-SUMMARY.md +216 -0
- package/docs/specs/vnext-upgrade/completed/M8.4-SUMMARY.md +217 -0
- package/docs/specs/vnext-upgrade/completed/M8.4-TEST-SUMMARY.md +198 -0
- package/docs/specs/vnext-upgrade/completed/M8.5-SUMMARY.md +202 -0
- package/docs/specs/vnext-upgrade/completed/M8.5-TEST-SUMMARY.md +223 -0
- package/docs/specs/vnext-upgrade/completed/M8.6-SUMMARY.md +299 -0
- package/docs/specs/vnext-upgrade/completed/M8.8-TEST-SUMMARY.md +216 -0
- package/docs/specs/vnext-upgrade/completed/TOOL-CLEANUP-SUMMARY.md +210 -0
- package/docs/specs/vnext-upgrade/design.md +848 -0
- package/docs/specs/vnext-upgrade/requirements.md +221 -0
- package/docs/specs/vnext-upgrade/tasks/00-INDEX.md +335 -0
- package/docs/specs/vnext-upgrade/tasks/M8.1-SCHEMA-DEFINITION.md +300 -0
- package/docs/specs/vnext-upgrade/tasks/M8.2-P1-TOOLS.md +249 -0
- package/docs/specs/vnext-upgrade/tasks/M8.3-GENERATION-TOOLS.md +49 -0
- package/docs/specs/vnext-upgrade/tasks/M8.4-ORCHESTRATION-TOOLS.md +28 -0
- package/docs/specs/vnext-upgrade/tasks/M8.5-PROJECT-TOOLS.md +29 -0
- package/docs/specs/vnext-upgrade/tasks/M8.6-UI-TOOLS.md +66 -0
- package/docs/specs/vnext-upgrade/tasks/M8.7-HELPER-TOOLS.md +24 -0
- package/docs/specs/vnext-upgrade/tasks/M8.8-INTEGRATION-TESTS.md +90 -0
- package/docs/specs/vnext-upgrade/tasks/M8.9-DOCUMENTATION.md +103 -0
- package/docs/styles/docs.css +556 -0
- package/docs/styles/page.css +815 -0
- package/docs/vnext/MCP_2025-11-25_GUIDE.md +276 -0
- package/docs/vnext/vNext-PRD.md +488 -0
- package/package.json +6 -6
- package/docs/BEST_PRACTICES.md +0 -1185
- package/docs/HOW_TO_TRIGGER.md +0 -1141
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +0 -544
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +0 -1447
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 代码生成工具的结构化输出 Schema
|
|
3
|
+
* 包含: gendoc, genapi, gensql, genreadme, genui, gen_mock, genchangelog, genpr, fix, explain, convert, css_order
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Documentation Schema
|
|
7
|
+
* 用于 gendoc 工具的结构化输出
|
|
8
|
+
*/
|
|
9
|
+
export const DocumentationSchema = {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
summary: { type: 'string', description: '文档摘要' },
|
|
13
|
+
docType: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
enum: ['jsdoc', 'tsdoc', 'javadoc', 'pydoc', 'godoc'],
|
|
16
|
+
description: '文档类型',
|
|
17
|
+
},
|
|
18
|
+
documentation: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: '生成的文档内容',
|
|
21
|
+
},
|
|
22
|
+
functions: {
|
|
23
|
+
type: 'array',
|
|
24
|
+
description: '函数文档列表',
|
|
25
|
+
items: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
name: { type: 'string' },
|
|
29
|
+
description: { type: 'string' },
|
|
30
|
+
parameters: {
|
|
31
|
+
type: 'array',
|
|
32
|
+
items: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
name: { type: 'string' },
|
|
36
|
+
type: { type: 'string' },
|
|
37
|
+
description: { type: 'string' },
|
|
38
|
+
optional: { type: 'boolean' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
returns: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
type: { type: 'string' },
|
|
46
|
+
description: { type: 'string' },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
throws: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
items: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
type: { type: 'string' },
|
|
55
|
+
description: { type: 'string' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
examples: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
items: { type: 'string' },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
required: ['summary', 'docType', 'documentation'],
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* API Documentation Schema
|
|
71
|
+
* 用于 genapi 工具的结构化输出
|
|
72
|
+
*/
|
|
73
|
+
export const APIDocumentationSchema = {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
summary: { type: 'string' },
|
|
77
|
+
format: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: ['markdown', 'openapi', 'swagger', 'postman'],
|
|
80
|
+
},
|
|
81
|
+
endpoints: {
|
|
82
|
+
type: 'array',
|
|
83
|
+
items: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
method: { type: 'string', enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'] },
|
|
87
|
+
path: { type: 'string' },
|
|
88
|
+
summary: { type: 'string' },
|
|
89
|
+
description: { type: 'string' },
|
|
90
|
+
parameters: {
|
|
91
|
+
type: 'array',
|
|
92
|
+
items: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
name: { type: 'string' },
|
|
96
|
+
in: { type: 'string', enum: ['query', 'path', 'header', 'body'] },
|
|
97
|
+
type: { type: 'string' },
|
|
98
|
+
required: { type: 'boolean' },
|
|
99
|
+
description: { type: 'string' },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
requestBody: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {
|
|
106
|
+
contentType: { type: 'string' },
|
|
107
|
+
schema: { type: 'object' },
|
|
108
|
+
example: { type: 'object' },
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
responses: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
additionalProperties: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
description: { type: 'string' },
|
|
117
|
+
schema: { type: 'object' },
|
|
118
|
+
example: { type: 'object' },
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
documentation: { type: 'string' },
|
|
126
|
+
},
|
|
127
|
+
required: ['summary', 'format', 'endpoints', 'documentation'],
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* SQL Query Schema
|
|
131
|
+
* 用于 gensql 工具的结构化输出
|
|
132
|
+
*/
|
|
133
|
+
export const SQLQuerySchema = {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: {
|
|
136
|
+
summary: { type: 'string' },
|
|
137
|
+
dialect: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
enum: ['postgres', 'mysql', 'sqlite', 'mssql', 'oracle'],
|
|
140
|
+
},
|
|
141
|
+
query: { type: 'string', description: '生成的 SQL 查询' },
|
|
142
|
+
explanation: { type: 'string', description: '查询说明' },
|
|
143
|
+
parameters: {
|
|
144
|
+
type: 'array',
|
|
145
|
+
items: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: {
|
|
148
|
+
name: { type: 'string' },
|
|
149
|
+
type: { type: 'string' },
|
|
150
|
+
description: { type: 'string' },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
performance: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
estimatedRows: { type: 'number' },
|
|
158
|
+
indexes: { type: 'array', items: { type: 'string' } },
|
|
159
|
+
optimizations: { type: 'array', items: { type: 'string' } },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
required: ['summary', 'dialect', 'query'],
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* README Schema
|
|
167
|
+
* 用于 genreadme 工具的结构化输出
|
|
168
|
+
*/
|
|
169
|
+
export const ReadmeSchema = {
|
|
170
|
+
type: 'object',
|
|
171
|
+
properties: {
|
|
172
|
+
summary: { type: 'string' },
|
|
173
|
+
content: { type: 'string', description: '完整的 README 内容' },
|
|
174
|
+
sections: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
title: { type: 'string' },
|
|
178
|
+
description: { type: 'string' },
|
|
179
|
+
installation: { type: 'string' },
|
|
180
|
+
usage: { type: 'string' },
|
|
181
|
+
api: { type: 'string' },
|
|
182
|
+
examples: { type: 'string' },
|
|
183
|
+
contributing: { type: 'string' },
|
|
184
|
+
license: { type: 'string' },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
badges: {
|
|
188
|
+
type: 'array',
|
|
189
|
+
items: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
name: { type: 'string' },
|
|
193
|
+
url: { type: 'string' },
|
|
194
|
+
imageUrl: { type: 'string' },
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
required: ['summary', 'content'],
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* UI Component Schema
|
|
203
|
+
* 用于 genui 工具的结构化输出
|
|
204
|
+
*/
|
|
205
|
+
export const UIComponentSchema = {
|
|
206
|
+
type: 'object',
|
|
207
|
+
properties: {
|
|
208
|
+
summary: { type: 'string' },
|
|
209
|
+
framework: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
enum: ['react', 'vue', 'angular', 'svelte', 'html'],
|
|
212
|
+
},
|
|
213
|
+
componentName: { type: 'string' },
|
|
214
|
+
code: { type: 'string', description: '组件代码' },
|
|
215
|
+
props: {
|
|
216
|
+
type: 'array',
|
|
217
|
+
items: {
|
|
218
|
+
type: 'object',
|
|
219
|
+
properties: {
|
|
220
|
+
name: { type: 'string' },
|
|
221
|
+
type: { type: 'string' },
|
|
222
|
+
required: { type: 'boolean' },
|
|
223
|
+
default: { type: 'string' },
|
|
224
|
+
description: { type: 'string' },
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
styles: { type: 'string', description: '样式代码' },
|
|
229
|
+
usage: { type: 'string', description: '使用示例' },
|
|
230
|
+
},
|
|
231
|
+
required: ['summary', 'framework', 'componentName', 'code'],
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Mock Data Schema
|
|
235
|
+
* 用于 gen_mock 工具的结构化输出
|
|
236
|
+
*/
|
|
237
|
+
export const MockDataSchema = {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: {
|
|
240
|
+
summary: { type: 'string' },
|
|
241
|
+
format: {
|
|
242
|
+
type: 'string',
|
|
243
|
+
enum: ['json', 'typescript', 'javascript', 'csv'],
|
|
244
|
+
},
|
|
245
|
+
count: { type: 'number', description: '生成的数据条数' },
|
|
246
|
+
data: {
|
|
247
|
+
type: 'array',
|
|
248
|
+
description: '生成的 Mock 数据',
|
|
249
|
+
items: { type: 'object' },
|
|
250
|
+
},
|
|
251
|
+
schema: {
|
|
252
|
+
type: 'object',
|
|
253
|
+
description: '数据结构定义',
|
|
254
|
+
},
|
|
255
|
+
code: { type: 'string', description: '可直接使用的代码' },
|
|
256
|
+
},
|
|
257
|
+
required: ['summary', 'format', 'count', 'data'],
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Changelog Schema
|
|
261
|
+
* 用于 genchangelog 工具的结构化输出
|
|
262
|
+
*/
|
|
263
|
+
export const ChangelogSchema = {
|
|
264
|
+
type: 'object',
|
|
265
|
+
properties: {
|
|
266
|
+
summary: { type: 'string' },
|
|
267
|
+
version: { type: 'string' },
|
|
268
|
+
date: { type: 'string' },
|
|
269
|
+
content: { type: 'string', description: '完整的 Changelog 内容' },
|
|
270
|
+
changes: {
|
|
271
|
+
type: 'object',
|
|
272
|
+
properties: {
|
|
273
|
+
features: { type: 'array', items: { type: 'string' } },
|
|
274
|
+
fixes: { type: 'array', items: { type: 'string' } },
|
|
275
|
+
breaking: { type: 'array', items: { type: 'string' } },
|
|
276
|
+
deprecated: { type: 'array', items: { type: 'string' } },
|
|
277
|
+
security: { type: 'array', items: { type: 'string' } },
|
|
278
|
+
performance: { type: 'array', items: { type: 'string' } },
|
|
279
|
+
docs: { type: 'array', items: { type: 'string' } },
|
|
280
|
+
chore: { type: 'array', items: { type: 'string' } },
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
required: ['summary', 'version', 'content', 'changes'],
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Pull Request Schema
|
|
288
|
+
* 用于 genpr 工具的结构化输出
|
|
289
|
+
*/
|
|
290
|
+
export const PullRequestSchema = {
|
|
291
|
+
type: 'object',
|
|
292
|
+
properties: {
|
|
293
|
+
summary: { type: 'string' },
|
|
294
|
+
title: { type: 'string' },
|
|
295
|
+
description: { type: 'string', description: '完整的 PR 描述' },
|
|
296
|
+
type: {
|
|
297
|
+
type: 'string',
|
|
298
|
+
enum: ['feature', 'bugfix', 'hotfix', 'refactor', 'docs', 'chore'],
|
|
299
|
+
},
|
|
300
|
+
changes: {
|
|
301
|
+
type: 'object',
|
|
302
|
+
properties: {
|
|
303
|
+
added: { type: 'array', items: { type: 'string' } },
|
|
304
|
+
modified: { type: 'array', items: { type: 'string' } },
|
|
305
|
+
removed: { type: 'array', items: { type: 'string' } },
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
testing: { type: 'string', description: '测试说明' },
|
|
309
|
+
screenshots: {
|
|
310
|
+
type: 'array',
|
|
311
|
+
items: { type: 'string' },
|
|
312
|
+
description: '截图说明',
|
|
313
|
+
},
|
|
314
|
+
checklist: {
|
|
315
|
+
type: 'array',
|
|
316
|
+
items: { type: 'string' },
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
required: ['summary', 'title', 'description', 'type'],
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Code Fix Schema
|
|
323
|
+
* 用于 fix 工具的结构化输出
|
|
324
|
+
*/
|
|
325
|
+
export const CodeFixSchema = {
|
|
326
|
+
type: 'object',
|
|
327
|
+
properties: {
|
|
328
|
+
summary: { type: 'string' },
|
|
329
|
+
fixType: {
|
|
330
|
+
type: 'string',
|
|
331
|
+
enum: ['lint', 'format', 'typescript', 'import', 'syntax'],
|
|
332
|
+
},
|
|
333
|
+
originalCode: { type: 'string' },
|
|
334
|
+
fixedCode: { type: 'string' },
|
|
335
|
+
diff: { type: 'string', description: 'Unified diff' },
|
|
336
|
+
issues: {
|
|
337
|
+
type: 'array',
|
|
338
|
+
items: {
|
|
339
|
+
type: 'object',
|
|
340
|
+
properties: {
|
|
341
|
+
line: { type: 'number' },
|
|
342
|
+
message: { type: 'string' },
|
|
343
|
+
fixed: { type: 'boolean' },
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
required: ['summary', 'fixType', 'fixedCode'],
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Explanation Schema
|
|
352
|
+
* 用于 explain 工具的结构化输出
|
|
353
|
+
*/
|
|
354
|
+
export const ExplanationSchema = {
|
|
355
|
+
type: 'object',
|
|
356
|
+
properties: {
|
|
357
|
+
summary: { type: 'string' },
|
|
358
|
+
overview: { type: 'string', description: '代码概述' },
|
|
359
|
+
purpose: { type: 'string', description: '代码目的' },
|
|
360
|
+
flow: {
|
|
361
|
+
type: 'array',
|
|
362
|
+
description: '执行流程',
|
|
363
|
+
items: {
|
|
364
|
+
type: 'object',
|
|
365
|
+
properties: {
|
|
366
|
+
step: { type: 'number' },
|
|
367
|
+
description: { type: 'string' },
|
|
368
|
+
code: { type: 'string' },
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
keyConcepts: {
|
|
373
|
+
type: 'array',
|
|
374
|
+
items: {
|
|
375
|
+
type: 'object',
|
|
376
|
+
properties: {
|
|
377
|
+
concept: { type: 'string' },
|
|
378
|
+
explanation: { type: 'string' },
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
complexity: {
|
|
383
|
+
type: 'object',
|
|
384
|
+
properties: {
|
|
385
|
+
time: { type: 'string' },
|
|
386
|
+
space: { type: 'string' },
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
required: ['summary', 'overview', 'purpose'],
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Conversion Schema
|
|
394
|
+
* 用于 convert 工具的结构化输出
|
|
395
|
+
*/
|
|
396
|
+
export const ConversionSchema = {
|
|
397
|
+
type: 'object',
|
|
398
|
+
properties: {
|
|
399
|
+
summary: { type: 'string' },
|
|
400
|
+
from: { type: 'string', description: '源格式' },
|
|
401
|
+
to: { type: 'string', description: '目标格式' },
|
|
402
|
+
originalCode: { type: 'string' },
|
|
403
|
+
convertedCode: { type: 'string' },
|
|
404
|
+
changes: {
|
|
405
|
+
type: 'array',
|
|
406
|
+
items: {
|
|
407
|
+
type: 'object',
|
|
408
|
+
properties: {
|
|
409
|
+
type: { type: 'string' },
|
|
410
|
+
description: { type: 'string' },
|
|
411
|
+
before: { type: 'string' },
|
|
412
|
+
after: { type: 'string' },
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
warnings: {
|
|
417
|
+
type: 'array',
|
|
418
|
+
items: { type: 'string' },
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
required: ['summary', 'from', 'to', 'convertedCode'],
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* CSS Order Schema
|
|
425
|
+
* 用于 css_order 工具的结构化输出
|
|
426
|
+
*/
|
|
427
|
+
export const CSSOrderSchema = {
|
|
428
|
+
type: 'object',
|
|
429
|
+
properties: {
|
|
430
|
+
summary: { type: 'string' },
|
|
431
|
+
originalCSS: { type: 'string' },
|
|
432
|
+
orderedCSS: { type: 'string' },
|
|
433
|
+
rules: {
|
|
434
|
+
type: 'array',
|
|
435
|
+
items: {
|
|
436
|
+
type: 'object',
|
|
437
|
+
properties: {
|
|
438
|
+
selector: { type: 'string' },
|
|
439
|
+
propertiesCount: { type: 'number' },
|
|
440
|
+
reordered: { type: 'boolean' },
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
required: ['summary', 'orderedCSS'],
|
|
446
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 辅助工具的结构化输出 Schema
|
|
3
|
+
* 包含: detect_shell, init_setting, gen_skill
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Shell Detection Schema
|
|
7
|
+
* 用于 detect_shell 工具的结构化输出
|
|
8
|
+
*/
|
|
9
|
+
export declare const ShellDetectionSchema: {
|
|
10
|
+
readonly type: "object";
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly summary: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly shell: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly enum: readonly ["bash", "zsh", "fish", "powershell", "cmd", "sh", "unknown"];
|
|
18
|
+
readonly description: "检测到的 Shell 类型";
|
|
19
|
+
};
|
|
20
|
+
readonly version: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly description: "Shell 版本";
|
|
23
|
+
};
|
|
24
|
+
readonly os: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly enum: readonly ["linux", "macos", "windows", "unknown"];
|
|
27
|
+
readonly description: "操作系统";
|
|
28
|
+
};
|
|
29
|
+
readonly features: {
|
|
30
|
+
readonly type: "array";
|
|
31
|
+
readonly items: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly description: "Shell 特性";
|
|
35
|
+
};
|
|
36
|
+
readonly configFiles: {
|
|
37
|
+
readonly type: "array";
|
|
38
|
+
readonly items: {
|
|
39
|
+
readonly type: "object";
|
|
40
|
+
readonly properties: {
|
|
41
|
+
readonly path: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
};
|
|
44
|
+
readonly exists: {
|
|
45
|
+
readonly type: "boolean";
|
|
46
|
+
};
|
|
47
|
+
readonly purpose: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly recommendations: {
|
|
54
|
+
readonly type: "array";
|
|
55
|
+
readonly items: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly required: readonly ["summary", "shell", "os"];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Setting Init Schema
|
|
64
|
+
* 用于 init_setting 工具的结构化输出
|
|
65
|
+
*/
|
|
66
|
+
export declare const SettingInitSchema: {
|
|
67
|
+
readonly type: "object";
|
|
68
|
+
readonly properties: {
|
|
69
|
+
readonly summary: {
|
|
70
|
+
readonly type: "string";
|
|
71
|
+
};
|
|
72
|
+
readonly settingsPath: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly description: "设置文件路径";
|
|
75
|
+
};
|
|
76
|
+
readonly settings: {
|
|
77
|
+
readonly type: "object";
|
|
78
|
+
readonly description: "推荐的设置";
|
|
79
|
+
readonly additionalProperties: true;
|
|
80
|
+
};
|
|
81
|
+
readonly applied: {
|
|
82
|
+
readonly type: "array";
|
|
83
|
+
readonly items: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly properties: {
|
|
86
|
+
readonly key: {
|
|
87
|
+
readonly type: "string";
|
|
88
|
+
};
|
|
89
|
+
readonly value: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
};
|
|
92
|
+
readonly reason: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly nextSteps: {
|
|
99
|
+
readonly type: "array";
|
|
100
|
+
readonly items: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly required: readonly ["summary", "settingsPath", "settings"];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Skill Doc Schema
|
|
109
|
+
* 用于 gen_skill 工具的结构化输出
|
|
110
|
+
*/
|
|
111
|
+
export declare const SkillDocSchema: {
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly summary: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
};
|
|
117
|
+
readonly scope: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly enum: readonly ["all", "single"];
|
|
120
|
+
readonly description: "生成范围";
|
|
121
|
+
};
|
|
122
|
+
readonly skills: {
|
|
123
|
+
readonly type: "array";
|
|
124
|
+
readonly items: {
|
|
125
|
+
readonly type: "object";
|
|
126
|
+
readonly properties: {
|
|
127
|
+
readonly toolName: {
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
};
|
|
130
|
+
readonly title: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
};
|
|
133
|
+
readonly description: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
};
|
|
136
|
+
readonly category: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
};
|
|
139
|
+
readonly useCases: {
|
|
140
|
+
readonly type: "array";
|
|
141
|
+
readonly items: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly examples: {
|
|
146
|
+
readonly type: "array";
|
|
147
|
+
readonly items: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly properties: {
|
|
150
|
+
readonly scenario: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
readonly input: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
};
|
|
156
|
+
readonly output: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly parameters: {
|
|
163
|
+
readonly type: "array";
|
|
164
|
+
readonly items: {
|
|
165
|
+
readonly type: "object";
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly name: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
};
|
|
170
|
+
readonly type: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
};
|
|
173
|
+
readonly required: {
|
|
174
|
+
readonly type: "boolean";
|
|
175
|
+
};
|
|
176
|
+
readonly description: {
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly outputPath: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
readonly description: "输出路径";
|
|
188
|
+
};
|
|
189
|
+
readonly format: {
|
|
190
|
+
readonly type: "string";
|
|
191
|
+
readonly enum: readonly ["markdown", "json"];
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly required: readonly ["summary", "scope", "skills"];
|
|
195
|
+
};
|
|
196
|
+
export interface ShellDetection {
|
|
197
|
+
summary: string;
|
|
198
|
+
shell: 'bash' | 'zsh' | 'fish' | 'powershell' | 'cmd' | 'sh' | 'unknown';
|
|
199
|
+
version?: string;
|
|
200
|
+
os: 'linux' | 'macos' | 'windows' | 'unknown';
|
|
201
|
+
features?: string[];
|
|
202
|
+
configFiles?: Array<{
|
|
203
|
+
path?: string;
|
|
204
|
+
exists?: boolean;
|
|
205
|
+
purpose?: string;
|
|
206
|
+
}>;
|
|
207
|
+
recommendations?: string[];
|
|
208
|
+
}
|
|
209
|
+
export interface SettingInit {
|
|
210
|
+
summary: string;
|
|
211
|
+
settingsPath: string;
|
|
212
|
+
settings: Record<string, any>;
|
|
213
|
+
applied?: Array<{
|
|
214
|
+
key?: string;
|
|
215
|
+
value?: string;
|
|
216
|
+
reason?: string;
|
|
217
|
+
}>;
|
|
218
|
+
nextSteps?: string[];
|
|
219
|
+
}
|
|
220
|
+
export interface SkillDoc {
|
|
221
|
+
summary: string;
|
|
222
|
+
scope: 'all' | 'single';
|
|
223
|
+
skills: Array<{
|
|
224
|
+
toolName?: string;
|
|
225
|
+
title?: string;
|
|
226
|
+
description?: string;
|
|
227
|
+
category?: string;
|
|
228
|
+
useCases?: string[];
|
|
229
|
+
examples?: Array<{
|
|
230
|
+
scenario?: string;
|
|
231
|
+
input?: string;
|
|
232
|
+
output?: string;
|
|
233
|
+
}>;
|
|
234
|
+
parameters?: Array<{
|
|
235
|
+
name?: string;
|
|
236
|
+
type?: string;
|
|
237
|
+
required?: boolean;
|
|
238
|
+
description?: string;
|
|
239
|
+
}>;
|
|
240
|
+
}>;
|
|
241
|
+
outputPath?: string;
|
|
242
|
+
format?: 'markdown' | 'json';
|
|
243
|
+
}
|