@240xu/dsh-websearch 2.0.3 → 2.0.4
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 +7 -0
- package/examples/cordis.patch.yml +19 -11
- package/lib/client.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @240xu/dsh-websearch
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@240xu/dsh-websearch)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
3
6
|
> Aggregated web search provider for [DeepSeek Harness](https://github.com/deepseek-ai/dsh) — one plugin id `unified` that fans out to eleven backends concurrently, merges + URL-dedups results, and stays usable even when some backends go down.
|
|
4
7
|
|
|
5
8
|
A pure-Cordis drop-in: registers ONE provider at `ctx.web` so the `dsh-web` selection rule never fires `WEB_PROVIDER_AMBIGUOUS`. Zero-config search out of the box (Exa + Parallel + DuckDuckGo + SearXNG are keyless); API-key backends (DeepSeek / Anthropic / OpenAI / Brave / Tavily / Serper / Mojeek) auto-activate once their key is supplied via the credentials service or env.
|
|
@@ -57,6 +60,10 @@ pnpm install
|
|
|
57
60
|
|
|
58
61
|
## Settings | 配置
|
|
59
62
|
|
|
63
|
+
> v2.0.3 起,配置界面位于 **Settings → 左侧栏「搜索 / Web Search」**(顶级分区,与通用/模型/插件同级)。
|
|
64
|
+
> 每个 API Key 字段旁有 **「获取 Key ↗」** 直达对应平台控制台;保存即写入凭证库并立即生效。
|
|
65
|
+
|
|
66
|
+
|
|
60
67
|
插件向 DSH 设置面板注册 `unified-search` namespace(Settings → Unified Search),全部字段扁平化、开箱可编辑:
|
|
61
68
|
|
|
62
69
|
**全局**
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Registers provider id "unified" that fans out to 11 backends concurrently:
|
|
3
|
-
# keyless: exa, parallel, ddg, searxng
|
|
4
|
-
# key-gated: deepseek, anthropic, openai, brave, tavily, serper, mojeek
|
|
5
|
-
# (activate when their API key is set via Settings > Unified Search)
|
|
1
|
+
# dsh-websearch v2.0.3 — user-side profile patch example
|
|
6
2
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
# The plugin itself is registered by its own bundle manifest
|
|
4
|
+
# (dsh.bundle in package.json + cordis.patch.yml at the repo root),
|
|
5
|
+
# so after installing it there is NOTHING to add for the plugin row.
|
|
6
|
+
#
|
|
7
|
+
# What you DO need in your profile patch: pin the built-in web_search
|
|
8
|
+
# tool onto the unified provider and disable the superseded official one.
|
|
9
|
+
|
|
11
10
|
- id: web-search-deepseek
|
|
12
|
-
name:
|
|
11
|
+
name: '@deepseek-ai/dsh-web-search-deepseek'
|
|
13
12
|
disabled: true
|
|
14
13
|
- id: web
|
|
15
|
-
name:
|
|
14
|
+
name: '@deepseek-ai/dsh-web'
|
|
16
15
|
config:
|
|
17
16
|
searchProvider: unified
|
|
17
|
+
|
|
18
|
+
# Install:
|
|
19
|
+
# dsh plugin --profile web add github:240xu/dsh-websearch
|
|
20
|
+
# or (after npm publish):
|
|
21
|
+
# dsh plugin --profile web add @240xu/dsh-websearch
|
|
22
|
+
#
|
|
23
|
+
# Then open Settings -> Web Search to toggle backends, store API keys
|
|
24
|
+
# (each field links straight to the provider's key dashboard), and tune
|
|
25
|
+
# concurrency / timeouts.
|
package/lib/client.js
CHANGED
|
@@ -185,8 +185,15 @@ window.__ModuleLoader__.load({
|
|
|
185
185
|
if (staged.clear || staged.text === "") { await this.scope.unset(field); doneFields.push(field); continue; }
|
|
186
186
|
if (GLOBAL_FIELDS.includes(field)) {
|
|
187
187
|
const num = Number(staged.text);
|
|
188
|
-
//
|
|
189
|
-
|
|
188
|
+
// Mirror the server schema bounds client-side so bad input is
|
|
189
|
+
// caught in the UI instead of a failed Host round-trip.
|
|
190
|
+
const BOUNDS = {
|
|
191
|
+
numResults: [1, 50],
|
|
192
|
+
concurrency: [1, 10],
|
|
193
|
+
backendTimeoutMs: [1000, 120000],
|
|
194
|
+
};
|
|
195
|
+
const [lo, hi] = BOUNDS[field] ?? [-Infinity, Infinity];
|
|
196
|
+
if (Number.isNaN(num) || num < lo || num > hi) { this.failed = true; continue; }
|
|
190
197
|
await this.scope.set(field, num);
|
|
191
198
|
doneFields.push(field);
|
|
192
199
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@240xu/dsh-websearch",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Unified web search provider for DeepSeek Harness (ctx.web): 11 backends — Exa + Parallel + DDG + SearXNG (keyless), DeepSeek + Anthropic + OpenAI + Brave + Tavily + Serper + Mojeek (key-gated via Settings credentials). Registers provider id \"unified\" for zero-config web_search tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|