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.
- package/README.md +15 -5
- package/build/index.js +5 -2
- package/build/lib/__tests__/memory-orchestration.unit.test.js +88 -0
- package/build/lib/__tests__/memory-payload.unit.test.js +35 -0
- package/build/lib/__tests__/quality-constraints.unit.test.d.ts +1 -0
- package/build/lib/__tests__/quality-constraints.unit.test.js +54 -0
- package/build/lib/__tests__/spec-validator.unit.test.d.ts +1 -0
- package/build/lib/__tests__/spec-validator.unit.test.js +147 -0
- package/build/lib/agents-md-template.js +32 -32
- package/build/lib/cursor-history-client.d.ts +54 -0
- package/build/lib/cursor-history-client.js +240 -0
- package/build/lib/memory-orchestration.js +29 -8
- package/build/lib/quality-constraints.d.ts +54 -0
- package/build/lib/quality-constraints.js +155 -0
- package/build/lib/skill-bridge.js +12 -12
- package/build/lib/spec-validator.d.ts +36 -0
- package/build/lib/spec-validator.js +116 -0
- package/build/lib/template-loader.js +223 -61
- package/build/lib/tool-annotations.d.ts +30 -0
- package/build/lib/tool-annotations.js +55 -0
- package/build/lib/toolset-manager.js +2 -0
- package/build/resources/ui-ux-data/guidelines/vercel-web-interface.json +1632 -1632
- package/build/resources/ui-ux-data/metadata.json +30 -30
- package/build/resources/ui-ux-data/shadcn/blocks.json +2541 -2541
- package/build/resources/ui-ux-data/shadcn/components.json +997 -997
- package/build/resources/ui-ux-data/themes/presets.json +483 -483
- package/build/schemas/index.d.ts +22 -0
- package/build/schemas/project-tools.d.ts +22 -0
- package/build/schemas/project-tools.js +23 -0
- package/build/tools/__tests__/cursor-history.unit.test.d.ts +1 -0
- package/build/tools/__tests__/cursor-history.unit.test.js +38 -0
- package/build/tools/check_spec.d.ts +7 -0
- package/build/tools/check_spec.js +81 -0
- package/build/tools/code_insight.js +41 -41
- package/build/tools/code_review.js +11 -4
- package/build/tools/cursor_read_conversation.d.ts +7 -0
- package/build/tools/cursor_read_conversation.js +36 -0
- package/build/tools/fix_bug.js +161 -161
- package/build/tools/gencommit.js +60 -60
- package/build/tools/index.d.ts +1 -0
- package/build/tools/index.js +1 -0
- package/build/tools/init_project_context.js +432 -432
- package/build/tools/start_bugfix.js +21 -10
- package/build/tools/start_feature.js +46 -11
- package/build/tools/start_product.js +1 -1
- package/build/tools/start_ui.js +44 -13
- package/build/tools/ui-ux-tools.d.ts +3 -0
- package/build/tools/ui-ux-tools.js +302 -290
- package/build/utils/__tests__/vercel-guidelines-sync.unit.test.js +12 -12
- package/build/utils/design-reasoning-engine.d.ts +2 -0
- package/build/utils/design-reasoning-engine.js +3 -0
- package/build/utils/themes-sync.js +8 -8
- package/package.json +4 -3
- package/build/resources/index.d.ts +0 -4
- package/build/resources/index.js +0 -4
- package/build/resources/tool-params-guide.d.ts +0 -571
- package/build/resources/tool-params-guide.js +0 -488
- package/build/tools/analyze_project.d.ts +0 -1
- package/build/tools/analyze_project.js +0 -527
- package/build/tools/check_deps.d.ts +0 -13
- package/build/tools/check_deps.js +0 -204
- package/build/tools/convert.d.ts +0 -13
- package/build/tools/convert.js +0 -599
- package/build/tools/css_order.d.ts +0 -13
- package/build/tools/css_order.js +0 -81
- package/build/tools/debug.d.ts +0 -13
- package/build/tools/debug.js +0 -131
- package/build/tools/design2code.d.ts +0 -20
- package/build/tools/design2code.js +0 -426
- package/build/tools/detect_shell.d.ts +0 -6
- package/build/tools/detect_shell.js +0 -151
- package/build/tools/explain.d.ts +0 -13
- package/build/tools/explain.js +0 -390
- package/build/tools/fix.d.ts +0 -13
- package/build/tools/fix.js +0 -303
- package/build/tools/gen_mock.d.ts +0 -22
- package/build/tools/gen_mock.js +0 -269
- package/build/tools/gen_skill.d.ts +0 -13
- package/build/tools/gen_skill.js +0 -560
- package/build/tools/genapi.d.ts +0 -13
- package/build/tools/genapi.js +0 -174
- package/build/tools/genchangelog.d.ts +0 -13
- package/build/tools/genchangelog.js +0 -250
- package/build/tools/gendoc.d.ts +0 -13
- package/build/tools/gendoc.js +0 -232
- package/build/tools/genpr.d.ts +0 -13
- package/build/tools/genpr.js +0 -194
- package/build/tools/genreadme.d.ts +0 -13
- package/build/tools/genreadme.js +0 -626
- package/build/tools/gensql.d.ts +0 -13
- package/build/tools/gensql.js +0 -320
- package/build/tools/genui.d.ts +0 -13
- package/build/tools/genui.js +0 -803
- package/build/tools/init_component_catalog.d.ts +0 -22
- package/build/tools/init_component_catalog.js +0 -809
- package/build/tools/init_setting.d.ts +0 -13
- package/build/tools/init_setting.js +0 -47
- package/build/tools/perf.d.ts +0 -13
- package/build/tools/perf.js +0 -409
- package/build/tools/render_ui.d.ts +0 -22
- package/build/tools/render_ui.js +0 -384
- package/build/tools/resolve_conflict.d.ts +0 -13
- package/build/tools/resolve_conflict.js +0 -349
- package/build/tools/security_scan.d.ts +0 -22
- package/build/tools/security_scan.js +0 -323
- package/build/tools/split.d.ts +0 -13
- package/build/tools/split.js +0 -599
- package/build/tools/start_api.d.ts +0 -13
- package/build/tools/start_api.js +0 -193
- package/build/tools/start_doc.d.ts +0 -13
- package/build/tools/start_doc.js +0 -207
- package/build/tools/start_refactor.d.ts +0 -13
- package/build/tools/start_refactor.js +0 -188
- package/build/tools/start_release.d.ts +0 -13
- package/build/tools/start_release.js +0 -167
- package/build/tools/start_review.d.ts +0 -13
- package/build/tools/start_review.js +0 -175
- /package/build/{utils/design-docs-generator.d.ts → lib/__tests__/memory-orchestration.unit.test.d.ts} +0 -0
- /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',
|