dsh-web-fetch-enhanced 0.0.2 → 0.0.3
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.en.md +1 -1
- package/README.md +1 -1
- package/cordis.patch.yml +4 -3
- package/docs/design.zh-CN.md +2 -2
- package/examples/drop-in.cordis.yml +0 -2
- package/examples/manual.cordis.patch.yml +3 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -178,7 +178,7 @@ Most users only need the two allowlists exposed in DSH Web. Manage other values
|
|
|
178
178
|
| `maxRedirects` | `5` | Maximum same-origin redirect hops; `0` disables following |
|
|
179
179
|
| `userAgent` | `dsh-web-fetch-enhanced/0.1.0` | User-Agent sent with each request |
|
|
180
180
|
|
|
181
|
-
The default bundle uses the separate `http-enhanced` provider ID and
|
|
181
|
+
The default bundle uses the separate `http-enhanced` provider ID and explicitly disables the native `web-fetch-http` provider to avoid `WEB_PROVIDER_AMBIGUOUS` when subsequent Web plugins (such as search plugins) overwrite `id: web` configuration and unpin `fetchProvider`. For manual composition or drop-in replacement, see:
|
|
182
182
|
|
|
183
183
|
- [coexisting provider example](examples/coexist.cordis.yml)
|
|
184
184
|
- [drop-in replacement example](examples/drop-in.cordis.yml)
|
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ wiki.corp.example
|
|
|
178
178
|
| `maxRedirects` | `5` | 同源重定向最大跳数;`0` 表示不跟随 |
|
|
179
179
|
| `userAgent` | `dsh-web-fetch-enhanced/0.1.0` | 每个请求使用的 User-Agent |
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
默认安装(通过 bundle `cordis.patch.yml`)采用独立的 `http-enhanced` provider ID,并显式禁用原生的 `web-fetch-http`,以避免后续其他 Web 插件(如 search 插件)覆盖 `id: web` 的 config 时因 `fetchProvider` 变成未指定而触发 `WEB_PROVIDER_AMBIGUOUS`。需要自定义组合或 drop-in 替换时,参考:
|
|
182
182
|
|
|
183
183
|
- [独立 provider 示例](examples/coexist.cordis.yml)
|
|
184
184
|
- [drop-in 替换示例](examples/drop-in.cordis.yml)
|
package/cordis.patch.yml
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Optional Profile Bundle: select the enhanced HTTP fetch provider on the Host plane.
|
|
2
|
-
#
|
|
3
|
-
|
|
2
|
+
# Disable the native HTTP fetch provider to avoid WEB_PROVIDER_AMBIGUOUS when fetchProvider is unpinned by later bundles.
|
|
3
|
+
- id: web-fetch-http
|
|
4
|
+
disabled: true
|
|
5
|
+
|
|
4
6
|
- id: web
|
|
5
7
|
config:
|
|
6
|
-
searchProvider: deepseek-official
|
|
7
8
|
fetchProvider: http-enhanced
|
|
8
9
|
|
|
9
10
|
- insert:
|
package/docs/design.zh-CN.md
CHANGED
|
@@ -47,13 +47,13 @@ flowchart LR
|
|
|
47
47
|
<code>ctx.web</code> 的选择是 ID 驱动而不是注册顺序驱动:
|
|
48
48
|
|
|
49
49
|
- 配置 <code>fetchProvider: http-enhanced</code> 时只选择本插件默认 ID;
|
|
50
|
-
-
|
|
50
|
+
- 默认 bundle 会在 Profile 中显式禁用原生的 <code>web-fetch-http</code>,从而在多 Web 插件(如 search 插件)覆盖 <code>id: web</code> config 导致 <code>fetchProvider</code> 未固定时,系统只存在唯一的可用 fetch provider,避免 <code>WEB_PROVIDER_AMBIGUOUS</code>;
|
|
51
51
|
- 未配置 ID 且存在多个可用 provider 时会报 <code>WEB_PROVIDER_AMBIGUOUS</code>;
|
|
52
52
|
- 两个 provider 注册相同 ID 会立即报 <code>WEB_DUPLICATE_PROVIDER</code>。
|
|
53
53
|
|
|
54
54
|
所以“覆盖原生”有两种明确模式:
|
|
55
55
|
|
|
56
|
-
1. 推荐模式:本插件使用 <code>http-enhanced</code>,修改现有 web 行的 <code>fetchProvider</code
|
|
56
|
+
1. 推荐模式:本插件使用 <code>http-enhanced</code>,修改现有 web 行的 <code>fetchProvider</code> 并禁用原生 <code>web-fetch-http</code>(由随包附带的 <code>cordis.patch.yml</code> 自动处理);
|
|
57
57
|
2. drop-in 模式:禁用原生 provider,本插件配置 <code>providerId: http</code>。
|
|
58
58
|
|
|
59
59
|
不存在 last-wins 或自动 fallback。
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Profile user patch after installing the bundle, retaining fetchProvider: http.
|
|
2
|
-
# A patch replaces a row's whole config, so both WebRuntime fields are restated.
|
|
3
2
|
- id: web
|
|
4
3
|
config:
|
|
5
|
-
searchProvider: deepseek-official
|
|
6
4
|
fetchProvider: http
|
|
7
5
|
|
|
8
6
|
# The native provider MUST be disabled to avoid duplicate provider id "http".
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Manual Host overlay when the package is resolvable but its dsh.bundle layer
|
|
2
2
|
# is not active. Bundle users should use coexist.cordis.yml instead.
|
|
3
|
+
- id: web-fetch-http
|
|
4
|
+
disabled: true
|
|
5
|
+
|
|
3
6
|
- id: web
|
|
4
7
|
config:
|
|
5
|
-
searchProvider: deepseek-official
|
|
6
8
|
fetchProvider: http-enhanced
|
|
7
9
|
|
|
8
10
|
- insert:
|