mr-memory 2.16.0 → 2.17.0

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.
Files changed (2) hide show
  1. package/index.ts +4 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -329,6 +329,8 @@ const memoryRouterPlugin = {
329
329
  for (const msg of event.historyMessages) {
330
330
  const m = msg as { role?: string; content?: unknown };
331
331
  if (!m.role) continue;
332
+ // Skip tool result/use messages — contains file reads, exec output, etc.
333
+ if (m.role !== "user" && m.role !== "assistant" && m.role !== "system") continue;
332
334
  let text = "";
333
335
  if (typeof m.content === "string") text = m.content;
334
336
  else if (Array.isArray(m.content)) {
@@ -432,6 +434,8 @@ const memoryRouterPlugin = {
432
434
  for (const msg of event.messages) {
433
435
  const m = msg as { role?: string; content?: unknown };
434
436
  if (!m.role) continue;
437
+ // Skip tool result/use messages — contains file reads, exec output, etc.
438
+ if (m.role !== "user" && m.role !== "assistant" && m.role !== "system") continue;
435
439
 
436
440
  let text = "";
437
441
  if (typeof m.content === "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "MemoryRouter persistent memory plugin for OpenClaw — your AI remembers every conversation",
5
5
  "type": "module",
6
6
  "files": [