cheatengine 5.8.11 → 5.8.13
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/cheatengine +25 -3
- package/ce_mcp_server.py +1 -1
- package/package.json +1 -1
package/bin/cheatengine
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Cheat Engine MCP Server - NPX wrapper
|
|
4
4
|
* 调用Python运行ce_mcp_server.py
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const { spawn } = require('child_process');
|
|
8
8
|
const path = require('path');
|
|
9
|
+
const fs = require('fs');
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// 找到包根目录(兼容 npx/npm install 各种情况)
|
|
12
|
+
function findPackageRoot() {
|
|
13
|
+
// 方法1: 通过 package.json 定位
|
|
14
|
+
try {
|
|
15
|
+
const pkgPath = require.resolve('cheatengine/package.json');
|
|
16
|
+
return path.dirname(pkgPath);
|
|
17
|
+
} catch (e) {
|
|
18
|
+
// 方法2: 通过当前文件相对路径
|
|
19
|
+
return path.join(__dirname, '..');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
11
22
|
|
|
12
|
-
|
|
23
|
+
const packageRoot = findPackageRoot();
|
|
24
|
+
const pythonScript = path.join(packageRoot, 'ce_mcp_server.py');
|
|
25
|
+
|
|
26
|
+
// 验证Python脚本存在
|
|
27
|
+
if (!fs.existsSync(pythonScript)) {
|
|
28
|
+
console.error('[cheatengine] 错误: 找不到 ce_mcp_server.py');
|
|
29
|
+
console.error('查找路径:', pythonScript);
|
|
30
|
+
console.error('包根目录:', packageRoot);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 检测Python命令
|
|
13
35
|
const pythonCmd = process.platform === 'win32' ? 'python' : 'python3';
|
|
14
36
|
|
|
15
37
|
const proc = spawn(pythonCmd, [pythonScript], {
|
package/ce_mcp_server.py
CHANGED
|
@@ -2356,7 +2356,7 @@ class CEMCPServer:
|
|
|
2356
2356
|
"result": {
|
|
2357
2357
|
"protocolVersion": "2024-11-05",
|
|
2358
2358
|
"capabilities": {"tools": {}},
|
|
2359
|
-
"serverInfo": {"name": "cheatengine-mcp-bridge"},
|
|
2359
|
+
"serverInfo": {"name": "cheatengine-mcp-bridge", "version": "5.8.13"},
|
|
2360
2360
|
"instructions": (
|
|
2361
2361
|
"# Cheat Engine MCP - AI Usage Guide\n\n"
|
|
2362
2362
|
"## Tool Selection Decision Tree\n\n"
|