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/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 模型用服务端搜索,其他模型用 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
|
+
默认**跟随会话模型**,与 DSH `0.2.2-rc.5` 自带页面一致:DeepSeek 模型用服务端搜索(不按次收费,消耗模型 token),其他模型用 DeepSeek Search API(按次计费)。也可在卡片中固定任一引擎。新版 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
|
@@ -3,29 +3,45 @@
|
|
|
3
3
|
# installs the package as a plain library: no loader row, no Host apply, no
|
|
4
4
|
# `/plugins/<name>/client.js`.
|
|
5
5
|
#
|
|
6
|
-
# `
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# deepseek-
|
|
13
|
-
#
|
|
6
|
+
# `fetchProvider` is restated in full because a Cordis patch replaces the
|
|
7
|
+
# targeted row's whole `config`. The profile's own cordis.patch.yml still wins
|
|
8
|
+
# if it later overrides `web`.
|
|
9
|
+
#
|
|
10
|
+
# `searchProvider` is deliberately left unset. Harness `0.2.2-rc.5` then routes
|
|
11
|
+
# each search by the model request it serves: DeepSeek routes use the in-box
|
|
12
|
+
# `deepseek-official` server-side search (no per-search charge), every other
|
|
13
|
+
# route and searches outside a model request use `deepseek-search-api`. This is
|
|
14
|
+
# the card's "follow the conversation model" default, and it matches the
|
|
15
|
+
# official page. Selecting any engine this bundle serves (server-side search,
|
|
16
|
+
# Tavily, Brave, Serper, …) pins `searchProvider` to `dsh-web-search` and leaves
|
|
17
|
+
# the backend to the plugin's `provider` setting; selecting DeepSeek Search API
|
|
18
|
+
# pins it to `deepseek-search-api`.
|
|
14
19
|
- id: web
|
|
15
20
|
name: '@deepseek-ai/dsh-web'
|
|
16
21
|
config:
|
|
17
|
-
searchProvider: dsh-web-search
|
|
18
22
|
fetchProvider: http
|
|
19
23
|
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
24
|
+
# Keep the in-box DeepSeek search plugin registered: "follow the conversation
|
|
25
|
+
# model" leaves `web.searchProvider` unset, and Harness `0.2.2-rc.5` then routes
|
|
26
|
+
# DeepSeek model requests to this provider (`deepseek-official`) and every other
|
|
27
|
+
# route to `deepseek-search-api`. The card's DeepSeek rows read and write the
|
|
28
|
+
# `web-search-deepseek` namespace directly, and the in-box settings page stays
|
|
29
|
+
# disabled below, so this bundle still owns the only configuration surface.
|
|
30
|
+
#
|
|
31
|
+
# Disabling this row would leave the unset selection with two usable providers
|
|
32
|
+
# (`dsh-web-search` and `deepseek-search-api`) and every search would fail with
|
|
33
|
+
# `WEB_PROVIDER_AMBIGUOUS`.
|
|
34
|
+
|
|
35
|
+
# Disable the in-box "Web search & fetch" settings page. Its two seams (`web`
|
|
36
|
+
# and `web-deepseek-api`) are exactly what this bundle's own page edits, and
|
|
37
|
+
# showing both leaves the user with two entry points for one configuration.
|
|
38
|
+
# This row is inserted by `@deepseek-ai/dsh-web-app`; the bundle layer is
|
|
39
|
+
# applied after it, so the disable lands on an existing row.
|
|
40
|
+
- id: ui-settings-web-search
|
|
25
41
|
disabled: true
|
|
26
42
|
|
|
27
43
|
- insert:
|
|
28
44
|
- id: dsh-web-search-plugin
|
|
29
45
|
name: dsh-web-search-plugin
|
|
30
46
|
config:
|
|
31
|
-
provider: deepseek-
|
|
47
|
+
provider: deepseek-search-api
|