claude-mem-lite 2.10.0 → 2.10.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.10.0",
13
+ "version": "2.10.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.10.0",
3
+ "version": "2.10.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/README.md CHANGED
@@ -425,7 +425,8 @@ claude-mem-lite/
425
425
  .claude-plugin/
426
426
  plugin.json # Plugin manifest
427
427
  marketplace.json # Marketplace catalog
428
- .mcp.json # MCP server definition (plugin mode)
428
+ claude-plugin/
429
+ .mcp.json # MCP server definition source (installed into cache root)
429
430
  hooks/
430
431
  hooks.json # Hook definitions (plugin mode)
431
432
  commands/
package/README.zh-CN.md CHANGED
@@ -425,7 +425,8 @@ claude-mem-lite/
425
425
  .claude-plugin/
426
426
  plugin.json # 插件清单
427
427
  marketplace.json # 市场目录
428
- .mcp.json # MCP 服务器定义(插件模式)
428
+ claude-plugin/
429
+ .mcp.json # MCP 服务器定义源(安装后落到 cache 根目录)
429
430
  hooks/
430
431
  hooks.json # 钩子定义(插件模式)
431
432
  commands/
package/install.mjs CHANGED
@@ -237,7 +237,9 @@ async function install() {
237
237
  }
238
238
 
239
239
  // 3. Register MCP server (skip if plugin system already handles it)
240
- // Plugin system registers MCP from .claude-plugin/.mcp.json → mcp__plugin_claude-mem-lite_mem__*
240
+ // Plugin source keeps MCP manifest at claude-plugin/.mcp.json.
241
+ // Release packaging materializes that as root .mcp.json so Claude Code loads
242
+ // plugin:*:mem from the installed cache.
241
243
  // Global registration via `claude mcp add` creates a DUPLICATE mcp__mem__* server.
242
244
  // Detect plugin mode: installed_plugins.json has our entry → plugin handles MCP.
243
245
  const installedPluginsPath = join(homedir(), '.claude', 'plugins', 'installed_plugins.json');
@@ -270,15 +272,17 @@ async function install() {
270
272
  // while plugin hooks use ${CLAUDE_PLUGIN_ROOT} (potentially stale marketplace copy).
271
273
  //
272
274
  // MCP dedup: Claude Code loads .mcp.json from BOTH marketplace root (generic scan)
273
- // and cache dir (plugin system). Root-level .mcp.json duplicate mcp__mem__*.
274
- // Fix: .mcp.json moved to .claude-plugin/ (plugin installer reads from there,
275
- // generic scanner only scans root). Clear any stale root copy here.
275
+ // and cache dir (plugin runtime). Root-level .mcp.json in the marketplace clone
276
+ // would duplicate the cache-installed plugin MCP. Keep the source manifest under
277
+ // claude-plugin/.mcp.json and only materialize root .mcp.json in the release
278
+ // package, while the marketplace root stays clear. Remove stale marketplace-root
279
+ // copies here.
276
280
  const pluginDir = join(homedir(), '.claude', 'plugins', 'marketplaces', MARKETPLACE_KEY);
277
281
  const pluginHooksPath = join(pluginDir, 'hooks', 'hooks.json');
278
282
 
279
283
  if (existsSync(pluginDir)) {
280
284
  // Clear root-level .mcp.json if it exists (stale from older git versions).
281
- // .mcp.json is now in .claude-plugin/ to avoid generic scanner duplicate.
285
+ // Source MCP manifest stays in claude-plugin/.mcp.json; only the release package gets root .mcp.json.
282
286
  const rootMcpPath = join(pluginDir, '.mcp.json');
283
287
  try {
284
288
  if (existsSync(rootMcpPath)) {
@@ -286,7 +290,7 @@ async function install() {
286
290
  if (pluginMcp.mcpServers?.mem) {
287
291
  delete pluginMcp.mcpServers.mem;
288
292
  writeFileSync(rootMcpPath, JSON.stringify(pluginMcp, null, 2) + '\n');
289
- ok('Marketplace plugin: root .mcp.json cleared (moved to .claude-plugin/)');
293
+ ok('Marketplace plugin: root .mcp.json cleared (source manifest now lives in claude-plugin/)');
290
294
  }
291
295
  }
292
296
  } catch (e) { warn(`Marketplace MCP dedup: ${e.message}`); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "2.10.0",
3
+ "version": "2.10.2",
4
4
  "description": "Lightweight persistent memory system for Claude Code",
5
5
  "type": "module",
6
6
  "engines": {
@@ -18,6 +18,8 @@
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",
21
23
  "benchmark": "node benchmark/benchmark.mjs",
22
24
  "benchmark:gate": "node benchmark/ci-gate.mjs"
23
25
  },
@@ -58,9 +60,9 @@
58
60
  "scripts/launch.mjs",
59
61
  "scripts/setup.sh",
60
62
  "scripts/post-tool-use.sh",
63
+ ".mcp.json",
61
64
  ".claude-plugin/plugin.json",
62
65
  ".claude-plugin/marketplace.json",
63
- ".mcp.json",
64
66
  "README.md",
65
67
  "registry/preinstalled.json"
66
68
  ],
package/scripts/setup.sh CHANGED
@@ -90,7 +90,8 @@ fi
90
90
  # Before 2.10: .mcp.json at repo root caused duplicate MCP servers.
91
91
  # - Global mcpServers.mem in ~/.claude.json (from old install.mjs)
92
92
  # - Marketplace root .mcp.json (from old git clone)
93
- # Now: .mcp.json in .claude-plugin/ plugin system handles MCP exclusively.
93
+ # Now: source manifest lives in claude-plugin/.mcp.json and release packaging
94
+ # materializes cache root .mcp.json, while the marketplace root stays clear.
94
95
  MCP_MIGRATION="$DATA_DIR/runtime/.mcp-dedup-v2.10"
95
96
  if [[ ! -f "$MCP_MIGRATION" && -n "${CLAUDE_PLUGIN_ROOT:-}" ]]; then
96
97
  CLAUDE_JSON="$HOME/.claude.json" ROOT="$ROOT" node -e '
@@ -118,7 +119,7 @@ if [[ ! -f "$MCP_MIGRATION" && -n "${CLAUDE_PLUGIN_ROOT:-}" ]]; then
118
119
  if (m.mcpServers?.mem) {
119
120
  delete m.mcpServers.mem;
120
121
  fs.writeFileSync(mktMcp, JSON.stringify(m, null, 2) + "\n");
121
- process.stderr.write("✓ Cleared marketplace root .mcp.json (moved to .claude-plugin/)\n");
122
+ process.stderr.write("✓ Cleared marketplace root .mcp.json (source manifest now lives in claude-plugin/)\n");
122
123
  changed = true;
123
124
  }
124
125
  }
File without changes