@xfe-repo/cli-plugin-ai-mcp 2.0.1 → 2.0.3
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/CHANGELOG.md +28 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @xfe-repo/cli-plugin-ai-mcp
|
|
2
|
+
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 优化环境切换
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @xfe-repo/cli-plugin-ai-rules@2.0.3
|
|
10
|
+
- @xfe-repo/cli-core@2.0.4
|
|
11
|
+
|
|
12
|
+
## 2.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 新增xfe-repo包更新检测能力
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @xfe-repo/cli-plugin-ai-rules@2.0.2
|
|
19
|
+
- @xfe-repo/cli-core@2.0.3
|
|
20
|
+
|
|
21
|
+
## 2.0.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- add README.md
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- @xfe-repo/cli-plugin-ai-rules@2.0.1
|
|
28
|
+
- @xfe-repo/cli-core@2.0.2
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Agent 可通过 MCP 启动构建/调试任务并增量拉取编译日志。
|
|
6
6
|
* 支持动态端口:首选端口被占用时自动递增选择可用端口。
|
|
7
7
|
*
|
|
8
|
-
* 启用/停用通过 xfe mcp:enable / mcp:disable
|
|
9
|
-
*
|
|
8
|
+
* 启用/停用通过 xfe mcp:enable / mcp:disable 控制,开关存储在按项目分桶的本地状态文件
|
|
9
|
+
* (~/.xfe/projects/<projectKey>/state.json),端口配置保留在 xfe.json(项目共享)。
|
|
10
10
|
*/
|
|
11
11
|
import type { XfePlugin } from '@xfe-repo/cli-core';
|
|
12
12
|
type McpStatus = 'off' | 'running' | 'error';
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Agent 可通过 MCP 启动构建/调试任务并增量拉取编译日志。
|
|
6
6
|
* 支持动态端口:首选端口被占用时自动递增选择可用端口。
|
|
7
7
|
*
|
|
8
|
-
* 启用/停用通过 xfe mcp:enable / mcp:disable
|
|
9
|
-
*
|
|
8
|
+
* 启用/停用通过 xfe mcp:enable / mcp:disable 控制,开关存储在按项目分桶的本地状态文件
|
|
9
|
+
* (~/.xfe/projects/<projectKey>/state.json),端口配置保留在 xfe.json(项目共享)。
|
|
10
10
|
*/
|
|
11
11
|
import getPort, { portNumbers } from 'get-port';
|
|
12
12
|
import { aiRulesPlugin, SyncItemType } from '@xfe-repo/cli-plugin-ai-rules';
|
|
@@ -108,7 +108,7 @@ export function aiMcpPlugin() {
|
|
|
108
108
|
hooks.registerCommand({
|
|
109
109
|
name: 'mcp:enable',
|
|
110
110
|
simpleDescription: '启用 MCP Server',
|
|
111
|
-
description: '启用当前项目的 MCP Server
|
|
111
|
+
description: '启用当前项目的 MCP Server 并立即生效。开关状态按项目分桶存储在本地,不影响其他项目和其他开发者。',
|
|
112
112
|
async execute(ctx) {
|
|
113
113
|
ctx.store.setPluginState('ai-mcp', { enabled: true });
|
|
114
114
|
if (serverState) {
|
|
@@ -135,7 +135,7 @@ export function aiMcpPlugin() {
|
|
|
135
135
|
hooks.registerCommand({
|
|
136
136
|
name: 'mcp:disable',
|
|
137
137
|
simpleDescription: '停用 MCP Server',
|
|
138
|
-
description: '停用当前项目的 MCP Server
|
|
138
|
+
description: '停用当前项目的 MCP Server 并立即生效。开关状态按项目分桶存储在本地,不影响其他项目和其他开发者。',
|
|
139
139
|
async execute(ctx) {
|
|
140
140
|
ctx.store.setPluginState('ai-mcp', { enabled: false });
|
|
141
141
|
await stopRuntime(ctx);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/cli-plugin-ai-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "XFE CLI MCP Server 插件 —— 将 CLI 命令暴露为 MCP Tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"get-port": "^7.1.0",
|
|
12
12
|
"hono": "^4.7.0",
|
|
13
13
|
"zod": "^4.3.6",
|
|
14
|
-
"@xfe-repo/cli-core": "2.0.
|
|
15
|
-
"@xfe-repo/cli-plugin-ai-rules": "2.0.
|
|
14
|
+
"@xfe-repo/cli-core": "2.0.4",
|
|
15
|
+
"@xfe-repo/cli-plugin-ai-rules": "2.0.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "^24.3.0",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
|
+
"CHANGELOG.md",
|
|
23
24
|
"!dist/**/*.map"
|
|
24
25
|
],
|
|
25
26
|
"license": "ISC",
|