v0.4.0 — Search resilience overhaul + CSP fix + href_pattern fix
Release notes for 0.4.0 (2026-05-27). See CHANGELOG.md for the full structured entry.
Added
BROWSE_MCP_TAVILY_API_KEYopt-in Tavily Search provider (1000 req/mo free, AI-curated). Tried after Brave in the search provider chain. (#27)- Playwright-rendered DDG/Bing fallback for
browser_search. When the fetch-based scrape returns 0 (anti-bot interstitial or layout drift), the search reruns inside the real browser context and parses the live DOM. Layered chain: Brave (key) → Tavily (key) → fetch DDG → fetch Bing → rendered DDG → rendered Bing. (#24) - Structured
difficultylog entries with 600-charhtmlExcerpt, page title, and URL when rendered DDG/Bing fallbacks return 0 results. Visible viabrowser_review_issuesfor drift debugging without a live repro. (#26)
Fixed
browser_extract_listings({ href_pattern: "/inventory/used" })no longer throwsInvalid flags supplied to RegExp constructor 'used'.href_patternis now treated as a substring by default; the value is only parsed as a regex when wrapped in/.../flagsAND flags validate against/^[gimsuy]*$/. Applied symmetrically tobrowser_links. (#22)browser_readno longer fails withRefused to execute inline scripton github.com, Cloudflare-challenged pages, and any site with strictscript-srcCSP. Readability source now runs throughpage.evaluate(<string>)(CDPRuntime.evaluate, which bypasses CSP) instead ofpage.addScriptTagwhich injects a real<script>element. (#23)
Changed
FRAGILITY NOTICEinsrc/search.tsand the README search section now lead with the API-key recommendation. The scrape rungs are documented as a best-effort backstop; the new fallback chain and telemetry are documented as the response to Cloudflare / TLS-JA3 fingerprinting that increasingly blocks Playwright clients.
Recommended setup for new installs
For reliable search, set one of:
| Provider | Free tier | Env var |
|---|---|---|
| Brave Search API | ~1k req/mo on the free credit | BROWSE_MCP_BRAVE_API_KEY |
| Tavily Search | 1000 req/mo, AI-curated | BROWSE_MCP_TAVILY_API_KEY |
Either is sufficient. The scrape fallback still works for zero-config installs.