mcp-agents-memory 0.9.31 → 0.9.32
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/build/index.js +22 -15
- package/package.json +3 -2
package/build/index.js
CHANGED
|
@@ -64249,26 +64249,31 @@ function sqliteSync() {
|
|
|
64249
64249
|
}
|
|
64250
64250
|
return _DatabaseSync3;
|
|
64251
64251
|
}
|
|
64252
|
-
function
|
|
64252
|
+
function lookupThread(sessionId) {
|
|
64253
|
+
const fallback = { platform: "codex-mcp-client", model: null };
|
|
64253
64254
|
const DatabaseSync = sqliteSync();
|
|
64254
|
-
if (!DatabaseSync) return
|
|
64255
|
+
if (!DatabaseSync) return fallback;
|
|
64255
64256
|
let db2 = null;
|
|
64256
64257
|
try {
|
|
64257
64258
|
db2 = new DatabaseSync(stateDbPath(), { readOnly: true });
|
|
64258
64259
|
const cols = new Set(
|
|
64259
64260
|
db2.prepare("PRAGMA table_info(threads)").all().map((c) => String(c.name))
|
|
64260
64261
|
);
|
|
64261
|
-
const
|
|
64262
|
-
|
|
64263
|
-
|
|
64264
|
-
|
|
64265
|
-
|
|
64266
|
-
|
|
64262
|
+
const select = [
|
|
64263
|
+
"source",
|
|
64264
|
+
cols.has("originator") ? "originator" : "NULL AS originator",
|
|
64265
|
+
cols.has("model") ? "model" : "NULL AS model"
|
|
64266
|
+
].join(", ");
|
|
64267
|
+
const row = db2.prepare(`SELECT ${select} FROM threads WHERE id = ? LIMIT 1`).get(sessionId);
|
|
64268
|
+
if (!row) return fallback;
|
|
64269
|
+
const model = typeof row.model === "string" && row.model.trim() ? row.model.trim() : null;
|
|
64270
|
+
if (typeof row.originator === "string") {
|
|
64267
64271
|
const byOriginator = originatorToPlatform(row.originator);
|
|
64268
|
-
if (byOriginator) return byOriginator;
|
|
64272
|
+
if (byOriginator) return { platform: byOriginator, model };
|
|
64269
64273
|
}
|
|
64270
64274
|
const source = typeof row.source === "string" ? row.source.trim() : "";
|
|
64271
|
-
if (source) return sourceToPlatform(source);
|
|
64275
|
+
if (source) return { platform: sourceToPlatform(source), model };
|
|
64276
|
+
return { platform: fallback.platform, model };
|
|
64272
64277
|
} catch {
|
|
64273
64278
|
} finally {
|
|
64274
64279
|
try {
|
|
@@ -64276,7 +64281,7 @@ function lookupPlatform(sessionId) {
|
|
|
64276
64281
|
} catch {
|
|
64277
64282
|
}
|
|
64278
64283
|
}
|
|
64279
|
-
return
|
|
64284
|
+
return fallback;
|
|
64280
64285
|
}
|
|
64281
64286
|
var _state7 = null;
|
|
64282
64287
|
var SERVER_START_MS3 = Date.now();
|
|
@@ -64329,11 +64334,12 @@ function captureSessionStart7(_cwd) {
|
|
|
64329
64334
|
}
|
|
64330
64335
|
const sessionId = extractSessionId2(path10.basename(filePath));
|
|
64331
64336
|
if (!sessionId) continue;
|
|
64337
|
+
const thread = lookupThread(sessionId);
|
|
64332
64338
|
_state7.files.set(filePath, {
|
|
64333
64339
|
cursorBytes: stat.size,
|
|
64334
64340
|
sessionId,
|
|
64335
|
-
agentPlatform:
|
|
64336
|
-
currentModel:
|
|
64341
|
+
agentPlatform: thread.platform,
|
|
64342
|
+
currentModel: thread.model,
|
|
64337
64343
|
parseState: { mirrors: [] }
|
|
64338
64344
|
});
|
|
64339
64345
|
count++;
|
|
@@ -64535,11 +64541,12 @@ async function flushAllFiles5() {
|
|
|
64535
64541
|
} else {
|
|
64536
64542
|
console.error(`\u{1F4DD} [Codex] new rollout detected: ${path10.basename(filePath)}`);
|
|
64537
64543
|
}
|
|
64544
|
+
const thread = lookupThread(sessionId);
|
|
64538
64545
|
fileState = {
|
|
64539
64546
|
cursorBytes: initialCursor,
|
|
64540
64547
|
sessionId,
|
|
64541
|
-
agentPlatform:
|
|
64542
|
-
currentModel:
|
|
64548
|
+
agentPlatform: thread.platform,
|
|
64549
|
+
currentModel: thread.model,
|
|
64543
64550
|
parseState: { mirrors: [] }
|
|
64544
64551
|
};
|
|
64545
64552
|
_state7.files.set(filePath, fileState);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-agents-memory",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.32",
|
|
4
4
|
"description": "Long-term memory for AI agents with provenance tracking",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"check:registry": "esbuild scripts/check_project_registry.ts --bundle --platform=node --format=esm --outfile=node_modules/.cache/mcp-agents-memory/check_project_registry.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_project_registry.mjs",
|
|
32
32
|
"check:alias-evidence": "esbuild scripts/check_alias_evidence.ts --bundle --platform=node --format=esm --outfile=node_modules/.cache/mcp-agents-memory/check_alias_evidence.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_alias_evidence.mjs",
|
|
33
33
|
"check:retag": "esbuild scripts/check_ptag_retag.ts --bundle --platform=node --format=esm --outfile=node_modules/.cache/mcp-agents-memory/check_ptag_retag.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_ptag_retag.mjs",
|
|
34
|
-
"check:coldpath-gate": "esbuild scripts/check_coldpath_gate.ts --bundle --platform=node --format=esm --packages=external --outfile=node_modules/.cache/mcp-agents-memory/check_coldpath_gate.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_coldpath_gate.mjs"
|
|
34
|
+
"check:coldpath-gate": "esbuild scripts/check_coldpath_gate.ts --bundle --platform=node --format=esm --packages=external --outfile=node_modules/.cache/mcp-agents-memory/check_coldpath_gate.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_coldpath_gate.mjs",
|
|
35
|
+
"check:codex-arm": "esbuild scripts/check_codex_arm.ts --bundle --platform=node --format=esm --packages=external --outfile=node_modules/.cache/mcp-agents-memory/check_codex_arm.mjs --log-level=warning && node node_modules/.cache/mcp-agents-memory/check_codex_arm.mjs"
|
|
35
36
|
},
|
|
36
37
|
"keywords": [
|
|
37
38
|
"mcp",
|