@beastmode-develeap/beastmode 0.1.119 → 0.1.121

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/index.js CHANGED
@@ -6438,14 +6438,13 @@ async function startServer(options = {}) {
6438
6438
  }
6439
6439
  }
6440
6440
  function loadBoardHtml() {
6441
- const fallback = "<html><body><h1>BeastMode Board</h1><p>board.html not found.</p></body></html>";
6442
6441
  try {
6443
6442
  const dir = staticDir || resolveStaticDir();
6444
6443
  const boardPath = join14(dir, "board.html");
6445
- if (!existsSync16(boardPath)) return fallback;
6444
+ if (!existsSync16(boardPath)) return null;
6446
6445
  return readFileSync13(boardPath, "utf-8");
6447
6446
  } catch {
6448
- return fallback;
6447
+ return null;
6449
6448
  }
6450
6449
  }
6451
6450
  let chatManager = null;
@@ -6625,6 +6624,17 @@ async function startServer(options = {}) {
6625
6624
  if (method === "GET") {
6626
6625
  if (url === "/board" || url === "/board.html") {
6627
6626
  let html = loadBoardHtml();
6627
+ if (html === null) {
6628
+ const body = "<html><body><h1>BeastMode Board</h1><p>Artifact missing \u2014 deploy pipeline produced an unreadable board.html. This is an infrastructure failure, not a feature bug.</p></body></html>";
6629
+ res.writeHead(503, {
6630
+ "Content-Type": "text/html; charset=utf-8",
6631
+ "Content-Length": Buffer.byteLength(body),
6632
+ "Cache-Control": "no-store",
6633
+ "X-Beastmode-Artifact-Status": "missing"
6634
+ });
6635
+ res.end(body);
6636
+ return;
6637
+ }
6628
6638
  if (options.factoryPath || options.factoryName) {
6629
6639
  const boardData = JSON.stringify({
6630
6640
  factoryPath: options.factoryPath || "",