claude-browser-bridge 4.0.0 → 4.0.1
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/index.js +19 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -220,15 +220,17 @@ establish();
|
|
|
220
220
|
const HELP_TOOL = {
|
|
221
221
|
name: "browser_bridge_help",
|
|
222
222
|
description:
|
|
223
|
-
"Returns the complete usage guide for all
|
|
223
|
+
"Returns the complete usage guide for all 65 browser-bridge tools. Call this ONCE at the start of any session where you need to use browser tools, to learn the optimal workflows and avoid slow anti-patterns.",
|
|
224
224
|
inputSchema: { type: "object", properties: {} },
|
|
225
225
|
};
|
|
226
226
|
|
|
227
|
-
const HELP_TEXT = `# Claude Browser Bridge —
|
|
227
|
+
const HELP_TEXT = `# Claude Browser Bridge — 65 Tools
|
|
228
228
|
|
|
229
229
|
## WHICH TOOL FIRST? (decision tree)
|
|
230
230
|
- Investigating a bug → diagnose (gives snapshot + errors + network + API responses in ONE call)
|
|
231
231
|
- Fixing CSS/visual → batch([screenshot, get_styles({selector:".target"}), get_html({selector:".target"})])
|
|
232
|
+
- Debugging image layers/z-index → batch([get_element_rect({selector:".container", include_children:true}), annotate({annotations:[...]})])
|
|
233
|
+
- Checking pixel colors on images → inspect_pixel({selector:"img", x:50, y:50, percent:true})
|
|
232
234
|
- Performance check → batch([performance_trace, get_load_timeline, heap_snapshot_summary])
|
|
233
235
|
- Accessibility audit → batch([get_accessibility_tree, check_contrast({selector:".text"})])
|
|
234
236
|
- Reading page content → eval (specific data) or get_page_text (all text)
|
|
@@ -274,7 +276,19 @@ Regression Testing:
|
|
|
274
276
|
Before/After Comparison:
|
|
275
277
|
screenshot (save dataUrl) → make changes → visual_diff({before_dataUrl:"..."})
|
|
276
278
|
|
|
277
|
-
|
|
279
|
+
Image/Layer Debugging:
|
|
280
|
+
annotate({annotations:[{selector:".base",label:"Base",color:"red"},{selector:".overlay",label:"Overlay",color:"blue"}]}) → screenshot → clear_annotations
|
|
281
|
+
inspect_pixel({selector:".garment-img", x:50, y:30, percent:true}) → check if transparent or opaque
|
|
282
|
+
get_element_rect({selector:".container", include_children:true}) → see all child positions + z-indexes
|
|
283
|
+
capture_canvas({selector:".composer"}) → flatten all stacked images into one PNG
|
|
284
|
+
|
|
285
|
+
Cross-Product Comparison:
|
|
286
|
+
new_tab({url:"product-A"}) → new_tab({url:"product-B"}) → compare_tabs({tab_id_1:A, tab_id_2:B})
|
|
287
|
+
|
|
288
|
+
State Management Testing:
|
|
289
|
+
set_storage({key:"cache", action:"remove"}) → reload → verify fresh state
|
|
290
|
+
|
|
291
|
+
## ALL 65 TOOLS BY CATEGORY:
|
|
278
292
|
Core: diagnose, batch, select_tab, snapshot, eval, screenshot, full_page_screenshot, get_page_text, get_html, get_page_info, browser_bridge_help
|
|
279
293
|
Interaction: click, fill, hover, scroll, press_key, select_option, upload_file, highlight_element
|
|
280
294
|
Navigation: navigate, new_tab, close_tab, go_back, go_forward, reload, list_tabs, wait_for
|
|
@@ -284,6 +298,8 @@ Accessibility: get_accessibility_tree, check_contrast
|
|
|
284
298
|
Emulation: emulate_device, network_throttle, set_geolocation, toggle_dark_mode
|
|
285
299
|
Testing: visual_diff, inject_css, mock_network, record_actions, replay_actions, handle_dialog
|
|
286
300
|
Productivity: save_form_profile, load_form_profile, save_tab_session, restore_tab_session, edit_cookie, export_pdf
|
|
301
|
+
Visual Debugging: inspect_pixel, get_element_rect, compare_tabs, annotate, clear_annotations, capture_canvas
|
|
302
|
+
Storage: set_storage
|
|
287
303
|
`;
|
|
288
304
|
|
|
289
305
|
const BATCH_TOOL = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-browser-bridge",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Connect your live Chrome tabs to Claude Code —
|
|
3
|
+
"version": "4.0.1",
|
|
4
|
+
"description": "Connect your live Chrome tabs to Claude Code — 65 tools for debugging, performance, accessibility, visual inspection, and browser automation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"claude-browser-bridge": "./bin/cli.js"
|