Skip to content

Releases

v3.0.0 — Bing engine, readability extraction, proxy support

Choose a tag to compare

@Chi-9966 Chi-9966 released this 30 Jul 04:18

What's new in v3.0.0

A major upgrade over v2.1.0: a new search engine, much cleaner page extraction, full proxy support, and a test suite. All changes are backward-compatible for tool callers.

🚀 New features

  • New Bing engine (engine: "bing") — HTTP-first against cn.bing.com with Playwright fallback, /ck/a redirect decoding, 2-signal block detection; included in auto mode
  • Readability extraction — @mozilla/readability + jsdom pull the article body out of JS-rendered pages (no more sidebar/nav boilerplate); reported as extract_mode: "readability" with legacy selector chain as fallback
  • Fetch pagination — web_fetch gains start_index / max_length with a machine-readable footer (Use start_index=N to see more), so long pages can be continued instead of truncated
  • Proxy support — undici EnvHttpProxyAgent global dispatcher with NO_PROXY bypass list; revives DuckDuckGo behind a local proxy while Baidu/Bing stay direct. Configure via env or the new proxy: section in config.yaml
  • DuckDuckGo JSONP strategy — parses the homepage <link rel="preload"> → links.duckduckgo.com/d.js payload instead of rotten HTML selectors; DDG works again
  • SSRF guard — http(s)-only scheme validation + DNS-based private/loopback IP rejection for web_fetch (skipped for proxied hosts to avoid fake-IP false positives)
  • Error recovery hints — error payloads now carry next_actions so callers (LLMs) can self-correct instead of retrying blindly

🐛 Correctness & quality fixes

  • Circuit-breaker double-count fix (engine + dispatcher both recorded failures)
  • Rank-preserving merge: round-robin interleave by per-engine native rank instead of a global re-rank that destroyed relevance order; canonical engine tag with sub-strategy preserved as strategy
  • CJK-aware keyword extraction (unicode tokenization + stopwords) for depth ≥ 2 re-searches
  • Snippet hygiene — layout whitespace/newlines collapsed
  • YAML parser: quoted empty strings (base_url: "") no longer dropped or coerced to 0
  • Retry taxonomy: 4xx (except 429) fails fast as HTTP_CLIENT_ERROR instead of burning retries
  • DDG availability probe with 5-min TTL, forced re-check when the breaker is half-open

🧪 Engineering

  • npm test — 39-assertion smoke suite (test/smoke.mjs): unit tests (breaker accounting, interleave order, redirect decoding, SSRF ranges, YAML edge cases) + live tests against real engines; SMOKE_PROXY=http://host:port npm test also covers the DDG-via-proxy path
  • New dependencies: @mozilla/readability, jsdom, undici, cheerio

Full changelog: v2.1.0...v3.0.0