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
|
@@ -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.
|
|
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
|
package/dist/memory/storage.js
CHANGED
|
@@ -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 = ?');
|
package/dist/services/config.js
CHANGED
|
@@ -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(
|
|
135
|
-
fs.mkdirSync(
|
|
138
|
+
if (!fs.existsSync(dbDir)) {
|
|
139
|
+
fs.mkdirSync(dbDir, { recursive: true });
|
|
136
140
|
}
|
|
137
|
-
return
|
|
141
|
+
return dbPath;
|
|
138
142
|
}
|
|
139
143
|
getLogPath(logName) {
|
|
140
144
|
return path.join(this.config.logging.directory, logName);
|
package/docs/API_REFERENCE.md
CHANGED
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -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
|