@agent-relay/dashboard-server 2.0.55 → 2.0.57

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.
Files changed (57) hide show
  1. package/dist/server.d.ts.map +1 -1
  2. package/dist/server.js +44 -5
  3. package/dist/server.js.map +1 -1
  4. package/out/404.html +1 -1
  5. package/out/about.html +1 -1
  6. package/out/about.txt +1 -1
  7. package/out/app/onboarding.html +1 -1
  8. package/out/app/onboarding.txt +1 -1
  9. package/out/app.html +1 -1
  10. package/out/app.txt +1 -1
  11. package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +1 -1
  12. package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
  13. package/out/blog.html +1 -1
  14. package/out/blog.txt +1 -1
  15. package/out/careers.html +1 -1
  16. package/out/careers.txt +1 -1
  17. package/out/changelog.html +1 -1
  18. package/out/changelog.txt +1 -1
  19. package/out/cloud/link.html +1 -1
  20. package/out/cloud/link.txt +1 -1
  21. package/out/complete-profile.html +1 -1
  22. package/out/complete-profile.txt +1 -1
  23. package/out/connect-repos.html +1 -1
  24. package/out/connect-repos.txt +1 -1
  25. package/out/contact.html +1 -1
  26. package/out/contact.txt +1 -1
  27. package/out/docs.html +1 -1
  28. package/out/docs.txt +1 -1
  29. package/out/history.html +1 -1
  30. package/out/history.txt +1 -1
  31. package/out/index.html +1 -1
  32. package/out/index.txt +1 -1
  33. package/out/login.html +1 -1
  34. package/out/login.txt +1 -1
  35. package/out/metrics.html +1 -1
  36. package/out/metrics.txt +1 -1
  37. package/out/pricing.html +1 -1
  38. package/out/pricing.txt +1 -1
  39. package/out/privacy.html +1 -1
  40. package/out/privacy.txt +1 -1
  41. package/out/providers/setup/claude.html +1 -1
  42. package/out/providers/setup/claude.txt +1 -1
  43. package/out/providers/setup/codex.html +1 -1
  44. package/out/providers/setup/codex.txt +1 -1
  45. package/out/providers/setup/cursor.html +1 -1
  46. package/out/providers/setup/cursor.txt +1 -1
  47. package/out/providers.html +1 -1
  48. package/out/providers.txt +1 -1
  49. package/out/security.html +1 -1
  50. package/out/security.txt +1 -1
  51. package/out/signup.html +1 -1
  52. package/out/signup.txt +1 -1
  53. package/out/terms.html +1 -1
  54. package/out/terms.txt +1 -1
  55. package/package.json +1 -1
  56. /package/out/_next/static/{8-p7CupbYTtfbfLLUaFAr → QS-NFfJUw1w3081kmWJg9}/_buildManifest.js +0 -0
  57. /package/out/_next/static/{8-p7CupbYTtfbfLLUaFAr → QS-NFfJUw1w3081kmWJg9}/_ssgManifest.js +0 -0
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AA8DA,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
@@ -21,11 +21,22 @@ import { detectWorkspacePath, getAgentOutboxTemplate } from '@agent-relay/config
21
21
  // Dynamically find the dashboard static files directory
22
22
  // We can't import from @agent-relay/dashboard directly due to circular dependency
23
23
  function findDashboardDir() {
24
- // First, try the bundled 'out' folder adjacent to 'dist' (for npm global install / npx)
25
24
  const currentFileDir = path.dirname(fileURLToPath(import.meta.url));
26
- const bundledOutDir = path.join(currentFileDir, '..', 'out');
27
- if (fs.existsSync(bundledOutDir)) {
28
- return bundledOutDir;
25
+ // Detect if running from a Bun bundled binary (virtual filesystem)
26
+ const isBundled = currentFileDir.startsWith('/$bunfs/');
27
+ // First, try the bundled 'out' folder adjacent to 'dist' (for npm global install / npx)
28
+ // Skip this check in bundled mode as the virtual filesystem won't have real files
29
+ if (!isBundled) {
30
+ const bundledOutDir = path.join(currentFileDir, '..', 'out');
31
+ if (fs.existsSync(bundledOutDir)) {
32
+ return bundledOutDir;
33
+ }
34
+ }
35
+ // For bundled binaries or as fallback, check ~/.relay/dashboard/out
36
+ // This allows caching dashboard files separately from the binary
37
+ const cachedDashboardDir = path.join(os.homedir(), '.relay', 'dashboard', 'out');
38
+ if (fs.existsSync(cachedDashboardDir)) {
39
+ return cachedDashboardDir;
29
40
  }
30
41
  try {
31
42
  // Fallback: try to resolve @agent-relay/dashboard package and find its 'out' directory
@@ -39,6 +50,7 @@ function findDashboardDir() {
39
50
  catch {
40
51
  // Package not found, will use fallback
41
52
  }
53
+ // Return null with flag indicating bundled mode (for quieter error handling)
42
54
  return null;
43
55
  }
44
56
  import { startCLIAuth, getAuthSession, cancelAuthSession, submitAuthCode, completeAuthSession, getSupportedProviders, } from '@agent-relay/daemon';
@@ -770,7 +782,34 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
770
782
  });
771
783
  }
772
784
  else {
773
- console.error('[dashboard] Dashboard not found - searched from:', __dirname);
785
+ // Serve a fallback page when dashboard UI files aren't available
786
+ const fallbackHtml = `<!DOCTYPE html>
787
+ <html>
788
+ <head>
789
+ <title>Agent Relay Dashboard</title>
790
+ <style>
791
+ body { font-family: system-ui, sans-serif; max-width: 600px; margin: 100px auto; padding: 20px; }
792
+ h1 { color: #333; }
793
+ code { background: #f4f4f4; padding: 2px 6px; border-radius: 3px; }
794
+ pre { background: #f4f4f4; padding: 12px; border-radius: 5px; overflow-x: auto; }
795
+ .api-status { margin-top: 30px; padding: 15px; background: #e8f5e9; border-radius: 5px; }
796
+ </style>
797
+ </head>
798
+ <body>
799
+ <h1>Agent Relay Dashboard</h1>
800
+ <p>The dashboard API is running, but the UI files are not available.</p>
801
+ <p>To get the full dashboard UI, reinstall using the official installer:</p>
802
+ <pre><code>curl -fsSL https://raw.githubusercontent.com/AgentWorkforce/relay/main/install.sh | bash</code></pre>
803
+ <div class="api-status">
804
+ <strong>API Status:</strong> Running<br>
805
+ <a href="/api/agents">View connected agents</a> |
806
+ <a href="/api/messages">View messages</a>
807
+ </div>
808
+ </body>
809
+ </html>`;
810
+ app.get('/', (req, res) => {
811
+ res.type('html').send(fallbackHtml);
812
+ });
774
813
  }
775
814
  // Relay clients for sending messages from dashboard
776
815
  // Map of senderName -> RelayClient for per-user connections