Headless browser (Playwright):
- New: headless_browser.py — full Playwright-based browser implementation
- Supports: navigate, screenshot, get_text, click, type, evaluate, get_elements
- Auto-fallback: execute_browser_tool tries Electron webview first, falls back to
headless Playwright when "not found" error detected
- Works everywhere: web browser, Electron app, server, CI
- Pages managed per browser_id, cleaned up on session close
WebSearch fix:
- Changed User-Agent from bot identifier to Chrome UA
- DDG serves different HTML to bots vs browsers, causing parse failures
- Now returns proper results (tested: Eater SF, Infatuation, etc.)
Requirements:
- Added playwright to requirements.txt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Performance fix:
- MCP servers no longer spawned upfront for every message
- Tool schemas loaded from cached metadata (instant, no subprocess)
- MCP servers only connected when their tools are first called (lazy)
- Browser agent MCP server still connects upfront (lightweight)
- Reduces startup from 30+ seconds to <1 second for simple messages
Browser agent 9Router support:
- Browser agent now works through 9Router when no API key set
- Uses OpenAI client format when base_url provided
- Model ID mapping for 9Router (cc/ prefix)
- Passes auth_token and base_url through run_browser_agents
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>