@beastmode-develeap/beastmode 0.1.30 → 0.1.32

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
@@ -4890,6 +4890,24 @@ function getBoardRoutes(factoryDir) {
4890
4890
  };
4891
4891
  }
4892
4892
  },
4893
+ // ── Pipeline configuration (Story 1 / pipeline-board-view epic) ──
4894
+ // Direct passthrough — the scenarios specifically test
4895
+ // http://ui:8080/api/pipeline-config (no /api/board/ prefix) because
4896
+ // that matches the backend route path verbatim. Exposing at a different
4897
+ // path would break those scenarios. See
4898
+ // docs/zero-to-productive-readiness.md Gap 8 for the systemic version
4899
+ // of this bug: the UI proxy allowlist is an invisible contract the
4900
+ // planner ignores, so new backend routes need matching UI proxy
4901
+ // entries. This is one of those entries, added post-hoc to unstick
4902
+ // board item 9 (Story 1).
4903
+ {
4904
+ method: "GET",
4905
+ pattern: "/api/pipeline-config",
4906
+ handler: async (_body, _params, query) => {
4907
+ const boardUrl = getBoardUrl2(factoryDir);
4908
+ return proxyToBoard(boardUrl, "GET", "/api/pipeline-config", void 0, scopedQuery(query));
4909
+ }
4910
+ },
4893
4911
  // ── Board Items (proxy to existing board at :8080) ──
4894
4912
  // Every proxy forwards the `board` query param so the Python server
4895
4913
  // can route to the correct per-project SQLite database. `"all"` is
@@ -6224,21 +6242,32 @@ async function startServer(options = {}) {
6224
6242
  const initRoutes = getRoutes();
6225
6243
  const boardRoutes = options.factoryPath ? getBoardRoutes(options.factoryPath) : [];
6226
6244
  let staticDir;
6227
- let indexHtml;
6228
- let boardHtml;
6229
6245
  try {
6230
6246
  staticDir = resolveStaticDir();
6231
- indexHtml = readFileSync13(join14(staticDir, "index.html"), "utf-8");
6232
6247
  } catch {
6233
6248
  staticDir = "";
6234
- indexHtml = "<html><body><h1>BeastMode Init Wizard</h1><p>Static files not found.</p></body></html>";
6235
6249
  }
6236
- try {
6237
- const dir = staticDir || resolveStaticDir();
6238
- const boardPath = join14(dir, "board.html");
6239
- boardHtml = existsSync16(boardPath) ? readFileSync13(boardPath, "utf-8") : "<html><body><h1>BeastMode Board</h1><p>board.html not found.</p></body></html>";
6240
- } catch {
6241
- boardHtml = "<html><body><h1>BeastMode Board</h1><p>board.html not found.</p></body></html>";
6250
+ function loadIndexHtml() {
6251
+ const fallback = "<html><body><h1>BeastMode Init Wizard</h1><p>Static files not found.</p></body></html>";
6252
+ if (!staticDir) return fallback;
6253
+ try {
6254
+ const indexPath = join14(staticDir, "index.html");
6255
+ if (!existsSync16(indexPath)) return fallback;
6256
+ return readFileSync13(indexPath, "utf-8");
6257
+ } catch {
6258
+ return fallback;
6259
+ }
6260
+ }
6261
+ function loadBoardHtml() {
6262
+ const fallback = "<html><body><h1>BeastMode Board</h1><p>board.html not found.</p></body></html>";
6263
+ try {
6264
+ const dir = staticDir || resolveStaticDir();
6265
+ const boardPath = join14(dir, "board.html");
6266
+ if (!existsSync16(boardPath)) return fallback;
6267
+ return readFileSync13(boardPath, "utf-8");
6268
+ } catch {
6269
+ return fallback;
6270
+ }
6242
6271
  }
6243
6272
  let chatManager = null;
6244
6273
  if (options.factoryPath) {
@@ -6391,7 +6420,7 @@ async function startServer(options = {}) {
6391
6420
  }
6392
6421
  if (method === "GET") {
6393
6422
  if (url === "/board" || url === "/board.html") {
6394
- let html = boardHtml;
6423
+ let html = loadBoardHtml();
6395
6424
  if (options.factoryPath || options.factoryName) {
6396
6425
  const boardData = JSON.stringify({
6397
6426
  factoryPath: options.factoryPath || "",
@@ -6411,7 +6440,7 @@ async function startServer(options = {}) {
6411
6440
  res.end();
6412
6441
  return;
6413
6442
  }
6414
- let html = indexHtml;
6443
+ let html = loadIndexHtml();
6415
6444
  if (options.factoryName || options.projectPath) {
6416
6445
  const initData = JSON.stringify({
6417
6446
  factoryName: options.factoryName || "",