mcp-tenant-lib 0.3.7 → 0.3.8

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.
@@ -94,5 +94,15 @@ export function enablePersistence(filePath) {
94
94
  writeToDisk();
95
95
  }, WRITE_DEBOUNCE_MS);
96
96
  pollInterval.unref();
97
+ // A change followed by a kill within WRITE_DEBOUNCE_MS never reaches the
98
+ // poll loop above, so the process's last bit of state would silently be
99
+ // lost on an otherwise-ordinary Ctrl+C. Force one final synchronous write
100
+ // before actually exiting so a quick restart doesn't drop it.
101
+ for (const signal of ['SIGINT', 'SIGTERM']) {
102
+ process.on(signal, () => {
103
+ writeToDisk();
104
+ process.exit(0);
105
+ });
106
+ }
97
107
  return { seededIds };
98
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-tenant-lib",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "type": "module",
5
5
  "description": "Generic tenant/session bookkeeping + MCP wiring, reusable across projects.",
6
6
  "repository": {