@sanctuary-framework/mcp-server 0.5.15 → 0.5.16

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/cli.cjs CHANGED
@@ -2344,7 +2344,7 @@ function generateLoginHTML(options) {
2344
2344
  if (response.ok) {
2345
2345
  const data = await response.json();
2346
2346
  sessionStorage.setItem('authToken', token);
2347
- window.location.href = '/dashboard';
2347
+ window.location.href = '/'; // Dashboard is served at root path
2348
2348
  } else if (response.status === 401) {
2349
2349
  showError('Invalid token. Please check and try again.');
2350
2350
  } else {
@@ -5295,7 +5295,24 @@ var init_dashboard = __esm({
5295
5295
  }
5296
5296
  resolve();
5297
5297
  });
5298
- this.httpServer.on("error", reject);
5298
+ this.httpServer.on("error", (err) => {
5299
+ if (err.code === "EADDRINUSE") {
5300
+ const port = this.config.port;
5301
+ process.stderr.write(
5302
+ `
5303
+ \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
5304
+ \u2551 Port ${port} is already in use. \u2551
5305
+ \u2551 \u2551
5306
+ \u2551 Another Sanctuary Dashboard may still be running. \u2551
5307
+ \u2551 To fix: lsof -ti:${port} | xargs kill \u2551
5308
+ \u2551 Then restart the dashboard. \u2551
5309
+ \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
5310
+
5311
+ `
5312
+ );
5313
+ }
5314
+ reject(err);
5315
+ });
5299
5316
  });
5300
5317
  }
5301
5318
  /**
@@ -5575,7 +5592,7 @@ var init_dashboard = __esm({
5575
5592
  if (!this.checkAuth(req, url, res)) return;
5576
5593
  if (!this.checkRateLimit(req, res, "general")) return;
5577
5594
  try {
5578
- if (method === "GET" && url.pathname === "/") {
5595
+ if (method === "GET" && (url.pathname === "/" || url.pathname === "/dashboard")) {
5579
5596
  this.serveDashboard(res);
5580
5597
  } else if (method === "GET" && url.pathname === "/events") {
5581
5598
  this.handleSSE(req, res);