Skip to content

agent: add adapter for Baidu Search - #2641

Merged
esokullu merged 2 commits into
webbrain-one:mainfrom
alectimison-maker:agent/baidu-search-adapter
Aug 2, 2026
Merged

agent: add adapter for Baidu Search#2641
esokullu merged 2 commits into
webbrain-one:mainfrom
alectimison-maker:agent/baidu-search-adapter

Conversation

@alectimison-maker

Copy link
Copy Markdown
Contributor

Summary

Adds a mirrored Baidu Search adapter for Chrome and Firefox.

Without this adapter, the agent can mistake ads or generated-answer blocks for organic evidence, infer redirect destinations from snippets, or lose the search task when Baidu sends the tab to its separate verification host.

  • Scope matching to Baidu web, mobile, image, video, account, and observed wappass.baidu.com verification surfaces without hijacking Maps, Tieba, Pan, or Baike.
  • Distinguish web/news/video/image result types, paid placements, generated answers, redirects, pagination, and lazy-loaded media cards.
  • Preserve the query and backurl across 百度安全验证, stopping for manual completion instead of bypassing or looping.
  • Keep public search usable without forcing account login.
  • Add positive, negative, phishing-lookalike, product-isolation, challenge, guidance, and Chrome/Firefox parity assertions.

Validation

  • Targeted Baidu production, isolation, challenge, and parity assertions: passed.
  • Anonymous Chrome/Playwright read-only check: home and image search returned HTTP 200; web search redirected to wappass.baidu.com/static/captcha/... with title 百度安全验证, and the final URL selected the baidu-search adapter after the matcher was extended.
  • node test/run.js: 1398/1399 passed; the single failure predates this branch and is the repository's changelog/package version mismatch.
  • node test/security/injection-corpus.mjs: 60/60 passed.
  • git diff --check: passed.

Compatibility and risks

The change is prompt-only and mirrored across both browser builds. Baidu experiments with result layout and verification frequency, so the notes are dated 2026-08 and avoid unstable result indices.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu
esokullu merged commit c76e7de into webbrain-one:main Aug 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants