@deepseek-ai/dsh-web-search-deepseek 0.2.1-rc.3 → 0.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -9,8 +9,8 @@
9
9
  en: d2c50aae9d869902
10
10
  zh: ee9f3f0ff575cbf9
11
11
  /deepseek-ai-dsh-web-search-deepseek/summary:
12
- en: 264b231bc3342f9c
13
- zh: 218eb246c9948743
12
+ en: 6b1267e732370877
13
+ zh: 64460aba0564cb44
14
14
  /deepseek-ai-dsh-web-search-deepseek/table-of-contents:
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
@@ -24,8 +24,8 @@
24
24
  en: 0553b6c926c44cf4
25
25
  zh: 5cd3221d3e8eebd9
26
26
  /deepseek-ai-dsh-web-search-deepseek/use-this-package/authentication:
27
- en: 3e49592f15e94825
28
- zh: c1bcf6dbb946149a
27
+ en: e9104c20ee90b3be
28
+ zh: 5fcc71d403976eaa
29
29
  /deepseek-ai-dsh-web-search-deepseek/use-this-package/what-a-search-returns:
30
30
  en: e30442c90365357b
31
31
  zh: 9c9e2f1182963a8a
@@ -42,14 +42,14 @@
42
42
  en: 1b1760efbf4568c1
43
43
  zh: fca06c959e51ce16
44
44
  /deepseek-ai-dsh-web-search-deepseek/understand-the-implementation/source-map:
45
- en: 680941350c454325
46
- zh: 939225eb3a483bb8
45
+ en: 6488e1c85646339f
46
+ zh: 2b5ca1c6b5939a8c
47
47
  /deepseek-ai-dsh-web-search-deepseek/understand-the-implementation/request-flow:
48
- en: d6469ab9ac915762
49
- zh: 07ddf7b12c748eaf
48
+ en: d6c3f30b70a5f4b5
49
+ zh: ab7c5b7d6fc3cae6
50
50
  /deepseek-ai-dsh-web-search-deepseek/further-exploration:
51
- en: 19219558735b84a1
52
- zh: 0e7f935aaf50c391
51
+ en: 4c0730d979693c5a
52
+ zh: 74681ad82b7b45ed
53
53
  /deepseek-ai-dsh-web-search-deepseek/model-experience:
54
54
  en: 215e7ba838619b7b
55
55
  zh: a311da3843709f90
@@ -77,9 +77,21 @@
77
77
  /deepseek-ai-dsh-web-search-deepseek/model-experience/conversation-tool-result-indirectly/kv-cache-effect:
78
78
  en: f5d5f97a153f7c70
79
79
  zh: f681f89596f500f5
80
+ /deepseek-ai-dsh-web-search-deepseek/model-experience/conversation-tool-list-indirectly:
81
+ en: ddcce72a4a4e0def
82
+ zh: 338aa339f5708d7d
83
+ /deepseek-ai-dsh-web-search-deepseek/model-experience/conversation-tool-list-indirectly/what-the-model-sees:
84
+ en: f4630a1af1a7ba32
85
+ zh: 98b9699676acc8d3
86
+ /deepseek-ai-dsh-web-search-deepseek/model-experience/conversation-tool-list-indirectly/token-effect:
87
+ en: fc3904d8f90cc055
88
+ zh: 60f82b8a3b894e7a
89
+ /deepseek-ai-dsh-web-search-deepseek/model-experience/conversation-tool-list-indirectly/kv-cache-effect:
90
+ en: 1d836a33dfa97fcf
91
+ zh: 2593ccf2a5716b02
80
92
  /deepseek-ai-dsh-web-search-deepseek/known-limitations-and-deferred-work:
81
- en: c26e32bcb03c3cc1
82
- zh: 49b2d0bfc01771a9
93
+ en: 1cb15cc5e9b1967d
94
+ zh: 64f1d93e94bbc9c3
83
95
  /deepseek-ai-dsh-web-search-deepseek/known-limitations-and-deferred-work/dev-note:
84
96
  en: 7f775cc79dbce94b
85
97
  zh: 12b8f68f9e7c48ca
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- With `dsh-web-search-deepseek`, the harness searches the web through DeepSeek's native search using the DeepSeek account sign-in or an existing `DEEPSEEK_API_KEY`. Choose it when a deployment wants DeepSeek native search and accepts that one search costs a full model turn in latency and tokens; the DeepSeek Search and Fetch APIs in [dsh-web-deepseek-api](../web-deepseek-api/README.md) retrieve without one. Results come from the structured search blocks DeepSeek returns, never from scraping text out of a reply. A missing credential fails the call with a structured error; a response without a search-result block fails loudly rather than degrading. The model-facing `web_search` tool lives in `dsh-tool-web`.
12
+ With `dsh-web-search-deepseek`, the harness searches the web through DeepSeek's native search using the DeepSeek account sign-in or an existing `DEEPSEEK_API_KEY`. Choose it when a deployment wants DeepSeek native search and accepts that one search costs a full model turn in latency and tokens; the DeepSeek Search and Fetch APIs in [dsh-web-deepseek-api](../web-deepseek-api/README.md) retrieve without one. Results come from DeepSeek's structured search blocks, never from reply text. It is not ready for a model request without a credential, so `dsh-tool-web` withholds `web_search` from that request; a call that still arrives, or a response without a search-result block, fails with a structured error.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -60,6 +60,8 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
60
60
 
61
61
  A search authenticates with the DeepSeek account when the latest `request/context` event of the initiating Session names the `deepseek-account` provider route and `ctx.deepseekAccount` resolves a token for the search endpoint. The account service resolves one only while signed in and only for its deployment-configured inference origin, `https://api.deepseek.com` by default. That search sends only `x-dsh-auth-token`, even when an API key is configured. Every other search, including a call without an initiating Session and a search whose endpoint has another origin, sends the API key as both `x-api-key` and `Authorization: Bearer`. An HTTP 401 response to an account-authenticated search fails as `WEB_PROVIDER_ERROR` with sign-in guidance instead of endpoint guidance, and leaves the account signed in.
62
62
 
63
+ The provider's `ready()` answers whether the search a model request would make has a credential, on any model route: the request's route is `deepseek-account` and `ctx.deepseekAccount` resolves a token for the configured search endpoint, or a literal `apiKey` is set or `ctx.credentials.describe` reports the `apiKeyEnv` reference configured (without that service, the process environment must carry it). It checks them in the order a search resolves them, and a failed account-token or credential-store read answers false, because the search fails on that read instead of trying the next credential. While this provider is the selected search provider, [`dsh-tool-web`](../tool-web/README.md#search-readiness) withholds `web_search` and its prompt guidance from each request for which it answers false. Only presence is checked: a wrong key, or an endpoint that does not serve the native `web_search_20250305` server tool, counts as ready and fails each call. A call that still arrives resolves credentials when it runs.
64
+
63
65
  ### What a search returns
64
66
 
65
67
  `content` is always omitted: DeepSeek's provider prose is not trusted as an answer. `sources[]` comes from `web_search_result` items inside `web_search_tool_result` blocks — `url` and `title` directly, and `publishedAt` from `page_age` — with snippets joined from URL-keyed `cited_text` entries where an excerpt exists. Results are deduplicated by URL, and because DeepSeek exposes no result-count knob, the service enforces `maxResults` by truncating and flagging.
@@ -93,7 +95,7 @@ The provider is built on two commitments:
93
95
 
94
96
  | File | Role |
95
97
  |---|---|
96
- | [`src/index.ts`](src/index.ts) | Config schema and per-search option capture |
98
+ | [`src/index.ts`](src/index.ts) | Config schema, per-search option capture, and search readiness |
97
99
  | [`src/provider.ts`](src/provider.ts) | The `DeepSeekSearchProvider`: Messages request dispatch, block parsing, citation joining, credential resolution |
98
100
  | [`src/types.ts`](src/types.ts) | Anthropic wire types for the search response |
99
101
 
@@ -101,6 +103,8 @@ The provider is built on two commitments:
101
103
 
102
104
  Each search captures the current Config values into provider options — endpoint, model, key reference, limits — then asks `ctx.deepseekAccount` for a token when the initiating Session uses the account route, otherwise resolves the credential reference through `ctx.credentials` (or the environment), appends the log-only session event, and dispatches the Messages request with the native `web_search` server tool. The response's `web_search_tool_result` blocks become `sources[]`; `cited_text` entries from text blocks are joined to their URLs as snippets; results are deduplicated by URL; and the service enforces the requested source bound on the way back.
103
105
 
106
+ Readiness captures the same options but reads no API key value: on the account route it first asks `ctx.deepseekAccount` for a token, then checks the literal key or asks `ctx.credentials.describe()` (or the environment) whether the key reference is configured.
107
+
104
108
  </details>
105
109
 
106
110
  -----
@@ -116,6 +120,7 @@ Read these pages when the package-level contract is not enough. They move from t
116
120
  - [dsh-tool-web](../tool-web/README.md) — the model-facing `web_search` tool that renders this provider's sources.
117
121
  - [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-web-search-deepseek) — every accepted config field and its source declaration.
118
122
  - [Web capability seam decision](../../../.agents/notes/implemented/architecture/2026-06-24-web-capability-seam.md) — why search and fetch share one provider-selection service.
123
+ - [Search readiness decision](../../../.agents/notes/implemented/architecture/2026-09-27-web-search-offered-by-provider-readiness.md) — why this provider reports readiness while `dsh-tool-web` withholds `web_search`.
119
124
 
120
125
  -----
121
126
 
@@ -150,6 +155,20 @@ Zero direct conversation tokens from registration. Result tokens scale with retu
150
155
 
151
156
  Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV-cache entries.
152
157
 
158
+ ### Conversation tool list, indirectly
159
+
160
+ #### What the model sees
161
+
162
+ While this provider is selected, a conversation request for which it is not ready carries neither the `web_search` schema nor its prompt guidance; [`dsh-tool-web`](../tool-web/README.md#search-readiness) owns that effect.
163
+
164
+ #### Token effect
165
+
166
+ Withholding removes the `web_search` schema and its prompt guidance from the request.
167
+
168
+ #### KV Cache effect
169
+
170
+ A returning or removed `web_search` changes the declared tools as [`dsh-tool-web`](../tool-web/README.md#search-readiness) describes.
171
+
153
172
  ## Known Limitations and Deferred Work
154
173
 
155
174
  <a id="known-limitations-and-deferred-work"></a>
@@ -158,7 +177,9 @@ Append-only; newly visible content follows the reusable request prefix and does
158
177
  These limits define when the provider is expensive or incomplete. They are current package constraints.
159
178
 
160
179
  - **One search costs a full Messages model turn** — latency plus generated tokens, with up to `maxUses` server-side searches; [dsh-web-deepseek-api](../web-deepseek-api/README.md) uses the dedicated Search API instead.
161
- - **Dynamic credential availability resolves inside the operation** — the synchronous availability check can establish that a resolver exists but cannot query an asynchronous credential store, so a selected keyless provider fails the search with `WEB_PROVIDER_CREDENTIAL_MISSING`; the stable `web_search` schema stays registered.
180
+ - **Provider selection cannot see a missing key** — the synchronous availability check can establish that a resolver exists but cannot query an asynchronous credential store, so `ctx.web` still selects a keyless provider and a direct search fails with `WEB_PROVIDER_CREDENTIAL_MISSING`; the asynchronous `ready()` affects only which model requests are offered `web_search`.
181
+ - **Readiness checks presence, not validity** — a wrong key, or an endpoint without the native `web_search_20250305` server tool, counts as ready, so `web_search` stays offered and each call fails with a structured error.
182
+ - **Search does not follow the chat endpoint** — when the official route chats through a gateway, search still sends its key to the configured search endpoint, the official one by default, and fails unless that endpoint accepts the key.
162
183
  - **Over-returned sources still cost tokens** — with no result-count knob on the wire, `maxResults` is enforced only post-hoc by service truncation.
163
184
  - **Sources usually carry no `snippet`** — a source gains one only when a text-block citation (`cited_text`) matches its URL, and DeepSeek's Anthropic-compatible endpoint returns text blocks without `citations`.
164
185
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 有了 `dsh-web-search-deepseek`,harness 可以通过 DeepSeek 原生搜索检索 web,使用 DeepSeek 账号登录或部署已有的 `DEEPSEEK_API_KEY`。当部署希望使用 DeepSeek 原生搜索、并接受一次搜索在延迟与 token 上消耗一个完整模型轮次时选择它;[dsh-web-deepseek-api](../web-deepseek-api/README.zh.md) 中的 DeepSeek Search 与 Fetch API 无需模型轮次即可检索。结果来自 DeepSeek 返回的结构化搜索块,绝不会从回复文本中抓取。凭据缺失时调用以结构化错误失败;响应缺少搜索结果块时会明确报错,而非降级。面向模型的 `web_search` 工具位于 `dsh-tool-web`。
12
+ 有了 `dsh-web-search-deepseek`,harness 可以通过 DeepSeek 原生搜索检索 web,使用 DeepSeek 账号登录或部署已有的 `DEEPSEEK_API_KEY`。当部署希望使用 DeepSeek 原生搜索、并接受一次搜索在延迟与 token 上消耗一个完整模型轮次时选择它;[dsh-web-deepseek-api](../web-deepseek-api/README.zh.md) 中的 DeepSeek Search 与 Fetch API 无需模型轮次即可检索。结果来自 DeepSeek 的结构化搜索块,绝不取自回复文本。对没有可用凭据的模型请求,提供方报告自身未就绪,因此 `dsh-tool-web` 会对该请求撤下 `web_search`;仍然到达的调用,或缺少搜索结果块的响应,都以结构化错误失败。
13
13
 
14
14
  ## 目录
15
15
 
@@ -60,6 +60,8 @@ kind: "package-reference"
60
60
 
61
61
  当发起会话最近的 `request/context` 事件指明 `deepseek-account` 提供方路由,且 `ctx.deepseekAccount` 为搜索端点解析出 token 时,搜索使用 DeepSeek 账号鉴权。账号服务仅在已登录时、且仅对部署配置的推理 origin(默认 `https://api.deepseek.com`)解析 token。这类搜索只发送 `x-dsh-auth-token`,即使配置了 API 密钥也是如此。其余所有搜索,包括没有发起会话的调用以及端点属于其他 origin 的搜索,都把 API 密钥同时作为 `x-api-key` 与 `Authorization: Bearer` 发送。账号鉴权的搜索收到 HTTP 401 时以 `WEB_PROVIDER_ERROR` 失败,附带登录指引而非端点指引,账号保持登录。
62
62
 
63
+ 提供方的 `ready()` 回答模型请求将发起的搜索是否有凭据,不论模型路由:该请求的路由是 `deepseek-account` 且 `ctx.deepseekAccount` 为配置的搜索端点解析出 token,或者设置了字面 `apiKey`,或 `ctx.credentials.describe` 报告 `apiKeyEnv` 引用已配置(没有该服务时,进程环境中必须存在该变量)。它按搜索解析凭据的顺序检查,读取账号 token 或凭据存储失败时回答 false,因为搜索会在该次读取上失败,而不会尝试下一种凭据。本提供方是选中的搜索提供方时,[`dsh-tool-web`](../tool-web/README.zh.md#search-readiness) 会从它回答 false 的每个请求中撤下 `web_search` 及其提示词说明。这里只检查凭据是否存在:错误的密钥,或不提供原生 `web_search_20250305` 服务器工具的端点,都视为就绪并使每次调用失败。仍然到达的调用会在运行时解析凭据。
64
+
63
65
  ### 搜索返回什么
64
66
 
65
67
  `content` 始终省略:DeepSeek 的提供方文本不作为答案受到信任。`sources[]` 来自 `web_search_tool_result` 块内的 `web_search_result` 条目——`url` 和 `title` 直接取自同名字段,`publishedAt` 取自 `page_age`——snippet 在存在摘录时按 URL 关联的 `cited_text` 条目拼接。结果按 URL 去重,且由于 DeepSeek 不公开结果数量旋钮,服务通过截断并标记来强制执行 `maxResults`。
@@ -93,7 +95,7 @@ kind: "package-reference"
93
95
 
94
96
  | 文件 | 职责 |
95
97
  |---|---|
96
- | [`src/index.ts`](src/index.ts) | Config schema 与每次搜索的选项捕获 |
98
+ | [`src/index.ts`](src/index.ts) | Config schema、每次搜索的选项捕获,以及搜索就绪判断 |
97
99
  | [`src/provider.ts`](src/provider.ts) | `DeepSeekSearchProvider`:Messages 请求分发、块解析、引用拼接、凭据解析 |
98
100
  | [`src/types.ts`](src/types.ts) | 搜索响应的 Anthropic 协议类型 |
99
101
 
@@ -101,6 +103,8 @@ kind: "package-reference"
101
103
 
102
104
  每次搜索先把当前 Config 段投影为提供方选项——端点、模型、密钥引用、上限——然后在发起会话使用账号路由时向 `ctx.deepseekAccount` 请求 token,否则通过 `ctx.credentials`(或环境)解析凭据引用,追加仅用于日志的会话事件,并以原生 `web_search` 服务器工具分发 Messages 请求。响应中的 `web_search_tool_result` 块变为 `sources[]`;文本块中的 `cited_text` 条目按其 URL 拼接为 snippet;结果按 URL 去重;服务在返回路径上强制执行请求的来源上限。
103
105
 
106
+ 就绪判断捕获相同的选项,但不读取 API 密钥的值:账号路由先向 `ctx.deepseekAccount` 请求 token,再检查字面密钥,或询问 `ctx.credentials.describe()`(或环境)密钥引用是否已配置。
107
+
104
108
  </details>
105
109
 
106
110
  -----
@@ -116,6 +120,7 @@ kind: "package-reference"
116
120
  - [dsh-tool-web](../tool-web/README.zh.md)——渲染本提供方来源的面向模型 `web_search` 工具。
117
121
  - [生成配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-web-search-deepseek)——每个受支持配置字段及其源声明。
118
122
  - [web 能力 seam 决策](../../../.agents/notes/implemented/architecture/2026-06-24-web-capability-seam.zh.md)——搜索与抓取为何共用一项提供方选择服务。
123
+ - [搜索就绪决策](../../../.agents/notes/implemented/architecture/2026-09-27-web-search-offered-by-provider-readiness.zh.md)——本提供方为何报告就绪状态,而由 `dsh-tool-web` 撤下 `web_search`。
119
124
 
120
125
  -----
121
126
 
@@ -150,6 +155,20 @@ kind: "package-reference"
150
155
 
151
156
  仅追加;新可见内容位于可复用请求前缀之后,不会使现有 KV Cache 条目失效。
152
157
 
158
+ ### 会话工具列表(间接)
159
+
160
+ #### 模型看到的内容
161
+
162
+ 本提供方被选中时,它未就绪的会话请求既不包含 `web_search` 的 schema,也不包含它的提示词说明;该效果由 [`dsh-tool-web`](../tool-web/README.zh.md#search-readiness) 负责。
163
+
164
+ #### Token 影响
165
+
166
+ 撤下时,请求中不再包含 `web_search` 的 schema 及其提示词说明。
167
+
168
+ #### KV Cache 影响
169
+
170
+ 重新提供或移除 `web_search` 会按 [`dsh-tool-web`](../tool-web/README.zh.md#search-readiness) 所述改变声明的工具。
171
+
153
172
  ## 已知限制与延期工作
154
173
 
155
174
  <a id="known-limitations-and-deferred-work"></a>
@@ -158,7 +177,9 @@ kind: "package-reference"
158
177
  这些限制说明提供方在哪些情况下昂贵或不完整。它们是当前包约束。
159
178
 
160
179
  - **一次搜索消耗一个完整的 Messages 模型轮次**——产生延迟与生成 token,最多执行 `maxUses` 次服务端搜索;[dsh-web-deepseek-api](../web-deepseek-api/README.zh.md) 改用专用的 Search API。
161
- - **动态凭据的可用性在操作内部解析**——同步可用性检查可以确认解析器存在,但无法查询异步凭据存储,因此选中的无密钥提供方会使搜索以 `WEB_PROVIDER_CREDENTIAL_MISSING` 失败;稳定的 `web_search` schema 仍保持注册。
180
+ - **提供方选择看不到缺失的密钥**——同步可用性检查可以确认解析器存在,但无法查询异步凭据存储,因此 `ctx.web` 仍会选中没有密钥的提供方,直接搜索会以 `WEB_PROVIDER_CREDENTIAL_MISSING` 失败;异步的 `ready()` 只影响哪些模型请求会获得 `web_search`。
181
+ - **就绪判断只检查凭据是否存在,不检查是否有效**——错误的密钥,或不提供原生 `web_search_20250305` 服务器工具的端点,都视为就绪,因此 `web_search` 继续提供,每次调用都以结构化错误失败。
182
+ - **搜索不跟随聊天地址**——官方路由经网关聊天时,搜索仍把密钥发往配置的搜索端点(默认是官方端点),除非该端点接受这个密钥,否则调用失败。
162
183
  - **超量返回的来源仍消耗 token**——协议没有结果数量旋钮,`maxResults` 只能由服务在事后截断。
163
184
  - **来源通常没有 `snippet`**——只有当文本块引用(`cited_text`)匹配其 URL 时,来源才会获得 snippet,而 DeepSeek 的 Anthropic 兼容端点返回的文本块不带 `citations`。
164
185
 
package/lib/index.js CHANGED
@@ -326,9 +326,46 @@ function resolveOptions(ctx, config) {
326
326
  }
327
327
  };
328
328
  }
329
- /** Register the DeepSeek search provider with `ctx.web`. */
329
+ /**
330
+ * Whether the search a model request on `route` would make has a credential, checked in the order
331
+ * the search resolves them: the account token first on the account route, then the API key. A failed
332
+ * read answers false, because the search fails on that read instead of trying the next credential.
333
+ * Only presence is checked: the API key's value is not read and the endpoint is not contacted, so a
334
+ * wrong key or an endpoint without native search still counts as configured.
335
+ * @param ctx - plugin context supplying the account, credential, and environment planes.
336
+ * @param options - options the next search would use.
337
+ * @param route - provider route of the model request being assembled.
338
+ * @returns whether the account token or an API key is available to that search.
339
+ */
340
+ async function searchConfigured(ctx, options, route) {
341
+ const account = ctx.get("deepseekAccount");
342
+ if (route === ACCOUNT_PROVIDER && account !== void 0) {
343
+ let token;
344
+ try {
345
+ token = await account.resolveToken(`${options.baseURL}/messages`);
346
+ } catch (_unreadableGrant) {
347
+ return false;
348
+ }
349
+ if (token !== void 0 && token.length > 0) return true;
350
+ }
351
+ if (options.apiKey !== void 0) return true;
352
+ const credentials = ctx.get("credentials");
353
+ if (credentials === void 0) {
354
+ const ambient = launchEnvironmentOf(ctx).get(options.apiKeyEnv);
355
+ return ambient !== void 0 && ambient.value.length > 0;
356
+ }
357
+ try {
358
+ return (await credentials.describe(options.apiKeyEnv)).configured;
359
+ } catch (_unreadableStore) {
360
+ return false;
361
+ }
362
+ }
363
+ /**
364
+ * Register the DeepSeek search provider with `ctx.web`. Its `ready()` answers whether a
365
+ * search for a model request on the given route would have a credential to send.
366
+ */
330
367
  function apply(ctx, config) {
331
- ctx.web.registerSearchProvider(new DeepSeekSearchProvider(() => resolveOptions(ctx, {
368
+ const options = () => resolveOptions(ctx, {
332
369
  apiKey: config.apiKey.get(),
333
370
  apiKeyEnv: config.apiKeyEnv.get(),
334
371
  baseURL: config.baseURL.get(),
@@ -336,7 +373,14 @@ function apply(ctx, config) {
336
373
  apiVersion: config.apiVersion.get(),
337
374
  maxTokens: config.maxTokens.get(),
338
375
  maxUses: config.maxUses.get()
339
- })));
376
+ });
377
+ const provider = new DeepSeekSearchProvider(options);
378
+ ctx.web.registerSearchProvider({
379
+ id: provider.id,
380
+ available: () => provider.available(),
381
+ ready: (llmProvider) => searchConfigured(ctx, options(), llmProvider),
382
+ search: (request, signal) => provider.search(request, signal)
383
+ });
340
384
  }
341
385
  //#endregion
342
386
  export { Config, DEEPSEEK_DEFAULT_API_VERSION, DEEPSEEK_DEFAULT_BASE_URL, DEEPSEEK_DEFAULT_MAX_TOKENS, DEEPSEEK_DEFAULT_MAX_USES, DEEPSEEK_DEFAULT_MODEL, DEEPSEEK_PROVIDER_ID, DeepSeekSearchProvider, WEB_SEARCH_DEEPSEEK_SETTINGS_NAMESPACE, apply, inject, name };
@@ -3,7 +3,8 @@
3
3
  * with native `web_search_20250305`. A search initiated by a Session on the DeepSeek account route
4
4
  * authenticates with the account token when the account service allows the search endpoint;
5
5
  * every other search reuses `DEEPSEEK_API_KEY`. The provider does not reuse `DEEPSEEK_BASE_URL`;
6
- * auxiliary search has its own endpoint configuration.
6
+ * auxiliary search has its own endpoint configuration. The provider reports itself not ready for a
7
+ * model request whose search would have no credential.
7
8
  * @module @deepseek-ai/dsh-web-search-deepseek
8
9
  */
9
10
  import type { Volatile } from '@deepseek-ai/cordis';
@@ -51,6 +52,9 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
51
52
  }>>, "plain">;
52
53
  /** Settings namespace carrying this provider's endpoint, model, and key reference. */
53
54
  export declare const WEB_SEARCH_DEEPSEEK_SETTINGS_NAMESPACE = "web-search-deepseek";
54
- /** Register the DeepSeek search provider with `ctx.web`. */
55
+ /**
56
+ * Register the DeepSeek search provider with `ctx.web`. Its `ready()` answers whether a
57
+ * search for a model request on the given route would have a credential to send.
58
+ */
55
59
  export declare function apply(ctx: Context, config: Config): void;
56
60
  //# sourceMappingURL=index.d.ts.map
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek Websuche",
4
+ "description": "Stellen Sie Websuchergebnisse über DeepSeek bereit."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek búsqueda web",
4
+ "description": "Ofrecer resultados de búsqueda web a través de DeepSeek."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek recherche sur le Web",
4
+ "description": "Présentez les résultats de recherche sur le Web via DeepSeek."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek Web 検索",
4
+ "description": "DeepSeek を通じて Web 検索結果を提供します。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek pesquisa na web",
4
+ "description": "Veicule resultados de pesquisa na Web por meio de DeepSeek."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DeepSeek веб-поиск",
4
+ "description": "Предоставляйте результаты веб-поиска через DeepSeek."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-web-search-deepseek",
3
3
  "description": "DeepSeek-backed search provider (native web_search via the Anthropic-compatible API) for the DeepSeek Harness web capability seam (ctx.web)",
4
- "version": "0.2.1-rc.3",
4
+ "version": "0.2.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,27 +29,27 @@
29
29
  ],
30
30
  "license": "MIT",
31
31
  "peerDependencies": {
32
- "@deepseek-ai/dsh-agent": "0.2.1-rc.3",
33
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.3",
34
- "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.3",
35
- "@deepseek-ai/dsh-launch-environment": "0.2.1-rc.3",
36
- "@deepseek-ai/dsh-session": "0.2.1-rc.3",
37
- "@deepseek-ai/dsh-web": "0.2.1-rc.3",
38
- "@deepseek-ai/cordis": "~4.0.5"
32
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
33
+ "@deepseek-ai/dsh-credentials": "0.2.2-alpha.2",
34
+ "@deepseek-ai/dsh-deepseek-account": "0.2.2-alpha.2",
35
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-alpha.2",
36
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
37
+ "@deepseek-ai/dsh-web": "0.2.2-alpha.2",
38
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1"
39
39
  },
40
40
  "dependencies": {
41
- "@deepseek-ai/schemastery": "~3.18.5"
41
+ "@deepseek-ai/schemastery": "~3.18.6-alpha.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@deepseek-ai/dsh-agent": "0.2.1-rc.3",
45
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.3",
46
- "@deepseek-ai/dsh-credentials-local": "0.2.1-rc.3",
47
- "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.3",
48
- "@deepseek-ai/dsh-launch-environment": "0.2.1-rc.3",
49
- "@deepseek-ai/dsh-session": "0.2.1-rc.3",
50
- "@deepseek-ai/dsh-web": "0.2.1-rc.3",
51
- "@deepseek-ai/cordis": "~4.0.5",
52
- "@deepseek-ai/dsh-http-proxy": "0.2.1-rc.3"
44
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
45
+ "@deepseek-ai/dsh-credentials": "0.2.2-alpha.2",
46
+ "@deepseek-ai/dsh-credentials-local": "0.2.2-alpha.2",
47
+ "@deepseek-ai/dsh-deepseek-account": "0.2.2-alpha.2",
48
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-alpha.2",
49
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
50
+ "@deepseek-ai/dsh-web": "0.2.2-alpha.2",
51
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
52
+ "@deepseek-ai/dsh-http-proxy": "0.2.2-alpha.2"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@deepseek-ai/dsh-deepseek-account": {