coder-config 0.45.5 → 0.45.6

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/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.45.5';
5
+ const VERSION = '0.45.6';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.45.5",
3
+ "version": "0.45.6",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
package/ui/server.cjs CHANGED
@@ -263,6 +263,32 @@ class ConfigUIServer {
263
263
  console.log(`📁 Project: ${this.projectDir}`);
264
264
  console.log(`💻 Terminal WebSocket: ws://localhost:${this.port}/ws/terminal\n`);
265
265
  });
266
+
267
+ // Watchdog: detect suspend/resume and restart if event loop was blocked
268
+ this.startSuspendWatchdog();
269
+ }
270
+
271
+ /**
272
+ * Watchdog to detect system suspend/resume
273
+ * If the event loop was blocked for too long (suspend), restart the server
274
+ */
275
+ startSuspendWatchdog() {
276
+ const HEARTBEAT_INTERVAL = 5000; // Check every 5 seconds
277
+ const SUSPEND_THRESHOLD = 30000; // 30 seconds gap = likely suspended
278
+ let lastHeartbeat = Date.now();
279
+
280
+ setInterval(() => {
281
+ const now = Date.now();
282
+ const elapsed = now - lastHeartbeat;
283
+
284
+ if (elapsed > SUSPEND_THRESHOLD) {
285
+ console.log(`[Watchdog] System resumed after ${Math.round(elapsed / 1000)}s suspend, restarting server...`);
286
+ // Exit with code 0 - launchd will restart us
287
+ process.exit(0);
288
+ }
289
+
290
+ lastHeartbeat = now;
291
+ }, HEARTBEAT_INTERVAL);
266
292
  }
267
293
 
268
294
  /**