dsh-union-search 0.10.16 → 0.10.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.
Files changed (2) hide show
  1. package/lib/index.js +7 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -241,7 +241,7 @@ function routeEngines(query, { timeRange, disabledEngines = [], fallbackOrder =
241
241
  }
242
242
 
243
243
  // 当前插件版本(发布时与 package.json 同步)
244
- const PLUGIN_VERSION = "0.10.16";
244
+ const PLUGIN_VERSION = "0.10.17";
245
245
  // 检查更新的 npm registry 元数据地址(dsh-union-search 是 npmjs 上的公开包,0.10.15 起统一裸名)
246
246
  const NPM_REGISTRY_URL = "https://registry.npmjs.org/dsh-union-search/latest";
247
247
  const PLUGIN_NPM_URL = "https://www.npmjs.com/package/dsh-union-search";
@@ -4769,6 +4769,10 @@ function apply(ctx, config) {
4769
4769
 
4770
4770
  ctx.inject(["webServer", "settings"], (sctx) => {
4771
4771
  sctx.effect(() => {
4772
+ // [0.10.17] settings guaranteed available here, initial takeover fires in inject
4773
+ try { applySearchTakeover(); } catch (e) {
4774
+ sctx.logger.warn("union-search: takeover in inject failed (non-fatal): " + (e && e.message || e));
4775
+ }
4772
4776
  const disposers = makeBridgeRoutes(
4773
4777
  sctx.settings,
4774
4778
  (request) => provider.search(request, undefined),
@@ -4881,6 +4885,8 @@ function apply(ctx, config) {
4881
4885
  : `union-search: taking over from the default provider "${previous}" as "${provider.id}"`
4882
4886
  );
4883
4887
  };
4888
+ // [0.10.17] fallback: if inject does not fire (no webServer), try here.
4889
+ // Safe: applySearchTakeover early-returns if settings unavailable (0.10.16 guard).
4884
4890
  try { applySearchTakeover(); } catch (e) {
4885
4891
  logger.warn(`union-search: initial takeover error (non-fatal): ${e?.message ?? e}`);
4886
4892
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-union-search",
3
- "version": "0.10.16",
3
+ "version": "0.10.17",
4
4
  "description": "Union web search for DeepSeek Harness (renamed from dsh-free-search): free keyless engines + many professional paid search APIs — 28 engines (Bing/DuckDuckGo/AnySearch/SearXNG multi-instance union/Exa/Tavily/Keenable/Firecrawl/Parallel keyless; Zhihu global/site via MCP and Perplexity/SerpBase/Serply/DeepSeek official/You.com/Baidu/Kimi/Aliyun/Doubao/Zhipu/Bocha/Metaso with key; OpenAI/Gemini/Claude/Grok model built-in search, explicit-only) + auto smart routing + global engine enable/disable & fallback priority + multi mode (parallel top-3 merge) + multi_search cross-source tool + failure-aware fallback + block system built-in search toggle + experimental free advance_fetch (no API key, no billing; host-twin GitHub-Flavored Markdown conversion + CSS selector/fields structured extraction) + time filtering + platform search + web_fetch, with web settings UI.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",