@alex900530/claude-persistent-memory 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/lib/memory-db.js +6 -1
  2. package/package.json +4 -3
package/lib/memory-db.js CHANGED
@@ -245,7 +245,12 @@ async function getEmbeddingModel() {
245
245
  if (_pipeline) return _pipeline;
246
246
 
247
247
  try {
248
- const { pipeline } = await import('@huggingface/transformers');
248
+ const { pipeline, env } = await import('@huggingface/transformers');
249
+ // Use shared global cache instead of per-project node_modules cache
250
+ const os = require('os');
251
+ const cacheDir = path.join(os.homedir(), '.cache', 'huggingface', 'transformers-js');
252
+ env.cacheDir = cacheDir;
253
+ console.error(`[memory-db] Model cache: ${cacheDir}`);
249
254
  console.error('[memory-db] Loading bge-m3 via transformers.js...');
250
255
  _pipeline = await pipeline('feature-extraction', config.embedding.model, {
251
256
  device: 'cpu'
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@alex900530/claude-persistent-memory",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Persistent memory system for Claude Code — hybrid BM25 + vector search, LLM-driven structuring, automatic clustering",
5
5
  "main": "lib/memory-db.js",
6
6
  "bin": {
7
- "claude-persistent-memory": "bin/setup.js"
7
+ "claude-persistent-memory": "bin/setup.js",
8
+ "claude-persistent-memory-uninstall": "bin/uninstall.js"
8
9
  },
9
10
  "scripts": {
10
11
  "postinstall": "node bin/setup.js --postinstall",
11
12
  "setup": "node bin/setup.js",
12
- "uninstall": "node bin/uninstall.js",
13
+ "preuninstall": "node bin/uninstall.js",
13
14
  "embedding-server": "node services/embedding-server.js",
14
15
  "llm-server": "node services/llm-server.js",
15
16
  "mcp-server": "node services/memory-mcp-server.js",