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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.6.67",
3
- "installed_at": "2026-02-25T14:23:35.176Z",
2
+ "version": "0.6.68",
3
+ "installed_at": "2026-02-25T19:26:27.869Z",
4
4
  "files": [
5
5
  {
6
6
  "path": "CLAUDE.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a2acalling",
3
- "version": "0.6.67",
3
+ "version": "0.6.68",
4
4
  "description": "Agent-to-agent calling for OpenClaw - A2A agent communication",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -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();