@fffangchenghao/dsh-web-search 0.24.5 → 0.24.6
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 +11 -0
- package/README.md +5 -5
- package/README.zh-CN.md +4 -4
- package/client.js +1 -1
- package/docs/comparison.md +1 -1
- package/docs/images/web-tools-demo.svg +1 -1
- package/docs/latency-and-sources.md +1 -1
- package/docs/store-evidence.md +1 -1
- package/lib/engines.js +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.24.6
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **A pre-aborted search no longer resolves a proxy or starts an engine.** The
|
|
7
|
+
public `search()` entry checks the caller signal before `resolveProxy()`, and
|
|
8
|
+
`runTier()` repeats the guard so a cancellation arriving at the tier boundary
|
|
9
|
+
cannot dispatch a request. The regression test stubs `fetch` and asserts it is
|
|
10
|
+
never called.
|
|
11
|
+
|
|
12
|
+
**Test suite: 718 tests across 56 files** (717 pass, 1 skipped).
|
|
13
|
+
|
|
3
14
|
## 0.24.5
|
|
4
15
|
|
|
5
16
|
Completed the delayed GPT-6-astra `xhigh` audit batch: tool registration,
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/@fffangchenghao/dsh-web-search"><img src="https://img.shields.io/npm/v/@fffangchenghao/dsh-web-search.svg" alt="npm version"></a>
|
|
13
|
-
<img src="https://img.shields.io/badge/tests-
|
|
13
|
+
<img src="https://img.shields.io/badge/tests-718%20tests-brightgreen" alt="tests">
|
|
14
14
|
<img src="https://img.shields.io/badge/engines-8%2C%20zero%20API%20key-brightgreen" alt="engines">
|
|
15
15
|
<img src="https://img.shields.io/badge/node-%3E%3D22.18-blue" alt="node">
|
|
16
16
|
<img src="https://img.shields.io/badge/dsh-%3E%3D0.2.1--rc.2%20%3C0.3.0-blueviolet" alt="dsh">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- **Measured in public, including the losses.** A 30-query bilingual comparison records availability, latency, unique domains, official-domain presence and every failure against keyless Firecrawl and anonymous Exa. The follow-up documents the Exa architecture difference, the 3 s CJK budget and the Rust official-source lookup. Exa is faster here; this plugin returns more distinct domains. Both test arms were keyless. The method and raw results are in [docs/comparison.md](docs/comparison.md) and a [public gist](https://gist.github.com/fangchenghao/3db9838fa98928435c1c2df38202c373).
|
|
29
29
|
- **Fetching admits failure.** Binary documents and empty 200 responses are rejected by name (`SEARCH_UNSUPPORTED`, `SEARCH_EMPTY`) instead of being returned as noise; arXiv PDF links are the deliberate exception and are read through the HTML full-text view; the direct → tunnel → render → extract ladder shares one 25 s budget and stops when there is no time left. The budget is per request — there is a regression test for exactly that.
|
|
30
30
|
- **Windows is a first-class host.** Pure ESM, no native addon or install script; the system proxy is discovered from Windows Internet Settings, and the full suite runs on a `windows-latest` CI runner. See [Install on Windows](#windows).
|
|
31
|
-
- **
|
|
31
|
+
- **718 tests across 56 files**, a committed `lib/`, declared `engines.dsh` / `engines.node`, and a [SECURITY.md](SECURITY.md) that lists every process, host and file the plugin touches.
|
|
32
32
|
- **Bilingual documentation.** This README and [中文说明](README.zh-CN.md) are maintained side by side.
|
|
33
33
|
|
|
34
34
|

|
|
@@ -45,7 +45,7 @@ The web-search corner of the DSH plugin ecosystem is crowded. A dated snapshot
|
|
|
45
45
|
| Key-free path | 8 engines, all key-free | ~30-engine free/paid chain | 5 defaults (seam, Exa, DDG, Bing, Jina) | Firecrawl + Keenable keyless defaults | 1 anonymous AnySearch API |
|
|
46
46
|
| Dedicated vertical sources | 34 (8 on by default) | 41 | platform registry, not a vertical catalog | web + X, no vertical catalog | vertical API behind AnySearch |
|
|
47
47
|
| Model-facing tools | 1 (`web_tools`, 8 actions) + 4 MCP tools | ~10 | 2 (`web_index` / `web_call`, 20 actions) | native search/fetch + skill | 5 |
|
|
48
|
-
| Tests | 56 files /
|
|
48
|
+
| Tests | 56 files / 718 cases, locally verified | no test script in `package.json` | 774 unit + 94 bench, self-reported | Vitest configured; count not published | Vitest configured; count not published |
|
|
49
49
|
| GitHub stars | 0 | 620 | 77 | 836 | 663 |
|
|
50
50
|
| npm downloads, last month | 1,087 | 52,436 | 6,420 | 43,151 | 9,251 |
|
|
51
51
|
| npm unpacked size | 1.2 MB | 0.70 MB | 3.05 MB | 0.51 MB | 0.27 MB |
|
|
@@ -56,7 +56,7 @@ read is:
|
|
|
56
56
|
- **Feature depth:** upper-middle. `dsh-free-search` has more engines and
|
|
57
57
|
verticals; `dsh-web-search-pro` has a deeper evidence/ranking pipeline and far
|
|
58
58
|
more platform backends; `modsearch` is the stronger cross-host bridge.
|
|
59
|
-
- **Engineering and verification:** near the top.
|
|
59
|
+
- **Engineering and verification:** near the top. 718 local tests, a replayable
|
|
60
60
|
ranking benchmark, declared security boundaries and one runtime dependency
|
|
61
61
|
put it alongside the best-maintained entries, while remaining much smaller
|
|
62
62
|
than the Playwright-heavy option.
|
|
@@ -65,7 +65,7 @@ read is:
|
|
|
65
65
|
common in the other plugins.
|
|
66
66
|
- **Adoption and maturity:** bottom third of this sample. At the 2026-10-25
|
|
67
67
|
snapshot the repository was four days old, had no stars and little
|
|
68
|
-
independent adoption; the current npm release is 0.24.
|
|
68
|
+
independent adoption; the current npm release is 0.24.6.
|
|
69
69
|
- **Tool-surface economy:** now competitive. 0.20.x exposes one `web_tools`
|
|
70
70
|
entry with eight actions, close to `dsh-web-search-pro`'s two tools with 20
|
|
71
71
|
actions; the legacy eight-name surface remains opt-in for old prompts.
|
package/README.zh-CN.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
11
|
<a href="https://www.npmjs.com/package/@fffangchenghao/dsh-web-search"><img src="https://img.shields.io/npm/v/@fffangchenghao/dsh-web-search.svg" alt="npm 版本"></a>
|
|
12
|
-
<img src="https://img.shields.io/badge/tests-
|
|
12
|
+
<img src="https://img.shields.io/badge/tests-718%20tests-brightgreen" alt="测试">
|
|
13
13
|
<img src="https://img.shields.io/badge/engines-8%2C%20zero%20API%20key-brightgreen" alt="引擎">
|
|
14
14
|
<img src="https://img.shields.io/badge/node-%3E%3D22.18-blue" alt="node">
|
|
15
15
|
<img src="https://img.shields.io/badge/dsh-%3E%3D0.2.1--rc.2%20%3C0.3.0-blueviolet" alt="dsh">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
- **公开测量,也公开输的地方。** 30 条中英查询对比记录可用性、延迟、独立域名、官方域名命中与每一条失败;对比对象是免 key Firecrawl 和匿名 Exa。这里 Exa 更快,本插件返回的独立域名更多;两条对比路径都未使用 key。方法和原始结果在 [docs/comparison.md](docs/comparison.md);Exa 架构差异、中文 3 秒预算和 Rust 官方源见 [延迟与官方源](docs/latency-and-sources.md)。
|
|
28
28
|
- **抓取会承认失败。** 二进制文档和「200 但正文为空」会被明确拒绝(`SEARCH_UNSUPPORTED`、`SEARCH_EMPTY`),而不是当噪音返回;arXiv 的 PDF 链接是有意保留的例外,会改读 HTML 全文;direct → tunnel → render → extract 四级阶梯共享 25 秒预算,预算不足就不再起新的一级。预算是「每次请求」而不是「插件启动时」,这点有回归测试守着。
|
|
29
29
|
- **Windows 是一等宿主。** 纯 ESM,没有原生扩展或安装脚本;会自动读取 Windows 的 Internet 设置代理,完整测试套件也在 `windows-latest` CI 上跑通。安装见[Windows 小节](#windows)。
|
|
30
|
-
- **56 个测试文件、
|
|
30
|
+
- **56 个测试文件、718 个用例**,`lib/` 产物入库,声明了 `engines.dsh` / `engines.node`,[SECURITY.md](SECURITY.md) 逐项列出插件会碰的进程、主机和文件。
|
|
31
31
|
- **双语文档。** 本文件和 [English README](README.md) 同步维护。
|
|
32
32
|
|
|
33
33
|

|
|
@@ -54,11 +54,11 @@ DSH 插件生态里的「联网搜索」已经很挤。下面是一张 2026-10-2
|
|
|
54
54
|
- **功能深度:中上。** `dsh-free-search` 引擎和垂直源更多;
|
|
55
55
|
`dsh-web-search-pro` 的证据/排序管线和平台后端更深;`modsearch` 的跨宿主
|
|
56
56
|
能力更强。
|
|
57
|
-
- **工程质量与可验证性:接近第一梯队。**
|
|
57
|
+
- **工程质量与可验证性:接近第一梯队。** 718 个本地测试、可重放的排序基准、
|
|
58
58
|
明确的安全边界、只有 1 个运行时依赖,同时体积远小于 Playwright 重型方案。
|
|
59
59
|
- **免 key + 官方源纠错:最强卖点。** Chrome、PostgreSQL、AI Act 的官方路径
|
|
60
60
|
和 34 个垂直源,不是其他插件普遍具备的。
|
|
61
|
-
- **采用度与成熟度:这个样本里的后段。** 2026-10-25 快照时 GitHub 仓库刚创建 4 天、0 stars,还缺少独立采用;当前 npm 版本是 0.24.
|
|
61
|
+
- **采用度与成熟度:这个样本里的后段。** 2026-10-25 快照时 GitHub 仓库刚创建 4 天、0 stars,还缺少独立采用;当前 npm 版本是 0.24.6。
|
|
62
62
|
- **工具面的经济性:现在有竞争力。** 0.20.x 只暴露一个 `web_tools` + 8 个
|
|
63
63
|
action,接近 `dsh-web-search-pro` 的 2 工具 + 20 动作;旧的八个工具名保留为
|
|
64
64
|
可选兼容模式。
|
package/client.js
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
var ENTRY = 'web-search-bing';
|
|
75
75
|
var PACKAGE_NAME = 'dsh-web-search-bing';
|
|
76
76
|
/** Keep in step with package.json; compared with the npm registry. */
|
|
77
|
-
var VERSION = '0.24.
|
|
77
|
+
var VERSION = '0.24.6';
|
|
78
78
|
/** Snapshot used while no configuration service is reachable. */
|
|
79
79
|
var EMPTY_STATE = { status: 'unavailable', value: undefined, base: undefined, user: undefined, revision: undefined, writable: false };
|
|
80
80
|
|
package/docs/comparison.md
CHANGED
|
@@ -6,7 +6,7 @@ whether a provider answers at all, how long it takes, how many distinct domains
|
|
|
6
6
|
it returns, and whether a page on a known official domain appears in the top 8.
|
|
7
7
|
The failures are part of the result.
|
|
8
8
|
|
|
9
|
-
> **Version note (2026-11-02):** 0.24.0 added Windows system-proxy discovery, and 0.24.1 and 0.24.2 are documentation/metadata patches; 0.24.3–0.24.
|
|
9
|
+
> **Version note (2026-11-02):** 0.24.0 added Windows system-proxy discovery, and 0.24.1 and 0.24.2 are documentation/metadata patches; 0.24.3–0.24.6 fix fetch/proxy/markdown/cache/tool reliability without changing the measured search path. These patches do not change the search, ranking or source-adapter path measured below, so the 0.23.0 numbers remain the latest comparison.
|
|
10
10
|
|
|
11
11
|
## Method
|
|
12
12
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<rect x="70" y="620" width="330" height="76" rx="14" fill="#101d31" stroke="#26364f"/>
|
|
53
53
|
<text x="92" y="651" class="m" font-size="13">Engines</text><text x="92" y="677" class="t" font-size="20" font-weight="700">8 key-free paths</text>
|
|
54
54
|
<rect x="420" y="620" width="330" height="76" rx="14" fill="#101d31" stroke="#26364f"/>
|
|
55
|
-
<text x="442" y="651" class="m" font-size="13">Tests</text><text x="442" y="677" class="t" font-size="20" font-weight="700">
|
|
55
|
+
<text x="442" y="651" class="m" font-size="13">Tests</text><text x="442" y="677" class="t" font-size="20" font-weight="700">718 local cases</text>
|
|
56
56
|
<rect x="770" y="620" width="360" height="76" rx="14" fill="#101d31" stroke="#26364f"/>
|
|
57
57
|
<text x="792" y="651" class="m" font-size="13">Cross-agent</text><text x="792" y="677" class="t" font-size="20" font-weight="700">MCP stdio server</text>
|
|
58
58
|
</g>
|
|
@@ -6,7 +6,7 @@ This note answers three questions from the public 30-query comparison:
|
|
|
6
6
|
2. Can the AnySearch tail and the Chinese Rust miss be fixed?
|
|
7
7
|
3. Does the fix require a vector database or a different retrieval model?
|
|
8
8
|
|
|
9
|
-
> **Version note (2026-11-02):** 0.24.0 added Windows system-proxy discovery, and 0.24.1 and 0.24.2 are documentation/metadata patches; 0.24.3–0.24.
|
|
9
|
+
> **Version note (2026-11-02):** 0.24.0 added Windows system-proxy discovery, and 0.24.1 and 0.24.2 are documentation/metadata patches; 0.24.3–0.24.6 fix fetch/proxy/markdown/cache/tool reliability without changing the measured search path. The search path is unchanged, so these 0.23.0 measurements still describe 0.24.x.
|
|
10
10
|
|
|
11
11
|
The short answer: Exa is a different architecture, not a faster RRF loop. This
|
|
12
12
|
plugin can borrow tail-tolerance and source-specific facts, but copying Exa's
|
package/docs/store-evidence.md
CHANGED
|
@@ -29,7 +29,7 @@ Only `0.2.1-rc.2` is declared, because that is the version actually exercised.
|
|
|
29
29
|
`mktemp -d`; the real `~/.dsh` was never written to. Bundled pnpm 11.28.5.
|
|
30
30
|
- **Windows CI:** GitHub Actions `windows-latest`, Node 24. Install, typecheck,
|
|
31
31
|
the full test suite, build and the entry-point import all pass. Run:
|
|
32
|
-
https://github.com/fangchenghao/dsh-web-search/actions/runs/
|
|
32
|
+
https://github.com/fangchenghao/dsh-web-search/actions/runs/44269396173
|
|
33
33
|
(the matrix also runs on macOS and Ubuntu). This is a CI environment, not a
|
|
34
34
|
claim about every Windows terminal or proxy client.
|
|
35
35
|
|
package/lib/engines.js
CHANGED
|
@@ -326,6 +326,10 @@ async function runTier(hosts, query, signal, timeoutMs, failures, failureDetails
|
|
|
326
326
|
const counters = limits.lead === 'all' || !hosts.some((host) => leadsQuery(host, limits.lead))
|
|
327
327
|
? () => true
|
|
328
328
|
: (host) => leadsQuery(host, limits.lead);
|
|
329
|
+
if (isAborted(signal)) {
|
|
330
|
+
const reason = signal?.reason;
|
|
331
|
+
throw reason instanceof Error ? reason : new SearchError('web search was cancelled', 'SEARCH_ABORTED', false);
|
|
332
|
+
}
|
|
329
333
|
const controller = new AbortController();
|
|
330
334
|
const relayAbort = () => controller.abort();
|
|
331
335
|
signal?.addEventListener('abort', relayAbort, { once: true });
|
|
@@ -418,6 +422,10 @@ async function runTier(hosts, query, signal, timeoutMs, failures, failureDetails
|
|
|
418
422
|
}
|
|
419
423
|
return answers;
|
|
420
424
|
}
|
|
425
|
+
/** Read an abort flag without TypeScript assuming it cannot change after a throw. */
|
|
426
|
+
function isAborted(signal) {
|
|
427
|
+
return signal !== undefined && signal.aborted;
|
|
428
|
+
}
|
|
421
429
|
/**
|
|
422
430
|
* Search the web with every configured engine and fuse the answers.
|
|
423
431
|
* @param query - the user query.
|
|
@@ -470,6 +478,8 @@ export async function search(query, signal, options) {
|
|
|
470
478
|
if (typeof query !== 'string' || query.trim().length === 0) {
|
|
471
479
|
throw new SearchError('the search query is empty', 'SEARCH_INVALID', false);
|
|
472
480
|
}
|
|
481
|
+
if (isAborted(signal))
|
|
482
|
+
throw new SearchError('web search was cancelled', 'SEARCH_ABORTED', false);
|
|
473
483
|
const limit = Math.max(1, Math.min(options.limit, 20));
|
|
474
484
|
const timeoutMs = options.timeoutMs ?? 15000;
|
|
475
485
|
const wait = options.wait ?? 'auto';
|
|
@@ -590,7 +600,7 @@ export async function search(query, signal, options) {
|
|
|
590
600
|
note = `fallback skipped: ${blockedKind} is not enabled in fallbackOn.`;
|
|
591
601
|
}
|
|
592
602
|
}
|
|
593
|
-
if (signal
|
|
603
|
+
if (isAborted(signal))
|
|
594
604
|
throw new SearchError('web search was cancelled', 'SEARCH_ABORTED', false);
|
|
595
605
|
sources = removeBlocked(sources, blocked);
|
|
596
606
|
if (key !== undefined && sources.length > 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fffangchenghao/dsh-web-search",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.6",
|
|
4
4
|
"description": "DSH bundle: key-free web search, page fetch and research for DeepSeek Harness; eight engines fused with RRF, 34 vertical sources, arXiv, Windows/macOS system-proxy support and a dependency-free MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|