memtrace 0.1.37 → 0.1.38
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/install.js +11 -9
- package/package.json +4 -4
package/install.js
CHANGED
|
@@ -112,16 +112,20 @@ function writeSettings(settings) {
|
|
|
112
112
|
|
|
113
113
|
// ── MCP server registration ─────────────────────────────────────────────────
|
|
114
114
|
|
|
115
|
-
function registerMcpServer(
|
|
115
|
+
function registerMcpServer() {
|
|
116
116
|
const settings = readSettings();
|
|
117
117
|
|
|
118
118
|
if (!settings.mcpServers || typeof settings.mcpServers !== "object") {
|
|
119
119
|
settings.mcpServers = {};
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
// Use process.execPath (absolute path to node) + the JS wrapper so the
|
|
123
|
+
// command stays valid across npm updates. The wrapper resolves the native
|
|
124
|
+
// binary dynamically at runtime, so it survives npm hoisting/deduplication
|
|
125
|
+
// that would silently break a hard-coded path to the native binary.
|
|
122
126
|
settings.mcpServers.memtrace = {
|
|
123
|
-
command:
|
|
124
|
-
args: ["mcp"],
|
|
127
|
+
command: process.execPath,
|
|
128
|
+
args: [path.join(__dirname, "bin", "memtrace.js"), "mcp"],
|
|
125
129
|
env: {
|
|
126
130
|
MEMGRAPH_URL: "bolt://localhost:7687",
|
|
127
131
|
},
|
|
@@ -224,12 +228,10 @@ if (require.main === module) {
|
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
// 4. Register MCP server
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
console.warn(`memtrace: MCP server registration failed: ${e.message}`);
|
|
232
|
-
}
|
|
231
|
+
try {
|
|
232
|
+
registerMcpServer();
|
|
233
|
+
} catch (e) {
|
|
234
|
+
console.warn(`memtrace: MCP server registration failed: ${e.message}`);
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
// 5. Persist uninstall script to ~/.memtrace/ so it survives `npm uninstall -g`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memtrace",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "Code intelligence graph — MCP server + AI agent skills + visualization UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"preuninstall": "node uninstall.js"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@memtrace/darwin-arm64": "0.1.
|
|
35
|
-
"@memtrace/linux-x64": "0.1.
|
|
36
|
-
"@memtrace/win32-x64": "0.1.
|
|
34
|
+
"@memtrace/darwin-arm64": "0.1.38",
|
|
35
|
+
"@memtrace/linux-x64": "0.1.38",
|
|
36
|
+
"@memtrace/win32-x64": "0.1.38"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=18"
|