mta-mcp 2.2.0 → 2.3.1
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/bin/mta.cjs +43 -0
- package/dist/index.cjs +4784 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4769 -0
- package/dist/index.js.map +1 -0
- package/package.json +21 -10
- package/build/core/agentTemplate.d.ts +0 -33
- package/build/core/agentTemplate.d.ts.map +0 -1
- package/build/core/agentTemplate.js +0 -158
- package/build/core/agentTemplate.js.map +0 -1
- package/build/core/analyzers/eslint.d.ts +0 -51
- package/build/core/analyzers/eslint.d.ts.map +0 -1
- package/build/core/analyzers/eslint.js +0 -259
- package/build/core/analyzers/eslint.js.map +0 -1
- package/build/core/analyzers/index.d.ts +0 -9
- package/build/core/analyzers/index.d.ts.map +0 -1
- package/build/core/analyzers/index.js +0 -9
- package/build/core/analyzers/index.js.map +0 -1
- package/build/core/analyzers/registry.d.ts +0 -59
- package/build/core/analyzers/registry.d.ts.map +0 -1
- package/build/core/analyzers/registry.js +0 -241
- package/build/core/analyzers/registry.js.map +0 -1
- package/build/core/analyzers/tsconfig.d.ts +0 -45
- package/build/core/analyzers/tsconfig.d.ts.map +0 -1
- package/build/core/analyzers/tsconfig.js +0 -197
- package/build/core/analyzers/tsconfig.js.map +0 -1
- package/build/core/analyzers/types.d.ts +0 -176
- package/build/core/analyzers/types.d.ts.map +0 -1
- package/build/core/analyzers/types.js +0 -39
- package/build/core/analyzers/types.js.map +0 -1
- package/build/core/analyzers/vite.d.ts +0 -46
- package/build/core/analyzers/vite.d.ts.map +0 -1
- package/build/core/analyzers/vite.js +0 -211
- package/build/core/analyzers/vite.js.map +0 -1
- package/build/core/autoInitializer.d.ts +0 -34
- package/build/core/autoInitializer.d.ts.map +0 -1
- package/build/core/autoInitializer.js +0 -145
- package/build/core/autoInitializer.js.map +0 -1
- package/build/core/codeValidator.d.ts +0 -82
- package/build/core/codeValidator.d.ts.map +0 -1
- package/build/core/codeValidator.js +0 -287
- package/build/core/codeValidator.js.map +0 -1
- package/build/core/enhancedProjectAnalyzer.d.ts +0 -102
- package/build/core/enhancedProjectAnalyzer.d.ts.map +0 -1
- package/build/core/enhancedProjectAnalyzer.js +0 -312
- package/build/core/enhancedProjectAnalyzer.js.map +0 -1
- package/build/core/errors.d.ts +0 -84
- package/build/core/errors.d.ts.map +0 -1
- package/build/core/errors.js +0 -151
- package/build/core/errors.js.map +0 -1
- package/build/core/githubClient.d.ts +0 -26
- package/build/core/githubClient.d.ts.map +0 -1
- package/build/core/githubClient.js +0 -60
- package/build/core/githubClient.js.map +0 -1
- package/build/core/i18nDetector.d.ts +0 -47
- package/build/core/i18nDetector.d.ts.map +0 -1
- package/build/core/i18nDetector.js +0 -314
- package/build/core/i18nDetector.js.map +0 -1
- package/build/core/index.d.ts +0 -11
- package/build/core/index.d.ts.map +0 -1
- package/build/core/index.js +0 -14
- package/build/core/index.js.map +0 -1
- package/build/core/logger.d.ts +0 -91
- package/build/core/logger.d.ts.map +0 -1
- package/build/core/logger.js +0 -164
- package/build/core/logger.js.map +0 -1
- package/build/core/mappings/index.d.ts +0 -5
- package/build/core/mappings/index.d.ts.map +0 -1
- package/build/core/mappings/index.js +0 -5
- package/build/core/mappings/index.js.map +0 -1
- package/build/core/mappings/scenarioMappings.d.ts +0 -51
- package/build/core/mappings/scenarioMappings.d.ts.map +0 -1
- package/build/core/mappings/scenarioMappings.js +0 -105
- package/build/core/mappings/scenarioMappings.js.map +0 -1
- package/build/core/matching/index.d.ts +0 -8
- package/build/core/matching/index.d.ts.map +0 -1
- package/build/core/matching/index.js +0 -8
- package/build/core/matching/index.js.map +0 -1
- package/build/core/matching/intentAnalyzer.d.ts +0 -78
- package/build/core/matching/intentAnalyzer.d.ts.map +0 -1
- package/build/core/matching/intentAnalyzer.js +0 -255
- package/build/core/matching/intentAnalyzer.js.map +0 -1
- package/build/core/matching/standardMatcher.d.ts +0 -101
- package/build/core/matching/standardMatcher.d.ts.map +0 -1
- package/build/core/matching/standardMatcher.js +0 -299
- package/build/core/matching/standardMatcher.js.map +0 -1
- package/build/core/matching/weights.d.ts +0 -64
- package/build/core/matching/weights.d.ts.map +0 -1
- package/build/core/matching/weights.js +0 -334
- package/build/core/matching/weights.js.map +0 -1
- package/build/core/projectContextManager.d.ts +0 -39
- package/build/core/projectContextManager.d.ts.map +0 -1
- package/build/core/projectContextManager.js +0 -147
- package/build/core/projectContextManager.js.map +0 -1
- package/build/core/scenarioDetector.d.ts +0 -2
- package/build/core/scenarioDetector.d.ts.map +0 -1
- package/build/core/scenarioDetector.js +0 -2
- package/build/core/scenarioDetector.js.map +0 -1
- package/build/core/smartAgentMatcher.d.ts +0 -51
- package/build/core/smartAgentMatcher.d.ts.map +0 -1
- package/build/core/smartAgentMatcher.js +0 -493
- package/build/core/smartAgentMatcher.js.map +0 -1
- package/build/core/standardsManager.d.ts +0 -130
- package/build/core/standardsManager.d.ts.map +0 -1
- package/build/core/standardsManager.js +0 -600
- package/build/core/standardsManager.js.map +0 -1
- package/build/core/templates/discovery.d.ts +0 -41
- package/build/core/templates/discovery.d.ts.map +0 -1
- package/build/core/templates/discovery.js +0 -262
- package/build/core/templates/discovery.js.map +0 -1
- package/build/core/templates/types.d.ts +0 -80
- package/build/core/templates/types.d.ts.map +0 -1
- package/build/core/templates/types.js +0 -10
- package/build/core/templates/types.js.map +0 -1
- package/build/core/types.d.ts +0 -57
- package/build/core/types.d.ts.map +0 -1
- package/build/core/types.js +0 -22
- package/build/core/types.js.map +0 -1
- package/build/index.d.ts +0 -3
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -576
- package/build/index.js.map +0 -1
- package/build/tools/analyzeProject.d.ts +0 -12
- package/build/tools/analyzeProject.d.ts.map +0 -1
- package/build/tools/analyzeProject.js +0 -85
- package/build/tools/analyzeProject.js.map +0 -1
- package/build/tools/autoSetup.d.ts +0 -15
- package/build/tools/autoSetup.d.ts.map +0 -1
- package/build/tools/autoSetup.js +0 -291
- package/build/tools/autoSetup.js.map +0 -1
- package/build/tools/generateConfig.d.ts +0 -16
- package/build/tools/generateConfig.d.ts.map +0 -1
- package/build/tools/generateConfig.js +0 -379
- package/build/tools/generateConfig.js.map +0 -1
- package/build/tools/generateProjectAgent.d.ts +0 -15
- package/build/tools/generateProjectAgent.d.ts.map +0 -1
- package/build/tools/generateProjectAgent.js +0 -348
- package/build/tools/generateProjectAgent.js.map +0 -1
- package/build/tools/getCompactStandards.d.ts +0 -20
- package/build/tools/getCompactStandards.d.ts.map +0 -1
- package/build/tools/getCompactStandards.js +0 -367
- package/build/tools/getCompactStandards.js.map +0 -1
- package/build/tools/getSmartStandards.d.ts +0 -15
- package/build/tools/getSmartStandards.d.ts.map +0 -1
- package/build/tools/getSmartStandards.js +0 -201
- package/build/tools/getSmartStandards.js.map +0 -1
- package/build/tools/getStandardById.d.ts +0 -42
- package/build/tools/getStandardById.d.ts.map +0 -1
- package/build/tools/getStandardById.js +0 -289
- package/build/tools/getStandardById.js.map +0 -1
- package/build/tools/getTemplate.d.ts +0 -37
- package/build/tools/getTemplate.d.ts.map +0 -1
- package/build/tools/getTemplate.js +0 -78
- package/build/tools/getTemplate.js.map +0 -1
- package/build/tools/healthCheck.d.ts +0 -14
- package/build/tools/healthCheck.d.ts.map +0 -1
- package/build/tools/healthCheck.js +0 -237
- package/build/tools/healthCheck.js.map +0 -1
- package/build/tools/listAgents.d.ts +0 -10
- package/build/tools/listAgents.d.ts.map +0 -1
- package/build/tools/listAgents.js +0 -79
- package/build/tools/listAgents.js.map +0 -1
- package/build/tools/listTemplates.d.ts +0 -41
- package/build/tools/listTemplates.d.ts.map +0 -1
- package/build/tools/listTemplates.js +0 -81
- package/build/tools/listTemplates.js.map +0 -1
- package/build/tools/matchAgents.d.ts +0 -14
- package/build/tools/matchAgents.d.ts.map +0 -1
- package/build/tools/matchAgents.js +0 -70
- package/build/tools/matchAgents.js.map +0 -1
- package/build/tools/queryMappings.d.ts +0 -55
- package/build/tools/queryMappings.d.ts.map +0 -1
- package/build/tools/queryMappings.js +0 -119
- package/build/tools/queryMappings.js.map +0 -1
- package/build/tools/usePreset.d.ts +0 -23
- package/build/tools/usePreset.d.ts.map +0 -1
- package/build/tools/usePreset.js +0 -163
- package/build/tools/usePreset.js.map +0 -1
package/build/index.js
DELETED
|
@@ -1,576 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
-
import { analyzeProject } from './tools/analyzeProject.js';
|
|
6
|
-
import { matchAgents } from './tools/matchAgents.js';
|
|
7
|
-
import { listAvailableAgents } from './tools/listAgents.js';
|
|
8
|
-
import { generateConfig } from './tools/generateConfig.js';
|
|
9
|
-
import { autoSetup } from './tools/autoSetup.js';
|
|
10
|
-
import { getSmartStandards } from './tools/getSmartStandards.js';
|
|
11
|
-
import { usePreset, listPresets } from './tools/usePreset.js';
|
|
12
|
-
import { healthCheck } from './tools/healthCheck.js';
|
|
13
|
-
import { getCompactStandards } from './tools/getCompactStandards.js';
|
|
14
|
-
import { getStandardById } from './tools/getStandardById.js';
|
|
15
|
-
import { queryMappings, listScenarios } from './tools/queryMappings.js';
|
|
16
|
-
import { listTemplates } from './tools/listTemplates.js';
|
|
17
|
-
import { getTemplate } from './tools/getTemplate.js';
|
|
18
|
-
import { StandardsManager } from './core/standardsManager.js';
|
|
19
|
-
import { CodeValidator } from './core/codeValidator.js';
|
|
20
|
-
import { createLogger, errorResponse } from './core/index.js';
|
|
21
|
-
const SERVER_VERSION = '2.2.0'; // v2.2.0 质量保障系统
|
|
22
|
-
// 创建主 Logger
|
|
23
|
-
const logger = createLogger('Server');
|
|
24
|
-
/**
|
|
25
|
-
* Copilot Prompts MCP Server
|
|
26
|
-
* 智能项目分析和编码规范服务
|
|
27
|
-
*
|
|
28
|
-
* @version 1.7.0
|
|
29
|
-
* @features
|
|
30
|
-
* - 项目技术栈自动检测
|
|
31
|
-
* - 智能 Agent 匹配推荐
|
|
32
|
-
* - 配置文件自动生成
|
|
33
|
-
* - 动态编码规范资源
|
|
34
|
-
* - 跨平台 MCP 支持
|
|
35
|
-
* - Phase 4: 傻瓜模式增强
|
|
36
|
-
* * 一键自动配置
|
|
37
|
-
* * 零参数智能推荐
|
|
38
|
-
* * 预设场景快捷方式
|
|
39
|
-
* * 健康检查诊断
|
|
40
|
-
* - v1.1.0: 代码质量保障
|
|
41
|
-
* * 自动语法验证
|
|
42
|
-
* * 代码完整性检查
|
|
43
|
-
* * 自动修复常见错误
|
|
44
|
-
* * 多场景兼容性测试
|
|
45
|
-
*/
|
|
46
|
-
class CopilotPromptsMCPServer {
|
|
47
|
-
server;
|
|
48
|
-
standardsManager;
|
|
49
|
-
codeValidator;
|
|
50
|
-
constructor() {
|
|
51
|
-
this.standardsManager = new StandardsManager();
|
|
52
|
-
this.codeValidator = new CodeValidator();
|
|
53
|
-
this.server = new Server({
|
|
54
|
-
name: 'mta',
|
|
55
|
-
version: SERVER_VERSION,
|
|
56
|
-
}, {
|
|
57
|
-
capabilities: {
|
|
58
|
-
tools: {},
|
|
59
|
-
resources: {},
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
this.setupToolHandlers();
|
|
63
|
-
this.setupResourceHandlers();
|
|
64
|
-
this.setupErrorHandlers();
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* 设置错误处理器
|
|
68
|
-
*/
|
|
69
|
-
setupErrorHandlers() {
|
|
70
|
-
this.server.onerror = (error) => {
|
|
71
|
-
logger.error('MCP 服务器错误', error);
|
|
72
|
-
};
|
|
73
|
-
process.on('SIGINT', async () => {
|
|
74
|
-
logger.info('收到关闭信号,正在关闭服务器...');
|
|
75
|
-
await this.server.close();
|
|
76
|
-
process.exit(0);
|
|
77
|
-
});
|
|
78
|
-
process.on('SIGTERM', async () => {
|
|
79
|
-
logger.info('收到终止信号,正在关闭服务器...');
|
|
80
|
-
await this.server.close();
|
|
81
|
-
process.exit(0);
|
|
82
|
-
});
|
|
83
|
-
process.on('uncaughtException', (error) => {
|
|
84
|
-
logger.error('未捕获的异常:', error);
|
|
85
|
-
process.exit(1);
|
|
86
|
-
});
|
|
87
|
-
process.on('unhandledRejection', (reason, promise) => {
|
|
88
|
-
logger.error('未处理的 Promise 拒绝:', reason);
|
|
89
|
-
process.exit(1);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
setupToolHandlers() {
|
|
93
|
-
// 列出所有可用工具
|
|
94
|
-
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
95
|
-
tools: [
|
|
96
|
-
{
|
|
97
|
-
name: 'analyze_project',
|
|
98
|
-
description: '分析项目的技术栈、框架、工具和特征。自动检测 Vue、React、TypeScript 等技术。路径可选,不填则自动检测当前工作区。',
|
|
99
|
-
inputSchema: {
|
|
100
|
-
type: 'object',
|
|
101
|
-
properties: {
|
|
102
|
-
projectPath: {
|
|
103
|
-
type: 'string',
|
|
104
|
-
description: '项目的绝对路径(可选,不填则使用当前工作目录),例如: /Users/username/projects/my-app',
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'auto_setup',
|
|
111
|
-
description: '🎯 一键自动配置 MCP 服务器和项目规范。自动创建 .vscode/mcp.json、settings.json、extensions.json,并分析项目生成 .github/copilot-instructions.md 配置文件。',
|
|
112
|
-
inputSchema: {
|
|
113
|
-
type: 'object',
|
|
114
|
-
properties: {
|
|
115
|
-
workspacePath: {
|
|
116
|
-
type: 'string',
|
|
117
|
-
description: '工作区路径(可选,不填则使用当前目录)',
|
|
118
|
-
},
|
|
119
|
-
generateInstructions: {
|
|
120
|
-
type: 'boolean',
|
|
121
|
-
description: '是否自动生成 copilot-instructions.md(默认 true)',
|
|
122
|
-
default: true,
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'health_check',
|
|
129
|
-
description: '🏥 检查 MCP 服务器健康状态,诊断配置问题。返回详细的健康报告和修复建议。',
|
|
130
|
-
inputSchema: {
|
|
131
|
-
type: 'object',
|
|
132
|
-
properties: {
|
|
133
|
-
workspacePath: {
|
|
134
|
-
type: 'string',
|
|
135
|
-
description: '工作区路径(可选)',
|
|
136
|
-
},
|
|
137
|
-
verbose: {
|
|
138
|
-
type: 'boolean',
|
|
139
|
-
description: '是否显示详细信息(默认 false)',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: 'get_smart_standards',
|
|
146
|
-
description: '🧠 零参数智能规范推荐。自动检测当前文件类型、导入、场景,推荐最相关的编码规范。比手动指定参数更简单。',
|
|
147
|
-
inputSchema: {
|
|
148
|
-
type: 'object',
|
|
149
|
-
properties: {
|
|
150
|
-
currentFile: {
|
|
151
|
-
type: 'string',
|
|
152
|
-
description: '当前编辑的文件路径(可选)',
|
|
153
|
-
},
|
|
154
|
-
fileContent: {
|
|
155
|
-
type: 'string',
|
|
156
|
-
description: '文件内容(可选,用于分析导入和场景)',
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'use_preset',
|
|
163
|
-
description: '⚡ 使用预设场景快捷获取规范。支持 vue3-component、vue3-form、pinia-store、api-call 等常见场景,一键获取。',
|
|
164
|
-
inputSchema: {
|
|
165
|
-
type: 'object',
|
|
166
|
-
properties: {
|
|
167
|
-
preset: {
|
|
168
|
-
type: 'string',
|
|
169
|
-
enum: ['vue3-component', 'vue3-form', 'vue3-table', 'pinia-store', 'api-call', 'typescript-strict', 'i18n', 'composable'],
|
|
170
|
-
description: '预设场景 ID',
|
|
171
|
-
},
|
|
172
|
-
customImports: {
|
|
173
|
-
type: 'array',
|
|
174
|
-
items: { type: 'string' },
|
|
175
|
-
description: '额外的导入(可选)',
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
required: ['preset'],
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: 'list_presets',
|
|
183
|
-
description: '📋 列出所有可用的预设场景及其说明。',
|
|
184
|
-
inputSchema: {
|
|
185
|
-
type: 'object',
|
|
186
|
-
properties: {},
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: 'match_agents',
|
|
191
|
-
description: '根据项目特征智能匹配最合适的 Copilot Agents。使用加权评分算法。',
|
|
192
|
-
inputSchema: {
|
|
193
|
-
type: 'object',
|
|
194
|
-
properties: {
|
|
195
|
-
projectFeatures: {
|
|
196
|
-
type: 'object',
|
|
197
|
-
description: '项目特征对象(从 analyze_project 获取)',
|
|
198
|
-
properties: {
|
|
199
|
-
frameworks: { type: 'array', items: { type: 'string' } },
|
|
200
|
-
languages: { type: 'array', items: { type: 'string' } },
|
|
201
|
-
tools: { type: 'array', items: { type: 'string' } },
|
|
202
|
-
keywords: { type: 'array', items: { type: 'string' } },
|
|
203
|
-
projectType: { type: 'string' },
|
|
204
|
-
},
|
|
205
|
-
required: ['frameworks', 'languages', 'tools', 'keywords', 'projectType'],
|
|
206
|
-
},
|
|
207
|
-
limit: {
|
|
208
|
-
type: 'number',
|
|
209
|
-
description: '返回的最大 Agent 数量(默认 10)',
|
|
210
|
-
default: 10,
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
required: ['projectFeatures'],
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
name: 'list_available_agents',
|
|
218
|
-
description: '获取所有可用的 Copilot Agents 列表,包括名称、描述、路径等信息。',
|
|
219
|
-
inputSchema: {
|
|
220
|
-
type: 'object',
|
|
221
|
-
properties: {},
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: 'generate_config',
|
|
226
|
-
description: '为项目生成 Copilot 配置文件(.github/copilot-instructions.md)。可以自动匹配或手动指定 Agents。',
|
|
227
|
-
inputSchema: {
|
|
228
|
-
type: 'object',
|
|
229
|
-
properties: {
|
|
230
|
-
projectPath: {
|
|
231
|
-
type: 'string',
|
|
232
|
-
description: '项目的绝对路径',
|
|
233
|
-
},
|
|
234
|
-
agentIds: {
|
|
235
|
-
type: 'array',
|
|
236
|
-
items: { type: 'string' },
|
|
237
|
-
description: '要应用的 Agent ID 列表(可选,如不提供则自动匹配)',
|
|
238
|
-
},
|
|
239
|
-
autoMatch: {
|
|
240
|
-
type: 'boolean',
|
|
241
|
-
description: '是否自动匹配 Agents(默认 true)',
|
|
242
|
-
default: true,
|
|
243
|
-
},
|
|
244
|
-
updateMode: {
|
|
245
|
-
type: 'string',
|
|
246
|
-
enum: ['merge', 'overwrite'],
|
|
247
|
-
description: '更新模式:merge-保留自定义内容(默认),overwrite-完全覆盖',
|
|
248
|
-
default: 'merge',
|
|
249
|
-
},
|
|
250
|
-
configId: {
|
|
251
|
-
type: 'string',
|
|
252
|
-
description: '配置方案ID(如 strict),会加载对应的详细规则',
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
required: ['projectPath'],
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
name: 'get_compact_standards',
|
|
260
|
-
description: '🚀 Token 优化版规范获取。支持三种模式:summary(~500 tokens)仅返回规范列表、key-rules(~2000 tokens)返回关键规则摘要、full(完整内容)。默认 key-rules 模式,比完整加载节省 80%+ token。',
|
|
261
|
-
inputSchema: {
|
|
262
|
-
type: 'object',
|
|
263
|
-
properties: {
|
|
264
|
-
currentFile: {
|
|
265
|
-
type: 'string',
|
|
266
|
-
description: '当前文件路径(可选)',
|
|
267
|
-
},
|
|
268
|
-
fileContent: {
|
|
269
|
-
type: 'string',
|
|
270
|
-
description: '文件内容(可选,用于分析)',
|
|
271
|
-
},
|
|
272
|
-
scenario: {
|
|
273
|
-
type: 'string',
|
|
274
|
-
description: '开发场景(可选)',
|
|
275
|
-
},
|
|
276
|
-
mode: {
|
|
277
|
-
type: 'string',
|
|
278
|
-
enum: ['summary', 'key-rules', 'full'],
|
|
279
|
-
description: '返回模式:summary(~500 tokens)、key-rules(~2000 tokens,默认)、full(完整内容)',
|
|
280
|
-
default: 'key-rules',
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: 'get_relevant_standards',
|
|
287
|
-
description: '根据当前开发上下文,获取相关的编码规范(完整内容)。如需节省 token,请使用 get_compact_standards。',
|
|
288
|
-
inputSchema: {
|
|
289
|
-
type: 'object',
|
|
290
|
-
properties: {
|
|
291
|
-
fileType: {
|
|
292
|
-
type: 'string',
|
|
293
|
-
description: '文件类型(如 vue, ts, tsx, js)',
|
|
294
|
-
},
|
|
295
|
-
imports: {
|
|
296
|
-
type: 'array',
|
|
297
|
-
items: { type: 'string' },
|
|
298
|
-
description: '文件中的 import 语句(如 ["vue", "pinia", "element-plus"])。如果未提供且提供了 fileContent,将自动检测。',
|
|
299
|
-
},
|
|
300
|
-
scenario: {
|
|
301
|
-
type: 'string',
|
|
302
|
-
description: '开发场景描述(如 "创建表单组件", "API 调用", "状态管理")',
|
|
303
|
-
},
|
|
304
|
-
fileContent: {
|
|
305
|
-
type: 'string',
|
|
306
|
-
description: '文件内容(可选)。提供后可自动检测 imports 并根据关键词智能匹配规范。',
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
name: 'get_standards_stats',
|
|
313
|
-
description: '获取规范系统的使用统计和性能指标。用于了解最常用的规范组合、缓存命中率、Token 节省情况等。',
|
|
314
|
-
inputSchema: {
|
|
315
|
-
type: 'object',
|
|
316
|
-
properties: {
|
|
317
|
-
includeCache: {
|
|
318
|
-
type: 'boolean',
|
|
319
|
-
description: '是否包含缓存详细信息(默认 false)',
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
name: 'get_standard_by_id',
|
|
326
|
-
description: '📖 按 ID 直接获取规范。AI 知道需要什么规范时,直接按 ID 获取,最简洁高效。支持三种模式:summary(摘要)、key-rules(关键规则,默认)、full(完整内容)。',
|
|
327
|
-
inputSchema: {
|
|
328
|
-
type: 'object',
|
|
329
|
-
properties: {
|
|
330
|
-
id: {
|
|
331
|
-
type: 'string',
|
|
332
|
-
description: '规范 ID(如 vue3-composition, element-plus, pinia)',
|
|
333
|
-
},
|
|
334
|
-
ids: {
|
|
335
|
-
type: 'array',
|
|
336
|
-
items: { type: 'string' },
|
|
337
|
-
description: '多个规范 ID,批量获取',
|
|
338
|
-
},
|
|
339
|
-
mode: {
|
|
340
|
-
type: 'string',
|
|
341
|
-
enum: ['summary', 'key-rules', 'full'],
|
|
342
|
-
description: '加载模式:summary(摘要)、key-rules(关键规则,默认)、full(完整内容)',
|
|
343
|
-
default: 'key-rules',
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
name: 'query_mappings',
|
|
350
|
-
description: '🗺️ 查询场景-规范映射关系。提供映射信息给 AI 参考,AI 自己决定使用哪些规范。不做"智能推荐",只提供数据查询。',
|
|
351
|
-
inputSchema: {
|
|
352
|
-
type: 'object',
|
|
353
|
-
properties: {
|
|
354
|
-
scenario: {
|
|
355
|
-
type: 'string',
|
|
356
|
-
description: '场景名称(如 vue3-form, api-call, pinia-store)',
|
|
357
|
-
},
|
|
358
|
-
fileType: {
|
|
359
|
-
type: 'string',
|
|
360
|
-
description: '文件类型(如 vue, ts, tsx)',
|
|
361
|
-
},
|
|
362
|
-
imports: {
|
|
363
|
-
type: 'array',
|
|
364
|
-
items: { type: 'string' },
|
|
365
|
-
description: '导入的包(如 element-plus, pinia)',
|
|
366
|
-
},
|
|
367
|
-
listAll: {
|
|
368
|
-
type: 'boolean',
|
|
369
|
-
description: '列出所有映射关系',
|
|
370
|
-
},
|
|
371
|
-
},
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
name: 'list_scenarios',
|
|
376
|
-
description: '📋 列出所有可用的场景名称。AI 可使用这些场景名称调用 use_preset 或 query_mappings。',
|
|
377
|
-
inputSchema: {
|
|
378
|
-
type: 'object',
|
|
379
|
-
properties: {},
|
|
380
|
-
},
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
name: 'list_templates',
|
|
384
|
-
description: '📦 列出可用的代码模板。模板是可复用的代码片段,AI 可根据需要选择并应用到目标项目。',
|
|
385
|
-
inputSchema: {
|
|
386
|
-
type: 'object',
|
|
387
|
-
properties: {
|
|
388
|
-
type: {
|
|
389
|
-
type: 'string',
|
|
390
|
-
enum: ['api-layer', 'component', 'store', 'composable', 'config', 'types', 'other'],
|
|
391
|
-
description: '按类型筛选',
|
|
392
|
-
},
|
|
393
|
-
framework: {
|
|
394
|
-
type: 'string',
|
|
395
|
-
description: '按框架筛选(如 vue, react)',
|
|
396
|
-
},
|
|
397
|
-
search: {
|
|
398
|
-
type: 'string',
|
|
399
|
-
description: '搜索关键词',
|
|
400
|
-
},
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
name: 'get_template',
|
|
406
|
-
description: '📄 获取模板详情和文件内容。AI 可根据配置说明自行修改并应用模板。',
|
|
407
|
-
inputSchema: {
|
|
408
|
-
type: 'object',
|
|
409
|
-
properties: {
|
|
410
|
-
id: {
|
|
411
|
-
type: 'string',
|
|
412
|
-
description: '模板 ID(如 vue/api-layer)',
|
|
413
|
-
},
|
|
414
|
-
includeFiles: {
|
|
415
|
-
type: 'boolean',
|
|
416
|
-
description: '是否包含文件内容(默认 false,只返回配置说明)',
|
|
417
|
-
default: false,
|
|
418
|
-
},
|
|
419
|
-
files: {
|
|
420
|
-
type: 'array',
|
|
421
|
-
items: { type: 'string' },
|
|
422
|
-
description: '指定要获取的文件列表(可选)',
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
required: ['id'],
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
],
|
|
429
|
-
}));
|
|
430
|
-
// 处理工具调用
|
|
431
|
-
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
432
|
-
try {
|
|
433
|
-
const { name, arguments: args } = request.params;
|
|
434
|
-
logger.debug(`调用工具: ${name}`);
|
|
435
|
-
logger.debug(`参数:`, args);
|
|
436
|
-
switch (name) {
|
|
437
|
-
case 'analyze_project':
|
|
438
|
-
return await analyzeProject(args);
|
|
439
|
-
case 'auto_setup':
|
|
440
|
-
return await autoSetup(args);
|
|
441
|
-
case 'health_check':
|
|
442
|
-
return await healthCheck(args);
|
|
443
|
-
case 'get_smart_standards':
|
|
444
|
-
return await getSmartStandards(args);
|
|
445
|
-
case 'use_preset':
|
|
446
|
-
return await usePreset(args);
|
|
447
|
-
case 'list_presets':
|
|
448
|
-
return await listPresets();
|
|
449
|
-
case 'match_agents':
|
|
450
|
-
return await matchAgents(args);
|
|
451
|
-
case 'list_available_agents':
|
|
452
|
-
return await listAvailableAgents();
|
|
453
|
-
case 'generate_config':
|
|
454
|
-
return await generateConfig(args);
|
|
455
|
-
case 'get_compact_standards':
|
|
456
|
-
return await getCompactStandards(args);
|
|
457
|
-
case 'get_relevant_standards':
|
|
458
|
-
return this.getRelevantStandards(args);
|
|
459
|
-
case 'get_standards_stats':
|
|
460
|
-
return this.getStandardsStats(args);
|
|
461
|
-
case 'get_standard_by_id':
|
|
462
|
-
return await getStandardById(args);
|
|
463
|
-
case 'query_mappings':
|
|
464
|
-
return await queryMappings(args);
|
|
465
|
-
case 'list_scenarios':
|
|
466
|
-
return await listScenarios();
|
|
467
|
-
case 'list_templates':
|
|
468
|
-
return await listTemplates(args);
|
|
469
|
-
case 'get_template':
|
|
470
|
-
return await getTemplate(args);
|
|
471
|
-
default:
|
|
472
|
-
throw new Error(`未知工具: ${name}`);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
catch (error) {
|
|
476
|
-
logger.error(`工具执行失败:`, error);
|
|
477
|
-
return errorResponse(error);
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* 设置资源处理器
|
|
483
|
-
*/
|
|
484
|
-
setupResourceHandlers() {
|
|
485
|
-
// 列出所有可用资源
|
|
486
|
-
this.server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
487
|
-
const standards = this.standardsManager.getAvailableStandards();
|
|
488
|
-
return {
|
|
489
|
-
resources: standards.map(std => ({
|
|
490
|
-
uri: std.uri,
|
|
491
|
-
name: std.name,
|
|
492
|
-
description: std.description,
|
|
493
|
-
mimeType: 'text/markdown'
|
|
494
|
-
}))
|
|
495
|
-
};
|
|
496
|
-
});
|
|
497
|
-
// 读取特定资源
|
|
498
|
-
this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
499
|
-
const { uri } = request.params;
|
|
500
|
-
try {
|
|
501
|
-
const content = this.standardsManager.readStandard(uri);
|
|
502
|
-
return {
|
|
503
|
-
contents: [{
|
|
504
|
-
uri,
|
|
505
|
-
mimeType: 'text/markdown',
|
|
506
|
-
text: content
|
|
507
|
-
}]
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
catch (error) {
|
|
511
|
-
throw new Error(`无法读取规范 ${uri}: ${error}`);
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* 获取相关编码规范
|
|
517
|
-
*/
|
|
518
|
-
getRelevantStandards(args) {
|
|
519
|
-
// 获取相关规范 URI 列表
|
|
520
|
-
const standardUris = this.standardsManager.getRelevantStandards(args);
|
|
521
|
-
// 组合规范内容
|
|
522
|
-
const content = this.standardsManager.combineStandards(standardUris);
|
|
523
|
-
return {
|
|
524
|
-
content: [{
|
|
525
|
-
type: 'text',
|
|
526
|
-
text: JSON.stringify({
|
|
527
|
-
success: true,
|
|
528
|
-
standards: standardUris,
|
|
529
|
-
content: content,
|
|
530
|
-
tokenEstimate: Math.ceil(content.length / 4), // 粗略估算 token 数
|
|
531
|
-
message: `已加载 ${standardUris.length} 个相关规范`
|
|
532
|
-
}, null, 2)
|
|
533
|
-
}]
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* 获取规范系统统计信息(Phase 3)
|
|
538
|
-
*/
|
|
539
|
-
getStandardsStats(args) {
|
|
540
|
-
const usageStats = this.standardsManager.getUsageStats();
|
|
541
|
-
const performanceMetrics = this.standardsManager.getPerformanceMetrics();
|
|
542
|
-
const result = {
|
|
543
|
-
success: true,
|
|
544
|
-
usage: usageStats,
|
|
545
|
-
performance: performanceMetrics,
|
|
546
|
-
summary: {
|
|
547
|
-
totalCalls: usageStats.totalCalls,
|
|
548
|
-
cacheHitRate: performanceMetrics.cacheHitRate,
|
|
549
|
-
totalTokensSaved: performanceMetrics.totalTokensSaved,
|
|
550
|
-
averageResponseTime: `${performanceMetrics.averageResponseTime.toFixed(2)}ms`
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
// 如果需要缓存详情
|
|
554
|
-
if (args.includeCache) {
|
|
555
|
-
result.cache = this.standardsManager.getCacheStats();
|
|
556
|
-
}
|
|
557
|
-
return {
|
|
558
|
-
content: [{
|
|
559
|
-
type: 'text',
|
|
560
|
-
text: JSON.stringify(result, null, 2)
|
|
561
|
-
}]
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
async run() {
|
|
565
|
-
const transport = new StdioServerTransport();
|
|
566
|
-
await this.server.connect(transport);
|
|
567
|
-
logger.info(`Copilot Prompts MCP Server v${SERVER_VERSION} 已启动`);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
// 启动服务器
|
|
571
|
-
const server = new CopilotPromptsMCPServer();
|
|
572
|
-
server.run().catch((error) => {
|
|
573
|
-
logger.error('服务器启动失败:', error);
|
|
574
|
-
process.exit(1);
|
|
575
|
-
});
|
|
576
|
-
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,M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