Skip to content

v0.13.0

Choose a tag to compare

@szymdzum szymdzum released this 07 Oct 08:37
9721349

This release is about trust in bdg's answers. Seven cloud test agents and a retest by eight fresh agents on real sites (Stripe, MDN, GitHub, TinyMCE, Shoelace, MooTools-era pages, 50 000-element pages) looked for places where bdg gave a wrong answer with exit 0. Everything they found is fixed.

Breaking changes

  • bdg cdp prints text without --json. Domain and method lists and search results are one line each, --describe shows parameters, return values and an example, and a method's result is indented JSON. Scripts that parse its output need --json.
  • bdg --help --json is compact: 29 KB instead of 173 KB (about 7k tokens instead of 40k). bdg <command> --help --json describes one command in full; bdg --help --json --full prints the previous full tree.
  • dom query describes the first 1000 matches and lists 50 (--json: 1000) with the total count. --limit <n> lists more (0 = all). On a 50 000-element page, dom query "*" went from 23 s and 7 MB of JSON to about half a second and 190 KB.
  • dom audit contrast counts in failing only text it can measure exactly. Text over images and gradients is counted separately (JSON uncertain). On stripe.com, 123 mostly false failures became 0 failing and 14 uncertain.
  • Follow modes (peek, console, network list --follow) stop with exit 83 when their session ends, exit 130/143 on Ctrl-C/SIGTERM (it was 0), and print NDJSON with --json.
  • Chrome gets a window on macOS by default. Agents running unattended on a Mac should pass --headless.
  • New exit codes: 107 (PAGE_CRASHED) when the page's renderer crashed, 90 when the page broke an action's script by replacing a built-in.

Security

  • dom form --json no longer contains passwords. It printed a password field's plaintext value next to the masked one. Sensitive values (passwords, card numbers, one-time codes) never leave the page now.
  • A cached index is never used on another page's element. After a navigation to another site, dom click 500 could click an unrelated element with exit 0. An index from an earlier document now exits 87.

Pages that fight back

  • Pages that replace built-ins no longer give wrong answers. With querySelectorAll patched, dom query ".a" printed <body> with exit 0. Read commands now run in bdg's isolated world. Actions say when the page replaced what they need, and fail with exit 90 naming the replaced built-ins instead of a cryptic script error.
  • MooTools and similar libraries: fill fires input and change events again, and click/fill no longer say "Element is disabled" when Element.prototype.matches is replaced.
  • dom eval returns the right value when the page replaced Object.keys or Function.prototype.call, with a warning.

Reading what a user sees

  • Web components read as they render: through their shadow roots, with slotted content in place, block parts kept apart (Blue Widget $19.99, not Blue Widget$19.99). Action results name shadow buttons by their slotted label.
  • dom get adds a Text: line when an element's accessible name differs from its visible text (TinyMCE's body).
  • dom inspect, dom layout and dom audit say what they cannot see: mask-image, text out of view, canvas animations. dom click says when it scrolled to reach the element.

Sessions

  • A crashed page is detected. status, peek, console and network list warn about it, page commands fail at once with 107 (they used to time out after 29 s), and bdg page reload brings it back.
  • No Chrome left behind. A second start, a crash that lost chrome.pid, or a deleted socket no longer leaves an orphaned Chrome; cleanup finds every Chrome of the session by its marker.
  • bdg sessions lists ended sessions with why and when they ended. bdg stop returns once the daemon has exited.
  • Bad directories are refused at once. BDG_SESSION_DIR=/proc/x used to spin at full CPU; an unusable --user-data-dir wedged the session.
  • console on busy pages keeps the newest 10 000 messages (it kept the first ones and hid every later error), says how many were dropped, and lists the newest 50 distinct errors and warnings.
  • bdg install-skill backs up an edited skill as SKILL.md.bak and still installs for one agent when the other cannot be written.

Smaller fixes

  • Mistyped options and commands suggest the right one (--sesion, -josn, bdg netwrk); every argument parser error has a suggestion.
  • bdg cdp Network lists the domain's methods; a Runtime.evaluate that throws exits 91.
  • CI=false no longer counts as CI.

Full list in the CHANGELOG.