dsh-free-search 0.9.76 → 0.9.77

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.
Files changed (3) hide show
  1. package/README.md +4 -2
  2. package/lib/client.js +17 -22
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -642,7 +642,7 @@ npx -y -p dsh-free-search dsh-free-search-mcp
642
642
 
643
643
  #### 离线自检断言(tools/)
644
644
 
645
- 仓库自带 **87 个**零依赖断言脚本(合计 **1178 项**)
645
+ 仓库自带 **89 个**零依赖断言脚本(合计 **1185 项**)
646
646
 
647
647
  | 脚本 | 覆盖 | 运行(项数) |
648
648
  |---|---|---|
@@ -678,8 +678,10 @@ npx -y -p dsh-free-search dsh-free-search-mcp
678
678
  `node tools/assert-prompt-display.mjs`(9)
679
679
  | `assert-prompt-pager.mjs` | 提示词分页可保存:翻页(‹ / ›)会置 dirty 并清掉旧的失败提示、增删页同样置 dirty、保存按钮仍由 dirty 控制 | `node tools/assert-prompt-pager.mjs`(5) |
680
680
  | `assert-ui-locale.mjs` | 界面语言跟随宿主 locale(#150):`uiLang` 为空 / `auto` / 大小写变体都跟随实时切换、显式 en/zh/EN-us/zh_TW 锁定不动、草稿/撤销/保存不改搜索与提示词设置、斜杠命令只写 provider、缺 locale 服务与旧宿主 `getLocale` + disposer 清理、rail 与引擎设置无 React key 警告 | `node tools/assert-ui-locale.mjs`(19) |
681
+ | `assert-engine-settings-ids.mjs` | 设置按钮可达性(#153 回归):`ENGINE_SETTINGS_IDS` 必须包含所有写了 `renderEngineSettings` 分支的引擎,按钮仍由该列表控制 | `node tools/assert-engine-settings-ids.mjs`(3) |
681
682
  | `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) |
682
683
  | `assert-tavily-endpoint.mjs` | Tavily 兼容端点(#153):留空 = 官方地址、base 自动补 `/search`、query/hash 被剥离、非 http(s) 拒绝、key 只走 Authorization 头、401 点名端点、配置与设置页接线 | `node tools/assert-tavily-endpoint.mjs`(8) |
684
+ | `assert-multikey-layout.mjs` | 多 key 输入的行高(#154 回归):输入框是裸 textarea 不带提示段落、格式说明只在 placeholder / title、双语提示仍完整、废弃样式已删 | `node tools/assert-multikey-layout.mjs`(4) |
683
685
  | `assert-multikey-ui.mjs` | 多 key 输入(#154):后端支持换行/逗号/分号分隔、设置页为 textarea 而非单行密码框、提示写明格式与轮换顺序 | `node tools/assert-multikey-ui.mjs`(4) |
684
686
  | `assert-pool-policy.mjs` | 按次计费引擎入池(#152):7 个引擎全覆盖、策略归一化(含大小写与非法值)、`off` 保持现状、`auto`/`multi` 放行、Auto 可把按次计费引擎排到首位、`off` 写进池也不生效、策略进入缓存键 | `node tools/assert-pool-policy.mjs`(9) |
685
687
  | `assert-pool-prompt.mjs` | 入池策略与提示词一致(#152):`off` 保留「只在显式选择时运行」、`auto` 改写为「最多一个、计费一次」、`multi` 改写为「每个引擎各计费一次」、Multi 池只在 `multi` 档列出按次计费引擎、中文文案同步 | `node tools/assert-pool-prompt.mjs`(5) |
@@ -1404,7 +1406,7 @@ Restart `dsh web` after switching to apply changes.
1404
1406
 
1405
1407
  #### Offline self-check assertions (`tools/`)
1406
1408
 
1407
- **Eighty-seven** zero-dependency assertion scripts ship with the repo (**1178 assertions** total)
1409
+ **Eighty-nine** zero-dependency assertion scripts ship with the repo (**1185 assertions** total)
1408
1410
 
1409
1411
  | Script | Covers | Run (count) |
1410
1412
  |---|---|---|
package/lib/client.js CHANGED
@@ -250,9 +250,6 @@ window.__ModuleLoader__.load({
250
250
  "@media (prefers-color-scheme: dark){.dshfs-priorityHandle{color:#98989d}}",
251
251
  ".dshfs-priorityHandle:active{cursor:grabbing}",
252
252
  ".dshfs-priorityKey{flex:1;min-width:110px;max-width:360px;height:26px;padding:0 8px;font-size:12px;border:1px solid rgba(0,0,0,.12);border-radius:8px;background:transparent;color:inherit}",
253
- ".dshfs-keyBox{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}",
254
- ".dshfs-keyHint{color:#6e6e73;font-size:11px;line-height:1.35;margin:0}",
255
- "@media (prefers-color-scheme: dark){.dshfs-keyHint{color:#a1a1a6}}",
256
253
  "@media (prefers-color-scheme: dark){.dshfs-priorityKey{border-color:rgba(255,255,255,.14)}}",
257
254
  ".dshfs-priorityKey::placeholder{color:#8e8e93}",
258
255
  ".dshfs-keyStatus{flex:none;width:8px;height:8px;border-radius:50%;display:inline-block}",
@@ -351,7 +348,8 @@ window.__ModuleLoader__.load({
351
348
  parallelPh: (c) => c ? "Parallel API 密钥(已配置)" : "Parallel API 密钥(可选,不填走 MCP 免 key)",
352
349
  perplexityPh: (c) => c ? "Perplexity API 密钥(已配置)" : "Perplexity API 密钥(pplx-...)",
353
350
  deepseekPh: (c) => c ? "DeepSeek API 密钥(已配置)" : "DeepSeek API 密钥(sk-...)",
354
- multiKeyHint: "支持多个 key:一行一个,或用逗号 / 分号分隔。按填写顺序轮换,某个 key 额度用尽或鉴权失败时自动换下一个,并单独冷却该 key。",
351
+ multiKeyPlaceholder: "API key,一行一个",
352
+ multiKeyHint: "支持多个 key:一行一个,或用逗号 / 分号分隔,按填写顺序轮换;某把 key 额度用尽或鉴权失败时只冷却它自己。",
355
353
  serpbasePh: (c) => c ? "SerpBase API 密钥(已配置)" : "SerpBase API 密钥(serpbase.dev 获取)",
356
354
  serperPh: (c) => c ? "Serper.dev API Key(已配置)" : "Serper.dev API Key(serper.dev 获取)",
357
355
  tavilyUrlLabel: "Tavily 兼容端点(可选)",
@@ -597,7 +595,8 @@ window.__ModuleLoader__.load({
597
595
  parallelPh: (c) => c ? "Parallel API key (configured)" : "Parallel API key (optional, free without)",
598
596
  perplexityPh: (c) => c ? "Perplexity API key (configured)" : "Perplexity API key (pplx-...)",
599
597
  deepseekPh: (c) => c ? "DeepSeek API key (configured)" : "DeepSeek API key (sk-...)",
600
- multiKeyHint: "Multiple keys supported: one per line, or separated by commas / semicolons. They rotate in the order given; a key that is out of quota or rejected is cooled down on its own and the next one takes over.",
598
+ multiKeyPlaceholder: "API key, one per line",
599
+ multiKeyHint: "Multiple keys supported: one per line or separated by commas / semicolons, rotated in order; a key that runs out or fails is cooled down on its own.",
601
600
  serpbasePh: (c) => c ? "SerpBase API key (configured)" : "SerpBase API key (from serpbase.dev)",
602
601
  serperPh: (c) => c ? "Serper.dev API key (configured)" : "Serper.dev API key (from serper.dev)",
603
602
  tavilyUrlLabel: "Tavily-compatible endpoint (optional)",
@@ -841,7 +840,7 @@ window.__ModuleLoader__.load({
841
840
  "cache_search",
842
841
  "domain_search",
843
842
  ];
844
- const PLUGIN_VERSION = "0.9.76";
843
+ const PLUGIN_VERSION = "0.9.77";
845
844
  const PLUGIN_REPO_URL = "https://github.com/DDDMUC/dsh-free-search";
846
845
  // 右侧浮动目录(#85):条目顺序即页面顺序,anchor 是页面里对应 field 的 id。
847
846
  const NAV_ITEMS = [
@@ -1384,7 +1383,7 @@ window.__ModuleLoader__.load({
1384
1383
  });
1385
1384
  };
1386
1385
 
1387
- const ENGINE_SETTINGS_IDS = ["google", "deepseek-tools", "zhipu", "metaso", "yandex", "yuanbao"];
1386
+ const ENGINE_SETTINGS_IDS = ["google", "deepseek-tools", "tavily", "zhipu", "metaso", "yandex", "yuanbao"];
1388
1387
  const engineHasSettings = (id) => ENGINE_SETTINGS_IDS.includes(id);
1389
1388
  const markEngineDirty = () => {
1390
1389
  setDirty(true);
@@ -1395,21 +1394,17 @@ window.__ModuleLoader__.load({
1395
1394
  const renderEngineKeyInput = (id) => {
1396
1395
  const k = KEY_INPUTS[id];
1397
1396
  if (!k) return null;
1398
- return react_jsx_runtime.jsxs("div", {
1399
- className: "dshfs-keyBox",
1400
- children: [
1401
- react_jsx_runtime.jsx("textarea", {
1402
- className: "dshfs-priorityKey",
1403
- rows: 2,
1404
- placeholder: "API key(一行一个,可填多个)",
1405
- spellCheck: false,
1406
- value: k[0],
1407
- disabled: !ready || saving,
1408
- onDragStart: (e) => { e.preventDefault(); e.stopPropagation(); },
1409
- onChange: (e) => { k[1](e.target.value); markEngineDirty(); },
1410
- }),
1411
- react_jsx_runtime.jsx("p", { className: "dshfs-keyHint", children: t.multiKeyHint }),
1412
- ],
1397
+ // 多 key 提示放进 placeholder / title,不再占一行正文。
1398
+ return react_jsx_runtime.jsx("textarea", {
1399
+ className: "dshfs-priorityKey",
1400
+ rows: 2,
1401
+ placeholder: t.multiKeyPlaceholder,
1402
+ title: t.multiKeyHint,
1403
+ spellCheck: false,
1404
+ value: k[0],
1405
+ disabled: !ready || saving,
1406
+ onDragStart: (e) => { e.preventDefault(); e.stopPropagation(); },
1407
+ onChange: (e) => { k[1](e.target.value); markEngineDirty(); },
1413
1408
  });
1414
1409
  };
1415
1410
  const engineSettingField = (id, label, value, setter, options = {}) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-free-search",
3
- "version": "0.9.76",
3
+ "version": "0.9.77",
4
4
  "description": "Free web search for DeepSeek Harness: 42 engines (Bing/DuckDuckGo/AnySearch/SearXNG/Exa/Tavily/Keenable/Firecrawl/Parallel/Brave/Zhipu/You.com keyless; Zhihu global/site via MCP and Perplexity/SerpBase/DeepSeek (official + native tools/search)/Baidu/Kimi/Aliyun/Doubao/Google CSE/Metaso/Yandex/Yuanbao/SpecStream 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, plus a standalone stdio MCP server.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",