@agent-relay/dashboard-server 2.0.43 → 2.0.45
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.d.ts.map +1 -1
- package/dist/server.js +15 -10
- package/dist/server.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/CM3RazJRkqfUHgWQkurFD/_ssgManifest.js +1 -0
- package/out/_next/static/chunks/873-ca999501cec1e494.js +1 -0
- package/out/_next/static/chunks/app/app/[[...slug]]/page-a528040db9d1fec0.js +1 -0
- package/out/_next/static/chunks/app/history/page-2d5c5695c9e8b40c.js +1 -0
- package/out/_next/static/chunks/{main-aae8c0e65b54ebf2.js → main-cfe563bdea0acece.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 +4 -4
- 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 +2 -2
- 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 +1 -1
- package/out/_next/static/NnlH3AvgH9u-lDF9UDypD/_ssgManifest.js +0 -1
- package/out/_next/static/chunks/873-4eda437af4fe454b.js +0 -1
- package/out/_next/static/chunks/app/app/page-ea86e0c84d52aa7c.js +0 -1
- package/out/_next/static/chunks/app/history/page-13b0638ab5d50a96.js +0 -1
- /package/out/_next/static/{NnlH3AvgH9u-lDF9UDypD → CM3RazJRkqfUHgWQkurFD}/_buildManifest.js +0 -0
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgYzD,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACvH,wBAAsB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -7,7 +7,7 @@ import os from 'os';
|
|
|
7
7
|
import crypto from 'crypto';
|
|
8
8
|
import { exec } from 'child_process';
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
|
-
import {
|
|
10
|
+
import { createStorageAdapter } from '@agent-relay/storage/adapter';
|
|
11
11
|
import { RelayClient } from '@agent-relay/sdk';
|
|
12
12
|
import { UserBridge } from './services/user-bridge.js';
|
|
13
13
|
import { computeNeedsAttention } from './services/needs-attention.js';
|
|
@@ -309,11 +309,12 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
309
309
|
const { port, dataDir, teamDir, dbPath, enableSpawner, projectRoot, tmuxSession, onMarkSpawning, onClearSpawning } = options;
|
|
310
310
|
console.log('Starting dashboard...');
|
|
311
311
|
const disableStorage = process.env.RELAY_DISABLE_STORAGE === 'true';
|
|
312
|
+
// Use createStorageAdapter to match daemon's storage type (JSONL by default)
|
|
313
|
+
// This ensures dashboard reads from the same storage as daemon writes to
|
|
314
|
+
const storagePath = dbPath ?? path.join(dataDir, 'messages.sqlite');
|
|
312
315
|
const storage = disableStorage
|
|
313
316
|
? undefined
|
|
314
|
-
:
|
|
315
|
-
dbPath: dbPath ?? path.join(dataDir, 'dashboard.db'),
|
|
316
|
-
});
|
|
317
|
+
: await createStorageAdapter(storagePath);
|
|
317
318
|
const defaultWorkspaceId = process.env.RELAY_WORKSPACE_ID ?? process.env.AGENT_RELAY_WORKSPACE_ID;
|
|
318
319
|
const resolveWorkspaceId = (req) => {
|
|
319
320
|
const fromQuery = req.query.workspaceId;
|
|
@@ -1483,7 +1484,7 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
1483
1484
|
return `${minutes}m`;
|
|
1484
1485
|
};
|
|
1485
1486
|
const getRecentSessions = async () => {
|
|
1486
|
-
if (storage && storage
|
|
1487
|
+
if (storage && typeof storage.getRecentSessions === 'function') {
|
|
1487
1488
|
const sessions = await storage.getRecentSessions(20);
|
|
1488
1489
|
return sessions.map(s => ({
|
|
1489
1490
|
id: s.id,
|
|
@@ -1501,7 +1502,7 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
1501
1502
|
return [];
|
|
1502
1503
|
};
|
|
1503
1504
|
const getAgentSummaries = async () => {
|
|
1504
|
-
if (storage && storage
|
|
1505
|
+
if (storage && typeof storage.getAllAgentSummaries === 'function') {
|
|
1505
1506
|
const summaries = await storage.getAllAgentSummaries();
|
|
1506
1507
|
return summaries.map(s => ({
|
|
1507
1508
|
agentName: s.agentName,
|
|
@@ -2944,12 +2945,15 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
2944
2945
|
}
|
|
2945
2946
|
let messages = await storage.getMessages(query);
|
|
2946
2947
|
// Only include channel messages for this workspace
|
|
2948
|
+
// Be lenient: if message is to a channel (starts with #), treat as channel message
|
|
2949
|
+
// even if _isChannelMessage flag isn't set (for backwards compatibility)
|
|
2947
2950
|
messages = messages.filter((m) => {
|
|
2948
2951
|
const data = m.data;
|
|
2949
2952
|
if (workspaceId && data?._workspaceId && data._workspaceId !== workspaceId) {
|
|
2950
2953
|
return false;
|
|
2951
2954
|
}
|
|
2952
|
-
|
|
2955
|
+
// Accept message if it has _isChannelMessage flag OR if it's addressed to a channel
|
|
2956
|
+
return Boolean(data?._isChannelMessage) || (m.to && m.to.startsWith('#'));
|
|
2953
2957
|
});
|
|
2954
2958
|
// Sort ascending for UI
|
|
2955
2959
|
messages.sort((a, b) => a.ts - b.ts);
|
|
@@ -4110,9 +4114,10 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
4110
4114
|
return res.status(503).json({ error: 'Storage not configured' });
|
|
4111
4115
|
}
|
|
4112
4116
|
try {
|
|
4113
|
-
// Get stats from
|
|
4114
|
-
|
|
4115
|
-
|
|
4117
|
+
// Get stats from adapter if available (SQLite-specific getStats method)
|
|
4118
|
+
const storageWithStats = storage;
|
|
4119
|
+
if (typeof storageWithStats.getStats === 'function' && typeof storage.getSessions === 'function') {
|
|
4120
|
+
const stats = await storageWithStats.getStats();
|
|
4116
4121
|
const sessions = await storage.getSessions({ limit: 1000 });
|
|
4117
4122
|
// Calculate additional stats
|
|
4118
4123
|
const activeSessions = sessions.filter(s => !s.endedAt).length;
|