@grec0/memory-bank-mcp 0.1.35 → 0.1.37
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.
|
@@ -168,6 +168,7 @@ export class AgentBoardSqlite {
|
|
|
168
168
|
VALUES (?, ?, ?, ?, ?, 'PENDING', ?)
|
|
169
169
|
`).run(taskId, this.projectId, title, description || null, fromAgent || null, now);
|
|
170
170
|
this.logMessage(fromAgent || 'SYSTEM', `Created task ${taskId}: ${title}`);
|
|
171
|
+
databaseManager.flushForExternalReaders();
|
|
171
172
|
return taskId;
|
|
172
173
|
}
|
|
173
174
|
/**
|
|
@@ -182,6 +183,7 @@ export class AgentBoardSqlite {
|
|
|
182
183
|
VALUES (?, ?, ?, ?, ?, 'PENDING', ?)
|
|
183
184
|
`).run(taskId, this.projectId, title, context || null, fromProjectId, now);
|
|
184
185
|
this.logMessage('SYSTEM', `External task ${taskId} from ${fromProjectId}: ${title}`);
|
|
186
|
+
databaseManager.flushForExternalReaders();
|
|
185
187
|
return taskId;
|
|
186
188
|
}
|
|
187
189
|
/**
|
|
@@ -209,6 +211,7 @@ export class AgentBoardSqlite {
|
|
|
209
211
|
`).run(agentId, now, taskId, this.projectId);
|
|
210
212
|
if (result.changes > 0) {
|
|
211
213
|
this.logMessage(agentId, `Claimed task ${taskId}`);
|
|
214
|
+
databaseManager.flushForExternalReaders();
|
|
212
215
|
return true;
|
|
213
216
|
}
|
|
214
217
|
return false;
|
|
@@ -226,6 +229,7 @@ export class AgentBoardSqlite {
|
|
|
226
229
|
`).run(now, taskId, this.projectId);
|
|
227
230
|
if (result.changes > 0) {
|
|
228
231
|
this.logMessage(agentId, `Completed task ${taskId}`);
|
|
232
|
+
databaseManager.flushForExternalReaders();
|
|
229
233
|
return true;
|
|
230
234
|
}
|
|
231
235
|
return false;
|
package/dist/common/database.js
CHANGED
|
@@ -130,8 +130,9 @@ class DatabaseManager {
|
|
|
130
130
|
this.db = new Database(this.dbPath, {
|
|
131
131
|
timeout: 5000, // Wait up to 5s for locks
|
|
132
132
|
});
|
|
133
|
-
//
|
|
134
|
-
|
|
133
|
+
// Use DELETE journal mode instead of WAL for compatibility with sql.js readers
|
|
134
|
+
// sql.js cannot read databases with WAL mode enabled (even with empty WAL files)
|
|
135
|
+
this.db.pragma('journal_mode = DELETE');
|
|
135
136
|
// Foreign keys enforcement
|
|
136
137
|
this.db.pragma('foreign_keys = ON');
|
|
137
138
|
// Initialize schema
|