claude-recall 0.2.13 → 0.2.14

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/README.md CHANGED
@@ -35,7 +35,7 @@ npm install -g claude-recall@latest
35
35
 
36
36
  ### 2. Verify Installation
37
37
  ```bash
38
- claude-recall --version # Should show 0.2.13 or higher
38
+ claude-recall --version # Should show 0.2.14 or higher
39
39
  ```
40
40
 
41
41
  ### 3. Start Using Claude
@@ -265,7 +265,7 @@ async function main() {
265
265
  program
266
266
  .name('claude-recall')
267
267
  .description('Memory-enhanced Claude Code via MCP')
268
- .version('0.2.13')
268
+ .version('0.2.14')
269
269
  .option('--verbose', 'Enable verbose logging')
270
270
  .option('--config <path>', 'Path to custom config file');
271
271
  // MCP command
@@ -43,6 +43,10 @@ const path = __importStar(require("path"));
43
43
  class MemoryStorage {
44
44
  constructor(dbPath) {
45
45
  this.db = new better_sqlite3_1.default(dbPath);
46
+ // Enable WAL mode for better concurrency and to ensure writes are visible
47
+ this.db.pragma('journal_mode = WAL');
48
+ // Ensure changes are synced to disk
49
+ this.db.pragma('synchronous = NORMAL');
46
50
  this.initialize();
47
51
  }
48
52
  initialize() {
@@ -82,6 +86,9 @@ class MemoryStorage {
82
86
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
83
87
  `);
84
88
  stmt.run(memory.key, JSON.stringify(memory.value), memory.type, memory.project_id || null, memory.file_path || null, memory.timestamp || Date.now(), memory.relevance_score || 1.0, memory.access_count || 0, memory.preference_key || null, memory.is_active !== undefined ? (memory.is_active ? 1 : 0) : 1, memory.superseded_by || null, memory.superseded_at || null, memory.confidence_score || null);
89
+ // Force a WAL checkpoint to ensure the data is written to the main database file
90
+ // This ensures that other processes (like CLI) can see the changes immediately
91
+ this.db.pragma('wal_checkpoint(TRUNCATE)');
85
92
  }
86
93
  retrieve(key) {
87
94
  const stmt = this.db.prepare('SELECT * FROM memories WHERE key = ?');
@@ -130,11 +130,15 @@ class ConfigService {
130
130
  return { ...this.config };
131
131
  }
132
132
  getDatabasePath() {
133
+ // ALWAYS use ~/.claude-recall/claude-recall.db regardless of environment variables
134
+ // This ensures consistency across CLI and MCP server
135
+ const dbDir = path.join(os.homedir(), '.claude-recall');
136
+ const dbPath = path.join(dbDir, 'claude-recall.db');
133
137
  // Ensure database directory exists
134
- if (!fs.existsSync(this.config.database.path)) {
135
- fs.mkdirSync(this.config.database.path, { recursive: true });
138
+ if (!fs.existsSync(dbDir)) {
139
+ fs.mkdirSync(dbDir, { recursive: true });
136
140
  }
137
- return path.join(this.config.database.path, this.config.database.name);
141
+ return dbPath;
138
142
  }
139
143
  getLogPath(logName) {
140
144
  return path.join(this.config.logging.directory, logName);
@@ -233,4 +233,4 @@ socket.on('queue:processed', (message) => {});
233
233
  ```
234
234
 
235
235
  ---
236
- *API Reference v0.2.13 - Last updated: August 2025*
236
+ *API Reference v0.2.14 - Last updated: August 2025*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Persistent memory for Claude Code with automatic capture via hooks and MCP server",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -43,14 +43,11 @@ try {
43
43
  }
44
44
 
45
45
  // Add or update claude-recall configuration
46
+ // Remove env variables since we're hardcoding the path to ~/.claude-recall/claude-recall.db
46
47
  config.mcpServers['claude-recall'] = {
47
48
  type: 'stdio',
48
49
  command: 'npx',
49
- args: ['claude-recall', 'mcp', 'start'],
50
- env: {
51
- CLAUDE_RECALL_DB_PATH: dbDir,
52
- CLAUDE_RECALL_DB_NAME: 'claude-recall.db'
53
- }
50
+ args: ['claude-recall', 'mcp', 'start']
54
51
  };
55
52
 
56
53
  // Write back the config with proper formatting