dsh-free-search 0.9.16 → 0.9.17
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/README.md +4 -2
- package/lib/client.js +1 -1
- package/lib/index.js +6 -3
- package/lib/vertical.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -496,7 +496,7 @@ Search engine test:
|
|
|
496
496
|
|
|
497
497
|
#### 离线自检断言(tools/)
|
|
498
498
|
|
|
499
|
-
仓库自带 **
|
|
499
|
+
仓库自带 **27 个**零依赖断言脚本(合计 **592 项**),**不需要 API key、不联网、不需要测试框架**,Node ≥ 20 即可跑:
|
|
500
500
|
|
|
501
501
|
| 脚本 | 覆盖 | 运行(项数) |
|
|
502
502
|
|---|---|---|
|
|
@@ -519,6 +519,7 @@ Search engine test:
|
|
|
519
519
|
| `assert-output-language.mjs` | 语言分支(#92):`searchLanguage` 支持 zh/en/ja/ru/de/es/fr/ko 其余回退 en、`outputLanguage` 只输出 zh/en、天气文案 zh/en/ja(其它回退英文,含 WMO 描述与正文)、置信度说明随语言、失败备注随语言 | `node tools/assert-output-language.mjs`(10) |
|
|
520
520
|
| `assert-uncertainty.mjs` | 输出契约:0/1 源为 low、2 源与同站为 medium、3 个不同域为 high、时间过滤无日期、失败备注、聚合站提示 | `node tools/assert-uncertainty.mjs`(8) |
|
|
521
521
|
| `assert-youcom.mjs` | You.com 免 key 档(#90):两档 URL 与请求头、无 key 不发 `X-API-Key`、`YDC_API_KEY` 别名、429/401/402/5xx 分类 | `node tools/assert-youcom.mjs`(23) |
|
|
522
|
+
| `assert-tool-schema-size.mjs` | 工具 schema 体积(#94):共享引擎 id 常量、`domain_search` 不内嵌逐引擎句子、三处合计 < 1.6k 字符 | `node tools/assert-tool-schema-size.mjs`(5) |
|
|
522
523
|
| `assert-degoog.mjs` | degoog 自建实例(#85):`/api/search` URL 规范化、查询编码、`time`/`lang` 参数、注册表位置、无需凭据 | `node tools/assert-degoog.mjs`(7) |
|
|
523
524
|
| `assert-multikey.mjs` | 多 key 字段:单 key 不变、逗号/分号/换行分隔、空白项丢弃、空输入为空数组 | `node tools/assert-multikey.mjs`(3) |
|
|
524
525
|
| `assert-firecrawl-keyless.mjs` | Firecrawl keyless 出口判定:403 + VPN/proxy 文案才算拒绝、普通 403 与 401/429/500 不算、冷却初始未触发 | `node tools/assert-firecrawl-keyless.mjs`(5) |
|
|
@@ -1042,7 +1043,7 @@ Restart `dsh web` after switching to apply changes.
|
|
|
1042
1043
|
|
|
1043
1044
|
#### Offline self-check assertions (`tools/`)
|
|
1044
1045
|
|
|
1045
|
-
**Twenty-
|
|
1046
|
+
**Twenty-seven** zero-dependency assertion scripts ship with the repo (**592 assertions** total): **no API keys, no network, no test framework**, Node ≥ 20:
|
|
1046
1047
|
|
|
1047
1048
|
| Script | Covers | Run (count) |
|
|
1048
1049
|
|---|---|---|
|
|
@@ -1065,6 +1066,7 @@ Restart `dsh web` after switching to apply changes.
|
|
|
1065
1066
|
| `assert-output-language.mjs` | language branches (#92): `searchLanguage` passes zh/en/ja/ru/de/es/fr/ko through and falls back to en, `outputLanguage` only returns zh/en, weather text has zh/en/ja (WMO descriptions and body; others fall back to English), and both confidence and failure notes follow the language | `node tools/assert-output-language.mjs` (10) |
|
|
1066
1067
|
| `assert-uncertainty.mjs` | output contract: 0/1 source is low, two sources or a single site is medium, three distinct domains is high, time filter without dates, failure notes, aggregator caveat | `node tools/assert-uncertainty.mjs` (8) |
|
|
1067
1068
|
| `assert-youcom.mjs` | You.com keyless tier (#90): both URLs and headers, no `X-API-Key` without a key, the `YDC_API_KEY` alias, and 429/401/402/5xx classification | `node tools/assert-youcom.mjs` (23) |
|
|
1069
|
+
| `assert-tool-schema-size.mjs` | Tool schema budget (#94): one shared engine-id constant, no per-engine sentences in `domain_search`, the three schemas under 1.6k chars combined | `node tools/assert-tool-schema-size.mjs` (5) |
|
|
1068
1070
|
| `assert-degoog.mjs` | degoog self-hosted instance (#85): `/api/search` URL normalisation, query encoding, `time`/`lang` parameters, registry placement, no credentials needed | `node tools/assert-degoog.mjs` (7) |
|
|
1069
1071
|
| `assert-multikey.mjs` | multi-key fields: a single key is unchanged, comma/semicolon/newline separate keys, blank entries are dropped, empty input yields none | `node tools/assert-multikey.mjs` (3) |
|
|
1070
1072
|
| `assert-firecrawl-keyless.mjs` | Firecrawl keyless egress refusal: only a 403 with the VPN/proxy wording counts, plain 403 and 401/429/500 do not, and the cooldown starts inactive | `node tools/assert-firecrawl-keyless.mjs` (5) |
|
package/lib/client.js
CHANGED
|
@@ -428,7 +428,7 @@ window.__ModuleLoader__.load({
|
|
|
428
428
|
};
|
|
429
429
|
const tt = (lang) => I18N[String(lang ?? "").trim().toLowerCase() === "zh" ? "zh" : "en"];
|
|
430
430
|
// 当前插件版本(与 lib/index.js 的 PLUGIN_VERSION 保持一致;跟随上游 v0.7.5)
|
|
431
|
-
const PLUGIN_VERSION = "0.9.
|
|
431
|
+
const PLUGIN_VERSION = "0.9.17";
|
|
432
432
|
const PLUGIN_REPO_URL = "https://github.com/DDDMUC/dsh-free-search";
|
|
433
433
|
// 右侧浮动目录(#85):条目顺序即页面顺序,anchor 是页面里对应 field 的 id。
|
|
434
434
|
const NAV_ITEMS = [
|
package/lib/index.js
CHANGED
|
@@ -249,6 +249,9 @@ const logOnce = (log, level, message) => {
|
|
|
249
249
|
const FREE_ENGINES = ["ddg", "ddg-lite", "bing", "searxng", "degoog", "anysearch"];
|
|
250
250
|
const ALL_ENGINES = ["ddg", "ddg-lite", "bing", "searxng", "degoog", "anysearch", "exa", "tavily", "keenable", "firecrawl", "parallel", "perplexity", "serpbase", "serply", "deepseek-official", "deepseek-tools", "you", "baidu", "kimi", "aliyun", "doubao", "tinyfish", "jina", "zhihu_global", "zhihu_site", "openai", "gemini", "claude"];
|
|
251
251
|
|
|
252
|
+
// #94: one shared id list for every tool schema; per-engine sentences stay in code/docs.
|
|
253
|
+
const ENGINE_IDS_PROMPT = ALL_ENGINES.join(", ");
|
|
254
|
+
|
|
252
255
|
// 模型内置搜索(按次计费):只在你显式选中该引擎时使用;自动回退链与 auto 路由都不会兜底到它们。
|
|
253
256
|
const EXPLICIT_ONLY_ENGINES = ["openai", "gemini", "claude"];
|
|
254
257
|
|
|
@@ -402,7 +405,7 @@ function routeEngines(query, { timeRange, disabledEngines = [], fallbackOrder =
|
|
|
402
405
|
}
|
|
403
406
|
|
|
404
407
|
// 当前插件版本(发布时与 package.json 同步;跟随上游 v0.7.5,不在 PR 里 bump)
|
|
405
|
-
const PLUGIN_VERSION = "0.9.
|
|
408
|
+
const PLUGIN_VERSION = "0.9.17";
|
|
406
409
|
// 检查更新的 npm registry 元数据地址(dsh-free-search 是 npmjs 上的公开包)
|
|
407
410
|
const NPM_REGISTRY_URL = "https://registry.npmjs.org/dsh-free-search/latest";
|
|
408
411
|
const PLUGIN_NPM_URL = "https://www.npmjs.com/package/dsh-free-search";
|
|
@@ -5020,7 +5023,7 @@ function apply(ctx, config) {
|
|
|
5020
5023
|
parameters: {
|
|
5021
5024
|
engines: {
|
|
5022
5025
|
type: "array",
|
|
5023
|
-
description:
|
|
5026
|
+
description: `Which engines to test (default: all enabled). ${ENGINE_IDS_PROMPT}; auto/multi run the virtual routing path. zhihu_* need ZHIHU_API_KEY; openai/gemini/claude bill per search.`,
|
|
5024
5027
|
items: { type: "string" },
|
|
5025
5028
|
},
|
|
5026
5029
|
query: {
|
|
@@ -5384,7 +5387,7 @@ function apply(ctx, config) {
|
|
|
5384
5387
|
},
|
|
5385
5388
|
engine: {
|
|
5386
5389
|
type: "string",
|
|
5387
|
-
description:
|
|
5390
|
+
description: `Optional search mode/engine: multi (parallel language-pool merge), auto, or one of ${ENGINE_IDS_PROMPT}. openai/gemini/claude are model-based and explicit-only.`,
|
|
5388
5391
|
},
|
|
5389
5392
|
},
|
|
5390
5393
|
output: {
|
package/lib/vertical.js
CHANGED
|
@@ -664,8 +664,13 @@ export function registerDomainSearchTool(ctx, { wrapUntrustedBlock }) {
|
|
|
664
664
|
defineTool({
|
|
665
665
|
name: "domain_search",
|
|
666
666
|
description:
|
|
667
|
-
"Direct lookup in a vertical source (all keyless public APIs).
|
|
668
|
-
|
|
667
|
+
"Direct lookup in a vertical source (all keyless public APIs). Pick by type: " +
|
|
668
|
+
"packages/versions->pypi, crates, registries, github_releases, huggingface, endoflife; " +
|
|
669
|
+
"papers->arxiv, pubmed, crossref, openalex, s2, europepmc, dblp, zenodo, doaj; " +
|
|
670
|
+
"security->nvd, osv, cisakev; finance->yahoofinance, coingecko, frankfurter, sec_edgar, imf, cfets, cninfo; " +
|
|
671
|
+
"data->worldbank, wikidata, holidays, worldclock, openmeteo, rdap, gleif; " +
|
|
672
|
+
"news->googlenews, gdelt, aihot; legal->federalregister, courtlistener, openlegaldata, uk_legislation; " +
|
|
673
|
+
"zh->so360, sogou.",
|
|
669
674
|
parameters: {
|
|
670
675
|
engine: { type: "string", description: `One of: ${Object.keys(ENGINES).join(", ")}.` },
|
|
671
676
|
query: { type: "string", description: "The lookup query (package name, keyword, owner/repo, product…)." },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-free-search",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Free web search for DeepSeek Harness: 27 engines (Bing/DuckDuckGo/AnySearch/SearXNG/Exa/Tavily/Keenable/Firecrawl/Parallel/You.com keyless; Zhihu global/site via MCP and Perplexity/SerpBase/DeepSeek (official + native tools/search)/Baidu/Kimi/Aliyun/Doubao with key; OpenAI/Gemini/Claude model built-in search, explicit-only) + auto smart routing + global engine enable/disable & fallback priority + editable zh/en language pools + multi mode (parallel full language-pool merge) + multi_search cross-source tool + failure-aware fallback (quota/auth cooldown, transient retry, fallbackOn) + time filtering + platform search + domain blocklist (blockedDomains) + web_fetch, with web settings UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|