claude-mem-lite 3.28.1 → 3.28.2

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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "claude-mem-lite",
13
- "version": "3.28.1",
13
+ "version": "3.28.2",
14
14
  "source": "./",
15
15
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark)."
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "3.28.1",
3
+ "version": "3.28.2",
4
4
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark).",
5
5
  "author": {
6
6
  "name": "sdsrss"
package/format-utils.mjs CHANGED
@@ -24,12 +24,21 @@ export function truncate(str, max = 80) {
24
24
  return str.slice(0, end) + '\u2026';
25
25
  }
26
26
 
27
- // The block delimiters claude-mem-lite wraps injected context in. Any user-derived text
28
- // (observation title / lesson, handoff body) that contains one of these LITERALLY would
29
- // prematurely open or close the block it lands in, and the model then reads the rest as
30
- // undelimited context. Reachable by editing files that contain these tokens \u2014 e.g.
31
- // developing claude-mem-lite itself, where source/observations carry the delimiter names.
32
- const CONTEXT_DELIMITER_RE = /<\/?(?:claude-mem-context|memory-context|session-handoff)>/gi;
27
+ // Two delimiter classes are defanged here:
28
+ // 1. The blocks claude-mem-lite wraps injected context in (claude-mem-context /
29
+ // memory-context / session-handoff). User-derived text containing one LITERALLY
30
+ // would prematurely open/close the block it lands in, spilling the rest as
31
+ // undelimited context.
32
+ // 2. Harness-authority tags the runtime injects (system-reminder / task-notification).
33
+ // Memory replays arbitrary captured text \u2014 file contents, tool output, web pages \u2014
34
+ // so a poisoned observation carrying a literal <system-reminder>\u2026</system-reminder>
35
+ // would smuggle a forged privileged-channel instruction into the model's context.
36
+ // It can't escape its wrapper (class 1 closers are defanged), but a nested forged
37
+ // authority tag is still an indirect-prompt-injection vector; strip the brackets so
38
+ // it reads as inert text. Other tags (<other-tag>) are deliberately left intact.
39
+ // Reachable by editing files that contain these tokens \u2014 e.g. developing claude-mem-lite
40
+ // itself, where source/observations carry the delimiter names.
41
+ const CONTEXT_DELIMITER_RE = /<\/?(?:claude-mem-context|memory-context|session-handoff|system-reminder|task-notification)>/gi;
33
42
 
34
43
  /**
35
44
  * Defang the literal context-block delimiter tags in user-derived text. Strips just the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "3.28.1",
3
+ "version": "3.28.2",
4
4
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark).",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",