claude-mem-lite 2.10.2 → 2.10.4
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -2
- package/README.zh-CN.md +1 -2
- package/install.mjs +8 -9
- package/package.json +1 -3
- package/scripts/setup.sh +10 -9
package/README.md
CHANGED
|
@@ -425,8 +425,7 @@ claude-mem-lite/
|
|
|
425
425
|
.claude-plugin/
|
|
426
426
|
plugin.json # Plugin manifest
|
|
427
427
|
marketplace.json # Marketplace catalog
|
|
428
|
-
|
|
429
|
-
.mcp.json # MCP server definition source (installed into cache root)
|
|
428
|
+
.mcp.json # MCP server definition (plugin root)
|
|
430
429
|
hooks/
|
|
431
430
|
hooks.json # Hook definitions (plugin mode)
|
|
432
431
|
commands/
|
package/README.zh-CN.md
CHANGED
package/install.mjs
CHANGED
|
@@ -237,9 +237,9 @@ async function install() {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
// 3. Register MCP server (skip if plugin system already handles it)
|
|
240
|
-
// Plugin
|
|
241
|
-
//
|
|
242
|
-
//
|
|
240
|
+
// Plugin MCP must stay at root .mcp.json so Claude Code registers plugin:*:mem.
|
|
241
|
+
// Duplicate mem registrations in practice come from old global install.mjs state
|
|
242
|
+
// (claude mcp add) or stale marketplace copies, not from the cache root itself.
|
|
243
243
|
// Global registration via `claude mcp add` creates a DUPLICATE mcp__mem__* server.
|
|
244
244
|
// Detect plugin mode: installed_plugins.json has our entry → plugin handles MCP.
|
|
245
245
|
const installedPluginsPath = join(homedir(), '.claude', 'plugins', 'installed_plugins.json');
|
|
@@ -272,17 +272,16 @@ async function install() {
|
|
|
272
272
|
// while plugin hooks use ${CLAUDE_PLUGIN_ROOT} (potentially stale marketplace copy).
|
|
273
273
|
//
|
|
274
274
|
// MCP dedup: Claude Code loads .mcp.json from BOTH marketplace root (generic scan)
|
|
275
|
-
// and cache dir (plugin runtime).
|
|
276
|
-
//
|
|
277
|
-
// claude
|
|
278
|
-
// package, while the marketplace root stays clear. Remove stale marketplace-root
|
|
279
|
-
// copies here.
|
|
275
|
+
// and cache dir (plugin runtime). Keep root .mcp.json in the plugin so Claude
|
|
276
|
+
// Code can register MCP correctly, but remove stale marketplace-root copies and
|
|
277
|
+
// old global ~/.claude.json mem config to avoid duplicate registrations.
|
|
280
278
|
const pluginDir = join(homedir(), '.claude', 'plugins', 'marketplaces', MARKETPLACE_KEY);
|
|
281
279
|
const pluginHooksPath = join(pluginDir, 'hooks', 'hooks.json');
|
|
282
280
|
|
|
283
281
|
if (existsSync(pluginDir)) {
|
|
284
282
|
// Clear root-level .mcp.json if it exists (stale from older git versions).
|
|
285
|
-
//
|
|
283
|
+
// Root .mcp.json is required in the installed plugin cache; only remove stale
|
|
284
|
+
// marketplace clone copies here.
|
|
286
285
|
const rootMcpPath = join(pluginDir, '.mcp.json');
|
|
287
286
|
try {
|
|
288
287
|
if (existsSync(rootMcpPath)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-mem-lite",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.4",
|
|
4
4
|
"description": "Lightweight persistent memory system for Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
"test": "vitest run",
|
|
19
19
|
"test:smoke": "vitest run tests/smoke.test.mjs",
|
|
20
20
|
"test:coverage": "vitest run --coverage",
|
|
21
|
-
"prepack": "node scripts/sync-package-mcp.mjs write",
|
|
22
|
-
"postpack": "node scripts/sync-package-mcp.mjs cleanup",
|
|
23
21
|
"benchmark": "node benchmark/benchmark.mjs",
|
|
24
22
|
"benchmark:gate": "node benchmark/ci-gate.mjs"
|
|
25
23
|
},
|
package/scripts/setup.sh
CHANGED
|
@@ -85,15 +85,16 @@ if [[ ! -d "$ROOT/node_modules/better-sqlite3" ]]; then
|
|
|
85
85
|
fi
|
|
86
86
|
fi
|
|
87
87
|
|
|
88
|
-
# 7.
|
|
89
|
-
#
|
|
90
|
-
#
|
|
88
|
+
# 7. MCP cleanup: idempotently clean stale registrations from pre-2.10 direct installs.
|
|
89
|
+
# This runs on every plugin SessionStart because old global mem entries may still
|
|
90
|
+
# exist even after an earlier migration marker was written.
|
|
91
|
+
# Before 2.10: old direct installs left a global mem MCP alongside plugin MCP.
|
|
91
92
|
# - Global mcpServers.mem in ~/.claude.json (from old install.mjs)
|
|
92
|
-
# -
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
MCP_MIGRATION="$DATA_DIR/runtime/.mcp-dedup-v2.10"
|
|
96
|
-
if [[
|
|
93
|
+
# - Possibly stale marketplace root .mcp.json (from old git clone)
|
|
94
|
+
# Root .mcp.json in the installed plugin cache is required for Claude Code to
|
|
95
|
+
# register plugin MCP; only stale global/marketplace copies should be removed.
|
|
96
|
+
MCP_MIGRATION="$DATA_DIR/runtime/.mcp-dedup-v2.10.4"
|
|
97
|
+
if [[ -n "${CLAUDE_PLUGIN_ROOT:-}" ]]; then
|
|
97
98
|
CLAUDE_JSON="$HOME/.claude.json" ROOT="$ROOT" node -e '
|
|
98
99
|
const fs = require("fs");
|
|
99
100
|
let changed = false;
|
|
@@ -119,7 +120,7 @@ if [[ ! -f "$MCP_MIGRATION" && -n "${CLAUDE_PLUGIN_ROOT:-}" ]]; then
|
|
|
119
120
|
if (m.mcpServers?.mem) {
|
|
120
121
|
delete m.mcpServers.mem;
|
|
121
122
|
fs.writeFileSync(mktMcp, JSON.stringify(m, null, 2) + "\n");
|
|
122
|
-
process.stderr.write("✓ Cleared marketplace root .mcp.json
|
|
123
|
+
process.stderr.write("✓ Cleared stale marketplace root .mcp.json\n");
|
|
123
124
|
changed = true;
|
|
124
125
|
}
|
|
125
126
|
}
|