mcp-probe-kit 3.0.9 → 3.0.11
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 +14 -4
- package/build/lib/__tests__/gitnexus-bridge.unit.test.d.ts +1 -0
- package/build/lib/__tests__/gitnexus-bridge.unit.test.js +96 -0
- package/build/lib/gitnexus-bridge.d.ts +23 -0
- package/build/lib/gitnexus-bridge.js +526 -21
- package/build/schemas/code-analysis-tools.d.ts +9 -1
- package/build/schemas/code-analysis-tools.js +9 -1
- package/build/schemas/git-tools.d.ts +1 -1
- package/build/schemas/git-tools.js +1 -1
- package/build/schemas/index.d.ts +23 -3
- package/build/schemas/orchestration-tools.d.ts +13 -1
- package/build/schemas/orchestration-tools.js +13 -1
- package/build/schemas/output/core-tools.d.ts +130 -1
- package/build/schemas/output/core-tools.js +71 -1
- package/build/schemas/output/index.d.ts +2 -2
- package/build/schemas/output/index.js +2 -2
- package/build/schemas/output/project-tools.d.ts +13 -0
- package/build/schemas/output/project-tools.js +9 -0
- package/build/schemas/structured-output.d.ts +358 -5
- package/build/schemas/structured-output.js +169 -5
- package/build/tools/__tests__/code_insight.unit.test.js +81 -1
- package/build/tools/__tests__/fix_bug.unit.test.d.ts +1 -0
- package/build/tools/__tests__/fix_bug.unit.test.js +31 -0
- package/build/tools/__tests__/gencommit.unit.test.d.ts +1 -0
- package/build/tools/__tests__/gencommit.unit.test.js +41 -0
- package/build/tools/__tests__/init_project_context.unit.test.d.ts +1 -0
- package/build/tools/__tests__/init_project_context.unit.test.js +63 -0
- package/build/tools/__tests__/start_bugfix.unit.test.js +10 -0
- package/build/tools/__tests__/start_feature.unit.test.js +10 -0
- package/build/tools/code_insight.d.ts +10 -0
- package/build/tools/code_insight.js +156 -3
- package/build/tools/fix_bug.d.ts +3 -3
- package/build/tools/fix_bug.js +297 -312
- package/build/tools/gencommit.js +144 -123
- package/build/tools/init_project_context.js +211 -53
- package/build/tools/start_bugfix.js +170 -70
- package/build/tools/start_feature.js +79 -25
- package/docs/data/tools.js +33 -31
- package/docs/i18n/all-tools/en.json +9 -9
- package/docs/i18n/all-tools/ja.json +9 -9
- package/docs/i18n/all-tools/ko.json +9 -9
- package/docs/i18n/all-tools/zh-CN.json +9 -9
- package/docs/i18n/en.json +480 -481
- package/docs/i18n/ja.json +478 -479
- package/docs/i18n/ko.json +480 -481
- package/docs/i18n/zh-CN.json +480 -481
- package/docs/index.html +2 -2
- package/docs/pages/all-tools.html +2 -2
- package/docs/pages/examples.html +2 -2
- package/docs/pages/getting-started.html +2 -2
- package/docs/pages/migration.html +2 -2
- package/package.json +1 -2
|
@@ -41,6 +41,10 @@ export declare const codeAnalysisToolSchemas: readonly [{
|
|
|
41
41
|
readonly type: "string";
|
|
42
42
|
readonly description: "仓库名称(多仓库场景可选)";
|
|
43
43
|
};
|
|
44
|
+
readonly project_root: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
47
|
+
};
|
|
44
48
|
readonly goal: {
|
|
45
49
|
readonly type: "string";
|
|
46
50
|
readonly description: "分析目标(可选)";
|
|
@@ -85,7 +89,7 @@ export declare const codeAnalysisToolSchemas: readonly [{
|
|
|
85
89
|
};
|
|
86
90
|
}, {
|
|
87
91
|
readonly name: "fix_bug";
|
|
88
|
-
readonly description: "
|
|
92
|
+
readonly description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认采用 TBP 8 步法做真因分析,并输出修复方案与验证步骤";
|
|
89
93
|
readonly inputSchema: {
|
|
90
94
|
readonly type: "object";
|
|
91
95
|
readonly properties: {
|
|
@@ -101,6 +105,10 @@ export declare const codeAnalysisToolSchemas: readonly [{
|
|
|
101
105
|
readonly type: "string";
|
|
102
106
|
readonly description: "相关代码。可选";
|
|
103
107
|
};
|
|
108
|
+
readonly analysis_mode: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
111
|
+
};
|
|
104
112
|
};
|
|
105
113
|
readonly required: readonly [];
|
|
106
114
|
readonly additionalProperties: true;
|
|
@@ -43,6 +43,10 @@ export const codeAnalysisToolSchemas = [
|
|
|
43
43
|
type: "string",
|
|
44
44
|
description: "仓库名称(多仓库场景可选)",
|
|
45
45
|
},
|
|
46
|
+
project_root: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定",
|
|
49
|
+
},
|
|
46
50
|
goal: {
|
|
47
51
|
type: "string",
|
|
48
52
|
description: "分析目标(可选)",
|
|
@@ -89,7 +93,7 @@ export const codeAnalysisToolSchemas = [
|
|
|
89
93
|
},
|
|
90
94
|
{
|
|
91
95
|
name: "fix_bug",
|
|
92
|
-
description: "
|
|
96
|
+
description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认采用 TBP 8 步法做真因分析,并输出修复方案与验证步骤",
|
|
93
97
|
inputSchema: {
|
|
94
98
|
type: "object",
|
|
95
99
|
properties: {
|
|
@@ -105,6 +109,10 @@ export const codeAnalysisToolSchemas = [
|
|
|
105
109
|
type: "string",
|
|
106
110
|
description: "相关代码。可选",
|
|
107
111
|
},
|
|
112
|
+
analysis_mode: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description: "分析方法。默认 tbp8(丰田问题分析 8 步法)",
|
|
115
|
+
},
|
|
108
116
|
},
|
|
109
117
|
required: [],
|
|
110
118
|
additionalProperties: true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const gitToolSchemas: readonly [{
|
|
5
5
|
readonly name: "gencommit";
|
|
6
|
-
readonly description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits
|
|
6
|
+
readonly description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits 规范说明、步骤、输出模板和示例,供 AI 根据变更内容生成最终 commit message。它不直接代写最终消息,也不应被判定为空结果";
|
|
7
7
|
readonly inputSchema: {
|
|
8
8
|
readonly type: "object";
|
|
9
9
|
readonly properties: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export const gitToolSchemas = [
|
|
5
5
|
{
|
|
6
6
|
name: "gencommit",
|
|
7
|
-
description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits
|
|
7
|
+
description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits 规范说明、步骤、输出模板和示例,供 AI 根据变更内容生成最终 commit message。它不直接代写最终消息,也不应被判定为空结果",
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: "object",
|
|
10
10
|
properties: {
|
package/build/schemas/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const allToolSchemas: ({
|
|
|
21
21
|
};
|
|
22
22
|
} | {
|
|
23
23
|
readonly name: "gencommit";
|
|
24
|
-
readonly description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits
|
|
24
|
+
readonly description: "当用户需要生成 Git commit 消息时使用。返回 Conventional Commits 规范说明、步骤、输出模板和示例,供 AI 根据变更内容生成最终 commit message。它不直接代写最终消息,也不应被判定为空结果";
|
|
25
25
|
readonly inputSchema: {
|
|
26
26
|
readonly type: "object";
|
|
27
27
|
readonly properties: {
|
|
@@ -103,6 +103,10 @@ export declare const allToolSchemas: ({
|
|
|
103
103
|
readonly type: "string";
|
|
104
104
|
readonly description: "仓库名称(多仓库场景可选)";
|
|
105
105
|
};
|
|
106
|
+
readonly project_root: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
109
|
+
};
|
|
106
110
|
readonly goal: {
|
|
107
111
|
readonly type: "string";
|
|
108
112
|
readonly description: "分析目标(可选)";
|
|
@@ -147,7 +151,7 @@ export declare const allToolSchemas: ({
|
|
|
147
151
|
};
|
|
148
152
|
} | {
|
|
149
153
|
readonly name: "fix_bug";
|
|
150
|
-
readonly description: "
|
|
154
|
+
readonly description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认采用 TBP 8 步法做真因分析,并输出修复方案与验证步骤";
|
|
151
155
|
readonly inputSchema: {
|
|
152
156
|
readonly type: "object";
|
|
153
157
|
readonly properties: {
|
|
@@ -163,6 +167,10 @@ export declare const allToolSchemas: ({
|
|
|
163
167
|
readonly type: "string";
|
|
164
168
|
readonly description: "相关代码。可选";
|
|
165
169
|
};
|
|
170
|
+
readonly analysis_mode: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
173
|
+
};
|
|
166
174
|
};
|
|
167
175
|
readonly required: readonly [];
|
|
168
176
|
readonly additionalProperties: true;
|
|
@@ -269,6 +277,10 @@ export declare const allToolSchemas: ({
|
|
|
269
277
|
readonly type: "string";
|
|
270
278
|
readonly description: "文档输出目录,默认为 docs";
|
|
271
279
|
};
|
|
280
|
+
readonly project_root: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
283
|
+
};
|
|
272
284
|
readonly template_profile: {
|
|
273
285
|
readonly type: "string";
|
|
274
286
|
readonly description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)";
|
|
@@ -295,7 +307,7 @@ export declare const allToolSchemas: ({
|
|
|
295
307
|
};
|
|
296
308
|
} | {
|
|
297
309
|
readonly name: "start_bugfix";
|
|
298
|
-
readonly description: "
|
|
310
|
+
readonly description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认按 TBP 8 步法编排:取证澄清→分析定位→修复方案→生成测试。";
|
|
299
311
|
readonly inputSchema: {
|
|
300
312
|
readonly type: "object";
|
|
301
313
|
readonly properties: {
|
|
@@ -311,6 +323,14 @@ export declare const allToolSchemas: ({
|
|
|
311
323
|
readonly type: "string";
|
|
312
324
|
readonly description: "相关代码。可选";
|
|
313
325
|
};
|
|
326
|
+
readonly project_root: {
|
|
327
|
+
readonly type: "string";
|
|
328
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
329
|
+
};
|
|
330
|
+
readonly analysis_mode: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
333
|
+
};
|
|
314
334
|
readonly template_profile: {
|
|
315
335
|
readonly type: "string";
|
|
316
336
|
readonly description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)";
|
|
@@ -19,6 +19,10 @@ export declare const orchestrationToolSchemas: readonly [{
|
|
|
19
19
|
readonly type: "string";
|
|
20
20
|
readonly description: "文档输出目录,默认为 docs";
|
|
21
21
|
};
|
|
22
|
+
readonly project_root: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
25
|
+
};
|
|
22
26
|
readonly template_profile: {
|
|
23
27
|
readonly type: "string";
|
|
24
28
|
readonly description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)";
|
|
@@ -45,7 +49,7 @@ export declare const orchestrationToolSchemas: readonly [{
|
|
|
45
49
|
};
|
|
46
50
|
}, {
|
|
47
51
|
readonly name: "start_bugfix";
|
|
48
|
-
readonly description: "
|
|
52
|
+
readonly description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认按 TBP 8 步法编排:取证澄清→分析定位→修复方案→生成测试。";
|
|
49
53
|
readonly inputSchema: {
|
|
50
54
|
readonly type: "object";
|
|
51
55
|
readonly properties: {
|
|
@@ -61,6 +65,14 @@ export declare const orchestrationToolSchemas: readonly [{
|
|
|
61
65
|
readonly type: "string";
|
|
62
66
|
readonly description: "相关代码。可选";
|
|
63
67
|
};
|
|
68
|
+
readonly project_root: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
|
|
71
|
+
};
|
|
72
|
+
readonly analysis_mode: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
75
|
+
};
|
|
64
76
|
readonly template_profile: {
|
|
65
77
|
readonly type: "string";
|
|
66
78
|
readonly description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)";
|
|
@@ -20,6 +20,10 @@ export const orchestrationToolSchemas = [
|
|
|
20
20
|
type: "string",
|
|
21
21
|
description: "文档输出目录,默认为 docs",
|
|
22
22
|
},
|
|
23
|
+
project_root: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定",
|
|
26
|
+
},
|
|
23
27
|
template_profile: {
|
|
24
28
|
type: "string",
|
|
25
29
|
description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)",
|
|
@@ -47,7 +51,7 @@ export const orchestrationToolSchemas = [
|
|
|
47
51
|
},
|
|
48
52
|
{
|
|
49
53
|
name: "start_bugfix",
|
|
50
|
-
description: "
|
|
54
|
+
description: "当用户需要找问题、修 bug、排查异常、定位回归、分析失败原因、分析为什么没生效、先分析再修时使用。默认按 TBP 8 步法编排:取证澄清→分析定位→修复方案→生成测试。",
|
|
51
55
|
inputSchema: {
|
|
52
56
|
type: "object",
|
|
53
57
|
properties: {
|
|
@@ -63,6 +67,14 @@ export const orchestrationToolSchemas = [
|
|
|
63
67
|
type: "string",
|
|
64
68
|
description: "相关代码。可选",
|
|
65
69
|
},
|
|
70
|
+
project_root: {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定",
|
|
73
|
+
},
|
|
74
|
+
analysis_mode: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "分析方法。默认 tbp8(丰田问题分析 8 步法)",
|
|
77
|
+
},
|
|
66
78
|
template_profile: {
|
|
67
79
|
type: "string",
|
|
68
80
|
description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)",
|
|
@@ -110,6 +110,10 @@ export declare const BugAnalysisSchema: {
|
|
|
110
110
|
readonly type: "string";
|
|
111
111
|
readonly enum: readonly ["critical", "high", "medium", "low"];
|
|
112
112
|
};
|
|
113
|
+
readonly analysisMode: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly enum: readonly ["tbp8"];
|
|
116
|
+
};
|
|
113
117
|
readonly rootCause: {
|
|
114
118
|
readonly type: "string";
|
|
115
119
|
};
|
|
@@ -175,8 +179,109 @@ export declare const BugAnalysisSchema: {
|
|
|
175
179
|
readonly type: "string";
|
|
176
180
|
};
|
|
177
181
|
};
|
|
182
|
+
readonly tbp: {
|
|
183
|
+
readonly description: "TBP 8 步法分析结果";
|
|
184
|
+
readonly type: "object";
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly phenomenon: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly description: "TBP-1 现象";
|
|
189
|
+
};
|
|
190
|
+
readonly timeline: {
|
|
191
|
+
readonly type: "array";
|
|
192
|
+
readonly description: "TBP-2 时间线";
|
|
193
|
+
readonly items: {
|
|
194
|
+
readonly type: "object";
|
|
195
|
+
readonly properties: {
|
|
196
|
+
readonly order: {
|
|
197
|
+
readonly type: "number";
|
|
198
|
+
readonly description: "时间线顺序";
|
|
199
|
+
};
|
|
200
|
+
readonly event: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly description: "事件描述";
|
|
203
|
+
};
|
|
204
|
+
readonly evidence: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
readonly description: "对应证据";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly required: readonly ["order", "event"];
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly ruledOut: {
|
|
213
|
+
readonly type: "array";
|
|
214
|
+
readonly description: "TBP-3 已排除方向";
|
|
215
|
+
readonly items: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
readonly commonPattern: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly description: "TBP-4 共同模式";
|
|
222
|
+
};
|
|
223
|
+
readonly boundary: {
|
|
224
|
+
readonly type: "string";
|
|
225
|
+
readonly description: "TBP-5 问题边界";
|
|
226
|
+
};
|
|
227
|
+
readonly rootCauseStatement: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly description: "TBP-6 真因因果句";
|
|
230
|
+
};
|
|
231
|
+
readonly evidence: {
|
|
232
|
+
readonly type: "array";
|
|
233
|
+
readonly description: "TBP-7 证据链";
|
|
234
|
+
readonly items: {
|
|
235
|
+
readonly type: "object";
|
|
236
|
+
readonly properties: {
|
|
237
|
+
readonly type: {
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly enum: readonly ["symptom", "timeline", "stack", "code", "comparison", "environment", "graph"];
|
|
240
|
+
readonly description: "证据类型";
|
|
241
|
+
};
|
|
242
|
+
readonly detail: {
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly description: "证据内容";
|
|
245
|
+
};
|
|
246
|
+
readonly source: {
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly description: "证据来源";
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly required: readonly ["type", "detail"];
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly repair: {
|
|
255
|
+
readonly type: "array";
|
|
256
|
+
readonly description: "TBP-8 修复设计";
|
|
257
|
+
readonly items: {
|
|
258
|
+
readonly type: "object";
|
|
259
|
+
readonly properties: {
|
|
260
|
+
readonly layer: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly description: "修复层";
|
|
263
|
+
};
|
|
264
|
+
readonly action: {
|
|
265
|
+
readonly type: "string";
|
|
266
|
+
readonly description: "修复动作";
|
|
267
|
+
};
|
|
268
|
+
readonly risk: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly description: "潜在风险";
|
|
271
|
+
};
|
|
272
|
+
readonly verification: {
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
readonly description: "验证方法";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
readonly required: readonly ["layer", "action", "verification"];
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
readonly required: readonly ["phenomenon", "timeline", "ruledOut", "commonPattern", "boundary", "rootCauseStatement", "evidence", "repair"];
|
|
282
|
+
};
|
|
178
283
|
};
|
|
179
|
-
readonly required: readonly ["summary", "bugType", "severity", "rootCause", "fixPlan", "testPlan"];
|
|
284
|
+
readonly required: readonly ["summary", "bugType", "severity", "analysisMode", "rootCause", "fixPlan", "testPlan", "tbp"];
|
|
180
285
|
};
|
|
181
286
|
/**
|
|
182
287
|
* Test Suite Schema
|
|
@@ -580,6 +685,7 @@ export interface BugAnalysis {
|
|
|
580
685
|
summary: string;
|
|
581
686
|
bugType: 'functional' | 'performance' | 'security' | 'ui' | 'data' | 'integration';
|
|
582
687
|
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
688
|
+
analysisMode: 'tbp8';
|
|
583
689
|
rootCause: string;
|
|
584
690
|
affectedComponents?: string[];
|
|
585
691
|
affectedFiles?: string[];
|
|
@@ -594,6 +700,29 @@ export interface BugAnalysis {
|
|
|
594
700
|
manualTests?: string[];
|
|
595
701
|
};
|
|
596
702
|
preventionMeasures?: string[];
|
|
703
|
+
tbp: {
|
|
704
|
+
phenomenon: string;
|
|
705
|
+
timeline: Array<{
|
|
706
|
+
order: number;
|
|
707
|
+
event: string;
|
|
708
|
+
evidence?: string;
|
|
709
|
+
}>;
|
|
710
|
+
ruledOut: string[];
|
|
711
|
+
commonPattern: string;
|
|
712
|
+
boundary: string;
|
|
713
|
+
rootCauseStatement: string;
|
|
714
|
+
evidence: Array<{
|
|
715
|
+
type: 'symptom' | 'timeline' | 'stack' | 'code' | 'comparison' | 'environment' | 'graph';
|
|
716
|
+
detail: string;
|
|
717
|
+
source?: string;
|
|
718
|
+
}>;
|
|
719
|
+
repair: Array<{
|
|
720
|
+
layer: string;
|
|
721
|
+
action: string;
|
|
722
|
+
risk?: string;
|
|
723
|
+
verification: string;
|
|
724
|
+
}>;
|
|
725
|
+
};
|
|
597
726
|
}
|
|
598
727
|
export interface TestSuite {
|
|
599
728
|
summary: string;
|
|
@@ -66,6 +66,68 @@ export const CodeReviewReportSchema = {
|
|
|
66
66
|
},
|
|
67
67
|
required: ['summary', 'overallScore', 'issues'],
|
|
68
68
|
};
|
|
69
|
+
const TbpTimelineEventSchema = {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
order: { type: 'number', description: '时间线顺序' },
|
|
73
|
+
event: { type: 'string', description: '事件描述' },
|
|
74
|
+
evidence: { type: 'string', description: '对应证据' },
|
|
75
|
+
},
|
|
76
|
+
required: ['order', 'event'],
|
|
77
|
+
};
|
|
78
|
+
const TbpEvidenceItemSchema = {
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
type: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
enum: ['symptom', 'timeline', 'stack', 'code', 'comparison', 'environment', 'graph'],
|
|
84
|
+
description: '证据类型',
|
|
85
|
+
},
|
|
86
|
+
detail: { type: 'string', description: '证据内容' },
|
|
87
|
+
source: { type: 'string', description: '证据来源' },
|
|
88
|
+
},
|
|
89
|
+
required: ['type', 'detail'],
|
|
90
|
+
};
|
|
91
|
+
const TbpRepairItemSchema = {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
layer: { type: 'string', description: '修复层' },
|
|
95
|
+
action: { type: 'string', description: '修复动作' },
|
|
96
|
+
risk: { type: 'string', description: '潜在风险' },
|
|
97
|
+
verification: { type: 'string', description: '验证方法' },
|
|
98
|
+
},
|
|
99
|
+
required: ['layer', 'action', 'verification'],
|
|
100
|
+
};
|
|
101
|
+
const TbpAnalysisSchema = {
|
|
102
|
+
type: 'object',
|
|
103
|
+
properties: {
|
|
104
|
+
phenomenon: { type: 'string', description: 'TBP-1 现象' },
|
|
105
|
+
timeline: {
|
|
106
|
+
type: 'array',
|
|
107
|
+
description: 'TBP-2 时间线',
|
|
108
|
+
items: TbpTimelineEventSchema,
|
|
109
|
+
},
|
|
110
|
+
ruledOut: {
|
|
111
|
+
type: 'array',
|
|
112
|
+
description: 'TBP-3 已排除方向',
|
|
113
|
+
items: { type: 'string' },
|
|
114
|
+
},
|
|
115
|
+
commonPattern: { type: 'string', description: 'TBP-4 共同模式' },
|
|
116
|
+
boundary: { type: 'string', description: 'TBP-5 问题边界' },
|
|
117
|
+
rootCauseStatement: { type: 'string', description: 'TBP-6 真因因果句' },
|
|
118
|
+
evidence: {
|
|
119
|
+
type: 'array',
|
|
120
|
+
description: 'TBP-7 证据链',
|
|
121
|
+
items: TbpEvidenceItemSchema,
|
|
122
|
+
},
|
|
123
|
+
repair: {
|
|
124
|
+
type: 'array',
|
|
125
|
+
description: 'TBP-8 修复设计',
|
|
126
|
+
items: TbpRepairItemSchema,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
required: ['phenomenon', 'timeline', 'ruledOut', 'commonPattern', 'boundary', 'rootCauseStatement', 'evidence', 'repair'],
|
|
130
|
+
};
|
|
69
131
|
/**
|
|
70
132
|
* Bug Analysis Schema
|
|
71
133
|
* 用于 fix_bug 工具的结构化输出
|
|
@@ -82,6 +144,10 @@ export const BugAnalysisSchema = {
|
|
|
82
144
|
type: 'string',
|
|
83
145
|
enum: ['critical', 'high', 'medium', 'low'],
|
|
84
146
|
},
|
|
147
|
+
analysisMode: {
|
|
148
|
+
type: 'string',
|
|
149
|
+
enum: ['tbp8'],
|
|
150
|
+
},
|
|
85
151
|
rootCause: { type: 'string' },
|
|
86
152
|
affectedComponents: {
|
|
87
153
|
type: 'array',
|
|
@@ -112,8 +178,12 @@ export const BugAnalysisSchema = {
|
|
|
112
178
|
type: 'array',
|
|
113
179
|
items: { type: 'string' },
|
|
114
180
|
},
|
|
181
|
+
tbp: {
|
|
182
|
+
...TbpAnalysisSchema,
|
|
183
|
+
description: 'TBP 8 步法分析结果',
|
|
184
|
+
},
|
|
115
185
|
},
|
|
116
|
-
required: ['summary', 'bugType', 'severity', 'rootCause', 'fixPlan', 'testPlan'],
|
|
186
|
+
required: ['summary', 'bugType', 'severity', 'analysisMode', 'rootCause', 'fixPlan', 'testPlan', 'tbp'],
|
|
117
187
|
};
|
|
118
188
|
/**
|
|
119
189
|
* Test Suite Schema
|
|
@@ -8,7 +8,7 @@ export * from './project-tools.js';
|
|
|
8
8
|
export * from './ui-ux-tools.js';
|
|
9
9
|
export * from './product-design-tools.js';
|
|
10
10
|
export * from './helper-tools.js';
|
|
11
|
-
export { CommitMessageSchema, WorkflowReportSchema, BugFixReportSchema, FeatureReportSchema, UIReportSchema, OnboardingReportSchema, RalphLoopReportSchema, RequirementsLoopSchema, CommitMessage, WorkflowStep, Artifact, WorkflowReport, BugFixReport, FeatureReport, UIReport, OnboardingReport, RalphLoopReport, RequirementsLoopReport, } from '../structured-output.js';
|
|
11
|
+
export { CommitMessageSchema, CommitGuidanceSchema, WorkflowReportSchema, BugFixReportSchema, FeatureReportSchema, UIReportSchema, OnboardingReportSchema, RalphLoopReportSchema, RequirementsLoopSchema, CommitMessage, CommitGuidance, WorkflowStep, Artifact, WorkflowReport, BugFixReport, FeatureReport, UIReport, OnboardingReport, RalphLoopReport, RequirementsLoopReport, } from '../structured-output.js';
|
|
12
12
|
/**
|
|
13
13
|
* Schema 映射表 (v3.0 - 20 个工具)
|
|
14
14
|
* 工具名称 -> Schema 对象
|
|
@@ -20,7 +20,7 @@ export declare const SCHEMA_MAP: {
|
|
|
20
20
|
readonly start_ui: "UIReportSchema";
|
|
21
21
|
readonly start_product: "WorkflowReportSchema";
|
|
22
22
|
readonly start_ralph: "RalphLoopReportSchema";
|
|
23
|
-
readonly gencommit: "
|
|
23
|
+
readonly gencommit: "CommitGuidanceSchema";
|
|
24
24
|
readonly code_review: "CodeReviewReportSchema";
|
|
25
25
|
readonly gentest: "TestSuiteSchema";
|
|
26
26
|
readonly refactor: "RefactorPlanSchema";
|
|
@@ -15,7 +15,7 @@ export * from './product-design-tools.js';
|
|
|
15
15
|
// 辅助工具
|
|
16
16
|
export * from './helper-tools.js';
|
|
17
17
|
// 从主 Schema 文件导出基础 Schema(P0 工具)
|
|
18
|
-
export { CommitMessageSchema, WorkflowReportSchema, BugFixReportSchema, FeatureReportSchema, UIReportSchema, OnboardingReportSchema, RalphLoopReportSchema, RequirementsLoopSchema, } from '../structured-output.js';
|
|
18
|
+
export { CommitMessageSchema, CommitGuidanceSchema, WorkflowReportSchema, BugFixReportSchema, FeatureReportSchema, UIReportSchema, OnboardingReportSchema, RalphLoopReportSchema, RequirementsLoopSchema, } from '../structured-output.js';
|
|
19
19
|
/**
|
|
20
20
|
* Schema 映射表 (v3.0 - 20 个工具)
|
|
21
21
|
* 工具名称 -> Schema 对象
|
|
@@ -29,7 +29,7 @@ export const SCHEMA_MAP = {
|
|
|
29
29
|
start_product: 'WorkflowReportSchema',
|
|
30
30
|
start_ralph: 'RalphLoopReportSchema',
|
|
31
31
|
// 日常工具(9 个)
|
|
32
|
-
gencommit: '
|
|
32
|
+
gencommit: 'CommitGuidanceSchema',
|
|
33
33
|
code_review: 'CodeReviewReportSchema',
|
|
34
34
|
gentest: 'TestSuiteSchema',
|
|
35
35
|
refactor: 'RefactorPlanSchema',
|
|
@@ -135,6 +135,17 @@ export declare const ProjectContextSchema: {
|
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
|
+
readonly nextSteps: {
|
|
139
|
+
readonly type: "array";
|
|
140
|
+
readonly items: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly metadata: {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly description: "额外元数据(如 delegated plan、图谱文档路径)";
|
|
147
|
+
readonly additionalProperties: true;
|
|
148
|
+
};
|
|
138
149
|
};
|
|
139
150
|
readonly required: readonly ["summary", "projectOverview"];
|
|
140
151
|
};
|
|
@@ -421,6 +432,8 @@ export interface ProjectContext {
|
|
|
421
432
|
path?: string;
|
|
422
433
|
purpose?: string;
|
|
423
434
|
}>;
|
|
435
|
+
nextSteps?: string[];
|
|
436
|
+
metadata?: Record<string, any>;
|
|
424
437
|
}
|
|
425
438
|
export interface FeatureSpec {
|
|
426
439
|
summary: string;
|
|
@@ -85,6 +85,15 @@ export const ProjectContextSchema = {
|
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
+
nextSteps: {
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: { type: 'string' },
|
|
91
|
+
},
|
|
92
|
+
metadata: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
description: '额外元数据(如 delegated plan、图谱文档路径)',
|
|
95
|
+
additionalProperties: true,
|
|
96
|
+
},
|
|
88
97
|
},
|
|
89
98
|
required: ['summary', 'projectOverview'],
|
|
90
99
|
};
|