a2acalling 0.6.67 → 0.6.68
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/.a2a-manifest.json +2 -2
- package/package.json +1 -1
- package/src/lib/callbook.js +8 -0
- package/src/lib/dashboard-events.js +8 -0
- package/src/server.js +7 -1
package/.a2a-manifest.json
CHANGED
package/package.json
CHANGED
package/src/lib/callbook.js
CHANGED
|
@@ -348,6 +348,14 @@ class CallbookStore {
|
|
|
348
348
|
});
|
|
349
349
|
return tx();
|
|
350
350
|
}
|
|
351
|
+
|
|
352
|
+
// A2A-57: Close the SQLite database and flush WAL on shutdown
|
|
353
|
+
close() {
|
|
354
|
+
if (this.db) {
|
|
355
|
+
try { this.db.close(); } catch (_) {}
|
|
356
|
+
this.db = null;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
351
359
|
}
|
|
352
360
|
|
|
353
361
|
module.exports = {
|
|
@@ -182,6 +182,14 @@ class DashboardEventStore {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
// A2A-57: Close the SQLite database and flush WAL on shutdown
|
|
186
|
+
close() {
|
|
187
|
+
if (this.db) {
|
|
188
|
+
try { this.db.close(); } catch (_) {}
|
|
189
|
+
this.db = null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
185
193
|
_toEvent(row) {
|
|
186
194
|
let payload = {};
|
|
187
195
|
try {
|
package/src/server.js
CHANGED
|
@@ -21,7 +21,7 @@ const {
|
|
|
21
21
|
extractCollaborationState
|
|
22
22
|
} = require('./lib/prompt-template');
|
|
23
23
|
const { findAvailablePort } = require('./lib/port-scanner');
|
|
24
|
-
const { createLogger } = require('./lib/logger');
|
|
24
|
+
const { createLogger, closeAllLoggerStores } = require('./lib/logger');
|
|
25
25
|
const { writePidFile, removePidFile } = require('./lib/pid-file');
|
|
26
26
|
const { buildUnifiedSummaryPrompt } = require('./lib/summary-prompt');
|
|
27
27
|
const { A2AConfig } = require('./lib/config');
|
|
@@ -1073,9 +1073,15 @@ async function startServer() {
|
|
|
1073
1073
|
throw err;
|
|
1074
1074
|
});
|
|
1075
1075
|
|
|
1076
|
+
// A2A-57: Close all SQLite stores before shutting down the HTTP server
|
|
1076
1077
|
function shutdown() {
|
|
1077
1078
|
if (updateManager) updateManager.stop();
|
|
1078
1079
|
removePidFile();
|
|
1080
|
+
if (serverConvStore && serverConvStore.close) {
|
|
1081
|
+
try { serverConvStore.close(); } catch (_) {}
|
|
1082
|
+
}
|
|
1083
|
+
try { eventStore.close(); } catch (_) {}
|
|
1084
|
+
try { closeAllLoggerStores(); } catch (_) {}
|
|
1079
1085
|
server.close(() => process.exit(0));
|
|
1080
1086
|
// Force exit after 5s if connections won't close
|
|
1081
1087
|
setTimeout(() => process.exit(0), 5000).unref();
|