feat: browser automation tool (Playwright)#44
Conversation
- New 'browser' tool with 5 actions: navigate, screenshot, click, type, evaluate - Shells out to Playwright (node) for headless Chromium control - Returns page text + screenshot path for agent to analyze - Graceful errors if playwright/node not installed - 29 tools total, 192 tests pass
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughA new "browser" tool was added for headless web/UI testing, enabling actions like navigate, screenshot, click, type, and evaluate on web pages. The feature increments the built-in tools count from 28 to 29 across documentation and tests, with runtime dispatch logic and tool specification definitions. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client/Dispatcher
participant Runtime as Runtime Handler
participant Script as Script Generator
participant Node as Node Process
Client->>Runtime: dispatch tool (name="browser")
activate Runtime
Runtime->>Runtime: validate action & parameters
Runtime->>Script: construct Playwright script
activate Script
Script->>Script: build action-specific JS code
Script-->>Runtime: return script content
deactivate Script
Runtime->>Runtime: write to /tmp/mc_browser_script.js
Runtime->>Node: execute via node process
activate Node
Node->>Node: run Playwright commands
Node-->>Runtime: return output
deactivate Node
Runtime->>Runtime: parse result & error status
Runtime-->>Client: return (output, error_flag)
deactivate Runtime
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
New
browsertool for headless web testing:Actions: navigate, screenshot, click, type, evaluate JS
How: Generates Playwright script → runs via Node.js → returns text + screenshot
Deps: Requires
npm i -g playwright && npx playwright install chromiumGraceful: Clear error messages if playwright/node missing
Closes the biggest competitive gap vs Cursor and Cline.
29 tools, 192 tests.
Summary by CodeRabbit
Release Notes