demobite 1.0.7 → 1.0.8

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": "demobite",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
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"
@@ -40,7 +40,7 @@ const DIR = path.resolve(outArg);
40
40
  // RE-TAKE (founder 2026-09-02): the storyboard IS the bite's DNA. Keep a verbatim
41
41
  // copy in the take dir so upload.mjs can stage it as the recording recipe —
42
42
  // selectors, urls, typed text, hideCss — the wire manifest alone cannot re-film.
43
- const ENGINE_VERSION = "1.0.7";
43
+ const ENGINE_VERSION = "1.0.8";
44
44
  fs.mkdirSync(DIR, { recursive: true });
45
45
  // The copy is the RECIPE, not the transport: cdpWsUrl / storageStatePath are
46
46
  // per-take plumbing stamped by the cloud runner (a CDP url carries a session
@@ -72,5 +72,5 @@ r = run("trim.mjs", [takeDir]); if (r.status !== 0) process.exit(r.status ?? 1);
72
72
  r = run("calibrate.mjs", [takeDir]);
73
73
  if (r.status !== 0) { console.error("Calibration failed — do not stage this take. Investigate record_from / anchors and film again."); process.exit(3); }
74
74
  r = run("manifest.mjs", [takeDir]); if (r.status !== 0) process.exit(r.status ?? 1);
75
- r = run("upload.mjs", [takeDir, "--retake-of", String(biteId)]);
75
+ r = run("upload.mjs", [takeDir, "--retake-of", String(biteId), ...(note ? ["--note", note] : [])]);
76
76
  process.exit(r.status ?? 0);
@@ -35,6 +35,11 @@ if (!dir) {
35
35
  const retakeIdx = process.argv.indexOf("--retake-of");
36
36
  const retakeOfBiteId = retakeIdx >= 0 ? Number(process.argv[retakeIdx + 1]) : null;
37
37
  if (retakeIdx >= 0 && !(Number.isInteger(retakeOfBiteId) && retakeOfBiteId > 0)) { console.error("--retake-of needs a bite id"); process.exit(2); }
38
+ // `--note "<what changed>"` (device lane, founder 2026-09-02): the human's note
39
+ // rides in recipe.config.retake_note so the in-app preview and the recording
40
+ // history show why this version was filmed. Never a secret, never required.
41
+ const noteIdx = process.argv.indexOf("--note");
42
+ const retakeNote = noteIdx >= 0 ? String(process.argv[noteIdx + 1] ?? "").trim().slice(0, 600) : "";
38
43
  const cfgPath = path.resolve(".recorder", "config.json");
39
44
  let cfg = {};
40
45
  try { cfg = JSON.parse(fs.readFileSync(cfgPath, "utf8")); } catch {}
@@ -57,6 +62,7 @@ try {
57
62
  const rc = fs.existsSync(rcPath) ? JSON.parse(fs.readFileSync(rcPath, "utf8")) : {};
58
63
  recipe = { version: 1, lane: rc.lane ?? "skill", engine: rc.engine ?? null, storyboard: JSON.parse(fs.readFileSync(sbPath, "utf8")), config: rc.config ?? {} };
59
64
  if (recipe.config && "api_key" in recipe.config) delete recipe.config.api_key;
65
+ if (retakeNote) recipe.config = { ...(recipe.config ?? {}), retake_note: retakeNote };
60
66
  }
61
67
  } catch (e) { console.error("recipe skipped:", e.message); }
62
68
  if (!fs.existsSync(cleanPath)) { console.error(`${cleanPath} not found. Run: node scripts/trim.mjs ${dir}`); process.exit(1); }