mcp-probe-kit 3.2.0 → 3.6.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 +25 -7
- package/build/index.js +45 -79
- package/build/lib/__tests__/agents-md-template.unit.test.js +1 -0
- package/build/lib/__tests__/dev-workflow.unit.test.js +22 -0
- package/build/lib/__tests__/handles.unit.test.js +19 -0
- package/build/lib/__tests__/mcp-apps.unit.test.d.ts +1 -0
- package/build/lib/__tests__/mcp-apps.unit.test.js +52 -0
- package/build/lib/__tests__/mcp-tool-skill-registry.unit.test.d.ts +1 -0
- package/build/lib/__tests__/mcp-tool-skill-registry.unit.test.js +18 -0
- package/build/lib/__tests__/memory-client.unit.test.js +105 -0
- package/build/lib/__tests__/memory-orchestration.unit.test.d.ts +1 -0
- package/build/lib/__tests__/memory-orchestration.unit.test.js +88 -0
- package/build/lib/__tests__/memory-payload.unit.test.d.ts +1 -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-gate.unit.test.d.ts +1 -0
- package/build/lib/__tests__/spec-gate.unit.test.js +54 -0
- package/build/lib/__tests__/spec-validator.unit.test.js +106 -74
- package/build/lib/__tests__/task-defaults.unit.test.d.ts +1 -0
- package/build/lib/__tests__/task-defaults.unit.test.js +27 -0
- package/build/lib/__tests__/workflow-skill-installer.unit.test.d.ts +1 -0
- package/build/lib/__tests__/workflow-skill-installer.unit.test.js +110 -0
- package/build/lib/agents-md-template.js +40 -32
- package/build/lib/cursor-history-client.d.ts +54 -0
- package/build/lib/cursor-history-client.js +240 -0
- package/build/lib/dev-workflow.d.ts +36 -0
- package/build/lib/dev-workflow.js +497 -0
- package/build/lib/handles.d.ts +31 -0
- package/build/lib/handles.js +36 -0
- package/build/lib/mcp-apps.d.ts +14 -0
- package/build/lib/mcp-apps.js +234 -0
- package/build/lib/mcp-tool-skill-registry.d.ts +46 -0
- package/build/lib/mcp-tool-skill-registry.js +256 -0
- package/build/lib/memory-client.d.ts +19 -0
- package/build/lib/memory-client.js +69 -0
- package/build/lib/memory-orchestration.d.ts +5 -0
- package/build/lib/memory-orchestration.js +20 -0
- package/build/lib/merge-agents-md.d.ts +2 -2
- package/build/lib/merge-agents-md.js +7 -4
- package/build/lib/output-schema-registry.d.ts +11 -0
- package/build/lib/output-schema-registry.js +80 -0
- 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-gate.d.ts +32 -0
- package/build/lib/spec-gate.js +83 -0
- package/build/lib/spec-validator.js +16 -3
- package/build/lib/task-defaults.d.ts +6 -0
- package/build/lib/task-defaults.js +20 -0
- package/build/lib/template-loader.js +83 -23
- package/build/lib/tool-annotations.js +3 -0
- package/build/lib/toolset-manager.js +2 -0
- package/build/lib/workflow-skill-installer.d.ts +38 -0
- package/build/lib/workflow-skill-installer.js +158 -0
- package/build/lib/workflow-skill-template.d.ts +9 -0
- package/build/lib/workflow-skill-template.js +85 -0
- package/build/lib/workflow-skill-version.d.ts +15 -0
- package/build/lib/workflow-skill-version.js +68 -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 +110 -0
- package/build/schemas/index.js +1 -0
- package/build/schemas/memory-tools.d.ts +83 -0
- package/build/schemas/memory-tools.js +43 -0
- package/build/schemas/orchestration-tools.d.ts +8 -0
- package/build/schemas/orchestration-tools.js +8 -0
- package/build/schemas/output/code-insight-tools.d.ts +65 -0
- package/build/schemas/output/code-insight-tools.js +42 -0
- package/build/schemas/output/memory-tools.d.ts +576 -0
- package/build/schemas/output/memory-tools.js +148 -0
- package/build/schemas/project-tools.d.ts +19 -0
- package/build/schemas/project-tools.js +20 -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/__tests__/delete_memory_asset.unit.test.d.ts +1 -0
- package/build/tools/__tests__/delete_memory_asset.unit.test.js +87 -0
- package/build/tools/__tests__/search_memory.unit.test.js +1 -0
- package/build/tools/__tests__/start_bugfix.unit.test.js +34 -1
- package/build/tools/__tests__/update_memory_asset.unit.test.d.ts +1 -0
- package/build/tools/__tests__/update_memory_asset.unit.test.js +82 -0
- package/build/tools/__tests__/workflow.unit.test.d.ts +1 -0
- package/build/tools/__tests__/workflow.unit.test.js +24 -0
- package/build/tools/check_spec.js +16 -16
- package/build/tools/code_insight.js +46 -42
- 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/delete_memory_asset.d.ts +7 -0
- package/build/tools/delete_memory_asset.js +57 -0
- package/build/tools/fix_bug.js +161 -161
- package/build/tools/gencommit.js +60 -60
- package/build/tools/index.d.ts +3 -0
- package/build/tools/index.js +3 -0
- package/build/tools/init_project_context.js +432 -432
- package/build/tools/search_memory.js +5 -2
- package/build/tools/start_bugfix.js +37 -4
- package/build/tools/start_feature.js +4 -3
- package/build/tools/start_product.js +1 -1
- package/build/tools/start_ui.js +22 -4
- package/build/tools/ui-ux-tools.d.ts +3 -0
- package/build/tools/ui-ux-tools.js +302 -290
- package/build/tools/update_memory_asset.d.ts +7 -0
- package/build/tools/update_memory_asset.js +98 -0
- package/build/tools/workflow.d.ts +13 -0
- package/build/tools/workflow.js +69 -0
- 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 +6 -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__/dev-workflow.unit.test.d.ts} +0 -0
- /package/build/{utils/design-docs-generator.js → lib/__tests__/handles.unit.test.d.ts} +0 -0
package/build/schemas/index.d.ts
CHANGED
|
@@ -193,6 +193,25 @@ export declare const allToolSchemas: ({
|
|
|
193
193
|
readonly required: readonly [];
|
|
194
194
|
readonly additionalProperties: true;
|
|
195
195
|
};
|
|
196
|
+
} | {
|
|
197
|
+
readonly name: "workflow";
|
|
198
|
+
readonly description: "当不确定该用哪个 MCP 工具时使用。根据意图返回分阶段 MCP 指南(firstTool + phases)。同时确保用户项目已存在 .agents/skills/mcp-probe-kit/SKILL.md 与 AGENTS.md 中的 Skill 引用(缺失则自动创建/更新)。";
|
|
199
|
+
readonly inputSchema: {
|
|
200
|
+
readonly type: "object";
|
|
201
|
+
readonly properties: {
|
|
202
|
+
readonly intent: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly description: "用户目标或任务描述(自然语言)";
|
|
205
|
+
};
|
|
206
|
+
readonly scenario: {
|
|
207
|
+
readonly type: "string";
|
|
208
|
+
readonly enum: readonly ["auto", "feature", "bugfix", "ui", "explore", "commit", "review", "refactor", "onboard", "spec", "memory"];
|
|
209
|
+
readonly description: "可选:显式场景;默认 auto 从 intent 推断";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly required: readonly [];
|
|
213
|
+
readonly additionalProperties: true;
|
|
214
|
+
};
|
|
196
215
|
} | {
|
|
197
216
|
readonly name: "init_project_context";
|
|
198
217
|
readonly description: "生成/更新项目上下文:默认写入 AGENTS.md(含 MCP 与 GitNexus 触发规则)及 docs/project-context/。新功能请先 start_feature,修 bug 请先 start_bugfix。完成后 Agent 应阅读 AGENTS.md。";
|
|
@@ -371,6 +390,14 @@ export declare const allToolSchemas: ({
|
|
|
371
390
|
readonly type: "string";
|
|
372
391
|
readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd。";
|
|
373
392
|
};
|
|
393
|
+
readonly docs_dir: {
|
|
394
|
+
readonly type: "string";
|
|
395
|
+
readonly description: "文档目录。可选,默认 docs";
|
|
396
|
+
};
|
|
397
|
+
readonly feature_name: {
|
|
398
|
+
readonly type: "string";
|
|
399
|
+
readonly description: "关联功能规格名(对应 docs/specs/<feature_name>/)。提供后或能自动识别时,修复闭环会插入 check_spec 闸门";
|
|
400
|
+
};
|
|
374
401
|
readonly analysis_mode: {
|
|
375
402
|
readonly type: "string";
|
|
376
403
|
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
@@ -814,6 +841,89 @@ export declare const allToolSchemas: ({
|
|
|
814
841
|
readonly required: readonly ["name", "description", "summary"];
|
|
815
842
|
readonly additionalProperties: true;
|
|
816
843
|
};
|
|
844
|
+
} | {
|
|
845
|
+
readonly name: "delete_memory_asset";
|
|
846
|
+
readonly description: "按 asset_id 从共享记忆库删除一条资产。适用于过时、错误或重复沉淀的清理;删除前建议先用 read_memory_asset 确认内容。";
|
|
847
|
+
readonly inputSchema: {
|
|
848
|
+
readonly type: "object";
|
|
849
|
+
readonly properties: {
|
|
850
|
+
readonly asset_id: {
|
|
851
|
+
readonly type: "string";
|
|
852
|
+
readonly description: "要删除的记忆资产 ID(通常来自 search_memory 或 read_memory_asset)";
|
|
853
|
+
};
|
|
854
|
+
readonly confirm: {
|
|
855
|
+
readonly type: "boolean";
|
|
856
|
+
readonly description: "为 true 时执行删除;省略或 false 时仅返回预览并要求确认(软确认)";
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
readonly required: readonly ["asset_id"];
|
|
860
|
+
readonly additionalProperties: true;
|
|
861
|
+
};
|
|
862
|
+
} | {
|
|
863
|
+
readonly name: "update_memory_asset";
|
|
864
|
+
readonly description: "按 asset_id 更新共享记忆库中的已有资产(保留原 ID)。适用于修正摘要、正文或标签;content 变更会重新向量化。跨仓库共享时勿填 source_project/source_path。";
|
|
865
|
+
readonly inputSchema: {
|
|
866
|
+
readonly type: "object";
|
|
867
|
+
readonly properties: {
|
|
868
|
+
readonly asset_id: {
|
|
869
|
+
readonly type: "string";
|
|
870
|
+
readonly description: "要更新的记忆资产 ID";
|
|
871
|
+
};
|
|
872
|
+
readonly name: {
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
readonly description: "资产名称";
|
|
875
|
+
};
|
|
876
|
+
readonly type: {
|
|
877
|
+
readonly type: "string";
|
|
878
|
+
readonly description: "资产类型:bugfix / pattern / component / code 等";
|
|
879
|
+
};
|
|
880
|
+
readonly description: {
|
|
881
|
+
readonly type: "string";
|
|
882
|
+
readonly description: "资产描述";
|
|
883
|
+
};
|
|
884
|
+
readonly summary: {
|
|
885
|
+
readonly type: "string";
|
|
886
|
+
readonly description: "检索用一句话摘要";
|
|
887
|
+
};
|
|
888
|
+
readonly content: {
|
|
889
|
+
readonly type: "string";
|
|
890
|
+
readonly description: "完整内容";
|
|
891
|
+
};
|
|
892
|
+
readonly code_snippet: {
|
|
893
|
+
readonly type: "string";
|
|
894
|
+
readonly description: "代码片段,content 的别名";
|
|
895
|
+
};
|
|
896
|
+
readonly file_path: {
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
readonly description: "已废弃:勿用于跨仓库沉淀,路径写入 content";
|
|
899
|
+
};
|
|
900
|
+
readonly source_project: {
|
|
901
|
+
readonly type: "string";
|
|
902
|
+
readonly description: "已废弃:仅同仓库追溯时可选";
|
|
903
|
+
};
|
|
904
|
+
readonly source_path: {
|
|
905
|
+
readonly type: "string";
|
|
906
|
+
readonly description: "已废弃:仅同仓库追溯时可选";
|
|
907
|
+
};
|
|
908
|
+
readonly usage: {
|
|
909
|
+
readonly type: "string";
|
|
910
|
+
readonly description: "适用场景/使用方式";
|
|
911
|
+
};
|
|
912
|
+
readonly confidence: {
|
|
913
|
+
readonly type: "number";
|
|
914
|
+
readonly description: "置信度,0-1";
|
|
915
|
+
};
|
|
916
|
+
readonly tags: {
|
|
917
|
+
readonly type: "array";
|
|
918
|
+
readonly items: {
|
|
919
|
+
readonly type: "string";
|
|
920
|
+
};
|
|
921
|
+
readonly description: "标签列表";
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
readonly required: readonly ["asset_id"];
|
|
925
|
+
readonly additionalProperties: true;
|
|
926
|
+
};
|
|
817
927
|
} | {
|
|
818
928
|
readonly name: "scan_and_extract_patterns";
|
|
819
929
|
readonly description: "当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
|
package/build/schemas/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { uiUxSchemas } from "./ui-ux-schemas.js";
|
|
|
13
13
|
import { productDesignSchemas } from "./product-design-schemas.js";
|
|
14
14
|
import { memoryToolSchemas } from "./memory-tools.js";
|
|
15
15
|
// 合并所有工具 schemas
|
|
16
|
+
// 增删工具时同步更新 src/lib/mcp-tool-skill-registry.ts(prebuild 会 verify-workflow-skill 校验)
|
|
16
17
|
export const allToolSchemas = [
|
|
17
18
|
...basicToolSchemas,
|
|
18
19
|
...gitToolSchemas,
|
|
@@ -102,6 +102,89 @@ export declare const memoryToolSchemas: readonly [{
|
|
|
102
102
|
readonly required: readonly ["name", "description", "summary"];
|
|
103
103
|
readonly additionalProperties: true;
|
|
104
104
|
};
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "delete_memory_asset";
|
|
107
|
+
readonly description: "按 asset_id 从共享记忆库删除一条资产。适用于过时、错误或重复沉淀的清理;删除前建议先用 read_memory_asset 确认内容。";
|
|
108
|
+
readonly inputSchema: {
|
|
109
|
+
readonly type: "object";
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly asset_id: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
readonly description: "要删除的记忆资产 ID(通常来自 search_memory 或 read_memory_asset)";
|
|
114
|
+
};
|
|
115
|
+
readonly confirm: {
|
|
116
|
+
readonly type: "boolean";
|
|
117
|
+
readonly description: "为 true 时执行删除;省略或 false 时仅返回预览并要求确认(软确认)";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly required: readonly ["asset_id"];
|
|
121
|
+
readonly additionalProperties: true;
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "update_memory_asset";
|
|
125
|
+
readonly description: "按 asset_id 更新共享记忆库中的已有资产(保留原 ID)。适用于修正摘要、正文或标签;content 变更会重新向量化。跨仓库共享时勿填 source_project/source_path。";
|
|
126
|
+
readonly inputSchema: {
|
|
127
|
+
readonly type: "object";
|
|
128
|
+
readonly properties: {
|
|
129
|
+
readonly asset_id: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly description: "要更新的记忆资产 ID";
|
|
132
|
+
};
|
|
133
|
+
readonly name: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly description: "资产名称";
|
|
136
|
+
};
|
|
137
|
+
readonly type: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly description: "资产类型:bugfix / pattern / component / code 等";
|
|
140
|
+
};
|
|
141
|
+
readonly description: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly description: "资产描述";
|
|
144
|
+
};
|
|
145
|
+
readonly summary: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly description: "检索用一句话摘要";
|
|
148
|
+
};
|
|
149
|
+
readonly content: {
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
readonly description: "完整内容";
|
|
152
|
+
};
|
|
153
|
+
readonly code_snippet: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
readonly description: "代码片段,content 的别名";
|
|
156
|
+
};
|
|
157
|
+
readonly file_path: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly description: "已废弃:勿用于跨仓库沉淀,路径写入 content";
|
|
160
|
+
};
|
|
161
|
+
readonly source_project: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly description: "已废弃:仅同仓库追溯时可选";
|
|
164
|
+
};
|
|
165
|
+
readonly source_path: {
|
|
166
|
+
readonly type: "string";
|
|
167
|
+
readonly description: "已废弃:仅同仓库追溯时可选";
|
|
168
|
+
};
|
|
169
|
+
readonly usage: {
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
readonly description: "适用场景/使用方式";
|
|
172
|
+
};
|
|
173
|
+
readonly confidence: {
|
|
174
|
+
readonly type: "number";
|
|
175
|
+
readonly description: "置信度,0-1";
|
|
176
|
+
};
|
|
177
|
+
readonly tags: {
|
|
178
|
+
readonly type: "array";
|
|
179
|
+
readonly items: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
};
|
|
182
|
+
readonly description: "标签列表";
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly required: readonly ["asset_id"];
|
|
186
|
+
readonly additionalProperties: true;
|
|
187
|
+
};
|
|
105
188
|
}, {
|
|
106
189
|
readonly name: "scan_and_extract_patterns";
|
|
107
190
|
readonly description: "当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
|
|
@@ -52,6 +52,49 @@ export const memoryToolSchemas = [
|
|
|
52
52
|
additionalProperties: true,
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
name: 'delete_memory_asset',
|
|
57
|
+
description: '按 asset_id 从共享记忆库删除一条资产。适用于过时、错误或重复沉淀的清理;删除前建议先用 read_memory_asset 确认内容。',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
asset_id: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: '要删除的记忆资产 ID(通常来自 search_memory 或 read_memory_asset)',
|
|
64
|
+
},
|
|
65
|
+
confirm: {
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
description: '为 true 时执行删除;省略或 false 时仅返回预览并要求确认(软确认)',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ['asset_id'],
|
|
71
|
+
additionalProperties: true,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'update_memory_asset',
|
|
76
|
+
description: '按 asset_id 更新共享记忆库中的已有资产(保留原 ID)。适用于修正摘要、正文或标签;content 变更会重新向量化。跨仓库共享时勿填 source_project/source_path。',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: {
|
|
80
|
+
asset_id: { type: 'string', description: '要更新的记忆资产 ID' },
|
|
81
|
+
name: { type: 'string', description: '资产名称' },
|
|
82
|
+
type: { type: 'string', description: '资产类型:bugfix / pattern / component / code 等' },
|
|
83
|
+
description: { type: 'string', description: '资产描述' },
|
|
84
|
+
summary: { type: 'string', description: '检索用一句话摘要' },
|
|
85
|
+
content: { type: 'string', description: '完整内容' },
|
|
86
|
+
code_snippet: { type: 'string', description: '代码片段,content 的别名' },
|
|
87
|
+
file_path: { type: 'string', description: '已废弃:勿用于跨仓库沉淀,路径写入 content' },
|
|
88
|
+
source_project: { type: 'string', description: '已废弃:仅同仓库追溯时可选' },
|
|
89
|
+
source_path: { type: 'string', description: '已废弃:仅同仓库追溯时可选' },
|
|
90
|
+
usage: { type: 'string', description: '适用场景/使用方式' },
|
|
91
|
+
confidence: { type: 'number', description: '置信度,0-1' },
|
|
92
|
+
tags: { type: 'array', items: { type: 'string' }, description: '标签列表' },
|
|
93
|
+
},
|
|
94
|
+
required: ['asset_id'],
|
|
95
|
+
additionalProperties: true,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
55
98
|
{
|
|
56
99
|
name: 'scan_and_extract_patterns',
|
|
57
100
|
description: '当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。',
|
|
@@ -69,6 +69,14 @@ export declare const orchestrationToolSchemas: readonly [{
|
|
|
69
69
|
readonly type: "string";
|
|
70
70
|
readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd。";
|
|
71
71
|
};
|
|
72
|
+
readonly docs_dir: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly description: "文档目录。可选,默认 docs";
|
|
75
|
+
};
|
|
76
|
+
readonly feature_name: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly description: "关联功能规格名(对应 docs/specs/<feature_name>/)。提供后或能自动识别时,修复闭环会插入 check_spec 闸门";
|
|
79
|
+
};
|
|
72
80
|
readonly analysis_mode: {
|
|
73
81
|
readonly type: "string";
|
|
74
82
|
readonly description: "分析方法。默认 tbp8(丰田问题分析 8 步法)";
|
|
@@ -71,6 +71,14 @@ export const orchestrationToolSchemas = [
|
|
|
71
71
|
type: "string",
|
|
72
72
|
description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd。",
|
|
73
73
|
},
|
|
74
|
+
docs_dir: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "文档目录。可选,默认 docs",
|
|
77
|
+
},
|
|
78
|
+
feature_name: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "关联功能规格名(对应 docs/specs/<feature_name>/)。提供后或能自动识别时,修复闭环会插入 check_spec 闸门",
|
|
81
|
+
},
|
|
74
82
|
analysis_mode: {
|
|
75
83
|
type: "string",
|
|
76
84
|
description: "分析方法。默认 tbp8(丰田问题分析 8 步法)",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* code_insight 结构化输出 Schema(精简版,覆盖 handles 与核心字段)
|
|
3
|
+
*/
|
|
4
|
+
export declare const CodeInsightSchema: {
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly status: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly enum: readonly ["ok", "degraded", "ambiguous", "not_found"];
|
|
10
|
+
};
|
|
11
|
+
readonly provider: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
};
|
|
14
|
+
readonly mode: {
|
|
15
|
+
readonly type: "object";
|
|
16
|
+
readonly properties: {
|
|
17
|
+
readonly requested: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
};
|
|
20
|
+
readonly resolved: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly summary: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
};
|
|
28
|
+
readonly warnings: {
|
|
29
|
+
readonly type: "array";
|
|
30
|
+
readonly items: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly nextAction: {
|
|
35
|
+
readonly type: readonly ["string", "null"];
|
|
36
|
+
};
|
|
37
|
+
readonly handles: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly graph_snapshot: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
readonly graph_resource: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
};
|
|
46
|
+
readonly memory_assets: {
|
|
47
|
+
readonly type: "array";
|
|
48
|
+
readonly items: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly properties: {
|
|
51
|
+
readonly id: {
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
};
|
|
54
|
+
readonly tool: {
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly required: readonly ["id", "tool"];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly required: readonly ["status", "summary"];
|
|
65
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* code_insight 结构化输出 Schema(精简版,覆盖 handles 与核心字段)
|
|
3
|
+
*/
|
|
4
|
+
export const CodeInsightSchema = {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
status: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
enum: ['ok', 'degraded', 'ambiguous', 'not_found'],
|
|
10
|
+
},
|
|
11
|
+
provider: { type: 'string' },
|
|
12
|
+
mode: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
requested: { type: 'string' },
|
|
16
|
+
resolved: { type: 'string' },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
summary: { type: 'string' },
|
|
20
|
+
warnings: { type: 'array', items: { type: 'string' } },
|
|
21
|
+
nextAction: { type: ['string', 'null'] },
|
|
22
|
+
handles: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
graph_snapshot: { type: 'string' },
|
|
26
|
+
graph_resource: { type: 'string' },
|
|
27
|
+
memory_assets: {
|
|
28
|
+
type: 'array',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
id: { type: 'string' },
|
|
33
|
+
tool: { type: 'string' },
|
|
34
|
+
},
|
|
35
|
+
required: ['id', 'tool'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
required: ['status', 'summary'],
|
|
42
|
+
};
|