demobites 1.30.2 → 1.31.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demobites",
3
- "version": "1.30.2",
3
+ "version": "1.31.0",
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
  "demobites": "launcher/index.mjs"
@@ -856,7 +856,7 @@ try {
856
856
  process.stdout.write(`step ${rec.n} ${step.action} ${step.label ?? ""}\n`);
857
857
  // The customer's line (founder 2026-10-14): one bar, step n of N. The
858
858
  // agent relays this, never the step/action lines above.
859
- { const N = STORYBOARD.steps.length, filled = Math.round((rec.n / N) * 20); process.stdout.write(`Filming ${"█".repeat(filled)}${"░".repeat(20 - filled)} step ${rec.n} of ${N}\n`); void postEvent("filming", { n: rec.n, N }); frameStep = { n: rec.n, N }; void postFrame(); }
859
+ { const N = STORYBOARD.steps.length, filled = Math.round((rec.n / N) * 20); process.stdout.write(`Recording ${"█".repeat(filled)}${"░".repeat(20 - filled)} step ${rec.n} of ${N}\n`); void postEvent("filming", { n: rec.n, N }); frameStep = { n: rec.n, N }; void postFrame(); }
860
860
  if (step.action === "goto") {
861
861
  const navIssuedAt = t();
862
862
  // domcontentloaded, not load: a heavy site behind a proxy (the cloud
@@ -1330,3 +1330,8 @@ console.log(
1330
1330
  `${mouseEvents.length} mouse events (${cursorKinds})` +
1331
1331
  `${BURN_CURSOR ? ", cursor BURNED IN" : ", cursor rendered by the studio"}`,
1332
1332
  );
1333
+ // THE EXIT IS BOUNDED (2026-10-18): the take is on disk and the manifest written; nothing after this line is work.
1334
+ // The clock says when we got here, and a timer that holds no reference ends the process within 3 s should anything
1335
+ // (a browser handle, a socket) keep the event loop alive — the founder's take sat here for 46 s.
1336
+ console.log(`${new Date().toISOString()} take saved; exiting`);
1337
+ setTimeout(() => process.exit(0), 3000).unref();
@@ -303,13 +303,19 @@ try {
303
303
 
304
304
  // ── The take ─────────────────────────────────────────────────────────────
305
305
  const sbFile = path.join(dir, "storyboard.json");
306
+ // EVERY PHASE IS STAMPED (founder's take of 2026-10-18: 46 s between the video on disk and the trim, unexplained;
307
+ // "why in God's name does it take us so long?"): the clock before each step and the seconds it took after, so the
308
+ // next take's log names where the minutes go.
306
309
  const step = async (name, args, what) => {
310
+ const t0 = Date.now();
311
+ console.log(` ${new Date(t0).toISOString()} ${what}…`);
307
312
  const r = spawnSync("node", [script(name), ...args], { cwd: process.cwd(), stdio: "inherit", env: process.env });
313
+ console.log(` ${new Date().toISOString()} ${what}: ${((Date.now() - t0) / 1000).toFixed(1)}s`);
308
314
  if (r.status !== 0) { console.error(` ! ${name} failed (exit ${r.status})`); await postEvent("failed", { message: `${what} did not finish` }); process.exit(1); }
309
315
  };
310
316
  const sb = JSON.parse(fs.readFileSync(sbFile, "utf8"));
311
317
  if (Array.isArray(sb.prep) && sb.prep.length) await step("cleanup.mjs", [dir, "--prep"], "Preparing the data");
312
- await step("record.mjs", [dir, sbFile], "Filming");
318
+ await step("record.mjs", [dir, sbFile], "Recording");
313
319
  if (Array.isArray(sb.cleanup) && sb.cleanup.length) await step("cleanup.mjs", [dir], "Putting the data back");
314
320
  await step("trim.mjs", [dir], "Trimming the take");
315
321
  await step("calibrate.mjs", [dir], "Measuring the take");