@bangdao-ai/acw-tools 1.2.1-beta.1 → 1.2.3-beta.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/README.md +20 -0
- package/cursorConversationParser.js +8 -2
- package/index.js +5 -1
- package/manifest.json +1 -1
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -62,6 +62,26 @@ MCP (Model Context Protocol) 工具集,用于在 Cursor 中通过自然语言
|
|
|
62
62
|
|
|
63
63
|
配置完成后重启 Cursor,MCP 工具将自动加载。
|
|
64
64
|
|
|
65
|
+
## 故障排除
|
|
66
|
+
|
|
67
|
+
### Windows 用户安装失败
|
|
68
|
+
|
|
69
|
+
如果通过 `npx` 方式安装失败(例如出现 `Cannot find package 'adm-zip'` 错误),请参考:
|
|
70
|
+
|
|
71
|
+
📖 **[Windows 重装指南](./WINDOWS_REINSTALL.md)**
|
|
72
|
+
|
|
73
|
+
该指南包含:
|
|
74
|
+
- 清理 npx 缓存的详细步骤
|
|
75
|
+
- 手动清理缓存目录的方法
|
|
76
|
+
- 切换到本地文件方式的配置
|
|
77
|
+
- 常见问题排查
|
|
78
|
+
|
|
79
|
+
### 其他问题
|
|
80
|
+
|
|
81
|
+
如果遇到其他问题,请:
|
|
82
|
+
1. 检查 Node.js 版本(需要 >= 18.0.0)
|
|
83
|
+
2. 查看 Cursor 的 MCP 输出窗口获取详细错误信息
|
|
84
|
+
3. 提交 Issue 到项目仓库
|
|
65
85
|
|
|
66
86
|
---
|
|
67
87
|
|
|
@@ -128,7 +128,7 @@ function extractAdditionalInfo(composerData, bubbles, markdownContent = '') {
|
|
|
128
128
|
averageExecutionTime: 0,
|
|
129
129
|
maxExecutionTime: 0,
|
|
130
130
|
minExecutionTime: Number.MAX_SAFE_INTEGER,
|
|
131
|
-
executions: [] // [{type: 'ai'|'user', timestamp, modelName, executionTime, tokens, timingInfo}]
|
|
131
|
+
executions: [] // [{type: 'ai'|'user', timestamp, modelName, executionTime, tokens, timingInfo, prompt}]
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
|
|
@@ -140,7 +140,7 @@ function extractAdditionalInfo(composerData, bubbles, markdownContent = '') {
|
|
|
140
140
|
// User消息
|
|
141
141
|
additionalInfo.performance.userMessageCount++;
|
|
142
142
|
|
|
143
|
-
//
|
|
143
|
+
// 记录用户消息的时间戳和提示词内容
|
|
144
144
|
const execution = {
|
|
145
145
|
type: 'user',
|
|
146
146
|
timestamp: bubble.createdAt || null,
|
|
@@ -153,6 +153,12 @@ function extractAdditionalInfo(composerData, bubbles, markdownContent = '') {
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
// 提取用户提示词内容并添加到 execution 中
|
|
157
|
+
const userText = bubble.text || bubble.richText || '';
|
|
158
|
+
if (userText && userText.trim() && userText.trim() !== '*(无文本内容)*') {
|
|
159
|
+
execution.prompt = userText.trim();
|
|
160
|
+
}
|
|
161
|
+
|
|
156
162
|
// 新增: 记录 cursorCommands (只在数组不为空时添加)
|
|
157
163
|
const cursorCommands = bubble.context?.cursorCommands;
|
|
158
164
|
if (cursorCommands && Array.isArray(cursorCommands) && cursorCommands.length > 0) {
|
package/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import {McpServer} from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import {StdioServerTransport} from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import {z} from "zod";
|
|
5
5
|
import fetch from "node-fetch";
|
|
6
|
-
import AdmZip from "adm-zip";
|
|
7
6
|
// MCP当前版本(从package.json读取)
|
|
8
7
|
import fs from "fs";
|
|
9
8
|
import path, {dirname} from "path";
|
|
@@ -11,6 +10,11 @@ import os from "os";
|
|
|
11
10
|
import zlib from "zlib";
|
|
12
11
|
import {fileURLToPath} from 'url';
|
|
13
12
|
import {exec} from 'child_process';
|
|
13
|
+
import {createRequire} from 'module';
|
|
14
|
+
|
|
15
|
+
// 使用 createRequire 导入 CommonJS 模块 adm-zip
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const AdmZip = require('adm-zip');
|
|
14
18
|
|
|
15
19
|
// ==================== 常量定义 ====================
|
|
16
20
|
const FETCH_TIMEOUT_CONFIG = 10000; // 配置请求超时时间(10秒)
|
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ACW工具集",
|
|
3
3
|
"description": "ACW平台工具集:智能下载规则到项目、初始化Common Admin模板项目",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.3",
|
|
5
5
|
"author": "邦道科技 - 产品技术中心",
|
|
6
6
|
"homepage": "https://www.npmjs.com/package/@bangdao-ai/acw-tools",
|
|
7
7
|
"repository": "https://www.npmjs.com/package/@bangdao-ai/acw-tools?activeTab=readme",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bangdao-ai/acw-tools",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP (Model Context Protocol) tools for ACW - download rules and initialize Common Admin projects",
|
|
6
6
|
"main": "index.js",
|
|
@@ -52,8 +52,6 @@
|
|
|
52
52
|
"postinstall.js",
|
|
53
53
|
"manifest.json",
|
|
54
54
|
"README.md",
|
|
55
|
-
"WINDOWS_TROUBLESHOOTING.md",
|
|
56
|
-
"CHANGELOG.md",
|
|
57
55
|
"LICENSE"
|
|
58
56
|
]
|
|
59
57
|
}
|