demobite 1.18.1 → 1.18.2

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.
@@ -480,6 +480,8 @@ if (arg === "listen") {
480
480
  console.log(`\n ${isLook ? "◉ Looking at" : "⚿ Sign-in at"} ${job.url}`);
481
481
  noteState({ busy: true, job: job.id });
482
482
  await event(job.id, "started", { machine: name });
483
+ // Alive while the person signs in (a window can wait minutes): the heartbeat, or the rail calls this machine offline.
484
+ const heartbeat = setInterval(() => { void api({ action: "checkin", machine_id: listen.machine_id, name, readiness: readiness(), busy: true }); }, 5000);
483
485
  const { spawn } = await import("node:child_process");
484
486
  const child = spawn(process.execPath, [script, job.url], { cwd: process.cwd(), env: { ...process.env, RECORDER_JOB: job.id, RECORDER_BASE: base, RECORDER_LISTEN: "1" }, stdio: ["ignore", "pipe", "pipe"], detached: process.platform !== "win32" });
485
487
  track(child);
@@ -498,6 +500,7 @@ if (arg === "listen") {
498
500
  });
499
501
  child.stderr.on("data", (d) => { const t = d.toString().trim(); if (t) console.log(` ! ${t.split("\n")[0].slice(0, 160)}`); });
500
502
  const code = await new Promise((r) => child.on("close", r));
503
+ clearInterval(heartbeat);
501
504
  if (isLook) {
502
505
  if (verdict) await event(job.id, "looked", verdict);
503
506
  else await event(job.id, "failed", { message: "The look did not finish" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demobite",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
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"
@@ -207,7 +207,7 @@ const launchOpts = {
207
207
  viewport: VIEW,
208
208
  recordVideo: { dir: DIR, size: VIEW },
209
209
  deviceScaleFactor: 1,
210
- args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled"],
210
+ args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled", "--disable-features=MediaRouter,DialMediaRouteProvider", "--disable-component-update", "--no-default-browser-check"],
211
211
  };
212
212
 
213
213
  // THREE ways to get a browser. ONE script serves both lanes — the cloud
@@ -29,7 +29,7 @@ const DANGER = /\b(delete|remove|pay|purchase|buy|subscribe|upgrade|publish|send
29
29
 
30
30
  const { chromium } = await import("playwright");
31
31
  const profileDir = process.env.RECORDER_PROFILE || path.resolve(process.cwd(), ".recorder", "profile");
32
- const launchOpts = { headless: true, viewport: { width: 1440, height: 900 }, args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled"], ignoreDefaultArgs: ["--enable-automation"] };
32
+ const launchOpts = { headless: true, viewport: { width: 1440, height: 900 }, args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled", "--disable-features=MediaRouter,DialMediaRouteProvider", "--disable-component-update", "--no-default-browser-check"], ignoreDefaultArgs: ["--enable-automation"] };
33
33
  let ctx;
34
34
  try { ctx = await chromium.launchPersistentContext(profileDir, { ...launchOpts, channel: "chrome" }); }
35
35
  catch { ctx = await chromium.launchPersistentContext(profileDir, launchOpts); }
@@ -27,7 +27,7 @@ const profileDir = process.env.RECORDER_PROFILE || path.resolve(process.cwd(), "
27
27
  const launchOpts = {
28
28
  headless: true,
29
29
  viewport: { width: 1440, height: 900 },
30
- args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled"],
30
+ args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled", "--disable-features=MediaRouter,DialMediaRouteProvider", "--disable-component-update", "--no-default-browser-check"],
31
31
  ignoreDefaultArgs: ["--enable-automation"],
32
32
  };
33
33
  let ctx;
@@ -49,7 +49,7 @@ const launchOpts = {
49
49
  headless: false,
50
50
  viewport: { width: 1440, height: 900 },
51
51
  deviceScaleFactor: 1,
52
- args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled"],
52
+ args: ["--force-color-profile=srgb", "--disable-blink-features=AutomationControlled", "--disable-features=MediaRouter,DialMediaRouteProvider", "--disable-component-update", "--no-default-browser-check"],
53
53
  ignoreDefaultArgs: ["--enable-automation"],
54
54
  };
55
55
  let ctx;