@danielsimonjr/memory-mcp 12.7.0 → 12.7.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/index.js
CHANGED
|
@@ -31,8 +31,14 @@ process.stdin.on("close", shutdown);
|
|
|
31
31
|
async function main() {
|
|
32
32
|
// Initialize memory file path with backward compatibility
|
|
33
33
|
const memoryFilePath = await ensureMemoryFilePath();
|
|
34
|
-
//
|
|
35
|
-
|
|
34
|
+
// Honour MEMORY_STORAGE_TYPE. Passing a bare string here selects memoryjs's default
|
|
35
|
+
// (jsonl) backend unconditionally, so `MEMORY_STORAGE_TYPE=sqlite` was documented but
|
|
36
|
+
// silently ignored — and `diag` reported it as sqlite while writes went to memory.jsonl.
|
|
37
|
+
const storageType = process.env.MEMORY_STORAGE_TYPE === "sqlite" ? "sqlite" : "jsonl";
|
|
38
|
+
managerContext = new ManagerContext({
|
|
39
|
+
storagePath: memoryFilePath,
|
|
40
|
+
storageType,
|
|
41
|
+
});
|
|
36
42
|
// Initialize and start MCP server
|
|
37
43
|
const server = new MCPServer(managerContext);
|
|
38
44
|
await server.start();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,kBAAkB,EA2ClB,KAAK,cAAc,EAyBpB,MAAM,yBAAyB,CAAC;AAyBjC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAE7E;
|
|
1
|
+
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,kBAAkB,EA2ClB,KAAK,cAAc,EAyBpB,MAAM,yBAAyB,CAAC;AAyBjC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAE7E;AAgFD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;AAiF3B,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAuuGpD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,YAAY,CAAC,CAiBvB"}
|
|
@@ -37,7 +37,19 @@ function getStorageFilePath(ctx) {
|
|
|
37
37
|
// type-cast). Older versions of this helper looked for `filePath` and
|
|
38
38
|
// silently fell back to 'memory.jsonl' — which made diag / size / reindex
|
|
39
39
|
// reports point at the wrong file. Try both field names defensively.
|
|
40
|
+
// SQLiteStorage exposes NEITHER field — it has a public `getFilePath()` accessor backed by
|
|
41
|
+
// `validatedDbFilePath`. Without this branch the helper fell through to the literal
|
|
42
|
+
// 'memory.jsonl', which resolves against cwd: diag then stat'd an unrelated file and reported
|
|
43
|
+
// it as your store (`exists: true` with that file's size) while writes went to memory.db.
|
|
40
44
|
const storage = ctx.storage;
|
|
45
|
+
if (typeof storage.getFilePath === 'function') {
|
|
46
|
+
try {
|
|
47
|
+
const resolved = storage.getFilePath();
|
|
48
|
+
if (resolved)
|
|
49
|
+
return resolved;
|
|
50
|
+
}
|
|
51
|
+
catch { /* fall through to the field lookups below */ }
|
|
52
|
+
}
|
|
41
53
|
return storage.memoryFilePath ?? storage.filePath ?? 'memory.jsonl';
|
|
42
54
|
}
|
|
43
55
|
// Sidecar path for the serialized Cue–Tag–Content graph, following the
|
|
@@ -2455,7 +2467,10 @@ export const toolHandlers = {
|
|
|
2455
2467
|
runtime: { node: process.version, platform: process.platform, arch: process.arch, pid: process.pid },
|
|
2456
2468
|
storage: {
|
|
2457
2469
|
path: storagePath,
|
|
2458
|
-
|
|
2470
|
+
// Mirror index.ts's normalization exactly. Echoing the raw env var made diag report
|
|
2471
|
+
// whatever was set (e.g. a typo, or 'sqlite' back when it was ignored) rather than the
|
|
2472
|
+
// backend actually in use — a diagnostic that confirmed the bug instead of exposing it.
|
|
2473
|
+
type: process.env.MEMORY_STORAGE_TYPE === 'sqlite' ? 'sqlite' : 'jsonl',
|
|
2459
2474
|
exists,
|
|
2460
2475
|
sizeBytes,
|
|
2461
2476
|
entities: stats.totalEntities,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/memory-mcp",
|
|
3
|
-
"version": "12.7.
|
|
3
|
+
"version": "12.7.1",
|
|
4
4
|
"description": "Enhanced MCP memory server with hierarchies, compression, archiving, graph algorithms, semantic search, temporal KG, RBAC, bitemporal validity, OCC, procedural memory, causal reasoning, world model, do_not_remember exclusions, decision rationale, project context, heuristic guidelines, tool affordance + observer, observation dedup, spell correction, event memory, reconstructive memory, relation consolidation, agent reflection, and 241 advanced tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@danielsimonjr/memoryjs": "^3.0.0",
|
|
62
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
62
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
63
63
|
"zod": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"overrides": {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^26",
|
|
70
70
|
"@vitest/coverage-v8": "^4.1.10",
|
|
71
|
+
"esbuild": "^0.28.1",
|
|
71
72
|
"shx": "^0.4.0",
|
|
72
73
|
"typescript": "^7.0.2",
|
|
73
74
|
"vitest": "^4.1.5"
|