dsh-free-search 0.9.83 → 0.9.85
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 +23 -5
- package/lib/client.js +20 -537
- package/lib/engines/deepseek-tools.js +28 -4
- package/lib/index.js +40 -133
- package/lib/mcp_engines.js +1 -1
- package/lib/mcp_server.js +15 -2
- package/package.json +3 -8
- package/lib/activity.js +0 -341
package/README.md
CHANGED
|
@@ -257,6 +257,16 @@ dsh web
|
|
|
257
257
|
Error: configured web provider "ddg" is not registered
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
+
**已经卸掉了、忘了删?** 插件不在也能修——新增的 `restore` 命令直接改配置文件,不加载插件:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
npx dsh-free-search restore # 所有 profile
|
|
264
|
+
npx dsh-free-search restore --profile web # 只清一个
|
|
265
|
+
npx dsh-free-search restore --dry-run # 只看会改什么,不写
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
它只删本插件自己写进去的两个值(`searchProvider: ddg`、`fetchProvider: fs-quality-fetch`);你自己显式选的 provider 不动;删完只剩 `id` + `name` 的行整行去掉;注释、顺序、引号风格和 CRLF 都保留;写入前先备份成 `*.bak-before-free-search-restore`。改完重启 `dsh` 让 web 服务重建。
|
|
269
|
+
|
|
260
270
|
更早的 DSH(0.1.x)由 patch 静态覆盖 config,不需要也更不该手写这段,这里不再赘述。
|
|
261
271
|
|
|
262
272
|
#### DSH 的「DeepSeek 搜索 API」开关
|
|
@@ -642,7 +652,7 @@ npx -y -p dsh-free-search dsh-free-search-mcp
|
|
|
642
652
|
|
|
643
653
|
#### 离线自检断言(tools/)
|
|
644
654
|
|
|
645
|
-
仓库自带 **
|
|
655
|
+
仓库自带 **106 个**零依赖断言脚本(合计 **1345 项**)
|
|
646
656
|
|
|
647
657
|
| 脚本 | 覆盖 | 运行(项数) |
|
|
648
658
|
|---|---|---|
|
|
@@ -660,6 +670,7 @@ npx -y -p dsh-free-search dsh-free-search-mcp
|
|
|
660
670
|
| `assert-keyless-first.mjs` | 免 key 优先:`keylessFirst` 默认关、开启后先走免 key 档,限流/鉴权/网络失败改用 key 并休息、其他失败不动用 key、无 key 行为不变,覆盖 Tavily、Exa 与 multi 模式 | `node tools/assert-keyless-first.mjs`(13) |
|
|
661
671
|
| `assert-zhipu.mjs` | 智谱搜索:catalog/回退链、请求头与 engine/count/recency、Sogou 步进、响应映射、错误分类、无 key | `node tools/assert-zhipu.mjs`(6) |
|
|
662
672
|
| `assert-deepseek-snippets.mjs` | deepseek-tools 摘要:默认 600、0 不截断、总预算上限、短条目保留 | `node tools/assert-deepseek-snippets.mjs`(5) |
|
|
673
|
+
| `assert-deepseek-quality.mjs` | deepseek-tools 质量信号(#165):`rerank_score`/`authority` 透传为 `score`/`authority`、官方 `site_name` 与兼容网关的 `site` 都认、`authority = -1`(未知)保留、缺失评分与 0 分可区分、`minScore` 默认不过滤、按分数裁在去重之后与条数之前、过滤到空时给出说明、空响应不产生说明、配置项与两处调用接线、设置页钳制到 0~3、工具 schema 同步声明新字段(`additionalProperties:false` 否则判非法)、合并保持字段、MCP 侧读环境变量、两处渲染都收成两位小数 | `node tools/assert-deepseek-quality.mjs`(16) |
|
|
663
674
|
| `assert-deepseek-official.mjs` | DeepSeek Official:Anthropic Messages + deepseek_web_search、title/snippet/site_name/page_age 映射、citation 回退、源码守卫 | `node tools/assert-deepseek-official.mjs`(4) |
|
|
664
675
|
| `assert-bing-relevance.mjs` | Bing 相关性(#112):单字中文 token 被剔除、无关替代 SERP 被拒、真正相关的结果通过、只命中通用引擎名的整批被拒、单一 token 覆盖一半时放行、单字/纯数字查询的显式行为 | `node tools/assert-bing-relevance.mjs`(6) |
|
|
665
676
|
| `assert-relevance-pools.mjs` | 相关性守卫与语言池(#132/#133):AnySearch 无关批次判空、相关批次保留、shared.js 守卫被 anysearch/searxng/ddg/ddg-lite/degoog/keenable 使用、doctor 地区默认文案与语言池告警、缓存 key 随 zhPool/enPool 变化 | `node tools/assert-relevance-pools.mjs`(5) |
|
|
@@ -682,9 +693,6 @@ npx -y -p dsh-free-search dsh-free-search-mcp
|
|
|
682
693
|
| `assert-serper.mjs` | Serper.dev 引擎(#157):端点常量、`X-API-KEY` 鉴权(非 Bearer)、`num` 上限 100、`tbs` 时间语法(含绝对日期 `cd_min`)、`organic` 映射、401/403/429 错误分类、缺 key 快速失败、catalog 与 MCP/设置页接线 | `node tools/assert-serper.mjs`(10) |
|
|
683
694
|
| `assert-tavily-endpoint.mjs` | Tavily 兼容端点(#153):留空 = 官方地址、base 自动补 `/search`、query/hash 被剥离、非 http(s) 拒绝、key 只走 Authorization 头、401 点名端点、配置与设置页接线 | `node tools/assert-tavily-endpoint.mjs`(8) |
|
|
684
695
|
| `assert-hint-card.mjs` | 字段说明悬停卡:长说明不再占正文、卡片经 portal 挂到 body(否则被卡片 `overflow:clip` 裁掉)、Esc 关闭、聚焦打开/失焦关闭、悬停有延迟、触屏可点、卡片不越出视口、深浅色都覆盖、标签文字在图标按钮外(否则被压成一字一行)、点图标不连带切换复选框 | `node tools/assert-hint-card.mjs`(14) |
|
|
685
|
-
| `assert-activity-panel.mjs` | 右侧栏搜索动态(#144):记录只在内存不落盘、历史上限 50、来源上限 8、按会话隔离、进行中/完成状态、引擎结果分类(成功/失败类别/跳过原因)、清空、默认关闭、旧宿主无右侧栏服务时整体跳过、tab 正文+标题+引导入口注册、bridge 路由走统一守卫、工具分发携带会话、轮询随卸载停止、中英文案 | `node tools/assert-activity-panel.mjs`(15) |
|
|
686
|
-
| `assert-activity-wiring.mjs` | 搜索动态接线(#144 回归):配置项默认关闭且能完整往返、座位标志只在服务注入后才置位、加载时已开启也能挂载、tab id 三处共用、引导入口带 commandId 且标题/描述是函数、package.json 声明 `dsh-client-ui-sidebar-right` 为可选 peer 与 client inject、服务缺失时有 try/catch 兜底 | `node tools/assert-activity-wiring.mjs`(8) |
|
|
687
|
-
| `assert-activity-pipeline.mjs` | 搜索动态数据面端到端:工具钩子把会话带进搜索链、记录归属该会话、进行中可见当前引擎、结束后离开 in-flight、引擎结果与来源往返完好、无归属记录仍可见、会话之间不串、底部计数已接线、两条 bridge 路由都过统一守卫、面板轮询随卸载停止 | `node tools/assert-activity-pipeline.mjs`(20) |
|
|
688
696
|
| `assert-restore-cli.mjs` | 卸载后清理入口(#159):`restore` 子命令不依赖插件运行时、只删插件自己写进去的 `searchProvider: ddg` / `fetchProvider: fs-quality-fetch`、用户显式选的 provider 不动、只剩 id+name 的空行整行删除、注释/顺序/引号/CRLF 保留、写入前备份、重复运行无副作用、`--dry-run` 不写、`--profile` 只清指定 profile、参数不明时拒绝写入 | `node tools/assert-restore-cli.mjs`(12) |
|
|
689
697
|
| `assert-upgrade-version.mjs` | 一键升级以实际安装结果为准(#163):读回 profile 里真正落下的版本、与 registry 比较、冷却拦截单独报 `upgrade-blocked`、成功路径报 installed 而非 latest、读不到安装状态时不算成功、界面 toast 用 installed、被拦截时用告警色并保留原文案 | `node tools/assert-upgrade-version.mjs`(8) |
|
|
690
698
|
| `assert-search-proxy.mjs` | 搜索代理(#155)的规则层:http/https/socks5 地址解析、凭据百分号解码、无 scheme 视为 http、socks5h 交给代理解析、非法协议拒绝、`no_proxy` 优先于显式设置、空设置不接管环境变量代理、活动代理是配置层写入的模块状态、搜索路径不再直连全局 `fetch`、该设置只管引擎(天气/更新检查/抓取层保持平台 fetch)、界面中英双语文案、SOCKS5 由本仓库自己实现、重定向三档语义、abort/timeout 保持原生 error 名、HTTP/1.1 请求必须走我们自己的隧道 socket(`agent: false` 与 `https.request` 都会静默绕过代理)、新增依赖为零 | `node tools/assert-search-proxy.mjs`(18) |
|
|
@@ -1043,6 +1051,16 @@ So **remove those `- id: web` lines before disabling or uninstalling this plugin
|
|
|
1043
1051
|
Error: configured web provider "ddg" is not registered
|
|
1044
1052
|
```
|
|
1045
1053
|
|
|
1054
|
+
**Already uninstalled and forgot?** The `restore` command fixes the profile patch without loading the plugin:
|
|
1055
|
+
|
|
1056
|
+
```
|
|
1057
|
+
npx dsh-free-search restore # every profile
|
|
1058
|
+
npx dsh-free-search restore --profile web # one profile
|
|
1059
|
+
npx dsh-free-search restore --dry-run # report only, write nothing
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
It removes only the two values this plugin wrote (`searchProvider: ddg`, `fetchProvider: fs-quality-fetch`); a provider you chose yourself is left alone; a row left with just `id` + `name` is dropped entirely; comments, ordering, quoting and CRLF survive; and it writes a `*.bak-before-free-search-restore` backup first. Restart `dsh` afterwards so the web service rebuilds.
|
|
1063
|
+
|
|
1046
1064
|
Older DSH (0.1.x) used a static patch layer for this; writing that row by hand there is neither needed nor recommended.
|
|
1047
1065
|
|
|
1048
1066
|
#### DSH's "DeepSeek search API" switch
|
|
@@ -1425,7 +1443,7 @@ Restart `dsh web` after switching to apply changes.
|
|
|
1425
1443
|
|
|
1426
1444
|
#### Offline self-check assertions (`tools/`)
|
|
1427
1445
|
|
|
1428
|
-
**One hundred and
|
|
1446
|
+
**One hundred and six** zero-dependency assertion scripts ship with the repo (**1345 assertions** total)
|
|
1429
1447
|
|
|
1430
1448
|
| Script | Covers | Run (count) |
|
|
1431
1449
|
|---|---|---|
|