Repository navigation
Releases
Releases · Chi-9966/web-search
v3.0.0 — Bing engine, readability extraction, proxy support
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/aredirect decoding, 2-signal block detection; included inautomode - Readability extraction —
@mozilla/readability+ jsdom pull the article body out of JS-rendered pages (no more sidebar/nav boilerplate); reported asextract_mode: "readability"with legacy selector chain as fallback - Fetch pagination —
web_fetchgainsstart_index/max_lengthwith a machine-readable footer (Use start_index=N to see more), so long pages can be continued instead of truncated - Proxy support — undici
EnvHttpProxyAgentglobal dispatcher withNO_PROXYbypass list; revives DuckDuckGo behind a local proxy while Baidu/Bing stay direct. Configure via env or the newproxy:section in config.yaml - DuckDuckGo JSONP strategy — parses the homepage
<link rel="preload">→links.duckduckgo.com/d.jspayload 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_actionsso 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
enginetag with sub-strategy preserved asstrategy - 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 to0 - Retry taxonomy: 4xx (except 429) fails fast as
HTTP_CLIENT_ERRORinstead 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 testalso covers the DDG-via-proxy path- New dependencies:
@mozilla/readability,jsdom,undici,cheerio
Full changelog: v2.1.0...v3.0.0