dsh-free-search 0.9.55 → 0.9.56

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/lib/client.js CHANGED
@@ -769,7 +769,7 @@ window.__ModuleLoader__.load({
769
769
  "cache_search",
770
770
  "domain_search",
771
771
  ];
772
- const PLUGIN_VERSION = "0.9.55";
772
+ const PLUGIN_VERSION = "0.9.56";
773
773
  const PLUGIN_REPO_URL = "https://github.com/DDDMUC/dsh-free-search";
774
774
  // 右侧浮动目录(#85):条目顺序即页面顺序,anchor 是页面里对应 field 的 id。
775
775
  const NAV_ITEMS = [
package/lib/index.js CHANGED
@@ -3028,6 +3028,16 @@ function apply(ctx, config) {
3028
3028
  });
3029
3029
 
3030
3030
  ctx.inject(["webServer", "settings"], (sctx) => {
3031
+ // DSH >= #8266 calls connection.authentication inside admit(); the bridge
3032
+ // handler must run in a context that injected that service, while older
3033
+ // DSH (no authentication service) keeps using the webServer/settings context.
3034
+ let connectionContext = sctx;
3035
+ ctx.inject(["connection.authentication"], (actx) => {
3036
+ connectionContext = actx;
3037
+ actx.effect(() => () => {
3038
+ if (connectionContext === actx) connectionContext = sctx;
3039
+ }, "free-search: bridge auth context");
3040
+ });
3031
3041
  sctx.effect(() => {
3032
3042
  const disposers = makeBridgeRoutes(
3033
3043
  sctx.settings,
@@ -3043,7 +3053,7 @@ function apply(ctx, config) {
3043
3053
  doctorReport,
3044
3054
  () => {
3045
3055
  try {
3046
- return sctx.get("connection");
3056
+ return connectionContext.get("connection");
3047
3057
  } catch {
3048
3058
  return undefined;
3049
3059
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-free-search",
3
- "version": "0.9.55",
3
+ "version": "0.9.56",
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",