@browserbridge/bbx 1.3.0 → 1.4.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.
@@ -27,7 +27,7 @@ The table below includes the legacy capability bucket for each method so agents
27
27
  - `-` means the method is global/system-scoped and was never gated by a former capability bucket.
28
28
  - Capability names are descriptive coverage labels only. Browser Bridge access is window-scoped now; there are no capability-scoped sessions.
29
29
 
30
- ## All Methods (57)
30
+ ## All Methods (59)
31
31
 
32
32
  | # | Method | Tab? | CDP? | Group | Capability | Notes |
33
33
  | --- | ---------------------------------- | ---- | ---- | ----------- | -------------------- | ----------------------------------------------------------------------- |
@@ -40,66 +40,67 @@ The table below includes the legacy capability bucket for each method so agents
40
40
  | 7 | `setup.install` | No | - | system | `-` | Install or uninstall MCP/skill integration targets |
41
41
  | 8 | `health.ping` | No | - | system | `-` | Connectivity check + access routing state |
42
42
  | 9 | `log.tail` | No | - | system | `-` | Recent bridge logs |
43
- | 10 | `page.get_state` | Yes | - | page | `page.read` | URL, readiness, focus, scroll, viewport |
44
- | 11 | `page.evaluate` | Yes | CDP | page | `page.evaluate` | JS expression in page context; last resort |
45
- | 12 | `page.get_console` | Yes | - | page | `page.read` | Buffered console messages; filter by `level`, `limit` |
46
- | 13 | `page.wait_for_load_state` | Yes | - | wait | `page.read` | Block until tab `complete`; `timeoutMs` capped 30 s |
47
- | 14 | `page.get_storage` | Yes | - | page | `page.read` | `localStorage`/`sessionStorage`; optional `keys` |
48
- | 15 | `page.get_text` | Yes | - | page | `page.read` | Full page text; `textBudget` limits size |
49
- | 16 | `page.get_network` | Yes | - | page | `network.read` | Intercepted fetch/XHR; `limit` entries |
50
- | 17 | `navigation.navigate` | Yes | - | navigate | `navigation.control` | Go to URL; `waitForLoad` default true |
51
- | 18 | `navigation.reload` | Yes | - | navigate | `navigation.control` | Reload; `waitForLoad` default true |
52
- | 19 | `navigation.go_back` | Yes | - | navigate | `navigation.control` | History back |
53
- | 20 | `navigation.go_forward` | Yes | - | navigate | `navigation.control` | History forward |
54
- | 21 | `dom.query` | Yes | - | inspect | `dom.read` | Query subtree with budget constraints |
55
- | 22 | `dom.describe` | Yes | - | inspect | `dom.read` | Single element details via `elementRef` |
56
- | 23 | `dom.get_text` | Yes | - | inspect | `dom.read` | Text content with `textBudget` |
57
- | 24 | `dom.get_attributes` | Yes | - | inspect | `dom.read` | Targeted attribute read |
58
- | 25 | `dom.wait_for` | Yes | - | wait | `dom.read` | Wait for DOM condition; MutationObserver + polling |
59
- | 26 | `dom.find_by_text` | Yes | - | inspect | `dom.read` | Find by visible text; returns `{nodes, count}` |
60
- | 27 | `dom.find_by_role` | Yes | - | inspect | `dom.read` | Find by ARIA role; optional `name` filter |
61
- | 28 | `dom.get_html` | Yes | - | inspect | `dom.read` | `innerHTML`/`outerHTML`; `maxLength` truncation |
62
- | 29 | `dom.get_accessibility_tree` | Yes | CDP | inspect | `dom.read` | Full a11y tree; `maxNodes`/`maxDepth` limits |
63
- | 30 | `layout.get_box_model` | Yes | - | inspect | `layout.read` | Element geometry (no budget needed) |
64
- | 31 | `layout.hit_test` | Yes | - | inspect | `layout.read` | Element at viewport point |
65
- | 32 | `styles.get_computed` | Yes | - | inspect | `styles.read` | Computed CSS; always set `properties` |
66
- | 33 | `styles.get_matched_rules` | Yes | - | inspect | `styles.read` | Matching CSS rules |
67
- | 34 | `viewport.scroll` | Yes | - | navigate | `viewport.control` | Window or element scroll |
68
- | 35 | `viewport.resize` | Yes | CDP | navigate | `viewport.control` | Set viewport via device emulation; `reset: true` |
69
- | 36 | `input.click` | Yes | - | interact | `automation.input` | DOM-level click |
70
- | 37 | `input.focus` | Yes | - | interact | `automation.input` | Focus element |
71
- | 38 | `input.type` | Yes | - | interact | `automation.input` | Type into input/textarea/contenteditable |
72
- | 39 | `input.press_key` | Yes | - | interact | `automation.input` | Single key event |
73
- | 40 | `input.set_checked` | Yes | - | interact | `automation.input` | Checkbox/radio toggle |
74
- | 41 | `input.select_option` | Yes | - | interact | `automation.input` | Native select by value/label/index |
75
- | 42 | `input.hover` | Yes | - | interact | `automation.input` | mouseenter/mouseover/mousemove; optional `duration` |
76
- | 43 | `input.drag` | Yes | - | interact | `automation.input` | Full drag-and-drop event sequence |
77
- | 44 | `input.scroll_into_view` | Yes | - | interact | `automation.input` | Explicitly scroll target into view before inspect/capture |
78
- | 45 | `screenshot.capture_element` | Yes | CDP | capture | `screenshot.partial` | Cropped element screenshot |
79
- | 46 | `screenshot.capture_region` | Yes | CDP | capture | `screenshot.partial` | Cropped viewport region |
80
- | 47 | `screenshot.capture_full_page` | Yes | CDP | capture | `screenshot.partial` | Full document screenshot; use only when page-level context is necessary |
81
- | 48 | `patch.apply_styles` | Yes | - | patch | `patch.styles` | Reversible CSS patch; `verify` returns computed result |
82
- | 49 | `patch.apply_dom` | Yes | - | patch | `patch.dom` | Reversible DOM mutation; `verify` returns result |
83
- | 50 | `patch.list` | Yes | - | patch | `patch.dom` | Active patches |
84
- | 51 | `patch.rollback` | Yes | - | patch | `patch.dom` | Revert one patch |
85
- | 52 | `patch.commit_session_baseline` | Yes | - | patch | `patch.dom` | Accept current state as baseline |
86
- | 53 | `performance.get_metrics` | Yes | CDP | performance | `performance.read` | Chrome performance counters |
87
- | 54 | `cdp.get_document` | Yes | CDP | cdp | `cdp.dom_snapshot` | DevTools document tree |
88
- | 55 | `cdp.get_dom_snapshot` | Yes | CDP | cdp | `cdp.dom_snapshot` | DevTools DOM snapshot |
89
- | 56 | `cdp.get_box_model` | Yes | CDP | cdp | `cdp.box_model` | DevTools-backed element geometry |
90
- | 57 | `cdp.get_computed_styles_for_node` | Yes | CDP | cdp | `cdp.styles` | DevTools-backed computed styles |
91
- | 58 | `cdp.dispatch_key_event` | Yes | CDP | cdp | `cdp.input` | DevTools keyDown/keyUp without foreground focus |
43
+ | 10 | `daemon.metrics` | No | - | system | `-` | Daemon health and performance metrics |
44
+ | 11 | `page.get_state` | Yes | - | page | `page.read` | URL, readiness, focus, scroll, viewport |
45
+ | 12 | `page.evaluate` | Yes | CDP | page | `page.evaluate` | JS expression in page context; last resort |
46
+ | 13 | `page.get_console` | Yes | - | page | `page.read` | Buffered console messages; filter by `level`, `limit` |
47
+ | 14 | `page.wait_for_load_state` | Yes | - | wait | `page.read` | Block until tab `complete`; `timeoutMs` capped 30 s |
48
+ | 15 | `page.get_storage` | Yes | - | page | `page.read` | `localStorage`/`sessionStorage`; optional `keys` |
49
+ | 16 | `page.get_text` | Yes | - | page | `page.read` | Full page text; `textBudget` limits size |
50
+ | 17 | `page.get_network` | Yes | - | page | `network.read` | Intercepted fetch/XHR; `limit` entries |
51
+ | 18 | `navigation.navigate` | Yes | - | navigate | `navigation.control` | Go to URL; `waitForLoad` default true |
52
+ | 19 | `navigation.reload` | Yes | - | navigate | `navigation.control` | Reload; `waitForLoad` default true |
53
+ | 20 | `navigation.go_back` | Yes | - | navigate | `navigation.control` | History back |
54
+ | 21 | `navigation.go_forward` | Yes | - | navigate | `navigation.control` | History forward |
55
+ | 22 | `dom.query` | Yes | - | inspect | `dom.read` | Query subtree with budget constraints |
56
+ | 23 | `dom.describe` | Yes | - | inspect | `dom.read` | Single element details via `elementRef` |
57
+ | 24 | `dom.get_text` | Yes | - | inspect | `dom.read` | Text content with `textBudget` |
58
+ | 25 | `dom.get_attributes` | Yes | - | inspect | `dom.read` | Targeted attribute read |
59
+ | 26 | `dom.wait_for` | Yes | - | wait | `dom.read` | Wait for DOM condition; MutationObserver + polling |
60
+ | 27 | `dom.find_by_text` | Yes | - | inspect | `dom.read` | Find by visible text; returns `{nodes, count}` |
61
+ | 28 | `dom.find_by_role` | Yes | - | inspect | `dom.read` | Find by ARIA role; optional `name` filter |
62
+ | 29 | `dom.get_html` | Yes | - | inspect | `dom.read` | `innerHTML`/`outerHTML`; `maxLength` truncation |
63
+ | 30 | `dom.get_accessibility_tree` | Yes | CDP | inspect | `dom.read` | Full a11y tree; `maxNodes`/`maxDepth` limits |
64
+ | 31 | `layout.get_box_model` | Yes | - | inspect | `layout.read` | Element geometry (no budget needed) |
65
+ | 32 | `layout.hit_test` | Yes | - | inspect | `layout.read` | Element at viewport point |
66
+ | 33 | `styles.get_computed` | Yes | - | inspect | `styles.read` | Computed CSS; always set `properties` |
67
+ | 34 | `styles.get_matched_rules` | Yes | - | inspect | `styles.read` | Matching CSS rules |
68
+ | 35 | `viewport.scroll` | Yes | - | navigate | `viewport.control` | Window or element scroll |
69
+ | 36 | `viewport.resize` | Yes | CDP | navigate | `viewport.control` | Set viewport via device emulation; `reset: true` |
70
+ | 37 | `input.click` | Yes | - | interact | `automation.input` | DOM-level click |
71
+ | 38 | `input.focus` | Yes | - | interact | `automation.input` | Focus element |
72
+ | 39 | `input.type` | Yes | - | interact | `automation.input` | Type into input/textarea/contenteditable |
73
+ | 40 | `input.press_key` | Yes | - | interact | `automation.input` | Single key event |
74
+ | 41 | `input.set_checked` | Yes | - | interact | `automation.input` | Checkbox/radio toggle |
75
+ | 42 | `input.select_option` | Yes | - | interact | `automation.input` | Native select by value/label/index |
76
+ | 43 | `input.hover` | Yes | - | interact | `automation.input` | mouseenter/mouseover/mousemove; optional `duration` |
77
+ | 44 | `input.drag` | Yes | - | interact | `automation.input` | Full drag-and-drop event sequence |
78
+ | 45 | `input.scroll_into_view` | Yes | - | interact | `automation.input` | Explicitly scroll target into view before inspect/capture |
79
+ | 46 | `screenshot.capture_element` | Yes | CDP | capture | `screenshot.partial` | Cropped element screenshot |
80
+ | 47 | `screenshot.capture_region` | Yes | CDP | capture | `screenshot.partial` | Cropped viewport region |
81
+ | 48 | `screenshot.capture_full_page` | Yes | CDP | capture | `screenshot.partial` | Full document screenshot; use only when page-level context is necessary |
82
+ | 49 | `patch.apply_styles` | Yes | - | patch | `patch.styles` | Reversible CSS patch; `verify` returns computed result |
83
+ | 50 | `patch.apply_dom` | Yes | - | patch | `patch.dom` | Reversible DOM mutation; `verify` returns result |
84
+ | 51 | `patch.list` | Yes | - | patch | `patch.dom` | Active patches |
85
+ | 52 | `patch.rollback` | Yes | - | patch | `patch.dom` | Revert one patch |
86
+ | 53 | `patch.commit_session_baseline` | Yes | - | patch | `patch.dom` | Accept current state as baseline |
87
+ | 54 | `performance.get_metrics` | Yes | CDP | performance | `performance.read` | Chrome performance counters |
88
+ | 55 | `cdp.get_document` | Yes | CDP | cdp | `cdp.dom_snapshot` | DevTools document tree |
89
+ | 56 | `cdp.get_dom_snapshot` | Yes | CDP | cdp | `cdp.dom_snapshot` | DevTools DOM snapshot |
90
+ | 57 | `cdp.get_box_model` | Yes | CDP | cdp | `cdp.box_model` | DevTools-backed element geometry |
91
+ | 58 | `cdp.get_computed_styles_for_node` | Yes | CDP | cdp | `cdp.styles` | DevTools-backed computed styles |
92
+ | 59 | `cdp.dispatch_key_event` | Yes | CDP | cdp | `cdp.input` | DevTools keyDown/keyUp without foreground focus |
92
93
 
93
94
  ## CLI
94
95
 
95
96
  ```bash
96
- bbx status | logs | tabs | skill # no routed tab needed
97
+ bbx status | doctor | restart | logs | tabs | skill # no routed tab needed
97
98
  bbx call <method> '{"key":"val"}' # generic RPC (routes to active tab in enabled window)
98
99
  bbx call --tab 123 <method> '{...}' # explicit tab target inside enabled window
99
100
  bbx batch '[{"method":"...","params":{}}]' # parallel calls
100
101
  ```
101
102
 
102
- **Convenience shortcuts:** `access-request`, `dom-query`, `describe`, `text`, `styles`, `box`, `click`, `focus`, `type`, `press-key`, `cdp-press-key`, `patch-style`, `patch-text`, `patches`, `rollback`, `screenshot`, `eval`, `console`, `wait`, `find`, `find-role`, `html`, `hover`, `navigate`, `storage`, `tab-create`, `tab-close`, `page-text`, `network`, `a11y-tree`, `perf`, `resize`, `reload`, `back`, `forward`, `attrs`, `matched-rules`
103
+ **Convenience shortcuts:** `access-request`, `dom-query`, `describe`, `text`, `styles`, `box`, `click`, `focus`, `type`, `press-key`, `cdp-press-key`, `patch-style`, `patch-text`, `patches`, `rollback`, `screenshot`, `eval`, `console`, `wait`, `find`, `find-role`, `html`, `hover`, `navigate`, `storage`, `tab-create`, `tab-close`, `page-text`, `network`, `a11y-tree`, `perf`, `scroll`, `resize`, `reload`, `back`, `forward`, `attrs`, `matched-rules`
103
104
 
104
105
  Newer bridge methods such as `input.scroll_into_view` and `screenshot.capture_full_page` currently use the raw path: `bbx call <method> '{...}'`.
105
106
 
@@ -190,7 +191,7 @@ Find elements matching visible text content. Like Playwright's `getByText`.
190
191
 
191
192
  ```bash
192
193
  bbx find 'Submit Order'
193
- bbx call dom.find_by_text '{"text":"Submit","scope":"button","exact":false}'
194
+ bbx call dom.find_by_text '{"text":"Submit","selector":"button","exact":false}'
194
195
  ```
195
196
 
196
197
  ### dom.find_by_role
@@ -226,7 +227,7 @@ Full drag-and-drop sequence: `mousedown → dragstart → drag → dragenter →
226
227
 
227
228
  ```bash
228
229
  bbx call input.drag '{"source":{"elementRef":"el_src"},"destination":{"elementRef":"el_dst"}}'
229
- bbx call input.drag '{"source":{"elementRef":"el_src"},"destination":{"elementRef":"el_dst"},"sourceOffset":{"x":10,"y":10}}'
230
+ bbx call input.drag '{"source":{"elementRef":"el_src"},"destination":{"elementRef":"el_dst"},"offsetX":10,"offsetY":10}'
230
231
  ```
231
232
 
232
233
  ### input.scroll_into_view
@@ -327,6 +328,8 @@ bbx call performance.get_metrics
327
328
 
328
329
  Capture a full-document screenshot beyond the current viewport. Use only when element or tight region captures cannot express the issue. Chrome capture limits still apply on very large pages.
329
330
 
331
+ This raw call returns base64 JSON. Prefer `bbx screenshot <ref> [outPath]` when one element is enough.
332
+
330
333
  ```bash
331
334
  bbx call screenshot.capture_full_page '{}'
332
335
  ```
@@ -5,7 +5,7 @@
5
5
  Use when a dev server is already running and you want to prove a fix rendered.
6
6
 
7
7
  1. `page.get_state`
8
- 2. `dom.query` on the target area with `budgetPreset: "quick"`
8
+ 2. `dom.query` on the target area with explicit tight limits such as `maxNodes: 5`, `maxDepth: 2`, and `textBudget: 300`
9
9
  3. `styles.get_computed` or `layout.get_box_model`
10
10
  4. `patch.apply_styles` to prove the visual fix
11
11
  5. Edit source files