dsh-vision-router 2.2.8 → 3.0.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.
Files changed (132) hide show
  1. package/README.md +16 -7
  2. package/README.zh.md +16 -7
  3. package/docs/architecture/2.3.0-compat-retirement.md +147 -0
  4. package/docs/architecture/2.3.0-execution-plan.md +410 -0
  5. package/docs/architecture/2.3.0-final-audit.md +279 -0
  6. package/docs/architecture/2.3.0-reopened-plan.md +720 -0
  7. package/docs/architecture/3.0-architecture-plan.md +252 -0
  8. package/docs/architecture/3.0-r0-contract-ledger.md +137 -0
  9. package/docs/architecture/3.0-r1-source-artifact-boundary.md +98 -0
  10. package/docs/architecture/3.0-r10-final-correctness-closure.md +207 -0
  11. package/docs/architecture/3.0-r11-adversarial-review.md +441 -0
  12. package/docs/architecture/3.0-r5-browser-go-no-go.md +165 -0
  13. package/docs/architecture/3.0-r5-browser-typescript-gate.md +105 -0
  14. package/docs/architecture/3.0-r6-compat-retirement.md +203 -0
  15. package/docs/architecture/3.0-r7-public-api.md +151 -0
  16. package/docs/architecture/3.0-r8-ci-release.md +248 -0
  17. package/docs/architecture/3.0-r9-final-audit.md +370 -0
  18. package/docs/architecture/compat-inventory.md +26 -34
  19. package/docs/architecture/dsh-compatibility-matrix.md +65 -54
  20. package/docs/architecture/dsh-support-window.md +30 -22
  21. package/docs/architecture/final-closure-audit.md +2 -0
  22. package/docs/releases/v2.3.0.md +53 -0
  23. package/docs/releases/v3.0.0.md +85 -0
  24. package/entry.js +9 -57
  25. package/index.js +268 -761
  26. package/lib/agent-request-route-authority.js +1 -20
  27. package/lib/catalog-corrections.js +1 -2
  28. package/lib/client-maintenance-actions.js +145 -0
  29. package/lib/client-presentation-boundary-main.js +75 -17
  30. package/lib/client-presentation-boundary.js +53 -28
  31. package/lib/client.js +246 -144
  32. package/lib/core-apply-lifecycle.js +41 -0
  33. package/lib/core-cache.js +87 -0
  34. package/lib/core-primitives.js +91 -278
  35. package/lib/core-vision-surface-domain.js +63 -0
  36. package/lib/core-vision-surface.js +11 -77
  37. package/lib/delegated-call-config.js +15 -24
  38. package/lib/desktop-screenshot-tool.js +262 -0
  39. package/lib/doctor-cli.js +0 -0
  40. package/lib/doctor-runtime.js +4 -1
  41. package/lib/dsh-contract-compat.js +37 -256
  42. package/lib/dsh-host-capabilities.js +3 -9
  43. package/lib/dsh-settings-017-compat.js +17 -10
  44. package/lib/dsh-support-window.js +3 -3
  45. package/lib/file-logger.js +8 -3
  46. package/lib/grounding-coordinate-runtime.js +1 -2
  47. package/lib/http-body-limit.js +97 -79
  48. package/lib/http-compat.js +1 -2
  49. package/lib/image-offload-compat.js +30 -21
  50. package/lib/image-resource-governor.js +210 -228
  51. package/lib/legacy-global-proxy-boundary.js +46 -3
  52. package/lib/live-model-client-prelude.js +12 -4
  53. package/lib/live-model-discovery.js +134 -43
  54. package/lib/local-remote-settings-permission.js +33 -7
  55. package/lib/local-vision-stabilizer.js +31 -17
  56. package/lib/maintenance-routes.js +134 -0
  57. package/lib/native-image-coexistence.js +15 -3
  58. package/lib/ollama-cold-start.js +87 -23
  59. package/lib/pi-ai-bridge-wire-compat.js +3 -2
  60. package/lib/proxy-dispatcher-pool.js +151 -92
  61. package/lib/proxy-routing.js +75 -51
  62. package/lib/proxy-url-compat.js +3 -10
  63. package/lib/public-config.js +36 -0
  64. package/lib/public-entry.d.ts +148 -0
  65. package/lib/public-entry.js +19 -11
  66. package/lib/remote-settings-bridge.js +11 -0
  67. package/lib/remote-settings-risk-client-boundary.js +155 -0
  68. package/lib/remote-settings-risk-confirmation.js +17 -105
  69. package/lib/replay-delegation.js +12 -7
  70. package/lib/replay-envelope-v2-compat.js +12 -7
  71. package/lib/runtime-composition.js +127 -34
  72. package/lib/runtime-i18n-boundary.js +10 -11
  73. package/lib/screenshot-source-boundary.js +2 -2
  74. package/lib/session-affinity-runtime.js +113 -97
  75. package/lib/session-affinity.js +89 -76
  76. package/lib/session-event-history-compat.js +30 -0
  77. package/lib/session-message-source-compat.js +7 -3
  78. package/lib/session-query-readers.js +263 -0
  79. package/lib/session-surface-compat.js +30 -31
  80. package/lib/session-surface-policy-domain.js +85 -0
  81. package/lib/session-surface-policy.js +2 -111
  82. package/lib/session-turn-resolver.js +2 -6
  83. package/lib/session-vision-attachment-index.js +143 -0
  84. package/lib/session-vision-delegation-boundary.js +34 -0
  85. package/lib/session-vision-delegation.js +22 -0
  86. package/lib/session-vision-index.js +179 -116
  87. package/lib/session-vision-mode-authority.js +229 -192
  88. package/lib/session-vision-mode-boundary.js +65 -22
  89. package/lib/session-vision-policy-domain.js +304 -0
  90. package/lib/session-vision-policy.js +104 -0
  91. package/lib/session-vision-state.js +368 -378
  92. package/lib/settings-client-017-compat.js +9 -7
  93. package/lib/settings-client-loader-lifecycle.js +129 -0
  94. package/lib/sharp-runtime.js +0 -7
  95. package/lib/structured-flow-hardening.js +25 -6
  96. package/lib/tesseract-exec-compat.js +9 -1
  97. package/lib/turn-budget-context.js +47 -41
  98. package/lib/update-check.js +11 -2
  99. package/lib/vision-attachment-handle-runtime.js +176 -156
  100. package/lib/vision-backend-runtime-policy.js +19 -2
  101. package/lib/vision-background-benchmark.js +41 -4
  102. package/lib/vision-background-failure-policy.js +41 -41
  103. package/lib/vision-background-stop-store-core.js +217 -0
  104. package/lib/vision-background-stop-store.js +8 -179
  105. package/lib/vision-capability-benchmark-service.js +1 -0
  106. package/lib/vision-capability-benchmark.js +11 -61
  107. package/lib/vision-capability-evidence.js +35 -0
  108. package/lib/vision-capability-fingerprint.js +72 -0
  109. package/lib/vision-capability-identity.js +116 -61
  110. package/lib/vision-capability-router.js +13 -33
  111. package/lib/vision-chunk-assembler.js +95 -0
  112. package/lib/vision-diagnostics-routes.js +246 -0
  113. package/lib/vision-evidence-guidance.js +3 -1
  114. package/lib/vision-execution-order-apply.js +45 -55
  115. package/lib/vision-execution-order.js +19 -19
  116. package/lib/vision-execution-policy.js +12 -7
  117. package/lib/vision-model-registry.js +30 -17
  118. package/lib/vision-provider-transport.js +137 -176
  119. package/lib/vision-routing-authority.js +47 -48
  120. package/lib/vision-routing-product.js +26 -29
  121. package/lib/vision-routing-settings-prelude.js +8 -3
  122. package/lib/vision-runtime-performance-store.js +166 -0
  123. package/lib/vision-runtime-performance.js +13 -142
  124. package/lib/vision-toggle-root-hardening.js +22 -5
  125. package/lib/vision-tool-runtime-boundary.js +104 -31
  126. package/lib/web/dsh-settings-017-root-transport.js +27 -12
  127. package/lib/web/remote-settings-client.js +6 -9
  128. package/lib/web-capability-boundary.js +17 -7
  129. package/lib/wrapper-directory.js +14 -23
  130. package/package.json +56 -20
  131. package/lib/android-attachment-compat.js +0 -244
  132. package/lib/settings-client-rc8-lifecycle.js +0 -397
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  </p>
18
18
 
19
19
  <p align="center">
20
- <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v2.2.1"><img src="https://img.shields.io/badge/release-v2.2.1-5B4CF0?style=flat-square" alt="Release v2.2.1" /></a>
20
+ <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v2.3.0"><img src="https://img.shields.io/badge/release-v2.3.0-5B4CF0?style=flat-square" alt="Release v2.3.0" /></a>
21
21
  <a href="tests"><img src="https://img.shields.io/badge/verified-Node%2022%20%2B%2024-2EA44F?style=flat-square" alt="Verified: Node 22 + 24" /></a>
22
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="License: MIT" /></a>
23
23
  <a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white" alt="Node.js >=22" /></a>
@@ -42,9 +42,9 @@
42
42
  > **Data leaves your machine by default.** When a cloud vision model is used, Vision Router sends the image (or a derived crop), the vision prompt and related request metadata to that provider. A fresh install has an anonymous OVHcloud vision fallback enabled, so "free" and "no key" do **not** mean offline. Do not use the cloud chain for confidential, regulated or classified material. See [Data flow and strict local-only use](#data-flow-and-strict-local-only-use).
43
43
 
44
44
  > [!WARNING]
45
- > 📌 **Announcement (v2.2.5)**
45
+ > 📌 **Announcement (v3.0.0)**
46
46
  >
47
- > **v2.2.5:** Adds fail-closed **Local-only vision** and fixes the remaining DSH `0.1.7-rc.2` Windows Desktop multi-plugin `Loading plugins…` hang by isolating Vision Router’s WebServer registrar from other plugins. The public Host floor remains `0.1.0-rc.8`. [What’s new →](docs/releases/v2.2.5.md)
47
+ > **v3.0.0: Session Vision policy now has a durable owner.** The supported DSH 0.1.x window now starts at `0.1.5-rc.1`, while the 0.2.x train starts at verified `0.2.0-rc.2`; Vision authority lives in a scoped, Host-storage-backed policy store, hydrates before child sessions publish, and binds delegation to the Host Agent lifecycle. The package root is a deliberate, typed public API, the runtime installation is grouped into explicit composition phases with an explicitly passed provider transport, and a new required peer (`@deepseek-ai/dsh-storage-domain`) is added. This release also closes the R11 adversarial final audit. [What’s new →](docs/releases/v3.0.0.md)
48
48
 
49
49
  <p align="center">
50
50
  <img src="assets/vision-demo.gif" width="640" alt="Demo: paste an image, the agent locates the send button with vision_ground / vision_crop / vision_pixel_diff and answers with coordinates" />
@@ -151,6 +151,15 @@ For normal npm/npx installs, installation is a single command:
151
151
  npx @deepseek-ai/dsh plugin --profile web add dsh-vision-router
152
152
  ```
153
153
 
154
+ > [!IMPORTANT]
155
+ > **Which profile?** Install into an **existing profile that already serves the Web UI**:
156
+ >
157
+ > - Web DSH: `--profile web` (default data directory `~/.dsh`);
158
+ > - the official DeepSeek Harness desktop app: `--profile desktop` (same `~/.dsh` data directory; reload the plugin or restart the app afterwards);
159
+ > - Oh-DSH Desktop: its data directory is `~/.ohdsh`, see [Oh-DSH Desktop](#oh-dsh-desktop) below.
160
+ >
161
+ > `dsh plugin add` only adds the plugin to the profile you name. A **brand-new** profile contains just `@deepseek-ai/dsh-base`, and `dsh web` never binds a port in that state (no Web surface). Install into an existing profile, or give the new profile a Web surface first.
162
+
154
163
  > [!WARNING]
155
164
  > If this profile already loads community plugins manually through `cordis.patch.yml`, do **not** mix that legacy setup with `dsh plugin add` / `dsh plugin list`: current DSH CLI behavior can also append bundle-patch dependencies to `dsh.profile.bundles`, causing those plugins to register twice. Migrate the existing manual plugin rows to bundle-managed loading first, or keep using the manual installation path. See [deepseek-harness discussion #2889](https://github.com/deepseek-ai/deepseek-harness/discussions/2889).
156
165
 
@@ -320,11 +329,11 @@ Failures are classified (region / tos / quota / rate-limit / context / network)
320
329
 
321
330
  Stealth mode is **off by default** (explicit opt-in since issue #34): the official `deepseek-official` route stays untouched. When you need images, the composer’s “👁 Vision” control switches to the internal DeepSeek wrapper, which is hidden from the stock picker and `/model` presentation by default.
322
331
 
323
- On newer DSH Host generations, the official DeepSeek provider owns request-local attachment, file and image-access behavior. Vision Router therefore **never reconstructs or resurrects `deepseek-official` on those Hosts**. Keep `llm-deepseek` enabled and use the internal “DeepSeek + Auto Vision” wrapper / “👁 Vision” control for image tasks. If the official row is disabled or unavailable, the settings card reports that configuration problem instead of silently recreating a partial provider.
332
+ On every DSH Host supported by DVR 2.3, the official DeepSeek provider owns request-local attachment, file and image-access behavior. Vision Router therefore **never reconstructs or resurrects `deepseek-official`**. Keep `llm-deepseek` enabled and use the internal “DeepSeek + Auto Vision” wrapper / “👁 Vision” control for image tasks. If the official row is disabled or unavailable, the settings card reports that configuration problem instead of silently recreating a partial provider.
324
333
 
325
- Legacy Host contracts that do not expose this provider-ownership capability retain the historical takeover/keep-alive behavior for compatibility: when their stock DeepSeek row is absent, Vision Router can still rebuild the legacy provider path so existing profiles and sessions keep working. This fallback is not a setup requirement for current Hosts and should not be enabled by disabling `llm-deepseek` on a modern installation.
334
+ The historical `stealth` field is retained only so existing profiles continue to parse cleanly; it no longer grants provider-takeover authority on the DVR 2.3 support window.
326
335
 
327
- > Stealth mode **only affects the official DeepSeek route**. Custom/third-party routes such as opencode also receive internal vision wrappers by default, used through the composer toggle rather than a second user-facing model group.
336
+ > Custom/third-party routes such as opencode also receive internal vision wrappers by default, used through the composer toggle rather than a second user-facing model group.
328
337
 
329
338
  ## Auto-vision wrappers and manual scope
330
339
 
@@ -436,7 +445,7 @@ ollama pull qwen2.5vl
436
445
  ## Requirements
437
446
 
438
447
  - DeepSeek Harness Web profile. Normal installs can use `npx @deepseek-ai/dsh ...`; source checkouts use `pnpm dsh ...`. A bare `dsh ...` command only works when the CLI is already on your shell `PATH`.
439
- - **DSH Host support policy:** DVR 2.2.x keeps DSH `0.1.0-rc.8` as the public minimum and currently supports the released stable channel through `0.1.5-rc.3`. The DSH `0.2.x` train is peer-admitted from the verified `0.2.0-rc.1` boundary (`>=0.2.0-rc.1 <0.3.0-0`); exact `0.2.0-rc.2` (`next/rc`) source, real Host, Windows Desktop, multi-plugin, Settings, mixed-attachment, bundle-recompose, and Host-Sharp gates are preview verification evidence, not a support-floor increase. The final stable `0.2.0` tag and signed Desktop artifact will still be revalidated when published. DVR 2.0.x was the final train with public support for rc.6/rc.7. See [DSH Host support window](docs/architecture/dsh-support-window.md).
448
+ - **DSH Host support policy:** DVR 3.0.x supports DSH 0.1.x continuously from `0.1.5-rc.1` (current stable evidence: `0.1.5-rc.3`) and supports the 0.2.x train from verified `0.2.0-rc.2`. Exact `0.2.0-rc.2` is also the ordinary 3.0 development Host. Pre-0.1.5 Hosts are unsupported, and DVR no longer publishes the older jagged 0.1.x exception list. Runtime behavior remains capability-based. See [DSH Host support window](docs/architecture/dsh-support-window.md).
440
449
  - Node ≥ 22 (host side).
441
450
  - No API key for the default free chain; a credential reference (`apiKeyEnv`) only for paid `httpProviders`.
442
451
  - Chrome / Chromium / Edge is needed only for `vision_html_screenshot`; every other tool works without a browser.
package/README.zh.md CHANGED
@@ -17,7 +17,7 @@
17
17
  </p>
18
18
 
19
19
  <p align="center">
20
- <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v2.2.1"><img src="https://img.shields.io/badge/release-v2.2.1-5B4CF0?style=flat-square" alt="Release v2.2.1" /></a>
20
+ <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v2.3.0"><img src="https://img.shields.io/badge/release-v2.3.0-5B4CF0?style=flat-square" alt="Release v2.3.0" /></a>
21
21
  <a href="tests"><img src="https://img.shields.io/badge/verified-Node%2022%20%2B%2024-2EA44F?style=flat-square" alt="已验证 Node 22 + 24" /></a>
22
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="MIT 许可证" /></a>
23
23
  <a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white" alt="Node.js >=22" /></a>
@@ -42,9 +42,9 @@
42
42
  > **默认配置会让数据出网。** 使用云端视觉模型时,Vision Router 会将图片(或由它裁剪出的局部)、识图提示词及相关请求元数据发送给对应供应商。新安装默认开启 OVHcloud 匿名视觉兜底,因此“免费”和“免 Key”不等于离线。涉密、涉案、内部或其他受限材料请勿使用云端链路。详见[数据流向与严格纯本地配置](#数据流向与严格纯本地配置)。
43
43
 
44
44
  > [!WARNING]
45
- > 📌 **公告(v2.2.5)**
45
+ > 📌 **公告(v3.0.0)**
46
46
  >
47
- > **v2.2.5:新增 fail-closed 的「仅本地视觉」,并根修 DSH `0.1.7-rc.2` Windows Desktop 多插件环境下残留的 `Loading plugins…` 卡死——Vision Router 的 WebServer registrar 不再污染其他插件。公开最低 Host 仍保持 `0.1.0-rc.8`。** [查看完整更新 →](docs/releases/v2.2.5.md)
47
+ > **v3.0.0:Session Vision policy 有了持久归属。DSH 0.1.x 正式支持线提高到 `0.1.5-rc.1` 起,0.2.x 从已验证的 `0.2.0-rc.2` 起;识图权威由作用域化的、Host storage 背书的策略存储持有,子会话发布前完成 hydrate,委派绑定 Host Agent 生命周期;包根改为显式声明且带类型的公共 API,运行时装配显式分阶段、provider transport 必须显式传入,并新增必需 peer `@deepseek-ai/dsh-storage-domain`。本版本同时完成 R11 对抗终审。** [查看完整更新 →](docs/releases/v3.0.0.md)
48
48
 
49
49
  <p align="center">
50
50
  <img src="assets/vision-demo.gif" width="640" alt="演示:粘贴图片,Agent 用 vision_ground / vision_crop / vision_pixel_diff 定位发送按钮并给出坐标" />
@@ -149,6 +149,15 @@ Vision Router 在默认配置下不是完全离线工具。具体边界取决于
149
149
  npx @deepseek-ai/dsh plugin --profile web add dsh-vision-router
150
150
  ```
151
151
 
152
+ > [!IMPORTANT]
153
+ > **装到哪个 profile?** 请装进**已经存在、并且自带 Web 界面**的 profile:
154
+ >
155
+ > - 网页版 DSH:`--profile web`(默认数据目录 `~/.dsh`);
156
+ > - 官方 DeepSeek Harness 桌面应用:`--profile desktop`(同一个 `~/.dsh` 数据目录,装完在应用里重新加载插件或重启一次应用);
157
+ > - Oh-DSH Desktop:数据目录是 `~/.ohdsh`,见下方 [Oh-DSH Desktop](#oh-dsh-desktop)。
158
+ >
159
+ > `dsh plugin add` 只是把插件加进**指定** profile。**全新创建**的 profile 只含 `@deepseek-ai/dsh-base`,此时 `dsh web` 不会绑定端口(没有 Web 面)。请装进已有的 profile,或先让新 profile 具备 Web 面。
160
+
152
161
  > [!WARNING]
153
162
  > 如果这个 profile 里已经有通过 `cordis.patch.yml` **手动挂载**的社区插件,不要再把这种旧式加载方式与 `dsh plugin add` / `dsh plugin list` 混用:当前 DSH CLI 可能同时把带 bundle patch 的依赖追加到 `dsh.profile.bundles`,导致这些插件被重复注册。请先把原有手动插件迁移到 bundle 管理方式,或继续沿用手动安装路径。详见 [deepseek-harness Discussion #2889](https://github.com/deepseek-ai/deepseek-harness/discussions/2889)。
154
163
 
@@ -318,11 +327,11 @@ vision_long_screenshot_ocr image="chat-log.png" chunkHeight=1200 overlap=120
318
327
 
319
328
  隐身模式默认**关闭**(issue #34 起显式 opt-in):官方 `deepseek-official` 路由原样保留;需要看图时通过输入框旁的「👁 识图」切换到内部 DeepSeek wrapper。该 wrapper 默认从原生模型选择器和 `/model` 展示层隐藏。
320
329
 
321
- 在新版 DSH Host 中,官方 DeepSeek provider 自己负责请求期的附件、Files API 与图片访问能力。因此 Vision Router **不会再重建或复活 `deepseek-official`**。请保持 `llm-deepseek` 启用,通过内部「DeepSeek + 自动识图」wrapper /「👁 识图」处理图片;如果官方行被禁用或不可用,设置页会明确提示重新启用,而不是偷偷注册一个能力不完整的替代 provider。
330
+ 在 DVR 2.3 支持的所有 DSH Host 中,官方 DeepSeek provider 都由 Host 自己负责请求期的附件、Files API 与图片访问能力。因此 Vision Router **不会重建或复活 `deepseek-official`**。请保持 `llm-deepseek` 启用,通过内部「DeepSeek + 自动识图」wrapper /「👁 识图」处理图片;如果官方行被禁用或不可用,设置页会明确提示重新启用,而不是偷偷注册一个能力不完整的替代 provider。
322
331
 
323
- 缺少这项 provider ownership 能力的 legacy Host contract 仍保留历史接管 / keep-alive 行为,以兼容旧 profile 和旧会话:只有这条兼容路径在官方行缺失时才可能由 Vision Router 重建旧 provider。这不是新版 Host 的配置方式;当前安装不要为了隐身模式去禁用 `llm-deepseek`。
332
+ 历史 `stealth` 字段仅为兼容已有 profile 而继续读取;在 DVR 2.3 支持窗口内,它不再具有接管 provider 的权限。
324
333
 
325
- > 隐身模式**只作用于官方 DeepSeek 路由**。opencode 等自定义/第三方文本路由与隐身模式无关——默认也会生成内部识图 wrapper,由「👁 识图」按需使用。
334
+ > opencode 等自定义/第三方文本路由默认也会生成内部识图 wrapper,由「👁 识图」按需使用。
326
335
 
327
336
  ## 自动识图包装与手动范围
328
337
 
@@ -434,7 +443,7 @@ ollama pull qwen2.5vl
434
443
  ## 环境要求
435
444
 
436
445
  - DeepSeek Harness 的 Web profile。普通安装可用 `npx @deepseek-ai/dsh ...`;从源码仓库运行时用 `pnpm dsh ...`。只有 CLI 已经进入系统 `PATH` 时才能直接写 `dsh ...`。
437
- - **DSH Host 支持策略:** DVR 2.2.x 的公开最低 Host 仍为 DSH `0.1.0-rc.8`,当前稳定通道已验证并支持到 `0.1.5-rc.3`。DSH `0.2.x` 从已验证的 `0.2.0-rc.1` 边界开始准入(`>=0.2.0-rc.1 <0.3.0-0`);精确 `0.2.0-rc.2`(`next/rc`)源码、真实 Host、Windows Desktop、多插件、Settings、混合附件、bundle 重组及 Host-Sharp 门禁仅作为预览验证证据,不抬高公开支持下限。上游正式发布稳定版 `0.2.0` tag 和签名 Desktop 安装包后仍会立即复验。DVR 2.0.x 是最后公开支持 rc.6/rc.7 的版本线。详见 [DSH Host 支持窗口](docs/architecture/dsh-support-window.md)。
446
+ - **DSH Host 支持策略:** DVR 3.0.x 从 `0.1.5-rc.1` 起连续支持 DSH 0.1.x(当前稳定证据为 `0.1.5-rc.3`),并从已验证的 `0.2.0-rc.2` 起支持 0.2.x;精确 `0.2.0-rc.2` 同时作为 3.0 默认开发 Host。低于 0.1.5 的 Host 不再支持,也不再维护旧的 0.1.x 锯齿式例外列表。运行时仍按能力判断,而不是按版本字符串分支。详见 [DSH Host 支持窗口](docs/architecture/dsh-support-window.md)。
438
447
  - Node ≥ 22(宿主侧)。
439
448
  - 默认免费链路无需 API Key;付费 `httpProviders` 只需一个凭据引用(`apiKeyEnv`)。
440
449
  - 只有 `vision_html_screenshot` 需要 Chrome / Chromium / Edge;其余工具无浏览器也能用。
@@ -0,0 +1,147 @@
1
+ # DVR 2.3.0 compatibility retirement review
2
+
3
+ > **R2.3 re-audit complete.** The original review predates the v2.2.8 / DSH 0.2.0-rc.2 / shared Desktop client-carrier line. The reopened audit retired every seam proven to exist only for a pre-`0.1.5` Host and reclassified the remaining seams against current-Host, durable-data, product, or platform evidence.
4
+
5
+ Review baseline: `2.3.0@d808014` after explicit `VisionProviderTransport` plumbing.
6
+
7
+ This review records Workstream B of the 2.3.0 architecture plan. A compatibility seam is not removed merely because it is old or awkward; deletion requires its existing removal condition to be satisfied by current Host/product evidence.
8
+
9
+ ## Result
10
+
11
+ The process/profile `VisionProviderTransport` registry, the pre-floor Android/no-batch attachment fallback, and the pre-floor DeepSeek provider reconstruction path are retired. No remaining retained compatibility seam is presently classified `retire-ready` or `historical-only`.
12
+
13
+ | State | Count | Meaning in 2.3.0 |
14
+ | --- | ---: | --- |
15
+ | `retain-host-gap` | 6 | A supported/admitted Host still lacks the native seam needed to remove it. |
16
+ | `product-compat` | 4 | DVR intentionally retains provider, persisted-history, platform, or voluntary legacy compatibility independent of a current Host defect. |
17
+ | `retire-ready` | 0 | No remaining seam has met its removal condition. |
18
+ | `historical-only` | 0 | No retained seam is dead production code awaiting deletion. |
19
+
20
+ The canonical per-file classifications live in `compat-inventory.md` and are checked by `compat-inventory-completeness.test.js`.
21
+
22
+ ## B1 — retired provider transport registry
23
+
24
+ The former module-level `installed[]`, `installVisionProviderTransport()` and `currentVisionProviderTransport()` carrier has been deleted. The production dependency path is now explicit:
25
+
26
+ ```text
27
+ public-entry creates VisionProviderTransport
28
+ -> entry internal runtime argument
29
+ -> runtime-composition Core runtime dependency
30
+ -> mature Core call sites
31
+ -> http-compat / catalog-corrections options
32
+ ```
33
+
34
+ Direct/unit helper callers retain their historical fallback behavior when no explicit transport is supplied. Two concurrent explicit transports are regression-tested to remain isolated, so one runtime can no longer steal another runtime's provider transport by being installed last.
35
+
36
+ Architecture Closure now forbids every module-global `installed[]` runtime registry rather than allowing a provider-transport exception.
37
+
38
+ ## R2.3-C — retired rc.7-era public compatibility aliases
39
+
40
+ The transitional public aliases `isRc7ContractRuntime`, `protectRc7ProviderOwnership`, and `installRc7SettingsCompatibility` are removed from both `entry.js` and `lib/dsh-contract-compat.js`.
41
+
42
+ Repository-wide reachability review found no production consumer: the names existed only as public re-exports plus tests asserting that each alias equaled its capability-named replacement. DVR 2.3's support floor is now the continuous DSH 0.1.5+ line, so retaining rc.7-labelled API aliases would preserve only implementation archaeology rather than supported behavior.
43
+
44
+ The capability-named APIs remain authoritative:
45
+
46
+ - `hasBatchAttachmentContract`;
47
+ - `protectHostProviderOwnership`;
48
+ - `installHostSettingsCompatibility`.
49
+
50
+ This retirement changes no runtime behavior and intentionally shrinks the 2.3 public compatibility surface.
51
+
52
+ ## R2.3-D — supported-window retained-seam verdict
53
+
54
+ After the three concrete retirements above, the remaining seams were re-audited against minimum `0.1.5-rc.1`, current `0.1.5-rc.3`, mid-train `0.1.7-rc.2`, and exact `0.2.0-rc.2` evidence.
55
+
56
+ The review stops deleting code at this point because every remaining seam has a reachable non-pre-floor reason:
57
+
58
+ - `dsh-contract-compat.js`: supported Settings generations still differ, SessionQuery readers remain capability-scoped, and historical attachment-policy overlays are durable profile data that can survive a Host upgrade;
59
+ - `adapter-update-coalescer.js`: DVR-owned adapters remain plain/duck-typed objects and still require current Host base-contract normalization plus bounded synchronous reconciliation;
60
+ - `settings-client-loader-lifecycle.js` (historically `settings-client-rc8-lifecycle.js`): immutable 0.1.5-rc.1 through 0.2.0-rc.2 sources still replace the live module loader during `create()`; R4 renamed the source/API by capability and moved permission/risk semantics into their own owners while retaining the lifecycle reattachment;
61
+ - `pi-ai-bridge-wire-compat.js`: current pi-ai carries generic `sessionId` but does not yet emit OpenCode Go's required `x-opencode-session`;
62
+ - replay, proxy, legacy Core visual-policy, HTTP, Tesseract and AbortSignal seams remain durable-data, explicit product, or runtime/platform compatibility rather than pre-floor Host support.
63
+
64
+ The normative exact-source matrix now excludes pre-floor `0.1.5-alpha.2`. That immutable Host may remain in a separately labelled browser surveillance workflow, but it is not peer-admitted or counted as DVR 2.3 support evidence.
65
+
66
+ This is the final R2.3 exit state. The renamed compatibility suite, minimum/current contracts, exact supported-source matrix and aggregate 2.3 gate are green. Final evidence:
67
+
68
+ - exact supported 0.1.x source matrix: run `36659179011`;
69
+ - minimum/current Host contract: run `36660877445`;
70
+ - aggregate 2.3 gate: run `36660877636`, including Node 22/24, current `0.1.5-rc.3`, exact rc.2 source on three OSes, Chromium, Windows Desktop 22/24, macOS Desktop lifecycle and final `critical-gate`.
71
+
72
+
73
+ ## B2 — retained seam classification
74
+
75
+ ### `retain-host-gap`
76
+
77
+ - `dsh-contract-compat.js` — attachment/settings/provider contracts still vary across admitted Host generations.
78
+ - `adapter-update-coalescer.js` — adapter contract/event ordering compatibility remains required by supported Host behavior.
79
+ - `pi-ai-bridge-wire-compat.js` — direct image bridge wire facts and OpenCode session affinity are not yet fully native on every supported path.
80
+ - `settings-client-loader-lifecycle.js` — browser settings loader lifecycle still differs across the support window; only the historical in-page marker/sentinel retains the rc8 token for mixed-generation/HMR idempotency.
81
+ - `legacy-global-proxy-boundary.js` — Host-owned visual adapters still expose no DVR-scoped request/dispatcher parameter for the supported explicit proxy override.
82
+ - `legacy-core-vision-policy-bridge.js` — the Host still lacks both native session-memory rewrite and durable current-turn attachment-reference seams needed by the two retained behaviors.
83
+
84
+ ### `product-compat`
85
+
86
+ - `replay-envelope-v2-compat.js` — persisted historical sessions are product data compatibility, not merely a currently running Host-version branch.
87
+ - `http-compat.js` — provider/model wire quirks are an intentional provider compatibility layer.
88
+ - `tesseract-exec-compat.js` — Node/platform child-process and Windows DPI behavior is a platform compatibility concern.
89
+ - `abort-signal-compat.js` — partial Host/bridge JS realms remain a runtime compatibility concern; native helpers are never replaced when present.
90
+
91
+ ## R2.3-A — retired Android/no-batch attachment fallback
92
+
93
+ The reopened support-window audit retires `lib/android-attachment-compat.js` and `attachmentContextForContract()`.
94
+
95
+ This is a reachability deletion, not an Android product-policy withdrawal. The retired wrapper could run only when the Host attachment service lacked `saveImages()`. Every immutable Host line spanning the DVR 2.3 support/evidence window already exposes the batch contract:
96
+
97
+ - `dsh-v0.1.5-rc.1` — `183f08e9c6dde7e36cd2318eaee70b0da08fb35e`;
98
+ - `dsh-v0.1.5-rc.3` — `a4c74a91e06b00fe0b0937bde982170c526cc842`;
99
+ - `dsh-v0.1.6-alpha.1` — `0a15e36e7f82b6ed45af6fa9759f29b40dcd965d`;
100
+ - `dsh-v0.1.7-rc.2` — `477b4f420553e8a52c2fbccc464d7561b239c443`;
101
+ - `dsh-v0.2.0-rc.2` — `639ed015397290b3745d163aafe02ffee4aa3f84`.
102
+
103
+ The former helper also installed the read-only Host capability diagnostics route. That side effect is preserved explicitly in `runtime-composition.js` through `installDshHostCapabilityDiagnostics(settingsCtx)`, and the P3 composition contract locks its position before the tool/runtime boundaries.
104
+
105
+ The fallback stored only bounded process-local transient image bytes, so no durable Session/profile/config input depends on it. Removing it therefore changes no supported Host behavior and removes no durable-data reader.
106
+
107
+ ## R2.3-B — retired legacy DeepSeek provider reconstruction
108
+
109
+ DVR 2.3 no longer rebuilds a missing `deepseek-official` provider, registers the hidden `deepseek-official-native` surrogate, waits on the historical 2-second keep-alive settle window, or reconstructs `@deepseek-ai/dsh-llm-deepseek` from plugin-owned settings/credentials.
110
+
111
+ The deletion follows the same immutable Host evidence used by R2.3-A: every supported Host generation from `0.1.5-rc.1` forward owns the batch attachment contract and therefore the official DeepSeek request-local attachment/file/image-access lifecycle. Reconstructing that adapter inside DVR would create a partial second owner and is no longer an allowed supported-Host fallback.
112
+
113
+ The persisted `stealth` setting remains readable so existing profiles continue to load; under DVR 2.3 it does not grant provider-takeover authority. A missing official row is reported as `host-owned-official-unavailable` and users are directed to re-enable `llm-deepseek`.
114
+
115
+ Durable-data compatibility is intentionally separate from production creation. `replay-delegation.js`, the scoped proxy boundary and Host-ownership guard may continue to recognize the historical `deepseek-official-native` identifier so old Session/replay/config inputs remain interpretable. R2.3-B removes the code that **creates** the route, not the code that safely understands historical evidence.
116
+
117
+ ## B3 — DSH Web activation overlays remain required
118
+
119
+ The exact DSH `0.2.0-rc.1` evidence recorded in `dsh-support-window.md` still has:
120
+
121
+ - the official `modules` row without a `webServer` activation dependency;
122
+ - the official `connection` row owning `webRuntime` but not `webServer`.
123
+
124
+ Therefore the DVR `modules -> webServer` and `connection -> webServer` overlays remain `shim-required`. Existing source-contract classifiers intentionally fail with `retire-ready` when upstream begins owning these dependencies; 2.3.0 does not pre-empt that signal.
125
+
126
+ ## B4 — legacy proxy compatibility remains narrow
127
+
128
+ `proxy` / `proxyHosts` remain supported, non-deprecated Advanced overrides. The compatibility boundary is retained because Host-owned visual adapter requests still cannot receive the DVR override explicitly.
129
+
130
+ The only unscoped fallback is the documented persisted/manual legacy state:
131
+
132
+ ```text
133
+ routing === true
134
+ chainRoute === ''
135
+ ```
136
+
137
+ Whitespace, a configured chain route, routing disabled, Router-owned direct HTTP, and ordinary Host traffic do not obtain this unscoped authority. `legacy-global-proxy-boundary.test.js` locks this reachability and the scoped/concurrent isolation behavior.
138
+
139
+ No proxy product-policy change is part of 2.3.0.
140
+
141
+ ## Remote Settings is not a compatibility-retirement target
142
+
143
+ Remote Settings keeps the frozen 2.3.0 product decision: the risk confirmation is a reminder/acknowledgement, not a server-side authentication or validation gate. Workstream B does not reclassify or strengthen that behavior.
144
+
145
+ ## B exit decision
146
+
147
+ Workstream B plus reopened R2.3 currently records three real retirements (the provider transport registry, the Android/no-batch attachment fallback, and legacy DeepSeek provider reconstruction) and no speculative shim deletion. Mature-Core extraction may proceed while the remaining compatibility inventory stays capability-detected and independently removable when its recorded conditions become true.