@cup319/mmpl 3.3.2 → 3.3.4
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
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
MMPL (Memory Palace) — DuckDB 向量记忆 MCP Server(单二进制,Rust 实现)。
|
|
4
4
|
|
|
5
|
-
当前版本 **3.3.
|
|
5
|
+
当前版本 **3.3.4**:版本链(`memory_manage action=history`)、长记忆切块嵌入、管道幂等去重、LongMemEval 检索评测。
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @cup319/mmpl
|
package/install.js
CHANGED
|
@@ -12,7 +12,7 @@ const { get } = require("https");
|
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const { execSync } = require("child_process");
|
|
14
14
|
|
|
15
|
-
const VERSION = "3.3.
|
|
15
|
+
const VERSION = "3.3.4";
|
|
16
16
|
const IS_WIN = process.platform === "win32";
|
|
17
17
|
const PLATFORM = IS_WIN ? "windows" : "linux";
|
|
18
18
|
const ARCH = "x86_64";
|
|
@@ -66,6 +66,11 @@ function download(url, redirects = 5) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
async function main() {
|
|
69
|
+
// Windows: 控制台切 UTF-8 代码页,避免中文提示在默认 GBK 终端乱码
|
|
70
|
+
if (IS_WIN) {
|
|
71
|
+
try { execSync("chcp 65001", { stdio: "ignore", windowsHide: true }); } catch (_) {}
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
if (existsSync(BIN)) return;
|
|
70
75
|
|
|
71
76
|
if (existsSync(BUNDLED)) {
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cup319/mmpl",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"description": "MMPL (Memory Palace) — 单二进制 DuckDB 记忆 MCP Server (9 工具 + ONNX 语义向量 + 冲突双通道门控 + 场景构建 + 四层钻取) — Linux + Windows 双平台",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"install.js",
|
|
15
15
|
"run.js",
|
|
16
16
|
"README.md",
|
|
17
|
-
"mmpl-v3.3.
|
|
18
|
-
"mmpl-v3.3.
|
|
17
|
+
"mmpl-v3.3.4-linux-x86_64.tar.gz",
|
|
18
|
+
"mmpl-v3.3.4-windows-x86_64.zip"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postinstall": "node install.js"
|
package/run.js
CHANGED
|
@@ -1,15 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/** bin
|
|
2
|
+
/** bin 入口:转发到下载好的二进制(双平台)*/
|
|
3
3
|
const { spawn } = require("child_process");
|
|
4
4
|
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
5
6
|
|
|
6
7
|
const BIN = path.join(__dirname, "bin", process.platform === "win32" ? "mmpl.exe" : "mmpl");
|
|
8
|
+
|
|
9
|
+
if (!fs.existsSync(BIN)) {
|
|
10
|
+
console.error("[mmpl] 二进制不存在 — 请运行 `npm rebuild @cup319/mmpl` 重新解包,或参考 README 手动安装");
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Windows: 控制台代码页切到 UTF-8(65001),否则中文日志在默认 GBK (936) 控制台会乱码
|
|
15
|
+
if (process.platform === "win32") {
|
|
16
|
+
try {
|
|
17
|
+
require("child_process").execSync("chcp 65001", { stdio: "ignore", windowsHide: true });
|
|
18
|
+
if (process.stdout.isTTY) process.stdout.write(""); // 触发句柄刷新
|
|
19
|
+
} catch (_) { /* chcp 失败不影响功能,仅日志可能乱码 */ }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 端口预检: 7680 被占大概率是旧 mmpl 还在跑(v3.3.3 起 Windows 为无窗口 GUI 子系统,进程不可见)
|
|
23
|
+
// 升级遇到 EBUSY 也是同一原因 — 先 taskkill 再 npm install
|
|
24
|
+
if (process.platform === "win32" && !process.env.PORT) {
|
|
25
|
+
const port = 7680;
|
|
26
|
+
const net = require("net");
|
|
27
|
+
const probe = net.connect({ port, host: "127.0.0.1", timeout: 400 });
|
|
28
|
+
probe.on("connect", () => {
|
|
29
|
+
probe.destroy();
|
|
30
|
+
console.error("");
|
|
31
|
+
console.error("[mmpl] 警告: 端口 7680 已被占用,很可能是之前启动的 mmpl 还在运行(无窗口模式看不到它)。");
|
|
32
|
+
console.error("[mmpl] 如需重启,请先执行: taskkill /F /IM mmpl.exe");
|
|
33
|
+
console.error("[mmpl] 或设置 PORT 环境变量使用其他端口。");
|
|
34
|
+
console.error("[mmpl] 升级 npm 包时遇到 EBUSY 报错,同样是旧进程锁定文件导致,先 taskkill 再安装。");
|
|
35
|
+
console.error("");
|
|
36
|
+
});
|
|
37
|
+
probe.on("error", () => { /* 端口空闲,正常 */ });
|
|
38
|
+
probe.on("timeout", () => probe.destroy());
|
|
39
|
+
}
|
|
40
|
+
|
|
7
41
|
const child = spawn(BIN, process.argv.slice(2), {
|
|
8
42
|
stdio: "inherit",
|
|
9
43
|
env: process.env,
|
|
44
|
+
windowsHide: true, // 不弹出新 cmd 窗口(配合 GUI 子系统 exe)
|
|
10
45
|
});
|
|
11
46
|
child.on("error", (e) => {
|
|
12
|
-
console.error("[mmpl]
|
|
47
|
+
console.error("[mmpl] 启动失败:", e.message);
|
|
13
48
|
process.exit(1);
|
|
14
49
|
});
|
|
15
50
|
child.on("exit", (code) => process.exit(code ?? 1));
|