dsh-web-search-plugin 0.6.1 → 0.8.0
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/CHANGELOG.md +69 -0
- package/README.md +31 -27
- package/README.zh.md +37 -32
- package/assets/detail/en.md +7 -6
- package/assets/detail/images/overview.en.png +0 -0
- package/assets/detail/images/overview.en.svg +10 -10
- package/assets/detail/images/overview.zh.png +0 -0
- package/assets/detail/images/overview.zh.svg +10 -10
- package/assets/detail/zh.md +7 -6
- package/cordis.patch.yml +31 -15
- package/lib/client.js +293 -73
- package/lib/deepseek.js +22 -13
- package/lib/index.js +28 -7
- package/lib/shared.js +1 -1
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,75 @@
|
|
|
4
4
|
|
|
5
5
|
## [未发布]
|
|
6
6
|
|
|
7
|
+
## [0.8.0] - 2026-11-19
|
|
8
|
+
|
|
9
|
+
### 新增
|
|
10
|
+
|
|
11
|
+
- 新增「跟随会话模型」(默认):组合层不再固定 `web.searchProvider`,由 DSH `0.2.2-rc.5` 按模型路由选择。DeepSeek 模型请求使用内置 `deepseek-official` 服务端搜索(搜索不按次收费,每次搜索额外消耗模型 token);其他模型以及无模型请求的搜索使用 `deepseek-search-api`。
|
|
12
|
+
- 卡片提供该选项;只有 Host 组合了内置提供方时才显示,否则提示用户先固定一个引擎。
|
|
13
|
+
- 卡片的 DeepSeek 端点、模型、token 上限与搜索次数现在直接读写内置 `web-search-deepseek` 命名空间,不再维护第二份配置或镜像。
|
|
14
|
+
|
|
15
|
+
### 破坏性变更
|
|
16
|
+
|
|
17
|
+
- peer 下限收到 `0.2.2-rc.5`:不再支持 `0.2.1-rc.2`、`0.2.2-alpha.3` 与 `0.2.2-rc.4`。这些 Host 没有按路由选择搜索提供方的能力,未固定 `searchProvider` 时会以 `WEB_PROVIDER_AMBIGUOUS` 失败。
|
|
18
|
+
- 「DeepSeek 服务端搜索」改为固定内置 `deepseek-official`,不再走本插件自己的 Messages 后端。旧配置(`web.searchProvider: dsh-web-search` 且 `provider: deepseek-official`)仍由兼容后端继续服务,下一次在卡片保存时自动迁移到内置 id;插件命名空间里的 DeepSeek 参数会在迁移时带入 `web-search-deepseek`。
|
|
19
|
+
- 组合层不再禁用内置 `web-search-deepseek`(跟随模式与服务端搜索都需要它注册 `deepseek-official`)。内置「网页搜索与获取」设置页仍保持禁用,配置入口仍是本插件卡片。
|
|
20
|
+
- 默认搜索提供方由固定 `deepseek-search-api` 改为跟随会话模型。需要保持旧行为时,在卡片选择 **DeepSeek Search API**。
|
|
21
|
+
|
|
22
|
+
### 修复
|
|
23
|
+
|
|
24
|
+
- 卡片的 DeepSeek 高级字段(模型、API 版本、token 上限、搜索次数)写入 prefixed 字段,而 Host 只读取无前缀字段,导致这些设置不影响实际搜索。现在 `readSection` 同时读取两套字段,prefixed 优先、旧字段兜底。
|
|
25
|
+
- DeepSeek 服务端搜索把请求携带的模型路由(`llmProvider`)传给账号令牌解析。DSH `0.2.2-rc.5` 起由 Host 在搜索请求上下发该字段,账号路由的搜索不再回退到「最近一次会话路由」而改用 API Key,与 `ready()` 的就绪判断保持一致。
|
|
26
|
+
- DeepSeek Messages 结果映射优先采用结果项自带的 `snippet`,citation 摘要仅作兜底,与官方 `0.2.2-rc.5` 提供方一致;带自身摘要的结果不再丢失正文。
|
|
27
|
+
|
|
28
|
+
### 变更
|
|
29
|
+
|
|
30
|
+
- 文案跟随官方 `0.2.2-rc.5`:`DeepSeek(旧版)` 改为 `DeepSeek 服务端搜索` / `DeepSeek server-side search`,说明由「速度较慢」改为「搜索不按次收费,每次搜索都会额外消耗模型 token」。同步卡片、插件详情、语言包与 README。
|
|
31
|
+
|
|
32
|
+
### 兼容性
|
|
33
|
+
|
|
34
|
+
- 在 `0.2.2-rc.5` 的真实依赖(`dsh-web`、`dsh-web-deepseek-api`、`dsh-web-search-deepseek`、`cordis 4.1.0`、`schemastery 3.19.0`)上验证:打包安装、Host 搜索接缝、`searchReady(llmProvider)`、携带 `llmProvider` 的搜索、Messages 后端、fetch 接缝,以及未固定提供方时 DeepSeek 路由走 `/messages`、其他路由走 `/v1/tools/search`。
|
|
35
|
+
- 新增回归用例覆盖路由透传、结果项 `snippet` 优先、跟随模式的写入分组、镜像与退出跟随。
|
|
36
|
+
- 包版本与 User-Agent 更新为 `0.8.0`。
|
|
37
|
+
|
|
38
|
+
## [0.7.1] - 2026-11-18
|
|
39
|
+
|
|
40
|
+
### 变更
|
|
41
|
+
|
|
42
|
+
- 组合层禁用内置的「网页搜索与获取」设置页(`ui-settings-web-search`)。该页与本插件页面编辑同一对 `web` / `web-deepseek-api` 接缝,同时保留两个入口会让用户重复配置,也会让插件列表出现两个同名条目;插件启用时只保留本插件一个入口。关闭或卸载整个组合包会撤销该行,内置页面随之恢复。
|
|
43
|
+
- 搜索提供方补充 `title` 与中英 `description`,provider 选择器不再显示裸 ID `dsh-web-search`。
|
|
44
|
+
- 计费方式选项对齐官方措辞:自动 / 已登录的 DeepSeek 账号 / DeepSeek API Key,并按当前选择显示对应说明(需要先登录 DeepSeek 账号、使用「模型」页配置的 API Key)。
|
|
45
|
+
- 指南链接文案改为「网页搜索与获取指南」。
|
|
46
|
+
- 包版本与 User-Agent 更新为 `0.7.1`。
|
|
47
|
+
|
|
48
|
+
## [0.7.0] - 2026-11-18
|
|
49
|
+
|
|
50
|
+
### 破坏性变更
|
|
51
|
+
|
|
52
|
+
- 默认搜索提供方由 DeepSeek Messages 搜索改为 **DeepSeek Search API**,与 DSH `0.2.2` 自带的「网页搜索与获取」页一致;组合包默认把 `web.searchProvider` 设为 `deepseek-search-api`。
|
|
53
|
+
- 该默认需要 Host 提供 `web-deepseek-api`(DSH `0.2.1-rc.2` 起),因此移除 `0.2.0-rc.2` 的 peer 范围,保留 `0.2.1-rc.2`、`0.2.2-alpha.3`、`0.2.2-rc.4`。需要旧版搜索的 Profile 在卡片中选择 **DeepSeek(旧版)** 即可。
|
|
54
|
+
|
|
55
|
+
### 新增
|
|
56
|
+
|
|
57
|
+
- 设置卡新增「计费方式」下拉(自动 / 账号 / API Key,默认自动),写入官方 `searchBilling` / `fetchBilling`,说明文字与官方一致:跟随当前会话的 DeepSeek 账号或 API Key;会话用其他模型时,优先用 API Key,没有则用已登录账号。
|
|
58
|
+
- 搜索与获取两个区块分别显示各自能力的计费方式;旧版 Host 没有该字段时不显示该行。
|
|
59
|
+
|
|
60
|
+
### 修复
|
|
61
|
+
|
|
62
|
+
- 修复 DSH `0.2.2-rc.2` 及以上「DeepSeek Search API / Fetch API」配置区保存失败:官方把 `apiKey` / `apiKeyEnv` / `baseURL` 换成按能力拆分的字段后,插件继续写旧字段会被 `dsh-settings` 拒绝(`Config field "apiKey" is not volatile`)。
|
|
63
|
+
- 卡片按 Host 实际提供的 schema 自动切换:新版写 `searchApiKeyEnv` / `fetchApiKeyEnv` 与 `searchBaseURL` / `fetchBaseURL`,旧版继续写 `apiKeyEnv` / `baseURL`;新版不再渲染没有对应槽位的字面 API Key 行。
|
|
64
|
+
|
|
65
|
+
### 变更
|
|
66
|
+
|
|
67
|
+
- 术语与说明文字对齐官方页面:网页搜索提供方 / 网页获取提供方、DeepSeek(旧版)、本机直接获取、单次请求最多搜索次数;补充「本机直接获取」的能力边界与 Fetch API 的计费说明。
|
|
68
|
+
- 提供方下拉下方改为显示当前选中提供方的一句话说明,DuckDuckGo 提示只在选择 SearXNG 时出现。
|
|
69
|
+
- 旧版 DeepSeek 的「模型」「最大 token」收进「高级设置」折叠区。
|
|
70
|
+
- 包版本与 User-Agent 更新为 `0.7.0`。
|
|
71
|
+
|
|
72
|
+
### 兼容性
|
|
73
|
+
|
|
74
|
+
- 在 `0.2.2-rc.4`、`0.2.2-rc.3`、`0.2.2-rc.1`、`0.2.2-alpha.3` 的真实依赖上验证打包安装、Host 搜索接缝、配置切换与凭据就绪判断;新增客户端用例覆盖新旧两套 `web-deepseek-api` schema 的字段映射与计费行显隐。
|
|
75
|
+
|
|
7
76
|
## [0.6.1] - 2026-11-10
|
|
8
77
|
|
|
9
78
|
### 文档
|
package/README.md
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](./README.zh.md)
|
|
4
4
|
|
|
5
|
-
A web search plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) that gives your agent more search options through Harness's existing `web_search` tool. **Settings → Web search** contains two independent sections: **
|
|
5
|
+
A web search plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) that gives your agent more search options through Harness's existing `web_search` tool. **Settings → Web search** contains two independent sections: **Web search provider** (ten choices) and **Web fetch provider** (local fetch or DeepSeek Fetch API), with one Save action.
|
|
6
6
|
|
|
7
7
|
## Why use this plugin?
|
|
8
8
|
|
|
9
|
-
- **Avoid an extra DeepSeek model call
|
|
9
|
+
- **Avoid an extra DeepSeek model call when you pick a direct engine.** DeepSeek Search API and the eight third-party backends call search APIs directly instead of DeepSeek's official model-backed search endpoint. This avoids the additional DeepSeek model token usage for that search request. (Your conversation and the model's processing of search results still use tokens, and search providers may charge their own fees or credits.)
|
|
10
10
|
- **Configure everything in a settings card.** Switch engines, enter keys, and adjust result limits in **Settings → Web search**, then save. Changes take effect on the next search without restarting the plugin or editing YAML.
|
|
11
11
|
- **Choose the search service that fits your needs.** Use Google results through Serper, semantic search through Exa, or a self-hosted SearXNG instance. Tavily's keyless mode lets you try search without an account or API key.
|
|
12
|
-
- **Keep existing engines and settings.**
|
|
12
|
+
- **Keep existing engines and settings.** DeepSeek server-side search (Messages) and third-party engines remain available. Search and fetch are selected independently; see [Disable or uninstall](#disable-or-uninstall) before removing saved provider overrides.
|
|
13
13
|
|
|
14
|
-
**The default
|
|
14
|
+
**The default is to follow the conversation model**, matching DSH `0.2.2-rc.5`: no search provider is pinned, and the Host picks one per model route. DeepSeek model requests use **DeepSeek server-side search** (`deepseek-official`: no per-search charge, but each search sends a Messages request and spends model tokens); every other model and searches outside a model request use **DeepSeek Search API** (`deepseek-search-api`: billed per search, no auxiliary model turn). Pin any engine in the card to apply it to every model.
|
|
15
15
|
|
|
16
16
|
## Supported providers
|
|
17
17
|
|
|
18
18
|
- **DeepSeek Search API** — Reuses rc.2's official `deepseek-search-api`. Direct `/v1/tools/search` requests without an auxiliary model turn. Its `count` is 1–50 (default 10), further bounded by the calling tool; it does not use this plugin's `maxResults`.
|
|
19
|
-
- **DeepSeek
|
|
19
|
+
- **DeepSeek server-side search** — Uses DeepSeek's Anthropic-compatible Messages API with the native search tool type `web_search_20250305`. Models on the account route use the signed-in account; every other request uses `DEEPSEEK_API_KEY`. Each search sends a model request: there is no per-search charge, but it may incur model invocation charges.
|
|
20
20
|
- **Tavily** — Supports `keyless` access (free, rate-limited, no account required) or `keyed` access (`TAVILY_API_KEY`, Bearer token). The settings card shows a quota bar in keyed mode.
|
|
21
21
|
- **Brave Search** — Calls `GET https://api.search.brave.com/res/v1/web/search` with the `X-Subscription-Token` header (credential name: `BRAVE_API_KEY`). Each search is one HTTP request and does not consume a model turn. The settings card displays Capacity and monthly quota from response headers.
|
|
22
22
|
- **Serper** — Google results via `POST /search`, using the `X-API-KEY` header (credential name: `SERPER_API_KEY`).
|
|
@@ -30,10 +30,10 @@ For DuckDuckGo results, choose a SearXNG instance that aggregates DuckDuckGo. Du
|
|
|
30
30
|
|
|
31
31
|
## Requirements
|
|
32
32
|
|
|
33
|
-
- Isolated checks use the actual dependencies of DeepSeek Harness `0.2.2-rc.
|
|
34
|
-
-
|
|
35
|
-
- DSH `0.2.2` RC
|
|
36
|
-
- Hosts with tool readiness checks hide the plugin's search tool when required credentials are missing. Tavily keyless and SearXNG remain usable without a key. DeepSeek
|
|
33
|
+
- Isolated checks use the actual dependencies of DeepSeek Harness `0.2.2-rc.5`, covering packed installation, the Host web seam, configuration changes, follow-mode selection, and credential readiness. Earlier release candidates are no longer supported. Supplier HTTP responses are mocked; this does not verify live accounts or the Desktop settings UI end to end.
|
|
34
|
+
- Peer ranges require `0.2.2-rc.5` and later. `0.2.1-rc.2`, `0.2.2-alpha.3`, and `0.2.2-rc.4` cannot select a search provider by model route, so follow mode cannot work there.
|
|
35
|
+
- DSH `0.2.2` RC requires Node.js `>=24.9.0`. The plugin itself still declares `^22.19.0` or `>=24.0.0`.
|
|
36
|
+
- Hosts with tool readiness checks hide the plugin's search tool when required credentials are missing. Tavily keyless and SearXNG remain usable without a key. DeepSeek server-side search reads the route the search request carries (`llmProvider`); readiness does not validate keys over the network.
|
|
37
37
|
- pnpm, used by `dsh plugin` to install the plugin into a profile
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
@@ -47,9 +47,9 @@ dsh plugin --profile web add dsh-web-search-plugin
|
|
|
47
47
|
After installation, configure the plugin in the Harness Web UI:
|
|
48
48
|
|
|
49
49
|
1. Open **Settings → Web search** and find the plugin's settings card. The sidebar's **Plugins** page controls whether the bundle is enabled; engine settings live in this card.
|
|
50
|
-
2. Choose a search engine.
|
|
50
|
+
2. Choose a search engine. The default is **follow the conversation model**; you can also pin DeepSeek Search API, DeepSeek server-side search, Tavily, Brave, Serper, SerpApi, Exa, SearXNG, Scavio, or Firecrawl.
|
|
51
51
|
3. Enter the engine's API key if required. Engines that require a key show “Get API key ↗”, which opens the official dashboard. For Tavily without a key, choose `keyless`; for SearXNG, set an instance URL with JSON search enabled. These two keyless options do not show a key dashboard link. Existing credentials can be reused, such as `BRAVE_API_KEY` for Brave.
|
|
52
|
-
4. Under **Web
|
|
52
|
+
4. Under **Web fetch provider**, independently select local fetch (default) or DeepSeek Fetch API.
|
|
53
53
|
5. Adjust parameters and click **Save** at the bottom. Unsaved changes remain drafts; the next operation uses the saved settings.
|
|
54
54
|
|
|
55
55
|
> For installation from a local source checkout, including Windows cross-drive considerations, see [Development → Local installation and verification](#local-installation-and-verification).
|
|
@@ -58,26 +58,30 @@ After installation, configure the plugin in the Harness Web UI:
|
|
|
58
58
|
|
|
59
59
|
For normal use, configure the plugin in **Settings → Web search**. The card shows options for the selected engine and retrieval method. Existing engine settings use `dsh-web-search-plugin`; new API settings use `web-deepseek-api`, and provider selection uses `web` in the current profile. The tables below include advanced fields hidden from the card.
|
|
60
60
|
|
|
61
|
-
### New Search API and web
|
|
61
|
+
### New Search API and web fetch
|
|
62
62
|
|
|
63
|
-
The page reuses the official providers rather than registering duplicate implementations.
|
|
63
|
+
The page reuses the official providers rather than registering duplicate implementations. The installation default leaves `web.searchProvider` unset (follow the conversation model). Selecting a third-party engine this bundle serves sets `dsh-web-search`; DeepSeek server-side search sets the in-box `deepseek-official`; DeepSeek Search API sets `deepseek-search-api`; each also saves this plugin's `provider`. Fetch independently selects `web.fetchProvider: http` or `deepseek-fetch-api`. Existing custom fetch providers are shown and preserved until explicitly changed.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
From DSH `0.2.2-rc.2`, `web-deepseek-api` splits the credential and endpoint per capability. The card's **Credential reference** and **Base URL** rows write `searchApiKeyEnv` / `fetchApiKeyEnv` and `searchBaseURL` / `fetchBaseURL`; older Hosts still receive `apiKeyEnv` / `baseURL`. The card follows the schema the Host actually serves and never writes a field it lacks.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
**Billing** maps to the official `searchBilling` / `fetchBilling` (`Automatic` / `Account` / `API key`, default Automatic) with the official explanation: it follows the conversation's DeepSeek account or API key, prefers the API key when the conversation uses another model, and falls back to the signed-in account. Older Hosts have no such field, so the row is hidden there.
|
|
68
|
+
|
|
69
|
+
API `count` controls returned results, not requests or spending. The official advanced `sendOriginalQuestion` setting defaults to true: search sends the triggering question with whitespace normalized and at most 128 characters. It can be disabled in the official configuration; this page preserves it.
|
|
70
|
+
|
|
71
|
+
Recommended and installed default: **DeepSeek Search API + local fetch**. Search avoids an auxiliary model call. Local fetch requests the target from the device running DSH without calling paid Fetch; it reaches intranet and local addresses but runs no JavaScript and cannot read PDFs. DeepSeek Fetch is optional remote Markdown retrieval, cannot reach the intranet or this machine, and does not guarantee access to every site. Tool results still consume main-conversation tokens. No automatic engine or paid fetch fallback occurs.
|
|
68
72
|
|
|
69
73
|
See [official billing](https://api-docs.deepseek.com/zh-cn/guides/search/#计费) for current successful-request prices and conditions. Estimated costs are not presented as an actual bill.
|
|
70
74
|
|
|
71
75
|
Save writes credentials, then engine/API parameters, then the edited search/retrieval selections in a single `web` mutation. Each namespace has its own revision: this is not a transaction across namespaces. A later refusal leaves accepted writes in place, reports possible partial saving, and retains the draft for review and retry. Editing is locked during saving; Discard never writes settings.
|
|
72
76
|
|
|
73
|
-
The tables below describe the
|
|
77
|
+
The tables below describe the backends this plugin dispatches; official Search API configuration is described above.
|
|
74
78
|
|
|
75
79
|
### General settings
|
|
76
80
|
|
|
77
81
|
| Key | Default | Meaning and scope |
|
|
78
82
|
|---|---|---|
|
|
79
|
-
| `provider` | `deepseek-
|
|
80
|
-
| `maxResults` | `8` | Maximum returned sources for
|
|
83
|
+
| `provider` | `deepseek-search-api` | The card's engine choice. **Follow the conversation model** writes `deepseek-official` and leaves the actual selection to the Host per model route; a pinned engine is `deepseek-search-api` (reuses the in-box provider), `deepseek-official` (server-side search), `tavily`, `brave`, `serper`, `serpapi`, `exa`, `searxng`, `scavio`, or `firecrawl`. Each request uses only the selected backend, with no automatic failover on error. Unknown values fall back to DeepSeek server-side search |
|
|
84
|
+
| `maxResults` | `8` | Maximum returned sources for this plugin's backends (excluding the official Search API), from 1–20, also capped by the caller's `request.maxResults`. SearXNG and Scavio send no request-level count parameter; their results are truncated after retrieval and URL deduplication. The upstream response determines how many results are actually available |
|
|
81
85
|
|
|
82
86
|
### Keys and credential references
|
|
83
87
|
|
|
@@ -128,7 +132,7 @@ Clearing a text input or using “Restore default” in the card normally remove
|
|
|
128
132
|
</thead>
|
|
129
133
|
<tbody>
|
|
130
134
|
<tr>
|
|
131
|
-
<td rowspan="4"><strong>DeepSeek
|
|
135
|
+
<td rowspan="4"><strong>DeepSeek server-side search</strong></td>
|
|
132
136
|
<td><code>deepseekModel</code></td>
|
|
133
137
|
<td><code>deepseek-flash</code></td>
|
|
134
138
|
<td>Model used only for the DeepSeek search request; does not change the conversation's chat model. Must be supported by the target endpoint</td>
|
|
@@ -141,7 +145,7 @@ Clearing a text input or using “Restore default” in the card normally remove
|
|
|
141
145
|
<tr>
|
|
142
146
|
<td><code>deepseekMaxTokens</code></td>
|
|
143
147
|
<td><code>4096</code></td>
|
|
144
|
-
<td>Maximum generated tokens for one DeepSeek
|
|
148
|
+
<td>Maximum generated tokens for one DeepSeek server-side search request, a positive integer; not a conversation-wide token limit; shown under Advanced settings</td>
|
|
145
149
|
</tr>
|
|
146
150
|
<tr>
|
|
147
151
|
<td><code>deepseekMaxUses</code></td>
|
|
@@ -208,7 +212,7 @@ The startup environment variable `DSH_WEB_SEARCH_PROVIDER=dsh-web-search` select
|
|
|
208
212
|
|
|
209
213
|
## Quotas
|
|
210
214
|
|
|
211
|
-
- **DeepSeek
|
|
215
|
+
- **DeepSeek server-side search**: No quota bar. Search still makes a model request, with usage subject to your account or API billing.
|
|
212
216
|
- **Tavily keyless**: No quota bar; access is free and rate-limited.
|
|
213
217
|
- **Tavily keyed**: Requests `include_usage` during searches and accumulates credits for the current credential in memory. The Host periodically calls `GET /usage`, and the settings card supports manual refresh. Manual refreshes must be at least 10 seconds apart; automatic reconciliation is not subject to this limit. The quota comes from `account.current_plan` / `plan_limit`; usage is the larger of the local total for the current credential and the remote value. Changing keys clears the previous account's usage and triggers immediate reconciliation. Tavily quota data is no longer persisted to disk.
|
|
214
218
|
- **Brave**: No usage/spending endpoint. Dashboard **Capacity** represents the per-second window from response headers (for example, 50 requests/second). A monthly limit of `0` means unlimited requests, not an exhausted quota. Billing credits are available only in the [Brave API dashboard](https://api-dashboard.search.brave.com/).
|
|
@@ -216,15 +220,15 @@ The startup environment variable `DSH_WEB_SEARCH_PROVIDER=dsh-web-search` select
|
|
|
216
220
|
|
|
217
221
|
## Disable or uninstall
|
|
218
222
|
|
|
219
|
-
###
|
|
223
|
+
### Pin DeepSeek server-side search
|
|
220
224
|
|
|
221
|
-
|
|
225
|
+
The default follows the conversation model, so DeepSeek models already use server-side search while other models use DeepSeek Search API. To make **every model** use server-side search, select **DeepSeek server-side search** in **Settings → Web search** and save. That pins `web.searchProvider` to the in-box `deepseek-official`, so all models run through the in-box provider; the card writes its endpoint, model, and limits straight into `web-search-deepseek`. It sends an extra Messages model request: there is no per-search charge, but it may incur model invocation charges.
|
|
222
226
|
|
|
223
227
|
### Disable and restore built-in search
|
|
224
228
|
|
|
225
|
-
Use the following steps when you want to stop using this plugin and
|
|
229
|
+
Use the following steps when you want to stop using this plugin and return to Harness's own search surfaces. Pinning this plugin's DeepSeek engine and removing the plugin are separate operations.
|
|
226
230
|
|
|
227
|
-
Open **Plugins** in the sidebar and turn off the **entire `dsh-web-search-plugin` bundle**. This removes its composition layer and
|
|
231
|
+
Open **Plugins** in the sidebar and turn off the **entire `dsh-web-search-plugin` bundle**. This removes its composition layer and restores the built-in Web search & fetch settings page; the built-in DeepSeek search provider stays registered either way. Explicit provider settings saved through this page remain in the profile: review `web.searchProvider` and `web.fetchProvider` and remove the overrides to restore profile defaults. You can turn the bundle back on later.
|
|
228
232
|
|
|
229
233
|
Use the bundle's main switch: disabling only an individual component inside the bundle leaves its other configuration overrides in place. Profiles with configuration hot reload apply the change immediately; otherwise, restart Harness.
|
|
230
234
|
|
|
@@ -242,9 +246,9 @@ The same checks for manually added overrides apply after uninstallation. Explici
|
|
|
242
246
|
|
|
243
247
|
## How it works
|
|
244
248
|
|
|
245
|
-
The plugin registers a single `WebSearchProvider` with the stable ID `dsh-web-search` through `ctx.web`, following the same provider contract as `@deepseek-ai/dsh-web-search-deepseek` (`inject: ['web']` and `ctx.web.registerSearchProvider`). The
|
|
249
|
+
The plugin registers a single `WebSearchProvider` with the stable ID `dsh-web-search` through `ctx.web`, following the same provider contract as `@deepseek-ai/dsh-web-search-deepseek` (`inject: ['web']` and `ctx.web.registerSearchProvider`). The eight third-party engines share this provider; DeepSeek server-side search runs through the in-box `deepseek-official` provider, with this plugin only owning its parameters and migration. Results are normalized to `WebSearchResult` (optional `content` and `sources[]`) and deduplicated by URL. All configuration fields use `volatile()`, so saved settings are read without restarting the plugin.
|
|
246
250
|
|
|
247
|
-
This package is a **bundle**. The `dsh.bundle.patch` declaration points to `cordis.patch.yml`, which adds the Host entry,
|
|
251
|
+
This package is a **bundle**. The `dsh.bundle.patch` declaration points to `cordis.patch.yml`, which adds the Host entry, leaves `web.searchProvider` unset (follow the conversation model), and disables the `ui-settings-web-search` settings page while the bundle is enabled. That page edits the same `web` / `web-deepseek-api` seams as this plugin, so keeping both would leave two entry points for one configuration. The in-box `web-search-deepseek` provider stays registered: follow mode and DeepSeek server-side search run through it, and this plugin's `deepseek-official` engine value only survives for migrating old pins. Disabling the entire bundle removes this patch layer; disabling only its Host entry does not. Without a bundle declaration, `dsh plugin add` only adds the dependency and does not mount the plugin.
|
|
248
252
|
|
|
249
253
|
- **DeepSeek** — Calls `POST {deepseekBaseURL}/messages` with the `web_search_20250305` tool. If the session uses the official DeepSeek account route (provider: `deepseek-account`) and the account service allows the endpoint, the request uses an account token in `x-dsh-auth-token`. Otherwise, it falls back to an API key (`x-api-key` / `authorization: Bearer`, credential name: `DEEPSEEK_API_KEY`). When a session initiator is available, a redacted request is recorded as the session event `web/deepseek-search-llm-request` before dispatch.
|
|
250
254
|
- **REST backends (Tavily / Brave / Serper / SerpApi / Exa / SearXNG / Scavio / Firecrawl)** — Driven by a static metadata table (`lib/providers.js`) and a shared backend (`lib/rest.js`). Table rows define the request method, path, query field names, authentication (`bearer` / `header` / `none` / `query`), fixed parameters, and response shape. REST backends do not append custom session events.
|
package/README.zh.md
CHANGED
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | 中文
|
|
4
4
|
|
|
5
|
-
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的 Agent 提供更多联网搜索选择,沿用 Harness 原有的 `web_search` 工具。在 **设置 → 网页搜索** 一个入口中,分为
|
|
5
|
+
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的 Agent 提供更多联网搜索选择,沿用 Harness 原有的 `web_search` 工具。在 **设置 → 网页搜索** 一个入口中,分为 **网页搜索提供方**(10 个选项)和 **网页获取提供方**(本机直接获取 或 DeepSeek Fetch API),独立选择后统一保存。
|
|
6
6
|
|
|
7
7
|
## 为什么使用本插件?
|
|
8
8
|
|
|
9
9
|
- **减少搜索时额外的 DeepSeek 模型调用。** 新版 DeepSeek Search API 和 8 个第三方后端直接请求搜索 API,不经过 DeepSeek 官方的模型搜索接口,因此不会产生该次搜索请求额外的 DeepSeek 模型 token 消耗。(对话本身和模型读取搜索结果仍会消耗 token,搜索服务也可能单独收取费用或扣除额度。)
|
|
10
|
-
- **在设置卡片中完成配置。** 在 **设置 → 网页搜索**
|
|
10
|
+
- **在设置卡片中完成配置。** 在 **设置 → 网页搜索** 中切换搜索与获取提供方、填写密钥、调整结果数量,保存后下一次搜索即可生效,无需重启插件或编辑 YAML。
|
|
11
11
|
- **按需求选择搜索服务。** 可以通过 Serper 获取 Google 结果,使用 Exa 进行语义搜索,或接入自建 SearXNG。Tavily 的 keyless 模式无需账号和 API key,方便先体验。
|
|
12
|
-
-
|
|
12
|
+
- **对齐官方配置项。** 提供方名称、说明文字和默认值与 DSH 自带的 **网页搜索与获取** 页面一致:默认跟随会话模型,抓取默认由本机直接获取。
|
|
13
|
+
- **保留已有引擎与设置。** DeepSeek 服务端搜索(Messages)和第三方引擎继续可用,搜索与获取独立选择;移除已保存的提供方覆盖前,请参考[停用或卸载](#停用或卸载)。
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
**默认跟随会话模型**(与 DSH `0.2.2-rc.5` 默认一致):不固定搜索提供方,由 Host 按模型路由选择。DeepSeek 模型请求使用 **DeepSeek 服务端搜索**(`deepseek-official`,搜索不按次收费,但每次会发起一轮 Messages 请求、消耗模型 token);其他模型以及不来自模型请求的搜索使用 **DeepSeek Search API**(`deepseek-search-api`,按次计费,无辅助模型轮次)。也可在卡片中固定任一引擎,固定后对所有模型生效。
|
|
15
16
|
|
|
16
17
|
## 支持的搜索后端
|
|
17
18
|
|
|
18
|
-
- **DeepSeek Search API
|
|
19
|
-
- **DeepSeek
|
|
19
|
+
- **DeepSeek Search API(非 DeepSeek 模型的默认)** — 复用 DSH 官方 `deepseek-search-api`,直接请求 `/v1/tools/search`,无辅助模型轮次。结果数使用官方 `count`(1–50,默认 10),计费方由官方 `searchBilling`(自动 / 账号 / API Key,默认自动)决定。不读取本插件的 `maxResults`。
|
|
20
|
+
- **DeepSeek 服务端搜索** — 使用 DeepSeek 的 Anthropic 兼容 Messages API,原生搜索工具类型为 `web_search_20250305`,账号模型发起的请求用已登录账号,其他请求用 `DEEPSEEK_API_KEY`。每次搜索会发起模型请求:搜索不按次收费,但可能产生模型调用费用。
|
|
20
21
|
- **Tavily** — `keyless`(免费、限流、无需账号)或 `keyed`(`TAVILY_API_KEY`,Bearer token)。keyed 会在设置卡显示额度进度条。
|
|
21
22
|
- **Brave Search** — `GET https://api.search.brave.com/res/v1/web/search`,请求头 `X-Subscription-Token`(凭据名 `BRAVE_API_KEY`)。一次搜索就是一次 HTTP 请求,不走模型轮次;设置卡按响应头展示 Capacity / 月配额。
|
|
22
23
|
- **Serper** — Google 结果(`POST /search`,头 `X-API-KEY`,凭据名 `SERPER_API_KEY`)。
|
|
@@ -30,10 +31,10 @@
|
|
|
30
31
|
|
|
31
32
|
## 运行要求
|
|
32
33
|
|
|
33
|
-
- 已在 DeepSeek Harness `0.2.2-rc.
|
|
34
|
-
-
|
|
35
|
-
- DSH `0.2.2` 的 RC
|
|
36
|
-
- 支持工具就绪检查的 Host 会在缺少所需凭据时隐藏插件搜索工具;Tavily keyless 与 SearXNG 无需密钥。DeepSeek
|
|
34
|
+
- 已在 DeepSeek Harness `0.2.2-rc.5` 的实际依赖上验证打包安装、Host 搜索接缝、配置切换、跟随模式的路由选择与凭据就绪判断;更早的 RC 不再受支持。供应商 HTTP 使用模拟响应,不代表真实账号联网或桌面设置页端到端验证。
|
|
35
|
+
- 依赖范围为 `0.2.2-rc.5` 及以上;`0.2.1-rc.2`、`0.2.2-alpha.3` 与 `0.2.2-rc.4` 没有按模型路由选择搜索提供方的能力,无法支持跟随模式。
|
|
36
|
+
- DSH `0.2.2` 的 RC 要求 Node.js `>=24.9.0`;插件本身仍声明 `^22.19.0` 或 `>=24.0.0` 的运行范围。
|
|
37
|
+
- 支持工具就绪检查的 Host 会在缺少所需凭据时隐藏插件搜索工具;Tavily keyless 与 SearXNG 无需密钥。DeepSeek 服务端搜索按请求携带的模型路由(`llmProvider`)判断账号令牌与 API key,不联网校验密钥有效性。
|
|
37
38
|
- pnpm,用于通过 `dsh plugin` 把插件装进 profile
|
|
38
39
|
|
|
39
40
|
## 安装
|
|
@@ -47,9 +48,9 @@ dsh plugin --profile web add dsh-web-search-plugin
|
|
|
47
48
|
安装后,在 Harness Web 界面中完成配置:
|
|
48
49
|
|
|
49
50
|
1. 打开 **设置 → 网页搜索**,找到本插件的设置卡片。侧栏的 **插件** 页面负责启用或停用组合包,引擎参数在设置卡片中配置。
|
|
50
|
-
2.
|
|
51
|
+
2. 选择网页搜索提供方。默认是**跟随会话模型**;也可固定 DeepSeek Search API、DeepSeek 服务端搜索、Tavily、Brave、Serper、SerpApi、Exa、SearXNG、Scavio 或 Firecrawl。
|
|
51
52
|
3. 按需填写所选引擎的 API key,需要密钥的引擎会显示「获取 API key ↗」,点击即可打开官方控制台。Tavily 免 key 使用时选择 `keyless`;SearXNG 填写已启用 JSON 搜索的实例地址,这两种免 key 方式不显示密钥获取链接。已有凭据可以复用,例如 Brave 的 `BRAVE_API_KEY`。
|
|
52
|
-
4. 在
|
|
53
|
+
4. 在 **网页获取提供方** 中选择本机直接获取(默认)或 DeepSeek Fetch API。更换搜索提供方不会更改获取方式。
|
|
53
54
|
5. 调整参数并点击页面底部的 **保存**;保存前只修改草稿,下一次操作使用已保存配置。
|
|
54
55
|
|
|
55
56
|
> 从源码仓库本地安装(含 Windows 跨盘注意事项)见 [开发 → 本地安装与验证](#本地安装与验证)。
|
|
@@ -58,26 +59,30 @@ dsh plugin --profile web add dsh-web-search-plugin
|
|
|
58
59
|
|
|
59
60
|
日常使用在 **设置 → 网页搜索** 的卡片中配置即可。原有引擎参数保存在当前 Profile 的 `dsh-web-search-plugin`,新版 API 参数保存在 `web-deepseek-api`,提供方选择保存在 `web`。下表包含卡片中隐藏的高级字段,并非所有字段都会同时显示。
|
|
60
61
|
|
|
61
|
-
### 新版 Search API
|
|
62
|
+
### 新版 Search API 与网页获取
|
|
62
63
|
|
|
63
|
-
页面复用官方提供方,不重复注册 Search / Fetch
|
|
64
|
+
页面复用官方提供方,不重复注册 Search / Fetch。安装默认不固定 `web.searchProvider`(跟随会话模型);选择本插件的第三方引擎时设为 `dsh-web-search`,选择 DeepSeek 服务端搜索时设为内置 `deepseek-official`,选择 DeepSeek Search API 时设为 `deepseek-search-api`,同时保存本插件的 `provider`。`web.fetchProvider` 独立选择 `http` 或 `deepseek-fetch-api`。已有自定义获取提供方会显示并保留,除非用户主动更改。
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
`web-deepseek-api` 在 DSH `0.2.2-rc.2` 起把凭据与地址拆成按能力分开的字段。卡片的「凭据引用名」和「基础地址」会同时写入 `searchApiKeyEnv` / `fetchApiKeyEnv` 与 `searchBaseURL` / `fetchBaseURL`;更早的 Host 仍写 `apiKeyEnv` / `baseURL`。卡片按 Host 实际提供的 schema 自动切换,不会向不存在的字段写入。
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
「计费方式」对应官方 `searchBilling` / `fetchBilling`(自动 / 账号 / API Key,默认自动),说明文字与官方页面一致:跟随当前会话的 DeepSeek 账号或 API Key;会话用其他模型时,优先用 API Key,没有则用已登录账号。旧版 Host 没有这两个字段,卡片不显示该行。
|
|
69
|
+
|
|
70
|
+
`count` 只控制新版搜索的结果数,不是请求次数或费用上限。官方高级配置 `sendOriginalQuestion` 默认开启,搜索时会发送经规整且最多 128 字符的触发问题;可在官方配置中关闭,本页面保留该值。
|
|
71
|
+
|
|
72
|
+
默认组合为 **跟随会话模型 + 本机直接获取**。DeepSeek 模型的搜索走服务端搜索,其他模型走 Search API;本机直接获取从运行 DSH 的设备访问目标网站,不调用收费 Fetch API,可访问内网和本机但不能执行页面 JavaScript,也不支持 PDF。DeepSeek Fetch 是可选的远端 Markdown 抓取,无法访问内网和本机,不保证能读取所有网站。工具结果交给主模型后仍占用会话 token。没有自动切换引擎或付费获取兜底。
|
|
68
73
|
|
|
69
74
|
[官方计费说明](https://api-docs.deepseek.com/zh-cn/guides/search/#计费):Search / Fetch 均按成功且产生结果的请求收费;价格请以官方文档为准。界面不将估算金额当作实际账单。
|
|
70
75
|
|
|
71
76
|
一次保存会先写凭据,再写引擎和 API 参数,最后用一个 `web` mutation 提交本次修改的搜索/抓取选择。每个命名空间有独立 revision,跨命名空间不是事务;若后续步骤失败,已接受的写入不会自动回滚,页面会提示可能部分保存并保留草稿以便重试。保存期间锁定编辑,放弃修改不触发写入。
|
|
72
77
|
|
|
73
|
-
|
|
78
|
+
下面的配置表描述本插件调度的后端;官方 Search API 的配置位置如上。
|
|
74
79
|
|
|
75
80
|
### 通用配置
|
|
76
81
|
|
|
77
82
|
| 键 | 默认值 | 含义与范围 |
|
|
78
83
|
|---|---|---|
|
|
79
|
-
| `provider` | `deepseek-
|
|
80
|
-
| `maxResults` | `8` |
|
|
84
|
+
| `provider` | `deepseek-search-api` | 卡片上的引擎选择。**跟随会话模型**时写入 `deepseek-official`,实际选择由 Host 按模型路由决定;固定引擎时取 `deepseek-search-api`(复用官方提供方)、`deepseek-official`(DeepSeek 服务端搜索)、`tavily`、`brave`、`serper`、`serpapi`、`exa`、`searxng`、`scavio` 或 `firecrawl`。一次请求只使用所选后端,不会在失败后自动切换到其他后端;未知值会回退到 DeepSeek 服务端搜索 |
|
|
85
|
+
| `maxResults` | `8` | 本插件后端的返回源数量上限(不含官方 Search API),范围 1–20,同时受调用方 `request.maxResults` 上限约束。SearXNG 和 Scavio 不发送请求级数量参数,只在收到响应并按 URL 去重后截取;实际可返回的数量取决于上游结果 |
|
|
81
86
|
|
|
82
87
|
### 密钥与凭据引用
|
|
83
88
|
|
|
@@ -128,10 +133,10 @@ DeepSeek 官方账号会话(provider 为 `deepseek-account`)会优先尝试
|
|
|
128
133
|
</thead>
|
|
129
134
|
<tbody>
|
|
130
135
|
<tr>
|
|
131
|
-
<td rowspan="4"><strong>DeepSeek
|
|
136
|
+
<td rowspan="4"><strong>DeepSeek 服务端搜索</strong></td>
|
|
132
137
|
<td><code>deepseekModel</code></td>
|
|
133
138
|
<td><code>deepseek-flash</code></td>
|
|
134
|
-
<td>仅 DeepSeek
|
|
139
|
+
<td>仅 DeepSeek 服务端搜索搜索请求使用的模型名,不会修改会话的聊天模型;需由目标端点支持;设置卡收在「高级设置」中</td>
|
|
135
140
|
</tr>
|
|
136
141
|
<tr>
|
|
137
142
|
<td><code>deepseekApiVersion</code></td>
|
|
@@ -141,12 +146,12 @@ DeepSeek 官方账号会话(provider 为 `deepseek-account`)会优先尝试
|
|
|
141
146
|
<tr>
|
|
142
147
|
<td><code>deepseekMaxTokens</code></td>
|
|
143
148
|
<td><code>4096</code></td>
|
|
144
|
-
<td>单次 DeepSeek
|
|
149
|
+
<td>单次 DeepSeek 服务端搜索搜索请求的生成 token 上限,正整数;不是整个对话的 token 上限;设置卡收在「高级设置」中</td>
|
|
145
150
|
</tr>
|
|
146
151
|
<tr>
|
|
147
152
|
<td><code>deepseekMaxUses</code></td>
|
|
148
153
|
<td><code>5</code></td>
|
|
149
|
-
<td>单次 DeepSeek
|
|
154
|
+
<td>单次 DeepSeek 服务端搜索请求允许的服务端搜索次数上限,须为正整数,默认 5;不是引擎重试次数或结果数量</td>
|
|
150
155
|
</tr>
|
|
151
156
|
<tr>
|
|
152
157
|
<td rowspan="4"><strong>Tavily</strong></td>
|
|
@@ -208,7 +213,7 @@ DeepSeek 官方账号会话(provider 为 `deepseek-account`)会优先尝试
|
|
|
208
213
|
|
|
209
214
|
## 额度
|
|
210
215
|
|
|
211
|
-
- **DeepSeek
|
|
216
|
+
- **DeepSeek 服务端搜索**:不展示额度条。仍会发起模型搜索请求,用量按所用账号或 API 的计费规则处理。
|
|
212
217
|
- **Tavily keyless**:不展示额度条,免费且有限流。
|
|
213
218
|
- **Tavily keyed**:搜索时请求 `include_usage`,在内存中累加当前凭据的 credits。Host 定时调用 `GET /usage`,设置卡也可手动刷新;手动刷新之间至少间隔 10 秒,自动对账不受此限制。用 `account.current_plan` / `plan_limit` 做限额,用量取当前凭据的本地累计与远端的较大值;换 key 时清空旧账户用量并立即重新对账。旧 Tavily 额度不再持久化到磁盘。
|
|
214
219
|
- **Brave**:没有 usage / 花费接口。控制台 **Capacity** 就是响应头里的每秒窗口(例如 50 次/秒)。月限额 `0` 表示不限请求次数,不是额度用完。计费 credits 只能看 [Brave API 控制台](https://api-dashboard.search.brave.com/)。
|
|
@@ -216,19 +221,19 @@ DeepSeek 官方账号会话(provider 为 `deepseek-account`)会优先尝试
|
|
|
216
221
|
|
|
217
222
|
## 停用或卸载
|
|
218
223
|
|
|
219
|
-
###
|
|
224
|
+
### 固定为 DeepSeek 服务端搜索
|
|
220
225
|
|
|
221
|
-
|
|
226
|
+
默认跟随会话模型,DeepSeek 模型已经使用服务端搜索;其他模型走 DeepSeek Search API。若希望**所有模型**都使用服务端搜索,在 **设置 → 网页搜索** 中选择 **DeepSeek 服务端搜索** 并保存。这会把 `web.searchProvider` 固定为内置的 `deepseek-official`,所有模型都走内置 DeepSeek 提供方;它会额外发起 Messages 模型请求:搜索不按次收费,但可能产生模型调用费用。卡片里的 DeepSeek 端点、模型与次数直接写入该提供方的 `web-search-deepseek` 配置。
|
|
222
227
|
|
|
223
228
|
### 停用并恢复内置搜索
|
|
224
229
|
|
|
225
|
-
若希望停用本插件、恢复 Harness
|
|
230
|
+
若希望停用本插件、恢复 Harness 原装的搜索插件与「网页搜索与获取」设置页,再执行以下操作。切换到本插件中的 DeepSeek 引擎与恢复原装插件是两种不同操作。
|
|
226
231
|
|
|
227
|
-
打开侧栏 **插件** 页面,关闭 **整个 `dsh-web-search-plugin`
|
|
232
|
+
打开侧栏 **插件** 页面,关闭 **整个 `dsh-web-search-plugin` 组合包的开关**。这会撤销该组合层,并恢复内置「网页搜索与获取」设置页(内置 DeepSeek 提供方由组合包保持注册,不受影响)。本页面显式保存的提供方选择仍保留在 Profile 中:需检查 `web.searchProvider` 与 `web.fetchProvider`,移除覆盖才能完整恢复 Profile 默认值;之后也可以重新打开组合包。
|
|
228
233
|
|
|
229
234
|
请使用组合包的总开关:仅关闭包内某个组件,其他配置覆盖仍会保留。启用配置热更新的 Profile 会立即应用改动,否则需要重启 Harness。
|
|
230
235
|
|
|
231
|
-
|
|
236
|
+
组合包不固定 `web.searchProvider`,默认跟随会话模型。如果曾手工改成 `dsh-web-search`、设置 `DSH_WEB_SEARCH_PROVIDER=dsh-web-search`,或另行禁用内置 DeepSeek 插件,还需移除或恢复这些覆盖。组合包开关不会撤销你单独添加的配置。
|
|
232
237
|
|
|
233
238
|
### 卸载安装包
|
|
234
239
|
|
|
@@ -242,9 +247,9 @@ dsh plugin --profile web remove dsh-web-search-plugin
|
|
|
242
247
|
|
|
243
248
|
## 工作方式
|
|
244
249
|
|
|
245
|
-
本插件通过 `ctx.web` 注册一个稳定 id 为 `dsh-web-search` 的 `WebSearchProvider`,遵循与官方 `@deepseek-ai/dsh-web-search-deepseek` 相同的提供方约定(`inject: ['web']` 和 `ctx.web.registerSearchProvider
|
|
250
|
+
本插件通过 `ctx.web` 注册一个稳定 id 为 `dsh-web-search` 的 `WebSearchProvider`,遵循与官方 `@deepseek-ai/dsh-web-search-deepseek` 相同的提供方约定(`inject: ['web']` 和 `ctx.web.registerSearchProvider`)。八个第三方引擎由该提供方内部调度;DeepSeek 服务端搜索由内置 `deepseek-official` 提供方执行,本插件只负责它的参数与迁移。各引擎结果规范化为 `WebSearchResult`(可选 `content` 和 `sources[]`),按 URL 去重。全部配置字段声明为 `volatile()`,保存后无需重启插件即可读取新配置。
|
|
246
251
|
|
|
247
|
-
本包是 **bundle**:`dsh.bundle.patch` 声明指向 `cordis.patch.yml`,组合包启用时会插入 Host
|
|
252
|
+
本包是 **bundle**:`dsh.bundle.patch` 声明指向 `cordis.patch.yml`,组合包启用时会插入 Host 行、不固定搜索提供方(默认跟随会话模型),并禁用内置的 `ui-settings-web-search` 设置页——该页与本插件页面配置同一对 `web` / `web-deepseek-api` 接缝,保留两个入口只会造成重复配置。内置 `web-search-deepseek` 保持注册,跟随模式与「DeepSeek 服务端搜索」由它执行;本插件的 `deepseek-official` 引擎值仅用于旧配置迁移。关闭整个组合包会移除这一补丁层,仅关闭其中的 Host 行则不会。没有 bundle 声明时,`dsh plugin add` 只写入依赖,插件不会挂载。
|
|
248
253
|
|
|
249
254
|
- **DeepSeek** — `POST {deepseekBaseURL}/messages`,工具 `web_search_20250305`。会话运行在 DeepSeek 官方账号路由(provider 为 `deepseek-account`)且账号服务允许该端点时,用账号令牌发 `x-dsh-auth-token`;否则回落到 API key(`x-api-key` / `authorization: Bearer`,凭据名 `DEEPSEEK_API_KEY`)。有会话发起者时,在派发前把脱敏请求记录为会话事件 `web/deepseek-search-llm-request`。
|
|
250
255
|
- **纯 REST 类(Tavily / Brave / Serper / SerpApi / Exa / SearXNG / Scavio / Firecrawl)** — 由静态元数据表(`lib/providers.js`)+ 通用后端(`lib/rest.js`)驱动。请求方法 / 路径 / 查询字段名 / 鉴权(bearer / header / none / query)/ 固定参数 / 响应形态由表中的行决定。REST 后端不追加自定义会话事件。
|
|
@@ -268,7 +273,7 @@ lib/shared.js 中止 / 凭据解析辅助
|
|
|
268
273
|
lib/client.js 浏览器 bundle:设置分区 + 引擎切换 + 官方 key 跳转 + 额度条
|
|
269
274
|
locale/en.json 插件列表页 / 详情页的英文标题与描述
|
|
270
275
|
locale/zh.json 同上,中文
|
|
271
|
-
cordis.patch.yml Bundle patch:插入 Host
|
|
276
|
+
cordis.patch.yml Bundle patch:插入 Host 行、不固定 searchProvider、禁用内置设置页
|
|
272
277
|
```
|
|
273
278
|
|
|
274
279
|
## 开发
|
package/assets/detail/en.md
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
# Web search
|
|
1
|
+
# Web search & fetch
|
|
2
2
|
|
|
3
|
-
Give your DeepSeek Harness agent more ways to search the web through the familiar `web_search` tool. Choose search and
|
|
3
|
+
Give your DeepSeek Harness agent more ways to search the web through the familiar `web_search` tool. Choose the web search provider and the web fetch method independently, then save both in one settings page.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
## Choose how to search
|
|
8
8
|
|
|
9
9
|
- **Call a search API directly**: DeepSeek Search API, Tavily, Brave Search, Serper, SerpApi, Exa, SearXNG, Scavio, or Firecrawl.
|
|
10
|
-
- **Keep the default**: DeepSeek
|
|
10
|
+
- **Keep the official default (recommended)**: follow the conversation model. DeepSeek models use server-side search and every other model uses DeepSeek Search API, ready after install.
|
|
11
|
+
- **Pin server-side search**: every model uses DeepSeek server-side search, where models on the account route use the signed-in account and every other request uses the API key.
|
|
11
12
|
- **Try without a key**: choose Tavily `keyless`, or a SearXNG instance with JSON output enabled. Public services may apply rate limits.
|
|
12
13
|
|
|
13
14
|
## Get started in three steps
|
|
14
15
|
|
|
15
16
|
1. Enable the plugin and open **Settings → Web search**.
|
|
16
|
-
2. Choose a search
|
|
17
|
+
2. Choose a web search provider and supply credentials when needed. Under **Web fetch provider**, independently choose local fetch (the default) or DeepSeek Fetch API.
|
|
17
18
|
3. Click **Save**. The next search or retrieval uses the saved settings.
|
|
18
19
|
|
|
19
|
-
The default
|
|
20
|
+
The default **follows the conversation model**, matching DSH `0.2.2-rc.5`: DeepSeek models use server-side search (no per-search charge, model tokens apply) and every other model uses DeepSeek Search API (billed per search). You can also pin any engine in the card. Billing for both Search API and server-side DeepSeek can be Automatic, Account, or API key. New API options are available only when the Host provides the required configuration.
|
|
20
21
|
|
|
21
22
|
## Costs and credentials
|
|
22
23
|
|
|
23
|
-
Direct search API calls do not make an additional DeepSeek search model request, but the search service
|
|
24
|
+
Direct search API calls do not make an additional DeepSeek search model request, but the search service charges separately, paid by the account or API key chosen under Billing. Your conversation and the model reading search results still consume tokens. DeepSeek server-side search makes a model request: there is no per-search charge, but it may incur model charges. Local fetch is free and reaches the intranet and this machine, but runs no JavaScript and cannot read PDFs. Check the provider's terms for DeepSeek Fetch API charges.
|
|
24
25
|
|
|
25
26
|
Engines that require a key provide an API key link in settings. Enter your key and save; the plugin uses DSH credential management. Keyless access still has service limits.
|
|
26
27
|
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="460" viewBox="0 0 960 460" role="img" aria-labelledby="title desc" lang="en">
|
|
2
|
-
<title id="title">Choose search and
|
|
2
|
+
<title id="title">Choose search and fetch independently</title><desc id="desc">Configure both in Settings → Web search. Saved settings apply to the next search or fetch. Feature diagram · not a screenshot</desc>
|
|
3
3
|
<defs><linearGradient id="bg" x2="1" y2="1"><stop stop-color="#f1f8ff"/><stop offset="1" stop-color="#ecfaf4"/></linearGradient><linearGradient id="accent" x2="1" y2="1"><stop stop-color="#2563eb"/><stop offset="1" stop-color="#0d9488"/></linearGradient></defs>
|
|
4
4
|
<rect width="960" height="460" rx="24" fill="url(#bg)"/>
|
|
5
5
|
<g font-family="Segoe UI, Microsoft YaHei, Noto Sans CJK SC, sans-serif" fill="#163b46">
|
|
6
6
|
<rect x="32" y="32" width="7" height="54" rx="3.5" fill="url(#accent)"/>
|
|
7
|
-
<text x="56" y="57" font-size="28" font-weight="700">Choose search and
|
|
7
|
+
<text x="56" y="57" font-size="28" font-weight="700">Choose search and fetch independently</text><text x="56" y="85" font-size="16" fill="#506a75">Configure both in Settings → Web search</text>
|
|
8
8
|
<rect x="32" y="116" width="438" height="210" rx="18" fill="#fff" stroke="#d8e6ec"/>
|
|
9
9
|
<rect x="490" y="116" width="438" height="210" rx="18" fill="#fff" stroke="#d8e6ec"/>
|
|
10
|
-
<circle cx="
|
|
11
|
-
<text x="
|
|
12
|
-
<rect x="
|
|
13
|
-
<text x="56" y="291" font-size="17" >
|
|
14
|
-
<circle cx="
|
|
15
|
-
<text x="
|
|
16
|
-
<rect x="
|
|
10
|
+
<circle cx="71" cy="153" r="15" fill="#e8f1ff"/><text x="65" y="159" font-size="16" text-anchor="middle" font-weight="700" fill="#2563eb">1</text>
|
|
11
|
+
<text x="96" y="160" font-size="22" font-weight="600">Web search provider</text><text x="56" y="191" font-size="15" fill="#607480">11 options · credentials when needed</text>
|
|
12
|
+
<rect x="46" y="214" width="400" height="38" rx="9" fill="#eef5ff"/><text x="56" y="239" font-size="17" fill="#245fa3">Follow the conversation model (default)</text>
|
|
13
|
+
<text x="56" y="291" font-size="17" >Search API / server-side search / 8 engines</text>
|
|
14
|
+
<circle cx="529" cy="153" r="15" fill="#e4f7ef"/><text x="523" y="159" font-size="16" text-anchor="middle" font-weight="700" fill="#0d8477">2</text>
|
|
15
|
+
<text x="554" y="160" font-size="22" font-weight="600">Web fetch provider</text><text x="514" y="191" font-size="15" fill="#607480">Independent of the search provider</text>
|
|
16
|
+
<rect x="504" y="214" width="400" height="38" rx="9" fill="#eaf8f2"/><text x="514" y="239" font-size="17" fill="#087b6d">Local fetch (default)</text><text x="514" y="291" font-size="17" >DeepSeek Fetch API</text>
|
|
17
17
|
<path d="M251 326v21h458v-21M480 347v16" fill="none" stroke="#91b6b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
18
|
<rect x="414" y="363" width="132" height="44" rx="12" fill="url(#accent)"/><text x="480" y="391" font-size="18" fill="#fff" text-anchor="middle" font-weight="600">Save</text>
|
|
19
|
-
<text x="564" y="390" font-size="
|
|
19
|
+
<text x="564" y="390" font-size="14" fill="#48626e">Saved settings apply to the next search or fetch</text><text x="32" y="435" font-size="12" fill="#617d87">Feature diagram · not a screenshot</text>
|
|
20
20
|
</g></svg>
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="460" viewBox="0 0 960 460" role="img" aria-labelledby="title desc" lang="zh">
|
|
2
|
-
<title id="title"
|
|
2
|
+
<title id="title">网页搜索与获取,各自选择</title><desc id="desc">在「设置 → 网页搜索」中配置,统一保存. 下一次搜索或获取使用已保存的设置. 功能示意 · 非实际界面截图</desc>
|
|
3
3
|
<defs><linearGradient id="bg" x2="1" y2="1"><stop stop-color="#f1f8ff"/><stop offset="1" stop-color="#ecfaf4"/></linearGradient><linearGradient id="accent" x2="1" y2="1"><stop stop-color="#2563eb"/><stop offset="1" stop-color="#0d9488"/></linearGradient></defs>
|
|
4
4
|
<rect width="960" height="460" rx="24" fill="url(#bg)"/>
|
|
5
5
|
<g font-family="Microsoft YaHei, sans-serif" fill="#163b46">
|
|
6
6
|
<rect x="32" y="32" width="7" height="54" rx="3.5" fill="url(#accent)"/>
|
|
7
|
-
<text x="56" y="57" font-size="28" font-weight="700"
|
|
7
|
+
<text x="56" y="57" font-size="28" font-weight="700">网页搜索与获取,各自选择</text><text x="56" y="85" font-size="16" fill="#506a75">在「设置 → 网页搜索」中配置,统一保存</text>
|
|
8
8
|
<rect x="32" y="116" width="438" height="210" rx="18" fill="#fff" stroke="#d8e6ec"/>
|
|
9
9
|
<rect x="490" y="116" width="438" height="210" rx="18" fill="#fff" stroke="#d8e6ec"/>
|
|
10
|
-
<circle cx="
|
|
11
|
-
<text x="
|
|
12
|
-
<rect x="
|
|
13
|
-
<text x="56" y="291" font-size="17" >
|
|
14
|
-
<circle cx="
|
|
15
|
-
<text x="
|
|
16
|
-
<rect x="
|
|
10
|
+
<circle cx="71" cy="153" r="15" fill="#e8f1ff"/><text x="65" y="159" font-size="16" text-anchor="middle" font-weight="700" fill="#2563eb">1</text>
|
|
11
|
+
<text x="96" y="160" font-size="22" font-weight="600">网页搜索提供方</text><text x="56" y="191" font-size="15" fill="#607480">11 个选项 · 按需填写凭据</text>
|
|
12
|
+
<rect x="46" y="214" width="400" height="38" rx="9" fill="#eef5ff"/><text x="56" y="239" font-size="17" fill="#245fa3">跟随会话模型(默认)</text>
|
|
13
|
+
<text x="56" y="291" font-size="17" >Search API / 服务端搜索 / 8 个引擎</text>
|
|
14
|
+
<circle cx="529" cy="153" r="15" fill="#e4f7ef"/><text x="523" y="159" font-size="16" text-anchor="middle" font-weight="700" fill="#0d8477">2</text>
|
|
15
|
+
<text x="554" y="160" font-size="22" font-weight="600">网页获取提供方</text><text x="514" y="191" font-size="15" fill="#607480">独立于搜索提供方</text>
|
|
16
|
+
<rect x="504" y="214" width="400" height="38" rx="9" fill="#eaf8f2"/><text x="514" y="239" font-size="17" fill="#087b6d">本机直接获取(默认)</text><text x="514" y="291" font-size="17" >DeepSeek Fetch API</text>
|
|
17
17
|
<path d="M251 326v21h458v-21M480 347v16" fill="none" stroke="#91b6b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
18
|
<rect x="414" y="363" width="132" height="44" rx="12" fill="url(#accent)"/><text x="480" y="391" font-size="18" fill="#fff" text-anchor="middle" font-weight="600">保存</text>
|
|
19
|
-
<text x="564" y="390" font-size="15" fill="#48626e"
|
|
19
|
+
<text x="564" y="390" font-size="15" fill="#48626e">下一次搜索或获取使用已保存的设置</text><text x="32" y="435" font-size="12" fill="#617d87">功能示意 · 非实际界面截图</text>
|
|
20
20
|
</g></svg>
|