@wenaixi/searchfuse 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/LICENSE +21 -0
- package/README.md +169 -2
- package/README.zh-CN.md +170 -0
- package/SECURITY.md +20 -0
- package/claude/.claude-plugin/plugin.json +17 -0
- package/claude/SKILL.md +53 -0
- package/claude/hooks/hooks.json +3 -0
- package/claude/hooks/register.ts +552 -0
- package/cordis.patch.yml +16 -0
- package/dist/config-schema.js +40 -0
- package/dist/errorCause-BY0A0XKN.js +17 -0
- package/dist/kernel.js +62 -0
- package/dist/main.js +1371 -0
- package/dist/mcp-protocol.js +1 -0
- package/dist/mcp-registry.js +155 -0
- package/dist/protocol-ClnjMnGV.js +259 -0
- package/dist/proxy-DodOSGiI.js +50 -0
- package/dist/search-BIW13Csk.js +4061 -0
- package/dist/serve-Bfqz-nCB.js +279 -0
- package/dist/serve-ensure.js +140 -0
- package/docs/commit.md +77 -0
- package/docs/dsh.md +205 -0
- package/docs/harness-setup.md +78 -0
- package/docs/parity-matrix.md +61 -0
- package/docs/searxng-setup.md +117 -0
- package/docs/security.md +59 -0
- package/docs/settings-redesign-decisions.md +407 -0
- package/docs/superpowers/plans/2026-11-24-serve-lifecycle.md +880 -0
- package/docs/superpowers/reports/2026-11-24-serve-lifecycle-ledger.md +211 -0
- package/docs/superpowers/specs/2026-11-20-searchfuse-dual-host-design.md +172 -0
- package/docs/superpowers/specs/2026-11-21-searchfuse-tri-host-design.md +659 -0
- package/docs/superpowers/specs/2026-11-21-tri-host-takeover-design.md +363 -0
- package/docs/superpowers/specs/2026-11-22-settings-card-refactor-design.md +117 -0
- package/docs/superpowers/specs/2026-11-24-serve-lifecycle-design.md +155 -0
- package/docs/testing.md +92 -0
- package/docs/troubleshooting.md +258 -0
- package/dsh/client.js +2917 -0
- package/dsh/fetch-schema.json +1 -0
- package/dsh/index.js +2640 -0
- package/dsh/search-schema.json +65 -0
- package/dsh/spawnHidden.d.ts +7 -0
- package/dsh/spawnHidden.js +8 -0
- package/omp/extension.ts +331 -0
- package/package.json +95 -4
- package/skills/searchfuse/SKILL.md +139 -0
- package/skills/searchfuse/references/cli.md +78 -0
- package/skills/searchfuse/references/configure.md +405 -0
- package/skills/searchfuse/references/output-schema.md +182 -0
- package/skills/searchfuse/references/runtime.md +58 -0
- package/skills/searchfuse/scripts/run.ps1 +279 -0
- package/skills/searchfuse/scripts/run.sh +315 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
版本号从 0.1.0 重新起算。此前那轮 2.x–5.x 的开发记录仍在 git 历史里,但不再
|
|
9
|
+
作为发布线的一部分:它是同一个产品的多轮重写,不是 0.1.0 之前的版本。本文件
|
|
10
|
+
从这一版起重新记账。
|
|
11
|
+
|
|
12
|
+
## [Unreleased]
|
|
13
|
+
|
|
14
|
+
暂无。
|
|
15
|
+
|
|
16
|
+
## [0.1.0] - 2026-11-26
|
|
17
|
+
|
|
18
|
+
首个正式版本。searchfuse 是一个给模型用的联网搜索插件:把搜索查询变成带来源
|
|
19
|
+
的结构化证据,并把这套能力同时以 CLI、技能和 dsh 插件三种形态交付。
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **融合搜索。** `web_search` 默认并发询问每个可达引擎,用倒数排名融合
|
|
24
|
+
(`score = Σ 1/(60 + 名次)`)合并它们的排序列表,而不是逐个回退。一个被两个
|
|
25
|
+
引擎分别排在第一和第三的页面,得分高于只有一个引擎喜欢的页面。可用
|
|
26
|
+
`aggregate.mode chain` 退回旧的串行行为。
|
|
27
|
+
- **结果去重与佐证。** 合并前按规范化 URL 归一:去掉片段标识与追踪参数
|
|
28
|
+
(`utm_*`、`fbclid`、`gclid`、`mc_cid`、`mc_eid`、`ref`、`source`、`spm`),
|
|
29
|
+
剩余参数排序,host 小写,去掉默认端口与非根路径的尾斜杠。`www.` 前缀与路径
|
|
30
|
+
大小写刻意保留,因为合并它们会悄悄丢掉一个真实的第二来源。融合后的条目带
|
|
31
|
+
`score` 与 `foundIn`,读者据此能分辨多源共识与单一引擎的看法。
|
|
32
|
+
- **十个搜索与抓取引擎。** 搜索链固定为 Firecrawl、Keenable、AnySearch、
|
|
33
|
+
You.com、SearXNG、Antigravity CLI、Tavily、Exa;抓取链是 Firecrawl、
|
|
34
|
+
Antigravity CLI、`local`;Grok 覆盖 X 语料。前五台免注册或免 key:Firecrawl、
|
|
35
|
+
Keenable、AnySearch、You.com 各有自己的免注册额度,SearXNG 默认用随包实例
|
|
36
|
+
(它自己的七十多个上游引擎经一个适配器进来)。Tavily、Exa 各带免费月度额度,
|
|
37
|
+
Antigravity CLI 靠浏览器登录并合成答案(默认关闭,因为它慢到超出融合预算)。
|
|
38
|
+
AnySearch 可配 `ANYSEARCH_API_KEY` 提升额度;带 key 的请求被 401/403 拒绝时
|
|
39
|
+
自动降级匿名档重试一次,并在 `warnings` 里注明。它的结果带相关性过滤:与查询
|
|
40
|
+
无共享词汇的整批判空,让融合有机会换下一个引擎。
|
|
41
|
+
- **能力矩阵。** 每个引擎用两个正交开关自由组合:`expose.aggregate` 决定它是否
|
|
42
|
+
进入融合答案,`expose.tool` 决定它是否另成一个可按名调用的独立工具,两者可
|
|
43
|
+
同时开启。`toolName` 覆盖独立工具的名字。
|
|
44
|
+
- **每引擎独立代理。** `engines.<name>.proxy` 三态:留空跟随本机代理环境变量,
|
|
45
|
+
`direct`/`none` 表示仅此引擎绕过系统代理,完整 URL 表示仅此引擎走它。既不是
|
|
46
|
+
关键字也不是 http(s) URL 的值会被拒绝而不是忽略——笔误时回落到环境变量,会把
|
|
47
|
+
流量送进用户正想避开的那个代理。
|
|
48
|
+
- **内建 MCP 客户端。** 写在 `mcp` 下的 Streamable HTTP 服务端变成普通工具,
|
|
49
|
+
命名与宿主自己的 MCP 客户端一致(`mcp__<server>__<tool>`)。握手并发的,
|
|
50
|
+
一个服务端连不上只损失它自己的工具,并在 30 秒后自动重试一次。握手与工具调用
|
|
51
|
+
使用各自独立的超时上限。
|
|
52
|
+
- **配额冷却。** 额度耗尽的引擎自动退到链尾并记下恢复时间,月度额度(Tavily 的
|
|
53
|
+
432/433)按二十四小时算,其余按四十五分钟算。冷却中的引擎不参与融合,并在
|
|
54
|
+
`uncertainty` 里写明"未参与"而非"失败"。
|
|
55
|
+
- **`searchfuse doctor`。** 不花额度、不发网络请求地诊断本机配置:Node 版本、
|
|
56
|
+
引擎选择与其来源、配置文件权限、每个角色的候选引擎及其就绪原因、融合与 MCP
|
|
57
|
+
两节的配置事实,缺什么附一条可直接复制的修复命令。
|
|
58
|
+
- **dsh 设置卡片。** 网页端没有终端,所以卡片提供首选引擎、密钥与端点、引擎
|
|
59
|
+
开关、曝光矩阵与每引擎代理。密钥永远不下发到浏览器,只报告"有没有存过"。
|
|
60
|
+
- **单引擎多密钥轮换。** 一个引擎可配逗号分隔的多个 key,鉴权、限流或配额失败
|
|
61
|
+
时按顺序轮换,再把工作交给下一个引擎。
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **Antigravity CLI 默认不激活。** 它靠模型合成并引用答案,动辄一分钟以上,
|
|
66
|
+
超过任何有用的融合预算,留在链里也只能被跳过。它仍出现在设置卡片上,一键即可
|
|
67
|
+
打开,`doctor` 也照常报告它是否可用。想要它就写
|
|
68
|
+
`engines.antigravity-cli.enabled: true`。
|
|
69
|
+
- **代理遵循 `no_proxy`。** 引擎 API 调用与单页抓取走同一套代理规则,不再出现
|
|
70
|
+
"抓网页能通、搜索全失败"的分裂状态。失败的调用会点名原因(`ECONNREFUSED`、
|
|
71
|
+
`EAI_AGAIN`),而不是一句光秃秃的 `fetch failed`。
|
|
72
|
+
- **权限收紧。** 配置文件以 `0600` 写入,目录以 `0700` 创建,采用同目录临时
|
|
73
|
+
文件加原子重命名,避免写到一半的 JSON 变成下一次启动的故障源。
|
|
74
|
+
|
|
75
|
+
### Removed
|
|
76
|
+
|
|
77
|
+
- **Hacker News 与 Stack Overflow 适配器。** 它们返回的内容对通用检索的价值低于
|
|
78
|
+
维护成本,把名次让给语义更匹配的来源。
|
|
79
|
+
- **Playwright 抓取路径。** 页面抓取只保留 Firecrawl 云端、Antigravity CLI 与
|
|
80
|
+
内置直连三种,少一个需要额外安装的运行时依赖。
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- **融合不再把无链接条目合并成一条。** 五个 HTTP 引擎都用 `url: r.url ?? ''`
|
|
85
|
+
构造条目,上游漏一个链接就会送来空串。空串经规范化后仍是空串,于是所有无链接
|
|
86
|
+
条目共用同一个键:一批互不相干的结果被合并成一条、`foundIn` 声称多个引擎都投了
|
|
87
|
+
它、虚高的分数还把它顶到第一位。现在空 URL 使用由引擎名与列表内序号组成的合成
|
|
88
|
+
键,各自独立保留。
|
|
89
|
+
- **超时不再被报成"被取消"。** 原先只用一份信号判定归因,而调用方手里没有取消
|
|
90
|
+
信号,只能把自己的超时信号传进来,于是每次预算耗尽都写成"the run was
|
|
91
|
+
cancelled",用户会以为是自己点了停止。现在以"预算先到即超时、外部先到即取消"
|
|
92
|
+
两份精确信息区分。
|
|
93
|
+
- **关掉的引擎不会以工具身份复活。** `enabled: false` 是彻底的总开关,不只是
|
|
94
|
+
"不参与融合"。
|
|
95
|
+
- **切换配置不再吞掉 `aggregate` 与 `mcp` 段。** 配置读取是一次白名单式重建,
|
|
96
|
+
新增的顶层段必须在其中被搬运过去,否则每次 `config set` 都会把它们抹掉,而且
|
|
97
|
+
不会报错——只会让工具在下次加载时安静地消失。
|
|
98
|
+
- **`__proto__` 不会伪装成引擎设置。** 引擎映射使用 null 原型对象,因为手工编辑
|
|
99
|
+
的 `engines["__proto__"] = {...}` 在普通对象字面量上会设置原型而不是定义属性,
|
|
100
|
+
于是该条目在枚举与序列化里隐形,却仍能被点号访问看到。
|
|
101
|
+
- **Windows 上退出时不再崩溃。** 已经打印完结果的搜索会设置退出码并让 Node 自行
|
|
102
|
+
收尾,而不是立刻结束进程——后者可能拆掉一个仍在关闭中的网络连接,让检查退出码
|
|
103
|
+
的调用方丢掉一份好结果。
|
|
104
|
+
|
|
105
|
+
### Security
|
|
106
|
+
|
|
107
|
+
- **SSRF 防护与 DNS 重绑定闭合。** 安全检查解析一次主机名后,连接会钉在它验证过
|
|
108
|
+
的那个 IP 上,Host 头与 TLS SNI 仍保留原主机名;每个重定向跳转都重新校验并重新
|
|
109
|
+
钉住,堵住"检查后 DNS 答案变化"的时间窗。
|
|
110
|
+
- **私有与保留地址默认拦截。** `allowPrivateNetwork` 打开后才放行,且它从不授权
|
|
111
|
+
Firecrawl 云端披露——URL 中直写的私有目标在任何配置下都不会发往云端。
|
|
112
|
+
- **工具可执行文件不经 shell 启动。** 子进程引擎一律 `spawn(bin, args)` 且不带
|
|
113
|
+
shell,避免把参数拼进命令行。图形宿主下子进程窗口被隐藏,并有契约测试扫描发布
|
|
114
|
+
源码,防止以后新加的 provider 悄悄把黑窗口闪回来。
|
|
115
|
+
- **密钥从不进入模型可读的输出。** `config show`、`doctor` 与卡片一律打码,只报告
|
|
116
|
+
密钥来自环境变量还是配置文件。
|
|
117
|
+
|
|
118
|
+
### Compatibility
|
|
119
|
+
|
|
120
|
+
- **cordis 4.2 兼容**:`engines.dsh` 补上 `<0.3.0-0` 上界(DSH 0.2.3 系列
|
|
121
|
+
随包带入 cordis 4.2.0-alpha.1 与 schemastery 3.20.0-alpha.1,实测引擎闸门
|
|
122
|
+
与 bundle 组合均无回归)。
|
|
123
|
+
- **工具链在发版前全部升到最新**:TypeScript 5.9 → 7.0、Vite 6.4 → 8.3、
|
|
124
|
+
Vitest 3.2 → 5.1、Biome 2.5 → 2.6、commander 13 → 15、undici 7.30 → 8.13、
|
|
125
|
+
`@searxng-js/searxng` 0.1.2 → 0.1.3,CI 与 `packageManager` 一并钉在
|
|
126
|
+
pnpm 12.23。两处必须跟着改:TypeScript 7 要求 `tsconfig.dsh.json` 显式写
|
|
127
|
+
`rootDir`(否则退出码 2、`dsh/index.js` 不生成,包装不上);undici 8 对
|
|
128
|
+
`http://` 目标改用标准代理转发而非 CONNECT 隧道,测试里的假代理两条路都要接。
|
|
129
|
+
|
|
130
|
+
[Unreleased]: https://github.com/Wenaixi/searchfuse/compare/v0.1.0...HEAD
|
|
131
|
+
[0.1.0]: https://github.com/Wenaixi/searchfuse/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leon Liu (liustack)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,170 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Wenaixi/searchfuse/main/assets/banner.jpg" width="100%" alt="SearchFuse" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">SearchFuse</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center"><b>In the chat app your model can search the web. On the API it cannot. SearchFuse puts the web back: web search, X search, page fetch. Free, no signup, no API key.</b></p>
|
|
8
|
+
|
|
9
|
+
<p align="center"><b>The strongest free web search plugin for DeepSeek Harness (dsh)</b></p>
|
|
10
|
+
|
|
11
|
+
<p align="center">Engines: <b>Firecrawl</b> (keyless, default) · <b>Keenable</b> (keyless) · <b>AnySearch</b> (keyless) · <b>You.com</b> (keyless) · <b>SearXNG</b> (bundled) · <b>Tavily</b> · <b>Exa</b> · <b>Antigravity CLI</b> · <b>Grok (X)</b> · <b>local</b>, fused by default</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="./README.zh-CN.md">简体中文</a> ·
|
|
15
|
+
<a href="docs/troubleshooting.md">Troubleshooting</a> ·
|
|
16
|
+
<a href="skills/searchfuse/references/configure.md">Configuration</a> ·
|
|
17
|
+
<a href="skills/searchfuse/references/output-schema.md">Output contract</a> ·
|
|
18
|
+
<a href="docs/security.md">Security</a> ·
|
|
19
|
+
<a href="https://github.com/liustack/modlens">ModLens (vision)</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://x.com/liustack"><img src="https://img.shields.io/badge/follow-%40liustack-black?style=flat-square&logo=x&logoColor=white" alt="Follow @liustack on X"></a>
|
|
24
|
+
<a href="https://www.npmjs.com/package/@wenaixi/searchfuse"><img src="https://img.shields.io/npm/v/@wenaixi/searchfuse?style=flat-square&label=npm&color=cb3837" alt="npm"></a>
|
|
25
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@wenaixi/searchfuse?style=flat-square" alt="Node.js"></a>
|
|
26
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License"></a>
|
|
27
|
+
<img src="https://img.shields.io/badge/Not%20backed%20by-Y%20Combinator-FF6600?style=flat-square&logo=ycombinator&logoColor=white" alt="Not backed by Y Combinator">
|
|
28
|
+
<img src="https://img.shields.io/badge/users-unknown-lightgrey?style=flat-square" alt="Users unknown">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
Models like DeepSeek and GLM have no web access, or a weak one. SearchFuse is a plug-in that greatly strengthens web search, X search, and single-page fetch. It works the moment it lands: the default engine is Firecrawl's keyless tier, [1,000 free credits every month](https://www.firecrawl.dev/blog/firecrawl-keyless-launch), with no account, no API key, and no card.
|
|
32
|
+
|
|
33
|
+
## Talk to us
|
|
34
|
+
|
|
35
|
+
Hit a problem? [Open an issue](https://github.com/Wenaixi/searchfuse/issues/new/choose). Everything else is welcome on X: **[@liustack](https://x.com/liustack)**. What you built with it, which harness you are on, what should come next. New releases land there first. A community space is on the way.
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- **The strongest free web search plugin for DeepSeek Harness (dsh):** one command installs it, `npx -y @deepseek-ai/dsh plugin --profile web add @wenaixi/searchfuse@0.1.0`. In the desktop app's Add plugin dialog, enter `@wenaixi/searchfuse`, not the GitHub URL. Details in [harness setup](docs/harness-setup.md#deepseek-harness-dsh).
|
|
40
|
+
- **Free out of the box, no signup.** Search and page fetch run on Firecrawl Keyless by default: [1,000 free credits/month](https://www.firecrawl.dev/blog/firecrawl-keyless-launch), no account, no API key, no card. Every fallback channel is free too: Keenable, AnySearch, and You.com each add a keyless pool, the bundled SearXNG instance needs no key at all, Antigravity CLI needs only a browser sign-in, and Tavily, Exa, and a free Firecrawl key each add their own monthly quota with no card required.
|
|
41
|
+
- **Fused search, not failover.** By default `web_search` asks every reachable engine at once and merges their ranked lists with reciprocal rank fusion, so an answer reflects several indexes and a page two engines agree on outranks one only a single engine liked. Set `aggregate.mode: chain` in `~/.searchfuse/config.json` for the old sequential behaviour.
|
|
42
|
+
- **Automatic failover.** When a channel fails or exhausts its quota, the next one takes over. Under fusion, one engine erroring costs only its own contribution; the rest of the answer stands and the failure is named in `uncertainty`.
|
|
43
|
+
- **Per-engine key rotation.** Give Tavily, Exa, Firecrawl, Keenable, or AnySearch multiple comma-separated keys. Authentication, rate-limit, and quota failures rotate to the next key before the engine chain falls back.
|
|
44
|
+
- **Every engine on its own leash.** Each engine can join the fused answer, become a standalone tool the model calls by name, do both, or be switched off — independently. Each can also take its own proxy, so one engine leaves the machine's proxy while the rest keep using it.
|
|
45
|
+
- **MCP servers become tools.** Point the plugin at any Streamable HTTP MCP server and its tools appear as `mcp__<server>__<tool>`, no separate plugin to install. Connections are made concurrently and a server that cannot be reached costs only its own tools.
|
|
46
|
+
- **Searches X (Twitter).** With Grok Build installed, SearchFuse queries the corpus that web indexes cannot reach.
|
|
47
|
+
- **Install once, use everywhere.** Works in Claude Code, Codex, Pi, and OpenCode.
|
|
48
|
+
|
|
49
|
+
## See it work
|
|
50
|
+
|
|
51
|
+
All four screenshots are unedited runs, the first two from the Codex desktop app and the last two from dsh web, driving DeepSeek models with no web access of their own.
|
|
52
|
+
|
|
53
|
+
Give it a blog link and ask what the post says. Twenty-five seconds later: a structured summary of the whole post, with no browser involved.
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
Give it no target at all, just "anything interesting in AI today?". Thirty-six seconds later: six sourced stories, with a closing note on which details came from aggregation and deserve a second look. The note comes from the `uncertainty` field.
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
Ask dsh web for today's top AI stories. dsh's native search tool row runs straight on the searchfuse engine chain, and eighteen seconds later three stories come back, each with a source link.
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
Ask which Node.js line is still in maintenance. `read_page` reads the release page and the release schedule in turn, and sixty seconds later the verdict arrives with a version status table and sources at the end.
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
## Supported engines
|
|
70
|
+
|
|
71
|
+
Firecrawl, Keenable, AnySearch, You.com, and the bundled SearXNG work with zero setup. Every other engine is one command away. Keys live in `~/.searchfuse/config.json` (0600, masked when shown):
|
|
72
|
+
|
|
73
|
+
| Engine | Does | Free tier | Turn it on |
|
|
74
|
+
| :-- | :-- | :-- | :-- |
|
|
75
|
+
| Firecrawl (default) | web search + page fetch | keyless: 1,000 free credits/month, no signup. A free key adds your own 1,000/month | nothing, it works as installed |
|
|
76
|
+
| Keenable | web search | keyless: 1,000 requests/hour per IP (shared by everyone on that IP), no signup. A free key gives 100,000 requests/month of your own | nothing, it works as installed |
|
|
77
|
+
| AnySearch | web search | keyless: anonymous quota, rate-limited per IP. A free key lifts the rate limit; a rejected key falls back to the anonymous tier automatically | nothing, it works as installed |
|
|
78
|
+
| You.com | web search | keyless: 100 searches/day per IP (shared by everyone on that IP), no signup | nothing, it works as installed |
|
|
79
|
+
| SearXNG | web search (its own 70+ upstream engines behind one adapter) | free, bundled instance by default | nothing, it works as installed. Point it at your own instance with `searchfuse config set searxng.baseURL <url>` |
|
|
80
|
+
| Tavily | web search | 1,000 credits/month, no card | `searchfuse config set tavily.apiKey <key>` |
|
|
81
|
+
| Exa | web search | $10/month recurring credit (~1,400 searches), no card | `searchfuse config set exa.apiKey <key>` |
|
|
82
|
+
| Antigravity CLI | web search + page fetch | free, browser sign-in | off by default: install `agy`, sign in, then `searchfuse config set engines.antigravity-cli.enabled true` |
|
|
83
|
+
| Grok Build | X (Twitter) search | rides SuperGrok or X Premium | install `grok` and sign in |
|
|
84
|
+
| local | page fetch | built in, nothing to install | nothing |
|
|
85
|
+
|
|
86
|
+
Keys can also come from the environment (`TAVILY_API_KEY`, `EXA_API_KEY`, `FIRECRAWL_API_KEY`, `KEENABLE_API_KEY`, `ANYSEARCH_API_KEY`). One engine can take multiple keys as a comma-separated value such as `key-one,key-two`, in either the config file or its environment variable. Multiple engines configured means they run together and their results are fused. Every engine participates by default except `antigravity-cli`, which stays off until you turn it on with `searchfuse config set engines.antigravity-cli.enabled true` because it is too slow for a fusion budget. Exclude any engine with `searchfuse config set <engine>.enabled false`. Using a Tavily-, Exa-, Firecrawl-, Keenable-, or AnySearch-compatible third-party or self-hosted endpoint? Point the engine at it: `searchfuse config set tavily.baseURL <url>`. Official endpoints stay built into the code and are never written as default config. Every knob, engine by engine, is in the [configuration guide](skills/searchfuse/references/configure.md).
|
|
87
|
+
|
|
88
|
+
## Installation
|
|
89
|
+
|
|
90
|
+
**Step 1, hand it to your AI.** Search and page fetch work as soon as the skill lands, on Firecrawl's free keyless quota, so installation is one message:
|
|
91
|
+
|
|
92
|
+
> Install and configure the searchfuse skill following INSTALL.md at https://github.com/Wenaixi/searchfuse, then run the health check and tell me the result.
|
|
93
|
+
|
|
94
|
+
On DeepSeek Harness (dsh), send the same message. INSTALL.md recognizes dsh and switches to the native plugin instead of the skill, so dsh's own `web_search` runs on searchfuse. In the browser UI your AI installs it. The desktop app only takes plugins from its own window, so there your AI asks you to open **Plugins**, click **Add plugin**, and enter `@wenaixi/searchfuse`.
|
|
95
|
+
|
|
96
|
+
Prefer a direct command? Install the same skill through [skills.sh](https://skills.sh/):
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx skills add Wenaixi/searchfuse
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Step 2 (optional), add more free engines.** Antigravity CLI writes better synthesized answers. A free Tavily, Exa, or Firecrawl key adds a personal quota on top of the keyless one. None requires a card. agy's browser sign-in is the only step that needs your hands:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
curl -fsSL https://antigravity.google/cli/install.sh | bash
|
|
106
|
+
agy # sign in, then exit
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Picked a key instead? Send one line to your AI: "set my tavily key to tvly-...".
|
|
110
|
+
|
|
111
|
+
dsh users have a path that never touches the command line. Open **Plugins** in the dsh sidebar and pick `@wenaixi/searchfuse`: pick the preferred engine, fill in an API key or a self-hosted endpoint, tick which engines join failover, hit save and it takes effect. On dsh releases before 0.1.6-alpha.2 the same card lives under Settings → Plugins → Plugin config.
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
## Usage
|
|
116
|
+
|
|
117
|
+
Once installed, you do not need to remember any commands. Just chat. Ask anything that needs checking, or paste a URL, and the skill triggers on its own: it picks an engine, runs the search or fetch, and the answer comes back with sources.
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
| Doc | Read it when |
|
|
122
|
+
| :-- | :-- |
|
|
123
|
+
| [INSTALL.md](INSTALL.md) | Installing the skill step by step (written for an agent) |
|
|
124
|
+
| [CLI manual](skills/searchfuse/references/cli.md) | The CLI the skill drives: flags, config, doctor |
|
|
125
|
+
| [Troubleshooting](docs/troubleshooting.md) | A command failed and the message needs decoding |
|
|
126
|
+
| [Configuration](skills/searchfuse/references/configure.md) | Setting a key, switching engines, fixing config |
|
|
127
|
+
| [Output contract](skills/searchfuse/references/output-schema.md) | Parsing the JSON or building on it |
|
|
128
|
+
| [SearXNG setup](docs/searxng-setup.md) | Running your own instance to reach Google's index |
|
|
129
|
+
| [dsh plugin](docs/dsh.md) | Installing, configuring, verifying, and updating the native dsh bundle |
|
|
130
|
+
| [Harness setup](docs/harness-setup.md) | Wiring it into Codex, Claude Code, OpenCode, or Pi |
|
|
131
|
+
| [Security](docs/security.md) | SSRF guards, DNS-rebinding protection, untrusted input |
|
|
132
|
+
| [Testing](docs/testing.md) | Running the suite or writing a test that can fail |
|
|
133
|
+
| [CHANGELOG](CHANGELOG.md) | Finding what changed in a version |
|
|
134
|
+
|
|
135
|
+
Proxy fake-IP mode (Clash, Clash Verge Rev, mihomo, Surge) works out of the box. DNS answers in `198.18.0.0/15` are treated as fake-IP placeholders with no switch needed. Literal URLs such as `http://198.18.0.5/` stay blocked when `allowPrivateNetwork` is off. For other reserved ranges used by VPNs or hosts-file accelerators such as Steam++ / Watt Toolkit, see [Blocked private network target](docs/troubleshooting.md#blocked-private-network-target).
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
This repo does not accept pull requests. The project is maintained by the author alone. Every line is reviewed in person, and that review is the premise of its reliability. Two effective ways to contribute:
|
|
140
|
+
|
|
141
|
+
- **[Open an issue](https://github.com/Wenaixi/searchfuse/issues).** Bugs, suggestions, confusing errors, unclear docs. Issues are read and shape what gets built next.
|
|
142
|
+
- **Fork it.** Under MIT your copy is fully yours to modify and publish.
|
|
143
|
+
|
|
144
|
+
## Shameless plug
|
|
145
|
+
|
|
146
|
+
Follow the WeChat official account **liustack** (Chinese-language): AI tools, practice, and ideas, posted as they land. Scan the code, or search WeChat for "liustack":
|
|
147
|
+
|
|
148
|
+
<p align="center">
|
|
149
|
+
<img src="https://raw.githubusercontent.com/Wenaixi/searchfuse/main/assets/wechat-qrcode.png" width="420" alt="WeChat official account liustack" />
|
|
150
|
+
</p>
|
|
151
|
+
|
|
152
|
+
If it helps, star [SearchFuse](https://github.com/Wenaixi/searchfuse). Stars are how the next developer finds it.
|
|
153
|
+
|
|
154
|
+
## Star History
|
|
155
|
+
|
|
156
|
+
<a href="https://www.star-history.com/?repos=Wenaixi%2Fsearchfuse&type=date&legend=top-left">
|
|
157
|
+
<picture>
|
|
158
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&theme=dark&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
159
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
160
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
161
|
+
</picture>
|
|
162
|
+
</a>
|
|
163
|
+
|
|
164
|
+
## Disclaimer
|
|
165
|
+
|
|
166
|
+
SearchFuse is MIT-licensed, so use is not restricted. The author gives no warranty and no endorsement for any particular use, commercial or otherwise. The upstream engines it drives (Antigravity CLI, Tavily, Exa, Firecrawl, Keenable, You.com, Grok Build) each carry their own terms and quotas, and complying with them is the user's responsibility.
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Wenaixi/searchfuse/main/assets/banner.jpg" width="100%" alt="SearchFuse" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">SearchFuse</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center"><b>在官方 App 里模型能联网,切到 API 就不能了。SearchFuse 把联网补回来:网页搜索、X 搜索、单页抓取。免费,免注册,免 API key。</b></p>
|
|
8
|
+
|
|
9
|
+
<p align="center"><b>全网最强的 DeepSeek Harness (dsh) 免费联网搜索插件</b></p>
|
|
10
|
+
|
|
11
|
+
<p align="center">引擎:<b>Firecrawl</b>(免注册,默认)· <b>Keenable</b>(免注册)· <b>AnySearch</b>(免注册)· <b>You.com</b>(免注册)· <b>SearXNG</b>(随包内置)· <b>Tavily</b> · <b>Exa</b> · <b>Antigravity CLI</b> · <b>Grok(X)</b> · <b>local</b>,默认融合</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="./README.md">English</a> ·
|
|
15
|
+
<a href="docs/troubleshooting.md">故障排查</a> ·
|
|
16
|
+
<a href="skills/searchfuse/references/configure.md">配置</a> ·
|
|
17
|
+
<a href="skills/searchfuse/references/output-schema.md">输出契约</a> ·
|
|
18
|
+
<a href="docs/security.md">安全</a> ·
|
|
19
|
+
<a href="https://github.com/liustack/modlens">ModLens(视觉)</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://x.com/liustack"><img src="https://img.shields.io/badge/follow-%40liustack-black?style=flat-square&logo=x&logoColor=white" alt="Follow @liustack on X"></a>
|
|
24
|
+
<a href="https://www.npmjs.com/package/@wenaixi/searchfuse"><img src="https://img.shields.io/npm/v/@wenaixi/searchfuse?style=flat-square&label=npm&color=cb3837" alt="npm"></a>
|
|
25
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@wenaixi/searchfuse?style=flat-square" alt="Node.js"></a>
|
|
26
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License"></a>
|
|
27
|
+
<img src="https://img.shields.io/badge/Not%20backed%20by-Y%20Combinator-FF6600?style=flat-square&logo=ycombinator&logoColor=white" alt="Not backed by Y Combinator">
|
|
28
|
+
<img src="https://img.shields.io/badge/users-unknown-lightgrey?style=flat-square" alt="Users unknown">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
DeepSeek 和 GLM 等模型没有联网能力或联网能力羸弱。SearchFuse 通过外挂方式大幅增强模型联网搜索、X 搜索、单页抓取能力。装完即用:默认引擎是 Firecrawl 的免注册通道,[每月 1,000 免费 credits](https://www.firecrawl.dev/blog/firecrawl-keyless-launch),不用注册账号,不用 API key,不用绑卡。
|
|
32
|
+
|
|
33
|
+
## 交流
|
|
34
|
+
|
|
35
|
+
用出问题了就[提个 issue](https://github.com/Wenaixi/searchfuse/issues/new/choose)。其他的都欢迎来 X 上聊:**[@liustack](https://x.com/liustack)**,你用它做了什么、在哪个 harness 上跑、接下来该做什么,新版本也是那边先发。社群正在筹备中。
|
|
36
|
+
|
|
37
|
+
## 特性
|
|
38
|
+
|
|
39
|
+
- **全网最强的 DeepSeek Harness (dsh) 免费联网搜索插件:** 一条命令即刻安装 `npx -y @deepseek-ai/dsh plugin --profile web add @wenaixi/searchfuse@0.1.0`。桌面版「添加插件」里填 `@wenaixi/searchfuse`,不要填 GitHub 地址。细节见[接入指南](docs/harness-setup.md#deepseek-harness-dsh)。
|
|
40
|
+
- **开箱免费,免注册。** 搜索和单页抓取默认跑在 Firecrawl 免注册通道上:[每月 1,000 免费 credits](https://www.firecrawl.dev/blog/firecrawl-keyless-launch),没有账号、没有 API key、没有绑卡。后备通道也全部免费:Keenable、AnySearch 和 You.com 各有一条免注册额度,随包的 SearXNG 实例完全不需要 key,Antigravity CLI 只需浏览器登录,Tavily、Exa 和免费的 Firecrawl key 各带独立的月度额度,均不要求绑卡。
|
|
41
|
+
- **融合搜索,不是故障转移。** 默认情况下 `web_search` 同时询问每个可达引擎,用倒数排名融合合并它们的排序列表,于是答案反映多个索引;两个引擎都认可的页面,排在只有一个引擎喜欢的页面之前。想要旧的串行行为,在 `~/.searchfuse/config.json` 里写 `aggregate.mode: chain`。
|
|
42
|
+
- **自动故障转移。** 一个通道失败或额度耗尽时自动切换下一个。融合模式下,一个引擎报错只损失它自己那份贡献,答案其余部分照常成立,失败原因写进 `uncertainty`。
|
|
43
|
+
- **单引擎多密钥轮换。** Tavily、Exa、Firecrawl、Keenable、AnySearch 都可配置逗号分隔的多个密钥。鉴权、限流或配额失败时先轮换到下一个密钥,再按引擎链故障转移。
|
|
44
|
+
- **每个引擎各有缰绳。** 每个引擎可以独立地选择:参与融合、作为独立工具供模型点名调用、两者兼得、或关闭。每个引擎还可以单独配代理,让其中一个离开本机代理而其余照旧。
|
|
45
|
+
- **MCP 服务端变成工具。** 把插件指向任意 Streamable HTTP MCP 服务端,它的工具就以 `mcp__<server>__<tool>` 出现,不需要另装插件。连接是并发建立的,连不上的服务端只损失它自己的工具。
|
|
46
|
+
- **可搜索 X(推特)。** 安装 Grok Build 后,可检索网页索引覆盖不到的 X 内容。
|
|
47
|
+
- **一次安装,多端可用。** 支持 Claude Code、Codex、Pi、OpenCode。
|
|
48
|
+
|
|
49
|
+
## 实测
|
|
50
|
+
|
|
51
|
+
四张截图全部原样记录,前两张来自 Codex 桌面 App,后两张来自 dsh web,驱动的都是自身不能联网的 DeepSeek 模型。
|
|
52
|
+
|
|
53
|
+
给出一个博客链接,询问文章内容。25 秒后返回全文的结构化摘要,全程未打开浏览器。
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
不指定目标,只问「今天有什么有趣的 AI 新闻」。36 秒后返回六条带来源的结果,并在结尾说明哪些信息来自检索聚合、细节可能有出入。该提醒来自 `uncertainty` 字段。
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
在 dsh web 里问今天有哪些重要的 AI 新闻。dsh 原生的搜索工具行直接跑在 searchfuse 引擎链上,18 秒返回三条当日消息,每条带来源链接。
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
问 Node.js 现在哪条版本线还在维护。`read_page` 先后读官网版本页和发布计划表,59 秒给出结论和版本状态表,来源附在结尾。
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
## 支持的引擎
|
|
70
|
+
|
|
71
|
+
Firecrawl、Keenable、AnySearch、You.com 和随包 SearXNG 零配置直接可用,其余引擎各一条命令。key 存在 `~/.searchfuse/config.json`(0600 权限,展示时打码):
|
|
72
|
+
|
|
73
|
+
| 引擎 | 能做什么 | 免费额度 | 怎么开 |
|
|
74
|
+
| :-- | :-- | :-- | :-- |
|
|
75
|
+
| Firecrawl(默认) | 网页搜索 + 单页抓取 | 免注册每月 1,000 免费 credits。注册免费 key 再得独享的每月 1,000 | 无需任何操作,装完即用 |
|
|
76
|
+
| Keenable | 网页搜索 | 免注册每小时 1,000 次(按 IP 计,同一 IP 上所有人共用)。注册免费 key 得独享的每月 100,000 次 | 无需任何操作,装完即用 |
|
|
77
|
+
| AnySearch | 网页搜索 | 免注册匿名额度,按 IP 限流。免费 key 解开限流;key 被拒时自动降级回匿名档 | 无需任何操作,装完即用 |
|
|
78
|
+
| You.com | 网页搜索 | 免注册每天 100 次(按 IP 计,同一 IP 上所有人共用) | 无需任何操作,装完即用 |
|
|
79
|
+
| SearXNG | 网页搜索(它自己那 70+ 上游引擎,全部经一个适配器) | 免费,默认用随包实例 | 无需任何操作,装完即用。想连自己的实例:`searchfuse config set searxng.baseURL <url>` |
|
|
80
|
+
| Tavily | 网页搜索 | 每月 1,000 credits,不绑卡 | `searchfuse config set tavily.apiKey <key>` |
|
|
81
|
+
| Exa | 网页搜索 | 每月 $10 循环额度(约 1,400 次),不绑卡 | `searchfuse config set exa.apiKey <key>` |
|
|
82
|
+
| Antigravity CLI | 网页搜索 + 单页抓取 | 免费,浏览器登录 | 默认关闭:安装 `agy` 并登录,再 `searchfuse config set engines.antigravity-cli.enabled true` |
|
|
83
|
+
| Grok Build | X(推特)搜索 | 随 SuperGrok 或 X Premium 订阅 | 安装 `grok` 并登录 |
|
|
84
|
+
| local | 单页抓取 | 内置,零安装 | 无需任何操作 |
|
|
85
|
+
|
|
86
|
+
key 也可以走环境变量(`TAVILY_API_KEY`、`EXA_API_KEY`、`FIRECRAWL_API_KEY`、`KEENABLE_API_KEY`、`ANYSEARCH_API_KEY`)。同一引擎可在配置文件或环境变量中写入逗号分隔的多个 key,例如 `key-one,key-two`。配了多个引擎时它们会一起跑并融合结果。每个引擎默认都参与,但 `antigravity-cli` 例外——它要你用 `searchfuse config set engines.antigravity-cli.enabled true` 打开才生效,因为它慢到超出融合预算。任何引擎都可以用 `searchfuse config set <engine>.enabled false` 排除。想用 Tavily、Exa、Firecrawl、Keenable、AnySearch 兼容的第三方或自建端点?把引擎指过去即可:`searchfuse config set tavily.baseURL <url>`。官方地址始终内置在代码里,不会作为默认配置写入文件。每个引擎的全部配置项见[配置指南](skills/searchfuse/references/configure.md)。
|
|
87
|
+
|
|
88
|
+
## 安装
|
|
89
|
+
|
|
90
|
+
**第一步,交给你的 AI。** skill 一装好,搜索和单页抓取就跑在 Firecrawl 的免注册免费额度上,所以安装只是一句话:
|
|
91
|
+
|
|
92
|
+
> 按 https://github.com/Wenaixi/searchfuse 的 INSTALL.md 安装并配置 searchfuse skill,完成后运行体检并把结果告诉我。
|
|
93
|
+
|
|
94
|
+
DeepSeek Harness (dsh) 里发同一句话即可。INSTALL.md 会认出 dsh,改走原生插件而不是 skill,让 dsh 自带的 `web_search` 直接跑在 searchfuse 上。浏览器版由 AI 直接装好。桌面版只接受从自己窗口里装插件,AI 会请你打开「插件」,点「添加插件」,填 `@wenaixi/searchfuse`。
|
|
95
|
+
|
|
96
|
+
也可以直接通过 [skills.sh](https://skills.sh/) 安装同一个 skill:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx skills add Wenaixi/searchfuse
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**第二步(可选),再加免费引擎。** Antigravity CLI 的综述质量更高,Tavily、Exa 或免费 Firecrawl key 能在免注册额度之上再加一份个人额度,都不要求绑卡。只有 agy 的浏览器登录需要你亲手完成:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
curl -fsSL https://antigravity.google/cli/install.sh | bash
|
|
106
|
+
agy # 浏览器完成登录后退出
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
选了 key 的话,发一句话给 AI 即可:「把我的 tavily key 设成 tvly-...」。
|
|
110
|
+
|
|
111
|
+
dsh 用户还有一条不碰命令行的路。在 dsh 侧栏点开「插件」,进入 `@wenaixi/searchfuse`:选首选引擎、填 API 密钥和自建接口地址、勾选哪些引擎参与故障转移,点保存就生效。0.1.6-alpha.2 之前的 dsh 版本里,同一张卡片在设置页的「插件 → 插件配置」里。
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
## 用法
|
|
116
|
+
|
|
117
|
+
装好之后不需要记任何命令。正常聊天,提出需要查证的问题或给出一个链接,skill 自动触发:选引擎、跑搜索或抓取,答案带着来源回来。
|
|
118
|
+
|
|
119
|
+
## 文档
|
|
120
|
+
|
|
121
|
+
| 文档 | 适用场景 |
|
|
122
|
+
| :------------------------------------------------------- | :------------------------------------------ |
|
|
123
|
+
| [INSTALL.md](INSTALL.md) | 一步步安装 skill(为 agent 编写) |
|
|
124
|
+
| [CLI 手册](skills/searchfuse/references/cli.md) | skill 所驱动的 CLI:参数、配置与体检 |
|
|
125
|
+
| [故障排查](docs/troubleshooting.md) | 命令报错,查成因和解法 |
|
|
126
|
+
| [配置手册](skills/searchfuse/references/configure.md) | 配置 key、切换引擎、排查配置 |
|
|
127
|
+
| [输出契约](skills/searchfuse/references/output-schema.md) | 解析 JSON 或构建下游工具 |
|
|
128
|
+
| [SearXNG 搭建](docs/searxng-setup.md) | 自建实例,用它够到 Google 的索引 |
|
|
129
|
+
| [dsh 插件](docs/dsh.md) | 安装、配置、验证与更新原生 dsh bundle |
|
|
130
|
+
| [宿主接入](docs/harness-setup.md) | 在 Codex、Claude Code、OpenCode、Pi 中配置 |
|
|
131
|
+
| [安全说明](docs/security.md) | SSRF 防护、DNS 重绑定防护、不可信输入的处理 |
|
|
132
|
+
| [测试指南](docs/testing.md) | 跑测试套件,或写一条会失败的测试 |
|
|
133
|
+
| [更新日志](CHANGELOG.md) | 查询版本变更 |
|
|
134
|
+
|
|
135
|
+
Clash、Clash Verge Rev、mihomo、Surge 的代理 fake-ip 模式开箱即用:DNS 返回的 `198.18.0.0/15` 地址会被视为 fake-ip 占位值,不用开任何开关。URL 中直写的 `http://198.18.0.5/` 这类地址在 `allowPrivateNetwork` 关闭时仍会被拦。VPN 用的其它保留段,或 Steam++ / Watt Toolkit 这类 hosts 文件加速器,见[私有网络目标被拦](docs/troubleshooting.md#私有网络目标被拦)。
|
|
136
|
+
|
|
137
|
+
## 参与方式
|
|
138
|
+
|
|
139
|
+
本仓库不接受 PR。项目由作者独立维护,所有代码经作者本人审阅,这是它可靠性的前提。两种有效的参与方式:
|
|
140
|
+
|
|
141
|
+
- **[提交 issue](https://github.com/Wenaixi/searchfuse/issues)。** bug、建议、难以理解的报错或文档都欢迎。issue 会被认真阅读,并影响后续开发方向。
|
|
142
|
+
- **Fork。** MIT 协议下你的副本完全归你,修改和发布不受限制。
|
|
143
|
+
|
|
144
|
+
## 插入硬广一条
|
|
145
|
+
|
|
146
|
+
关注微信公众号「liustack」:AI 工具、实践与想法,第一时间推送。微信扫码,或搜一搜「liustack」:
|
|
147
|
+
|
|
148
|
+
<p align="center">
|
|
149
|
+
<img src="https://raw.githubusercontent.com/Wenaixi/searchfuse/main/assets/wechat-qrcode.png" width="420" alt="微信公众号 liustack" />
|
|
150
|
+
</p>
|
|
151
|
+
|
|
152
|
+
如果它对你有用,请给 [SearchFuse](https://github.com/Wenaixi/searchfuse) 一个 star,这是其他开发者找到它的方式。
|
|
153
|
+
|
|
154
|
+
## Star History
|
|
155
|
+
|
|
156
|
+
<a href="https://www.star-history.com/?repos=Wenaixi%2Fsearchfuse&type=date&legend=top-left">
|
|
157
|
+
<picture>
|
|
158
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&theme=dark&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
159
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
160
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Wenaixi/searchfuse&type=date&legend=top-left&sealed_token=ymc92zQxHuDgpexZjaqDbEhMCuCjGHskpQGkzkwwrU0FksWoq5MasrMA64y9G2CxNV9O3EFeRjKneWSDYmHH4HWjpUiaAme0haCp-1Y72cRmHDv8coW35A" />
|
|
161
|
+
</picture>
|
|
162
|
+
</a>
|
|
163
|
+
|
|
164
|
+
## 免责声明
|
|
165
|
+
|
|
166
|
+
SearchFuse 以 MIT 许可发布,使用不受限制。作者不对任何用途(含商业使用)提供保证与背书。上游引擎(Antigravity CLI、Tavily、Exa、Firecrawl、Keenable、You.com、Grok Build)各有自己的条款与额度,遵守这些约束由使用者负责。
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please do not open a public issue for a security problem.
|
|
6
|
+
|
|
7
|
+
Report it privately through GitHub Security Advisories: go to the repository's
|
|
8
|
+
**Security** tab and choose **Report a vulnerability**. That opens a private
|
|
9
|
+
channel with the maintainers. We aim to acknowledge a report within a few days.
|
|
10
|
+
|
|
11
|
+
Helpful things to include: the affected version (`searchfuse --version`), the URL
|
|
12
|
+
or input that triggers it, and the smallest reproduction you can manage.
|
|
13
|
+
|
|
14
|
+
## Scope
|
|
15
|
+
|
|
16
|
+
The most sensitive surface is the local `http` fetch engine, which makes requests
|
|
17
|
+
to URLs an agent may have pulled from untrusted page content. Its SSRF guards,
|
|
18
|
+
the one known DNS-rebinding gap, and how untrusted content is handled are
|
|
19
|
+
documented in [docs/security.md](docs/security.md). Read that first: a report
|
|
20
|
+
about the already-documented rebinding window is not a new finding.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "searchfuse",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "多引擎聚合搜索,替换 Claude Code 原生 WebSearch。免 key 开箱即用(anysearch 默认),可选聚合 tavily/exa/keenable/youcom/searxng。",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Wenaixi"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/Wenaixi/searchfuse",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mod",
|
|
12
|
+
"function-hooks",
|
|
13
|
+
"websearch",
|
|
14
|
+
"search",
|
|
15
|
+
"aggregate"
|
|
16
|
+
]
|
|
17
|
+
}
|
package/claude/SKILL.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: searchfuse-mod
|
|
3
|
+
description: 用 searchfuse 的聚合搜索替换 Claude Code 原生 WebSearch,并补上 x_search 与 read_page。免 key 开箱即用,多引擎并发后按倒数排名融合。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# searchfuse-mod
|
|
7
|
+
|
|
8
|
+
这个目录同时是一个 Claude Code mod 的载体。mod 本体是
|
|
9
|
+
`hooks/register.ts`,它做三件事:
|
|
10
|
+
|
|
11
|
+
- 在 `tool.call` 上接管内置 `WebSearch`,用 searchfuse 的聚合结果回答;
|
|
12
|
+
任何一步失败都交回宿主原生实现,不让用户因为插件坏了而失去搜索。
|
|
13
|
+
- 在 `session.start` 上注册 `x_search` 与 `read_page` 两个工具,
|
|
14
|
+
全名会被宿主补成 `mcp__searchfuse__x_search` / `mcp__searchfuse__read_page`。
|
|
15
|
+
- 读 `~/.claude/settings.json` 的 `searchfuseHosts`,拿运行时的
|
|
16
|
+
`runtime.json` 与 `dist/kernel.js` 两条绝对路径(mod 沙箱里 `~` 不展开)。
|
|
17
|
+
|
|
18
|
+
## 为什么放在这里
|
|
19
|
+
|
|
20
|
+
`~/.claude/skills/<name>/` 里的目录会作为 `@skills-dir` 插件被自动加载,
|
|
21
|
+
每个会话都生效,不需要 `--plugin-dir`。这是 mod 的用户级常驻路径。
|
|
22
|
+
|
|
23
|
+
**本目录是唯一真源**:`~/.claude/skills/searchfuse-mod/` 里那份由
|
|
24
|
+
`searchfuse hosts sync` 从这里复制过去。改代码要改这里,不要改装好的那份,
|
|
25
|
+
否则下一次 sync 会把你的改动覆盖掉。
|
|
26
|
+
|
|
27
|
+
## 依赖
|
|
28
|
+
|
|
29
|
+
- 引擎产物在同仓库的 `dist/`:`kernel.js`(搜索)与 `main.js`(CLI)。
|
|
30
|
+
- 共享配置在 `~/.searchfuse/config.json`,与 dsh、omp 共用同一份。
|
|
31
|
+
- 两条绝对路径由 `searchfuse hosts sync` 写进 `settings.json`。
|
|
32
|
+
- mod 优先走 `searchfuse serve --daemon` 写在 `~/.searchfuse/runtime.json`
|
|
33
|
+
的 HTTP 服务,服务不在时退回 spawn `kernel.js`。
|
|
34
|
+
|
|
35
|
+
## 关闭
|
|
36
|
+
|
|
37
|
+
`searchfuseHosts.claudeCode.enabled = false` 即可。`register.ts` 在每次
|
|
38
|
+
`tool.call` 读这个开关,关掉后一律 `next(e)` 交回原生实现,**不需要**
|
|
39
|
+
卸载目录;重新开启也只是改回 `true`。
|
|
40
|
+
|
|
41
|
+
## 排障
|
|
42
|
+
|
|
43
|
+
`claude plugin validate <这个目录>` 会打印读到的 hook 与 `$` 调用清单。
|
|
44
|
+
看不到 `hooks:` 行就说明 `hooks/hooks.json` 的 `modules` 没被识别。
|
|
45
|
+
|
|
46
|
+
确认真的加载了 mod,看 debug 日志里的这一行:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
hooks module searchfuse@skills-dir loaded (worker, environment 1, tier user); events: tool.call,session.start
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
日志必须用 `--debug-file <path>` 生成;`--debug=hooks` 的层级不同,会把
|
|
53
|
+
这一行滤掉,造成「没加载」的假象。
|