@lotargo/memory_plugin 1.1.3 → 1.1.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/mcp-server/preinstall.js +18 -16
- package/package.json +1 -1
package/mcp-server/preinstall.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { execSync } from "child_process";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
// Only run graceful process termination during explicit global npm updates
|
|
4
|
+
// Skip if running interactively or inside active MCP sessions to avoid EOF drops
|
|
5
|
+
if (process.env.npm_config_global === "true" || process.env.MEMORY_PREINSTALL_FORCE === "true") {
|
|
6
|
+
try {
|
|
7
|
+
const currentPid = process.pid;
|
|
8
|
+
const ppid = process.ppid;
|
|
9
|
+
if (process.platform === "win32") {
|
|
10
|
+
// Safely attempt to terminate orphaned background memory node processes
|
|
11
|
+
try {
|
|
12
|
+
execSync(`wmic process where "name='node.exe' and commandline like '%memory_plugin%' and ProcessId!=${currentPid} and ProcessId!=${ppid}" call terminate`, { stdio: "ignore" });
|
|
13
|
+
} catch {}
|
|
14
|
+
} else {
|
|
15
|
+
try {
|
|
16
|
+
execSync(`pkill -f "memory-agent|memory_plugin" || true`, { stdio: "ignore" });
|
|
17
|
+
} catch {}
|
|
18
|
+
}
|
|
19
|
+
} catch (e) {
|
|
20
|
+
// Ignore errors
|
|
17
21
|
}
|
|
18
|
-
} catch (e) {
|
|
19
|
-
// Ignore errors if no processes were running
|
|
20
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotargo/memory_plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Persistent memory agent for coding AI tools — remembers user preferences and project context across sessions. Works with Antigravity, OpenCode, Claude Code, and Codex.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "opencode-plugin/index.js",
|