claude-mem-lite 2.24.1 → 2.24.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": "2.24.1",
13
+ "version": "2.24.2",
14
14
  "source": "./",
15
15
  "description": "Lightweight persistent memory system for Claude Code — FTS5 search, episode batching, error-triggered recall"
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "2.24.1",
3
+ "version": "2.24.2",
4
4
  "description": "Lightweight persistent memory system for Claude Code — FTS5 search, episode batching, error-triggered recall",
5
5
  "author": {
6
6
  "name": "sdsrss"
package/install.mjs CHANGED
@@ -977,11 +977,11 @@ async function doctor() {
977
977
  issues++;
978
978
  }
979
979
 
980
- const mcpPath = join(INSTALL_DIR, 'node_modules', '@modelcontextprotocol');
981
- if (existsSync(mcpPath)) {
982
- ok('@modelcontextprotocol/sdk: installed');
983
- } else {
984
- fail('@modelcontextprotocol/sdk: not installed');
980
+ try {
981
+ await import('@modelcontextprotocol/sdk/server/mcp.js');
982
+ ok('@modelcontextprotocol/sdk: verified (import OK)');
983
+ } catch (e) {
984
+ fail(`@modelcontextprotocol/sdk: import failed (${e.message})`);
985
985
  issues++;
986
986
  }
987
987
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "2.24.1",
3
+ "version": "2.24.2",
4
4
  "description": "Lightweight persistent memory system for Claude Code",
5
5
  "type": "module",
6
6
  "engines": {
@@ -20,6 +20,28 @@ if (!existsSync(join(ROOT, 'node_modules', 'better-sqlite3'))) {
20
20
  process.stderr.write('[claude-mem-lite] Dependencies installed\n');
21
21
  }
22
22
 
23
+ // Verify MCP SDK is importable (exports mapping intact).
24
+ // Incomplete installs can leave the directory present but package.json missing,
25
+ // causing Node.js to fail resolving subpath exports like /server/mcp.js.
26
+ try {
27
+ await import('@modelcontextprotocol/sdk/server/mcp.js');
28
+ } catch (firstErr) {
29
+ process.stderr.write(`[claude-mem-lite] MCP SDK broken (${firstErr.code || firstErr.message}) — reinstalling...\n`);
30
+ try {
31
+ execSync('npm install @modelcontextprotocol/sdk --force --omit=dev --no-audit --no-fund', {
32
+ cwd: ROOT,
33
+ stdio: ['ignore', 'pipe', 'inherit'],
34
+ timeout: 60_000,
35
+ });
36
+ // Verify the reinstall actually fixed it
37
+ await import('@modelcontextprotocol/sdk/server/mcp.js');
38
+ process.stderr.write('[claude-mem-lite] MCP SDK repaired\n');
39
+ } catch (e) {
40
+ process.stderr.write(`[claude-mem-lite] MCP SDK repair failed: ${e.message}\n`);
41
+ process.exit(1);
42
+ }
43
+ }
44
+
23
45
  // Dev mode: prefer ~/.claude-mem-lite/server.mjs (symlinked to source) over
24
46
  // CLAUDE_PLUGIN_ROOT (potentially stale plugin cache). This ensures the MCP
25
47
  // server always runs the latest code when installed with `install --dev`.
package/scripts/setup.sh CHANGED
@@ -122,7 +122,11 @@ if [[ -n "${CLAUDE_PLUGIN_ROOT:-}" ]]; then
122
122
  CACHE_DIR="$HOME/.claude/plugins/cache/sdsrss/claude-mem-lite"
123
123
  if [[ -d "$CACHE_DIR" ]]; then
124
124
  # List version dirs sorted by semver descending, skip top 3
125
- mapfile -t OLD_VERS < <(ls -1 "$CACHE_DIR" | grep -E '^[0-9]+\.' | sort -t. -k1,1nr -k2,2nr -k3,3nr | tail -n +4)
125
+ # Use while-read instead of mapfile for bash 3.2 (macOS) compatibility
126
+ OLD_VERS=()
127
+ while IFS= read -r ver; do
128
+ [[ -n "$ver" ]] && OLD_VERS+=("$ver")
129
+ done < <(ls -1 "$CACHE_DIR" | grep -E '^[0-9]+\.' | sort -t. -k1,1nr -k2,2nr -k3,3nr | tail -n +4)
126
130
  if [[ ${#OLD_VERS[@]} -gt 0 ]]; then
127
131
  for ver in "${OLD_VERS[@]}"; do
128
132
  rm -rf "${CACHE_DIR:?}/$ver" 2>/dev/null || true