dsh-web-search-plugin 0.6.1 → 0.7.1
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 +38 -0
- package/README.md +22 -18
- package/README.zh.md +32 -27
- 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 +25 -12
- package/lib/client.js +171 -61
- package/lib/index.js +15 -2
- package/lib/shared.js +1 -1
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
## [未发布]
|
|
6
6
|
|
|
7
|
+
## [0.7.1] - 2026-11-18
|
|
8
|
+
|
|
9
|
+
### 变更
|
|
10
|
+
|
|
11
|
+
- 组合层禁用内置的「网页搜索与获取」设置页(`ui-settings-web-search`)。该页与本插件页面编辑同一对 `web` / `web-deepseek-api` 接缝,同时保留两个入口会让用户重复配置,也会让插件列表出现两个同名条目;插件启用时只保留本插件一个入口。关闭或卸载整个组合包会撤销该行,内置页面随之恢复。
|
|
12
|
+
- 搜索提供方补充 `title` 与中英 `description`,provider 选择器不再显示裸 ID `dsh-web-search`。
|
|
13
|
+
- 计费方式选项对齐官方措辞:自动 / 已登录的 DeepSeek 账号 / DeepSeek API Key,并按当前选择显示对应说明(需要先登录 DeepSeek 账号、使用「模型」页配置的 API Key)。
|
|
14
|
+
- 指南链接文案改为「网页搜索与获取指南」。
|
|
15
|
+
- 包版本与 User-Agent 更新为 `0.7.1`。
|
|
16
|
+
|
|
17
|
+
## [0.7.0] - 2026-11-18
|
|
18
|
+
|
|
19
|
+
### 破坏性变更
|
|
20
|
+
|
|
21
|
+
- 默认搜索提供方由 DeepSeek Messages 搜索改为 **DeepSeek Search API**,与 DSH `0.2.2` 自带的「网页搜索与获取」页一致;组合包默认把 `web.searchProvider` 设为 `deepseek-search-api`。
|
|
22
|
+
- 该默认需要 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(旧版)** 即可。
|
|
23
|
+
|
|
24
|
+
### 新增
|
|
25
|
+
|
|
26
|
+
- 设置卡新增「计费方式」下拉(自动 / 账号 / API Key,默认自动),写入官方 `searchBilling` / `fetchBilling`,说明文字与官方一致:跟随当前会话的 DeepSeek 账号或 API Key;会话用其他模型时,优先用 API Key,没有则用已登录账号。
|
|
27
|
+
- 搜索与获取两个区块分别显示各自能力的计费方式;旧版 Host 没有该字段时不显示该行。
|
|
28
|
+
|
|
29
|
+
### 修复
|
|
30
|
+
|
|
31
|
+
- 修复 DSH `0.2.2-rc.2` 及以上「DeepSeek Search API / Fetch API」配置区保存失败:官方把 `apiKey` / `apiKeyEnv` / `baseURL` 换成按能力拆分的字段后,插件继续写旧字段会被 `dsh-settings` 拒绝(`Config field "apiKey" is not volatile`)。
|
|
32
|
+
- 卡片按 Host 实际提供的 schema 自动切换:新版写 `searchApiKeyEnv` / `fetchApiKeyEnv` 与 `searchBaseURL` / `fetchBaseURL`,旧版继续写 `apiKeyEnv` / `baseURL`;新版不再渲染没有对应槽位的字面 API Key 行。
|
|
33
|
+
|
|
34
|
+
### 变更
|
|
35
|
+
|
|
36
|
+
- 术语与说明文字对齐官方页面:网页搜索提供方 / 网页获取提供方、DeepSeek(旧版)、本机直接获取、单次请求最多搜索次数;补充「本机直接获取」的能力边界与 Fetch API 的计费说明。
|
|
37
|
+
- 提供方下拉下方改为显示当前选中提供方的一句话说明,DuckDuckGo 提示只在选择 SearXNG 时出现。
|
|
38
|
+
- 旧版 DeepSeek 的「模型」「最大 token」收进「高级设置」折叠区。
|
|
39
|
+
- 包版本与 User-Agent 更新为 `0.7.0`。
|
|
40
|
+
|
|
41
|
+
### 兼容性
|
|
42
|
+
|
|
43
|
+
- 在 `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 的字段映射与计费行显隐。
|
|
44
|
+
|
|
7
45
|
## [0.6.1] - 2026-11-10
|
|
8
46
|
|
|
9
47
|
### 文档
|
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
9
|
- **Avoid an extra DeepSeek model call for search.** 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.** Messages search and third-party engines remain available. Search and
|
|
12
|
+
- **Keep existing engines and settings.** Legacy Messages search 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 search provider is DeepSeek Search API**, matching the Harness default: it reuses the in-box `deepseek-search-api` and adds no auxiliary model call. To use legacy search instead, select **DeepSeek (legacy)** in the card; it sends an extra Messages request and may incur model invocation charges.
|
|
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 (legacy)** — 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 and 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`).
|
|
@@ -31,7 +31,7 @@ For DuckDuckGo results, choose a SearXNG instance that aggregates DuckDuckGo. Du
|
|
|
31
31
|
## Requirements
|
|
32
32
|
|
|
33
33
|
- Isolated checks use the actual dependencies of DeepSeek Harness `0.2.2-rc.1`, `0.2.2-alpha.3`, and older `0.2.1-rc.5`, covering packed installation, the Host web seam, configuration changes, and credential readiness. Supplier HTTP responses are mocked; this does not verify live accounts or the Desktop settings UI end to end.
|
|
34
|
-
-
|
|
34
|
+
- The default DeepSeek Search API needs the Host's `web` and `web-deepseek-api` layers (DSH `0.2.1-rc.2` and later). Peer ranges cover `0.2.1-rc.2`, `0.2.2-alpha.3`, and `0.2.2-rc.4` and later; pick another engine when the layer is absent.
|
|
35
35
|
- DSH `0.2.2` RC / alpha requires Node.js `>=24.9.0`. The plugin retains Node.js `^22.19.0` or `>=24.0.0` for older Hosts.
|
|
36
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 Messages checks account credentials against the pending model route, rather than the preceding request's route; readiness does not validate keys over the network.
|
|
37
37
|
- pnpm, used by `dsh plugin` to install the plugin into a profile
|
|
@@ -49,7 +49,7 @@ After installation, configure the plugin in the Harness Web UI:
|
|
|
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
50
|
2. Choose a search engine. For direct API search without an extra DeepSeek model call, select DeepSeek Search API, 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,13 +58,17 @@ 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 already sets `web.searchProvider: deepseek-search-api`. Selecting an engine this bundle serves restores `dsh-web-search` and saves the 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
|
|
|
@@ -76,7 +80,7 @@ The tables below describe the original nine plugin backends; new Search API conf
|
|
|
76
80
|
|
|
77
81
|
| Key | Default | Meaning and scope |
|
|
78
82
|
|---|---|---|
|
|
79
|
-
| `provider` | `deepseek-
|
|
83
|
+
| `provider` | `deepseek-search-api` | Active backend: `deepseek-search-api` (default; reuses the in-box provider, so `web.searchProvider` matches), `deepseek-official` (legacy Messages), `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 legacy DeepSeek |
|
|
80
84
|
| `maxResults` | `8` | Maximum returned sources for the original nine plugin backends (excluding the independent new 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
|
|
@@ -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 (legacy)</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 legacy DeepSeek 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 (legacy)**: 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
|
-
### Switch to DeepSeek
|
|
223
|
+
### Switch back to legacy DeepSeek search
|
|
220
224
|
|
|
221
|
-
|
|
225
|
+
The installation default is already the official Search API, matching DSH's own page. To use legacy Messages search, select **DeepSeek (legacy)** in **Settings → Web search** and save. There is no need to disable or uninstall this plugin. It sends an extra Messages model request and may incur model invocation charges.
|
|
222
226
|
|
|
223
227
|
### Disable and restore built-in search
|
|
224
228
|
|
|
225
229
|
Use the following steps when you want to stop using this plugin and restore Harness's original search plugin. Selecting this plugin's DeepSeek engine and restoring the original 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 re-enables the built-in Messages search plugin. 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.
|
|
231
|
+
Open **Plugins** in the sidebar and turn off the **entire `dsh-web-search-plugin` bundle**. This removes its composition layer and re-enables the built-in Messages search plugin and the built-in Web search & fetch settings page. 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
|
|
|
@@ -244,7 +248,7 @@ The same checks for manually added overrides apply after uninstallation. Explici
|
|
|
244
248
|
|
|
245
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 original nine engines share this provider; selecting the new Search API switches to the official provider, independently of retrieval. 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, selects `
|
|
251
|
+
This package is a **bundle**. The `dsh.bundle.patch` declaration points to `cordis.patch.yml`, which adds the Host entry, selects `deepseek-search-api` as the default search provider (matching the Harness default), and disables both the built-in `web-search-deepseek` Host plugin and 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. Selecting any backend this bundle serves switches `web.searchProvider` to `dsh-web-search`; the plugin's internal `deepseek-official` backend option is distinct from that registered ID. 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 自带的 **网页搜索与获取** 页面一致:默认使用 DeepSeek Search API,抓取默认由本机直接获取。
|
|
13
|
+
- **保留已有引擎与设置。** 旧版 Messages 和第三方引擎继续可用,搜索与获取独立选择;移除已保存的提供方覆盖前,请参考[停用或卸载](#停用或卸载)。
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
**默认搜索提供方为 DeepSeek Search API**(与 DSH 默认一致),即复用官方 `deepseek-search-api`,不产生搜索时的辅助模型调用。若要用旧版搜索,可在卡片中选择 **DeepSeek(旧版)**;它会发起额外 Messages 模型请求,可能产生模型调用费用。
|
|
15
16
|
|
|
16
17
|
## 支持的搜索后端
|
|
17
18
|
|
|
18
|
-
- **DeepSeek Search API
|
|
19
|
-
- **DeepSeek
|
|
19
|
+
- **DeepSeek Search API(安装默认)** — 复用 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.1`、`0.2.2-alpha.3` 和旧版 `0.2.1-rc.5` 的实际依赖上进行隔离验证,覆盖打包安装、Host 搜索接缝、配置切换与凭据就绪判断;供应商 HTTP 使用模拟响应,不代表真实账号联网或桌面设置页端到端验证。
|
|
34
|
-
-
|
|
34
|
+
- 已在 DeepSeek Harness `0.2.2-rc.4`、`0.2.2-rc.3`、`0.2.2-rc.1`、`0.2.2-alpha.3` 和旧版 `0.2.1-rc.5` 的实际依赖上进行隔离验证,覆盖打包安装、Host 搜索接缝、配置切换与凭据就绪判断;供应商 HTTP 使用模拟响应,不代表真实账号联网或桌面设置页端到端验证。
|
|
35
|
+
- 默认的 DeepSeek Search API 需要 Host 提供 `web` 与 `web-deepseek-api` 配置(DSH `0.2.1-rc.2` 起)。依赖范围为 `0.2.1-rc.2`、`0.2.2-alpha.3` 与 `0.2.2-rc.4` 及以上;缺少该层时应改选其他引擎。
|
|
35
36
|
- DSH `0.2.2` 的 RC / alpha 要求 Node.js `>=24.9.0`;插件在旧版 Host 上保留 Node.js `^22.19.0` 或 `>=24.0.0` 的运行范围。
|
|
36
|
-
- 支持工具就绪检查的 Host 会在缺少所需凭据时隐藏插件搜索工具;Tavily keyless 与 SearXNG 无需密钥。DeepSeek
|
|
37
|
+
- 支持工具就绪检查的 Host 会在缺少所需凭据时隐藏插件搜索工具;Tavily keyless 与 SearXNG 无需密钥。DeepSeek(旧版)按本次模型路由判断账号令牌与 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,13 +59,17 @@ 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` 即 `deepseek-search-api`;切回本插件提供的引擎时恢复 `dsh-web-search`,并保存本插件的 `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 + 本机直接获取**,也就是安装默认值。Search 不发起辅助模型请求;本机直接获取从运行 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
|
|
|
@@ -76,7 +81,7 @@ dsh plugin --profile web add dsh-web-search-plugin
|
|
|
76
81
|
|
|
77
82
|
| 键 | 默认值 | 含义与范围 |
|
|
78
83
|
|---|---|---|
|
|
79
|
-
| `provider` | `deepseek-
|
|
84
|
+
| `provider` | `deepseek-search-api` | 当前搜索提供方:`deepseek-search-api`(默认,复用官方提供方,此时 `web.searchProvider` 也是它)、`deepseek-official`(旧版 Messages)、`tavily`、`brave`、`serper`、`serpapi`、`exa`、`searxng`、`scavio` 或 `firecrawl`。一次请求只使用所选后端,不会在失败后自动切换到其他后端;未知值会回退到 DeepSeek(旧版) |
|
|
80
85
|
| `maxResults` | `8` | 本插件原有九个后端的返回源数量上限(不含独立的新版 Search API),范围 1–20,同时受调用方 `request.maxResults` 上限约束。SearXNG 和 Scavio 不发送请求级数量参数,只在收到响应并按 URL 去重后截取;实际可返回的数量取决于上游结果 |
|
|
81
86
|
|
|
82
87
|
### 密钥与凭据引用
|
|
@@ -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
|
+
安装默认已是官方 Search API,与 DSH 自带页面一致。若要用旧版 Messages 搜索,在 **设置 → 网页搜索** 中选择 **DeepSeek(旧版)** 并保存即可,无需关闭或卸载本插件。它会额外发起 Messages 模型请求,可能产生模型调用费用。
|
|
222
227
|
|
|
223
228
|
### 停用并恢复内置搜索
|
|
224
229
|
|
|
225
|
-
若希望停用本插件、恢复 Harness
|
|
230
|
+
若希望停用本插件、恢复 Harness 原装的搜索插件与「网页搜索与获取」设置页,再执行以下操作。切换到本插件中的 DeepSeek 引擎与恢复原装插件是两种不同操作。
|
|
226
231
|
|
|
227
|
-
打开侧栏 **插件** 页面,关闭 **整个 `dsh-web-search-plugin` 组合包的开关**。这会撤销该组合层,并重新启用内置 Messages
|
|
232
|
+
打开侧栏 **插件** 页面,关闭 **整个 `dsh-web-search-plugin` 组合包的开关**。这会撤销该组合层,并重新启用内置 Messages 搜索插件与内置「网页搜索与获取」设置页。本页面显式保存的提供方选择仍保留在 Profile 中:需检查 `web.searchProvider` 与 `web.fetchProvider`,移除覆盖才能完整恢复 Profile 默认值;之后也可以重新打开组合包。
|
|
228
233
|
|
|
229
234
|
请使用组合包的总开关:仅关闭包内某个组件,其他配置覆盖仍会保留。启用配置热更新的 Profile 会立即应用改动,否则需要重启 Harness。
|
|
230
235
|
|
|
231
|
-
|
|
236
|
+
组合包默认把 `web.searchProvider` 设为 `deepseek-search-api`(官方默认)。如果曾手工改成 `dsh-web-search`、设置 `DSH_WEB_SEARCH_PROVIDER=dsh-web-search`,或另行禁用内置 DeepSeek 插件,还需移除或恢复这些覆盖。组合包开关不会撤销你单独添加的配置。
|
|
232
237
|
|
|
233
238
|
### 卸载安装包
|
|
234
239
|
|
|
@@ -244,7 +249,7 @@ dsh plugin --profile web remove dsh-web-search-plugin
|
|
|
244
249
|
|
|
245
250
|
本插件通过 `ctx.web` 注册一个稳定 id 为 `dsh-web-search` 的 `WebSearchProvider`,遵循与官方 `@deepseek-ai/dsh-web-search-deepseek` 相同的提供方约定(`inject: ['web']` 和 `ctx.web.registerSearchProvider`)。原有九个引擎由该提供方内部调度;选择新版 Search API 时设置卡改用官方提供方,并独立设置抓取提供方。各引擎结果规范化为 `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 行、把默认搜索提供方设为 `deepseek-search-api`,并禁用内置的 `web-search-deepseek` Host 插件与 `ui-settings-web-search` 设置页——后者与本插件页面配置同一对 `web` / `web-deepseek-api` 接缝,保留两个入口只会造成重复配置。本插件的内部 `deepseek-official` 引擎选项与其注册的 `dsh-web-search` id 不同。关闭整个组合包会移除这一补丁层,仅关闭其中的 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 后端不追加自定义会话事件。
|
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**: DeepSeek Search API, ready after install with no auxiliary model call per search.
|
|
11
|
+
- **Use legacy search instead**: DeepSeek (legacy), 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 search
|
|
20
|
+
The default search provider is **DeepSeek Search API**, matching DSH's own page. Billing for both new and legacy 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 (legacy) makes a model request and 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" >DeepSeek
|
|
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">10 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">DeepSeek Search API (default)</text>
|
|
13
|
+
<text x="56" y="291" font-size="17" >DeepSeek (legacy)</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" >DeepSeek
|
|
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">10 个选项 · 按需填写凭据</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">DeepSeek Search API(默认)</text>
|
|
13
|
+
<text x="56" y="291" font-size="17" >DeepSeek(旧版)</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>
|
package/assets/detail/zh.md
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 网页搜索与获取
|
|
2
2
|
|
|
3
|
-
为 DeepSeek Harness 的 Agent 提供更多联网搜索选择,沿用熟悉的 `web_search`
|
|
3
|
+
为 DeepSeek Harness 的 Agent 提供更多联网搜索选择,沿用熟悉的 `web_search` 工具。网页搜索提供方与网页获取方式独立选择,在一个设置页面中统一保存。
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
## 选择适合你的搜索方式
|
|
8
8
|
|
|
9
9
|
- **直接调用搜索 API**:DeepSeek Search API、Tavily、Brave Search、Serper、SerpApi、Exa、SearXNG、Scavio、Firecrawl。
|
|
10
|
-
-
|
|
10
|
+
- **保持官方默认**:DeepSeek Search API,安装后即用,不产生搜索时的辅助模型调用。
|
|
11
|
+
- **改用旧版搜索**:DeepSeek(旧版),账号模型发起的请求用已登录账号,其他请求用 API key。
|
|
11
12
|
- **先体验免密钥搜索**:Tavily 选择 `keyless`,或使用支持 JSON 输出的 SearXNG 实例。公共服务可能限流。
|
|
12
13
|
|
|
13
14
|
## 三步开始
|
|
14
15
|
|
|
15
16
|
1. 启用本插件,打开 **设置 → 网页搜索**。
|
|
16
|
-
2.
|
|
17
|
+
2. 选择网页搜索提供方,按需填写凭据;在 **网页获取提供方** 中独立选择本机直接获取(默认)或 DeepSeek Fetch API。
|
|
17
18
|
3. 点击 **保存**,下一次搜索或抓取使用已保存的设置。
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
默认搜索提供方为 **DeepSeek Search API**,与 DSH 自带页面一致。新版 API 与旧版搜索的「计费方式」都可选自动、账号或 API Key;需要新版 API 的选项只在 Host 提供相应配置时可用。
|
|
20
21
|
|
|
21
22
|
## 费用与凭据
|
|
22
23
|
|
|
23
|
-
直接调用搜索 API 不会额外发起 DeepSeek
|
|
24
|
+
直接调用搜索 API 不会额外发起 DeepSeek 搜索模型请求,但搜索服务可能单独计费,由「计费方式」选定的账号或 API Key 支付;对话及模型读取结果仍消耗 token。DeepSeek(旧版)会发起模型请求,可能产生相应费用。本机直接获取免费,可访问内网和本机,但不支持需要 JavaScript 或登录的页面和 PDF;DeepSeek Fetch API 的费用以供应商说明为准。
|
|
24
25
|
|
|
25
26
|
需要密钥的引擎可通过设置页的入口获取 API key,填写后保存。插件沿用 DSH 凭据管理;免密钥模式不代表服务无限额。
|
|
26
27
|
|
package/cordis.patch.yml
CHANGED
|
@@ -5,27 +5,40 @@
|
|
|
5
5
|
#
|
|
6
6
|
# `searchProvider` and the upstream `fetchProvider` are restated in full
|
|
7
7
|
# because a Cordis patch replaces the targeted row's whole `config`. The
|
|
8
|
-
# profile's own cordis.patch.yml still wins if it later overrides `web`.
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
8
|
+
# profile's own cordis.patch.yml still wins if it later overrides `web`.
|
|
9
|
+
#
|
|
10
|
+
# Defaults mirror the Harness `0.2.2` defaults: the in-box `deepseek-search-api`
|
|
11
|
+
# provider searches, and `http` fetches from this device. Selecting any engine
|
|
12
|
+
# this bundle serves (legacy Messages, Tavily, Brave, Serper, …) switches
|
|
13
|
+
# `searchProvider` back to `dsh-web-search`, this bundle's own seam id, and
|
|
14
|
+
# leaves the backend to the plugin's `provider` setting.
|
|
15
|
+
#
|
|
16
|
+
# `deepseek-search-api` needs the in-box `web-deepseek-api` layer, which the
|
|
17
|
+
# Harness ships from `0.2.1-rc.2` on. A profile without it must pick another
|
|
18
|
+
# engine on the settings page.
|
|
14
19
|
- id: web
|
|
15
20
|
name: '@deepseek-ai/dsh-web'
|
|
16
21
|
config:
|
|
17
|
-
searchProvider:
|
|
22
|
+
searchProvider: deepseek-search-api
|
|
18
23
|
fetchProvider: http
|
|
19
24
|
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
25
|
+
# Disable the in-box legacy DeepSeek search plugin so the profile has one
|
|
26
|
+
# active legacy Messages configuration surface: this bundle's `dsh-web-search`
|
|
27
|
+
# provider with its `deepseek-official` backend. That provider id is distinct
|
|
28
|
+
# from the in-box `deepseek-official` one.
|
|
24
29
|
- id: web-search-deepseek
|
|
25
30
|
disabled: true
|
|
26
31
|
|
|
32
|
+
# Disable the in-box "Web search & fetch" settings page. Its two seams (`web`
|
|
33
|
+
# and `web-deepseek-api`) are exactly what this bundle's own page edits, and
|
|
34
|
+
# showing both leaves the user with two entry points for one configuration.
|
|
35
|
+
# This row is inserted by `@deepseek-ai/dsh-web-app`; the bundle layer is
|
|
36
|
+
# applied after it, so the disable lands on an existing row.
|
|
37
|
+
- id: ui-settings-web-search
|
|
38
|
+
disabled: true
|
|
39
|
+
|
|
27
40
|
- insert:
|
|
28
41
|
- id: dsh-web-search-plugin
|
|
29
42
|
name: dsh-web-search-plugin
|
|
30
43
|
config:
|
|
31
|
-
provider: deepseek-
|
|
44
|
+
provider: deepseek-search-api
|
package/lib/client.js
CHANGED
|
@@ -33,26 +33,74 @@ window.__ModuleLoader__.load({
|
|
|
33
33
|
const API_SEARCH = "deepseek-search-api";
|
|
34
34
|
const API_FETCH = "deepseek-fetch-api";
|
|
35
35
|
const API_FIELDS = { webApiKey: "apiKey", webApiKeyEnv: "apiKeyEnv", webApiBaseURL: "baseURL", webApiCount: "count" };
|
|
36
|
+
/**
|
|
37
|
+
* The same card fields against the per-capability `web-deepseek-api`
|
|
38
|
+
* schema that replaced `apiKey` / `apiKeyEnv` / `baseURL` in DSH
|
|
39
|
+
* `0.2.2-rc.2`. One card field can feed several keys: the card keeps a
|
|
40
|
+
* single credential and endpoint for Search and Fetch, so a write fans
|
|
41
|
+
* out to both capabilities and a read takes the first present key.
|
|
42
|
+
*/
|
|
43
|
+
const API_FIELDS_SPLIT = {
|
|
44
|
+
webApiKeyEnv: ["searchApiKeyEnv", "fetchApiKeyEnv"],
|
|
45
|
+
webApiBaseURL: ["searchBaseURL", "fetchBaseURL"],
|
|
46
|
+
webApiCount: ["count"],
|
|
47
|
+
webApiSearchBilling: ["searchBilling"],
|
|
48
|
+
webApiFetchBilling: ["fetchBilling"]
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Which `web-deepseek-api` schema the Host serves.
|
|
52
|
+
* `searchBilling` carries a schema default, so a ready section always
|
|
53
|
+
* answers it; the pre-rc.2 schema has no such field.
|
|
54
|
+
* @param snapshot - the `web-deepseek-api` config-form snapshot.
|
|
55
|
+
* @returns true for the per-capability schema.
|
|
56
|
+
*/
|
|
57
|
+
function splitApiSchema(snapshot) {
|
|
58
|
+
const value = snapshot?.value;
|
|
59
|
+
return value !== void 0 && value !== null && Object.hasOwn(value, "searchBilling");
|
|
60
|
+
}
|
|
36
61
|
/** Combine public ConfigForms; save parameters before switching providers.
|
|
37
62
|
* Each namespace has its own revision. Refusal retains the page's draft;
|
|
38
63
|
* previously accepted namespaces are not rolled back over concurrent edits.
|
|
39
64
|
*/
|
|
40
65
|
function combinedScope(forms) {
|
|
41
66
|
const plugin = forms.get(NS), web = forms.get("web"), api = forms.get(API_NS);
|
|
42
|
-
|
|
67
|
+
/** Namespace keys one card field addresses on the schema in force. */
|
|
68
|
+
const apiKeys = (field, split) => split
|
|
69
|
+
? API_FIELDS_SPLIT[field] ?? []
|
|
70
|
+
: API_FIELDS[field] === void 0 ? [] : [API_FIELDS[field]];
|
|
71
|
+
const apiFieldNames = (split) => Object.keys(split ? API_FIELDS_SPLIT : API_FIELDS);
|
|
72
|
+
const merge = (p, w, a, split) => {
|
|
43
73
|
const value = { ...p, fetchProvider: w?.fetchProvider ?? "http" };
|
|
44
74
|
if (w?.searchProvider === API_SEARCH) value.provider = API_SEARCH;
|
|
45
|
-
for (const
|
|
75
|
+
for (const field of apiFieldNames(split)) {
|
|
76
|
+
for (const key of apiKeys(field, split)) {
|
|
77
|
+
if (a === void 0 || !Object.hasOwn(a, key)) continue;
|
|
78
|
+
value[field] = a[key];
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
46
82
|
return value;
|
|
47
83
|
};
|
|
84
|
+
const mergeUser = (p, w, a, split) => {
|
|
85
|
+
const user = { ...p.user };
|
|
86
|
+
for (const field of apiFieldNames(split)) {
|
|
87
|
+
const key = apiKeys(field, split).find((candidate) => Object.hasOwn(a.user ?? {}, candidate));
|
|
88
|
+
if (key !== void 0) user[field] = a.user[key];
|
|
89
|
+
}
|
|
90
|
+
if (Object.hasOwn(w.user ?? {}, "fetchProvider")) user.fetchProvider = w.user.fetchProvider;
|
|
91
|
+
if (w.user?.searchProvider === API_SEARCH) user.provider = API_SEARCH;
|
|
92
|
+
return user;
|
|
93
|
+
};
|
|
48
94
|
return {
|
|
49
95
|
getSnapshot() {
|
|
50
96
|
const p = plugin.getSnapshot(), w = web.getSnapshot(), a = api.getSnapshot();
|
|
51
|
-
|
|
52
|
-
|
|
97
|
+
const split = splitApiSchema(a);
|
|
98
|
+
return { ...p, value: merge(p.value, w.value, a.value, split), base: merge(p.base, w.base, a.base, split),
|
|
99
|
+
user: mergeUser(p, w, a, split),
|
|
53
100
|
revision: { plugin: p.revision, api: a.revision, web: w.revision },
|
|
54
101
|
apiAvailable: a.status === "ready" && w.status === "ready",
|
|
55
102
|
apiWritable: a.writable && w.writable,
|
|
103
|
+
apiSplit: split,
|
|
56
104
|
selectionAvailable: w.status === "ready", selectionWritable: w.writable,
|
|
57
105
|
searchProvider: w.value?.searchProvider };
|
|
58
106
|
},
|
|
@@ -61,11 +109,14 @@ window.__ModuleLoader__.load({
|
|
|
61
109
|
return () => stops.forEach(stop => stop());
|
|
62
110
|
},
|
|
63
111
|
async mutate(ops, revisions) {
|
|
112
|
+
const split = splitApiSchema(api.getSnapshot());
|
|
64
113
|
const groups = { plugin: [], api: [], web: [] };
|
|
65
114
|
for (const op of ops) {
|
|
66
115
|
const field = op.path[0];
|
|
67
|
-
|
|
68
|
-
|
|
116
|
+
const keys = apiKeys(field, split);
|
|
117
|
+
if (keys.length > 0) {
|
|
118
|
+
for (const key of keys) groups.api.push({ ...op, path: [key] });
|
|
119
|
+
} else if (field === "fetchProvider") groups.web.push(op);
|
|
69
120
|
else if (field === "provider") {
|
|
70
121
|
if (op.op === "set" && op.value === API_SEARCH) groups.web.push({ op: "set", path: ["searchProvider"], value: API_SEARCH });
|
|
71
122
|
else {
|
|
@@ -84,10 +135,11 @@ window.__ModuleLoader__.load({
|
|
|
84
135
|
return true;
|
|
85
136
|
},
|
|
86
137
|
canWrite(plan) {
|
|
138
|
+
const split = splitApiSchema(api.getSnapshot());
|
|
87
139
|
return plan.every(item => {
|
|
88
140
|
const field = item.field;
|
|
89
141
|
if ([API_SEARCH, API_FETCH].includes(item.op?.value) && (api.getSnapshot().status !== "ready" || !api.getSnapshot().writable)) return false;
|
|
90
|
-
const scope =
|
|
142
|
+
const scope = apiKeys(field, split).length > 0 ? api : field === "fetchProvider" ? web : plugin;
|
|
91
143
|
return scope.getSnapshot().status === "ready" && scope.getSnapshot().writable
|
|
92
144
|
&& (field !== "provider" || (web.getSnapshot().status === "ready" && web.getSnapshot().writable));
|
|
93
145
|
});
|
|
@@ -225,29 +277,40 @@ window.__ModuleLoader__.load({
|
|
|
225
277
|
|
|
226
278
|
/** Locale bundles for the card. */
|
|
227
279
|
const en = {
|
|
228
|
-
nav: "Web search",
|
|
229
|
-
provider: "
|
|
280
|
+
nav: "Web search & fetch",
|
|
281
|
+
provider: "Web search provider",
|
|
230
282
|
providerTavily: "Tavily",
|
|
231
283
|
providerBrave: "Brave Search",
|
|
232
|
-
providerDeepseek: "DeepSeek
|
|
284
|
+
providerDeepseek: "DeepSeek (legacy)",
|
|
233
285
|
providerApi: "DeepSeek Search API",
|
|
234
|
-
searchHeading: "
|
|
235
|
-
fetchHeading: "Web
|
|
236
|
-
fetchProvider: "
|
|
237
|
-
fetchHttp: "Local
|
|
286
|
+
searchHeading: "Web search",
|
|
287
|
+
fetchHeading: "Web fetch",
|
|
288
|
+
fetchProvider: "Web fetch provider",
|
|
289
|
+
fetchHttp: "Local fetch",
|
|
238
290
|
fetchApi: "DeepSeek Fetch API",
|
|
239
291
|
fetchOther: "Current custom provider: ",
|
|
240
|
-
fetchHttpHint: "
|
|
241
|
-
apiHint: "Direct API requests, without an auxiliary model call.
|
|
242
|
-
|
|
292
|
+
fetchHttpHint: "Free, and reaches your intranet and this machine. Cannot render pages that need JavaScript or a sign-in, and cannot read PDFs. Returned content still uses conversation tokens.",
|
|
293
|
+
apiHint: "Direct API requests, without an auxiliary model call. Reading results still uses conversation tokens.",
|
|
294
|
+
providerDeepseekHint: "Slower: every search spends extra model tokens. Needs a DeepSeek account or API key.",
|
|
295
|
+
providerApiHint: "Costs money, paid by the account or API key chosen under Billing.",
|
|
296
|
+
providerFetchApiHint: "Cannot reach your intranet or this machine. Costs money, paid by the account or API key chosen under Billing.",
|
|
297
|
+
providerSearxngHint: "DuckDuckGo has no official search API. Point SearXNG at an instance that includes DuckDuckGo (most public ones do), or self-host one.",
|
|
298
|
+
advanced: "Advanced settings",
|
|
243
299
|
apiBase: "DeepSeek Search / Fetch API base URL",
|
|
244
300
|
apiCount: "Results per search",
|
|
245
|
-
apiCountHint: "
|
|
246
|
-
|
|
301
|
+
apiCountHint: "Results returned per search, 1–50, default 10.",
|
|
302
|
+
apiBillingMode: "Billing",
|
|
303
|
+
apiBillingAuto: "Automatic",
|
|
304
|
+
apiBillingAccount: "Signed-in DeepSeek account",
|
|
305
|
+
apiBillingApiKey: "DeepSeek API key",
|
|
306
|
+
apiBillingHint: "Follows the conversation's DeepSeek account or API key; with other models, uses the API key first, then the signed-in account.",
|
|
307
|
+
apiBillingAccountHint: "Requires signing in to DeepSeek.",
|
|
308
|
+
apiBillingApiKeyHint: "Uses the API key from the Models page; set one first.",
|
|
309
|
+
apiBilling: "Search & Fetch guide ↗",
|
|
247
310
|
credentialConflict: "Two different keys target the same credential reference. Use one key or separate references.",
|
|
248
311
|
invalidApiCount: "Enter a whole number from 1 to 50, or leave blank for the default.",
|
|
249
|
-
apiBaseHint: "Include the API prefix, e.g. https://api.deepseek.com/v1/tools.
|
|
250
|
-
apiRefHint: "Credential
|
|
312
|
+
apiBaseHint: "Include the API prefix, e.g. https://api.deepseek.com/v1/tools. Written to both Search and Fetch; separate from the Messages endpoint.",
|
|
313
|
+
apiRefHint: "Credential used when Billing is API key. Written to both Search and Fetch.",
|
|
251
314
|
apiShared: "Uses the DeepSeek API configuration in the search section above.",
|
|
252
315
|
apiUnavailable: "The Host must serve web and web-deepseek-api to enable the new APIs (DSH 0.2.1-rc.2 or compatible).",
|
|
253
316
|
searchInactive: "Another search provider is selected in the Host. Choose an engine here to use this page's configuration.",
|
|
@@ -292,20 +355,17 @@ window.__ModuleLoader__.load({
|
|
|
292
355
|
proxy: "Proxy",
|
|
293
356
|
proxyPlaceholder: "Leave blank to inherit the DSH proxy settings.",
|
|
294
357
|
deepseekApiKeyEnv: "Credential reference",
|
|
295
|
-
deepseekApiKeyEnvHint: "
|
|
296
|
-
deepseekBaseURL: "
|
|
297
|
-
deepseekBaseURLHint: "
|
|
358
|
+
deepseekApiKeyEnvHint: "Models on the DeepSeek account route use the signed-in account; every other request uses this API key (DEEPSEEK_API_KEY), shared with the Models page by default.",
|
|
359
|
+
deepseekBaseURL: "Base URL",
|
|
360
|
+
deepseekBaseURLHint: "Include the API prefix; leave blank to use the official endpoint. The program appends /messages.",
|
|
298
361
|
model: "Model",
|
|
299
362
|
modelHint: "Anthropic-format model name for the search request.",
|
|
300
363
|
maxTokens: "Max tokens",
|
|
301
364
|
maxTokensHint: "Upper bound on generated tokens for the search request.",
|
|
302
|
-
maxUses: "Max
|
|
303
|
-
maxUsesHint: "
|
|
304
|
-
expand: "Show settings",
|
|
305
|
-
collapse: "Hide settings",
|
|
365
|
+
maxUses: "Max searches per request",
|
|
366
|
+
maxUsesHint: "Upper bound on server-side searches each Messages request may run; a positive integer, default 5.",
|
|
306
367
|
getKey: "Get API key",
|
|
307
368
|
ddgDisabled: "DuckDuckGo — use via SearXNG",
|
|
308
|
-
ddgHint: "DuckDuckGo has no official search API. Pick SearXNG and point it at an instance that includes DuckDuckGo (most public ones do), or self-host one.",
|
|
309
369
|
save: "Save",
|
|
310
370
|
saving: "Saving…",
|
|
311
371
|
discard: "Discard",
|
|
@@ -344,32 +404,43 @@ window.__ModuleLoader__.load({
|
|
|
344
404
|
};
|
|
345
405
|
/** Simplified Chinese copy. */
|
|
346
406
|
const zh = {
|
|
347
|
-
nav: "
|
|
348
|
-
provider: "
|
|
407
|
+
nav: "网页搜索与获取",
|
|
408
|
+
provider: "网页搜索提供方",
|
|
349
409
|
providerTavily: "Tavily",
|
|
350
410
|
providerBrave: "Brave Search",
|
|
351
|
-
providerDeepseek: "DeepSeek
|
|
411
|
+
providerDeepseek: "DeepSeek(旧版)",
|
|
352
412
|
providerApi: "DeepSeek Search API",
|
|
353
|
-
searchHeading: "
|
|
354
|
-
fetchHeading: "
|
|
355
|
-
fetchProvider: "
|
|
356
|
-
fetchHttp: "
|
|
413
|
+
searchHeading: "网页搜索",
|
|
414
|
+
fetchHeading: "网页获取",
|
|
415
|
+
fetchProvider: "网页获取提供方",
|
|
416
|
+
fetchHttp: "本机直接获取",
|
|
357
417
|
fetchApi: "DeepSeek Fetch API",
|
|
358
418
|
fetchOther: "当前自定义提供方:",
|
|
359
|
-
fetchHttpHint: "
|
|
360
|
-
apiHint: "直接请求 API
|
|
361
|
-
|
|
419
|
+
fetchHttpHint: "免费,可访问内网和本机。不支持需要 JavaScript 或登录的页面,也不支持 PDF。返回内容仍占用主会话 token。",
|
|
420
|
+
apiHint: "直接请求 API,不调用辅助模型。主模型阅读结果仍消耗 token。",
|
|
421
|
+
providerDeepseekHint: "速度较慢,每次搜索都会额外消耗模型 token。需要 DeepSeek 账号或 API Key。",
|
|
422
|
+
providerApiHint: "会产生费用,由「计费方式」选定的账号或 API Key 支付。",
|
|
423
|
+
providerFetchApiHint: "无法访问内网和本机。会产生费用,由「计费方式」选定的账号或 API Key 支付。",
|
|
424
|
+
providerSearxngHint: "DuckDuckGo 没有官方搜索 API。请把 SearXNG 指向一个聚合了 DuckDuckGo 的实例(多数公共实例都有),或自建一个。",
|
|
425
|
+
advanced: "高级设置",
|
|
362
426
|
apiBase: "DeepSeek Search / Fetch API 基础地址",
|
|
363
427
|
apiCount: "每次搜索结果数",
|
|
364
|
-
apiCountHint: "
|
|
365
|
-
|
|
428
|
+
apiCountHint: "每次搜索返回的结果条数,1–50,默认 10。",
|
|
429
|
+
apiBillingMode: "计费方式",
|
|
430
|
+
apiBillingAuto: "自动",
|
|
431
|
+
apiBillingAccount: "已登录的 DeepSeek 账号",
|
|
432
|
+
apiBillingApiKey: "DeepSeek API Key",
|
|
433
|
+
apiBillingHint: "跟随当前会话的 DeepSeek 账号或 API Key;会话用其他模型时,优先用 API Key,没有则用已登录账号。",
|
|
434
|
+
apiBillingAccountHint: "需要先登录 DeepSeek 账号。",
|
|
435
|
+
apiBillingApiKeyHint: "使用「模型」页配置的 API Key,需要先配置。",
|
|
436
|
+
apiBilling: "网页搜索与获取指南 ↗",
|
|
366
437
|
credentialConflict: "两个不同密钥使用了同一凭据引用。请使用同一密钥,或分别设置引用名。",
|
|
367
438
|
invalidApiCount: "请输入 1–50 的整数;留空表示使用默认值。",
|
|
368
|
-
apiBaseHint: "填写含 API 前缀的地址,如 https://api.deepseek.com/v1/tools
|
|
369
|
-
apiRefHint: "
|
|
370
|
-
apiShared: "
|
|
439
|
+
apiBaseHint: "填写含 API 前缀的地址,如 https://api.deepseek.com/v1/tools。同时写入 Search 与 Fetch,与 Messages 地址分别保存。",
|
|
440
|
+
apiRefHint: "「计费方式」为 API Key 时使用的凭据;同时写入 Search 与 Fetch。",
|
|
441
|
+
apiShared: "使用上方网页搜索区域中的 DeepSeek API 配置。",
|
|
371
442
|
apiUnavailable: "新版 API 需要 Host 提供 web 与 web-deepseek-api 配置(DSH 0.2.1-rc.2 或兼容版本)。",
|
|
372
|
-
searchInactive: "Host
|
|
443
|
+
searchInactive: "Host 当前选择了其他搜索提供方;请在此选择搜索引擎以启用本页面的配置。",
|
|
373
444
|
partialFailed: "保存失败,部分设置可能已保存。草稿已保留,请核对后重试。",
|
|
374
445
|
mode: "认证模式",
|
|
375
446
|
modeKeyless: "Keyless(免费、限流)",
|
|
@@ -411,20 +482,17 @@ window.__ModuleLoader__.load({
|
|
|
411
482
|
proxy: "代理",
|
|
412
483
|
proxyPlaceholder: "留空继承 DSH 全局代理设置",
|
|
413
484
|
deepseekApiKeyEnv: "凭据引用名",
|
|
414
|
-
deepseekApiKeyEnvHint: "
|
|
415
|
-
deepseekBaseURL: "
|
|
416
|
-
deepseekBaseURLHint: "
|
|
485
|
+
deepseekApiKeyEnvHint: "账号模型发起的请求使用已登录账号;其他请求使用此 API Key(DEEPSEEK_API_KEY),默认与「模型」页共用。",
|
|
486
|
+
deepseekBaseURL: "Base URL",
|
|
487
|
+
deepseekBaseURLHint: "填写含 API 前缀的地址;留空时使用官方地址;程序追加 /messages。",
|
|
417
488
|
model: "模型",
|
|
418
489
|
modelHint: "搜索请求使用的 Anthropic 格式模型名。",
|
|
419
490
|
maxTokens: "最大 token",
|
|
420
491
|
maxTokensHint: "搜索请求生成 token 的上限。",
|
|
421
|
-
maxUses: "
|
|
422
|
-
maxUsesHint: "
|
|
423
|
-
expand: "展开设置",
|
|
424
|
-
collapse: "收起设置",
|
|
492
|
+
maxUses: "单次请求最多搜索次数",
|
|
493
|
+
maxUsesHint: "每次 Messages 请求允许的服务端搜索次数上限,须为正整数,默认 5。",
|
|
425
494
|
getKey: "获取 API key",
|
|
426
495
|
ddgDisabled: "DuckDuckGo — 请经 SearXNG 使用",
|
|
427
|
-
ddgHint: "DuckDuckGo 没有官方搜索 API。请选择 SearXNG,并填入一个聚合了 DuckDuckGo 的实例地址(多数公共实例都有),或自建一个。",
|
|
428
496
|
save: "保存",
|
|
429
497
|
saving: "保存中…",
|
|
430
498
|
discard: "放弃修改",
|
|
@@ -534,6 +602,8 @@ window.__ModuleLoader__.load({
|
|
|
534
602
|
credentialField("webApiKeyEnv"),
|
|
535
603
|
textField("webApiBaseURL"),
|
|
536
604
|
numberField("webApiCount", { min: 1, max: 50, strict: true }),
|
|
605
|
+
choiceField("webApiSearchBilling"),
|
|
606
|
+
choiceField("webApiFetchBilling"),
|
|
537
607
|
choiceField("provider"),
|
|
538
608
|
choiceField("tavilyMode"),
|
|
539
609
|
numberField("maxResults", { min: 1, max: MAX_RESULTS_CAP }),
|
|
@@ -609,6 +679,7 @@ window.__ModuleLoader__.load({
|
|
|
609
679
|
failed: this.failed,
|
|
610
680
|
apiAvailable: snapshot.apiAvailable,
|
|
611
681
|
apiWritable: snapshot.apiWritable,
|
|
682
|
+
apiSplit: snapshot.apiSplit === true,
|
|
612
683
|
selectionAvailable: snapshot.selectionAvailable,
|
|
613
684
|
selectionWritable: snapshot.selectionWritable,
|
|
614
685
|
searchInactive: snapshot.searchProvider && !["dsh-web-search", API_SEARCH].includes(snapshot.searchProvider),
|
|
@@ -892,6 +963,8 @@ window.__ModuleLoader__.load({
|
|
|
892
963
|
webApiKeyEnv: this.form.field("webApiKeyEnv"),
|
|
893
964
|
webApiBaseURL: this.form.field("webApiBaseURL"),
|
|
894
965
|
webApiCount: this.form.field("webApiCount"),
|
|
966
|
+
webApiSearchBilling: this.form.field("webApiSearchBilling"),
|
|
967
|
+
webApiFetchBilling: this.form.field("webApiFetchBilling"),
|
|
895
968
|
webApiKeyConfigured: this.form.apiCredential.configured,
|
|
896
969
|
webApiKeyWritable: this.form.apiCredential.writable,
|
|
897
970
|
provider: this.form.field("provider"),
|
|
@@ -1238,15 +1311,21 @@ window.__ModuleLoader__.load({
|
|
|
1238
1311
|
const tavily = provider === "tavily";
|
|
1239
1312
|
const restMeta = builtinRest(provider);
|
|
1240
1313
|
const keyed = state.tavilyMode.text === "keyed";
|
|
1314
|
+
/** One line under the selector describing the provider in force. */
|
|
1315
|
+
const providerHint = provider === API_SEARCH ? t("providerApiHint")
|
|
1316
|
+
: provider === "deepseek-official" ? t("providerDeepseekHint")
|
|
1317
|
+
: provider === "searxng" ? t("providerSearxngHint")
|
|
1318
|
+
: "";
|
|
1241
1319
|
const keyHint = state.apiKeyConfigured ? t("apiKeyHint") : t("apiKeyHint") + " " + t("apiKeyUnavailableHint");
|
|
1242
1320
|
const toastText = toastCopy(t, state.toastKey);
|
|
1243
1321
|
const toastTone = ["failed", "invalid", "credentialConflict"].includes(state.toastKey) ? "error" : state.toastKey === "nothing" ? "info" : "success";
|
|
1322
|
+
const isApiField = (field) => Object.hasOwn(API_FIELDS, field) || Object.hasOwn(API_FIELDS_SPLIT, field);
|
|
1244
1323
|
const row = (field, label, hint, children) => fieldRow(label, hint, children, {
|
|
1245
1324
|
t,
|
|
1246
1325
|
overridden: state[field]?.overridden === true,
|
|
1247
1326
|
invalid: state[field]?.invalid === true,
|
|
1248
1327
|
errorKey: field.endsWith("ApiKeyEnv") || field === "apiKeyEnv" ? "invalidCredentialRef" : field === "webApiCount" ? "invalidApiCount" : "invalidNumber",
|
|
1249
|
-
disabled: disabled || (
|
|
1328
|
+
disabled: disabled || (isApiField(field) ? !state.apiWritable : field === "fetchProvider" || field === "provider" ? !state.selectionWritable : false),
|
|
1250
1329
|
onReset: () => actions.resetField(field)
|
|
1251
1330
|
});
|
|
1252
1331
|
const maxResultsWrite = numberField("maxResults", { min: 1, max: MAX_RESULTS_CAP }).parse(String(state.maxResults.text ?? "").trim());
|
|
@@ -1262,16 +1341,44 @@ window.__ModuleLoader__.load({
|
|
|
1262
1341
|
return react.createElement("option", { value: n, key: n }, n);
|
|
1263
1342
|
})
|
|
1264
1343
|
}));
|
|
1344
|
+
/**
|
|
1345
|
+
* The `web-deepseek-api` rows the card owns. `0.2.2-rc.2` replaced
|
|
1346
|
+
* the literal key and shared endpoint with a per-capability split
|
|
1347
|
+
* plus a billing choice, so the literal-key row disappears there and
|
|
1348
|
+
* the credential reference takes its place.
|
|
1349
|
+
*/
|
|
1265
1350
|
const apiConfig = () => react.createElement("div", { className: "dshws_form" },
|
|
1266
|
-
pair(
|
|
1351
|
+
state.apiSplit ? null : pair(
|
|
1267
1352
|
fieldRow(t("apiKey"), t("apiKeyHint"), secretInput({ id: "ws-api-key", value: state.webApiKey.text, disabled: disabled || !state.apiWritable || !state.webApiKeyWritable, placeholder: state.webApiKeyConfigured ? t("apiKeySet") : t("apiKeyUnset"), onChange: e => actions.edit("webApiKey", e.target.value) })),
|
|
1268
1353
|
row("webApiKeyEnv", t("apiKeyEnv"), t("apiRefHint"), textInput({ id: "ws-api-keyref", value: state.webApiKeyEnv.text, disabled: disabled || !state.apiWritable, onChange: e => actions.edit("webApiKeyEnv", e.target.value) }))
|
|
1269
1354
|
),
|
|
1355
|
+
state.apiSplit ? row("webApiKeyEnv", t("apiKeyEnv"), t("apiRefHint"), textInput({ id: "ws-api-keyref", value: state.webApiKeyEnv.text, disabled: disabled || !state.apiWritable, onChange: e => actions.edit("webApiKeyEnv", e.target.value) })) : null,
|
|
1270
1356
|
row("webApiBaseURL", t("apiBase"), t("apiBaseHint"), textInput({ id: "ws-api-base", value: state.webApiBaseURL.text, disabled: disabled || !state.apiWritable, onChange: e => actions.edit("webApiBaseURL", e.target.value) })),
|
|
1271
1357
|
keyConsoleLink(t, "deepseek-official"),
|
|
1272
1358
|
react.createElement("p", { className: "dshws_field_hint" }, t("apiHint")),
|
|
1273
1359
|
react.createElement("a", { href: "https://api-docs.deepseek.com/zh-cn/guides/search/", target: "_blank", rel: "noopener noreferrer", className: "dshws_field_hint", style: { padding: "6px 0 10px" } }, t("apiBilling"))
|
|
1274
1360
|
);
|
|
1361
|
+
/**
|
|
1362
|
+
* One capability's billing choice. Present only where the Host
|
|
1363
|
+
* serves the split schema; the pre-rc.2 schema resolves credentials
|
|
1364
|
+
* on its own, so the row would address a field that does not exist.
|
|
1365
|
+
* @param field - `webApiSearchBilling` or `webApiFetchBilling`.
|
|
1366
|
+
*/
|
|
1367
|
+
/** Hint under a billing select: the official page explains each choice inline. */
|
|
1368
|
+
const billingHint = (value) => value === "account" ? t("apiBillingAccountHint")
|
|
1369
|
+
: value === "api-key" ? t("apiBillingApiKeyHint")
|
|
1370
|
+
: t("apiBillingHint");
|
|
1371
|
+
const billingRow = (field) => row(field, t("apiBillingMode"), billingHint(state[field]?.text || "auto"), selectInput({
|
|
1372
|
+
id: "ws-" + field,
|
|
1373
|
+
value: state[field]?.text || "auto",
|
|
1374
|
+
disabled: disabled || !state.apiWritable,
|
|
1375
|
+
onChange: (e) => actions.edit(field, e.target.value),
|
|
1376
|
+
children: [
|
|
1377
|
+
react.createElement("option", { value: "auto", key: "auto" }, t("apiBillingAuto")),
|
|
1378
|
+
react.createElement("option", { value: "account", key: "account" }, t("apiBillingAccount")),
|
|
1379
|
+
react.createElement("option", { value: "api-key", key: "api-key" }, t("apiBillingApiKey"))
|
|
1380
|
+
]
|
|
1381
|
+
}));
|
|
1275
1382
|
return react.createElement("div", { className: "dshws_form" },
|
|
1276
1383
|
react.createElement("div", { className: "dshws_card_header" },
|
|
1277
1384
|
react.createElement("div", { className: "dshws_card_headText" },
|
|
@@ -1290,7 +1397,7 @@ window.__ModuleLoader__.load({
|
|
|
1290
1397
|
...BUILTIN_REST_PROVIDERS.map((entry) => react.createElement("option", { value: entry.id, key: entry.id }, entry.name)),
|
|
1291
1398
|
react.createElement("option", { value: "__ddg__", key: "ddg", disabled: true }, t("ddgDisabled"))
|
|
1292
1399
|
] }),
|
|
1293
|
-
react.createElement("p", { className: "dshws_field_hint", style: { padding: "4px 0 0" } },
|
|
1400
|
+
providerHint === "" ? null : react.createElement("p", { className: "dshws_field_hint", style: { padding: "4px 0 0" } }, providerHint)),
|
|
1294
1401
|
tavily ? row("tavilyMode", t("mode"), null, selectInput({ id: "ws-mode", value: state.tavilyMode.text, disabled, onChange: (e) => actions.edit("tavilyMode", e.target.value), children: [
|
|
1295
1402
|
react.createElement("option", { value: "keyless", key: "keyless" }, t("modeKeyless")),
|
|
1296
1403
|
react.createElement("option", { value: "keyed", key: "keyed" }, t("modeKeyed"))
|
|
@@ -1298,7 +1405,7 @@ window.__ModuleLoader__.load({
|
|
|
1298
1405
|
),
|
|
1299
1406
|
apiSearch ? apiConfig() : null,
|
|
1300
1407
|
apiSearch ? row("webApiCount", t("apiCount"), t("apiCountHint"), numberInput({ id: "ws-api-count", value: state.webApiCount.text, min: 1, max: 50, disabled: disabled || !state.apiWritable, onChange: e => actions.edit("webApiCount", e.target.value) })) : null,
|
|
1301
|
-
|
|
1408
|
+
apiSearch && state.apiSplit ? billingRow("webApiSearchBilling") : null,
|
|
1302
1409
|
react.createElement(QuotaCard, { t, provider, keyed }),
|
|
1303
1410
|
keyConsoleLink(t, provider, restMeta, keyed),
|
|
1304
1411
|
deepseek ? pair(
|
|
@@ -1316,10 +1423,11 @@ window.__ModuleLoader__.load({
|
|
|
1316
1423
|
deepseek ? row("deepseekBaseURL", t("deepseekBaseURL"), t("deepseekBaseURLHint"), textInput({ id: "ws-deepseek-base", value: state.deepseekBaseURL.text, disabled, onChange: (e) => actions.edit("deepseekBaseURL", e.target.value) })) : null,
|
|
1317
1424
|
brave ? row("braveBaseURL", t("braveBaseURL"), t("braveBaseURLHint"), textInput({ id: "ws-brave-base", value: state.braveBaseURL.text, disabled, onChange: (e) => actions.edit("braveBaseURL", e.target.value) })) : null,
|
|
1318
1425
|
tavily ? row("tavilyBaseURL", t("baseURL"), t("baseURLHint"), textInput({ id: "ws-tavily-base", value: state.tavilyBaseURL.text, disabled, onChange: (e) => actions.edit("tavilyBaseURL", e.target.value) })) : null,
|
|
1319
|
-
deepseek ? row("
|
|
1320
|
-
deepseek ?
|
|
1321
|
-
|
|
1322
|
-
row("
|
|
1426
|
+
deepseek ? row("deepseekMaxUses", t("maxUses"), t("maxUsesHint"), numberInput({ id: "ws-maxuses", value: state.deepseekMaxUses.text, disabled, onChange: (e) => actions.edit("deepseekMaxUses", e.target.value), className: state.deepseekMaxUses.invalid ? "dshws_input_invalid" : void 0 })) : null,
|
|
1427
|
+
deepseek ? react.createElement("details", { className: "dshws_form" },
|
|
1428
|
+
react.createElement("summary", { className: "dshws_field_hint", style: { cursor: "pointer", padding: "8px 0" } }, t("advanced")),
|
|
1429
|
+
row("deepseekModel", t("model"), t("modelHint"), textInput({ id: "ws-model", value: state.deepseekModel.text, disabled, onChange: (e) => actions.edit("deepseekModel", e.target.value) })),
|
|
1430
|
+
row("deepseekMaxTokens", t("maxTokens"), t("maxTokensHint"), numberInput({ id: "ws-maxtokens", value: state.deepseekMaxTokens.text, disabled, onChange: (e) => actions.edit("deepseekMaxTokens", e.target.value), className: state.deepseekMaxTokens.invalid ? "dshws_input_invalid" : void 0 }))
|
|
1323
1431
|
) : null,
|
|
1324
1432
|
tavily ? pair(
|
|
1325
1433
|
row("tavilySearchDepth", t("searchDepth"), null, selectInput({ id: "ws-depth", value: state.tavilySearchDepth.text, disabled, onChange: (e) => actions.edit("tavilySearchDepth", e.target.value), children: [
|
|
@@ -1370,7 +1478,9 @@ window.__ModuleLoader__.load({
|
|
|
1370
1478
|
!["http", API_FETCH].includes(fetchProvider) ? react.createElement("option", { value: fetchProvider, key: fetchProvider }, t("fetchOther") + fetchProvider) : null
|
|
1371
1479
|
] })),
|
|
1372
1480
|
fetchProvider === "http" ? react.createElement("p", { className: "dshws_field_hint" }, t("fetchHttpHint")) : null,
|
|
1481
|
+
apiFetch ? react.createElement("p", { className: "dshws_field_hint" }, t("providerFetchApiHint")) : null,
|
|
1373
1482
|
apiFetch ? (apiSearch ? react.createElement("p", { className: "dshws_field_hint" }, t("apiShared")) : apiConfig()) : null,
|
|
1483
|
+
apiFetch && state.apiSplit ? billingRow("webApiFetchBilling") : null,
|
|
1374
1484
|
react.createElement("div", { style: { borderTop: "1px solid var(--dsw-alias-border-l2)", justifyContent: "flex-end", alignItems: "center", gap: "8px", padding: "12px 0 4px", display: "flex" } },
|
|
1375
1485
|
react.createElement("button", {
|
|
1376
1486
|
type: "button",
|
package/lib/index.js
CHANGED
|
@@ -68,8 +68,14 @@ const Config = z.object({
|
|
|
68
68
|
scavioCountry: z.string().volatile(),
|
|
69
69
|
scavioSearchLang: z.string().volatile(),
|
|
70
70
|
// Legacy fields remain accepted for existing profiles.
|
|
71
|
-
/**
|
|
72
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Active backend. `deepseek-search-api` (default) leaves search to the
|
|
73
|
+
* in-box `web-deepseek-api` provider, matching the Harness default;
|
|
74
|
+
* `deepseek-official` is the legacy Messages backend, and `tavily`,
|
|
75
|
+
* `brave`, `serper`, `serpapi`, `exa`, `searxng`, `scavio`, `firecrawl`
|
|
76
|
+
* are served by this plugin.
|
|
77
|
+
*/
|
|
78
|
+
provider: z.string().default("deepseek-search-api").volatile(),
|
|
73
79
|
/** Tavily auth mode: `keyless` (default) or `keyed`. */
|
|
74
80
|
mode: z.string().default("keyless").volatile(),
|
|
75
81
|
/** Literal Tavily API key; prefer {@link apiKeyEnv}. */
|
|
@@ -155,6 +161,13 @@ const Config = z.object({
|
|
|
155
161
|
*/
|
|
156
162
|
class PluginSearchProvider {
|
|
157
163
|
id = SEARCH_PROVIDER_ID;
|
|
164
|
+
/** Display name a provider picker shows instead of the raw registration id. */
|
|
165
|
+
title = "网页搜索(本插件)";
|
|
166
|
+
/** What this provider covers, for pickers that render a description. */
|
|
167
|
+
description = {
|
|
168
|
+
en: "DeepSeek (legacy) plus Tavily, Brave, Serper, SerpApi, Exa, SearXNG, Scavio and Firecrawl, configured on this plugin's web search page.",
|
|
169
|
+
zh: "支持 DeepSeek(旧版)与 Tavily、Brave、Serper、SerpApi、Exa、SearXNG、Scavio、Firecrawl,在本插件的网页搜索设置页配置。"
|
|
170
|
+
};
|
|
158
171
|
|
|
159
172
|
constructor(resolveOptions, usage) {
|
|
160
173
|
this.resolveOptions = resolveOptions;
|
package/lib/shared.js
CHANGED
|
@@ -7,7 +7,7 @@ import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
|
|
|
7
7
|
import { WebError } from "@deepseek-ai/dsh-web";
|
|
8
8
|
|
|
9
9
|
/** Attribution header sent on every request. */
|
|
10
|
-
export const USER_AGENT = "dsh-web-search-plugin/0.
|
|
10
|
+
export const USER_AGENT = "dsh-web-search-plugin/0.7.1";
|
|
11
11
|
/** Shared cap: Tavily `max_results` and Brave `count` both accept 1..20. */
|
|
12
12
|
export const MAX_RESULTS_CAP = 20;
|
|
13
13
|
|
package/locale/en.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
|
-
"title": "Web search",
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "Web search & fetch",
|
|
4
|
+
"description": "Web search providers and web fetch in one page: DeepSeek Search API (default), legacy Messages, eight third-party engines, local fetch and optional DeepSeek Fetch API.",
|
|
5
5
|
"detail": "assets/detail/en.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
|
-
"title": "
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "网页搜索与获取",
|
|
4
|
+
"description": "在一个页面独立配置网页搜索提供方与网页获取:DeepSeek Search API(默认)、旧版 Messages、8 个第三方引擎、本机直接获取和可选 DeepSeek Fetch API。",
|
|
5
5
|
"detail": "assets/detail/zh.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-web-search-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Web search and retrieval settings for DeepSeek Harness: DeepSeek Search API, Messages, eight search backends, local HTTP and DeepSeek Fetch API",
|
|
5
5
|
"icon": "./assets/icon.svg",
|
|
6
6
|
"keywords": [
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"undici": "^6.21.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@deepseek-ai/dsh-web": "^0.2.
|
|
67
|
-
"@deepseek-ai/dsh-credentials": "^0.2.
|
|
68
|
-
"@deepseek-ai/dsh-settings": "^0.2.
|
|
69
|
-
"@deepseek-ai/dsh-launch-environment": "^0.2.
|
|
66
|
+
"@deepseek-ai/dsh-web": "^0.2.1-rc.2 || ^0.2.2-alpha.3 || ^0.2.2-rc.4",
|
|
67
|
+
"@deepseek-ai/dsh-credentials": "^0.2.1-rc.2 || ^0.2.2-alpha.3 || ^0.2.2-rc.4",
|
|
68
|
+
"@deepseek-ai/dsh-settings": "^0.2.1-rc.2 || ^0.2.2-alpha.3 || ^0.2.2-rc.4",
|
|
69
|
+
"@deepseek-ai/dsh-launch-environment": "^0.2.1-rc.2 || ^0.2.2-alpha.3 || ^0.2.2-rc.4",
|
|
70
70
|
"@deepseek-ai/schemastery": "~3.18.4 || ~3.18.6-alpha.2 || ~3.19.0",
|
|
71
71
|
"@deepseek-ai/cordis": "~4.0.4 || ~4.0.6-alpha.2 || ~4.1.0"
|
|
72
72
|
},
|