dsh-vision-router 3.1.0 → 3.1.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.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
> **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).
|
|
23
23
|
|
|
24
24
|
> [!WARNING]
|
|
25
|
-
> **v3.1.
|
|
25
|
+
> **v3.1.1 release candidate notes:** fix Vision Session tool scoping/HMR and text-bridge fallback on explicit non-multimodal refusal; add Zod build and DSH RC5 compatibility gates. See [v3.1.1 notes](docs/releases/v3.1.1.md). The actual installable version is listed on [GitHub Releases](https://github.com/ysr666/dsh-vision-router/releases/latest) and npm.
|
|
26
26
|
|
|
27
27
|
## Start here
|
|
28
28
|
|
|
@@ -79,7 +79,7 @@ These are ordinary chat requests: your normal model reasons through the task and
|
|
|
79
79
|
- **Automatic failover with classified errors.** Region blocks, ToS filtering, 402 quota, 429 rate limits, context overflow, network failures — the chain walks providers one by one and only reports after all of them failed, with actionable advice. A 429 immediately advances to the next backend and opens a Retry-After-aware cooldown instead of sleeping inside the request.
|
|
80
80
|
- **Image memory.** Vision answers are cached by attachment content hash; later text turns substitute the recorded description (marked as untrusted evidence), so DeepSeek genuinely remembers earlier images without re-spending vision calls.
|
|
81
81
|
- **A verifiable pixel loop.** Reference → `vision_html_screenshot` → `vision_pixel_diff` (ratio + worst 8×8-grid regions) → fix → repeat until the mismatch converges. UI restoration becomes measurable instead of eyeballed.
|
|
82
|
-
- **Stable tool schema.** All fourteen deep tools
|
|
82
|
+
- **Stable tool schema.** All fourteen deep tools register globally at startup by default, avoiding a mid-conversation tool-list expansion that can invalidate long-context KV/prefix caches. Individual Agents see them only while their conversation has Vision enabled. `progressiveTools: true` remains an advanced boot-time opt-in; only then does `vision_activate` mount the tools on demand. See [`docs/progressive-tools-cache.md`](docs/progressive-tools-cache.md).
|
|
83
83
|
- **Selective proxy.** Only the configured vision provider hosts go through your local proxy; DeepSeek stays direct.
|
|
84
84
|
|
|
85
85
|
### Pixel loop in practice
|
|
@@ -100,7 +100,9 @@ The vision model is **only the eyes**; DeepSeek is **always the brain**. An imag
|
|
|
100
100
|
|
|
101
101
|
## Tools
|
|
102
102
|
|
|
103
|
-
Default `progressiveTools: false`: all fourteen deep tools
|
|
103
|
+
Default `progressiveTools: false`: all fourteen deep tools are registered at startup. **Registration does not grant access in every conversation**: turn **Vision ON** in the current chat to make them visible and callable by its Agent. While Vision is OFF, that Agent cannot use `vision_colors`, `vision_ocr`, or the other Vision Router tools, even with `tool: true` in Settings. Under this default mode, `vision_activate` is **not registered**.
|
|
104
|
+
|
|
105
|
+
To opt into progressive mounting, explicitly set `progressiveTools: true` in the profile/composition `cordis.patch.yml`. Only then is `vision_activate` initially exposed to Vision-enabled Sessions; the full tool set mounts upon activation and the `vision-tools` skill is registered. This is a boot-time switch; restart DSH after changing it. Built on sharp / potrace / tesseract / system Chrome — no Python:
|
|
104
106
|
|
|
105
107
|
<p align="center">
|
|
106
108
|
<img src="assets/vision-tools.svg" width="100%" alt="Eleven image-processing tools available in DSH Vision Router." />
|
|
@@ -609,7 +611,7 @@ exploration (LLM7.io and OVHcloud anonymous tiers) by
|
|
|
609
611
|
|
|
610
612
|
## Release notes and community
|
|
611
613
|
|
|
612
|
-
Release details: [v3.1.
|
|
614
|
+
Release details: [v3.1.1 release candidate notes](docs/releases/v3.1.1.md). Check GitHub Releases or npm for the published version.
|
|
613
615
|
|
|
614
616
|
<p align="center">
|
|
615
617
|
<sub>Ecosystem:</sub>
|
package/README.zh.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
> **默认配置会让数据出网。** 使用云端视觉模型时,Vision Router 会将图片(或由它裁剪出的局部)、识图提示词及相关请求元数据发送给对应供应商。新安装默认开启 OVHcloud 匿名视觉兜底,因此“免费”和“免 Key”不等于离线。涉密、涉案、内部或其他受限材料请勿使用云端链路。详见[数据流向与严格纯本地配置](#数据流向与严格纯本地配置)。
|
|
23
23
|
|
|
24
24
|
> [!WARNING]
|
|
25
|
-
> **v3.1.
|
|
25
|
+
> **v3.1.1 候选版更新说明:** 修复 Session 工具作用域及热重载边界、上游明确拒图后的文本桥回退,并增加 Zod 跨版本构建及 DSH RC5 兼容门禁。参见[v3.1.1 更新说明](docs/releases/v3.1.1.md)。正式可安装版本以 [GitHub Releases](https://github.com/ysr666/dsh-vision-router/releases/latest) 或 npm 为准。
|
|
26
26
|
|
|
27
27
|
## 先用起来
|
|
28
28
|
|
|
@@ -79,7 +79,7 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-vision-router
|
|
|
79
79
|
- **自动降级 + 分类报错。** 地区限制、ToS 风控、402 额度、429 限流、上下文超长、网络故障——链路逐供应商尝试,全部失败才报错并给出可操作的建议。遇到 429 会立即尝试下一后端,并按 Retry-After 开启冷却,不会在单次请求内睡眠等待。
|
|
80
80
|
- **图片记忆。** 视觉答案按附件内容哈希缓存;后续文字轮用记录的描述替换历史图片(标注为不可信证据),DeepSeek 真正“记得”之前发过的图,且不重复消耗视觉调用。
|
|
81
81
|
- **可验证的像素闭环。** 参照图 → `vision_html_screenshot` → `vision_pixel_diff`(差异率 + 红色热力图 + 最差区域排行)→ 修复 → 再对比,直到差异收敛。UI 还原从“目测”变成“实测”。
|
|
82
|
-
- **稳定工具 schema。**
|
|
82
|
+
- **稳定工具 schema。** 默认在插件启动时全局注册完整 14 个深看工具,避免图片轮中途扩展工具列表导致长上下文的 KV / prefix cache 失效;但只有当前会话开启 Vision,Agent 才能看到这些工具。仍保留 `progressiveTools: true` 作为高级启动期选项;开启后才使用 `vision_activate` 按需挂载。详见 [`docs/progressive-tools-cache.md`](docs/progressive-tools-cache.md)。
|
|
83
83
|
- **选择性代理。** 只有配置的视觉供应商域名走本地代理;DeepSeek 保持直连。
|
|
84
84
|
|
|
85
85
|
### 像素闭环实测
|
|
@@ -100,7 +100,9 @@ Agent 仅根据参考图复刻 UI,再用 `vision_pixel_diff` 验证最终结
|
|
|
100
100
|
|
|
101
101
|
## 工具
|
|
102
102
|
|
|
103
|
-
默认 `progressiveTools: false`:14
|
|
103
|
+
默认 `progressiveTools: false`:14 个深看工具在插件启动时即注册。但**注册成功不等于所有会话都能调用**:须在当前聊天中打开 **Vision(视觉)**,该会话的 Agent 才能看到和调用视觉工具。Vision 关闭时,即使设置里 `tool: true`,也无法调用 `vision_colors`、`vision_ocr` 等工具。默认模式下**不会注册 `vision_activate`**。
|
|
104
|
+
|
|
105
|
+
需要渐进式挂载时,可在 profile / composition 的 `cordis.patch.yml` 中显式设置 `progressiveTools: true`。这时已开启 Vision 的会话初始可使用 `vision_activate`,激活后再挂载完整工具并注册 `vision-tools` 技能。该开关属于启动期配置,修改后需重启 DSH。全部工具基于 sharp / potrace / tesseract / 系统 Chrome——无 Python:
|
|
104
106
|
|
|
105
107
|
<p align="center">
|
|
106
108
|
<img src="assets/vision-tools-zh.svg" width="100%" alt="DSH Vision Router 的 11 个图像处理工具。" />
|
|
@@ -603,7 +605,7 @@ npx dsh-vision-router doctor --profile web
|
|
|
603
605
|
|
|
604
606
|
## 版本公告与社区链接
|
|
605
607
|
|
|
606
|
-
版本更新详情:[v3.1.
|
|
608
|
+
版本更新详情:[v3.1.1 候选版更新说明](docs/releases/v3.1.1.md)。正式可安装版本请以 GitHub Releases 或 npm 为准。
|
|
607
609
|
|
|
608
610
|
<p align="center">
|
|
609
611
|
<sub>生态收录:</sub>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# v3.1.1 — maintenance patch / 维护修正版
|
|
2
|
+
|
|
3
|
+
These are candidate release notes. Availability is established only after the protected release workflow publishes an immutable GitHub Release and verified npm package.
|
|
4
|
+
|
|
5
|
+
本文是候选版更新说明。只有受保护发布流程完成,并核对不可变 GitHub Release、npm 包及来源证明后,才算正式发布。
|
|
6
|
+
|
|
7
|
+
## Session tool visibility and isolation / 会话工具可见性与隔离
|
|
8
|
+
|
|
9
|
+
- **#761:** After successful HMR/recomposition, retained Agents immediately regain their previous Session Vision-OFF tool mask; Vision-ON Agents stay ON. Execution-time policy remains fail-closed. / HMR 或重组后立即恢复旧 Agent 的识图关闭遮罩,不影响开启状态,不放宽执行期权限。
|
|
10
|
+
- **#762:** Resolve same-name tools using the actual Agent scope instead of an implicit global lookup, preserving other plugins' Agent-local tool shadows. / 按实际 Agent 作用域查询同名工具,避免误删其他插件在该 Agent 中的工具。
|
|
11
|
+
- **#763 and #764:** Add pinned DSH RC3 Agent-scoped visibility regressions and clarify the composer Vision switch's authority. When progressiveTools is false, vision_activate is intentionally absent. / 补充 RC3 真实工具作用域回归测试,明确会话识图开关权限;非渐进模式不注册 vision_activate。
|
|
12
|
+
|
|
13
|
+
## Image rejection recovery / 上游拒图回退
|
|
14
|
+
|
|
15
|
+
- **#769 (fixes #768):** Recognize a gateway's explicit `The request model is not multimodal` rejection and retry once through the existing canonical image-to-text bridge before output. The fix does not swallow generic HTTP 400, unsupported format/size, cancellation or Session restriction. / 识别网关明确提示模型非多模态时的拒图,输出前经原有文本桥重试一次;不误判通用 HTTP 400、图片大小或格式限制,也不绕过取消与会话权限。
|
|
16
|
+
- **Validation boundary:** This source fix is not a credentialed end-to-end test of the original Windows Desktop + dsh-codearts account. The dated upstream model's actual image capability still depends on the gateway. / 验收边界:尚未使用报告用户的 Windows CodeArts 账号完成真实网关端到端复测,不能保证上游模型本身支持图片。
|
|
17
|
+
|
|
18
|
+
## Cross-version source builds and DSH RC5 / 跨版本编译与 DSH RC5
|
|
19
|
+
|
|
20
|
+
- **#772 (fixes #771):** Type-only compatibility for separate Host Zod 4.4.3 and DVR Zod 4.6.x copies at the Storage Domain schema boundary, without changing runtime parser, record format or persistence. **#773** adds the pinned RC3 cross-copy compiler guard. / 修复两个 Zod 副本的静态类型不兼容,保持运行时解析与持久化语义不变;新增固定 RC3 混合 Zod 编译回归。
|
|
21
|
+
- **#770:** Qualify DSH 0.2.1-rc.5 exact source at b830ec950faba0a46dda564be3e2d854afed94f1, with Windows Node 22/24 Desktop, macOS/Linux, real Host + Chromium and reasoning Body Slot display behavior. / 验证 RC5 精确源码、三端真实 Host、Windows Node 22/24、浏览器以及推理内容显示逻辑。
|
|
22
|
+
- **#767, #765, #766:** Improve alpha Host executor acceptance and update pinned CI security actions. / 修正 Alpha Host 执行器验收并更新固定版本的 CI 安全 Action。
|
|
23
|
+
|
|
24
|
+
## Compatibility and limits / 兼容与限制
|
|
25
|
+
|
|
26
|
+
- Supported Node remains ^22.19.0 or >=24.0.0. DSH remains >=0.1.5-rc.1 <0.2.0-0 or >=0.2.0-rc.2 <0.3.0-0. No new Host privileges, Settings migration, Session format change or breaking public API. / 保持既有 Node、DSH 支持窗口,不新增 Host 权限、配置迁移、Session 格式变化或破坏性公开 API。
|
|
27
|
+
- **#759** was closed as not-planned due to missing distinguishing evidence from the reported Windows 34-bundle environment; this release does not claim it was fixed. Reopen if a Vision-ON Agent demonstrably cannot see its authorized tool. / #759 因原始 Windows 34-bundle 故障缺少关键判别证据而归档,不代表修复;如可确认 Vision 开启的 Agent 仍无法调用授权工具,应重新开启。
|
|
28
|
+
|
|
29
|
+
## Release verification / 发布验收
|
|
30
|
+
|
|
31
|
+
- The upstream source baseline main@de9b0eda passed 33/33 current-head checks as verified on 2026-10-31, including the exact RC5 Host lane. Candidate-head normal CI, artifact reproducibility, npm packed API, immutable tag and trusted publishing provenance must pass separately. / 源码基线 main@de9b0eda 通过了当次 33/33 检查,包含 RC5 真实 Host;仍须单独通过候选分支 CI、包体可复现性、公共 API、不可变标签和可信发布来源证明。
|
|
@@ -444,6 +444,9 @@ function applyMatureCoreBridge(host, owners, routing, execution, core, runtime)
|
|
|
444
444
|
const installPostCoreRuntime = () => {
|
|
445
445
|
installVisionMaintenanceRoutes(coreRequestAuthorityCtx, { logger: logging.logger })
|
|
446
446
|
finishSchemaBootstrapOnce()
|
|
447
|
+
// Core has now registered its tools. Restore masks for existing Agents
|
|
448
|
+
// before any new presentation can observe this HMR generation.
|
|
449
|
+
sessionVisionModeCompat.reconcileExistingAgents()
|
|
447
450
|
installWrapperDirectoryAlias(attachmentCompatCtx, runtimeConfig, logging.logger)
|
|
448
451
|
}
|
|
449
452
|
const failCoreApply = (error) => {
|
|
@@ -85,7 +85,7 @@ function restrictableOwnedVisionToolNames(tools, owned) {
|
|
|
85
85
|
return active
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function assemblyOwnedVisionToolNames(registryTools, scopedTools, owned) {
|
|
88
|
+
function assemblyOwnedVisionToolNames(registryTools, scopedTools, owned, agent) {
|
|
89
89
|
const active = restrictableOwnedVisionToolNames(registryTools, owned)
|
|
90
90
|
const scopedGet = scopedTools?.get
|
|
91
91
|
if (typeof scopedGet !== 'function') return new Set(active)
|
|
@@ -93,7 +93,10 @@ function assemblyOwnedVisionToolNames(registryTools, scopedTools, owned) {
|
|
|
93
93
|
const projected = new Set()
|
|
94
94
|
for (const name of active) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
// DSH RC3 get(name, scope) defaults to the *global* view, even when
|
|
97
|
+
// accessed through agent.ctx.tools. Supply the actual Agent to preserve
|
|
98
|
+
// foreign Agent-scoped shadows of DVR global tool names.
|
|
99
|
+
const visible = scopedGet.call(scopedTools, name, agent)
|
|
97
100
|
// A foreign Agent-scoped definition is allowed to shadow DVR's global
|
|
98
101
|
// name. DSH restrictions deliberately leave scoped registrations visible,
|
|
99
102
|
// so the final assembly projection must preserve the same boundary.
|
|
@@ -439,7 +442,7 @@ export function installSessionVisionModeBoundary(ctx, config = {}, runtime = {})
|
|
|
439
442
|
const transformed = typeof next === 'function' ? await next() : assembly
|
|
440
443
|
const projectedOwned =
|
|
441
444
|
ctx?.tools
|
|
442
|
-
? assemblyOwnedVisionToolNames(ctx.tools, agent?.ctx?.tools, ownedVisionTools)
|
|
445
|
+
? assemblyOwnedVisionToolNames(ctx.tools, agent?.ctx?.tools, ownedVisionTools, agent)
|
|
443
446
|
: ownedVisionTools
|
|
444
447
|
return projectAssemblyTools(
|
|
445
448
|
transformed,
|
|
@@ -559,5 +562,28 @@ export function installSessionVisionModeBoundary(ctx, config = {}, runtime = {})
|
|
|
559
562
|
},
|
|
560
563
|
})
|
|
561
564
|
|
|
562
|
-
|
|
565
|
+
// After HMR the old plugin generation releases its Agent-scoped masks.
|
|
566
|
+
// Reconcile agents that were already alive before this generation mounted:
|
|
567
|
+
// otherwise their OFF scopes see newly registered global DVR schemas until
|
|
568
|
+
// the next agent/status or prompt-assembly event.
|
|
569
|
+
const reconcileExistingAgents = () => {
|
|
570
|
+
let agents
|
|
571
|
+
try {
|
|
572
|
+
const registry = ctx.get?.('agents')
|
|
573
|
+
agents = typeof registry?.list === 'function' ? registry.list() : undefined
|
|
574
|
+
} catch {
|
|
575
|
+
return
|
|
576
|
+
}
|
|
577
|
+
if (!Array.isArray(agents)) return
|
|
578
|
+
for (const agent of agents) {
|
|
579
|
+
try {
|
|
580
|
+
syncForAgent(agent)
|
|
581
|
+
} catch {
|
|
582
|
+
// Older Hosts may not expose the same Agent registry seams. Keep the
|
|
583
|
+
// execution guard and ordinary per-step synchronization authoritative.
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
return { ctx: wrapped, config, reconcileExistingAgents }
|
|
563
589
|
}
|
|
@@ -77,6 +77,10 @@ export function isImageInputUnsupportedFailure(failure) {
|
|
|
77
77
|
'i',
|
|
78
78
|
),
|
|
79
79
|
new RegExp(`cannot (?:accept|process|handle) (?:images?|image inputs?)${terminal}`, 'i'),
|
|
80
|
+
// Explicit text-only model/endpoint rejections can omit the word "image".
|
|
81
|
+
// Keep these end-bounded so unrelated modality or size errors do not retry.
|
|
82
|
+
new RegExp(`(?:model|endpoint)\\s+is\\s+not\\s+(?:a\\s+)?multimodal(?:\\s+model)?${terminal}`, 'i'),
|
|
83
|
+
new RegExp(`not\\s+(?:a\\s+)?multimodal\\s+(?:model|endpoint)${terminal}`, 'i'),
|
|
80
84
|
new RegExp(`(?:model|adapter).*text[- ]only.*(?:images?|image inputs?)${terminal}`, 'i'),
|
|
81
85
|
new RegExp(`(?:模型|适配器).*不支持(?:图片|图像)(?:输入)?${terminal}`),
|
|
82
86
|
new RegExp(`(?:图片|图像)输入(?:不被支持|暂不支持|不支持)${terminal}`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vision-router",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Eyes for text-only DeepSeek Harness agents: built-in free vision chain + pixel-level tools. Remote vision providers, including the default free fallback, receive image content unless strict local-only use is configured.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|