mta-mcp 3.8.1 → 3.9.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/dist/index.js CHANGED
@@ -5890,10 +5890,483 @@ async function sequentialThinking(args) {
5890
5890
  };
5891
5891
  }
5892
5892
 
5893
+ // src/core/skillRegistry.ts
5894
+ var SkillRegistry = class {
5895
+ constructor() {
5896
+ this.skills = /* @__PURE__ */ new Map();
5897
+ }
5898
+ /**
5899
+ * 注册一个 skill
5900
+ */
5901
+ register(skill) {
5902
+ if (this.skills.has(skill.name)) {
5903
+ throw new Error(`Skill "${skill.name}" \u5DF2\u6CE8\u518C\uFF0C\u4E0D\u5141\u8BB8\u91CD\u590D\u6CE8\u518C`);
5904
+ }
5905
+ this.skills.set(skill.name, skill);
5906
+ }
5907
+ /**
5908
+ * 批量注册
5909
+ */
5910
+ registerAll(skills) {
5911
+ for (const skill of skills) {
5912
+ this.register(skill);
5913
+ }
5914
+ }
5915
+ /**
5916
+ * 获取指定 skill
5917
+ */
5918
+ get(name) {
5919
+ return this.skills.get(name);
5920
+ }
5921
+ /**
5922
+ * 获取所有 skill 名称(枚举值列表)
5923
+ */
5924
+ getSkillNames() {
5925
+ return Array.from(this.skills.keys());
5926
+ }
5927
+ /**
5928
+ * 按分类获取 skill 列表
5929
+ */
5930
+ getByCategory(category) {
5931
+ return Array.from(this.skills.values()).filter((s) => s.category === category);
5932
+ }
5933
+ /**
5934
+ * 获取全部 skill 定义
5935
+ */
5936
+ getAll() {
5937
+ return Array.from(this.skills.values());
5938
+ }
5939
+ /**
5940
+ * 生成 mta 统一工具的 description 文本
5941
+ *
5942
+ * 按分类输出所有 skill 的名称和说明,供 AI 阅读后选择。
5943
+ * 格式紧凑,控制 token 消耗。
5944
+ */
5945
+ generateToolDescription() {
5946
+ const categories = {
5947
+ standards: "\u89C4\u8303\u83B7\u53D6",
5948
+ project: "\u9879\u76EE\u5206\u6790\u4E0E\u914D\u7F6E",
5949
+ templates: "\u6A21\u677F\u7CFB\u7EDF",
5950
+ clone: "\u9879\u76EE\u514B\u9686",
5951
+ troubleshoot: "\u95EE\u9898\u8BCA\u65AD",
5952
+ agents: "Agent \u7BA1\u7406"
5953
+ };
5954
+ const lines = [
5955
+ "MTA \u667A\u80FD\u7F16\u7801\u52A9\u624B - \u7EDF\u4E00\u6280\u80FD\u5165\u53E3\u3002",
5956
+ "\u901A\u8FC7 skill \u53C2\u6570\u9009\u62E9\u8981\u6267\u884C\u7684\u6280\u80FD\uFF0Cparams \u4F20\u5165\u8BE5\u6280\u80FD\u6240\u9700\u53C2\u6570\u3002",
5957
+ "",
5958
+ "\u53EF\u7528\u6280\u80FD\uFF1A"
5959
+ ];
5960
+ for (const [cat, label] of Object.entries(categories)) {
5961
+ const skills = this.getByCategory(cat);
5962
+ if (skills.length === 0) continue;
5963
+ lines.push(`
5964
+ [${label}]`);
5965
+ for (const skill of skills) {
5966
+ const paramStr = skill.paramHints.length > 0 ? " | \u53C2\u6570: " + skill.paramHints.map((p) => p.required ? `${p.name}(\u5FC5\u586B)` : p.name).join(", ") : "";
5967
+ lines.push(` ${skill.name} - ${skill.description}${paramStr}`);
5968
+ }
5969
+ }
5970
+ return lines.join("\n");
5971
+ }
5972
+ /**
5973
+ * 生成 mta 统一工具的 JSON Schema(inputSchema)
5974
+ */
5975
+ generateInputSchema() {
5976
+ return {
5977
+ type: "object",
5978
+ properties: {
5979
+ skill: {
5980
+ type: "string",
5981
+ enum: this.getSkillNames(),
5982
+ description: "\u8981\u6267\u884C\u7684\u6280\u80FD\u540D\u79F0"
5983
+ },
5984
+ params: {
5985
+ type: "object",
5986
+ description: "\u8BE5\u6280\u80FD\u6240\u9700\u7684\u53C2\u6570\uFF08\u53C2\u89C1\u5DE5\u5177\u63CF\u8FF0\u4E2D\u5404\u6280\u80FD\u7684\u53C2\u6570\u8BF4\u660E\uFF09",
5987
+ additionalProperties: true
5988
+ }
5989
+ },
5990
+ required: ["skill"]
5991
+ };
5992
+ }
5993
+ /**
5994
+ * 执行一个 skill
5995
+ */
5996
+ async execute(skillName, params) {
5997
+ const skill = this.skills.get(skillName);
5998
+ if (!skill) {
5999
+ const available = this.getSkillNames().join(", ");
6000
+ return {
6001
+ content: [{
6002
+ type: "text",
6003
+ text: JSON.stringify({
6004
+ error: `\u672A\u77E5\u6280\u80FD: ${skillName}`,
6005
+ availableSkills: available,
6006
+ hint: "\u8BF7\u4ECE\u53EF\u7528\u6280\u80FD\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u6709\u6548\u7684 skill \u540D\u79F0"
6007
+ }, null, 2)
6008
+ }]
6009
+ };
6010
+ }
6011
+ return skill.handler(params);
6012
+ }
6013
+ /**
6014
+ * 获取注册统计
6015
+ */
6016
+ getStats() {
6017
+ const byCategory = {};
6018
+ for (const skill of this.skills.values()) {
6019
+ byCategory[skill.category] = (byCategory[skill.category] || 0) + 1;
6020
+ }
6021
+ return { total: this.skills.size, byCategory };
6022
+ }
6023
+ };
6024
+ var globalRegistry = null;
6025
+ function getSkillRegistry() {
6026
+ if (!globalRegistry) {
6027
+ globalRegistry = new SkillRegistry();
6028
+ }
6029
+ return globalRegistry;
6030
+ }
6031
+
6032
+ // src/tools/skillDefinitions.ts
6033
+ function wrapAsContent(data) {
6034
+ return {
6035
+ content: [{
6036
+ type: "text",
6037
+ text: JSON.stringify(data, null, 2)
6038
+ }]
6039
+ };
6040
+ }
6041
+ var skillDefinitions = [
6042
+ // ==================== 规范获取类 ====================
6043
+ {
6044
+ name: "get_standards",
6045
+ category: "standards",
6046
+ description: "\u667A\u80FD\u83B7\u53D6\u7F16\u7801\u89C4\u8303\u3002\u652F\u6301\u6309\u9879\u76EE\u8DEF\u5F84\u81EA\u52A8\u5206\u6790\u3001\u6309 ID \u7CBE\u786E\u83B7\u53D6\u3001\u6309\u9884\u8BBE\u573A\u666F\u83B7\u53D6\u4E09\u79CD\u6A21\u5F0F",
6047
+ paramHints: [
6048
+ { name: "id", type: "string", description: "\u89C4\u8303 ID\uFF08\u5982 vue3-composition, flutter\uFF09- \u6309 ID \u83B7\u53D6\u65F6\u4F7F\u7528" },
6049
+ { name: "ids", type: "string[]", description: "\u6279\u91CF\u89C4\u8303 ID \u5217\u8868" },
6050
+ { name: "preset", type: "string", description: "\u9884\u8BBE\u573A\u666F\uFF08\u5982 vue3-component, api-call\uFF09- \u6309\u573A\u666F\u83B7\u53D6\u65F6\u4F7F\u7528" },
6051
+ { name: "currentFile", type: "string", description: "\u5F53\u524D\u6587\u4EF6\u8DEF\u5F84 - \u667A\u80FD\u6A21\u5F0F\u81EA\u52A8\u5206\u6790" },
6052
+ { name: "fileContent", type: "string", description: "\u6587\u4EF6\u5185\u5BB9 - \u667A\u80FD\u6A21\u5F0F\u81EA\u52A8\u5206\u6790" },
6053
+ { name: "projectPath", type: "string", description: "\u9879\u76EE\u6839\u8DEF\u5F84 - \u667A\u80FD\u6A21\u5F0F\u81EA\u52A8\u5206\u6790\u9879\u76EE\u6280\u672F\u6808" },
6054
+ { name: "scenario", type: "string", description: "\u5F00\u53D1\u573A\u666F" },
6055
+ { name: "customImports", type: "string[]", description: "\u9884\u8BBE\u6A21\u5F0F\u4E0B\u7684\u989D\u5916\u5BFC\u5165" },
6056
+ { name: "mode", type: "string", description: "\u8FD4\u56DE\u6A21\u5F0F: summary/key-rules(\u9ED8\u8BA4)/full" }
6057
+ ],
6058
+ handler: async (params) => {
6059
+ if (params.preset) {
6060
+ return usePreset({
6061
+ preset: params.preset,
6062
+ customImports: params.customImports
6063
+ });
6064
+ }
6065
+ if (params.id || params.ids) {
6066
+ return getStandardById({
6067
+ id: params.id,
6068
+ ids: params.ids,
6069
+ mode: params.mode
6070
+ });
6071
+ }
6072
+ return getCompactStandards({
6073
+ currentFile: params.currentFile,
6074
+ fileContent: params.fileContent,
6075
+ scenario: params.scenario,
6076
+ projectPath: params.projectPath,
6077
+ mode: params.mode
6078
+ });
6079
+ }
6080
+ },
6081
+ {
6082
+ name: "list_standards",
6083
+ category: "standards",
6084
+ description: "\u5217\u51FA\u53EF\u7528\u7684\u89C4\u8303\u4FE1\u606F\u3002\u652F\u6301\u5217\u51FA\u9884\u8BBE\u573A\u666F\u3001\u573A\u666F\u5217\u8868\u3001\u573A\u666F-\u89C4\u8303\u6620\u5C04\u5173\u7CFB",
6085
+ paramHints: [
6086
+ { name: "what", type: "string", description: "\u67E5\u8BE2\u7C7B\u578B: presets(\u9884\u8BBE\u5217\u8868) / scenarios(\u573A\u666F\u5217\u8868) / mappings(\u6620\u5C04\u5173\u7CFB)", required: true },
6087
+ { name: "scenario", type: "string", description: "\u6620\u5C04\u67E5\u8BE2\uFF1A\u6309\u573A\u666F\u540D\u79F0" },
6088
+ { name: "fileType", type: "string", description: "\u6620\u5C04\u67E5\u8BE2\uFF1A\u6309\u6587\u4EF6\u7C7B\u578B" },
6089
+ { name: "imports", type: "string[]", description: "\u6620\u5C04\u67E5\u8BE2\uFF1A\u6309\u5BFC\u5165\u5305" },
6090
+ { name: "listAll", type: "boolean", description: "\u6620\u5C04\u67E5\u8BE2\uFF1A\u5217\u51FA\u6240\u6709\u6620\u5C04" }
6091
+ ],
6092
+ handler: async (params) => {
6093
+ const what = params.what || "presets";
6094
+ switch (what) {
6095
+ case "presets":
6096
+ return listPresets();
6097
+ case "scenarios":
6098
+ return listScenarios();
6099
+ case "mappings":
6100
+ return queryMappings({
6101
+ scenario: params.scenario,
6102
+ fileType: params.fileType,
6103
+ imports: params.imports,
6104
+ listAll: params.listAll
6105
+ });
6106
+ default:
6107
+ return listPresets();
6108
+ }
6109
+ }
6110
+ },
6111
+ // ==================== 项目分析与配置类 ====================
6112
+ {
6113
+ name: "analyze_project",
6114
+ category: "project",
6115
+ description: "\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u3001\u6846\u67B6\u3001\u5DE5\u5177\u548C\u7279\u5F81",
6116
+ paramHints: [
6117
+ { name: "projectPath", type: "string", description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u5F53\u524D\u76EE\u5F55\uFF09" }
6118
+ ],
6119
+ handler: async (params) => {
6120
+ return analyzeProject({ projectPath: params.projectPath });
6121
+ }
6122
+ },
6123
+ {
6124
+ name: "setup_project",
6125
+ category: "project",
6126
+ description: "\u9879\u76EE\u914D\u7F6E\u7BA1\u7406\u3002\u652F\u6301\u81EA\u52A8\u68C0\u6D4B\u5E76\u751F\u6210\u914D\u7F6E\u3001\u5FEB\u901F\u521D\u59CB\u5316\u3001\u751F\u6210 copilot-instructions.md",
6127
+ paramHints: [
6128
+ { name: "action", type: "string", description: "\u64CD\u4F5C\u7C7B\u578B: auto_setup(\u81EA\u52A8\u914D\u7F6E) / init(\u5FEB\u901F\u521D\u59CB\u5316) / generate(\u751F\u6210\u914D\u7F6E)", required: true },
6129
+ { name: "projectPath", type: "string", description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84" },
6130
+ { name: "workspacePath", type: "string", description: "\u5DE5\u4F5C\u533A\u8DEF\u5F84\uFF08auto_setup \u65F6\u4F7F\u7528\uFF09" },
6131
+ { name: "generateInstructions", type: "boolean", description: "\u662F\u5426\u751F\u6210 copilot-instructions.md" },
6132
+ { name: "agentIds", type: "string[]", description: "\u6307\u5B9A Agent ID \u5217\u8868\uFF08generate \u65F6\u4F7F\u7528\uFF09" },
6133
+ { name: "autoMatch", type: "boolean", description: "\u81EA\u52A8\u5339\u914D Agents\uFF08generate \u65F6\u4F7F\u7528\uFF09" },
6134
+ { name: "updateMode", type: "string", description: "merge(\u4FDD\u7559\u81EA\u5B9A\u4E49) / overwrite(\u8986\u76D6)" },
6135
+ { name: "configId", type: "string", description: "\u914D\u7F6E\u65B9\u6848 ID" }
6136
+ ],
6137
+ handler: async (params) => {
6138
+ const action = params.action || "auto_setup";
6139
+ switch (action) {
6140
+ case "init":
6141
+ return initProject({ projectPath: params.projectPath });
6142
+ case "generate": {
6143
+ const projectPath = params.projectPath;
6144
+ if (!projectPath) {
6145
+ throw new Error("generate \u64CD\u4F5C\u9700\u8981 projectPath \u53C2\u6570");
6146
+ }
6147
+ return generateConfig({
6148
+ projectPath,
6149
+ agentIds: params.agentIds,
6150
+ autoMatch: params.autoMatch,
6151
+ updateMode: params.updateMode,
6152
+ configId: params.configId
6153
+ });
6154
+ }
6155
+ case "auto_setup":
6156
+ default:
6157
+ return autoSetup({
6158
+ workspacePath: params.workspacePath || params.projectPath,
6159
+ generateInstructions: params.generateInstructions
6160
+ });
6161
+ }
6162
+ }
6163
+ },
6164
+ {
6165
+ name: "health_check",
6166
+ category: "project",
6167
+ description: "\u68C0\u67E5 MCP \u670D\u52A1\u5668\u72B6\u6001\u548C\u914D\u7F6E\u95EE\u9898\uFF0C\u8FD4\u56DE\u8BCA\u65AD\u62A5\u544A\u548C\u4FEE\u590D\u5EFA\u8BAE",
6168
+ paramHints: [
6169
+ { name: "workspacePath", type: "string", description: "\u5DE5\u4F5C\u533A\u8DEF\u5F84" },
6170
+ { name: "verbose", type: "boolean", description: "\u663E\u793A\u8BE6\u7EC6\u4FE1\u606F" }
6171
+ ],
6172
+ handler: async (params) => {
6173
+ return healthCheck({
6174
+ workspacePath: params.workspacePath,
6175
+ verbose: params.verbose
6176
+ });
6177
+ }
6178
+ },
6179
+ // ==================== Agent 管理类 ====================
6180
+ {
6181
+ name: "manage_agents",
6182
+ category: "agents",
6183
+ description: "\u7BA1\u7406 Copilot Agents\u3002\u652F\u6301\u5217\u51FA\u6240\u6709\u53EF\u7528 Agent \u6216\u6309\u9879\u76EE\u7279\u5F81\u5339\u914D\u63A8\u8350",
6184
+ paramHints: [
6185
+ { name: "action", type: "string", description: "\u64CD\u4F5C: list(\u5217\u51FA\u5168\u90E8) / match(\u6309\u7279\u5F81\u5339\u914D)", required: true },
6186
+ { name: "projectFeatures", type: "object", description: "\u9879\u76EE\u7279\u5F81\uFF08match \u65F6\u4F7F\u7528\uFF0C\u542B frameworks/languages/tools/keywords/projectType\uFF09" },
6187
+ { name: "limit", type: "number", description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF\uFF08match \u65F6\u4F7F\u7528\uFF09" }
6188
+ ],
6189
+ handler: async (params) => {
6190
+ const action = params.action || "list";
6191
+ if (action === "match" && params.projectFeatures) {
6192
+ return matchAgents({
6193
+ projectFeatures: params.projectFeatures,
6194
+ limit: params.limit
6195
+ });
6196
+ }
6197
+ return wrapAsContent(listAvailableAgents());
6198
+ }
6199
+ },
6200
+ // ==================== 模板系统类 ====================
6201
+ {
6202
+ name: "get_template",
6203
+ category: "templates",
6204
+ description: "\u83B7\u53D6\u4EE3\u7801\u6A21\u677F\u3002\u652F\u6301\u5217\u51FA\u6A21\u677F\u5217\u8868\u6216\u83B7\u53D6\u6307\u5B9A\u6A21\u677F\u8BE6\u60C5\u548C\u6587\u4EF6\u5185\u5BB9",
6205
+ paramHints: [
6206
+ { name: "action", type: "string", description: "\u64CD\u4F5C: list(\u5217\u51FA\u6A21\u677F) / get(\u83B7\u53D6\u6A21\u677F\u8BE6\u60C5)", required: true },
6207
+ { name: "id", type: "string", description: "\u6A21\u677F ID\uFF08get \u65F6\u5FC5\u586B\uFF09" },
6208
+ { name: "includeFiles", type: "boolean", description: "\u662F\u5426\u5305\u542B\u6587\u4EF6\u5185\u5BB9" },
6209
+ { name: "files", type: "string[]", description: "\u6307\u5B9A\u8981\u83B7\u53D6\u7684\u6587\u4EF6\u5217\u8868" },
6210
+ { name: "type", type: "string", description: "\u6309\u7C7B\u578B\u7B5B\u9009\uFF08list \u65F6\u4F7F\u7528\uFF09" },
6211
+ { name: "framework", type: "string", description: "\u6309\u6846\u67B6\u7B5B\u9009\uFF08list \u65F6\u4F7F\u7528\uFF09" },
6212
+ { name: "search", type: "string", description: "\u641C\u7D22\u5173\u952E\u8BCD\uFF08list \u65F6\u4F7F\u7528\uFF09" }
6213
+ ],
6214
+ handler: async (params) => {
6215
+ const action = params.action || "list";
6216
+ if (action === "get") {
6217
+ const id = params.id;
6218
+ if (!id) {
6219
+ throw new Error("get \u64CD\u4F5C\u9700\u8981 id \u53C2\u6570");
6220
+ }
6221
+ return getTemplate({
6222
+ id,
6223
+ includeFiles: params.includeFiles,
6224
+ files: params.files
6225
+ });
6226
+ }
6227
+ return listTemplates({
6228
+ type: params.type,
6229
+ framework: params.framework
6230
+ });
6231
+ }
6232
+ },
6233
+ // ==================== 项目克隆类 ====================
6234
+ {
6235
+ name: "clone_analyze",
6236
+ category: "clone",
6237
+ description: "\u6DF1\u5EA6\u5206\u6790\u53C2\u8003\u9879\u76EE\u7684\u6280\u672F\u6808\u548C\u67B6\u6784\uFF0C\u7528\u4E8E\u521B\u5EFA\u98CE\u683C\u4E00\u81F4\u7684\u65B0\u9879\u76EE",
6238
+ paramHints: [
6239
+ { name: "projectPath", type: "string", required: true, description: "\u53C2\u8003\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84" },
6240
+ { name: "generateDocs", type: "boolean", description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863" },
6241
+ { name: "newProjectName", type: "string", description: "\u65B0\u9879\u76EE\u540D\u79F0" },
6242
+ { name: "newProjectPath", type: "string", description: "\u65B0\u9879\u76EE\u8DEF\u5F84" }
6243
+ ],
6244
+ handler: async (params) => {
6245
+ const projectPath = params.projectPath;
6246
+ if (!projectPath) {
6247
+ throw new Error("clone_analyze \u9700\u8981 projectPath \u53C2\u6570");
6248
+ }
6249
+ return analyzeReferenceProject({
6250
+ projectPath,
6251
+ generateDocs: params.generateDocs,
6252
+ newProjectName: params.newProjectName,
6253
+ newProjectPath: params.newProjectPath
6254
+ });
6255
+ }
6256
+ },
6257
+ {
6258
+ name: "clone_generate",
6259
+ category: "clone",
6260
+ description: "\u57FA\u4E8E\u53C2\u8003\u9879\u76EE\u5206\u6790\u7ED3\u679C\u751F\u6210\u65B0\u9879\u76EE\u9AA8\u67B6\uFF0C\u5305\u542B\u5206\u6790\u6587\u6863\u3001\u5F00\u53D1\u8BA1\u5212\u548C\u9AA8\u67B6\u6E05\u5355",
6261
+ paramHints: [
6262
+ { name: "referenceProjectPath", type: "string", required: true, description: "\u53C2\u8003\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84" },
6263
+ { name: "newProjectPath", type: "string", required: true, description: "\u65B0\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84" },
6264
+ { name: "newProjectName", type: "string", required: true, description: "\u65B0\u9879\u76EE\u540D\u79F0" },
6265
+ { name: "generateDocs", type: "boolean", description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863" },
6266
+ { name: "includeLayers", type: "string[]", description: "\u8981\u5305\u542B\u7684\u5C42\u7EA7" },
6267
+ { name: "excludePatterns", type: "string[]", description: "\u8981\u6392\u9664\u7684\u6587\u4EF6\u6A21\u5F0F" }
6268
+ ],
6269
+ handler: async (params) => {
6270
+ const refPath = params.referenceProjectPath;
6271
+ const newPath = params.newProjectPath;
6272
+ const newName = params.newProjectName;
6273
+ if (!refPath || !newPath || !newName) {
6274
+ throw new Error("clone_generate \u9700\u8981 referenceProjectPath, newProjectPath, newProjectName \u53C2\u6570");
6275
+ }
6276
+ return generateProjectSkeleton({
6277
+ referenceProjectPath: refPath,
6278
+ newProjectPath: newPath,
6279
+ newProjectName: newName,
6280
+ generateDocs: params.generateDocs,
6281
+ includeLayers: params.includeLayers,
6282
+ excludePatterns: params.excludePatterns
6283
+ });
6284
+ }
6285
+ },
6286
+ // ==================== 问题诊断类 ====================
6287
+ {
6288
+ name: "troubleshoot",
6289
+ category: "troubleshoot",
6290
+ description: "\u95EE\u9898\u8BCA\u65AD\u5165\u53E3\u3002\u76F4\u63A5\u4F20\u5165\u95EE\u9898\u63CF\u8FF0\uFF0C\u81EA\u52A8\u8BC6\u522B\u6846\u67B6\u3001\u63D0\u53D6\u5173\u952E\u8BCD\u3001\u5339\u914D\u89E3\u51B3\u65B9\u6848",
6291
+ paramHints: [
6292
+ { name: "problem", type: "string", required: true, description: "\u95EE\u9898\u63CF\u8FF0\uFF08\u7528\u6237\u8BF4\u7684\u8BDD\u6216\u9519\u8BEF\u4FE1\u606F\uFF09" },
6293
+ { name: "framework", type: "string", description: "\u6846\u67B6\u7C7B\u578B: flutter/vue3/react\uFF08\u53EF\u9009\uFF0C\u4F1A\u81EA\u52A8\u68C0\u6D4B\uFF09" },
6294
+ { name: "codeSnippet", type: "string", description: "\u76F8\u5173\u4EE3\u7801\u7247\u6BB5" }
6295
+ ],
6296
+ handler: async (params) => {
6297
+ const problemText = params.problem || "";
6298
+ let detectedFramework = params.framework;
6299
+ if (!detectedFramework) {
6300
+ if (problemText.toLowerCase().includes("flutter") || problemText.includes("Widget") || problemText.includes("BoxShadow") || problemText.includes("Dart")) {
6301
+ detectedFramework = "flutter";
6302
+ } else if (problemText.toLowerCase().includes("vue") || problemText.includes("Element") || problemText.includes("el-")) {
6303
+ detectedFramework = "vue3";
6304
+ } else if (problemText.toLowerCase().includes("react")) {
6305
+ detectedFramework = "react";
6306
+ }
6307
+ }
6308
+ const extractedKeywords = [];
6309
+ const keywordPatterns = [
6310
+ /\b(shadow|阴影|透出|transparency|clip|裁剪|layout|布局|animation|动画|color|颜色|border|边框|svg|icon|图标|input|输入|button|按钮|table|表格|form|表单|style|样式)\b/gi
6311
+ ];
6312
+ for (const pattern of keywordPatterns) {
6313
+ const matches = problemText.match(pattern);
6314
+ if (matches) {
6315
+ extractedKeywords.push(...matches.map((m) => m.toLowerCase()));
6316
+ }
6317
+ }
6318
+ const uniqueKeywords = [...new Set(extractedKeywords)];
6319
+ return wrapAsContent(await queryTroubleshootingCases({
6320
+ framework: detectedFramework,
6321
+ keywords: uniqueKeywords.length > 0 ? uniqueKeywords : void 0,
6322
+ errorMessage: problemText,
6323
+ limit: 5
6324
+ }));
6325
+ }
6326
+ },
6327
+ {
6328
+ name: "query_cases",
6329
+ category: "troubleshoot",
6330
+ description: "\u67E5\u8BE2\u6545\u969C\u6392\u9664\u6848\u4F8B\u3002\u652F\u6301\u6309\u6846\u67B6/\u5173\u952E\u8BCD\u7CBE\u786E\u67E5\u8BE2\u3001\u83B7\u53D6\u5355\u4E2A\u6848\u4F8B\u5B8C\u6574\u5185\u5BB9\u3001\u5217\u51FA\u6240\u6709\u6848\u4F8B",
6331
+ paramHints: [
6332
+ { name: "action", type: "string", description: "\u64CD\u4F5C: query(\u67E5\u8BE2) / get(\u83B7\u53D6\u5355\u4E2A) / list(\u5217\u51FA\u5168\u90E8)", required: true },
6333
+ { name: "framework", type: "string", description: "\u6846\u67B6\u7C7B\u578B: flutter/vue3/react/common" },
6334
+ { name: "caseId", type: "string", description: "\u6848\u4F8B ID\uFF08get \u65F6\u5FC5\u586B\uFF09" },
6335
+ { name: "keywords", type: "string[]", description: "\u641C\u7D22\u5173\u952E\u8BCD\uFF08query \u65F6\u4F7F\u7528\uFF09" },
6336
+ { name: "errorMessage", type: "string", description: "\u9519\u8BEF\u4FE1\u606F\uFF08query \u65F6\u4F7F\u7528\uFF09" },
6337
+ { name: "limit", type: "number", description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF" }
6338
+ ],
6339
+ handler: async (params) => {
6340
+ const action = params.action || "list";
6341
+ switch (action) {
6342
+ case "get": {
6343
+ const framework = params.framework;
6344
+ const caseId = params.caseId;
6345
+ if (!framework || !caseId) {
6346
+ throw new Error("get \u64CD\u4F5C\u9700\u8981 framework \u548C caseId \u53C2\u6570");
6347
+ }
6348
+ return wrapAsContent(await getTroubleshootingCaseContent({ framework, caseId }));
6349
+ }
6350
+ case "query":
6351
+ return wrapAsContent(await queryTroubleshootingCases({
6352
+ framework: params.framework,
6353
+ keywords: params.keywords,
6354
+ errorMessage: params.errorMessage,
6355
+ limit: params.limit
6356
+ }));
6357
+ case "list":
6358
+ default:
6359
+ return wrapAsContent(await listTroubleshootingCases(params.framework));
6360
+ }
6361
+ }
6362
+ }
6363
+ ];
6364
+
5893
6365
  // src/index.ts
5894
- var SERVER_VERSION = "3.2.0";
6366
+ var SERVER_VERSION = "3.9.0";
6367
+ var TOOL_MODE = process.env.MTA_TOOL_MODE || "unified";
5895
6368
  var logger3 = createLogger("Server");
5896
- function wrapAsContent(data) {
6369
+ function wrapAsContent2(data) {
5897
6370
  return {
5898
6371
  content: [{
5899
6372
  type: "text",
@@ -5903,8 +6376,10 @@ function wrapAsContent(data) {
5903
6376
  }
5904
6377
  var CopilotPromptsMCPServer = class {
5905
6378
  constructor() {
6379
+ this.skillRegistry = getSkillRegistry();
5906
6380
  this.standardsManager = new StandardsManager();
5907
6381
  this.codeValidator = new CodeValidator();
6382
+ this.skillRegistry.registerAll(skillDefinitions);
5908
6383
  this.server = new Server(
5909
6384
  {
5910
6385
  name: "mta",
@@ -5948,49 +6423,323 @@ var CopilotPromptsMCPServer = class {
5948
6423
  });
5949
6424
  }
5950
6425
  setupToolHandlers() {
5951
- this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
5952
- tools: [
5953
- {
5954
- name: "analyze_project",
5955
- description: "\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u3001\u6846\u67B6\u3001\u5DE5\u5177\u548C\u7279\u5F81",
5956
- inputSchema: {
5957
- type: "object",
5958
- properties: {
5959
- projectPath: {
5960
- type: "string",
5961
- description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6426
+ const memoryAndThinkingTools = [
6427
+ // ================== 知识图谱记忆工具 ==================
6428
+ {
6429
+ name: "create_entities",
6430
+ description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u521B\u5EFA\u591A\u4E2A\u65B0\u5B9E\u4F53",
6431
+ inputSchema: {
6432
+ type: "object",
6433
+ properties: {
6434
+ entities: {
6435
+ type: "array",
6436
+ description: "\u5B9E\u4F53\u6570\u7EC4",
6437
+ items: {
6438
+ type: "object",
6439
+ properties: {
6440
+ name: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0\uFF08\u552F\u4E00\u6807\u8BC6\uFF09" },
6441
+ entityType: { type: "string", description: "\u5B9E\u4F53\u7C7B\u578B\uFF08\u5982 person\u3001project\u3001concept\uFF09" },
6442
+ observations: { type: "array", items: { type: "string" }, description: "\u5173\u4E8E\u8BE5\u5B9E\u4F53\u7684\u89C2\u5BDF/\u4E8B\u5B9E" }
6443
+ },
6444
+ required: ["name", "entityType", "observations"]
5962
6445
  }
5963
6446
  }
6447
+ },
6448
+ required: ["entities"]
6449
+ }
6450
+ },
6451
+ {
6452
+ name: "create_relations",
6453
+ description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u521B\u5EFA\u5B9E\u4F53\u4E4B\u95F4\u7684\u5173\u7CFB\uFF08\u4F7F\u7528\u4E3B\u52A8\u8BED\u6001\uFF09",
6454
+ inputSchema: {
6455
+ type: "object",
6456
+ properties: {
6457
+ relations: {
6458
+ type: "array",
6459
+ description: "\u5173\u7CFB\u6570\u7EC4",
6460
+ items: {
6461
+ type: "object",
6462
+ properties: {
6463
+ from: { type: "string", description: "\u8D77\u59CB\u5B9E\u4F53\u540D\u79F0" },
6464
+ to: { type: "string", description: "\u76EE\u6807\u5B9E\u4F53\u540D\u79F0" },
6465
+ relationType: { type: "string", description: "\u5173\u7CFB\u7C7B\u578B\uFF08\u4E3B\u52A8\u8BED\u6001\uFF0C\u5982 works_at\u3001uses\u3001depends_on\uFF09" }
6466
+ },
6467
+ required: ["from", "to", "relationType"]
6468
+ }
6469
+ }
6470
+ },
6471
+ required: ["relations"]
6472
+ }
6473
+ },
6474
+ {
6475
+ name: "add_observations",
6476
+ description: "\u5411\u73B0\u6709\u5B9E\u4F53\u6DFB\u52A0\u65B0\u7684\u89C2\u5BDF/\u4E8B\u5B9E",
6477
+ inputSchema: {
6478
+ type: "object",
6479
+ properties: {
6480
+ observations: {
6481
+ type: "array",
6482
+ description: "\u89C2\u5BDF\u6570\u7EC4",
6483
+ items: {
6484
+ type: "object",
6485
+ properties: {
6486
+ entityName: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0" },
6487
+ contents: { type: "array", items: { type: "string" }, description: "\u8981\u6DFB\u52A0\u7684\u89C2\u5BDF\u5185\u5BB9" }
6488
+ },
6489
+ required: ["entityName", "contents"]
6490
+ }
6491
+ }
6492
+ },
6493
+ required: ["observations"]
6494
+ }
6495
+ },
6496
+ {
6497
+ name: "delete_entities",
6498
+ description: "\u5220\u9664\u5B9E\u4F53\u53CA\u5176\u5173\u8054\u7684\u5173\u7CFB",
6499
+ inputSchema: {
6500
+ type: "object",
6501
+ properties: {
6502
+ entityNames: {
6503
+ type: "array",
6504
+ items: { type: "string" },
6505
+ description: "\u8981\u5220\u9664\u7684\u5B9E\u4F53\u540D\u79F0\u5217\u8868"
6506
+ }
6507
+ },
6508
+ required: ["entityNames"]
6509
+ }
6510
+ },
6511
+ {
6512
+ name: "delete_observations",
6513
+ description: "\u4ECE\u5B9E\u4F53\u4E2D\u5220\u9664\u7279\u5B9A\u7684\u89C2\u5BDF",
6514
+ inputSchema: {
6515
+ type: "object",
6516
+ properties: {
6517
+ deletions: {
6518
+ type: "array",
6519
+ items: {
6520
+ type: "object",
6521
+ properties: {
6522
+ entityName: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0" },
6523
+ observations: { type: "array", items: { type: "string" }, description: "\u8981\u5220\u9664\u7684\u89C2\u5BDF" }
6524
+ },
6525
+ required: ["entityName", "observations"]
6526
+ }
6527
+ }
6528
+ },
6529
+ required: ["deletions"]
6530
+ }
6531
+ },
6532
+ {
6533
+ name: "delete_relations",
6534
+ description: "\u4ECE\u77E5\u8BC6\u56FE\u8C31\u4E2D\u5220\u9664\u5173\u7CFB",
6535
+ inputSchema: {
6536
+ type: "object",
6537
+ properties: {
6538
+ relations: {
6539
+ type: "array",
6540
+ items: {
6541
+ type: "object",
6542
+ properties: {
6543
+ from: { type: "string", description: "\u8D77\u59CB\u5B9E\u4F53\u540D\u79F0" },
6544
+ to: { type: "string", description: "\u76EE\u6807\u5B9E\u4F53\u540D\u79F0" },
6545
+ relationType: { type: "string", description: "\u5173\u7CFB\u7C7B\u578B" }
6546
+ },
6547
+ required: ["from", "to", "relationType"]
6548
+ }
6549
+ }
6550
+ },
6551
+ required: ["relations"]
6552
+ }
6553
+ },
6554
+ {
6555
+ name: "read_graph",
6556
+ description: "\u8BFB\u53D6\u6574\u4E2A\u77E5\u8BC6\u56FE\u8C31",
6557
+ inputSchema: {
6558
+ type: "object",
6559
+ properties: {}
6560
+ }
6561
+ },
6562
+ {
6563
+ name: "search_nodes",
6564
+ description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u641C\u7D22\u8282\u70B9\uFF08\u6309\u540D\u79F0\u3001\u7C7B\u578B\u6216\u89C2\u5BDF\u5185\u5BB9\u5339\u914D\uFF09",
6565
+ inputSchema: {
6566
+ type: "object",
6567
+ properties: {
6568
+ query: {
6569
+ type: "string",
6570
+ description: "\u641C\u7D22\u5173\u952E\u8BCD"
6571
+ }
6572
+ },
6573
+ required: ["query"]
6574
+ }
6575
+ },
6576
+ {
6577
+ name: "open_nodes",
6578
+ description: "\u6309\u540D\u79F0\u6253\u5F00\u7279\u5B9A\u8282\u70B9",
6579
+ inputSchema: {
6580
+ type: "object",
6581
+ properties: {
6582
+ names: {
6583
+ type: "array",
6584
+ items: { type: "string" },
6585
+ description: "\u8981\u68C0\u7D22\u7684\u5B9E\u4F53\u540D\u79F0\u5217\u8868"
6586
+ }
6587
+ },
6588
+ required: ["names"]
6589
+ }
6590
+ },
6591
+ // ================== 顺序思考工具 ==================
6592
+ {
6593
+ name: "sequentialthinking",
6594
+ description: `A detailed tool for dynamic and reflective problem-solving through thoughts.
6595
+ This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
6596
+ Each thought can build on, question, or revise previous insights as understanding deepens.
6597
+
6598
+ When to use this tool:
6599
+ - Breaking down complex problems into steps
6600
+ - Planning and design with room for revision
6601
+ - Analysis that might need course correction
6602
+ - Problems where the full scope might not be clear initially
6603
+ - Problems that require a multi-step solution
6604
+ - Tasks that need to maintain context over multiple steps
6605
+ - Situations where irrelevant information needs to be filtered out
6606
+
6607
+ Key features:
6608
+ - You can adjust total_thoughts up or down as you progress
6609
+ - You can question or revise previous thoughts
6610
+ - You can add more thoughts even after reaching what seemed like the end
6611
+ - You can express uncertainty and explore alternative approaches
6612
+ - Not every thought needs to build linearly - you can branch or backtrack
6613
+ - Generates a solution hypothesis
6614
+ - Verifies the hypothesis based on the Chain of Thought steps
6615
+ - Repeats the process until satisfied
6616
+ - Provides a correct answer
6617
+
6618
+ Parameters explained:
6619
+ - thought: Your current thinking step, which can include:
6620
+ * Regular analytical steps
6621
+ * Revisions of previous thoughts
6622
+ * Questions about previous decisions
6623
+ * Realizations about needing more analysis
6624
+ * Changes in approach
6625
+ * Hypothesis generation
6626
+ * Hypothesis verification
6627
+ - nextThoughtNeeded: True if you need more thinking, even if at what seemed like the end
6628
+ - thoughtNumber: Current number in sequence (can go beyond initial total if needed)
6629
+ - totalThoughts: Current estimate of thoughts needed (can be adjusted up/down)
6630
+ - isRevision: A boolean indicating if this thought revises previous thinking
6631
+ - revisesThought: If is_revision is true, which thought number is being reconsidered
6632
+ - branchFromThought: If branching, which thought number is the branching point
6633
+ - branchId: Identifier for the current branch (if any)
6634
+ - needsMoreThoughts: If reaching end but realizing more thoughts needed
6635
+
6636
+ You should:
6637
+ 1. Start with an initial estimate of needed thoughts, but be ready to adjust
6638
+ 2. Feel free to question or revise previous thoughts
6639
+ 3. Don't hesitate to add more thoughts if needed, even at the "end"
6640
+ 4. Express uncertainty when present
6641
+ 5. Mark thoughts that revise previous thinking or branch into new paths
6642
+ 6. Ignore information that is irrelevant to the current step
6643
+ 7. Generate a solution hypothesis when appropriate
6644
+ 8. Verify the hypothesis based on the Chain of Thought steps
6645
+ 9. Repeat the process until satisfied with the solution
6646
+ 10. Provide a single, ideally correct answer as the final output
6647
+ 11. Only set nextThoughtNeeded to false when truly done and a satisfactory answer is reached`,
6648
+ inputSchema: {
6649
+ type: "object",
6650
+ properties: {
6651
+ thought: {
6652
+ type: "string",
6653
+ description: "Your current thinking step"
6654
+ },
6655
+ nextThoughtNeeded: {
6656
+ type: "boolean",
6657
+ description: "Whether another thought step is needed"
6658
+ },
6659
+ thoughtNumber: {
6660
+ type: "integer",
6661
+ description: "Current thought number (numeric value, e.g., 1, 2, 3)",
6662
+ minimum: 1
6663
+ },
6664
+ totalThoughts: {
6665
+ type: "integer",
6666
+ description: "Estimated total thoughts needed (numeric value, e.g., 5, 10)",
6667
+ minimum: 1
6668
+ },
6669
+ isRevision: {
6670
+ type: "boolean",
6671
+ description: "Whether this revises previous thinking"
6672
+ },
6673
+ revisesThought: {
6674
+ type: "integer",
6675
+ description: "Which thought is being reconsidered",
6676
+ minimum: 1
6677
+ },
6678
+ branchFromThought: {
6679
+ type: "integer",
6680
+ description: "Branching point thought number",
6681
+ minimum: 1
6682
+ },
6683
+ branchId: {
6684
+ type: "string",
6685
+ description: "Branch identifier"
6686
+ },
6687
+ needsMoreThoughts: {
6688
+ type: "boolean",
6689
+ description: "If more thoughts are needed"
6690
+ }
6691
+ },
6692
+ required: ["thought", "nextThoughtNeeded", "thoughtNumber", "totalThoughts"]
6693
+ }
6694
+ }
6695
+ ];
6696
+ const mtaUnifiedTool = {
6697
+ name: "mta",
6698
+ description: this.skillRegistry.generateToolDescription(),
6699
+ inputSchema: this.skillRegistry.generateInputSchema()
6700
+ };
6701
+ const legacyBusinessTools = [
6702
+ {
6703
+ name: "analyze_project",
6704
+ description: "\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u3001\u6846\u67B6\u3001\u5DE5\u5177\u548C\u7279\u5F81",
6705
+ inputSchema: {
6706
+ type: "object",
6707
+ properties: {
6708
+ projectPath: {
6709
+ type: "string",
6710
+ description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6711
+ }
5964
6712
  }
5965
- },
5966
- {
5967
- name: "auto_setup",
5968
- description: `\u3010\u751F\u6210\u9879\u76EE\u914D\u7F6E\u3011\u4E3A\u9879\u76EE\u751F\u6210 copilot-instructions.md \u914D\u7F6E\u6587\u4EF6\u3002
6713
+ }
6714
+ },
6715
+ {
6716
+ name: "auto_setup",
6717
+ description: `\u3010\u751F\u6210\u9879\u76EE\u914D\u7F6E\u3011\u4E3A\u9879\u76EE\u751F\u6210 copilot-instructions.md \u914D\u7F6E\u6587\u4EF6\u3002
5969
6718
  \u529F\u80FD\uFF1A
5970
6719
  1. \u68C0\u6D4B\u9879\u76EE\u4E2D\u662F\u5426\u5B58\u5728 .github/copilot-instructions.md
5971
6720
  2. \u5982\u679C\u4E0D\u5B58\u5728\uFF0C\u5219\u81EA\u52A8\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u5E76\u751F\u6210\u914D\u7F6E\u6587\u4EF6
5972
6721
  3. \u4F7F\u7528 SmartAgentMatcher \u5339\u914D\u6700\u5408\u9002\u7684 Agents
5973
6722
 
5974
6723
  \u6CE8\u610F\uFF1AMCP \u670D\u52A1\u5668\u7531 VS Code \u63D2\u4EF6\u901A\u8FC7 npm \u5305\u81EA\u52A8\u914D\u7F6E\uFF0C\u6B64\u5DE5\u5177\u53EA\u8D1F\u8D23\u751F\u6210 copilot-instructions.md`,
5975
- inputSchema: {
5976
- type: "object",
5977
- properties: {
5978
- workspacePath: {
5979
- type: "string",
5980
- description: "\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\uFF08\u5FC5\u987B\u63D0\u4F9B\uFF09"
5981
- },
5982
- generateInstructions: {
5983
- type: "boolean",
5984
- description: "\u662F\u5426\u751F\u6210 copilot-instructions.md\uFF08\u9ED8\u8BA4 true\uFF0C\u4EC5\u5F53\u4E0D\u5B58\u5728\u65F6\u751F\u6210\uFF09",
5985
- default: true
5986
- }
6724
+ inputSchema: {
6725
+ type: "object",
6726
+ properties: {
6727
+ workspacePath: {
6728
+ type: "string",
6729
+ description: "\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\uFF08\u5FC5\u987B\u63D0\u4F9B\uFF09"
5987
6730
  },
5988
- required: ["workspacePath"]
5989
- }
5990
- },
5991
- {
5992
- name: "init_project",
5993
- description: `\u3010\u521D\u59CB\u5316\u9879\u76EE\u3011\u5FEB\u901F\u521D\u59CB\u5316\u9879\u76EE\u7684 MTA \u914D\u7F6E\u3002
6731
+ generateInstructions: {
6732
+ type: "boolean",
6733
+ description: "\u662F\u5426\u751F\u6210 copilot-instructions.md\uFF08\u9ED8\u8BA4 true\uFF0C\u4EC5\u5F53\u4E0D\u5B58\u5728\u65F6\u751F\u6210\uFF09",
6734
+ default: true
6735
+ }
6736
+ },
6737
+ required: ["workspacePath"]
6738
+ }
6739
+ },
6740
+ {
6741
+ name: "init_project",
6742
+ description: `\u3010\u521D\u59CB\u5316\u9879\u76EE\u3011\u5FEB\u901F\u521D\u59CB\u5316\u9879\u76EE\u7684 MTA \u914D\u7F6E\u3002
5994
6743
  \u7528\u6CD5\uFF1A@mta \u521D\u59CB\u5316\u9879\u76EE
5995
6744
 
5996
6745
  \u529F\u80FD\uFF1A
@@ -5999,141 +6748,141 @@ var CopilotPromptsMCPServer = class {
5999
6748
  3. \u5982\u679C\u5DF2\u5B58\u5728\u914D\u7F6E\uFF0C\u4F1A\u8BFB\u53D6\u7528\u6237\u5DF2\u914D\u7F6E\u7684 Agents \u5E76\u8865\u5145\u7F3A\u5931\u7684\u89C4\u8303
6000
6749
 
6001
6750
  \u63D0\u793A\uFF1A\u786E\u4FDD\u5728 Chat \u4E2D\u5DF2\u6DFB\u52A0\u9879\u76EE\u6587\u4EF6\u5939`,
6002
- inputSchema: {
6003
- type: "object",
6004
- properties: {
6005
- projectPath: {
6006
- type: "string",
6007
- description: "\u9879\u76EE\u8DEF\u5F84\uFF08\u53EF\u9009\uFF0C\u5982\u679C\u4E0D\u63D0\u4F9B\u4F1A\u5C1D\u8BD5\u4ECE\u4E0A\u4E0B\u6587\u63A8\u65AD\uFF09"
6008
- }
6751
+ inputSchema: {
6752
+ type: "object",
6753
+ properties: {
6754
+ projectPath: {
6755
+ type: "string",
6756
+ description: "\u9879\u76EE\u8DEF\u5F84\uFF08\u53EF\u9009\uFF0C\u5982\u679C\u4E0D\u63D0\u4F9B\u4F1A\u5C1D\u8BD5\u4ECE\u4E0A\u4E0B\u6587\u63A8\u65AD\uFF09"
6009
6757
  }
6010
6758
  }
6011
- },
6012
- {
6013
- name: "list_available_agents",
6014
- description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684 Agents\uFF08\u7528\u4E8E VSCode \u63D2\u4EF6\u7B49\u573A\u666F\uFF09\uFF0C\u8FD4\u56DE Agent \u5143\u6570\u636E\u5217\u8868",
6015
- inputSchema: {
6016
- type: "object",
6017
- properties: {}
6018
- }
6019
- },
6020
- {
6021
- name: "health_check",
6022
- description: "\u68C0\u67E5 MCP \u670D\u52A1\u5668\u72B6\u6001\u548C\u914D\u7F6E\u95EE\u9898\uFF0C\u8FD4\u56DE\u8BCA\u65AD\u62A5\u544A\u548C\u4FEE\u590D\u5EFA\u8BAE",
6023
- inputSchema: {
6024
- type: "object",
6025
- properties: {
6026
- workspacePath: {
6027
- type: "string",
6028
- description: "\u5DE5\u4F5C\u533A\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6029
- },
6030
- verbose: {
6031
- type: "boolean",
6032
- description: "\u663E\u793A\u8BE6\u7EC6\u4FE1\u606F"
6033
- }
6759
+ }
6760
+ },
6761
+ {
6762
+ name: "list_available_agents",
6763
+ description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684 Agents\uFF08\u7528\u4E8E VSCode \u63D2\u4EF6\u7B49\u573A\u666F\uFF09\uFF0C\u8FD4\u56DE Agent \u5143\u6570\u636E\u5217\u8868",
6764
+ inputSchema: {
6765
+ type: "object",
6766
+ properties: {}
6767
+ }
6768
+ },
6769
+ {
6770
+ name: "health_check",
6771
+ description: "\u68C0\u67E5 MCP \u670D\u52A1\u5668\u72B6\u6001\u548C\u914D\u7F6E\u95EE\u9898\uFF0C\u8FD4\u56DE\u8BCA\u65AD\u62A5\u544A\u548C\u4FEE\u590D\u5EFA\u8BAE",
6772
+ inputSchema: {
6773
+ type: "object",
6774
+ properties: {
6775
+ workspacePath: {
6776
+ type: "string",
6777
+ description: "\u5DE5\u4F5C\u533A\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6778
+ },
6779
+ verbose: {
6780
+ type: "boolean",
6781
+ description: "\u663E\u793A\u8BE6\u7EC6\u4FE1\u606F"
6034
6782
  }
6035
6783
  }
6036
- },
6037
- {
6038
- name: "use_preset",
6039
- description: "\u6309\u9884\u8BBE\u573A\u666F\u83B7\u53D6\u89C4\u8303\uFF08vue3-component\u3001api-call\u3001pinia-store \u7B49\uFF09",
6040
- inputSchema: {
6041
- type: "object",
6042
- properties: {
6043
- preset: {
6044
- type: "string",
6045
- enum: ["vue3-component", "vue3-form", "vue3-table", "pinia-store", "api-call", "typescript-strict", "i18n", "composable"],
6046
- description: "\u9884\u8BBE\u573A\u666F ID"
6047
- },
6048
- customImports: {
6049
- type: "array",
6050
- items: { type: "string" },
6051
- description: "\u989D\u5916\u5BFC\u5165\uFF08\u53EF\u9009\uFF09"
6052
- }
6784
+ }
6785
+ },
6786
+ {
6787
+ name: "use_preset",
6788
+ description: "\u6309\u9884\u8BBE\u573A\u666F\u83B7\u53D6\u89C4\u8303\uFF08vue3-component\u3001api-call\u3001pinia-store \u7B49\uFF09",
6789
+ inputSchema: {
6790
+ type: "object",
6791
+ properties: {
6792
+ preset: {
6793
+ type: "string",
6794
+ enum: ["vue3-component", "vue3-form", "vue3-table", "pinia-store", "api-call", "typescript-strict", "i18n", "composable"],
6795
+ description: "\u9884\u8BBE\u573A\u666F ID"
6053
6796
  },
6054
- required: ["preset"]
6055
- }
6056
- },
6057
- {
6058
- name: "list_presets",
6059
- description: "\u5217\u51FA\u6240\u6709\u9884\u8BBE\u573A\u666F",
6060
- inputSchema: {
6061
- type: "object",
6062
- properties: {}
6063
- }
6064
- },
6065
- {
6066
- name: "match_agents",
6067
- description: "\u6839\u636E\u9879\u76EE\u7279\u5F81\u5339\u914D Copilot Agents",
6068
- inputSchema: {
6069
- type: "object",
6070
- properties: {
6071
- projectFeatures: {
6072
- type: "object",
6073
- description: "\u9879\u76EE\u7279\u5F81\uFF08\u4ECE analyze_project \u83B7\u53D6\uFF09",
6074
- properties: {
6075
- frameworks: { type: "array", items: { type: "string" } },
6076
- languages: { type: "array", items: { type: "string" } },
6077
- tools: { type: "array", items: { type: "string" } },
6078
- keywords: { type: "array", items: { type: "string" } },
6079
- projectType: { type: "string" }
6080
- },
6081
- required: ["frameworks", "languages", "tools", "keywords", "projectType"]
6797
+ customImports: {
6798
+ type: "array",
6799
+ items: { type: "string" },
6800
+ description: "\u989D\u5916\u5BFC\u5165\uFF08\u53EF\u9009\uFF09"
6801
+ }
6802
+ },
6803
+ required: ["preset"]
6804
+ }
6805
+ },
6806
+ {
6807
+ name: "list_presets",
6808
+ description: "\u5217\u51FA\u6240\u6709\u9884\u8BBE\u573A\u666F",
6809
+ inputSchema: {
6810
+ type: "object",
6811
+ properties: {}
6812
+ }
6813
+ },
6814
+ {
6815
+ name: "match_agents",
6816
+ description: "\u6839\u636E\u9879\u76EE\u7279\u5F81\u5339\u914D Copilot Agents",
6817
+ inputSchema: {
6818
+ type: "object",
6819
+ properties: {
6820
+ projectFeatures: {
6821
+ type: "object",
6822
+ description: "\u9879\u76EE\u7279\u5F81\uFF08\u4ECE analyze_project \u83B7\u53D6\uFF09",
6823
+ properties: {
6824
+ frameworks: { type: "array", items: { type: "string" } },
6825
+ languages: { type: "array", items: { type: "string" } },
6826
+ tools: { type: "array", items: { type: "string" } },
6827
+ keywords: { type: "array", items: { type: "string" } },
6828
+ projectType: { type: "string" }
6082
6829
  },
6083
- limit: {
6084
- type: "number",
6085
- description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF",
6086
- default: 10
6087
- }
6830
+ required: ["frameworks", "languages", "tools", "keywords", "projectType"]
6088
6831
  },
6089
- required: ["projectFeatures"]
6090
- }
6091
- },
6092
- {
6093
- name: "list_available_agents",
6094
- description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684 Copilot Agents",
6095
- inputSchema: {
6096
- type: "object",
6097
- properties: {}
6098
- }
6099
- },
6100
- {
6101
- name: "generate_config",
6102
- description: "\u4E3A\u9879\u76EE\u751F\u6210 copilot-instructions.md \u914D\u7F6E\u6587\u4EF6",
6103
- inputSchema: {
6104
- type: "object",
6105
- properties: {
6106
- projectPath: {
6107
- type: "string",
6108
- description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84"
6109
- },
6110
- agentIds: {
6111
- type: "array",
6112
- items: { type: "string" },
6113
- description: "\u6307\u5B9A Agent ID \u5217\u8868\uFF08\u53EF\u9009\uFF09"
6114
- },
6115
- autoMatch: {
6116
- type: "boolean",
6117
- description: "\u81EA\u52A8\u5339\u914D Agents",
6118
- default: true
6119
- },
6120
- updateMode: {
6121
- type: "string",
6122
- enum: ["merge", "overwrite"],
6123
- description: "merge \u4FDD\u7559\u81EA\u5B9A\u4E49\u5185\u5BB9\uFF0Coverwrite \u8986\u76D6",
6124
- default: "merge"
6125
- },
6126
- configId: {
6127
- type: "string",
6128
- description: "\u914D\u7F6E\u65B9\u6848 ID"
6129
- }
6832
+ limit: {
6833
+ type: "number",
6834
+ description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF",
6835
+ default: 10
6836
+ }
6837
+ },
6838
+ required: ["projectFeatures"]
6839
+ }
6840
+ },
6841
+ {
6842
+ name: "list_available_agents",
6843
+ description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684 Copilot Agents",
6844
+ inputSchema: {
6845
+ type: "object",
6846
+ properties: {}
6847
+ }
6848
+ },
6849
+ {
6850
+ name: "generate_config",
6851
+ description: "\u4E3A\u9879\u76EE\u751F\u6210 copilot-instructions.md \u914D\u7F6E\u6587\u4EF6",
6852
+ inputSchema: {
6853
+ type: "object",
6854
+ properties: {
6855
+ projectPath: {
6856
+ type: "string",
6857
+ description: "\u9879\u76EE\u7EDD\u5BF9\u8DEF\u5F84"
6130
6858
  },
6131
- required: ["projectPath"]
6132
- }
6133
- },
6134
- {
6135
- name: "get_compact_standards",
6136
- description: `\u83B7\u53D6\u7F16\u7801\u89C4\u8303\uFF08\u667A\u80FD\u6A21\u5F0F\uFF09
6859
+ agentIds: {
6860
+ type: "array",
6861
+ items: { type: "string" },
6862
+ description: "\u6307\u5B9A Agent ID \u5217\u8868\uFF08\u53EF\u9009\uFF09"
6863
+ },
6864
+ autoMatch: {
6865
+ type: "boolean",
6866
+ description: "\u81EA\u52A8\u5339\u914D Agents",
6867
+ default: true
6868
+ },
6869
+ updateMode: {
6870
+ type: "string",
6871
+ enum: ["merge", "overwrite"],
6872
+ description: "merge \u4FDD\u7559\u81EA\u5B9A\u4E49\u5185\u5BB9\uFF0Coverwrite \u8986\u76D6",
6873
+ default: "merge"
6874
+ },
6875
+ configId: {
6876
+ type: "string",
6877
+ description: "\u914D\u7F6E\u65B9\u6848 ID"
6878
+ }
6879
+ },
6880
+ required: ["projectPath"]
6881
+ }
6882
+ },
6883
+ {
6884
+ name: "get_compact_standards",
6885
+ description: `\u83B7\u53D6\u7F16\u7801\u89C4\u8303\uFF08\u667A\u80FD\u6A21\u5F0F\uFF09
6137
6886
  \u529F\u80FD\uFF1A
6138
6887
  1. \u81EA\u52A8\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\uFF08\u901A\u8FC7 projectPath\uFF09
6139
6888
  2. \u5982\u679C\u5B58\u5728 copilot-instructions.md\uFF0C\u4F18\u5148\u4F7F\u7528\u7528\u6237\u914D\u7F6E\u7684 Agents
@@ -6143,141 +6892,141 @@ var CopilotPromptsMCPServer = class {
6143
6892
  \u4F7F\u7528\u573A\u666F\uFF1A
6144
6893
  - @mta \u8C03\u7528\u65F6\uFF0C\u4F20\u5165 projectPath \u83B7\u53D6\u5B8C\u6574\u9879\u76EE\u89C4\u8303
6145
6894
  - \u7F16\u5199\u4EE3\u7801\u65F6\uFF0C\u4F20\u5165 fileContent \u83B7\u53D6\u6587\u4EF6\u76F8\u5173\u89C4\u8303`,
6146
- inputSchema: {
6147
- type: "object",
6148
- properties: {
6149
- currentFile: {
6150
- type: "string",
6151
- description: "\u5F53\u524D\u6587\u4EF6\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6152
- },
6153
- fileContent: {
6154
- type: "string",
6155
- description: "\u6587\u4EF6\u5185\u5BB9\uFF08\u53EF\u9009\uFF09"
6156
- },
6157
- projectPath: {
6158
- type: "string",
6159
- description: "\u9879\u76EE\u6839\u8DEF\u5F84\uFF08\u63A8\u8350\uFF09- \u4F1A\u81EA\u52A8\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u5E76\u8BFB\u53D6\u7528\u6237\u914D\u7F6E"
6160
- },
6161
- scenario: {
6162
- type: "string",
6163
- description: "\u5F00\u53D1\u573A\u666F\uFF08\u53EF\u9009\uFF09"
6164
- },
6165
- mode: {
6166
- type: "string",
6167
- enum: ["summary", "key-rules", "full"],
6168
- description: "\u8FD4\u56DE\u6A21\u5F0F\uFF1Asummary(\u6458\u8981)/key-rules(\u5173\u952E\u89C4\u5219,\u9ED8\u8BA4)/full(\u5B8C\u6574\u5185\u5BB9)",
6169
- default: "key-rules"
6170
- }
6895
+ inputSchema: {
6896
+ type: "object",
6897
+ properties: {
6898
+ currentFile: {
6899
+ type: "string",
6900
+ description: "\u5F53\u524D\u6587\u4EF6\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09"
6901
+ },
6902
+ fileContent: {
6903
+ type: "string",
6904
+ description: "\u6587\u4EF6\u5185\u5BB9\uFF08\u53EF\u9009\uFF09"
6905
+ },
6906
+ projectPath: {
6907
+ type: "string",
6908
+ description: "\u9879\u76EE\u6839\u8DEF\u5F84\uFF08\u63A8\u8350\uFF09- \u4F1A\u81EA\u52A8\u5206\u6790\u9879\u76EE\u6280\u672F\u6808\u5E76\u8BFB\u53D6\u7528\u6237\u914D\u7F6E"
6909
+ },
6910
+ scenario: {
6911
+ type: "string",
6912
+ description: "\u5F00\u53D1\u573A\u666F\uFF08\u53EF\u9009\uFF09"
6913
+ },
6914
+ mode: {
6915
+ type: "string",
6916
+ enum: ["summary", "key-rules", "full"],
6917
+ description: "\u8FD4\u56DE\u6A21\u5F0F\uFF1Asummary(\u6458\u8981)/key-rules(\u5173\u952E\u89C4\u5219,\u9ED8\u8BA4)/full(\u5B8C\u6574\u5185\u5BB9)",
6918
+ default: "key-rules"
6171
6919
  }
6172
6920
  }
6173
- },
6174
- {
6175
- name: "get_standard_by_id",
6176
- description: "\u6309 ID \u76F4\u63A5\u83B7\u53D6\u89C4\u8303",
6177
- inputSchema: {
6178
- type: "object",
6179
- properties: {
6180
- id: {
6181
- type: "string",
6182
- description: "\u89C4\u8303 ID\uFF08\u5982 vue3-composition, element-plus\uFF09"
6183
- },
6184
- ids: {
6185
- type: "array",
6186
- items: { type: "string" },
6187
- description: "\u6279\u91CF\u83B7\u53D6\u591A\u4E2A\u89C4\u8303 ID"
6188
- },
6189
- mode: {
6190
- type: "string",
6191
- enum: ["summary", "key-rules", "full"],
6192
- description: "\u8FD4\u56DE\u6A21\u5F0F",
6193
- default: "key-rules"
6194
- }
6921
+ }
6922
+ },
6923
+ {
6924
+ name: "get_standard_by_id",
6925
+ description: "\u6309 ID \u76F4\u63A5\u83B7\u53D6\u89C4\u8303",
6926
+ inputSchema: {
6927
+ type: "object",
6928
+ properties: {
6929
+ id: {
6930
+ type: "string",
6931
+ description: "\u89C4\u8303 ID\uFF08\u5982 vue3-composition, element-plus\uFF09"
6932
+ },
6933
+ ids: {
6934
+ type: "array",
6935
+ items: { type: "string" },
6936
+ description: "\u6279\u91CF\u83B7\u53D6\u591A\u4E2A\u89C4\u8303 ID"
6937
+ },
6938
+ mode: {
6939
+ type: "string",
6940
+ enum: ["summary", "key-rules", "full"],
6941
+ description: "\u8FD4\u56DE\u6A21\u5F0F",
6942
+ default: "key-rules"
6195
6943
  }
6196
6944
  }
6197
- },
6198
- {
6199
- name: "query_mappings",
6200
- description: "\u67E5\u8BE2\u573A\u666F-\u89C4\u8303\u6620\u5C04\u5173\u7CFB",
6201
- inputSchema: {
6202
- type: "object",
6203
- properties: {
6204
- scenario: {
6205
- type: "string",
6206
- description: "\u573A\u666F\u540D\u79F0"
6207
- },
6208
- fileType: {
6209
- type: "string",
6210
- description: "\u6587\u4EF6\u7C7B\u578B"
6211
- },
6212
- imports: {
6213
- type: "array",
6214
- items: { type: "string" },
6215
- description: "\u5BFC\u5165\u7684\u5305"
6216
- },
6217
- listAll: {
6218
- type: "boolean",
6219
- description: "\u5217\u51FA\u6240\u6709\u6620\u5C04"
6220
- }
6945
+ }
6946
+ },
6947
+ {
6948
+ name: "query_mappings",
6949
+ description: "\u67E5\u8BE2\u573A\u666F-\u89C4\u8303\u6620\u5C04\u5173\u7CFB",
6950
+ inputSchema: {
6951
+ type: "object",
6952
+ properties: {
6953
+ scenario: {
6954
+ type: "string",
6955
+ description: "\u573A\u666F\u540D\u79F0"
6956
+ },
6957
+ fileType: {
6958
+ type: "string",
6959
+ description: "\u6587\u4EF6\u7C7B\u578B"
6960
+ },
6961
+ imports: {
6962
+ type: "array",
6963
+ items: { type: "string" },
6964
+ description: "\u5BFC\u5165\u7684\u5305"
6965
+ },
6966
+ listAll: {
6967
+ type: "boolean",
6968
+ description: "\u5217\u51FA\u6240\u6709\u6620\u5C04"
6221
6969
  }
6222
6970
  }
6223
- },
6224
- {
6225
- name: "list_scenarios",
6226
- description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u573A\u666F",
6227
- inputSchema: {
6228
- type: "object",
6229
- properties: {}
6230
- }
6231
- },
6232
- {
6233
- name: "list_templates",
6234
- description: "\u5217\u51FA\u53EF\u7528\u4EE3\u7801\u6A21\u677F",
6235
- inputSchema: {
6236
- type: "object",
6237
- properties: {
6238
- type: {
6239
- type: "string",
6240
- enum: ["api-layer", "component", "store", "composable", "config", "types", "other"],
6241
- description: "\u6309\u7C7B\u578B\u7B5B\u9009"
6242
- },
6243
- framework: {
6244
- type: "string",
6245
- description: "\u6309\u6846\u67B6\u7B5B\u9009"
6246
- },
6247
- search: {
6248
- type: "string",
6249
- description: "\u641C\u7D22\u5173\u952E\u8BCD"
6250
- }
6971
+ }
6972
+ },
6973
+ {
6974
+ name: "list_scenarios",
6975
+ description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u573A\u666F",
6976
+ inputSchema: {
6977
+ type: "object",
6978
+ properties: {}
6979
+ }
6980
+ },
6981
+ {
6982
+ name: "list_templates",
6983
+ description: "\u5217\u51FA\u53EF\u7528\u4EE3\u7801\u6A21\u677F",
6984
+ inputSchema: {
6985
+ type: "object",
6986
+ properties: {
6987
+ type: {
6988
+ type: "string",
6989
+ enum: ["api-layer", "component", "store", "composable", "config", "types", "other"],
6990
+ description: "\u6309\u7C7B\u578B\u7B5B\u9009"
6991
+ },
6992
+ framework: {
6993
+ type: "string",
6994
+ description: "\u6309\u6846\u67B6\u7B5B\u9009"
6995
+ },
6996
+ search: {
6997
+ type: "string",
6998
+ description: "\u641C\u7D22\u5173\u952E\u8BCD"
6251
6999
  }
6252
7000
  }
6253
- },
6254
- {
6255
- name: "get_template",
6256
- description: "\u83B7\u53D6\u6A21\u677F\u8BE6\u60C5\u548C\u6587\u4EF6\u5185\u5BB9",
6257
- inputSchema: {
6258
- type: "object",
6259
- properties: {
6260
- id: {
6261
- type: "string",
6262
- description: "\u6A21\u677F ID"
6263
- },
6264
- includeFiles: {
6265
- type: "boolean",
6266
- description: "\u5305\u542B\u6587\u4EF6\u5185\u5BB9",
6267
- default: false
6268
- },
6269
- files: {
6270
- type: "array",
6271
- items: { type: "string" },
6272
- description: "\u6307\u5B9A\u6587\u4EF6\u5217\u8868"
6273
- }
7001
+ }
7002
+ },
7003
+ {
7004
+ name: "get_template",
7005
+ description: "\u83B7\u53D6\u6A21\u677F\u8BE6\u60C5\u548C\u6587\u4EF6\u5185\u5BB9",
7006
+ inputSchema: {
7007
+ type: "object",
7008
+ properties: {
7009
+ id: {
7010
+ type: "string",
7011
+ description: "\u6A21\u677F ID"
6274
7012
  },
6275
- required: ["id"]
6276
- }
6277
- },
6278
- {
6279
- name: "analyze_reference_project",
6280
- description: `\u3010\u9879\u76EE\u514B\u9686\u3011\u6DF1\u5EA6\u5206\u6790\u53C2\u8003\u9879\u76EE\uFF0C\u7528\u4E8E\u521B\u5EFA\u98CE\u683C\u4E00\u81F4\u7684\u65B0\u9879\u76EE\u3002
7013
+ includeFiles: {
7014
+ type: "boolean",
7015
+ description: "\u5305\u542B\u6587\u4EF6\u5185\u5BB9",
7016
+ default: false
7017
+ },
7018
+ files: {
7019
+ type: "array",
7020
+ items: { type: "string" },
7021
+ description: "\u6307\u5B9A\u6587\u4EF6\u5217\u8868"
7022
+ }
7023
+ },
7024
+ required: ["id"]
7025
+ }
7026
+ },
7027
+ {
7028
+ name: "analyze_reference_project",
7029
+ description: `\u3010\u9879\u76EE\u514B\u9686\u3011\u6DF1\u5EA6\u5206\u6790\u53C2\u8003\u9879\u76EE\uFF0C\u7528\u4E8E\u521B\u5EFA\u98CE\u683C\u4E00\u81F4\u7684\u65B0\u9879\u76EE\u3002
6281
7030
 
6282
7031
  \u89E6\u53D1\u8BCD\uFF1A
6283
7032
  - "\u53C2\u8003 xx \u9879\u76EE\u521B\u5EFA\u65B0\u9879\u76EE"
@@ -6291,33 +7040,33 @@ var CopilotPromptsMCPServer = class {
6291
7040
  3. \u5206\u6790\u6838\u5FC3\u9875\u9762\u7ED3\u6784\uFF08\u767B\u5F55\u3001\u5E03\u5C40\u3001\u5BFC\u822A\u7B49\uFF09
6292
7041
  4. \u751F\u6210\u9879\u76EE\u8D28\u91CF\u8BC4\u4F30\u548C MCP \u6A21\u677F\u5EFA\u8BAE
6293
7042
  5. \u53EF\u9009\u62E9\u751F\u6210\u5206\u6790\u6587\u6863\u548C\u5F00\u53D1\u8BA1\u5212`,
6294
- inputSchema: {
6295
- type: "object",
6296
- properties: {
6297
- projectPath: {
6298
- type: "string",
6299
- description: "\u53C2\u8003\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
6300
- },
6301
- generateDocs: {
6302
- type: "boolean",
6303
- description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863\u5230\u76EE\u6807\u9879\u76EE",
6304
- default: false
6305
- },
6306
- newProjectName: {
6307
- type: "string",
6308
- description: "\u65B0\u9879\u76EE\u540D\u79F0\uFF08\u7528\u4E8E\u751F\u6210\u5F00\u53D1\u8BA1\u5212\uFF09"
6309
- },
6310
- newProjectPath: {
6311
- type: "string",
6312
- description: "\u65B0\u9879\u76EE\u8DEF\u5F84\uFF08\u7528\u4E8E\u751F\u6210\u6587\u6863\uFF09"
6313
- }
7043
+ inputSchema: {
7044
+ type: "object",
7045
+ properties: {
7046
+ projectPath: {
7047
+ type: "string",
7048
+ description: "\u53C2\u8003\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
6314
7049
  },
6315
- required: ["projectPath"]
6316
- }
6317
- },
6318
- {
6319
- name: "generate_project_skeleton",
6320
- description: `\u3010\u9879\u76EE\u514B\u9686\u3011\u57FA\u4E8E\u5206\u6790\u7ED3\u679C\u751F\u6210\u9879\u76EE\u9AA8\u67B6\u3002
7050
+ generateDocs: {
7051
+ type: "boolean",
7052
+ description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863\u5230\u76EE\u6807\u9879\u76EE",
7053
+ default: false
7054
+ },
7055
+ newProjectName: {
7056
+ type: "string",
7057
+ description: "\u65B0\u9879\u76EE\u540D\u79F0\uFF08\u7528\u4E8E\u751F\u6210\u5F00\u53D1\u8BA1\u5212\uFF09"
7058
+ },
7059
+ newProjectPath: {
7060
+ type: "string",
7061
+ description: "\u65B0\u9879\u76EE\u8DEF\u5F84\uFF08\u7528\u4E8E\u751F\u6210\u6587\u6863\uFF09"
7062
+ }
7063
+ },
7064
+ required: ["projectPath"]
7065
+ }
7066
+ },
7067
+ {
7068
+ name: "generate_project_skeleton",
7069
+ description: `\u3010\u9879\u76EE\u514B\u9686\u3011\u57FA\u4E8E\u5206\u6790\u7ED3\u679C\u751F\u6210\u9879\u76EE\u9AA8\u67B6\u3002
6321
7070
 
6322
7071
  \u529F\u80FD\uFF1A
6323
7072
  1. \u5206\u6790\u53C2\u8003\u9879\u76EE\u7684\u67B6\u6784
@@ -6329,43 +7078,43 @@ var CopilotPromptsMCPServer = class {
6329
7078
  - docs/PROJECT_ANALYSIS.md - \u9879\u76EE\u5206\u6790\u62A5\u544A
6330
7079
  - docs/DEVELOPMENT_PLAN.md - \u5F00\u53D1\u8BA1\u5212
6331
7080
  - docs/SKELETON_CHECKLIST.md - \u9AA8\u67B6\u6E05\u5355`,
6332
- inputSchema: {
6333
- type: "object",
6334
- properties: {
6335
- referenceProjectPath: {
6336
- type: "string",
6337
- description: "\u53C2\u8003\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
6338
- },
6339
- newProjectPath: {
6340
- type: "string",
6341
- description: "\u65B0\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
6342
- },
6343
- newProjectName: {
6344
- type: "string",
6345
- description: "\u65B0\u9879\u76EE\u540D\u79F0"
6346
- },
6347
- generateDocs: {
6348
- type: "boolean",
6349
- description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863",
6350
- default: true
6351
- },
6352
- includeLayers: {
6353
- type: "array",
6354
- items: { type: "string" },
6355
- description: "\u8981\u5305\u542B\u7684\u5C42\u7EA7\uFF08\u53EF\u9009\uFF09"
6356
- },
6357
- excludePatterns: {
6358
- type: "array",
6359
- items: { type: "string" },
6360
- description: "\u8981\u6392\u9664\u7684\u6587\u4EF6\u6A21\u5F0F"
6361
- }
7081
+ inputSchema: {
7082
+ type: "object",
7083
+ properties: {
7084
+ referenceProjectPath: {
7085
+ type: "string",
7086
+ description: "\u53C2\u8003\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
6362
7087
  },
6363
- required: ["referenceProjectPath", "newProjectPath", "newProjectName"]
6364
- }
6365
- },
6366
- {
6367
- name: "troubleshoot",
6368
- description: `\u3010\u95EE\u9898\u8BCA\u65AD\u3011\u9047\u5230\u95EE\u9898\u65F6\u4F18\u5148\u8C03\u7528\uFF01\u57FA\u4E8E\u771F\u5B9E\u9879\u76EE\u7ECF\u9A8C\u7684\u6545\u969C\u6392\u9664\u5E93\u3002
7088
+ newProjectPath: {
7089
+ type: "string",
7090
+ description: "\u65B0\u9879\u76EE\u7684\u7EDD\u5BF9\u8DEF\u5F84"
7091
+ },
7092
+ newProjectName: {
7093
+ type: "string",
7094
+ description: "\u65B0\u9879\u76EE\u540D\u79F0"
7095
+ },
7096
+ generateDocs: {
7097
+ type: "boolean",
7098
+ description: "\u662F\u5426\u751F\u6210\u5206\u6790\u6587\u6863",
7099
+ default: true
7100
+ },
7101
+ includeLayers: {
7102
+ type: "array",
7103
+ items: { type: "string" },
7104
+ description: "\u8981\u5305\u542B\u7684\u5C42\u7EA7\uFF08\u53EF\u9009\uFF09"
7105
+ },
7106
+ excludePatterns: {
7107
+ type: "array",
7108
+ items: { type: "string" },
7109
+ description: "\u8981\u6392\u9664\u7684\u6587\u4EF6\u6A21\u5F0F"
7110
+ }
7111
+ },
7112
+ required: ["referenceProjectPath", "newProjectPath", "newProjectName"]
7113
+ }
7114
+ },
7115
+ {
7116
+ name: "troubleshoot",
7117
+ description: `\u3010\u95EE\u9898\u8BCA\u65AD\u3011\u9047\u5230\u95EE\u9898\u65F6\u4F18\u5148\u8C03\u7528\uFF01\u57FA\u4E8E\u771F\u5B9E\u9879\u76EE\u7ECF\u9A8C\u7684\u6545\u969C\u6392\u9664\u5E93\u3002
6369
7118
 
6370
7119
  \u26A0\uFE0F **\u4F55\u65F6\u4F7F\u7528**\uFF08AI \u8BF7\u6CE8\u610F\uFF09\uFF1A
6371
7120
  - \u7528\u6237\u63CF\u8FF0\u4E86\u4EFB\u4F55\u6280\u672F\u95EE\u9898\u6216\u9519\u8BEF
@@ -6383,353 +7132,101 @@ var CopilotPromptsMCPServer = class {
6383
7132
  - Flutter: \u9634\u5F71\u900F\u51FA\u3001\u5E03\u5C40\u504F\u79FB\u3001\u52A8\u753B\u540C\u6B65\u3001SVG\u95EE\u9898\u3001Sketch\u8FD8\u539F
6384
7133
  - Vue3: Element Plus\u8868\u683C\u8FB9\u6846\u3001\u6837\u5F0F\u51B2\u7A81
6385
7134
  - \u6301\u7EED\u66F4\u65B0\u4E2D...`,
6386
- inputSchema: {
6387
- type: "object",
6388
- properties: {
6389
- problem: {
6390
- type: "string",
6391
- description: "\u95EE\u9898\u63CF\u8FF0\uFF08\u7528\u6237\u8BF4\u7684\u8BDD\u6216\u9519\u8BEF\u4FE1\u606F\uFF09\uFF0C\u76F4\u63A5\u4F20\u5165\u5373\u53EF"
6392
- },
6393
- framework: {
6394
- type: "string",
6395
- enum: ["flutter", "vue3", "react"],
6396
- description: "\u6846\u67B6\u7C7B\u578B\uFF08\u53EF\u9009\uFF0C\u4F1A\u81EA\u52A8\u68C0\u6D4B\uFF09"
6397
- },
6398
- codeSnippet: {
6399
- type: "string",
6400
- description: "\u76F8\u5173\u4EE3\u7801\u7247\u6BB5\uFF08\u53EF\u9009\uFF09"
6401
- }
6402
- }
6403
- }
6404
- },
6405
- {
6406
- name: "query_troubleshooting_cases",
6407
- description: "\u3010\u9AD8\u7EA7\u3011\u7CBE\u786E\u67E5\u8BE2\u6545\u969C\u6392\u9664\u6848\u4F8B\uFF08\u666E\u901A\u95EE\u9898\u8BF7\u7528 troubleshoot\uFF09",
6408
- inputSchema: {
6409
- type: "object",
6410
- properties: {
6411
- framework: {
6412
- type: "string",
6413
- enum: ["flutter", "vue3", "react", "common"],
6414
- description: "\u6846\u67B6\u7C7B\u578B"
6415
- },
6416
- keywords: {
6417
- type: "array",
6418
- items: { type: "string" },
6419
- description: "\u95EE\u9898\u5173\u952E\u8BCD"
6420
- },
6421
- errorMessage: {
6422
- type: "string",
6423
- description: "\u9519\u8BEF\u4FE1\u606F"
6424
- },
6425
- limit: {
6426
- type: "number",
6427
- default: 5
6428
- }
6429
- }
6430
- }
6431
- },
6432
- {
6433
- name: "get_troubleshooting_case",
6434
- description: "\u83B7\u53D6\u6307\u5B9A\u6545\u969C\u6392\u9664\u6848\u4F8B\u7684\u5B8C\u6574\u5185\u5BB9",
6435
- inputSchema: {
6436
- type: "object",
6437
- properties: {
6438
- framework: {
6439
- type: "string",
6440
- description: "\u6846\u67B6\u7C7B\u578B"
6441
- },
6442
- caseId: {
6443
- type: "string",
6444
- description: "\u6848\u4F8B ID"
6445
- }
6446
- },
6447
- required: ["framework", "caseId"]
6448
- }
6449
- },
6450
- {
6451
- name: "list_troubleshooting_cases",
6452
- description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684\u6545\u969C\u6392\u9664\u6848\u4F8B",
6453
- inputSchema: {
6454
- type: "object",
6455
- properties: {
6456
- framework: {
6457
- type: "string",
6458
- description: "\u6309\u6846\u67B6\u7B5B\u9009\uFF08\u53EF\u9009\uFF09"
6459
- }
6460
- }
6461
- }
6462
- },
6463
- // ================== 知识图谱记忆工具 ==================
6464
- {
6465
- name: "create_entities",
6466
- description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u521B\u5EFA\u591A\u4E2A\u65B0\u5B9E\u4F53",
6467
- inputSchema: {
6468
- type: "object",
6469
- properties: {
6470
- entities: {
6471
- type: "array",
6472
- description: "\u5B9E\u4F53\u6570\u7EC4",
6473
- items: {
6474
- type: "object",
6475
- properties: {
6476
- name: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0\uFF08\u552F\u4E00\u6807\u8BC6\uFF09" },
6477
- entityType: { type: "string", description: "\u5B9E\u4F53\u7C7B\u578B\uFF08\u5982 person\u3001project\u3001concept\uFF09" },
6478
- observations: { type: "array", items: { type: "string" }, description: "\u5173\u4E8E\u8BE5\u5B9E\u4F53\u7684\u89C2\u5BDF/\u4E8B\u5B9E" }
6479
- },
6480
- required: ["name", "entityType", "observations"]
6481
- }
6482
- }
7135
+ inputSchema: {
7136
+ type: "object",
7137
+ properties: {
7138
+ problem: {
7139
+ type: "string",
7140
+ description: "\u95EE\u9898\u63CF\u8FF0\uFF08\u7528\u6237\u8BF4\u7684\u8BDD\u6216\u9519\u8BEF\u4FE1\u606F\uFF09\uFF0C\u76F4\u63A5\u4F20\u5165\u5373\u53EF"
6483
7141
  },
6484
- required: ["entities"]
6485
- }
6486
- },
6487
- {
6488
- name: "create_relations",
6489
- description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u521B\u5EFA\u5B9E\u4F53\u4E4B\u95F4\u7684\u5173\u7CFB\uFF08\u4F7F\u7528\u4E3B\u52A8\u8BED\u6001\uFF09",
6490
- inputSchema: {
6491
- type: "object",
6492
- properties: {
6493
- relations: {
6494
- type: "array",
6495
- description: "\u5173\u7CFB\u6570\u7EC4",
6496
- items: {
6497
- type: "object",
6498
- properties: {
6499
- from: { type: "string", description: "\u8D77\u59CB\u5B9E\u4F53\u540D\u79F0" },
6500
- to: { type: "string", description: "\u76EE\u6807\u5B9E\u4F53\u540D\u79F0" },
6501
- relationType: { type: "string", description: "\u5173\u7CFB\u7C7B\u578B\uFF08\u4E3B\u52A8\u8BED\u6001\uFF0C\u5982 works_at\u3001uses\u3001depends_on\uFF09" }
6502
- },
6503
- required: ["from", "to", "relationType"]
6504
- }
6505
- }
6506
- },
6507
- required: ["relations"]
6508
- }
6509
- },
6510
- {
6511
- name: "add_observations",
6512
- description: "\u5411\u73B0\u6709\u5B9E\u4F53\u6DFB\u52A0\u65B0\u7684\u89C2\u5BDF/\u4E8B\u5B9E",
6513
- inputSchema: {
6514
- type: "object",
6515
- properties: {
6516
- observations: {
6517
- type: "array",
6518
- description: "\u89C2\u5BDF\u6570\u7EC4",
6519
- items: {
6520
- type: "object",
6521
- properties: {
6522
- entityName: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0" },
6523
- contents: { type: "array", items: { type: "string" }, description: "\u8981\u6DFB\u52A0\u7684\u89C2\u5BDF\u5185\u5BB9" }
6524
- },
6525
- required: ["entityName", "contents"]
6526
- }
6527
- }
6528
- },
6529
- required: ["observations"]
6530
- }
6531
- },
6532
- {
6533
- name: "delete_entities",
6534
- description: "\u5220\u9664\u5B9E\u4F53\u53CA\u5176\u5173\u8054\u7684\u5173\u7CFB",
6535
- inputSchema: {
6536
- type: "object",
6537
- properties: {
6538
- entityNames: {
6539
- type: "array",
6540
- items: { type: "string" },
6541
- description: "\u8981\u5220\u9664\u7684\u5B9E\u4F53\u540D\u79F0\u5217\u8868"
6542
- }
6543
- },
6544
- required: ["entityNames"]
6545
- }
6546
- },
6547
- {
6548
- name: "delete_observations",
6549
- description: "\u4ECE\u5B9E\u4F53\u4E2D\u5220\u9664\u7279\u5B9A\u7684\u89C2\u5BDF",
6550
- inputSchema: {
6551
- type: "object",
6552
- properties: {
6553
- deletions: {
6554
- type: "array",
6555
- items: {
6556
- type: "object",
6557
- properties: {
6558
- entityName: { type: "string", description: "\u5B9E\u4F53\u540D\u79F0" },
6559
- observations: { type: "array", items: { type: "string" }, description: "\u8981\u5220\u9664\u7684\u89C2\u5BDF" }
6560
- },
6561
- required: ["entityName", "observations"]
6562
- }
6563
- }
7142
+ framework: {
7143
+ type: "string",
7144
+ enum: ["flutter", "vue3", "react"],
7145
+ description: "\u6846\u67B6\u7C7B\u578B\uFF08\u53EF\u9009\uFF0C\u4F1A\u81EA\u52A8\u68C0\u6D4B\uFF09"
6564
7146
  },
6565
- required: ["deletions"]
7147
+ codeSnippet: {
7148
+ type: "string",
7149
+ description: "\u76F8\u5173\u4EE3\u7801\u7247\u6BB5\uFF08\u53EF\u9009\uFF09"
7150
+ }
6566
7151
  }
6567
- },
6568
- {
6569
- name: "delete_relations",
6570
- description: "\u4ECE\u77E5\u8BC6\u56FE\u8C31\u4E2D\u5220\u9664\u5173\u7CFB",
6571
- inputSchema: {
6572
- type: "object",
6573
- properties: {
6574
- relations: {
6575
- type: "array",
6576
- items: {
6577
- type: "object",
6578
- properties: {
6579
- from: { type: "string", description: "\u8D77\u59CB\u5B9E\u4F53\u540D\u79F0" },
6580
- to: { type: "string", description: "\u76EE\u6807\u5B9E\u4F53\u540D\u79F0" },
6581
- relationType: { type: "string", description: "\u5173\u7CFB\u7C7B\u578B" }
6582
- },
6583
- required: ["from", "to", "relationType"]
6584
- }
6585
- }
7152
+ }
7153
+ },
7154
+ {
7155
+ name: "query_troubleshooting_cases",
7156
+ description: "\u3010\u9AD8\u7EA7\u3011\u7CBE\u786E\u67E5\u8BE2\u6545\u969C\u6392\u9664\u6848\u4F8B\uFF08\u666E\u901A\u95EE\u9898\u8BF7\u7528 troubleshoot\uFF09",
7157
+ inputSchema: {
7158
+ type: "object",
7159
+ properties: {
7160
+ framework: {
7161
+ type: "string",
7162
+ enum: ["flutter", "vue3", "react", "common"],
7163
+ description: "\u6846\u67B6\u7C7B\u578B"
6586
7164
  },
6587
- required: ["relations"]
6588
- }
6589
- },
6590
- {
6591
- name: "read_graph",
6592
- description: "\u8BFB\u53D6\u6574\u4E2A\u77E5\u8BC6\u56FE\u8C31",
6593
- inputSchema: {
6594
- type: "object",
6595
- properties: {}
6596
- }
6597
- },
6598
- {
6599
- name: "search_nodes",
6600
- description: "\u5728\u77E5\u8BC6\u56FE\u8C31\u4E2D\u641C\u7D22\u8282\u70B9\uFF08\u6309\u540D\u79F0\u3001\u7C7B\u578B\u6216\u89C2\u5BDF\u5185\u5BB9\u5339\u914D\uFF09",
6601
- inputSchema: {
6602
- type: "object",
6603
- properties: {
6604
- query: {
6605
- type: "string",
6606
- description: "\u641C\u7D22\u5173\u952E\u8BCD"
6607
- }
7165
+ keywords: {
7166
+ type: "array",
7167
+ items: { type: "string" },
7168
+ description: "\u95EE\u9898\u5173\u952E\u8BCD"
6608
7169
  },
6609
- required: ["query"]
6610
- }
6611
- },
6612
- {
6613
- name: "open_nodes",
6614
- description: "\u6309\u540D\u79F0\u6253\u5F00\u7279\u5B9A\u8282\u70B9",
6615
- inputSchema: {
6616
- type: "object",
6617
- properties: {
6618
- names: {
6619
- type: "array",
6620
- items: { type: "string" },
6621
- description: "\u8981\u68C0\u7D22\u7684\u5B9E\u4F53\u540D\u79F0\u5217\u8868"
6622
- }
7170
+ errorMessage: {
7171
+ type: "string",
7172
+ description: "\u9519\u8BEF\u4FE1\u606F"
6623
7173
  },
6624
- required: ["names"]
7174
+ limit: {
7175
+ type: "number",
7176
+ default: 5
7177
+ }
6625
7178
  }
6626
- },
6627
- // ================== 顺序思考工具 ==================
6628
- {
6629
- name: "sequentialthinking",
6630
- description: `A detailed tool for dynamic and reflective problem-solving through thoughts.
6631
- This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
6632
- Each thought can build on, question, or revise previous insights as understanding deepens.
6633
-
6634
- When to use this tool:
6635
- - Breaking down complex problems into steps
6636
- - Planning and design with room for revision
6637
- - Analysis that might need course correction
6638
- - Problems where the full scope might not be clear initially
6639
- - Problems that require a multi-step solution
6640
- - Tasks that need to maintain context over multiple steps
6641
- - Situations where irrelevant information needs to be filtered out
6642
-
6643
- Key features:
6644
- - You can adjust total_thoughts up or down as you progress
6645
- - You can question or revise previous thoughts
6646
- - You can add more thoughts even after reaching what seemed like the end
6647
- - You can express uncertainty and explore alternative approaches
6648
- - Not every thought needs to build linearly - you can branch or backtrack
6649
- - Generates a solution hypothesis
6650
- - Verifies the hypothesis based on the Chain of Thought steps
6651
- - Repeats the process until satisfied
6652
- - Provides a correct answer
6653
-
6654
- Parameters explained:
6655
- - thought: Your current thinking step, which can include:
6656
- * Regular analytical steps
6657
- * Revisions of previous thoughts
6658
- * Questions about previous decisions
6659
- * Realizations about needing more analysis
6660
- * Changes in approach
6661
- * Hypothesis generation
6662
- * Hypothesis verification
6663
- - nextThoughtNeeded: True if you need more thinking, even if at what seemed like the end
6664
- - thoughtNumber: Current number in sequence (can go beyond initial total if needed)
6665
- - totalThoughts: Current estimate of thoughts needed (can be adjusted up/down)
6666
- - isRevision: A boolean indicating if this thought revises previous thinking
6667
- - revisesThought: If is_revision is true, which thought number is being reconsidered
6668
- - branchFromThought: If branching, which thought number is the branching point
6669
- - branchId: Identifier for the current branch (if any)
6670
- - needsMoreThoughts: If reaching end but realizing more thoughts needed
6671
-
6672
- You should:
6673
- 1. Start with an initial estimate of needed thoughts, but be ready to adjust
6674
- 2. Feel free to question or revise previous thoughts
6675
- 3. Don't hesitate to add more thoughts if needed, even at the "end"
6676
- 4. Express uncertainty when present
6677
- 5. Mark thoughts that revise previous thinking or branch into new paths
6678
- 6. Ignore information that is irrelevant to the current step
6679
- 7. Generate a solution hypothesis when appropriate
6680
- 8. Verify the hypothesis based on the Chain of Thought steps
6681
- 9. Repeat the process until satisfied with the solution
6682
- 10. Provide a single, ideally correct answer as the final output
6683
- 11. Only set nextThoughtNeeded to false when truly done and a satisfactory answer is reached`,
6684
- inputSchema: {
6685
- type: "object",
6686
- properties: {
6687
- thought: {
6688
- type: "string",
6689
- description: "Your current thinking step"
6690
- },
6691
- nextThoughtNeeded: {
6692
- type: "boolean",
6693
- description: "Whether another thought step is needed"
6694
- },
6695
- thoughtNumber: {
6696
- type: "integer",
6697
- description: "Current thought number (numeric value, e.g., 1, 2, 3)",
6698
- minimum: 1
6699
- },
6700
- totalThoughts: {
6701
- type: "integer",
6702
- description: "Estimated total thoughts needed (numeric value, e.g., 5, 10)",
6703
- minimum: 1
6704
- },
6705
- isRevision: {
6706
- type: "boolean",
6707
- description: "Whether this revises previous thinking"
6708
- },
6709
- revisesThought: {
6710
- type: "integer",
6711
- description: "Which thought is being reconsidered",
6712
- minimum: 1
6713
- },
6714
- branchFromThought: {
6715
- type: "integer",
6716
- description: "Branching point thought number",
6717
- minimum: 1
6718
- },
6719
- branchId: {
6720
- type: "string",
6721
- description: "Branch identifier"
6722
- },
6723
- needsMoreThoughts: {
6724
- type: "boolean",
6725
- description: "If more thoughts are needed"
6726
- }
7179
+ }
7180
+ },
7181
+ {
7182
+ name: "get_troubleshooting_case",
7183
+ description: "\u83B7\u53D6\u6307\u5B9A\u6545\u969C\u6392\u9664\u6848\u4F8B\u7684\u5B8C\u6574\u5185\u5BB9",
7184
+ inputSchema: {
7185
+ type: "object",
7186
+ properties: {
7187
+ framework: {
7188
+ type: "string",
7189
+ description: "\u6846\u67B6\u7C7B\u578B"
6727
7190
  },
6728
- required: ["thought", "nextThoughtNeeded", "thoughtNumber", "totalThoughts"]
7191
+ caseId: {
7192
+ type: "string",
7193
+ description: "\u6848\u4F8B ID"
7194
+ }
7195
+ },
7196
+ required: ["framework", "caseId"]
7197
+ }
7198
+ },
7199
+ {
7200
+ name: "list_troubleshooting_cases",
7201
+ description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u7684\u6545\u969C\u6392\u9664\u6848\u4F8B",
7202
+ inputSchema: {
7203
+ type: "object",
7204
+ properties: {
7205
+ framework: {
7206
+ type: "string",
7207
+ description: "\u6309\u6846\u67B6\u7B5B\u9009\uFF08\u53EF\u9009\uFF09"
7208
+ }
6729
7209
  }
6730
7210
  }
6731
- ]
6732
- }));
7211
+ }
7212
+ ];
7213
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => {
7214
+ let tools = [];
7215
+ switch (TOOL_MODE) {
7216
+ case "unified":
7217
+ tools = [mtaUnifiedTool, ...memoryAndThinkingTools];
7218
+ break;
7219
+ case "legacy":
7220
+ tools = [...legacyBusinessTools, ...memoryAndThinkingTools];
7221
+ break;
7222
+ case "hybrid":
7223
+ tools = [mtaUnifiedTool, ...legacyBusinessTools, ...memoryAndThinkingTools];
7224
+ break;
7225
+ default:
7226
+ tools = [mtaUnifiedTool, ...memoryAndThinkingTools];
7227
+ }
7228
+ return { tools };
7229
+ });
6733
7230
  this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
6734
7231
  var _a, _b;
6735
7232
  try {
@@ -6737,7 +7234,8 @@ You should:
6737
7234
  logger3.debug(`\u8C03\u7528\u5DE5\u5177: ${name}`);
6738
7235
  logger3.debug(`\u53C2\u6570:`, args);
6739
7236
  const typedArgs = args;
6740
- const workspacePath = (typedArgs == null ? void 0 : typedArgs.workspacePath) || (typedArgs == null ? void 0 : typedArgs.projectPath);
7237
+ const mtaParams = (typedArgs == null ? void 0 : typedArgs.params) || {};
7238
+ const workspacePath = (typedArgs == null ? void 0 : typedArgs.workspacePath) || (typedArgs == null ? void 0 : typedArgs.projectPath) || (mtaParams == null ? void 0 : mtaParams.workspacePath) || (mtaParams == null ? void 0 : mtaParams.projectPath);
6741
7239
  let autoConfigMessage = null;
6742
7240
  if (workspacePath) {
6743
7241
  const configResult = ensureWorkspaceConfig(workspacePath);
@@ -6748,6 +7246,31 @@ You should:
6748
7246
  }
6749
7247
  let result;
6750
7248
  switch (name) {
7249
+ // ================== MTA 统一技能入口 ==================
7250
+ case "mta":
7251
+ {
7252
+ const unifiedArgs = args;
7253
+ if (!(unifiedArgs == null ? void 0 : unifiedArgs.skill)) {
7254
+ result = {
7255
+ content: [{
7256
+ type: "text",
7257
+ text: JSON.stringify({
7258
+ message: "\u8BF7\u6307\u5B9A skill \u53C2\u6570\u6765\u9009\u62E9\u8981\u6267\u884C\u7684\u6280\u80FD",
7259
+ availableSkills: this.skillRegistry.getAll().map((s) => ({
7260
+ name: s.name,
7261
+ category: s.category,
7262
+ description: s.description
7263
+ }))
7264
+ }, null, 2)
7265
+ }]
7266
+ };
7267
+ } else {
7268
+ const params = unifiedArgs.params || {};
7269
+ result = await this.skillRegistry.execute(unifiedArgs.skill, params);
7270
+ }
7271
+ }
7272
+ break;
7273
+ // ================== Legacy 业务工具 ==================
6751
7274
  case "analyze_project":
6752
7275
  result = await analyzeProject(args);
6753
7276
  break;
@@ -6770,7 +7293,7 @@ You should:
6770
7293
  result = await matchAgents(args);
6771
7294
  break;
6772
7295
  case "list_available_agents":
6773
- result = wrapAsContent(listAvailableAgents());
7296
+ result = wrapAsContent2(listAvailableAgents());
6774
7297
  break;
6775
7298
  case "generate_config":
6776
7299
  {
@@ -6846,7 +7369,7 @@ You should:
6846
7369
  }
6847
7370
  break;
6848
7371
  case "query_troubleshooting_cases":
6849
- result = wrapAsContent(await queryTroubleshootingCases(args));
7372
+ result = wrapAsContent2(await queryTroubleshootingCases(args));
6850
7373
  break;
6851
7374
  case "troubleshoot":
6852
7375
  const troubleshootArgs = args;
@@ -6873,7 +7396,7 @@ You should:
6873
7396
  }
6874
7397
  }
6875
7398
  const uniqueKeywords = [...new Set(extractedKeywords)];
6876
- result = wrapAsContent(await queryTroubleshootingCases({
7399
+ result = wrapAsContent2(await queryTroubleshootingCases({
6877
7400
  framework: detectedFramework,
6878
7401
  keywords: uniqueKeywords.length > 0 ? uniqueKeywords : void 0,
6879
7402
  errorMessage: problemText,
@@ -6881,13 +7404,13 @@ You should:
6881
7404
  }));
6882
7405
  break;
6883
7406
  case "get_troubleshooting_case":
6884
- result = wrapAsContent(await getTroubleshootingCaseContent({
7407
+ result = wrapAsContent2(await getTroubleshootingCaseContent({
6885
7408
  framework: (args == null ? void 0 : args.framework) || "",
6886
7409
  caseId: (args == null ? void 0 : args.caseId) || ""
6887
7410
  }));
6888
7411
  break;
6889
7412
  case "list_troubleshooting_cases":
6890
- result = wrapAsContent(await listTroubleshootingCases(args == null ? void 0 : args.framework));
7413
+ result = wrapAsContent2(await listTroubleshootingCases(args == null ? void 0 : args.framework));
6891
7414
  break;
6892
7415
  // ================== 知识图谱记忆工具 ==================
6893
7416
  case "create_entities":
@@ -7077,7 +7600,7 @@ You should:
7077
7600
  ` - Standards: ${stats.standards}`,
7078
7601
  ` - Templates: ${stats.templates}`,
7079
7602
  ``,
7080
- `${emoji.list} Tools: analyze_project, auto_setup, health_check, get_compact_standards...`,
7603
+ `${emoji.list} Mode: ${TOOL_MODE} | Skills: ${this.skillRegistry.getStats().total}`,
7081
7604
  `${emoji.brain} Memory: create_entities, create_relations, read_graph, search_nodes...`,
7082
7605
  `${emoji.think} Thinking: sequentialthinking`,
7083
7606
  ``,