mcp-probe-kit 1.7.0 → 1.8.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/build/index.js +112 -83
- package/build/tools/code_review.js +33 -0
- package/build/tools/convert.js +9 -0
- package/build/tools/debug.js +41 -0
- package/build/tools/design2code.js +9 -0
- package/build/tools/estimate.js +41 -9
- package/build/tools/explain.js +8 -0
- package/build/tools/fix_bug.js +44 -0
- package/build/tools/gen_skill.d.ts +16 -0
- package/build/tools/gen_skill.js +543 -0
- package/build/tools/genapi.js +10 -1
- package/build/tools/genchangelog.js +9 -1
- package/build/tools/gendoc.js +9 -0
- package/build/tools/genpr.js +8 -0
- package/build/tools/gentest.js +9 -0
- package/build/tools/genui.js +9 -0
- package/build/tools/index.d.ts +1 -0
- package/build/tools/index.js +1 -0
- package/build/tools/perf.js +37 -0
- package/build/tools/refactor.js +9 -0
- package/build/tools/security_scan.js +35 -9
- package/build/tools/split.js +9 -0
- package/package.json +2 -2
package/build/tools/perf.js
CHANGED
|
@@ -334,6 +334,43 @@ console.log(\`耗时: \${end - start}ms\`);
|
|
|
334
334
|
|
|
335
335
|
---
|
|
336
336
|
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 📤 输出格式要求
|
|
340
|
+
|
|
341
|
+
请严格按以下 JSON 格式输出分析结果:
|
|
342
|
+
|
|
343
|
+
\`\`\`json
|
|
344
|
+
{
|
|
345
|
+
"summary": "性能评估总结(一句话)",
|
|
346
|
+
"overall_score": 70,
|
|
347
|
+
"bottlenecks": [
|
|
348
|
+
{
|
|
349
|
+
"type": "algorithm|memory|io|render|database",
|
|
350
|
+
"severity": "critical|high|medium|low",
|
|
351
|
+
"location": { "file": "文件路径", "line": 25 },
|
|
352
|
+
"current_complexity": "O(n²)",
|
|
353
|
+
"evidence": "问题证据描述",
|
|
354
|
+
"fix": "优化建议",
|
|
355
|
+
"expected_improvement": "70%",
|
|
356
|
+
"fix_example": "优化后代码示例"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"metrics": {
|
|
360
|
+
"time_complexity": "O(n²)",
|
|
361
|
+
"space_complexity": "O(n)",
|
|
362
|
+
"potential_improvement": "60-80%"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
\`\`\`
|
|
366
|
+
|
|
367
|
+
## ⚠️ 边界约束
|
|
368
|
+
|
|
369
|
+
- ❌ 仅分析,不自动修改代码
|
|
370
|
+
- ❌ 不执行性能测试(仅静态分析)
|
|
371
|
+
- ❌ 不做精确的性能数值预测
|
|
372
|
+
- ✅ 输出结构化瓶颈清单和优化建议
|
|
373
|
+
|
|
337
374
|
现在请分析代码,提供详细的性能优化建议。`;
|
|
338
375
|
return {
|
|
339
376
|
content: [
|
package/build/tools/refactor.js
CHANGED
|
@@ -231,15 +231,41 @@ logger.info("API call with token:", maskToken(apiToken))
|
|
|
231
231
|
|
|
232
232
|
---
|
|
233
233
|
|
|
234
|
-
##
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
## 📤 输出格式要求
|
|
235
|
+
|
|
236
|
+
请严格按以下 JSON 格式输出扫描结果:
|
|
237
|
+
|
|
238
|
+
\`\`\`json
|
|
239
|
+
{
|
|
240
|
+
"scan_summary": {
|
|
241
|
+
"total_issues": 5,
|
|
242
|
+
"critical": 1,
|
|
243
|
+
"high": 2,
|
|
244
|
+
"medium": 1,
|
|
245
|
+
"low": 1
|
|
246
|
+
},
|
|
247
|
+
"findings": [
|
|
248
|
+
{
|
|
249
|
+
"severity": "critical|high|medium|low|info",
|
|
250
|
+
"type": "漏洞类型(如 SQL Injection)",
|
|
251
|
+
"cwe": "CWE-89",
|
|
252
|
+
"location": { "file": "文件路径", "line": 42 },
|
|
253
|
+
"vulnerable_code": "问题代码片段",
|
|
254
|
+
"exploit_scenario": "攻击场景描述",
|
|
255
|
+
"fix": "修复建议",
|
|
256
|
+
"fix_example": "修复代码示例"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"recommendations": ["安全最佳实践建议1", "建议2"]
|
|
260
|
+
}
|
|
261
|
+
\`\`\`
|
|
262
|
+
|
|
263
|
+
## ⚠️ 边界约束
|
|
264
|
+
|
|
265
|
+
- ❌ 仅分析代码,不执行任何操作
|
|
266
|
+
- ❌ 不做法律/归因结论
|
|
267
|
+
- ❌ 不保证发现所有漏洞(静态分析有局限性)
|
|
268
|
+
- ✅ 输出结构化风险清单和修复建议
|
|
243
269
|
|
|
244
270
|
---
|
|
245
271
|
|
package/build/tools/split.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "AI Development Enhancement Toolkit - MCP Server with
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "AI Development Enhancement Toolkit - MCP Server with 40 practical tools (32 basic + 8 orchestration) for code quality, development efficiency, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"bin": {
|