claude-mem-lite 3.84.0 → 3.84.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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "claude-mem-lite",
13
- "version": "3.84.0",
13
+ "version": "3.84.1",
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.84.0",
3
+ "version": "3.84.1",
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/hook-update.mjs CHANGED
@@ -276,11 +276,44 @@ export function compareVersions(a, b) {
276
276
  return 0;
277
277
  }
278
278
 
279
+ // The version of the code this install runs. INSTALL_DIR is asked FIRST and the
280
+ // plugin cache is a FALLBACK, not a precedence — the order is load-bearing in
281
+ // both directions:
282
+ //
283
+ // • Plugin cache reachable at all (PR #17): a pure-plugin ~/.claude-mem-lite/
284
+ // holds only the DB + runtime state and never any source — the same invariant
285
+ // syncDataDirFromCache states from the other side in its
286
+ // `no-existing-code-install` guard — so the INSTALL_DIR read cannot succeed
287
+ // there and the '0.0.0' last resort made checkForUpdate compute
288
+ // hasUpdate=true forever, nagging `(current: v0.0.0)` at every SessionStart
289
+ // on a fully current cache.
290
+ // • INSTALL_DIR still first: this is also the "which tree is about to be
291
+ // overwritten" answer for repair()'s signed-release rollback guard
292
+ // (install.mjs → isRepairDowngrade), and repair is spawned by
293
+ // scripts/hook-launcher.mjs's attemptHeal WITHOUT an env override, so
294
+ // CLAUDE_PLUGIN_ROOT is set in that child too. On a hybrid install the two
295
+ // trees legitimately differ — that drift is the entire reason
296
+ // syncDataDirFromCache exists — and answering with the cache's version would
297
+ // judge one tree by the other's.
298
+ //
299
+ // A package.json with no `version` field falls through rather than returning
300
+ // undefined. compareVersions does NOT blow up on it — `String(undefined)` parses
301
+ // to [NaN] and every read is `pa[i] || 0`, so undefined degrades to exactly
302
+ // 0.0.0: the same permanent hasUpdate=true this function exists to prevent, plus
303
+ // a banner rendered as `(current: vundefined)` from the persisted state.
279
304
  export function getCurrentVersion() {
280
305
  try {
281
306
  const pkg = JSON.parse(readFileSync(join(INSTALL_DIR, 'package.json'), 'utf8'));
282
- return pkg.version;
283
- } catch { return '0.0.0'; }
307
+ if (pkg.version) return pkg.version;
308
+ } catch { /* no code install here → try the running plugin cache */ }
309
+ const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT;
310
+ if (pluginRoot) {
311
+ try {
312
+ const pkg = JSON.parse(readFileSync(join(pluginRoot, 'package.json'), 'utf8'));
313
+ if (pkg.version) return pkg.version;
314
+ } catch { /* fall through to the last resort */ }
315
+ }
316
+ return '0.0.0';
284
317
  }
285
318
 
286
319
  // SWITCHABLE_PATHS = everything in SOURCE_FILES plus the recursive dirs that
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "3.84.0",
3
+ "version": "3.84.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "claude-mem-lite",
9
- "version": "3.84.0",
9
+ "version": "3.84.1",
10
10
  "dependencies": {
11
11
  "@modelcontextprotocol/sdk": "^1.26.0",
12
12
  "better-sqlite3": "^12.6.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "3.84.0",
3
+ "version": "3.84.1",
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",