@deepseek-ai/dsh-web 0.1.5-rc.1 → 0.1.6-alpha.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/README.i18n.yaml +1 -1
- package/README.zh.md +3 -3
- package/package.json +3 -3
package/README.i18n.yaml
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/web/web/README.md
|
|
5
5
|
README.md: 157c6d9e3a33b58b982e7c513b5e89af3878fa6d
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: f937fc127b7f6e1021e5f1d8ce210605ca8c8bd1
|
package/README.zh.md
CHANGED
|
@@ -29,7 +29,7 @@ kind: "package-reference"
|
|
|
29
29
|
|
|
30
30
|
### 何时选择
|
|
31
31
|
|
|
32
|
-
当插件或工具必须搜索或抓取、又不希望硬编码厂商时选择本服务;只使用已交付的 `web_search`/`web_fetch` 工具的组合会通过 `dsh-tool-web`
|
|
32
|
+
当插件或工具必须搜索或抓取、又不希望硬编码厂商时选择本服务;只使用已交付的 `web_search`/`web_fetch` 工具的组合会通过 `dsh-tool-web` 自动加载本服务。当组合从不访问 web 时,你不需要它。服务本身不增加任何网络访问能力:没有至少一个可用提供方时,每次调用都会以结构化 `WebError` 失败。
|
|
33
33
|
|
|
34
34
|
### 最小配置
|
|
35
35
|
|
|
@@ -105,11 +105,11 @@ const page = await ctx.web.fetch({ url: 'https://example.com' })
|
|
|
105
105
|
|---|---|
|
|
106
106
|
| [`src/index.ts`](src/index.ts) | 插件入口:`WebRuntime` 服务、两个提供方注册表与执行时选择 |
|
|
107
107
|
| [`src/types.ts`](src/types.ts) | 词汇:请求/结果类型、封闭的 `WebFetchBody` 联合与 `WebError` 分类体系 |
|
|
108
|
-
| — |
|
|
108
|
+
| — | 不发布运行时不变式配套项;提供方映射是私有数据,服务会在每次调用时执行提供方选择并强制执行结果上限;该 seam 不发布独立注册表,也不发布请求/结果观测流。 |
|
|
109
109
|
|
|
110
110
|
### 数据模型
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
请求与结果类型定义了调用方赖以构建的规范化词汇——`Search` 请求/结果对与 `Fetch` 请求/结果对各一组——穷尽式字段与 JSDoc 见 [`src/types.ts`](src/types.ts) 与 [web 子系统](../../../docs/subsystems/web.zh.md) 参考。两个刻意的选择塑造了它们:`WebFetchBody` 是这里拥有的封闭联合(`html` | `text`),因此新增类型会破坏编译,直到每个消费方都处理它;`WebError` 继承 `HarnessError`,携带开放的字符串 `code`,因此消费方必须容忍提供方专有的取值。来源字段保持可选,因为并非每个提供方都返回全部字段。
|
|
113
113
|
|
|
114
114
|
### 选择流程
|
|
115
115
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-web",
|
|
3
3
|
"description": "Abstract web access capability seam (ctx.web) for the DeepSeek Harness — search/fetch provider registry, registration-order-independent selection, request/result vocabulary, and the WebError taxonomy",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
30
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
31
31
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
37
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
39
39
|
}
|
|
40
40
|
}
|