demobite 1.14.0 → 1.14.1

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.
@@ -333,9 +333,12 @@ if (arg === "listen") {
333
333
  const takeDir = path.join(process.cwd(), ".recorder", "takes", job.id);
334
334
  fs.mkdirSync(takeDir, { recursive: true });
335
335
  fs.writeFileSync(path.join(takeDir, "job.json"), JSON.stringify({ id: job.id, brief: job.brief, url: job.url ?? null, model, review_storyboard: job.review_storyboard !== false }, null, 2) + "\n");
336
- const r = spawnSync("node", [path.join(dest, "scripts", "plan.mjs"), takeDir], { cwd: process.cwd(), stdio: "inherit", env: { ...process.env, RECORDER_JOB: job.id, RECORDER_BASE: base, RECORDER_LISTEN: "1" } });
336
+ // Spawned async (1.14.1): a spawnSync here blocked the event loop, so the 5 s heartbeat never fired
337
+ // during a take and the rail called the machine offline mid-recording (founder 2026-10-15 17:39).
338
+ const child = (await import("node:child_process")).spawn("node", [path.join(dest, "scripts", "plan.mjs"), takeDir], { cwd: process.cwd(), stdio: "inherit", env: { ...process.env, RECORDER_JOB: job.id, RECORDER_BASE: base, RECORDER_LISTEN: "1" } });
339
+ const code = await new Promise((resolve) => child.on("close", resolve));
337
340
  const st = await api({ action: "poll", job_id: job.id });
338
- if (st && !["ready", "failed", "cancelled"].includes(st.status)) await event(job.id, "failed", { message: r.status === 0 ? "The demo did not come through — try again" : `The take stopped (exit ${r.status})` });
341
+ if (st && !["ready", "failed", "cancelled"].includes(st.status)) await event(job.id, "failed", { message: code === 0 ? "The demo did not come through — try again" : `The take stopped (exit ${code})` });
339
342
  clearInterval(heartbeat);
340
343
  console.log(` ■ Job ${job.id} ${st?.status ?? "ended"}.\n`);
341
344
  waitOn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demobite",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "The DemoBites agentic recorder — you prompt, it films a real browser, and DemoBites turns the take into an editable demo bite.",
5
5
  "bin": {
6
6
  "demobite": "launcher/index.mjs"