dsh-vision-router 3.1.1 → 3.1.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.md +2 -2
- package/README.zh.md +2 -2
- package/assets/icon.svg +1 -0
- package/docs/architecture/ci-risk-posture.md +21 -0
- package/docs/architecture/client-ui-lifecycle-notes.md +61 -0
- package/docs/compatibility/dsh-0.2.2-rc1-audit.md +110 -0
- package/docs/releases/v3.1.2.md +25 -0
- package/docs/releases/v3.1.3.md +24 -0
- package/index.js +24 -0
- package/lib/agent-prestep-model-routing.js +273 -0
- package/lib/client.js +32 -40
- package/lib/dsh-contract-compat.js +14 -5
- package/lib/tesseract-exec-compat.js +26 -15
- package/package.json +5 -3
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.3 release candidate:** Fix optional dynamic image→text model routing on DSH 0.2.2-rc.1 by selecting models before Agent pre-step; preserve the default tool-only mode and legacy Host behavior. RC1 requires Node >=24.9; small-context models may need Host compaction headroom configuration for model switching. Update the CI-only HOL scanner pin without changing security thresholds. See [v3.1.3 notes](docs/releases/v3.1.3.md). Verify publication through [GitHub Releases](https://github.com/ysr666/dsh-vision-router/releases/latest) or npm.
|
|
26
26
|
|
|
27
27
|
## Start here
|
|
28
28
|
|
|
@@ -611,7 +611,7 @@ exploration (LLM7.io and OVHcloud anonymous tiers) by
|
|
|
611
611
|
|
|
612
612
|
## Release notes and community
|
|
613
613
|
|
|
614
|
-
Release details: [v3.1.
|
|
614
|
+
Release details: [v3.1.3 release candidate notes](docs/releases/v3.1.3.md). Check GitHub Releases or npm for the published version.
|
|
615
615
|
|
|
616
616
|
<p align="center">
|
|
617
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.3 候选版更新说明:** 修复 DSH 0.2.2-rc.1 下可选的图片轮次动态模型切换与后续纯文本回切问题,模型选择提前到 Agent pre-step 之前;默认工具识图模式及旧版 Host 兼容行为不变。RC1 本身要求 Node ≥24.9;上下文窗口较小的模型在跨模型切换时可能需要调整 Host 压缩预留量。同步更新 CI 专用安全扫描器,不降低安全门槛。详见[v3.1.3 更新说明](docs/releases/v3.1.3.md)。正式可安装版本以 [GitHub Releases](https://github.com/ysr666/dsh-vision-router/releases/latest) 或 npm 为准。
|
|
26
26
|
|
|
27
27
|
## 先用起来
|
|
28
28
|
|
|
@@ -605,7 +605,7 @@ npx dsh-vision-router doctor --profile web
|
|
|
605
605
|
|
|
606
606
|
## 版本公告与社区链接
|
|
607
607
|
|
|
608
|
-
版本更新详情:[v3.1.
|
|
608
|
+
版本更新详情:[v3.1.3 候选版更新说明](docs/releases/v3.1.3.md)。正式可安装版本请以 GitHub Releases 或 npm 为准。
|
|
609
609
|
|
|
610
610
|
<p align="center">
|
|
611
611
|
<sub>生态收录:</sub>
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="vr-brand" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#6E58F7"/><stop offset="1" stop-color="#179ED6"/></linearGradient></defs><rect width="64" height="64" rx="15" fill="url(#vr-brand)"/><path d="M10 32C17 22 24 17 32 17S47 22 54 32C47 42 40 47 32 47S17 42 10 32Z" fill="none" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><circle cx="32" cy="32" r="10" fill="#FFFFFF"/><circle cx="32" cy="32" r="5.5" fill="#283C89"/><circle cx="35" cy="29" r="2.2" fill="#A8F2FF"/></svg>
|
|
@@ -43,3 +43,24 @@ If the write tokens ever need to shrink, the order is: attach the publishing job
|
|
|
43
43
|
environment, then drop `pull-requests: write` from the pin refresh by opening the bump as an
|
|
44
44
|
issue instead of a pull request. Both trade automation for score, which is why they are not the
|
|
45
45
|
default.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Reviewed Alpha Settings pin: least-privilege update lane
|
|
49
|
+
|
|
50
|
+
The Alpha Settings Host Gate uses a reviewed version / immutable SHA pair
|
|
51
|
+
from config/dsh-alpha-settings-pin.json. Its three job families load that pair
|
|
52
|
+
and reject an invalid or incomplete pin. The gate runs on pull requests that
|
|
53
|
+
touch the config or loader and on the merge to main. The updater stages only
|
|
54
|
+
the JSON config, never workflow YAML; do not grant the bot workflow-edit
|
|
55
|
+
permission. Merging a pin PR is the upstream execution review boundary.
|
|
56
|
+
|
|
57
|
+
The pin step writes both current and changed through GITHUB_OUTPUT. The bot
|
|
58
|
+
updates its dedicated branch using an explicit lease against the remote SHA,
|
|
59
|
+
not an unsafe force push.
|
|
60
|
+
|
|
61
|
+
Repository settings may separately prohibit GitHub Actions from creating PRs,
|
|
62
|
+
even with pull-requests: write. Under that policy the refresh action pushes
|
|
63
|
+
the config-only branch but fails with an actionable compare/PR URL, not a
|
|
64
|
+
misleading success. Opening the PR requires an authorized person or a
|
|
65
|
+
separately scoped PR-writing app token. Changing that security setting is
|
|
66
|
+
outside this code fix.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Client UI lifecycle and onboarding notes
|
|
2
|
+
|
|
3
|
+
These implementation notes are kept outside the self-contained browser module to preserve the project's 256 KiB review limit. The source comments still point to each section. No runtime behavior was extracted or changed.
|
|
4
|
+
|
|
5
|
+
## Walkthrough spotlight geometry
|
|
6
|
+
|
|
7
|
+
// ── walkthrough spotlight: highlight the real UI targets ────────────────
|
|
8
|
+
// The walkthrough overlays are plain DOM: a dimmed backdrop with a "hole"
|
|
9
|
+
// over the current target (classic box-shadow spotlight), a pulsing ring
|
|
10
|
+
// around it, and the prompt card anchored beside the target with an arrow
|
|
11
|
+
// pointing at it. Everything is pointer-events:none except the prompt, so
|
|
12
|
+
// the real controls stay clickable the whole time.
|
|
13
|
+
//
|
|
14
|
+
// DSH web hashes its CSS-module class names (unstable across builds), so
|
|
15
|
+
// the targets are addressed through the stable surface instead: slot
|
|
16
|
+
// wrappers (data-slot), data-composer-card and aria-haspopup/aria-label
|
|
17
|
+
// attributes. Each step keeps a fallback chain, and when nothing matches
|
|
18
|
+
// the prompt degrades to a corner card with a directional arrow.
|
|
19
|
+
|
|
20
|
+
## Onboarding step controls
|
|
21
|
+
|
|
22
|
+
// Every step that is not the last one gets a Next button, so the two
|
|
23
|
+
// floating prompts stay symmetric. Step 1's Next advances the stored
|
|
24
|
+
// step; step 2's Next performs the current phase's action for the
|
|
25
|
+
// user — opening the settings panel, then entering the Vision Router
|
|
26
|
+
// section — so the walkthrough can be driven entirely from the prompt
|
|
27
|
+
// without touching the real controls.
|
|
28
|
+
|
|
29
|
+
## Provider-model draft rows
|
|
30
|
+
|
|
31
|
+
// Rows persist as { provider, model } objects while editing — an
|
|
32
|
+
// incomplete row (provider picked, model pending) stays visible
|
|
33
|
+
// instead of collapsing, which is what made the provider dropdown
|
|
34
|
+
// feel unselectable before. Like the vision backend chain above, an
|
|
35
|
+
// empty configuration still renders one blank row ready to fill.
|
|
36
|
+
|
|
37
|
+
## Two-select routing row
|
|
38
|
+
|
|
39
|
+
// Same two-select row shape as the vision backend chain above: a
|
|
40
|
+
// provider dropdown (providers that have excluded models) and a model
|
|
41
|
+
// dropdown (that provider's excluded models). A row the user already
|
|
42
|
+
// selected elsewhere stays disabled in the other rows. Option sets
|
|
43
|
+
// come from the memoized top-level hooks (this function is plain
|
|
44
|
+
// render code and must stay hook-free).
|
|
45
|
+
|
|
46
|
+
## Catalog render-phase bootstrap
|
|
47
|
+
|
|
48
|
+
// Render-phase kick: whenever the body is open and the catalog was never
|
|
49
|
+
// fetched (including after a remount that reset the state), start the
|
|
50
|
+
// fetch. React supports setState during render for the same component,
|
|
51
|
+
// and the status flips to 'loading' so this cannot loop. The same kick
|
|
52
|
+
// runs the cheap test-connection probe once so the Host-owned official
|
|
53
|
+
// provider availability notice can render without a button click.
|
|
54
|
+
|
|
55
|
+
## Onboarding replay
|
|
56
|
+
|
|
57
|
+
// Re-viewing the guide replays it from the beginning:
|
|
58
|
+
// leave the settings modal first (its panel closes on
|
|
59
|
+
// Escape), show the overview (steps 1-3), and then walk
|
|
60
|
+
// through step 1 on the chat page — starting in place
|
|
61
|
+
// would skip the session/text-model step entirely.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# DSH 0.2.2-rc.1 exact-source adaptation review
|
|
2
|
+
|
|
3
|
+
Status: RC1 source audit and evidence checklist. The authoritative acceptance
|
|
4
|
+
status is the latest commit's Host jobs at
|
|
5
|
+
https://github.com/ysr666/dsh-vision-router/pull/786; this document alone
|
|
6
|
+
does not establish production compatibility.
|
|
7
|
+
|
|
8
|
+
## Provenance and source delta
|
|
9
|
+
|
|
10
|
+
- Release tag: dsh-v0.2.2-rc.1; published 2026-11-04T13:07:14Z.
|
|
11
|
+
- Immutable RC1 commit: 66491b05e3f05ad35bcdd4f6cd7ed26041d9e3db.
|
|
12
|
+
- Prior Alpha.3 exact source: 05b1cae8db6e674c5685101494d4eec24652424a.
|
|
13
|
+
- Git diff from Alpha.3 to RC1 changes 387 package.json versions only; no ordinary source file changed. This is a source-content comparison, not a passing runtime test.
|
|
14
|
+
- Cordis Core 4.1.0, Loader 1.1.0, Include 1.1.0 and Node >=24.9 are declared on RC1. Older DVR Node22 host support is preserved.
|
|
15
|
+
|
|
16
|
+
## Validation plan
|
|
17
|
+
|
|
18
|
+
The fixed RC1 gate validates exact checkout SHA and package identity, cross-platform source/Sharp and peer/security contracts, real Host with Chromium Settings save/reload/readback, cold Vision toggle, mixed attachment and bundle recompose, macOS Desktop renderer, Windows Node24.9/24.21 Desktop, and multi-plugin ordering. Alpha surveillance and earlier Host/Node22 lanes stay separate.
|
|
19
|
+
|
|
20
|
+
## Confirmed source incompatibility: late dynamic model routing
|
|
21
|
+
|
|
22
|
+
The RC1 Agent Loop reads the selected model *before* prompt/tool assembly and pre-step. At request preparation, RC1 packages/core/agent-loop/src/agent.ts rejects provider/model/effort modifications returned by agent/request (lines 630-639). DVR previously changed provider/model at agent/request when optional dynamic routing was enabled; the RC1 code now uses the earlier Agent model-selection boundary. The same upstream source existed at Alpha.3, meaning the earlier browser gate did not prove this active routing flow. A real Host regression must demonstrate a routed image turn, a following text-only turn, actual selected adapter, and no model-selection or permission drift. The documented modern mechanism, agent.model.select(), must be invoked before step preparation, not merely during agent/pre-step after selection was fixed.
|
|
23
|
+
|
|
24
|
+
Additional runtime scrutiny covers tools.resolve/executable, session-projection async registration, settings persistence, plugin disposal, source authentication and model/attachment decisions. A green generic Settings smoke alone does not close these risks.
|
|
25
|
+
|
|
26
|
+
## Implementation and required acceptance
|
|
27
|
+
|
|
28
|
+
DVR now uses post-append, pre-preStep Agent inbox notifications and
|
|
29
|
+
running/turn-stopping boundaries to call the official Agent.model.select()
|
|
30
|
+
synchronously before tools.resolve fixes the step model and permissions.
|
|
31
|
+
It reads the true Session inbox projection rather than guessing from the
|
|
32
|
+
newest message. Modern agent/request handlers never mutate provider/model.
|
|
33
|
+
Legacy Hosts without Agent.model.select keep the previous routing path.
|
|
34
|
+
|
|
35
|
+
A text followup restores the user-selected base model only if the current
|
|
36
|
+
selection still matches DVR-owned image routing. Explicit manual changes
|
|
37
|
+
take priority. Absent projection and adapters fail closed. Tool-only mode
|
|
38
|
+
mounts progressive image tools before the tool-admission snapshot.
|
|
39
|
+
Session event is intentionally NOT used for selecting a model: Session.append
|
|
40
|
+
prohibits synchronous reentrant model/selection appends.
|
|
41
|
+
|
|
42
|
+
CI now verifies pinned source event ordering and runs real Desktop requests:
|
|
43
|
+
image to vision-chain, text followup to original provider, visible answers,
|
|
44
|
+
actual network requests and durable model-selection projection. Synthetic
|
|
45
|
+
adversarial tests cover queue, steer, offload, disable, missing adapter,
|
|
46
|
+
unload, and legacy nonintervention.
|
|
47
|
+
|
|
48
|
+
A published compatibility claim requires current-head real Host CI and
|
|
49
|
+
adversarial review, not just these unit-level assertions.
|
|
50
|
+
|
|
51
|
+
## Real RC1 Desktop evidence from first audit run
|
|
52
|
+
|
|
53
|
+
On Windows Node24.21 with RC1 exact Host, the real Desktop completed the
|
|
54
|
+
image turn with its visible answer (DESKTOP_DYNAMIC_IMAGE_E2E_OK) and the
|
|
55
|
+
model picker showed vision-http/desktop-e2e/desktop-vision. The initial
|
|
56
|
+
Playwright selector then failed because the same answer occurred in three
|
|
57
|
+
places (session title, breadcrumb, assistant paragraph), NOT because the
|
|
58
|
+
runtime request failed. E2E now selects the assistant paragraph and accepts
|
|
59
|
+
either verified chain or direct vision-http source route, and continues to
|
|
60
|
+
require a text followup and accepted model-selection projection evidence.
|
|
61
|
+
This first audit run was not complete E2E acceptance. Subsequent current-head
|
|
62
|
+
results must be evaluated in the linked PR.
|
|
63
|
+
|
|
64
|
+
## RC1 model-switch compaction: actual failure and scoped workaround
|
|
65
|
+
|
|
66
|
+
A real RC1 Windows Desktop image request passed, but its next text request
|
|
67
|
+
failed with MODEL_SWITCH_COMPACTION_FAILED: the synthetic adapter declared
|
|
68
|
+
contextWindow=32768 and maxTokens=2048, while upstream compaction-basic
|
|
69
|
+
defaults to headroomTokens=65536. The destination lacks a valid budget
|
|
70
|
+
even for a tiny history. This is an upstream documented restriction.
|
|
71
|
+
|
|
72
|
+
For the normal return-to-text E2E use a synthetic adapter whose capacity
|
|
73
|
+
is 131072. This changes no actual user models. Real small-window models
|
|
74
|
+
must configure DSH compaction-basic.modelPolicies, e.g. headroomTokens=4096
|
|
75
|
+
and maxTokens=4096 for a 32768 window, or retain DVR's default tool-only
|
|
76
|
+
routing. Never silently inflate actual model metadata, mutate global Host
|
|
77
|
+
compaction settings or swallow a Host model-switch error.
|
|
78
|
+
|
|
79
|
+
## Two independent live Desktop routes
|
|
80
|
+
|
|
81
|
+
The Windows Node24.21 and macOS Desktop E2E lanes exercise optional
|
|
82
|
+
whole-turn image routing, visual backend HTTP and next-text restoration.
|
|
83
|
+
Windows Node24.9 additionally runs the default tool-only image flow:
|
|
84
|
+
text Agent must discover and call the vision_describe tool on the very
|
|
85
|
+
first image step, consume a real mock vision response, and render a
|
|
86
|
+
correct answer without changing the session's text model. The two
|
|
87
|
+
modes must not be treated as interchangeable verification.
|
|
88
|
+
|
|
89
|
+
## Workflow trust and cache policy
|
|
90
|
+
|
|
91
|
+
Static SHA checkout is deliberately duplicated in the fixed RC1 workflow
|
|
92
|
+
and checked against the reviewed JSON pin. All checkouts use
|
|
93
|
+
persist-credentials=false; GitHub job permissions remain contents:read.
|
|
94
|
+
Because CI executes upstream dependencies, the RC1 lane does not restore or
|
|
95
|
+
save any shared Actions build cache, even on main. This removes the only
|
|
96
|
+
potential persistent cache-poisoning path rather than relying on a dynamic
|
|
97
|
+
cache key and workflow_dispatch branch heuristics. Ordinary untrusted PR
|
|
98
|
+
checkout is only executed in the same non-privileged test jobs.
|
|
99
|
+
|
|
100
|
+
## Durable message attribution during both image execution modes
|
|
101
|
+
|
|
102
|
+
Real RC1 Windows Node24.21 image→text E2E completed both turns but the
|
|
103
|
+
shared harness then incorrectly required a DVR-authored durable message.
|
|
104
|
+
Whole-turn mode routes images directly to the vision adapter and may emit
|
|
105
|
+
zero DVR-authored synthetic messages. The E2E now checks producer-owned V4
|
|
106
|
+
source integrity for any such messages, while retaining the strict
|
|
107
|
+
*nonempty* DVR-source and DVR-message check for default tool-only mode.
|
|
108
|
+
Actual backend calls, rendered answers and accepted model-selection
|
|
109
|
+
projections are mandatory in both modes. No synthetic message is created
|
|
110
|
+
solely to satisfy test attribution.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# v3.1.2 — Plugin identity and DSH compatibility / 插件图标与 DSH 兼容修正版
|
|
2
|
+
|
|
3
|
+
**Candidate release notes.** Publication is complete only after the protected release workflow verifies the exact main commit, immutable tag, npm provenance and GitHub Release artifacts. / **候选版说明:** 只有受保护发布工作流完成精确 main 提交、不可变标签、npm 来源证明与 GitHub Release 附件验收后,才算正式发布。
|
|
4
|
+
|
|
5
|
+
## Native Vision Router icons / 原生插件图标
|
|
6
|
+
|
|
7
|
+
- **#783:** Ship a compact eye icon in the npm package for DSH Desktop Plugin Manager. Register the same artwork on the Vision Router Settings navigation through the lifecycle-owned native icon slot. The real DSH 0.2.2-alpha.3 Chromium Settings test verified visible, decoded artwork. / 随 npm 包发布眼睛图标,供 DSH Desktop 插件管理页使用;在支持原生设置图标插槽的 Host 中显示相同图标。Alpha.3 真实 Chromium 验证图标可见且成功解码。
|
|
8
|
+
- **Host distinction:** DSH 0.2.1-rc.5 supports the package Plugin Manager artwork, but has no Settings navigation icon slot; it correctly keeps the default Settings glyph. The Settings icon slot is verified on DSH 0.2.2-alpha.3. This release does not patch unsupported Host internals. / **上游边界:** RC.5 支持插件管理页图标,但没有设置导航图标插槽,因此设置导航仍使用默认图标。新插槽已在 Alpha.3 验证,不通过修改上游内部实现来绕过限制。
|
|
9
|
+
|
|
10
|
+
## Upstream Alpha compatibility / 上游 Alpha 适配
|
|
11
|
+
|
|
12
|
+
- **#780:** Align inherited image-dimension normalization with Alpha.2's 8192-to-65535 default while retaining user-customized limits. / 适配 Alpha.2 的默认图片尺寸变化,保留自定义限制。
|
|
13
|
+
- **#781:** Accept the WebServer additive resource-route union in exact-source assertions while retaining route ownership and disposal guarantees. / 接受 WebServer 新增资源路由联合类型,保持原有注册、释放契约。
|
|
14
|
+
- **#779, #782:** Pin reviewed Alpha.2, then Alpha.3 immutable source for the real Host CI; Alpha.3 passed six Host jobs spanning Windows/macOS/Linux exact-source, Windows Node 22/24 Desktop and real Chromium Settings lifecycle. No additional Cordis runtime shim was established as necessary by the tested paths. / 分阶段固定 Alpha.2、Alpha.3 精确源码;Alpha.3 的三端、Node22/24 Desktop 和真实浏览器六项验证通过。在已测试调用路径内未发现需新增 Cordis 运行时补丁的确定证据。
|
|
15
|
+
|
|
16
|
+
## Security and other Host plugins / 安全及其他 Host 插件兼容
|
|
17
|
+
|
|
18
|
+
- **#775:** Resolve the follow-redirects credential redirect advisory. / 修复 follow-redirects 凭据重定向安全告警。
|
|
19
|
+
- **#777:** Preserve the child handle of promisified execFile for non-OCR Host plugins. / 保留非 OCR Host 插件的 promisified execFile.child 句柄语义。
|
|
20
|
+
- **#778:** Move the Alpha pin out of workflow source into ordinary config JSON and correct workflow output propagation, without expanding Bot permissions. Automatic PR creation still awaits a real future update exercise. / 将 Alpha Pin 移至普通 JSON 配置文件,修复输出传值,不扩大 Bot 权限;自动创建 PR 仍待未来真实更新触发验证。
|
|
21
|
+
|
|
22
|
+
## Support and release checks / 支持边界与发布验收
|
|
23
|
+
|
|
24
|
+
- Public Node range 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 Session migration, broad remote authority change, or breaking API change. / Node 和 DSH 最低支持版本、Session、远程权限及公共 API 边界不变。
|
|
25
|
+
- **#783** passed 26/26 current-head PR workflows, including the 6/6 Alpha.3 Host jobs, 3 mandatory checks, and older Host/RC regressions. The **v3.1.2 candidate** must separately pass release-commit CI, deterministic pack, registry uniqueness and protected npm/GitHub publication checks. / #783 的 26 项 PR 工作流、6 项 Alpha.3 真实 Host 及旧版兼容检查全绿;v3.1.2 候选提交仍须单独验收正式 CI、可复现包体、npm 唯一版本与受保护发布流程。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# v3.1.3 — DSH RC1 dynamic visual routing compatibility / DSH RC1 动态视觉路由兼容修复
|
|
2
|
+
|
|
3
|
+
**Candidate release notes.** This document describes source changes proposed for release; publication is complete only after the protected workflow verifies the exact main commit, immutable tag, npm package identity, provenance and GitHub Release artifacts. / **候选版说明:** 本文描述待发布的源码变更;须经受保护工作流核验精确 main 提交、不可变标签、npm 包体一致性、来源证明和 GitHub Release 附件后,才能认定正式发版。
|
|
4
|
+
|
|
5
|
+
## DSH 0.2.2-rc.1 dynamic routing fix / RC1 动态路由修复
|
|
6
|
+
|
|
7
|
+
- **#786 (fixes #787):** Adapt optional whole-turn image routing to the RC1 Agent model-selection contract. DVR selects a model via the supported `agent.model.select()` before Agent pre-step freezes provider/model, tool admission and prompt assembly; the modern `agent/request` hook no longer rewrites the chosen model. Legacy Hosts without the native selector retain their previous route path. / **#786(修复 #787):** 适配 RC1 的 Agent 预步骤模型选择契约,使用官方 `agent.model.select()` 在模型、工具和提示词固定前选择图片模型;新版 Host 不再在 `agent/request` 阶段强改模型。旧版 Host 保留原有分流路径。
|
|
8
|
+
- A subsequent text-only turn can restore the original text model when reverse routing is enabled, without overriding a different model manually selected by the user. Queue/steer, turn-stopping timing, missing adapters/projections, unloaded Agent state, offloaded images and failure handling have regression coverage. / 开启反向路由时,后续纯文本轮次可恢复用户原先的文字模型,且不覆盖用户手动改选的其他模型;排队、插话、轮次结束竞态、缺失适配器或投影、Agent 卸载及异常路径均有回归测试。
|
|
9
|
+
- The **default tool-only vision path remains the default** and gets its progressive vision tools mounted before the RC1 tool-admission snapshot; this release does not silently turn on whole-turn model switching. / **默认仍为工具识图模式**;渐进式识图工具会在 RC1 工具许可快照前注册,不会擅自开启整轮模型切换。
|
|
10
|
+
|
|
11
|
+
## Exact-source and real Host acceptance / 精确源码及真实 Host 验收
|
|
12
|
+
|
|
13
|
+
- The DSH 0.2.2-rc.1 release is pinned to immutable source commit `66491b05e3f05ad35bcdd4f6cd7ed26041d9e3db`. Exact-source / Host Gate passed **6/6** on Linux, macOS and Windows, including real Chromium lifecycle, macOS Desktop, Windows Desktop Node 24.9 and 24.21. / DSH RC1 固定到上述不可变源码;六项门禁全部通过,涵盖三端、真实 Chromium、macOS Desktop、Windows Node 24.9/24.21 Desktop。
|
|
14
|
+
- The whole-turn Desktop E2E verified real HTTP delivery of an image to a distinct visual adapter, a subsequent text request to the original adapter, rendered answers, and accepted Session model-selection projection. Windows Node 24.9 independently validated the default tool-only image path. / 整轮分流 E2E 真实验证了视觉适配器收到图片、纯文本回合返回原文字适配器、界面可见回复和 Session 模型选择投影;Windows Node 24.9 另行验证默认工具识图流程。
|
|
15
|
+
- **Scope limits:** RC1 itself requires **Node >=24.9**; this does not raise DVR's declared Node support range on older Hosts. RC1's default model-switch compaction reserves 65,536 tokens, which cannot fit a 32K context-window destination. Such models may need explicit Host `compaction-basic.modelPolicies` headroom configuration, or can stay on the default tool-only mode. This exact RC1 validation does not promise blanket compatibility with future 0.2.x previews. / **范围限制:** RC1 自身要求 Node ≥24.9,但插件对旧 Host 的 Node 支持声明不变。RC1 的默认模型切换压缩预留 65,536 token,无法适配 32K 上下文目标;此类模型可能需要按模型设置 Host 的 `compaction-basic.modelPolicies`,或继续使用默认工具识图。当前验收仅针对固定 RC1,不代表未来 0.2.x 全部版本均已验证。
|
|
16
|
+
|
|
17
|
+
## CI supply-chain maintenance / CI 供应链维护
|
|
18
|
+
|
|
19
|
+
- **#788 (supersedes #785):** Pin HOL AI Plugin Scanner Action to upstream **v1.2.816 / plugin-scanner 3.59.0** at immutable commit `9b169fc65d09b24726b66d70b3563ab563158b58`, fixing the stale version comment. The scanner returned **92/100**, with **0 critical, 0 high and 1 medium** finding. Existing `min_score: 90` and `fail_on_severity: high` gates remain unchanged. This changes CI only, not the plugin runtime. / **#788(替代 #785):** 将 HOL Action 固定至 3.59.0 对应的不可变上游提交并修正版本注释;扫描得分 92/100,0 严重、0 高危、1 中危;90 分门槛和 High 失败策略均不变。只改 CI,不改插件运行时。
|
|
20
|
+
|
|
21
|
+
## Release boundaries / 发布边界
|
|
22
|
+
|
|
23
|
+
- No Settings migration, public API break, widened remote permissions, Node support-floor increase or runtime provider-secret logging. / 不新增设置迁移、不破坏公共 API、不扩大远程权限、不抬高插件最低 Node 支持要求,也不引入凭据日志。
|
|
24
|
+
- Release-commit CI, reproducible package build, immutable npm version, OIDC provenance, artifact digests and GitHub Release assets must still pass the protected release workflow. Source PR checks alone are not publication. / 正式发版提交仍须完成 CI、可复现构建、npm 版本唯一性、OIDC 来源证明、包体摘要与 GitHub Release 附件验收;PR 测试通过不等于已正式发布。
|
package/index.js
CHANGED
|
@@ -115,6 +115,7 @@ import { createCoalescingRunner } from './lib/adapter-update-coalescer.js'
|
|
|
115
115
|
import { createDesktopScreenshotTool } from './lib/desktop-screenshot-tool.js'
|
|
116
116
|
import { installVisionDiagnosticsRoutes } from './lib/vision-diagnostics-routes.js'
|
|
117
117
|
import { blocksHaveRetainedImage, isOffloadedImageBlock, offloadedImagePlaceholder } from './lib/image-offload-compat.js'
|
|
118
|
+
import { installPreStepModelRouting } from './lib/agent-prestep-model-routing.js'
|
|
118
119
|
import { createSessionTurnResolver } from './lib/session-turn-resolver.js'
|
|
119
120
|
import { shouldBlockDegradedHostTool } from './lib/degraded-local-evidence.js'
|
|
120
121
|
import {
|
|
@@ -2306,6 +2307,26 @@ export function apply(ctx, config = {}, runtime = {}) {
|
|
|
2306
2307
|
}
|
|
2307
2308
|
})
|
|
2308
2309
|
|
|
2310
|
+
// DSH >= 0.2.2 fixes the step model before pre-step and tools.resolve.
|
|
2311
|
+
// The Agent inbox/status event boundary runs after Session append finishes,
|
|
2312
|
+
// while selection can still be changed for the next step without reentrancy.
|
|
2313
|
+
// Older Hosts without Agent.model continue to use the late request hook.
|
|
2314
|
+
const preStepRouting = installPreStepModelRouting(ctx, {
|
|
2315
|
+
routingEnabled,
|
|
2316
|
+
reverseRoutingEnabled,
|
|
2317
|
+
routingPairs,
|
|
2318
|
+
chainRoute,
|
|
2319
|
+
wrapperRoute,
|
|
2320
|
+
wrapperRegistered: () => wrapperRegistered,
|
|
2321
|
+
textProvider,
|
|
2322
|
+
hasAdapter: (provider) => adapterAvailable(ctx.llm, provider),
|
|
2323
|
+
hasImage: blocksHaveRetainedImage,
|
|
2324
|
+
toolEnabled,
|
|
2325
|
+
autoActivateOnImageEnabled,
|
|
2326
|
+
structuredBootstrapEnabled,
|
|
2327
|
+
activateDeepTools: () => activateDeepTools(),
|
|
2328
|
+
})
|
|
2329
|
+
|
|
2309
2330
|
ctx.on('agent/pre-step', async (payload, next) => {
|
|
2310
2331
|
let decision = await next()
|
|
2311
2332
|
if (sessionVisionRuntime?.index === undefined) {
|
|
@@ -2570,6 +2591,9 @@ export function apply(ctx, config = {}, runtime = {}) {
|
|
|
2570
2591
|
// adapters the same way).
|
|
2571
2592
|
ctx.on('agent/request', async (payload, next) => {
|
|
2572
2593
|
const config0 = await next()
|
|
2594
|
+
// The modern Host rejects any route change here. Its Agent.model already
|
|
2595
|
+
// selected the image/text route BEFORE tool and prompt admission.
|
|
2596
|
+
if (preStepRouting.nativeModel(payload.agent)) return config0
|
|
2573
2597
|
if (!routingEnabled()) return config0
|
|
2574
2598
|
const session = payload.agent && payload.agent.session
|
|
2575
2599
|
if (!session) return config0
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { reverseRouteTarget } from './core-primitives.js'
|
|
2
|
+
import { redactDiagnosticText } from './diagnostic-redaction.js'
|
|
3
|
+
|
|
4
|
+
function routeOf(value) {
|
|
5
|
+
if (!value || typeof value !== 'object') return undefined
|
|
6
|
+
if (typeof value.provider !== 'string' || !value.provider || typeof value.model !== 'string' || !value.model) return undefined
|
|
7
|
+
return { provider: value.provider, model: value.model }
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function sameRoute(a, b) {
|
|
11
|
+
return a?.provider === b?.provider && a?.model === b?.model
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function validMessages(value) {
|
|
15
|
+
return Array.isArray(value) ? value.filter((item) => item && typeof item === 'object' && item.role === 'user') : []
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Modern DSH freezes the model BEFORE agent/pre-step, while the old
|
|
20
|
+
* agent/request model switch is now forbidden. The Agent's own inbox is the
|
|
21
|
+
* last durable, synchronously observable input before that freeze.
|
|
22
|
+
*
|
|
23
|
+
* Never select during session/event: Session.append forbids reentrant appends,
|
|
24
|
+
* and agent.model.select appends a model/selection event. Inbox notifications
|
|
25
|
+
* and status events fire only AFTER the triggering append has returned.
|
|
26
|
+
*/
|
|
27
|
+
export function installPreStepModelRouting(ctx, options) {
|
|
28
|
+
const owned = new WeakMap()
|
|
29
|
+
const warning = new WeakSet()
|
|
30
|
+
const agentsBySession = new WeakMap()
|
|
31
|
+
const selecting = new WeakSet()
|
|
32
|
+
const manualOverride = new WeakSet()
|
|
33
|
+
const stopping = new WeakMap()
|
|
34
|
+
|
|
35
|
+
const warnOnce = (agent, message) => {
|
|
36
|
+
if (warning.has(agent)) return
|
|
37
|
+
warning.add(agent)
|
|
38
|
+
ctx.logger?.warn?.('vision-router: modern pre-step routing unavailable: %s', redactDiagnosticText(message, 180))
|
|
39
|
+
}
|
|
40
|
+
const nativeModel = (agent) => {
|
|
41
|
+
try {
|
|
42
|
+
const model = agent?.model
|
|
43
|
+
return model && typeof model.select === 'function' && typeof model.current === 'function'
|
|
44
|
+
? model : undefined
|
|
45
|
+
} catch {
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const currentOf = (agent) => {
|
|
50
|
+
try { return nativeModel(agent)?.current() }
|
|
51
|
+
catch (error) {
|
|
52
|
+
warnOnce(agent, String(error?.message ?? error).slice(0, 180))
|
|
53
|
+
return undefined
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const readInbox = (agent) => {
|
|
57
|
+
if (!agent?.session || typeof ctx.get !== 'function') return undefined
|
|
58
|
+
try {
|
|
59
|
+
const registry = ctx.get('sessionProjections')
|
|
60
|
+
if (typeof registry?.stateOf !== 'function') return undefined
|
|
61
|
+
const state = registry.stateOf(agent.session, 'inbox')
|
|
62
|
+
if (!state || typeof state !== 'object') return undefined
|
|
63
|
+
return {
|
|
64
|
+
nextTurn: validMessages(state['next-turn']),
|
|
65
|
+
nextStep: validMessages(state['next-step']),
|
|
66
|
+
}
|
|
67
|
+
} catch {
|
|
68
|
+
return undefined
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const available = (provider) => {
|
|
72
|
+
try { return options.hasAdapter(provider) === true } catch { return false }
|
|
73
|
+
}
|
|
74
|
+
const select = (agent, target, previous, reason) => {
|
|
75
|
+
if (!target || !available(target.provider) || sameRoute(target, previous)) return false
|
|
76
|
+
// Keep an explicit same-route effort selection; drop provider-specific effort
|
|
77
|
+
// only on a cross-route transition.
|
|
78
|
+
try {
|
|
79
|
+
selecting.add(agent.session)
|
|
80
|
+
agent.model.select(target)
|
|
81
|
+
ctx.logger?.debug?.('vision-router: pre-step model selected for %s', reason)
|
|
82
|
+
return true
|
|
83
|
+
} catch (error) {
|
|
84
|
+
warnOnce(agent, String(error?.message ?? error).slice(0, 180))
|
|
85
|
+
return false
|
|
86
|
+
} finally {
|
|
87
|
+
selecting.delete(agent.session)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const hasImage = (messages) => messages.some((message) => {
|
|
91
|
+
try { return options.hasImage(message.content) === true } catch { return false }
|
|
92
|
+
})
|
|
93
|
+
const startDeepTools = () => {
|
|
94
|
+
if (options.toolEnabled() && (options.autoActivateOnImageEnabled() || options.structuredBootstrapEnabled())) {
|
|
95
|
+
options.activateDeepTools()
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const imageTurn = (agent, messages) => {
|
|
99
|
+
const model = nativeModel(agent)
|
|
100
|
+
if (!model || !hasImage(messages)) return
|
|
101
|
+
// RC1 resolves step tools before agent/pre-step. Mount progressive deep
|
|
102
|
+
// tools even when whole-turn routing is OFF (the default).
|
|
103
|
+
startDeepTools()
|
|
104
|
+
if (!options.routingEnabled()) return
|
|
105
|
+
const selection = currentOf(agent)
|
|
106
|
+
const source = routeOf(selection)
|
|
107
|
+
if (!source) return
|
|
108
|
+
const first = options.routingPairs()[0]
|
|
109
|
+
if (typeof first?.provider !== 'string' || !first.provider
|
|
110
|
+
|| typeof first.model !== 'string' || !first.model) return
|
|
111
|
+
const chain = options.chainRoute()
|
|
112
|
+
const target = chain && available(chain)
|
|
113
|
+
? { provider: chain, model: first.provider + '/' + first.model }
|
|
114
|
+
: { provider: first.provider, model: first.model }
|
|
115
|
+
// Historical behavior preserves the user's model within the same
|
|
116
|
+
// provider when chain routing is not enabled.
|
|
117
|
+
if (source.provider === target.provider) return
|
|
118
|
+
const record = owned.get(agent)
|
|
119
|
+
if (record && !sameRoute(source, record.target)) owned.delete(agent)
|
|
120
|
+
const returnTo = owned.get(agent)?.origin ?? { ...selection }
|
|
121
|
+
if (select(agent, target, source, 'image turn')) {
|
|
122
|
+
manualOverride.delete(agent)
|
|
123
|
+
owned.set(agent, { origin: returnTo, target })
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const textTurn = (agent) => {
|
|
127
|
+
const model = nativeModel(agent)
|
|
128
|
+
if (!model) return
|
|
129
|
+
const current = routeOf(currentOf(agent))
|
|
130
|
+
if (!current || manualOverride.has(agent)) return
|
|
131
|
+
const record = owned.get(agent)
|
|
132
|
+
if (record) {
|
|
133
|
+
owned.delete(agent)
|
|
134
|
+
// A user can manually select another vision model while an image turn
|
|
135
|
+
// is running. That explicit choice must not be reinterpreted as a
|
|
136
|
+
// request for automatic reverse routing on the next text input.
|
|
137
|
+
if (!sameRoute(current, record.target)) return
|
|
138
|
+
// reverseRouting=false explicitly keeps the visual route for later text
|
|
139
|
+
// turns. Only a disabled whole-turn routing switch must restore DVR's
|
|
140
|
+
// temporary image selection to the user's original model.
|
|
141
|
+
if (options.routingEnabled() && !options.reverseRoutingEnabled()) return
|
|
142
|
+
// Restore the actual Session model chosen before DVR routed its image.
|
|
143
|
+
// Never overwrite a different model explicitly selected by the user.
|
|
144
|
+
const origin = routeOf(record.origin)
|
|
145
|
+
const candidate = options.routingEnabled() && options.reverseRoutingEnabled()
|
|
146
|
+
? reverseRouteTarget(origin, {
|
|
147
|
+
pairs: options.routingPairs(),
|
|
148
|
+
wrapperRoute: options.wrapperRoute(),
|
|
149
|
+
wrapperRegistered: options.wrapperRegistered(),
|
|
150
|
+
textProvider: options.textProvider(),
|
|
151
|
+
hasAdapter: available,
|
|
152
|
+
})
|
|
153
|
+
: undefined
|
|
154
|
+
if (!select(agent, candidate ?? record.origin, current, 'text restore') && !available((candidate ?? record.origin)?.provider)) {
|
|
155
|
+
warnOnce(agent, 'original text model is no longer registered')
|
|
156
|
+
}
|
|
157
|
+
return
|
|
158
|
+
}
|
|
159
|
+
if (!options.routingEnabled() || !options.reverseRoutingEnabled()) return
|
|
160
|
+
const target = reverseRouteTarget(current, {
|
|
161
|
+
pairs: options.routingPairs(),
|
|
162
|
+
wrapperRoute: options.wrapperRoute(),
|
|
163
|
+
wrapperRegistered: options.wrapperRegistered(),
|
|
164
|
+
textProvider: options.textProvider(),
|
|
165
|
+
hasAdapter: available,
|
|
166
|
+
})
|
|
167
|
+
select(agent, target, current, 'reverse text routing')
|
|
168
|
+
}
|
|
169
|
+
const nextTurn = (agent, inbox) => {
|
|
170
|
+
if (!nativeModel(agent)) return
|
|
171
|
+
if (!inbox) { warnOnce(agent, 'Session inbox projection unavailable'); return }
|
|
172
|
+
if (!inbox.nextTurn.length) return
|
|
173
|
+
if (hasImage(inbox.nextTurn)) imageTurn(agent, inbox.nextTurn)
|
|
174
|
+
else textTurn(agent)
|
|
175
|
+
}
|
|
176
|
+
const nextStep = (agent, inbox) => {
|
|
177
|
+
if (!nativeModel(agent) || !inbox?.nextStep.length) return
|
|
178
|
+
// Tool-produced context is not a new user text turn. In particular, it
|
|
179
|
+
// must NOT undo an image selection from an ongoing multi-step tool run.
|
|
180
|
+
if (hasImage(inbox.nextStep)) imageTurn(agent, inbox.nextStep)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const rememberAgent = (agent) => {
|
|
184
|
+
if (nativeModel(agent) && agent?.session) agentsBySession.set(agent.session, agent)
|
|
185
|
+
}
|
|
186
|
+
// Observing external model/selection commits is read-only: selecting inside
|
|
187
|
+
// session/event would reenter Session.append and crash. Invalidate only our
|
|
188
|
+
// auto-restore ownership when a user/Host selects a model outside DVR.
|
|
189
|
+
// Only accepted Host selection events carry authority; identical-route
|
|
190
|
+
// no-op selections produce no event and therefore no new intent signal.
|
|
191
|
+
ctx.on('session/event', (session, event) => {
|
|
192
|
+
const agent = agentsBySession.get(session)
|
|
193
|
+
if (event?.type === 'turn/start') {
|
|
194
|
+
// Clear the previous turn's closing-window marker without appending a
|
|
195
|
+
// Session event from inside the non-reentrant Session publication.
|
|
196
|
+
if (agent) stopping.delete(agent)
|
|
197
|
+
return
|
|
198
|
+
}
|
|
199
|
+
if (event?.type !== 'model/selection' || selecting.has(session)) return
|
|
200
|
+
if (agent && owned.has(agent)) {
|
|
201
|
+
owned.delete(agent)
|
|
202
|
+
manualOverride.add(agent)
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
const containEarlyHook = (agent, action) => {
|
|
206
|
+
try { action() }
|
|
207
|
+
catch (error) {
|
|
208
|
+
// agent.send() calls inbox listeners synchronously BEFORE wakeDriver().
|
|
209
|
+
// A plugin failure here must not strand a durably queued user message.
|
|
210
|
+
if (agent && typeof agent === 'object') warnOnce(agent, String(error?.message ?? error).slice(0, 180))
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
ctx.on('agent/inbox/inserted', ({ agent, message } = {}) => containEarlyHook(agent, () => {
|
|
214
|
+
if (!nativeModel(agent)) return
|
|
215
|
+
rememberAgent(agent)
|
|
216
|
+
const inbox = readInbox(agent)
|
|
217
|
+
if (!inbox) { warnOnce(agent, 'Session inbox projection unavailable'); return }
|
|
218
|
+
// An inserted next-turn message may be waiting behind an active step.
|
|
219
|
+
// Prefer the pending next-step image; the turn-stopping and running
|
|
220
|
+
// boundaries re-evaluate next-turn once the active turn finishes.
|
|
221
|
+
if (message?.id && inbox.nextStep.some((item) => item.id === message.id)) {
|
|
222
|
+
const previous = stopping.get(agent)
|
|
223
|
+
if (previous && !manualOverride.has(agent)) {
|
|
224
|
+
// A next-step steering message may arrive while turn-stopping awaits
|
|
225
|
+
// other hooks, after DVR temporarily selected a queued next-turn route.
|
|
226
|
+
// Reassert this turn's actual route, never the later queued turn's route.
|
|
227
|
+
const current = routeOf(currentOf(agent))
|
|
228
|
+
if (current && previous.route && !sameRoute(current, previous.route)) {
|
|
229
|
+
if (select(agent, previous.route, current, 'closing step continuation')) {
|
|
230
|
+
if (previous.owned) owned.set(agent, previous.owned)
|
|
231
|
+
else owned.delete(agent)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
nextStep(agent, inbox)
|
|
236
|
+
} else if (message?.id && inbox.nextTurn.some((item) => item.id === message.id)
|
|
237
|
+
&& (agent.status === 'idle' || stopping.has(agent))) {
|
|
238
|
+
// Once turn-stopping starts there can be a tiny gap before the next
|
|
239
|
+
// turn/start where status is still running. New queued turns must not
|
|
240
|
+
// miss the pre-step model selection in that window.
|
|
241
|
+
nextTurn(agent, inbox)
|
|
242
|
+
}
|
|
243
|
+
}))
|
|
244
|
+
ctx.on('agent/status', ({ agent, status } = {}) => containEarlyHook(agent, () => {
|
|
245
|
+
rememberAgent(agent)
|
|
246
|
+
if (status === 'running') nextTurn(agent, readInbox(agent))
|
|
247
|
+
}))
|
|
248
|
+
ctx.on('agent/turn-stopping', ({ agent } = {}) => {
|
|
249
|
+
try {
|
|
250
|
+
rememberAgent(agent)
|
|
251
|
+
const selection = currentOf(agent)
|
|
252
|
+
const current = routeOf(selection)
|
|
253
|
+
if (current) stopping.set(agent, {route: {...selection}, owned: owned.get(agent)})
|
|
254
|
+
const inbox = readInbox(agent)
|
|
255
|
+
if (inbox?.nextStep.length) nextStep(agent, inbox)
|
|
256
|
+
else nextTurn(agent, inbox)
|
|
257
|
+
} catch (error) {
|
|
258
|
+
// A routing plugin must never veto the Host's turn completion.
|
|
259
|
+
if (agent && typeof agent === 'object') warnOnce(agent, String(error?.message ?? error).slice(0, 180))
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
ctx.on('agent/disposed', ({ agent } = {}) => {
|
|
263
|
+
if (agent && typeof agent === 'object') {
|
|
264
|
+
owned.delete(agent)
|
|
265
|
+
warning.delete(agent)
|
|
266
|
+
manualOverride.delete(agent)
|
|
267
|
+
stopping.delete(agent)
|
|
268
|
+
if (agent.session) agentsBySession.delete(agent.session)
|
|
269
|
+
}
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
return { nativeModel }
|
|
273
|
+
}
|
package/lib/client.js
CHANGED
|
@@ -12,6 +12,10 @@ window.__ModuleLoader__.load({
|
|
|
12
12
|
const { useState, useMemo } = React
|
|
13
13
|
const { ImageGallery } = require('@deepseek-ai/dsh-client-ui-attachment')
|
|
14
14
|
|
|
15
|
+
// Same packaged artwork used by DSH Plugin Manager; a data URL works in Desktop and remote Web.
|
|
16
|
+
const VISION_ROUTER_ICON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><defs><linearGradient id=\"vr-brand\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"#6E58F7\"/><stop offset=\"1\" stop-color=\"#179ED6\"/></linearGradient></defs><rect width=\"64\" height=\"64\" rx=\"15\" fill=\"url(#vr-brand)\"/><path d=\"M10 32C17 22 24 17 32 17S47 22 54 32C47 42 40 47 32 47S17 42 10 32Z\" fill=\"none\" stroke=\"#FFFFFF\" stroke-width=\"4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><circle cx=\"32\" cy=\"32\" r=\"10\" fill=\"#FFFFFF\"/><circle cx=\"32\" cy=\"32\" r=\"5.5\" fill=\"#283C89\"/><circle cx=\"35\" cy=\"29\" r=\"2.2\" fill=\"#A8F2FF\"/></svg>"
|
|
17
|
+
const VISION_ROUTER_ICON_SRC = 'data:image/svg+xml,' + encodeURIComponent(VISION_ROUTER_ICON_SVG)
|
|
18
|
+
|
|
15
19
|
// <generated:client-maintenance-actions>
|
|
16
20
|
function createClientMaintenanceActions({
|
|
17
21
|
fetchImpl,
|
|
@@ -1932,18 +1936,7 @@ openLogFolder,
|
|
|
1932
1936
|
}
|
|
1933
1937
|
}
|
|
1934
1938
|
|
|
1935
|
-
//
|
|
1936
|
-
// The walkthrough overlays are plain DOM: a dimmed backdrop with a "hole"
|
|
1937
|
-
// over the current target (classic box-shadow spotlight), a pulsing ring
|
|
1938
|
-
// around it, and the prompt card anchored beside the target with an arrow
|
|
1939
|
-
// pointing at it. Everything is pointer-events:none except the prompt, so
|
|
1940
|
-
// the real controls stay clickable the whole time.
|
|
1941
|
-
//
|
|
1942
|
-
// DSH web hashes its CSS-module class names (unstable across builds), so
|
|
1943
|
-
// the targets are addressed through the stable surface instead: slot
|
|
1944
|
-
// wrappers (data-slot), data-composer-card and aria-haspopup/aria-label
|
|
1945
|
-
// attributes. Each step keeps a fallback chain, and when nothing matches
|
|
1946
|
-
// the prompt degrades to a corner card with a directional arrow.
|
|
1939
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Walkthrough spotlight geometry).
|
|
1947
1940
|
const GUIDE_SELECTOR_TARGETS = [
|
|
1948
1941
|
'[data-slot="conversation.input.model"] button[aria-haspopup="menu"]',
|
|
1949
1942
|
'[aria-label^="选择模型"], [aria-label^="Select model"]',
|
|
@@ -2163,12 +2156,7 @@ openLogFolder,
|
|
|
2163
2156
|
finishVisionSettingsGuide({ remember: true })
|
|
2164
2157
|
})
|
|
2165
2158
|
actions.append(cancel)
|
|
2166
|
-
//
|
|
2167
|
-
// floating prompts stay symmetric. Step 1's Next advances the stored
|
|
2168
|
-
// step; step 2's Next performs the current phase's action for the
|
|
2169
|
-
// user — opening the settings panel, then entering the Vision Router
|
|
2170
|
-
// section — so the walkthrough can be driven entirely from the prompt
|
|
2171
|
-
// without touching the real controls.
|
|
2159
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Onboarding step controls).
|
|
2172
2160
|
const next = document.createElement('button')
|
|
2173
2161
|
next.type = 'button'
|
|
2174
2162
|
next.className = 'vr-btn vr-btn-save'
|
|
@@ -3820,11 +3808,7 @@ openLogFolder,
|
|
|
3820
3808
|
const raw = 'extraVisionModels' in drafts
|
|
3821
3809
|
? drafts['extraVisionModels']
|
|
3822
3810
|
: readValue(snapshot, 'extraVisionModels')
|
|
3823
|
-
//
|
|
3824
|
-
// incomplete row (provider picked, model pending) stays visible
|
|
3825
|
-
// instead of collapsing, which is what made the provider dropdown
|
|
3826
|
-
// feel unselectable before. Like the vision backend chain above, an
|
|
3827
|
-
// empty configuration still renders one blank row ready to fill.
|
|
3811
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Provider-model draft rows).
|
|
3828
3812
|
const rows = (Array.isArray(raw) && raw.length > 0 ? raw : [{ provider: '', model: '' }]).map(
|
|
3829
3813
|
(entry) => {
|
|
3830
3814
|
if (entry && typeof entry === 'object') {
|
|
@@ -3840,12 +3824,7 @@ openLogFolder,
|
|
|
3840
3824
|
: { provider: text.slice(0, slash), model: text.slice(slash + 1) }
|
|
3841
3825
|
},
|
|
3842
3826
|
)
|
|
3843
|
-
//
|
|
3844
|
-
// provider dropdown (providers that have excluded models) and a model
|
|
3845
|
-
// dropdown (that provider's excluded models). A row the user already
|
|
3846
|
-
// selected elsewhere stays disabled in the other rows. Option sets
|
|
3847
|
-
// come from the memoized top-level hooks (this function is plain
|
|
3848
|
-
// render code and must stay hook-free).
|
|
3827
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Two-select routing row).
|
|
3849
3828
|
const hiddenProviders = hiddenVisionProviders
|
|
3850
3829
|
const hiddenModelsOf = hiddenVisionModelsOf
|
|
3851
3830
|
const used = new Set(
|
|
@@ -4021,12 +4000,7 @@ openLogFolder,
|
|
|
4021
4000
|
)
|
|
4022
4001
|
}
|
|
4023
4002
|
|
|
4024
|
-
//
|
|
4025
|
-
// fetched (including after a remount that reset the state), start the
|
|
4026
|
-
// fetch. React supports setState during render for the same component,
|
|
4027
|
-
// and the status flips to 'loading' so this cannot loop. The same kick
|
|
4028
|
-
// runs the cheap test-connection probe once so the Host-owned official
|
|
4029
|
-
// provider availability notice can render without a button click.
|
|
4003
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Catalog render-phase bootstrap).
|
|
4030
4004
|
if (open && catalog.status === 'idle') {
|
|
4031
4005
|
loadCatalog()
|
|
4032
4006
|
}
|
|
@@ -4232,11 +4206,7 @@ openLogFolder,
|
|
|
4232
4206
|
h('div', { className: 'vr-quickstart-actions' },
|
|
4233
4207
|
h('button', {
|
|
4234
4208
|
type: 'button', className: 'vr-btn',
|
|
4235
|
-
//
|
|
4236
|
-
// leave the settings modal first (its panel closes on
|
|
4237
|
-
// Escape), show the overview (steps 1-3), and then walk
|
|
4238
|
-
// through step 1 on the chat page — starting in place
|
|
4239
|
-
// would skip the session/text-model step entirely.
|
|
4209
|
+
// Details: docs/architecture/client-ui-lifecycle-notes.md (Onboarding replay).
|
|
4240
4210
|
onClick: () => {
|
|
4241
4211
|
guideHostUi.closeSettings()
|
|
4242
4212
|
const reveal = () => showOnboarding(t, { auto: false, focus: true })
|
|
@@ -4885,6 +4855,16 @@ openLogFolder,
|
|
|
4885
4855
|
// Vision Router owns one canonical settings surface. The section switches
|
|
4886
4856
|
// to the opt-in remote scope on a non-loopback client.
|
|
4887
4857
|
const sectionCardInject = Object.freeze({ ...cardInject, scope: primaryScope, surface: 'section' })
|
|
4858
|
+
const VisionRouterSettingsIcon = ({ size }) =>
|
|
4859
|
+
React.createElement('img', {
|
|
4860
|
+
src: VISION_ROUTER_ICON_SRC,
|
|
4861
|
+
alt: '',
|
|
4862
|
+
'aria-hidden': 'true',
|
|
4863
|
+
draggable: false,
|
|
4864
|
+
width: size,
|
|
4865
|
+
height: size,
|
|
4866
|
+
style: { display: 'block', width: size, height: size },
|
|
4867
|
+
})
|
|
4888
4868
|
const VisionRouterSettingsSection = (sectionProps) =>
|
|
4889
4869
|
React.createElement(
|
|
4890
4870
|
'ul',
|
|
@@ -4907,6 +4887,18 @@ openLogFolder,
|
|
|
4907
4887
|
}),
|
|
4908
4888
|
'vision-router: primary settings section',
|
|
4909
4889
|
)
|
|
4890
|
+
// Native Settings navigation icon (newer Hosts); old Hosts simply do not render this slot.
|
|
4891
|
+
// The effect owns the registration, so DSH restores the default icon on plugin unload.
|
|
4892
|
+
ctx.effect(
|
|
4893
|
+
() =>
|
|
4894
|
+
ctx.slots.inject('settings.section.icon', function* () {
|
|
4895
|
+
yield ctx.slots.register(
|
|
4896
|
+
{ name: 'settings.section.icon', id: 'vision-router' },
|
|
4897
|
+
VisionRouterSettingsIcon,
|
|
4898
|
+
)
|
|
4899
|
+
}),
|
|
4900
|
+
'vision-router: settings navigation icon',
|
|
4901
|
+
)
|
|
4910
4902
|
ctx.effect(
|
|
4911
4903
|
() =>
|
|
4912
4904
|
ctx.slots.inject('tool.call.toolview', function* () {
|
|
@@ -21,6 +21,9 @@ const LEGACY_VISION_ATTACHMENT_BYTES = 20 * 1024 * 1024
|
|
|
21
21
|
const LEGACY_VISION_ATTACHMENT_PIXELS = 100_000_000
|
|
22
22
|
const DSH_RC8_DEFAULT_IMAGE_DIMENSION = 2000
|
|
23
23
|
const DSH_ALPHA_DEFAULT_IMAGE_DIMENSION = 8192
|
|
24
|
+
// DSH 0.2.2-alpha.2 expands the Host admission default, while retaining the
|
|
25
|
+
// 4.2MP/8192px/4MiB normalization tuple of earlier alphas.
|
|
26
|
+
const DSH_ALPHA_022_DEFAULT_IMAGE_DIMENSION = 65_535
|
|
24
27
|
const VISION_ROUTER_IMAGE_DIMENSION = 10_000
|
|
25
28
|
const DSH_ALPHA_DEFAULT_NORMALIZED_PIXELS = 2048 * 2048
|
|
26
29
|
const DSH_ALPHA_DEFAULT_NORMALIZED_DIMENSION = 8192
|
|
@@ -135,6 +138,11 @@ function exactAlphaNormalizationDefaults(policy) {
|
|
|
135
138
|
policy.maxBytes === DSH_ALPHA_DEFAULT_NORMALIZED_BYTES
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
function knownAlphaDefaultImageDimension(dimension) {
|
|
142
|
+
return dimension === DSH_ALPHA_DEFAULT_IMAGE_DIMENSION ||
|
|
143
|
+
dimension === DSH_ALPHA_022_DEFAULT_IMAGE_DIMENSION
|
|
144
|
+
}
|
|
145
|
+
|
|
138
146
|
function knownVisionRouterAdmissionShape(limits) {
|
|
139
147
|
if (!limits || typeof limits !== 'object') return false
|
|
140
148
|
if (
|
|
@@ -142,7 +150,7 @@ function knownVisionRouterAdmissionShape(limits) {
|
|
|
142
150
|
limits.maxImagePixels !== LEGACY_VISION_ATTACHMENT_PIXELS
|
|
143
151
|
) return false
|
|
144
152
|
return limits.maxImageDimension === DSH_RC8_DEFAULT_IMAGE_DIMENSION ||
|
|
145
|
-
limits.maxImageDimension
|
|
153
|
+
knownAlphaDefaultImageDimension(limits.maxImageDimension)
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
function replaceFrozenPolicy(store, property, next) {
|
|
@@ -163,8 +171,8 @@ function replaceFrozenPolicy(store, property, next) {
|
|
|
163
171
|
* containing only the released 20MiB / 100MP admission pair. On rc.8 that
|
|
164
172
|
* shadowed the later 10000px bundle value and rematerialized the Host's 2000px
|
|
165
173
|
* default. On 0.1.2-alpha.1 the same stale row additionally omits the new
|
|
166
|
-
* normalization fields, rematerializing 8192px admission
|
|
167
|
-
* 4.2MP / 4MiB canonical-image defaults.
|
|
174
|
+
* normalization fields, rematerializing 8192px admission (or 65535px on
|
|
175
|
+
* 0.2.2-alpha.2) plus the Host's 4.2MP / 4MiB canonical-image defaults.
|
|
168
176
|
*
|
|
169
177
|
* This migration never edits a user's profile file and never creates another
|
|
170
178
|
* attachment owner. LocalAttachmentStore exposes the resolved immutable
|
|
@@ -173,7 +181,8 @@ function replaceFrozenPolicy(store, property, next) {
|
|
|
173
181
|
* objects on one exact historical fingerprint:
|
|
174
182
|
*
|
|
175
183
|
* - admission bytes === 20MiB and pixels === 100MP; and
|
|
176
|
-
* - dimension is rc.8's 2000px
|
|
184
|
+
* - dimension is rc.8's 2000px or one of the known alpha Host defaults
|
|
185
|
+
* (8192px or 65535px); and
|
|
177
186
|
* - normalization, when repaired, is EXACTLY alpha.1's 4.2MP/8192px/4MiB
|
|
178
187
|
* default tuple.
|
|
179
188
|
*
|
|
@@ -206,7 +215,7 @@ export function ensureVisionAttachmentAdmissionPolicy(ctx, logger, options = {})
|
|
|
206
215
|
}
|
|
207
216
|
|
|
208
217
|
const repairNormalization =
|
|
209
|
-
limits.maxImageDimension
|
|
218
|
+
knownAlphaDefaultImageDimension(limits.maxImageDimension) &&
|
|
210
219
|
exactAlphaNormalizationDefaults(store.normalizationPolicy)
|
|
211
220
|
const repairDimension =
|
|
212
221
|
limits.maxImageDimension === DSH_RC8_DEFAULT_IMAGE_DIMENSION ||
|
|
@@ -48,23 +48,29 @@ function isTesseractCompatCall(file, args, options) {
|
|
|
48
48
|
|
|
49
49
|
function nativePromisified(execFileImpl, originalCustom) {
|
|
50
50
|
if (typeof originalCustom === 'function') return originalCustom
|
|
51
|
-
return (file, args, options) =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
return (file, args, options) => {
|
|
52
|
+
let child
|
|
53
|
+
const pending = new Promise((resolve, reject) => {
|
|
54
|
+
child = execFileImpl(file, args, options, (error, stdout, stderr) => {
|
|
55
|
+
if (error) {
|
|
56
|
+
if (error && typeof error === 'object') {
|
|
57
|
+
try {
|
|
58
|
+
error.stdout = stdout
|
|
59
|
+
error.stderr = stderr
|
|
60
|
+
} catch {
|
|
61
|
+
/* preserve the original error */
|
|
62
|
+
}
|
|
60
63
|
}
|
|
64
|
+
reject(error)
|
|
65
|
+
return
|
|
61
66
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
resolve({ stdout, stderr })
|
|
67
|
+
resolve({ stdout, stderr })
|
|
68
|
+
})
|
|
66
69
|
})
|
|
67
|
-
|
|
70
|
+
// Match Node's promisified execFile contract even without a custom hook.
|
|
71
|
+
pending.child = child
|
|
72
|
+
return pending
|
|
73
|
+
}
|
|
68
74
|
}
|
|
69
75
|
|
|
70
76
|
/**
|
|
@@ -97,11 +103,16 @@ export function createTesseractPromisifyCompat(execFileImpl, originalCustom, opt
|
|
|
97
103
|
return resolvedTempDir
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
|
|
106
|
+
function tesseractPromisifyCompat(file, args, execOptions) {
|
|
101
107
|
if (!active || !isTesseractCompatCall(file, args, execOptions)) {
|
|
108
|
+
// Return the native Promise itself: async wrappers discard .child.
|
|
102
109
|
return delegate(file, args, execOptions)
|
|
103
110
|
}
|
|
111
|
+
return runTesseractCompat(file, args, execOptions)
|
|
112
|
+
}
|
|
104
113
|
|
|
114
|
+
// Staging stdin bytes is asynchronous; only this OCR-specific path is async.
|
|
115
|
+
async function runTesseractCompat(file, args, execOptions) {
|
|
105
116
|
const bytes = bytesView(execOptions.input)
|
|
106
117
|
let dir
|
|
107
118
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vision-router",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
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": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"homepage": "https://github.com/ysr666/dsh-vision-router",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"main": "lib/public-entry.js",
|
|
13
|
+
"icon": "./assets/icon.svg",
|
|
13
14
|
"bin": {
|
|
14
15
|
"dsh-vision-router": "./lib/doctor-cli-p0.js"
|
|
15
16
|
},
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
"default": "./lib/public-entry.js"
|
|
20
21
|
},
|
|
21
22
|
"./client": "./lib/client.js",
|
|
23
|
+
"./icon": "./assets/icon.svg",
|
|
22
24
|
"./package.json": "./package.json",
|
|
23
25
|
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
24
26
|
},
|
|
@@ -90,14 +92,14 @@
|
|
|
90
92
|
"@deepseek-ai/dsh-storage-domain": "0.2.0-rc.2"
|
|
91
93
|
},
|
|
92
94
|
"scripts": {
|
|
93
|
-
"test": "node --test tests/optional-peer-import-contract.test.js tests/index-modularization.test.js tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/issue-374-delegated-call-config.test.js tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.test.js tests/capability-advisory.test.js tests/vision-execution-policy.test.js tests/vision-backend-diagnostics.test.js tests/live-model-discovery.test.js tests/cache-atomic-write-concurrency.test.js tests/live-model-credential-resolution.test.js tests/vision-model-registry.test.js tests/live-model-client-stability.test.js tests/providers-persistence.test.js tests/provider-directory-fallback.test.js tests/model-catalog-policy.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-fj.test.js tests/settings-ia-acceptance-regression.test.js tests/settings-migration.test.js tests/settings-section-order.test.js tests/attachment-admission-policy.test.js tests/vision-resilience.test.js tests/degraded-local-evidence.test.js tests/vision-resilience-lifecycle.test.js tests/vision-breaker-readonly.test.js tests/alpha1-browser-lifecycle-integration.test.js tests/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.test.js tests/dev-staged-build.test.js tests/dev-web-reload.test.js tests/client.test.js tests/issue-307-regression.test.js tests/issue-284-vision-mode-toggle.test.js tests/issue-284-vision-mode-hardening.test.js tests/issue-284-attachment-id-hint.test.js tests/issue-284-model-visibility.test.js tests/issue-284-vision-selection-effort.test.js tests/client-presentation-boundary.test.js tests/clipboard-image-paste-compat.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/remote-settings-risk-confirmation.test.js tests/local-remote-settings-permission.test.js tests/artifact-path-security.test.js tests/http-compat.test.js tests/catalog-corrections.test.js tests/release-registry-identity.test.js tests/update-check.test.js tests/update-check-signal-lifecycle.test.js tests/self-update.test.js tests/doctor.test.js tests/doctor-cli.test.js tests/legacy-session-repair.test.js tests/profile-pnpm-diagnostics.test.js tests/doctor-v2.test.js tests/doctor-cli-v2.test.js tests/doctor-runtime.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/session-repair-v2.test.js tests/activation-shim-contract.test.js tests/bundle-defaults.test.js tests/file-logger.test.js tests/official-deepseek-catalog.test.js tests/replay-delegation.test.js tests/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.test.js tests/adversarial-hardening.test.js tests/vision-adversarial-hardening-v2.test.js tests/vision-capability-benchmark-visual-proof.test.js tests/wrapper-directory.test.js tests/logging-ui.test.js tests/manifest-dependencies.test.js tests/provider-transport-threading.test.js tests/architecture-2.3-gate.test.js tests/host-settings-seam.test.js tests/drift-canary-settings-seam.test.js tests/esm-cycle-audit.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js tests/vision-model-guidance-contract.test.js tests/local-ollama.test.js tests/local-only-vision.test.js tests/ollama-cold-start.test.js tests/ollama-cold-start-loaded.test.js tests/zero-regression-gate.test.js tests/runtime-e2e.test.js tests/local-vision-stabilizer.test.js tests/local-connection-probe.test.js tests/vision-diagnostics-routes.test.js tests/repetition-guard.test.js tests/guide-scroll-gate.test.js tests/settings-scroll-jank-regression.test.js tests/free-cloud-first.test.js tests/dsh-host-compat.test.js tests/native-image-coexistence.test.js tests/issue-276-session-image-ownership.test.js tests/issue-276-entry-policy-bridge.test.js tests/issue-276-policy-hardening.test.js tests/issue-289-native-nonintervention.test.js tests/issue-512-tool-restriction.test.js tests/issue-606-session-source-ownership.test.js tests/pi-ai-bridge-wire-compat.test.js tests/fetch-wrapper-lifecycle.test.js tests/fetch-wrapper-composition.test.js tests/provider-probe-proxy-scope.test.js tests/lifecycle-invariants.test.js tests/vision-tool-settings-generation.test.js tests/release-package-content-identity.test.js tests/release-state-machine.test.js tests/mixed-router.test.js tests/depth-tier.test.js tests/depth-quota-behavior.test.js tests/structured-flow-hardening.test.js tests/structured-flow-adversarial.test.js tests/vision-budget-activation.test.js tests/runtime-boundary-fixes.test.js tests/security-resource-boundaries.test.js tests/security-property-fuzz.test.js tests/security-adversarial-fuzz-contract.test.js tests/runtime-i18n.test.js tests/long-ocr-empty-retry.test.js tests/tesseract-adaptive-ocr.test.js tests/tesseract-node24-boot.test.js tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/session-vision-event-feed.test.js tests/session-vision-policy.test.js tests/session-vision-policy-domain.test.js tests/session-vision-delegation.test.js tests/session-vision-delegation-boundary.test.js tests/subagent-vision-inheritance-characterization.test.js tests/subagent-vision-runtime-integration.test.js tests/subagent-vision-cold-resume.test.js tests/image-resource-governor.test.js tests/resource-retention-lifecycle.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/structured-guard-idempotency.test.js tests/vision-routing-product.test.js tests/vision-runtime-performance.test.js tests/vision-routing-settings-prelude.test.js tests/v2-settings-ia-integration.test.js tests/vision-capability-router.test.js tests/vision-capability-reference.test.js tests/vision-capability-benchmark.test.js tests/vision-capability-grounding-proof-contract.test.js tests/vision-capability-probe.test.js tests/vision-capability-axis-freshness.test.js tests/vision-capability-shadow-health.test.js tests/vision-capability-benchmark-service.test.js tests/vision-capability-preflight-hardening.test.js tests/vision-capability-benchmark-contract.test.js tests/vision-capability-benchmark-client.test.js tests/vision-capability-benchmark-client-productization.test.js tests/vision-capability-adapter-route.test.js tests/vision-background-benchmark.test.js tests/vision-background-lifecycle.test.js tests/vision-background-benchmark-productization.test.js tests/vision-capability-benchmark-budget.test.js tests/vision-image-input-verdict.test.js tests/vision-capability-failure-classification.test.js tests/vision-capability-gate-client.test.js tests/v2-product-review-fixes.test.js tests/qa-top5-reliability.test.js tests/qa-screenshot-runtime.test.js tests/qa-runtime-identity.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js tests/qa-reliability-tail.test.js tests/qa-endpoint-route-alias.test.js tests/settings-native-card-semantics.test.js tests/settings-native-card-lazy-data.test.js tests/settings-invalid-staged-dirty.test.js tests/vision-toggle-root-hardening.test.js && pnpm test:regression-closure && node --test tests/vision-backend-runtime-policy.test.js tests/vision-router-adversarial-review-fixes.test.js tests/web-panel-delegation.test.js",
|
|
95
|
+
"test": "node --test tests/dsh-alpha-pin.test.js tests/dsh-rc1-pin.test.js tests/agent-prestep-model-routing.test.js tests/native-plugin-icons.test.js tests/optional-peer-import-contract.test.js tests/index-modularization.test.js tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/issue-374-delegated-call-config.test.js tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.test.js tests/capability-advisory.test.js tests/vision-execution-policy.test.js tests/vision-backend-diagnostics.test.js tests/live-model-discovery.test.js tests/cache-atomic-write-concurrency.test.js tests/live-model-credential-resolution.test.js tests/vision-model-registry.test.js tests/live-model-client-stability.test.js tests/providers-persistence.test.js tests/provider-directory-fallback.test.js tests/model-catalog-policy.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-fj.test.js tests/settings-ia-acceptance-regression.test.js tests/settings-migration.test.js tests/settings-section-order.test.js tests/attachment-admission-policy.test.js tests/vision-resilience.test.js tests/degraded-local-evidence.test.js tests/vision-resilience-lifecycle.test.js tests/vision-breaker-readonly.test.js tests/alpha1-browser-lifecycle-integration.test.js tests/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.test.js tests/dev-staged-build.test.js tests/dev-web-reload.test.js tests/client.test.js tests/issue-307-regression.test.js tests/issue-284-vision-mode-toggle.test.js tests/issue-284-vision-mode-hardening.test.js tests/issue-284-attachment-id-hint.test.js tests/issue-284-model-visibility.test.js tests/issue-284-vision-selection-effort.test.js tests/client-presentation-boundary.test.js tests/clipboard-image-paste-compat.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/remote-settings-risk-confirmation.test.js tests/local-remote-settings-permission.test.js tests/artifact-path-security.test.js tests/http-compat.test.js tests/catalog-corrections.test.js tests/release-registry-identity.test.js tests/update-check.test.js tests/update-check-signal-lifecycle.test.js tests/self-update.test.js tests/doctor.test.js tests/doctor-cli.test.js tests/legacy-session-repair.test.js tests/profile-pnpm-diagnostics.test.js tests/doctor-v2.test.js tests/doctor-cli-v2.test.js tests/doctor-runtime.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/session-repair-v2.test.js tests/activation-shim-contract.test.js tests/bundle-defaults.test.js tests/file-logger.test.js tests/official-deepseek-catalog.test.js tests/replay-delegation.test.js tests/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.test.js tests/adversarial-hardening.test.js tests/vision-adversarial-hardening-v2.test.js tests/vision-capability-benchmark-visual-proof.test.js tests/wrapper-directory.test.js tests/logging-ui.test.js tests/manifest-dependencies.test.js tests/provider-transport-threading.test.js tests/architecture-2.3-gate.test.js tests/host-settings-seam.test.js tests/drift-canary-settings-seam.test.js tests/esm-cycle-audit.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js tests/vision-model-guidance-contract.test.js tests/local-ollama.test.js tests/local-only-vision.test.js tests/ollama-cold-start.test.js tests/ollama-cold-start-loaded.test.js tests/zero-regression-gate.test.js tests/runtime-e2e.test.js tests/local-vision-stabilizer.test.js tests/local-connection-probe.test.js tests/vision-diagnostics-routes.test.js tests/repetition-guard.test.js tests/guide-scroll-gate.test.js tests/settings-scroll-jank-regression.test.js tests/free-cloud-first.test.js tests/dsh-host-compat.test.js tests/native-image-coexistence.test.js tests/issue-276-session-image-ownership.test.js tests/issue-276-entry-policy-bridge.test.js tests/issue-276-policy-hardening.test.js tests/issue-289-native-nonintervention.test.js tests/issue-512-tool-restriction.test.js tests/issue-606-session-source-ownership.test.js tests/pi-ai-bridge-wire-compat.test.js tests/fetch-wrapper-lifecycle.test.js tests/fetch-wrapper-composition.test.js tests/provider-probe-proxy-scope.test.js tests/lifecycle-invariants.test.js tests/vision-tool-settings-generation.test.js tests/release-package-content-identity.test.js tests/release-state-machine.test.js tests/mixed-router.test.js tests/depth-tier.test.js tests/depth-quota-behavior.test.js tests/structured-flow-hardening.test.js tests/structured-flow-adversarial.test.js tests/vision-budget-activation.test.js tests/runtime-boundary-fixes.test.js tests/security-resource-boundaries.test.js tests/security-property-fuzz.test.js tests/security-adversarial-fuzz-contract.test.js tests/runtime-i18n.test.js tests/long-ocr-empty-retry.test.js tests/tesseract-adaptive-ocr.test.js tests/tesseract-node24-boot.test.js tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/session-vision-event-feed.test.js tests/session-vision-policy.test.js tests/session-vision-policy-domain.test.js tests/session-vision-delegation.test.js tests/session-vision-delegation-boundary.test.js tests/subagent-vision-inheritance-characterization.test.js tests/subagent-vision-runtime-integration.test.js tests/subagent-vision-cold-resume.test.js tests/image-resource-governor.test.js tests/resource-retention-lifecycle.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/structured-guard-idempotency.test.js tests/vision-routing-product.test.js tests/vision-runtime-performance.test.js tests/vision-routing-settings-prelude.test.js tests/v2-settings-ia-integration.test.js tests/vision-capability-router.test.js tests/vision-capability-reference.test.js tests/vision-capability-benchmark.test.js tests/vision-capability-grounding-proof-contract.test.js tests/vision-capability-probe.test.js tests/vision-capability-axis-freshness.test.js tests/vision-capability-shadow-health.test.js tests/vision-capability-benchmark-service.test.js tests/vision-capability-preflight-hardening.test.js tests/vision-capability-benchmark-contract.test.js tests/vision-capability-benchmark-client.test.js tests/vision-capability-benchmark-client-productization.test.js tests/vision-capability-adapter-route.test.js tests/vision-background-benchmark.test.js tests/vision-background-lifecycle.test.js tests/vision-background-benchmark-productization.test.js tests/vision-capability-benchmark-budget.test.js tests/vision-image-input-verdict.test.js tests/vision-capability-failure-classification.test.js tests/vision-capability-gate-client.test.js tests/v2-product-review-fixes.test.js tests/qa-top5-reliability.test.js tests/qa-screenshot-runtime.test.js tests/qa-runtime-identity.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js tests/qa-reliability-tail.test.js tests/qa-endpoint-route-alias.test.js tests/settings-native-card-semantics.test.js tests/settings-native-card-lazy-data.test.js tests/settings-invalid-staged-dirty.test.js tests/vision-toggle-root-hardening.test.js && pnpm test:regression-closure && node --test tests/vision-backend-runtime-policy.test.js tests/vision-router-adversarial-review-fixes.test.js tests/web-panel-delegation.test.js",
|
|
94
96
|
"test:core": "node --test tests/core.test.js tests/degraded-local-evidence.test.js tests/runtime-e2e.test.js tests/structured-bootstrap.test.js tests/structured-flow-hardening.test.js tests/structured-flow-adversarial.test.js tests/vision-execution-policy.test.js tests/vision-backend-runtime-policy.test.js",
|
|
95
97
|
"test:routing": "node --test tests/issue-374-delegated-call-config.test.js tests/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.test.js tests/vision-routing-product.test.js tests/vision-capability-router.test.js tests/vision-capability-probe.test.js tests/vision-capability-shadow-health.test.js tests/vision-runtime-performance.test.js tests/vision-background-benchmark.test.js tests/vision-image-input-verdict.test.js",
|
|
96
98
|
"test:session": "node --test tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/session-vision-policy.test.js tests/session-vision-delegation.test.js tests/session-vision-delegation-boundary.test.js tests/subagent-vision-inheritance-characterization.test.js tests/subagent-vision-runtime-integration.test.js tests/subagent-vision-cold-resume.test.js tests/session-vision-policy-domain.test.js tests/replay-delegation.test.js tests/legacy-session-repair.test.js tests/session-repair-v2.test.js tests/issue-276-session-image-ownership.test.js",
|
|
97
99
|
"test:resources": "node --test tests/artifact-path-security.test.js tests/image-resource-governor.test.js tests/resource-retention-lifecycle.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js",
|
|
98
100
|
"test:compat": "node --test tests/adapter-prepare-call-compat.test.js tests/attachment-admission-policy.test.js tests/dsh-host-compat.test.js tests/http-compat.test.js tests/pi-ai-bridge-wire-compat.test.js tests/fetch-wrapper-lifecycle.test.js tests/fetch-wrapper-composition.test.js tests/native-image-coexistence.test.js tests/tesseract-node24-boot.test.js tests/dsh-host-capabilities.test.js",
|
|
99
101
|
"test:web": "node --test tests/alpha1-browser-lifecycle-integration.test.js tests/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.test.js tests/client.test.js tests/client-presentation-boundary.test.js tests/clipboard-image-paste-compat.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-acceptance-regression.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/local-remote-settings-permission.test.js tests/v2-settings-ia-integration.test.js tests/logging-ui.test.js tests/dev-staged-build.test.js tests/dev-web-reload.test.js",
|
|
100
|
-
"test:contract": "node --test tests/manifest-dependencies.test.js tests/bundle-defaults.test.js tests/zero-regression-gate.test.js tests/issue-289-native-nonintervention.test.js tests/issue-374-delegated-call-config.test.js tests/runtime-boundary-fixes.test.js tests/security-adversarial-fuzz-contract.test.js tests/runtime-i18n.test.js tests/adapter-prepare-call-compat.test.js tests/dsh-host-compat.test.js tests/attachment-admission-policy.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js",
|
|
102
|
+
"test:contract": "node --test tests/dsh-alpha-pin.test.js tests/dsh-rc1-pin.test.js tests/agent-prestep-model-routing.test.js tests/native-plugin-icons.test.js tests/manifest-dependencies.test.js tests/bundle-defaults.test.js tests/zero-regression-gate.test.js tests/issue-289-native-nonintervention.test.js tests/issue-374-delegated-call-config.test.js tests/runtime-boundary-fixes.test.js tests/security-adversarial-fuzz-contract.test.js tests/runtime-i18n.test.js tests/adapter-prepare-call-compat.test.js tests/dsh-host-compat.test.js tests/attachment-admission-policy.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js",
|
|
101
103
|
"test:grounding": "node --test tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.test.js tests/vision-capability-grounding-proof-contract.test.js",
|
|
102
104
|
"test:stress": "node scripts/image-resource-stress.mjs && node --test tests/large-image-resource-integration.test.js tests/resource-retention-lifecycle.test.js",
|
|
103
105
|
"test:adversarial-fuzz": "node scripts/security-adversarial-fuzz.mjs",
|