@agent-relay/dashboard-server 2.0.73 → 2.0.75
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 -3
- package/dist/server.js.map +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{285-57ccd3043914acb2.js → 285-d90511ea4690c27f.js} +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 +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +1 -1
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.html +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.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 +2 -2
- 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 +10 -10
- /package/out/_next/static/{CVQXstfbl09Ow0ERYIWu4 → 4kMPp3uMfICqAWT7vypt4}/_buildManifest.js +0 -0
- /package/out/_next/static/{CVQXstfbl09Ow0ERYIWu4 → 4kMPp3uMfICqAWT7vypt4}/_ssgManifest.js +0 -0
package/dist/server.js
CHANGED
|
@@ -1676,7 +1676,7 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
1676
1676
|
const getAllData = async () => {
|
|
1677
1677
|
const team = getTeamData();
|
|
1678
1678
|
if (!team)
|
|
1679
|
-
return
|
|
1679
|
+
return null; // Signal that team data is temporarily unavailable
|
|
1680
1680
|
const agentsMap = new Map();
|
|
1681
1681
|
const allMessages = await getMessages(team.agents);
|
|
1682
1682
|
// Initialize agents from config
|
|
@@ -1971,6 +1971,12 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
1971
1971
|
const broadcastData = async () => {
|
|
1972
1972
|
try {
|
|
1973
1973
|
const data = await getAllData();
|
|
1974
|
+
// Skip broadcast when team data is temporarily unavailable (e.g., agents.json
|
|
1975
|
+
// being rewritten by daemon). Preserves the last valid payload so clients
|
|
1976
|
+
// don't see an empty screen flash.
|
|
1977
|
+
if (!data) {
|
|
1978
|
+
return;
|
|
1979
|
+
}
|
|
1974
1980
|
const rawPayload = JSON.stringify(data);
|
|
1975
1981
|
// Guard against empty/invalid payloads
|
|
1976
1982
|
if (!rawPayload || rawPayload.length === 0) {
|
|
@@ -2108,7 +2114,10 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
2108
2114
|
initializingClients.add(ws);
|
|
2109
2115
|
try {
|
|
2110
2116
|
const data = await getAllData();
|
|
2111
|
-
|
|
2117
|
+
// If team data is temporarily unavailable, send empty-but-valid structure
|
|
2118
|
+
// so the client at least renders (better than sending nothing on first connect)
|
|
2119
|
+
const safeData = data ?? { agents: [], users: [], messages: [], activity: [], sessions: [], summaries: [] };
|
|
2120
|
+
const payload = JSON.stringify(safeData);
|
|
2112
2121
|
// Guard against empty/invalid payloads
|
|
2113
2122
|
if (!payload || payload.length === 0) {
|
|
2114
2123
|
console.warn('[dashboard] Skipping initial send - empty payload');
|
|
@@ -2938,7 +2947,10 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
2938
2947
|
});
|
|
2939
2948
|
});
|
|
2940
2949
|
app.get('/api/data', (req, res) => {
|
|
2941
|
-
getAllData().then((data) =>
|
|
2950
|
+
getAllData().then((data) => {
|
|
2951
|
+
const safeData = data ?? { agents: [], users: [], messages: [], activity: [], sessions: [], summaries: [] };
|
|
2952
|
+
res.json(safeData);
|
|
2953
|
+
}).catch((err) => {
|
|
2942
2954
|
console.error('Failed to fetch dashboard data', err);
|
|
2943
2955
|
res.status(500).json({ error: 'Failed to load data' });
|
|
2944
2956
|
});
|