vibemon 1.7.0 → 1.8.1

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/main.js CHANGED
@@ -349,6 +349,11 @@ app.on('window-all-closed', () => {
349
349
  });
350
350
 
351
351
  app.on('before-quit', () => {
352
+ // Null callbacks first to prevent any fired timers from triggering updates
353
+ stateManager.onStateTimeout = null;
354
+ stateManager.onWindowCloseTimeout = null;
355
+ windowManager.onWindowClosed = null;
356
+
352
357
  stateManager.cleanup();
353
358
  windowManager.cleanup();
354
359
  if (trayManager) {
@@ -68,7 +68,14 @@ class HttpServer {
68
68
  }
69
69
 
70
70
  start() {
71
- this.server = http.createServer((req, res) => this.handleRequest(req, res));
71
+ this.server = http.createServer((req, res) => {
72
+ this.handleRequest(req, res).catch((err) => {
73
+ console.error('Unhandled request error:', err.message);
74
+ if (!res.headersSent) {
75
+ sendError(res, 500, 'Internal server error');
76
+ }
77
+ });
78
+ });
72
79
 
73
80
  this.server.on('error', (err) => {
74
81
  console.error('HTTP Server error:', err.message);
@@ -559,7 +566,8 @@ class HttpServer {
559
566
  const html = await fsPromises.readFile(statsHtmlPath, 'utf8');
560
567
  res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
561
568
  res.end(html);
562
- } catch {
569
+ } catch (err) {
570
+ console.error('Failed to load stats page:', err.message);
563
571
  sendError(res, 500, 'Failed to load stats page');
564
572
  }
565
573
  }
@@ -84,8 +84,9 @@ class StateManager {
84
84
  }, IDLE_TIMEOUT);
85
85
  this.stateTimeoutTimers.set(projectId, timer);
86
86
  } else if (currentState === 'planning' || currentState === 'thinking' ||
87
- currentState === 'working' || currentState === 'notification') {
88
- // planning/thinking/working/notification -> idle after 5 minutes
87
+ currentState === 'working' || currentState === 'packing' ||
88
+ currentState === 'notification' || currentState === 'alert') {
89
+ // planning/thinking/working/packing/notification/alert -> idle after 5 minutes
89
90
  const timer = setTimeout(() => {
90
91
  this.stateTimeoutTimers.delete(projectId);
91
92
  if (this.onStateTimeout) {
@@ -163,6 +163,7 @@ class WsClient {
163
163
  this.isConnecting = false;
164
164
  this.isConnected = true;
165
165
  this.reconnectDelay = RECONNECT_INITIAL_DELAY;
166
+ this.sendAuth();
166
167
  this.startHeartbeat();
167
168
  this.notifyConnectionChange();
168
169
  });
@@ -198,6 +199,10 @@ class WsClient {
198
199
  return;
199
200
  }
200
201
 
202
+ if (!this.token) {
203
+ return;
204
+ }
205
+
201
206
  const authMessage = JSON.stringify({
202
207
  type: 'auth',
203
208
  token: this.token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibemon",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "description": "AI assistant status monitor",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -59,9 +59,9 @@
59
59
  "disabled": "Disabled"
60
60
  },
61
61
 
62
- "ACTIVE_STATES": ["thinking", "planning", "working", "notification", "packing"],
62
+ "ACTIVE_STATES": ["thinking", "planning", "working", "notification", "packing", "alert"],
63
63
 
64
- "VALID_STATES": ["start", "idle", "thinking", "planning", "working", "packing", "notification", "sleep", "done"],
64
+ "VALID_STATES": ["start", "idle", "thinking", "planning", "working", "packing", "notification", "sleep", "done", "alert"],
65
65
 
66
66
  "CHARACTER_NAMES": ["apto", "clawd", "kiro", "claw"],
67
67
 
@@ -81,6 +81,7 @@
81
81
  "packing": "#AAAAAA",
82
82
  "notification": "#FFCC00",
83
83
  "sleep": "#111144",
84
- "done": "#00AA00"
84
+ "done": "#00AA00",
85
+ "alert": "#DD0000"
85
86
  }
86
87
  }