dsh-hydrasearch
多后端网页搜索与内容抓取接管及故障转移 适合需要整合 TinyFish 和 AnySearch 提升内置搜索工具稳定性的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dgagf111/dsh-hydrasearch说明文档
阅读完整 README ↗配置
全部字段持久化在 settings 命名空间 hydrasearch,每个字段用独立路径写入(如 ['tinyfish','language']),所以编辑一个后端永远不会覆盖另一个。
链(顶层)
| 字段 | 默认 | 说明 |
|---|---|---|
priority | [tinyfish, anysearch] | 后端顺序,卡片拖动调整 |
failover | true | 失败时是否切下一个 |
takeOverSearch | true | 组合未指定 web.searchProvider 时接管 |
takeOverFetch | true | 同上,针对 fetch |
searchBackend | auto | auto 跟随优先级,或钉死某个后端 id |
fetchBackend | auto | 同上,针对 web_fetch |
TinyFish(tinyfish.*)
| 字段 | 默认 | 对应 API 参数 |
|---|---|---|
enabled | true | — |
apiKey | '' | X-API-Key;空则回退 env / CLI 配置 |
apiKeyEnv | TINYFISH_API_KEY | 凭据中心的引用名 |
searchBaseURL | https://api.search.tinyfish.ai/ | 搜索端点 |
fetchBaseURL | https://api.fetch.tinyfish.ai/ | 抓取端点 |
purpose | '' | purpose 搜索意图提示 |
language | '' | language |
location | '' | location |
domainType | '' | domain_type:web / news / research_paper |
includeDomains | '' | include_domains(逗号分隔) |
excludeDomains | '' | exclude_domains(逗号分隔) |
afterDate | '' | after_date(YYYY-MM-DD) |
beforeDate | '' | before_date(YYYY-MM-DD) |
recencyMinutes | 0 | recency_minutes(0=不发) |
pubYearMin | 0 | pub_year_min(0=不发) |
pubYearMax | 0 | pub_year_max(0=不发) |
maxPages | 3 | 每次搜索最多翻几页(1–10) |
fetchFormat | markdown | 抓取格式:markdown / html / json |
fetchLinks | false | 抓取时同时返回页面链接 |
verbose | false | 打印每次搜索/抓取日志 |
AnySearch(anysearch.*)
| 字段 | 默认 | 对应 API 参数 |
|---|---|---|
enabled | true | — |
apiKey | '' | Authorization: Bearer;空则匿名访问 |
apiKeyEnv | ANYSEARCH_API_KEY | 凭据中心的引用名 |
baseURL | '' | API 地址;空则用公共地址 |
tag | '' | tag 垂直子域(如 finance.quote);空=通用网页搜索 |
params | '' | params 垂直参数(JSON 对象字符串);需先填 tag |
zone | '' | zone |
language | '' | language |
maxResults | 10 | max_results(1–10) |
verbose | false | 打印日志 |
写路径会校验:端点必须是绝对 URL、maxPages 在 1–10、fetchFormat 合法、日期是 YYYY-MM-DD、params 是合法 JSON 对象且必须同时有 tag。坏值在卡片层就被拒,不会静默禁用某个后端直到重启。