mcp-probe-kit 1.4.0 → 1.7.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 (68) hide show
  1. package/README.md +794 -100
  2. package/build/index.js +379 -1
  3. package/build/tools/add_feature.d.ts +33 -0
  4. package/build/tools/add_feature.js +464 -0
  5. package/build/tools/analyze_project.js +58 -58
  6. package/build/tools/css_order.js +55 -55
  7. package/build/tools/design2code.d.ts +29 -0
  8. package/build/tools/design2code.js +400 -0
  9. package/build/tools/estimate.d.ts +22 -0
  10. package/build/tools/estimate.js +225 -0
  11. package/build/tools/fix_bug.d.ts +24 -0
  12. package/build/tools/fix_bug.js +298 -0
  13. package/build/tools/gen_mock.d.ts +22 -0
  14. package/build/tools/gen_mock.js +250 -0
  15. package/build/tools/index.d.ts +15 -0
  16. package/build/tools/index.js +16 -0
  17. package/build/tools/init_project.js +121 -76
  18. package/build/tools/init_project_context.d.ts +26 -0
  19. package/build/tools/init_project_context.js +331 -0
  20. package/build/tools/security_scan.d.ts +22 -0
  21. package/build/tools/security_scan.js +282 -0
  22. package/build/tools/start_api.d.ts +19 -0
  23. package/build/tools/start_api.js +178 -0
  24. package/build/tools/start_bugfix.d.ts +19 -0
  25. package/build/tools/start_bugfix.js +127 -0
  26. package/build/tools/start_doc.d.ts +19 -0
  27. package/build/tools/start_doc.js +190 -0
  28. package/build/tools/start_feature.d.ts +19 -0
  29. package/build/tools/start_feature.js +122 -0
  30. package/build/tools/start_onboard.d.ts +19 -0
  31. package/build/tools/start_onboard.js +146 -0
  32. package/build/tools/start_refactor.d.ts +19 -0
  33. package/build/tools/start_refactor.js +175 -0
  34. package/build/tools/start_release.d.ts +19 -0
  35. package/build/tools/start_release.js +152 -0
  36. package/build/tools/start_review.d.ts +19 -0
  37. package/build/tools/start_review.js +162 -0
  38. package/docs/BEST_PRACTICES.md +726 -0
  39. package/docs/HOW_TO_TRIGGER.html +188 -0
  40. package/docs/HOW_TO_TRIGGER.md +971 -0
  41. package/docs/specs/add-feature/design.md +608 -0
  42. package/docs/specs/add-feature/requirements.md +175 -0
  43. package/docs/specs/add-feature/tasks.md +111 -0
  44. package/docs/specs/design2code/README.md +0 -0
  45. package/docs/specs/design2code/requirements.md +0 -0
  46. package/docs/specs/estimate/design.md +209 -0
  47. package/docs/specs/estimate/requirements.md +140 -0
  48. package/docs/specs/estimate/tasks.md +66 -0
  49. package/docs/specs/fix-bug/design.md +259 -0
  50. package/docs/specs/fix-bug/requirements.md +132 -0
  51. package/docs/specs/fix-bug/tasks.md +66 -0
  52. package/docs/specs/gen-mock/design.md +241 -0
  53. package/docs/specs/gen-mock/requirements.md +137 -0
  54. package/docs/specs/gen-mock/tasks.md +66 -0
  55. package/docs/specs/init-project-context/design.md +515 -0
  56. package/docs/specs/init-project-context/requirements.md +144 -0
  57. package/docs/specs/init-project-context/tasks.md +93 -0
  58. package/docs/specs/security-scan/design.md +152 -0
  59. package/docs/specs/security-scan/requirements.md +150 -0
  60. package/docs/specs/security-scan/tasks.md +67 -0
  61. package/docs/specs/start-bugfix/design.md +42 -0
  62. package/docs/specs/start-bugfix/requirements.md +70 -0
  63. package/docs/specs/start-bugfix/tasks.md +21 -0
  64. package/docs/specs/start-feature/design.md +41 -0
  65. package/docs/specs/start-feature/requirements.md +90 -0
  66. package/docs/specs/start-feature/tasks.md +21 -0
  67. package/docs/specs/start-review/requirements.md +0 -0
  68. package/package.json +3 -2
@@ -0,0 +1,298 @@
1
+ /**
2
+ * fix_bug 工具
3
+ *
4
+ * 功能:指导完整的 Bug 修复流程
5
+ * 模式:指令生成器模式 - 返回详细的修复指南,由 AI 执行实际操作
6
+ *
7
+ * 流程:问题定位 → 原因分析 → 修复方案 → 验证测试
8
+ */
9
+ const PROMPT_TEMPLATE = `# Bug 修复指南
10
+
11
+ ## 🐛 Bug 信息
12
+
13
+ **错误信息**:
14
+ \`\`\`
15
+ {error_message}
16
+ \`\`\`
17
+
18
+ {stack_trace_section}
19
+
20
+ {reproduce_section}
21
+
22
+ {behavior_section}
23
+
24
+ ---
25
+
26
+ ## 📍 阶段 1: 问题定位
27
+
28
+ ### 步骤 1.1: 分析错误信息
29
+
30
+ 1. **识别错误类型**:
31
+ - 语法错误(SyntaxError)
32
+ - 运行时错误(TypeError, ReferenceError, RangeError)
33
+ - 逻辑错误(结果不符合预期)
34
+ - 异步错误(Promise rejection, 回调异常)
35
+
36
+ 2. **提取关键信息**:
37
+ - 错误名称: [从错误信息中提取]
38
+ - 错误消息: [具体描述]
39
+ - 发生位置: [文件:行号]
40
+
41
+ ### 步骤 1.2: 分析堆栈跟踪
42
+
43
+ **操作**:
44
+ 1. 找到堆栈中第一个项目文件(排除 node_modules)
45
+ 2. 追踪调用链,理解执行流程
46
+ 3. 记录所有相关的项目文件
47
+
48
+ **相关文件列表**:
49
+ | 文件 | 行号 | 函数/方法 |
50
+ |------|------|-----------|
51
+ | [文件路径] | [行号] | [函数名] |
52
+
53
+ ### 步骤 1.3: 读取相关代码
54
+
55
+ **操作**: 读取以下文件并分析:
56
+ - 错误发生的文件
57
+ - 调用链上的文件
58
+ - 相关的配置文件
59
+ - 相关的测试文件(如有)
60
+
61
+ ### 📋 定位结论
62
+
63
+ | 项目 | 内容 |
64
+ |------|------|
65
+ | 问题文件 | [文件路径] |
66
+ | 问题位置 | 第 X 行 |
67
+ | 问题代码 | \`[代码片段]\` |
68
+ | 触发条件 | [什么情况下触发] |
69
+
70
+ ---
71
+
72
+ ## 🔍 阶段 2: 原因分析
73
+
74
+ ### 步骤 2.1: 5 Whys 分析
75
+
76
+ 使用 5 Whys 方法深入分析根本原因:
77
+
78
+ 1. **Why 1**: 为什么会出现这个错误?
79
+ - [答案]
80
+
81
+ 2. **Why 2**: 为什么会 [Why 1 的答案]?
82
+ - [答案]
83
+
84
+ 3. **Why 3**: 为什么会 [Why 2 的答案]?
85
+ - [答案]
86
+
87
+ 4. **Why 4**: 为什么会 [Why 3 的答案]?
88
+ - [答案]
89
+
90
+ 5. **Why 5**: 为什么会 [Why 4 的答案]?
91
+ - [答案]
92
+
93
+ ### 步骤 2.2: 代码逻辑分析
94
+
95
+ 1. **数据流分析**: 追踪数据从输入到出错位置的流动
96
+ 2. **状态分析**: 检查相关变量/状态在出错时的值
97
+ 3. **边界条件**: 检查是否处理了所有边界情况
98
+ 4. **异常处理**: 检查是否有适当的错误处理
99
+
100
+ ### 📋 分析结论
101
+
102
+ | 项目 | 内容 |
103
+ |------|------|
104
+ | 直接原因 | [直接导致错误的原因] |
105
+ | 根本原因 | [深层次的原因] |
106
+ | 触发条件 | [什么情况下会触发] |
107
+ | 影响范围 | [受影响的功能/模块] |
108
+
109
+ ---
110
+
111
+ ## 🔧 阶段 3: 修复方案
112
+
113
+ ### 步骤 3.1: 设计修复方案
114
+
115
+ **方案 A**: [方案描述]
116
+ - 修改内容: [具体修改]
117
+ - 优点: [优点]
118
+ - 缺点: [缺点]
119
+ - 风险: [潜在风险]
120
+
121
+ **方案 B**: [备选方案描述]
122
+ - 修改内容: [具体修改]
123
+ - 优点: [优点]
124
+ - 缺点: [缺点]
125
+ - 风险: [潜在风险]
126
+
127
+ **选择方案**: [选择的方案]
128
+ **选择理由**: [为什么选择这个方案]
129
+
130
+ ### 步骤 3.2: 影响范围评估
131
+
132
+ | 影响项 | 说明 |
133
+ |--------|------|
134
+ | 修改文件 | [文件列表] |
135
+ | 影响功能 | [功能列表] |
136
+ | 需要测试 | [测试范围] |
137
+ | 是否需要回归 | [是/否] |
138
+
139
+ ### 步骤 3.3: 实施修复
140
+
141
+ **修改文件**: \`[文件路径]\`
142
+
143
+ **修改前**:
144
+ \`\`\`
145
+ [原代码]
146
+ \`\`\`
147
+
148
+ **修改后**:
149
+ \`\`\`
150
+ [新代码]
151
+ \`\`\`
152
+
153
+ **修改说明**: [解释修改的原因和逻辑]
154
+
155
+ ---
156
+
157
+ ## ✅ 阶段 4: 验证测试
158
+
159
+ ### 步骤 4.1: 单元测试
160
+
161
+ 为修复编写针对性的单元测试:
162
+
163
+ \`\`\`typescript
164
+ describe('[功能描述]', () => {
165
+ // 测试正常情况
166
+ it('should [正常行为描述]', () => {
167
+ // 测试代码
168
+ });
169
+
170
+ // 测试修复的 Bug 场景
171
+ it('should handle [Bug 场景]', () => {
172
+ // 测试代码 - 确保 Bug 已修复
173
+ });
174
+
175
+ // 测试边界情况
176
+ it('should handle [边界情况]', () => {
177
+ // 边界测试
178
+ });
179
+ });
180
+ \`\`\`
181
+
182
+ ### 步骤 4.2: 手动验证
183
+
184
+ 1. [ ] 按原复现步骤验证问题已修复
185
+ 2. [ ] 验证正常流程不受影响
186
+ 3. [ ] 验证边界情况处理正确
187
+ 4. [ ] 验证错误处理正确
188
+
189
+ ### 步骤 4.3: 回归测试
190
+
191
+ 1. [ ] 运行相关模块的测试
192
+ 2. [ ] 运行全量测试(如有 CI)
193
+ 3. [ ] 检查是否引入新问题
194
+
195
+ ---
196
+
197
+ ## 📋 修复检查清单
198
+
199
+ ### 定位阶段
200
+ - [ ] 错误类型已识别
201
+ - [ ] 问题代码已定位
202
+ - [ ] 相关文件已读取
203
+
204
+ ### 分析阶段
205
+ - [ ] 5 Whys 分析已完成
206
+ - [ ] 根本原因已确定
207
+ - [ ] 影响范围已评估
208
+
209
+ ### 修复阶段
210
+ - [ ] 修复方案已设计
211
+ - [ ] 代码修改已完成
212
+ - [ ] 修改已解释清楚
213
+
214
+ ### 验证阶段
215
+ - [ ] 单元测试已添加
216
+ - [ ] 手动验证已通过
217
+ - [ ] 回归测试已通过
218
+
219
+ ### 提交阶段
220
+ - [ ] 代码已提交
221
+ - [ ] Commit message 清晰描述了修复内容
222
+
223
+ ---
224
+
225
+ ## 📝 修复总结
226
+
227
+ 完成修复后,填写以下总结:
228
+
229
+ | 项目 | 内容 |
230
+ |------|------|
231
+ | Bug 描述 | [简述] |
232
+ | 根本原因 | [原因] |
233
+ | 修复方案 | [方案] |
234
+ | 修改文件 | [文件列表] |
235
+ | 测试覆盖 | [测试情况] |
236
+ | 修复时间 | [耗时] |
237
+
238
+ ---
239
+
240
+ ## 💡 经验教训
241
+
242
+ 记录本次 Bug 的经验教训,避免类似问题:
243
+
244
+ 1. **代码层面**: [如何避免写出类似 Bug]
245
+ 2. **测试层面**: [应该增加什么测试]
246
+ 3. **流程层面**: [流程上如何改进]
247
+
248
+ ---
249
+
250
+ *指南版本: 1.0.0*
251
+ *工具: MCP Probe Kit - fix_bug*
252
+ `;
253
+ /**
254
+ * fix_bug 工具实现
255
+ */
256
+ export async function fixBug(args) {
257
+ try {
258
+ const errorMessage = args?.error_message;
259
+ if (!errorMessage) {
260
+ throw new Error("缺少必填参数: error_message(错误信息)");
261
+ }
262
+ const stackTrace = args?.stack_trace || "";
263
+ const stepsToReproduce = args?.steps_to_reproduce || "";
264
+ const expectedBehavior = args?.expected_behavior || "";
265
+ const actualBehavior = args?.actual_behavior || "";
266
+ // 构建可选部分
267
+ const stackTraceSection = stackTrace
268
+ ? `**堆栈跟踪**:\n\`\`\`\n${stackTrace}\n\`\`\``
269
+ : "**堆栈跟踪**: 未提供(建议提供以便更准确定位)";
270
+ const reproduceSection = stepsToReproduce
271
+ ? `**复现步骤**:\n${stepsToReproduce}`
272
+ : "";
273
+ let behaviorSection = "";
274
+ if (expectedBehavior || actualBehavior) {
275
+ behaviorSection = [
276
+ expectedBehavior ? `**期望行为**: ${expectedBehavior}` : "",
277
+ actualBehavior ? `**实际行为**: ${actualBehavior}` : "",
278
+ ]
279
+ .filter(Boolean)
280
+ .join("\n\n");
281
+ }
282
+ const guide = PROMPT_TEMPLATE
283
+ .replace(/{error_message}/g, errorMessage)
284
+ .replace(/{stack_trace_section}/g, stackTraceSection)
285
+ .replace(/{reproduce_section}/g, reproduceSection)
286
+ .replace(/{behavior_section}/g, behaviorSection);
287
+ return {
288
+ content: [{ type: "text", text: guide }],
289
+ };
290
+ }
291
+ catch (error) {
292
+ const errorMsg = error instanceof Error ? error.message : String(error);
293
+ return {
294
+ content: [{ type: "text", text: `❌ 生成修复指南失败: ${errorMsg}` }],
295
+ isError: true,
296
+ };
297
+ }
298
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * gen_mock 工具
3
+ *
4
+ * 功能:根据数据结构生成 Mock 数据
5
+ * 模式:指令生成器模式 - 返回生成指南,由 AI 执行实际生成
6
+ */
7
+ /**
8
+ * gen_mock 工具实现
9
+ */
10
+ export declare function genMock(args: any): Promise<{
11
+ content: {
12
+ type: string;
13
+ text: string;
14
+ }[];
15
+ isError?: undefined;
16
+ } | {
17
+ content: {
18
+ type: string;
19
+ text: string;
20
+ }[];
21
+ isError: boolean;
22
+ }>;
@@ -0,0 +1,250 @@
1
+ /**
2
+ * gen_mock 工具
3
+ *
4
+ * 功能:根据数据结构生成 Mock 数据
5
+ * 模式:指令生成器模式 - 返回生成指南,由 AI 执行实际生成
6
+ */
7
+ const PROMPT_TEMPLATE = `# Mock 数据生成指南
8
+
9
+ ## 🎯 生成目标
10
+
11
+ **数据结构**:
12
+ \`\`\`
13
+ {schema}
14
+ \`\`\`
15
+
16
+ **生成配置**:
17
+ - 数量: {count} 条
18
+ - 格式: {format}
19
+ - 语言: {locale}
20
+ {seed_section}
21
+
22
+ ---
23
+
24
+ ## 📋 生成步骤
25
+
26
+ ### 步骤 1: 解析数据结构
27
+
28
+ 分析输入的数据结构,识别:
29
+ 1. 字段名称和类型
30
+ 2. 必填/可选字段(?标记)
31
+ 3. 嵌套结构
32
+ 4. 数组类型
33
+
34
+ ### 步骤 2: 字段语义识别
35
+
36
+ 根据字段名自动匹配语义,生成符合语义的数据:
37
+
38
+ | 字段名模式 | 生成规则 | 中文示例 | 英文示例 |
39
+ |------------|----------|----------|----------|
40
+ | id, _id | UUID/自增ID | uuid-xxx | uuid-xxx |
41
+ | name, 姓名 | 人名 | 张三、李四 | John Doe |
42
+ | email, 邮箱 | 邮箱格式 | zhangsan@example.com | john@example.com |
43
+ | phone, mobile, 手机 | 手机号 | 138xxxx1234 | +1-xxx-xxx-xxxx |
44
+ | avatar, 头像 | 图片URL | https://api.dicebear.com/... | |
45
+ | address, 地址 | 地址 | 北京市朝阳区xxx | 123 Main St |
46
+ | city, 城市 | 城市名 | 北京、上海 | New York |
47
+ | country, 国家 | 国家名 | 中国 | United States |
48
+ | date, 日期 | 日期 | 2024-01-15 | 2024-01-15 |
49
+ | createdAt, created_at | 过去时间 | 2024-01-01T10:00:00Z | |
50
+ | updatedAt, updated_at | 最近时间 | 2024-01-15T15:30:00Z | |
51
+ | title, 标题 | 短句 | 这是一个标题 | A Sample Title |
52
+ | description, desc, 描述 | 段落 | 这是描述内容... | Lorem ipsum... |
53
+ | content, 内容 | 长文本 | 文章内容... | Article content... |
54
+ | price, 价格 | 金额 | 99.00 | 99.00 |
55
+ | amount, 数量 | 整数 | 10 | 10 |
56
+ | status, 状态 | 枚举 | active/inactive | active/inactive |
57
+ | type, 类型 | 枚举 | 根据上下文 | |
58
+ | url, 链接 | URL | https://example.com | |
59
+ | image, 图片 | 图片URL | https://picsum.photos/... | |
60
+ | age, 年龄 | 18-60 | 25 | 25 |
61
+ | gender, 性别 | 性别 | 男/女 | male/female |
62
+ | username, 用户名 | 用户名 | user_123 | user_123 |
63
+ | password, 密码 | 密码占位 | ******** | ******** |
64
+ | token | Token | tok_xxx | tok_xxx |
65
+ | code, 编码 | 编码 | CODE001 | CODE001 |
66
+ | sort, order, 排序 | 序号 | 1, 2, 3 | 1, 2, 3 |
67
+ | enabled, active | 布尔 | true/false | true/false |
68
+ | tags, 标签 | 标签数组 | ["标签1", "标签2"] | ["tag1", "tag2"] |
69
+
70
+ ### 步骤 3: 类型映射
71
+
72
+ 基础类型的默认生成规则:
73
+
74
+ | 类型 | 生成规则 |
75
+ |------|----------|
76
+ | string | 根据字段名语义,或随机字符串 |
77
+ | number | 1-100 的随机整数 |
78
+ | boolean | true/false 随机 |
79
+ | Date | 最近30天内的随机时间 |
80
+ | string[] | 3-5个随机字符串 |
81
+ | number[] | 3-5个随机数字 |
82
+ | enum | 从枚举值中随机选择 |
83
+ | union | 从联合类型中随机选择 |
84
+
85
+ ### 步骤 4: 生成数据
86
+
87
+ 根据识别结果生成 {count} 条数据。
88
+
89
+ **注意事项**:
90
+ - 确保数据多样性,避免重复
91
+ - 数值类型保持合理范围
92
+ - 日期类型保持合理顺序(createdAt < updatedAt)
93
+ - 关联字段保持一致性
94
+
95
+ ---
96
+
97
+ ## 📊 输出格式
98
+
99
+ ### JSON 格式
100
+ \`\`\`json
101
+ [
102
+ {
103
+ "field1": "value1",
104
+ "field2": 123
105
+ }
106
+ ]
107
+ \`\`\`
108
+
109
+ ### TypeScript 格式
110
+ \`\`\`typescript
111
+ const mockData: YourType[] = [
112
+ {
113
+ field1: "value1",
114
+ field2: 123
115
+ }
116
+ ];
117
+
118
+ export default mockData;
119
+ \`\`\`
120
+
121
+ ### JavaScript 格式
122
+ \`\`\`javascript
123
+ const mockData = [
124
+ {
125
+ field1: "value1",
126
+ field2: 123
127
+ }
128
+ ];
129
+
130
+ module.exports = mockData;
131
+ \`\`\`
132
+
133
+ ### CSV 格式(仅扁平数据)
134
+ \`\`\`csv
135
+ field1,field2
136
+ value1,123
137
+ \`\`\`
138
+
139
+ ---
140
+
141
+ ## 🔧 高级功能
142
+
143
+ ### 自定义规则
144
+
145
+ 在 schema 注释中指定规则:
146
+
147
+ \`\`\`typescript
148
+ interface User {
149
+ id: string; // UUID
150
+ age: number; // range: 18-60
151
+ status: string; // enum: active, inactive, pending
152
+ score: number; // range: 0-100, decimal: 2
153
+ tags: string[]; // count: 3-5
154
+ level: number; // enum: 1, 2, 3
155
+ }
156
+ \`\`\`
157
+
158
+ ### 关联数据
159
+
160
+ 生成有关联关系的数据:
161
+
162
+ \`\`\`json
163
+ // 先生成 users
164
+ [
165
+ { "id": "user-1", "name": "张三" },
166
+ { "id": "user-2", "name": "李四" }
167
+ ]
168
+
169
+ // 再生成 orders,引用 user_id
170
+ [
171
+ { "id": "order-1", "user_id": "user-1", "amount": 100 },
172
+ { "id": "order-2", "user_id": "user-2", "amount": 200 }
173
+ ]
174
+ \`\`\`
175
+
176
+ ### 固定值
177
+
178
+ 某些字段使用固定值:
179
+
180
+ \`\`\`typescript
181
+ interface Config {
182
+ version: string; // fixed: "1.0.0"
183
+ env: string; // fixed: "development"
184
+ }
185
+ \`\`\`
186
+
187
+ ---
188
+
189
+ ## ✅ 生成检查清单
190
+
191
+ - [ ] 数据结构已正确解析
192
+ - [ ] 字段语义已识别
193
+ - [ ] 数据类型正确
194
+ - [ ] 数量符合要求: {count} 条
195
+ - [ ] 格式正确: {format}
196
+ - [ ] 语言符合设置: {locale}
197
+ - [ ] 数据具有多样性
198
+ - [ ] 关联数据一致(如有)
199
+
200
+ ---
201
+
202
+ *指南版本: 1.0.0*
203
+ *工具: MCP Probe Kit - gen_mock*
204
+ `;
205
+ /**
206
+ * gen_mock 工具实现
207
+ */
208
+ export async function genMock(args) {
209
+ try {
210
+ const schema = args?.schema;
211
+ if (!schema) {
212
+ throw new Error("缺少必填参数: schema(数据结构定义)");
213
+ }
214
+ const count = args?.count || 1;
215
+ const format = args?.format || "json";
216
+ const locale = args?.locale || "zh-CN";
217
+ const seed = args?.seed;
218
+ if (count < 1 || count > 1000) {
219
+ throw new Error("count 参数必须在 1-1000 之间");
220
+ }
221
+ const formatMap = {
222
+ json: "JSON",
223
+ typescript: "TypeScript",
224
+ javascript: "JavaScript",
225
+ csv: "CSV",
226
+ };
227
+ const localeMap = {
228
+ "zh-CN": "中文(简体)",
229
+ "en-US": "英文(美国)",
230
+ "ja-JP": "日文",
231
+ };
232
+ const seedSection = seed ? `- 随机种子: ${seed}(可重复生成)` : "";
233
+ const guide = PROMPT_TEMPLATE
234
+ .replace(/{schema}/g, schema)
235
+ .replace(/{count}/g, String(count))
236
+ .replace(/{format}/g, formatMap[format] || format)
237
+ .replace(/{locale}/g, localeMap[locale] || locale)
238
+ .replace(/{seed_section}/g, seedSection);
239
+ return {
240
+ content: [{ type: "text", text: guide }],
241
+ };
242
+ }
243
+ catch (error) {
244
+ const errorMsg = error instanceof Error ? error.message : String(error);
245
+ return {
246
+ content: [{ type: "text", text: `❌ Mock 数据生成失败: ${errorMsg}` }],
247
+ isError: true,
248
+ };
249
+ }
250
+ }
@@ -22,3 +22,18 @@ export { cssOrder } from "./css_order.js";
22
22
  export { genreadme } from "./genreadme.js";
23
23
  export { split } from "./split.js";
24
24
  export { analyzeProject } from "./analyze_project.js";
25
+ export { initProjectContext } from "./init_project_context.js";
26
+ export { addFeature } from "./add_feature.js";
27
+ export { securityScan } from "./security_scan.js";
28
+ export { fixBug } from "./fix_bug.js";
29
+ export { estimate } from "./estimate.js";
30
+ export { genMock } from "./gen_mock.js";
31
+ export { design2code } from "./design2code.js";
32
+ export { startFeature } from "./start_feature.js";
33
+ export { startBugfix } from "./start_bugfix.js";
34
+ export { startReview } from "./start_review.js";
35
+ export { startRelease } from "./start_release.js";
36
+ export { startRefactor } from "./start_refactor.js";
37
+ export { startOnboard } from "./start_onboard.js";
38
+ export { startApi } from "./start_api.js";
39
+ export { startDoc } from "./start_doc.js";
@@ -22,3 +22,19 @@ export { cssOrder } from "./css_order.js";
22
22
  export { genreadme } from "./genreadme.js";
23
23
  export { split } from "./split.js";
24
24
  export { analyzeProject } from "./analyze_project.js";
25
+ export { initProjectContext } from "./init_project_context.js";
26
+ export { addFeature } from "./add_feature.js";
27
+ export { securityScan } from "./security_scan.js";
28
+ export { fixBug } from "./fix_bug.js";
29
+ export { estimate } from "./estimate.js";
30
+ export { genMock } from "./gen_mock.js";
31
+ export { design2code } from "./design2code.js";
32
+ // 智能编排工具
33
+ export { startFeature } from "./start_feature.js";
34
+ export { startBugfix } from "./start_bugfix.js";
35
+ export { startReview } from "./start_review.js";
36
+ export { startRelease } from "./start_release.js";
37
+ export { startRefactor } from "./start_refactor.js";
38
+ export { startOnboard } from "./start_onboard.js";
39
+ export { startApi } from "./start_api.js";
40
+ export { startDoc } from "./start_doc.js";