mcp-probe-kit 3.0.23 → 3.1.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 (141) hide show
  1. package/README.md +755 -779
  2. package/build/index.js +38 -40
  3. package/build/lib/__tests__/memory-injection.unit.test.js +1 -0
  4. package/build/lib/agents-md-template.js +32 -32
  5. package/build/lib/memory-client.d.ts +2 -0
  6. package/build/lib/memory-client.js +1 -0
  7. package/build/lib/memory-config.d.ts +2 -0
  8. package/build/lib/memory-config.js +1 -0
  9. package/build/lib/memory-orchestration.d.ts +4 -0
  10. package/build/lib/memory-orchestration.js +28 -5
  11. package/build/lib/skill-bridge.js +12 -12
  12. package/build/resources/index.d.ts +4 -0
  13. package/build/resources/index.js +4 -0
  14. package/build/resources/tool-params-guide.d.ts +571 -0
  15. package/build/resources/tool-params-guide.js +488 -0
  16. package/build/resources/ui-ux-data/guidelines/vercel-web-interface.json +1632 -1632
  17. package/build/resources/ui-ux-data/metadata.json +30 -30
  18. package/build/resources/ui-ux-data/shadcn/blocks.json +2541 -2541
  19. package/build/resources/ui-ux-data/shadcn/components.json +997 -997
  20. package/build/resources/ui-ux-data/themes/presets.json +483 -483
  21. package/build/schemas/index.d.ts +0 -22
  22. package/build/schemas/memory-tools.d.ts +0 -22
  23. package/build/schemas/memory-tools.js +0 -14
  24. package/build/tools/__tests__/read_memory_asset.unit.test.js +75 -0
  25. package/build/tools/__tests__/search_memory.unit.test.js +7 -1
  26. package/build/tools/analyze_project.d.ts +1 -0
  27. package/build/tools/analyze_project.js +527 -0
  28. package/build/tools/check_deps.d.ts +13 -0
  29. package/build/tools/check_deps.js +204 -0
  30. package/build/tools/code_insight.js +41 -41
  31. package/build/tools/convert.d.ts +13 -0
  32. package/build/tools/convert.js +599 -0
  33. package/build/tools/css_order.d.ts +13 -0
  34. package/build/tools/css_order.js +81 -0
  35. package/build/tools/debug.d.ts +13 -0
  36. package/build/tools/debug.js +131 -0
  37. package/build/tools/design2code.d.ts +20 -0
  38. package/build/tools/design2code.js +426 -0
  39. package/build/tools/detect_shell.d.ts +6 -0
  40. package/build/tools/detect_shell.js +151 -0
  41. package/build/tools/explain.d.ts +13 -0
  42. package/build/tools/explain.js +390 -0
  43. package/build/tools/fix.d.ts +13 -0
  44. package/build/tools/fix.js +303 -0
  45. package/build/tools/fix_bug.js +161 -161
  46. package/build/tools/gen_mock.d.ts +22 -0
  47. package/build/tools/gen_mock.js +269 -0
  48. package/build/tools/gen_skill.d.ts +13 -0
  49. package/build/tools/gen_skill.js +560 -0
  50. package/build/tools/genapi.d.ts +13 -0
  51. package/build/tools/genapi.js +174 -0
  52. package/build/tools/genchangelog.d.ts +13 -0
  53. package/build/tools/genchangelog.js +250 -0
  54. package/build/tools/gencommit.js +60 -60
  55. package/build/tools/gendoc.d.ts +13 -0
  56. package/build/tools/gendoc.js +232 -0
  57. package/build/tools/genpr.d.ts +13 -0
  58. package/build/tools/genpr.js +194 -0
  59. package/build/tools/genreadme.d.ts +13 -0
  60. package/build/tools/genreadme.js +626 -0
  61. package/build/tools/gensql.d.ts +13 -0
  62. package/build/tools/gensql.js +320 -0
  63. package/build/tools/genui.d.ts +13 -0
  64. package/build/tools/genui.js +803 -0
  65. package/build/tools/index.d.ts +0 -1
  66. package/build/tools/index.js +0 -1
  67. package/build/tools/init_component_catalog.d.ts +22 -0
  68. package/build/tools/init_component_catalog.js +809 -0
  69. package/build/tools/init_project_context.js +432 -432
  70. package/build/tools/init_setting.d.ts +13 -0
  71. package/build/tools/init_setting.js +47 -0
  72. package/build/tools/perf.d.ts +13 -0
  73. package/build/tools/perf.js +409 -0
  74. package/build/tools/read_memory_asset.js +2 -1
  75. package/build/tools/render_ui.d.ts +22 -0
  76. package/build/tools/render_ui.js +384 -0
  77. package/build/tools/resolve_conflict.d.ts +13 -0
  78. package/build/tools/resolve_conflict.js +349 -0
  79. package/build/tools/search_memory.js +1 -0
  80. package/build/tools/security_scan.d.ts +22 -0
  81. package/build/tools/security_scan.js +323 -0
  82. package/build/tools/split.d.ts +13 -0
  83. package/build/tools/split.js +599 -0
  84. package/build/tools/start_api.d.ts +13 -0
  85. package/build/tools/start_api.js +193 -0
  86. package/build/tools/start_bugfix.js +233 -233
  87. package/build/tools/start_doc.d.ts +13 -0
  88. package/build/tools/start_doc.js +207 -0
  89. package/build/tools/start_feature.js +117 -117
  90. package/build/tools/start_product.js +1 -1
  91. package/build/tools/start_refactor.d.ts +13 -0
  92. package/build/tools/start_refactor.js +188 -0
  93. package/build/tools/start_release.d.ts +13 -0
  94. package/build/tools/start_release.js +167 -0
  95. package/build/tools/start_review.d.ts +13 -0
  96. package/build/tools/start_review.js +175 -0
  97. package/build/tools/start_ui.js +399 -399
  98. package/build/tools/ui-ux-tools.js +290 -290
  99. package/build/utils/__tests__/vercel-guidelines-sync.unit.test.js +12 -12
  100. package/build/utils/themes-sync.js +8 -8
  101. package/package.json +81 -83
  102. package/build/lib/__tests__/memory-orchestration.unit.test.js +0 -84
  103. package/build/lib/__tests__/memory-payload.unit.test.js +0 -35
  104. package/build/lib/cursor-history-client.d.ts +0 -54
  105. package/build/lib/cursor-history-client.js +0 -240
  106. package/build/tools/__tests__/cursor-history.unit.test.js +0 -38
  107. package/build/tools/cursor_read_conversation.d.ts +0 -7
  108. package/build/tools/cursor_read_conversation.js +0 -36
  109. package/docs/.mcp-probe/layout.json +0 -11
  110. package/docs/CNAME +0 -1
  111. package/docs/assets/font/MaterialSymbolsOutlined.codepoints +0 -4102
  112. package/docs/assets/font/MaterialSymbolsOutlined.ttf +0 -0
  113. package/docs/assets/font/noto-sans-sc-400.ttf +0 -0
  114. package/docs/assets/font/noto-sans-sc-700.ttf +0 -0
  115. package/docs/assets/font/noto-sans-sc-900.ttf +0 -0
  116. package/docs/assets/js/i18n.js +0 -375
  117. package/docs/assets/js/tailwind.js +0 -83
  118. package/docs/assets/logo-zh.png +0 -0
  119. package/docs/assets/logo.png +0 -0
  120. package/docs/data/tools.js +0 -523
  121. package/docs/i18n/all-tools/en.json +0 -190
  122. package/docs/i18n/all-tools/ja.json +0 -171
  123. package/docs/i18n/all-tools/ko.json +0 -171
  124. package/docs/i18n/all-tools/zh-CN.json +0 -190
  125. package/docs/i18n/en.json +0 -626
  126. package/docs/i18n/ja.json +0 -602
  127. package/docs/i18n/ko.json +0 -602
  128. package/docs/i18n/zh-CN.json +0 -626
  129. package/docs/index.html +0 -327
  130. package/docs/memory-local-setup.md +0 -314
  131. package/docs/memory-local-setup.zh-CN.md +0 -283
  132. package/docs/pages/all-tools.html +0 -515
  133. package/docs/pages/examples.html +0 -717
  134. package/docs/pages/getting-started.html +0 -964
  135. package/docs/pages/migration.html +0 -308
  136. package/docs/specs/user-auth/design.md +0 -82
  137. package/docs/specs/user-auth/requirements.md +0 -52
  138. package/docs/specs/user-auth/tasks.md +0 -55
  139. /package/build/{lib/__tests__/memory-orchestration.unit.test.d.ts → tools/__tests__/read_memory_asset.unit.test.d.ts} +0 -0
  140. /package/build/{lib/__tests__/memory-payload.unit.test.d.ts → utils/design-docs-generator.d.ts} +0 -0
  141. /package/build/{tools/__tests__/cursor-history.unit.test.d.ts → utils/design-docs-generator.js} +0 -0
@@ -0,0 +1,204 @@
1
+ // check_deps 工具实现(无参数)
2
+ export async function checkDeps(_args) {
3
+ try {
4
+ const message = `请分析项目依赖的健康状况:
5
+
6
+ ---
7
+
8
+ ## 依赖分析步骤
9
+
10
+ ### 第一步:获取依赖信息
11
+
12
+ 执行以下命令:
13
+ \`\`\`bash
14
+ # 查看 package.json
15
+ cat package.json
16
+
17
+ # 检查过期依赖
18
+ npm outdated
19
+
20
+ # 检查安全漏洞
21
+ npm audit
22
+
23
+ # 查看依赖树
24
+ npm list --depth=0
25
+
26
+ # 分析包大小
27
+ npm ls --prod --parseable | xargs du -sh
28
+ \`\`\`
29
+
30
+ ### 第二步:依赖健康度检查
31
+
32
+ **1️⃣ 版本检查**
33
+
34
+ 检查项:
35
+ - [ ] 依赖版本是否过旧(> 1 年未更新)
36
+ - [ ] 是否有 Major 版本更新可用
37
+ - [ ] 是否使用了废弃的包
38
+ - [ ] 版本锁定策略(^、~、固定版本)
39
+
40
+ **2️⃣ 安全漏洞检查**
41
+
42
+ 分析 \`npm audit\` 结果:
43
+ - 🔴 Critical:立即修复
44
+ - 🟠 High:尽快修复
45
+ - 🟡 Moderate:计划修复
46
+ - 🟢 Low:可选修复
47
+
48
+ **3️⃣ 依赖体积分析**
49
+
50
+ 检查项:
51
+ - [ ] 单个依赖是否过大(> 10MB)
52
+ - [ ] 是否有轻量级替代方案
53
+ - [ ] Tree-shaking 优化机会
54
+ - [ ] 是否可以按需导入
55
+
56
+ **4️⃣ 依赖健康度评估**
57
+
58
+ 评估指标:
59
+ - 维护状态(活跃/停止维护)
60
+ - 社区活跃度(GitHub Stars/Issues)
61
+ - 发布频率
62
+ - 文档质量
63
+ - TypeScript 支持
64
+
65
+ **5️⃣ 未使用依赖检查**
66
+
67
+ 查找方法:
68
+ \`\`\`bash
69
+ # 使用 depcheck
70
+ npx depcheck
71
+
72
+ # 手动检查
73
+ grep -r "from 'package-name'" src/
74
+ \`\`\`
75
+
76
+ ---
77
+
78
+ ## 依赖分析报告
79
+
80
+ ### 📊 依赖统计
81
+
82
+ **总体情况**:
83
+ - Dependencies: X 个
84
+ - DevDependencies: Y 个
85
+ - 总大小: Z MB
86
+
87
+ **版本分布**:
88
+ - 最新版本: X 个
89
+ - 需要更新: Y 个
90
+ - 已废弃: Z 个
91
+
92
+ ### 🔴 严重问题
93
+
94
+ **安全漏洞**:
95
+ 1. **package-name@version**
96
+ - 漏洞等级:Critical
97
+ - CVE 编号:CVE-2024-XXXX
98
+ - 影响:...
99
+ - 修复方案:升级到 version X.X.X
100
+ - 命令:\`npm install package-name@X.X.X\`
101
+
102
+ **废弃包**:
103
+ 1. **package-name**
104
+ - 状态:已停止维护
105
+ - 最后更新:2020-01-01
106
+ - 替代方案:alternative-package
107
+ - 迁移指南:...
108
+
109
+ ### 🟡 建议更新
110
+
111
+ **可用更新**:
112
+ | 包名 | 当前版本 | 最新版本 | 类型 | 优先级 |
113
+ |------|---------|---------|------|--------|
114
+ | pkg1 | 1.0.0 | 2.0.0 | Major | 中 |
115
+ | pkg2 | 1.5.0 | 1.8.0 | Minor | 低 |
116
+
117
+ **更新建议**:
118
+ 1. **Major 更新**(需要测试):
119
+ - \`npm install pkg1@2.0.0\`
120
+ - 查看 Breaking Changes
121
+
122
+ 2. **Minor/Patch 更新**(风险较低):
123
+ - \`npm update\`
124
+
125
+ ### 🟢 优化建议
126
+
127
+ **体积优化**:
128
+ 1. **large-package (15MB)**
129
+ - 建议:使用 tree-shaking
130
+ - 或替换为:lighter-alternative (2MB)
131
+ - 预计减少:13MB
132
+
133
+ **未使用依赖**:
134
+ 1. unused-package
135
+ - 建议:移除
136
+ - 命令:\`npm uninstall unused-package\`
137
+
138
+ **重复依赖**:
139
+ 1. package-name 存在多个版本
140
+ - 建议:统一版本
141
+ - 使用:\`npm dedupe\`
142
+
143
+ ---
144
+
145
+ ## 升级计划
146
+
147
+ ### 立即处理(本周)
148
+ 1. 修复 Critical/High 安全漏洞
149
+ 2. 移除未使用的依赖
150
+ 3. 更新 Patch 版本
151
+
152
+ ### 短期计划(本月)
153
+ 1. 更新 Minor 版本
154
+ 2. 替换废弃的包
155
+ 3. 优化依赖体积
156
+
157
+ ### 长期计划(本季度)
158
+ 1. 评估 Major 版本更新
159
+ 2. 重构依赖架构
160
+ 3. 定期审查依赖健康度
161
+
162
+ ---
163
+
164
+ ## 预防措施
165
+
166
+ **最佳实践**:
167
+ 1. 使用 \`package-lock.json\` 锁定版本
168
+ 2. 定期运行 \`npm audit\`
169
+ 3. 使用 Dependabot 自动更新
170
+ 4. 评估新依赖前检查健康度
171
+ 5. 优先选择活跃维护的包
172
+
173
+ **CI/CD 集成**:
174
+ \`\`\`yaml
175
+ # GitHub Actions 示例
176
+ - name: Audit dependencies
177
+ run: npm audit --audit-level=moderate
178
+ \`\`\`
179
+
180
+ ---
181
+
182
+ 现在请开始依赖分析,生成详细的分析报告和升级计划。`;
183
+ return {
184
+ content: [
185
+ {
186
+ type: "text",
187
+ text: message,
188
+ },
189
+ ],
190
+ };
191
+ }
192
+ catch (error) {
193
+ const errorMessage = error instanceof Error ? error.message : String(error);
194
+ return {
195
+ content: [
196
+ {
197
+ type: "text",
198
+ text: `❌ 依赖分析失败: ${errorMessage}`,
199
+ },
200
+ ],
201
+ isError: true,
202
+ };
203
+ }
204
+ }
@@ -136,10 +136,10 @@ function createProjectDocsPlan(layout, docsSnapshot) {
136
136
  latestJsonFilePath: layout.latestJsonPath,
137
137
  archiveMarkdownFilePath: docsSnapshot.markdownFilePath,
138
138
  archiveJsonFilePath: docsSnapshot.jsonFilePath,
139
- navigationSnippet: `### [代码图谱洞察](./graph-insights/latest.md)
140
- 最近一次 code_insight 分析结果,包含调用链、上下文与影响面摘要
139
+ navigationSnippet: `### [代码图谱洞察](./graph-insights/latest.md)
140
+ 最近一次 code_insight 分析结果,包含调用链、上下文与影响面摘要
141
141
  `,
142
- devGuideSnippet: `- **代码图谱洞察**: [graph-insights/latest.md](./graph-insights/latest.md) - 需要理解模块依赖、调用链和影响面时优先查看
142
+ devGuideSnippet: `- **代码图谱洞察**: [graph-insights/latest.md](./graph-insights/latest.md) - 需要理解模块依赖、调用链和影响面时优先查看
143
143
  `,
144
144
  };
145
145
  }
@@ -187,15 +187,15 @@ export function buildCodeInsightDelegatedPlan(input) {
187
187
  };
188
188
  }
189
189
  function renderUsageGuide() {
190
- return `## 使用场景指南
191
- - 探索调用链: \`{ mode: "query", query: "login", goal: "理解登录认证流程" }\`
192
- - 深入函数上下文: \`{ mode: "context", target: "login", file_path: "src/auth/login.ts" }\`
193
- - 评估影响范围: \`{ mode: "impact", target: "login", direction: "upstream", file_path: "..." }\`
194
- - 查看代码内容: \`{ mode: "context", target: "login", include_content: true }\`
195
-
196
- ## 下一步建议
197
- - 查询不精确: 增加 \`goal\`(例如“理解登录认证流程”)
198
- - 出现歧义: 传入 \`uid\` 或 \`file_path\` 重新执行
190
+ return `## 使用场景指南
191
+ - 探索调用链: \`{ mode: "query", query: "login", goal: "理解登录认证流程" }\`
192
+ - 深入函数上下文: \`{ mode: "context", target: "login", file_path: "src/auth/login.ts" }\`
193
+ - 评估影响范围: \`{ mode: "impact", target: "login", direction: "upstream", file_path: "..." }\`
194
+ - 查看代码内容: \`{ mode: "context", target: "login", include_content: true }\`
195
+
196
+ ## 下一步建议
197
+ - 查询不精确: 增加 \`goal\`(例如“理解登录认证流程”)
198
+ - 出现歧义: 传入 \`uid\` 或 \`file_path\` 重新执行
199
199
  - 需要落盘: 传 \`save_to_docs: true\`,再按 delegated plan 写入 docs/graph-insights`;
200
200
  }
201
201
  export function resolveCodeInsightQuery(input) {
@@ -307,22 +307,22 @@ export async function codeInsight(args, context) {
307
307
  status: item.status,
308
308
  })));
309
309
  const ambiguityText = formatAmbiguities(result.ambiguities);
310
- const message = `# code_insight 图谱分析结果
311
-
312
- 状态: ${formatStatusLabel(status)}
313
- 模式: ${result.modeRequested} -> ${result.modeResolved}
314
- 来源: ${result.provider}
315
- 启动策略: ${result.launcherStrategy}
316
- 工作区: ${result.workspaceMode}
317
- 源目录: ${result.sourceRoot}
318
-
319
- 摘要:
320
- ${result.summary}
321
-
322
- 执行详情:
323
- ${executionSummary}
324
-
325
- ${ambiguityText ? `歧义候选:\n${ambiguityText}\n\n` : ""}\
310
+ const message = `# code_insight 图谱分析结果
311
+
312
+ 状态: ${formatStatusLabel(status)}
313
+ 模式: ${result.modeRequested} -> ${result.modeResolved}
314
+ 来源: ${result.provider}
315
+ 启动策略: ${result.launcherStrategy}
316
+ 工作区: ${result.workspaceMode}
317
+ 源目录: ${result.sourceRoot}
318
+
319
+ 摘要:
320
+ ${result.summary}
321
+
322
+ 执行详情:
323
+ ${executionSummary}
324
+
325
+ ${ambiguityText ? `歧义候选:\n${ambiguityText}\n\n` : ""}\
326
326
  ${result.warnings.length > 0 ? `警告: ${result.warnings.join(", ")}` : ""}`.trim();
327
327
  const usageGuide = renderUsageGuide();
328
328
  const structured = {
@@ -391,20 +391,20 @@ ${result.warnings.length > 0 ? `警告: ${result.warnings.join(", ")}` : ""}`.tr
391
391
  `工作区模式: ${result.workspaceMode}`,
392
392
  `来源目录: ${result.sourceRoot}`,
393
393
  ],
394
- })}${message}
395
-
396
- ## delegated plan
397
- ${renderPlanSteps(delegatedPlan.steps)}
398
-
399
- ${delegatedPlan.kind === "docs" && projectDocs ? `后续操作:
400
- - 如需落盘,写入 ${projectDocs.latestMarkdownFilePath} 与 ${projectDocs.latestJsonFilePath}
401
- - 如需长期沉淀,可再补充 ${projectDocs.projectContextFilePath} 的图谱入口` : `后续操作:
402
- - 请先从 candidates 中选定唯一符号
403
- - 重新传入 uid 或 file_path 后再继续 context / impact 分析`}
404
-
394
+ })}${message}
395
+
396
+ ## delegated plan
397
+ ${renderPlanSteps(delegatedPlan.steps)}
398
+
399
+ ${delegatedPlan.kind === "docs" && projectDocs ? `后续操作:
400
+ - 如需落盘,写入 ${projectDocs.latestMarkdownFilePath} 与 ${projectDocs.latestJsonFilePath}
401
+ - 如需长期沉淀,可再补充 ${projectDocs.projectContextFilePath} 的图谱入口` : `后续操作:
402
+ - 请先从 candidates 中选定唯一符号
403
+ - 重新传入 uid 或 file_path 后再继续 context / impact 分析`}
404
+
405
405
  ${usageGuide}`
406
- : `${message}
407
-
406
+ : `${message}
407
+
408
408
  ${usageGuide}`, structured);
409
409
  }
410
410
  catch (error) {
@@ -0,0 +1,13 @@
1
+ export declare function convert(args: any): Promise<{
2
+ content: {
3
+ type: string;
4
+ text: string;
5
+ }[];
6
+ isError?: undefined;
7
+ } | {
8
+ content: {
9
+ type: string;
10
+ text: string;
11
+ }[];
12
+ isError: boolean;
13
+ }>;