mcp-probe-kit 3.1.0 → 3.3.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 (119) hide show
  1. package/README.md +15 -5
  2. package/build/index.js +5 -2
  3. package/build/lib/__tests__/memory-orchestration.unit.test.js +88 -0
  4. package/build/lib/__tests__/memory-payload.unit.test.js +35 -0
  5. package/build/lib/__tests__/quality-constraints.unit.test.d.ts +1 -0
  6. package/build/lib/__tests__/quality-constraints.unit.test.js +54 -0
  7. package/build/lib/__tests__/spec-validator.unit.test.d.ts +1 -0
  8. package/build/lib/__tests__/spec-validator.unit.test.js +147 -0
  9. package/build/lib/agents-md-template.js +32 -32
  10. package/build/lib/cursor-history-client.d.ts +54 -0
  11. package/build/lib/cursor-history-client.js +240 -0
  12. package/build/lib/memory-orchestration.js +29 -8
  13. package/build/lib/quality-constraints.d.ts +54 -0
  14. package/build/lib/quality-constraints.js +155 -0
  15. package/build/lib/skill-bridge.js +12 -12
  16. package/build/lib/spec-validator.d.ts +36 -0
  17. package/build/lib/spec-validator.js +116 -0
  18. package/build/lib/template-loader.js +223 -61
  19. package/build/lib/tool-annotations.d.ts +30 -0
  20. package/build/lib/tool-annotations.js +55 -0
  21. package/build/lib/toolset-manager.js +2 -0
  22. package/build/resources/ui-ux-data/guidelines/vercel-web-interface.json +1632 -1632
  23. package/build/resources/ui-ux-data/metadata.json +30 -30
  24. package/build/resources/ui-ux-data/shadcn/blocks.json +2541 -2541
  25. package/build/resources/ui-ux-data/shadcn/components.json +997 -997
  26. package/build/resources/ui-ux-data/themes/presets.json +483 -483
  27. package/build/schemas/index.d.ts +22 -0
  28. package/build/schemas/project-tools.d.ts +22 -0
  29. package/build/schemas/project-tools.js +23 -0
  30. package/build/tools/__tests__/cursor-history.unit.test.d.ts +1 -0
  31. package/build/tools/__tests__/cursor-history.unit.test.js +38 -0
  32. package/build/tools/check_spec.d.ts +7 -0
  33. package/build/tools/check_spec.js +81 -0
  34. package/build/tools/code_insight.js +41 -41
  35. package/build/tools/code_review.js +11 -4
  36. package/build/tools/cursor_read_conversation.d.ts +7 -0
  37. package/build/tools/cursor_read_conversation.js +36 -0
  38. package/build/tools/fix_bug.js +161 -161
  39. package/build/tools/gencommit.js +60 -60
  40. package/build/tools/index.d.ts +1 -0
  41. package/build/tools/index.js +1 -0
  42. package/build/tools/init_project_context.js +432 -432
  43. package/build/tools/start_bugfix.js +21 -10
  44. package/build/tools/start_feature.js +46 -11
  45. package/build/tools/start_product.js +1 -1
  46. package/build/tools/start_ui.js +44 -13
  47. package/build/tools/ui-ux-tools.d.ts +3 -0
  48. package/build/tools/ui-ux-tools.js +302 -290
  49. package/build/utils/__tests__/vercel-guidelines-sync.unit.test.js +12 -12
  50. package/build/utils/design-reasoning-engine.d.ts +2 -0
  51. package/build/utils/design-reasoning-engine.js +3 -0
  52. package/build/utils/themes-sync.js +8 -8
  53. package/package.json +4 -3
  54. package/build/resources/index.d.ts +0 -4
  55. package/build/resources/index.js +0 -4
  56. package/build/resources/tool-params-guide.d.ts +0 -571
  57. package/build/resources/tool-params-guide.js +0 -488
  58. package/build/tools/analyze_project.d.ts +0 -1
  59. package/build/tools/analyze_project.js +0 -527
  60. package/build/tools/check_deps.d.ts +0 -13
  61. package/build/tools/check_deps.js +0 -204
  62. package/build/tools/convert.d.ts +0 -13
  63. package/build/tools/convert.js +0 -599
  64. package/build/tools/css_order.d.ts +0 -13
  65. package/build/tools/css_order.js +0 -81
  66. package/build/tools/debug.d.ts +0 -13
  67. package/build/tools/debug.js +0 -131
  68. package/build/tools/design2code.d.ts +0 -20
  69. package/build/tools/design2code.js +0 -426
  70. package/build/tools/detect_shell.d.ts +0 -6
  71. package/build/tools/detect_shell.js +0 -151
  72. package/build/tools/explain.d.ts +0 -13
  73. package/build/tools/explain.js +0 -390
  74. package/build/tools/fix.d.ts +0 -13
  75. package/build/tools/fix.js +0 -303
  76. package/build/tools/gen_mock.d.ts +0 -22
  77. package/build/tools/gen_mock.js +0 -269
  78. package/build/tools/gen_skill.d.ts +0 -13
  79. package/build/tools/gen_skill.js +0 -560
  80. package/build/tools/genapi.d.ts +0 -13
  81. package/build/tools/genapi.js +0 -174
  82. package/build/tools/genchangelog.d.ts +0 -13
  83. package/build/tools/genchangelog.js +0 -250
  84. package/build/tools/gendoc.d.ts +0 -13
  85. package/build/tools/gendoc.js +0 -232
  86. package/build/tools/genpr.d.ts +0 -13
  87. package/build/tools/genpr.js +0 -194
  88. package/build/tools/genreadme.d.ts +0 -13
  89. package/build/tools/genreadme.js +0 -626
  90. package/build/tools/gensql.d.ts +0 -13
  91. package/build/tools/gensql.js +0 -320
  92. package/build/tools/genui.d.ts +0 -13
  93. package/build/tools/genui.js +0 -803
  94. package/build/tools/init_component_catalog.d.ts +0 -22
  95. package/build/tools/init_component_catalog.js +0 -809
  96. package/build/tools/init_setting.d.ts +0 -13
  97. package/build/tools/init_setting.js +0 -47
  98. package/build/tools/perf.d.ts +0 -13
  99. package/build/tools/perf.js +0 -409
  100. package/build/tools/render_ui.d.ts +0 -22
  101. package/build/tools/render_ui.js +0 -384
  102. package/build/tools/resolve_conflict.d.ts +0 -13
  103. package/build/tools/resolve_conflict.js +0 -349
  104. package/build/tools/security_scan.d.ts +0 -22
  105. package/build/tools/security_scan.js +0 -323
  106. package/build/tools/split.d.ts +0 -13
  107. package/build/tools/split.js +0 -599
  108. package/build/tools/start_api.d.ts +0 -13
  109. package/build/tools/start_api.js +0 -193
  110. package/build/tools/start_doc.d.ts +0 -13
  111. package/build/tools/start_doc.js +0 -207
  112. package/build/tools/start_refactor.d.ts +0 -13
  113. package/build/tools/start_refactor.js +0 -188
  114. package/build/tools/start_release.d.ts +0 -13
  115. package/build/tools/start_release.js +0 -167
  116. package/build/tools/start_review.d.ts +0 -13
  117. package/build/tools/start_review.js +0 -175
  118. /package/build/{utils/design-docs-generator.d.ts → lib/__tests__/memory-orchestration.unit.test.d.ts} +0 -0
  119. /package/build/{utils/design-docs-generator.js → lib/__tests__/memory-payload.unit.test.d.ts} +0 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * 工具注解(MCP Tool Annotations)集中映射
3
+ *
4
+ * 注解是给客户端的「提示」(非安全保证):客户端据此决定是否自动放行、是否提示用户等。
5
+ * - readOnlyHint: 工具不改动其环境(不写用户源码/项目状态)
6
+ * - idempotentHint: 相同入参重复调用无额外副作用
7
+ * - destructiveHint: 可能做破坏性更新(仅在非只读时有意义)
8
+ * - openWorldHint: 会与外部实体交互(HTTP/外部进程),结果可能非确定
9
+ *
10
+ * 分类:
11
+ * - 只读指南型:仅基于输入/内嵌数据计算并返回指南/计划,不碰用户源码、不触外部
12
+ * - 只读+openWorld:查 Qdrant / 跑 gitnexus 分析 / 结果随仓库或外部变化
13
+ * - 写型:落盘 / 写记忆 / 写缓存(均为非破坏性追加,destructive=false)
14
+ */
15
+ export const TOOL_ANNOTATIONS = {
16
+ // —— 只读指南型(可安全自动放行)——
17
+ init_project: { title: '初始化项目', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
18
+ gencommit: { title: '生成提交信息', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
19
+ code_review: { title: '代码审查', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
20
+ gentest: { title: '生成测试', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
21
+ refactor: { title: '重构建议', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
22
+ fix_bug: { title: 'Bug 真因分析指南', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
23
+ add_feature: { title: '生成功能规格模板', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
24
+ estimate: { title: '工作量估算', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
25
+ check_spec: { title: '规格完整性校验', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
26
+ interview: { title: '需求访谈', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
27
+ ask_user: { title: '向用户提问', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
28
+ git_work_report: { title: 'Git 工作报告指南', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
29
+ ui_design_system: { title: '生成设计系统', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
30
+ ui_search: { title: '搜索 UI/UX 数据', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
31
+ start_product: { title: '产品设计编排', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
32
+ // 返回脚本/文件内容 + delegated plan,由 Agent 落盘 .ralph/——工具自身不写
33
+ start_ralph: { title: 'Ralph 循环开发编排', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
34
+ // 只读扫描本地代码、返回候选模式;不写记忆(存储是 memorize_asset 的事)
35
+ scan_and_extract_patterns: { title: '扫描并提取模式', readOnlyHint: true, idempotentHint: true, openWorldHint: false },
36
+ // —— 只读 + 触外部 / 非确定 ——
37
+ search_memory: { title: '检索共享记忆', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
38
+ read_memory_asset: { title: '读取记忆资产', readOnlyHint: true, idempotentHint: true, openWorldHint: true },
39
+ start_ui: { title: 'UI 开发编排', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
40
+ start_onboard: { title: '项目上手编排', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
41
+ code_insight: { title: '代码图谱洞察', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
42
+ start_feature: { title: '新功能开发编排', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
43
+ start_bugfix: { title: 'Bug 修复编排', readOnlyHint: true, idempotentHint: false, openWorldHint: true },
44
+ // —— 写型(工具自身落盘 / 写记忆 / 写缓存,非破坏)——
45
+ init_project_context: { title: '生成项目上下文', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }, // 自己写 docs/.mcp-probe/layout.json(其余为指令)
46
+ memorize_asset: { title: '沉淀记忆资产', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }, // 写 Qdrant
47
+ sync_ui_data: { title: '同步 UI 数据', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }, // 下载 + 写缓存
48
+ };
49
+ /**
50
+ * 把注解合并进工具定义(用于 ListTools 返回前)。
51
+ */
52
+ export function withToolAnnotations(tool) {
53
+ const annotations = TOOL_ANNOTATIONS[tool.name];
54
+ return annotations ? { ...tool, annotations } : tool;
55
+ }
@@ -21,6 +21,7 @@ export const TOOLSET_DEFINITIONS = {
21
21
  'refactor',
22
22
  'fix_bug',
23
23
  'add_feature',
24
+ 'check_spec',
24
25
  'init_project',
25
26
  'init_project_context',
26
27
  'estimate',
@@ -42,6 +43,7 @@ export const TOOLSET_DEFINITIONS = {
42
43
  'refactor',
43
44
  'fix_bug',
44
45
  'add_feature',
46
+ 'check_spec',
45
47
  'init_project',
46
48
  'init_project_context',
47
49
  'estimate',