@prom.codes/memory-mcp 0.4.0 → 0.4.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/dist/bin.js +8 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2405,6 +2405,10 @@ var SERVER_IDENTITY = {
|
|
|
2405
2405
|
var SERVER_INSTRUCTIONS = "Persistent agent memory for this workspace. At the START of a session or task, call memory_read to recall facts, decisions and procedures from earlier sessions. When the user states a durable preference, decision or correction, store it with memory_write. Use memory_search for keyword recall when memory_read is not specific enough. At the END of a session, consolidate what was learned with memory_capture. Run memory_setup once per workspace to install the memory protocol into runtime rule files. Never store secrets, API keys or credentials \u2014 such writes are rejected.";
|
|
2406
2406
|
|
|
2407
2407
|
// dist/bin.js
|
|
2408
|
+
function looksLikeMissingNativeBinding(msg) {
|
|
2409
|
+
return /bindings file|better_sqlite3\.node|could not locate the bindings|node_module_version|was compiled against a different|invalid elf|\.node['"\s]/i.test(msg);
|
|
2410
|
+
}
|
|
2411
|
+
var NATIVE_BINDING_HINT = '\nThis looks like the native `better-sqlite3` module failed to load \u2014 usually\nbecause npm `ignore-scripts=true` (corporate hardening) made `npx` skip the\nnative build, so the binary was never produced. Fix it once, keeping your\nhardening intact:\n npm install -g @prom.codes/memory-mcp --ignore-scripts=false --foreground-scripts\nthen point Claude Code at the built binary instead of npx:\n claude mcp add memory -- node "$(npm root -g)/@prom.codes/memory-mcp/dist/bin.js"\nDocs: https://prom.codes/docs/mcp/claude-code\n';
|
|
2408
2412
|
async function main() {
|
|
2409
2413
|
const env = process.env;
|
|
2410
2414
|
const explicitRoot = (env.PROMETHEUS_WORKSPACE_ROOT ?? "").trim();
|
|
@@ -2455,6 +2459,8 @@ async function main() {
|
|
|
2455
2459
|
const message = err instanceof Error ? err.message : String(err);
|
|
2456
2460
|
process.stderr.write(`prometheus-memory-mcp: fatal during boot: ${message}
|
|
2457
2461
|
`);
|
|
2462
|
+
if (looksLikeMissingNativeBinding(message))
|
|
2463
|
+
process.stderr.write(NATIVE_BINDING_HINT);
|
|
2458
2464
|
process.exit(1);
|
|
2459
2465
|
}
|
|
2460
2466
|
};
|
|
@@ -2469,5 +2475,7 @@ main().catch((err) => {
|
|
|
2469
2475
|
const message = err instanceof Error ? err.message : String(err);
|
|
2470
2476
|
process.stderr.write(`prometheus-memory-mcp: fatal: ${message}
|
|
2471
2477
|
`);
|
|
2478
|
+
if (looksLikeMissingNativeBinding(message))
|
|
2479
|
+
process.stderr.write(NATIVE_BINDING_HINT);
|
|
2472
2480
|
process.exit(1);
|
|
2473
2481
|
});
|