Repository navigation
v0.9.0
bdg 0.9.0 is about AI agents using the browser. Four agents that had never seen bdg worked through real sites (TodoMVC, saucedemo, the Guardian, react.dev, the-internet) in three rounds. After each round we fixed what slowed them down. Between the first and the third round:
- hand-written
dom evalon the forms task went from 5 to 0, and on the visual questions from 7 to 1; - screenshots went from 6 to 2 in total;
- blind
sleeploops disappeared.
Highlights
-
Actions report what changed.
dom click,submitandfillsay whether the page navigated (Page: navigated to …/secure (200)), which new messages appeared (New text: "Your password is invalid!"), and when nothing happened (no visible effect observed). A fill whose value the page moved says where it went. -
bdg dom waitwaits for an element to appear, become visible, contain a text or disappear, or for the page to load. bdg also warns when a page is still loading and names the request it is waiting on. -
bdg dom layoutshows where elements are and whether a user can see them, without a screenshot:- viewport position;
- covered by what;
- clipped by what;
- hidden and why;
- how far to scroll.
It also knows about scroll-locked pages behind consent dialogs.
-
dom listenersshows the ReactonClick(and otheron…props) that actually handle an element, plus jQuery handlers. -
Selectors for agents:
li:has-text("Write report") .toggle;- labels act as their control;
- a11y names with spaces and colons;
- a11y result indices work in click and fill, including inside cross-origin consent frames;
- "did you mean #remove-…" for typos.
-
Named sessions:
--session <name>runs several independent sessions side by side.bdg sessionslists them, including crashed ones. -
New start options:
--viewport 1280x800and--color-scheme light|dark. -
Honest results:
dom formreadiness counts radio groups once and only says READY when required fields are filled;- status lines show
⚠ … (with warnings); - viewport screenshots of scrolled pages are no longer blank;
page navigatereports the document's real status.
-
Shorter output: the session start prints 4 lines instead of about 60. Static assets collapse to one line after actions, and
bdg page infoprints just the URL and title.
Breaking changes
The JSON envelope is unchanged. Some output that scripts may parse changed:
- Session start: it prints 4–7 lines instead of the long command list.
dom eval: it prints strings raw in human output.--jsonis unchanged.dom formJSON:readyToSubmitis false for an untouched form;- choice groups count once;
- hidden fields are listed with
hidden: true; - forms are ordered dialog-first, and indices follow that order.
dom submitJSON:networkRequestscounts the reportable requests;- the human
Navigation: yesrow became aPage:line.
dom layoutJSON:scrollByis the minimal scroll for a partly visible element.dom get:--indexreplaces--nth(kept as an alias). With no argument it readsbody.- Session names: they are lower-cased and must start with a letter or digit.
The full list is in the CHANGELOG.
Install
npm install -g browser-debugger-cliFull diff: v0.8.0...v0.9.0