clay-server 2.9.3 → 2.9.4-beta.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/lib/public/app.js CHANGED
@@ -3450,7 +3450,17 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
3450
3450
  if (reconnectTimer) return;
3451
3451
  reconnectTimer = setTimeout(function () {
3452
3452
  reconnectTimer = null;
3453
- connect();
3453
+ // Check if auth is still valid before reconnecting
3454
+ fetch("/info").then(function (res) {
3455
+ if (res.status === 401) {
3456
+ location.reload();
3457
+ return;
3458
+ }
3459
+ connect();
3460
+ }).catch(function () {
3461
+ // Server still down, try connecting anyway
3462
+ connect();
3463
+ });
3454
3464
  }, reconnectDelay);
3455
3465
  reconnectDelay = Math.min(reconnectDelay * 1.5, 10000);
3456
3466
  }
package/lib/sessions.js CHANGED
@@ -325,6 +325,7 @@ function createSessionManager(opts) {
325
325
  if (!session) return;
326
326
 
327
327
  activeSessionId = localId;
328
+ if (targetWs) targetWs._clayActiveSession = localId;
328
329
 
329
330
  // In multi-user mode with a specific client, only send to that client
330
331
  var _send = (targetWs && sendTo) ? function (obj) { sendTo(targetWs, obj); } : send;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.9.3",
3
+ "version": "2.9.4-beta.1",
4
4
  "description": "Web UI for Claude Code. Any device. Push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",