mcp-agents-memory 0.6.0 → 0.6.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/README.md +8 -1
- package/build/index.js +12 -3
- package/build/migrations/015_agent_provenance.js +25988 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,12 +90,19 @@ Claude Desktop / Claude Code / any MCP-aware client:
|
|
|
90
90
|
{
|
|
91
91
|
"mcpServers": {
|
|
92
92
|
"memory": {
|
|
93
|
-
"command": "mcp-agents-memory"
|
|
93
|
+
"command": "mcp-agents-memory",
|
|
94
|
+
"env": {
|
|
95
|
+
"AGENT_KEY": "agent_claude",
|
|
96
|
+
"AGENT_PLATFORM": "claude-code",
|
|
97
|
+
"AGENT_MODEL": "claude-opus-4-7"
|
|
98
|
+
}
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
```
|
|
98
103
|
|
|
104
|
+
`AGENT_PLATFORM` and `AGENT_MODEL` are recorded on every memory_add call as the **Curator** identity (the agent that saved the fact), separate from the **Producer** (`author_model`, the model that generated the content). For platforms without a fixed model (e.g. OpenClaw, generic agent runtimes), set `AGENT_MODEL` to whatever model is actually backing the session.
|
|
105
|
+
|
|
99
106
|
### Cross-machine memory
|
|
100
107
|
|
|
101
108
|
On a second computer, run `npm i -g mcp-agents-memory` and `mcp-agents-memory setup` pointing to the **same** `DATABASE_URL`. Memory shares automatically — the database is the source of truth and the MCP server is stateless.
|
package/build/index.js
CHANGED
|
@@ -116229,9 +116229,10 @@ async function processBatch(text, subjectId, projectId, rawSource, provenance =
|
|
|
116229
116229
|
subject_id, project_subject_id, content, fact_type,
|
|
116230
116230
|
confidence, importance, tags, embedding, validation_status,
|
|
116231
116231
|
author_model, platform, session_id,
|
|
116232
|
+
agent_platform, agent_model,
|
|
116232
116233
|
author_model_id, platform_id, effective_confidence, source
|
|
116233
116234
|
)
|
|
116234
|
-
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
|
|
116235
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18)
|
|
116235
116236
|
RETURNING id`,
|
|
116236
116237
|
[
|
|
116237
116238
|
subjectId,
|
|
@@ -116246,6 +116247,8 @@ async function processBatch(text, subjectId, projectId, rawSource, provenance =
|
|
|
116246
116247
|
provenance.author_model,
|
|
116247
116248
|
provenance.platform,
|
|
116248
116249
|
provenance.session_id,
|
|
116250
|
+
provenance.agent_platform,
|
|
116251
|
+
provenance.agent_model,
|
|
116249
116252
|
resolvedModel?.id ?? null,
|
|
116250
116253
|
resolvedPlatform?.id ?? null,
|
|
116251
116254
|
effectiveConfidence,
|
|
@@ -117512,19 +117515,25 @@ function registerTools(server) {
|
|
|
117512
117515
|
}
|
|
117513
117516
|
},
|
|
117514
117517
|
async (args) => {
|
|
117518
|
+
const agentPlatform = process.env.AGENT_PLATFORM;
|
|
117519
|
+
const agentModel = process.env.AGENT_MODEL;
|
|
117515
117520
|
const subjectId = await getOrCreateSubject(args.subject_key, "person");
|
|
117516
117521
|
let projectId = null;
|
|
117517
117522
|
if (args.project_key) {
|
|
117518
117523
|
projectId = await getOrCreateSubject(args.project_key, "project");
|
|
117519
117524
|
}
|
|
117525
|
+
const authorModel = args.author_model ?? agentModel;
|
|
117526
|
+
const platform = args.platform ?? agentPlatform;
|
|
117520
117527
|
const result = await processBatch(
|
|
117521
117528
|
args.text,
|
|
117522
117529
|
subjectId,
|
|
117523
117530
|
projectId,
|
|
117524
117531
|
args.text,
|
|
117525
117532
|
{
|
|
117526
|
-
author_model:
|
|
117527
|
-
platform
|
|
117533
|
+
author_model: authorModel,
|
|
117534
|
+
platform,
|
|
117535
|
+
agent_platform: agentPlatform,
|
|
117536
|
+
agent_model: agentModel,
|
|
117528
117537
|
session_id: args.session_id
|
|
117529
117538
|
}
|
|
117530
117539
|
);
|