memoir-cli 3.10.0 → 3.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memoir-cli",
3
- "version": "3.10.0",
3
+ "version": "3.10.1",
4
4
  "mcpName": "io.github.camgitt/memoir",
5
5
  "description": "Private, portable AI memory: synced across every coding tool and machine, end-to-end encrypted, free. One memory for Claude Code, Cursor, Copilot, Gemini + more — MCP-native, zero-knowledge, open source.",
6
6
  "main": "src/index.js",
@@ -333,6 +333,27 @@ function unionByText(a = [], b = [], dateField, cap) {
333
333
  byText.set(key, item);
334
334
  }
335
335
  }
336
+
337
+ // A tombstone is STICKY: once any machine marks an entry hidden, the merged
338
+ // result stays hidden, whatever the dates say.
339
+ //
340
+ // Without this, `hidden` is just another field on whichever copy has the
341
+ // newer date — so a machine that hasn't pulled the tombstone yet, holding an
342
+ // older un-hidden copy of the same text, resurrects it on its next
343
+ // merge/push. (The cleanup script sets `hidden` without touching `date`, so
344
+ // the tombstoned copy doesn't even win the date comparison.) Suppression has
345
+ // to be monotonic or it isn't suppression — you'd be re-hiding the same junk
346
+ // on every machine forever.
347
+ for (const [key, winner] of byText) {
348
+ if (winner.hidden) continue;
349
+ const tombstone = [...a, ...b].find(
350
+ (i) => i && i.text && i.text.trim().toLowerCase() === key && i.hidden
351
+ );
352
+ if (tombstone) {
353
+ byText.set(key, { ...winner, hidden: true, hidden_at: tombstone.hidden_at });
354
+ }
355
+ }
356
+
336
357
  return Array.from(byText.values())
337
358
  .sort((x, y) => new Date(y[dateField] || 0) - new Date(x[dateField] || 0))
338
359
  .slice(0, cap);