@agent-relay/dashboard-server 2.0.34 → 2.0.36
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/dist/server.js +15 -7
- package/dist/server.js.map +1 -1
- package/out/404.html +1 -1
- package/out/about.html +1 -1
- package/out/about.txt +1 -1
- package/out/app/onboarding.html +1 -1
- package/out/app/onboarding.txt +1 -1
- package/out/app.html +1 -1
- package/out/app.txt +1 -1
- package/out/blog.html +1 -1
- package/out/blog.txt +1 -1
- package/out/careers.html +1 -1
- package/out/careers.txt +1 -1
- package/out/changelog.html +1 -1
- package/out/changelog.txt +1 -1
- package/out/cloud/link.html +1 -1
- package/out/cloud/link.txt +1 -1
- package/out/complete-profile.html +1 -1
- package/out/complete-profile.txt +1 -1
- package/out/connect-repos.html +1 -1
- package/out/connect-repos.txt +1 -1
- package/out/contact.html +1 -1
- package/out/contact.txt +1 -1
- package/out/docs.html +1 -1
- package/out/docs.txt +1 -1
- package/out/history.html +1 -1
- package/out/history.txt +1 -1
- package/out/index.html +1 -1
- package/out/index.txt +1 -1
- package/out/login.html +1 -1
- package/out/login.txt +1 -1
- package/out/metrics.html +1 -1
- package/out/metrics.txt +1 -1
- package/out/pricing.html +1 -1
- package/out/pricing.txt +1 -1
- package/out/privacy.html +1 -1
- package/out/privacy.txt +1 -1
- package/out/providers/setup/claude.html +1 -1
- package/out/providers/setup/claude.txt +1 -1
- package/out/providers/setup/codex.html +1 -1
- package/out/providers/setup/codex.txt +1 -1
- package/out/providers/setup/cursor.html +1 -1
- package/out/providers/setup/cursor.txt +1 -1
- package/out/providers.html +1 -1
- package/out/providers.txt +1 -1
- package/out/security.html +1 -1
- package/out/security.txt +1 -1
- package/out/signup.html +1 -1
- package/out/signup.txt +1 -1
- package/out/terms.html +1 -1
- package/out/terms.txt +1 -1
- package/package.json +1 -1
- /package/out/_next/static/{4ukqivSxHc6dSkfpBIaVI → XfQQI6vq5D04PVVC74XXJ}/_buildManifest.js +0 -0
- /package/out/_next/static/{4ukqivSxHc6dSkfpBIaVI → XfQQI6vq5D04PVVC74XXJ}/_ssgManifest.js +0 -0
package/dist/server.js
CHANGED
|
@@ -836,8 +836,14 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
836
836
|
};
|
|
837
837
|
client.onStateChange = (state) => {
|
|
838
838
|
console.log(`[dashboard] Relay client for ${senderName} state: ${state}`);
|
|
839
|
-
//
|
|
840
|
-
if (state === '
|
|
839
|
+
// Handle state transitions
|
|
840
|
+
if (state === 'READY') {
|
|
841
|
+
// Re-add to map on successful reconnection
|
|
842
|
+
relayClients.set(senderName, client);
|
|
843
|
+
}
|
|
844
|
+
else if (state === 'DISCONNECTED') {
|
|
845
|
+
// Only remove if max reconnect attempts exhausted (client gives up)
|
|
846
|
+
// The client will auto-reconnect if configured, so don't remove prematurely
|
|
841
847
|
relayClients.delete(senderName);
|
|
842
848
|
}
|
|
843
849
|
};
|
|
@@ -1980,10 +1986,12 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
1980
1986
|
return false;
|
|
1981
1987
|
}
|
|
1982
1988
|
// If agent is daemon-connected but not yet in spawner's activeWorkers,
|
|
1983
|
-
// poll
|
|
1989
|
+
// poll to handle race condition between spawn API returning and
|
|
1984
1990
|
// WebSocket connection. This is common for setup agents (__setup__*).
|
|
1991
|
+
// Longer timeout for CLI auth flows (Cursor, etc.) which can take time to initialize.
|
|
1985
1992
|
if (!isSpawned && isDaemon && spawner) {
|
|
1986
|
-
const
|
|
1993
|
+
const isSetupAgent = agentName.startsWith('__setup__');
|
|
1994
|
+
const maxWaitMs = isSetupAgent ? 90000 : 5000; // 90s for setup agents (CLI auth can be slow), 5s otherwise
|
|
1987
1995
|
const pollIntervalMs = 100;
|
|
1988
1996
|
const startTime = Date.now();
|
|
1989
1997
|
while (Date.now() - startTime < maxWaitMs) {
|
|
@@ -3233,8 +3241,8 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
3233
3241
|
const uptime = process.uptime();
|
|
3234
3242
|
const memUsage = process.memoryUsage();
|
|
3235
3243
|
const socketExists = fs.existsSync(socketPath);
|
|
3236
|
-
// Check relay client connectivity (check if default
|
|
3237
|
-
const defaultClient = relayClients.get('
|
|
3244
|
+
// Check relay client connectivity (check if default _DashboardUI client is connected)
|
|
3245
|
+
const defaultClient = relayClients.get('_DashboardUI');
|
|
3238
3246
|
const relayConnected = defaultClient?.state === 'READY';
|
|
3239
3247
|
// If socket doesn't exist, daemon may not be running properly
|
|
3240
3248
|
if (!socketExists) {
|
|
@@ -3260,7 +3268,7 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
3260
3268
|
const uptime = process.uptime();
|
|
3261
3269
|
const memUsage = process.memoryUsage();
|
|
3262
3270
|
const socketExists = fs.existsSync(socketPath);
|
|
3263
|
-
const defaultClient = relayClients.get('
|
|
3271
|
+
const defaultClient = relayClients.get('_DashboardUI');
|
|
3264
3272
|
const relayConnected = defaultClient?.state === 'READY';
|
|
3265
3273
|
if (!socketExists) {
|
|
3266
3274
|
return res.status(503).json({
|