dsh-vision-router 3.2.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/README.zh.md +20 -3
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/assets/licenses/llvm-mingw-LICENSE.txt +279 -0
- package/assets/licenses/mingw-w64-runtime-COPYING.txt +265 -0
- package/assets/licenses/ncnn-LICENSE.txt +86 -0
- package/docs/architecture/dsh-support-window.md +25 -6
- package/docs/compatibility/dsh-0.2.2-rc3-audit.md +131 -0
- package/docs/releases/v3.2.2.md +25 -0
- package/docs/releases/v3.3.0.md +34 -0
- package/docs/releases/v3.4.0.md +41 -0
- package/index.js +313 -169
- package/lib/client.js +4 -4
- package/lib/core-primitives.js +115 -56
- package/lib/dsh-support-window.js +6 -3
- package/lib/maintenance-routes.js +2 -0
- package/lib/managed-tesseract-child.js +33 -0
- package/lib/native-ocr-annotation-risk.js +33 -0
- package/lib/native-ocr-canary.js +156 -0
- package/lib/native-ocr-chemistry-review.js +37 -0
- package/lib/native-ocr-document.js +243 -0
- package/lib/native-ocr-installation.js +17 -0
- package/lib/native-ocr-integrity.js +93 -0
- package/lib/native-ocr-question-labels.js +167 -0
- package/lib/native-ocr-supervisor.js +268 -0
- package/lib/optional-ocr-engines.js +330 -0
- package/lib/optional-ocr-routes.js +87 -0
- package/lib/runtime-reliability.js +7 -0
- package/lib/session-query-readers.js +8 -2
- package/lib/session-vision-attachment-index.js +61 -14
- package/lib/settings-ia-client-prelude.js +56 -2
- package/lib/tesseract-image-preprocess.js +35 -0
- package/lib/trace-vtracer-process-runtime.js +133 -0
- package/lib/trace-vtracer-process.js +43 -0
- package/lib/vision-attachment-handle-runtime.js +11 -2
- package/lib/vision-backend-runtime-policy.js +5 -3
- package/lib/vision-image-input-reader.js +67 -0
- package/lib/vision-image-input-verdict.js +24 -3
- package/lib/vision-tool-runtime-boundary.js +7 -10
- package/lib/vision-tool-stage.js +58 -0
- package/lib/web-capability-boundary.js +4 -0
- package/package.json +5 -4
- package/scripts/install-native-ocr.mjs +144 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# v3.4.0 — Optional local OCR engines / 按需安装本地 OCR 引擎
|
|
2
|
+
|
|
3
|
+
**Release identity / 发布状态:** This document describes the contents of v3.4.0, not proof that the version is already published. Publication requires an immutable GitHub tag/Release, npm `latest` and successful signed-package identity verification by the protected Release workflow. / 本文说明 3.4.0 更新内容;正式发布须以受保护工作流、不可变 GitHub tag/Release 和 npm `latest` 的包体核验结果为准。
|
|
4
|
+
|
|
5
|
+
## Overview / 主要变化
|
|
6
|
+
|
|
7
|
+
**Both local OCR engines are optional. No native OCR executable or model is installed during ordinary `dsh-vision-router` plugin installation.** Most users can continue to use the existing, authorized vision-model fallback for image transcription without installing either local engine. / 两个本地 OCR 引擎完全可选。用户正常安装 Vision Router 不会自动安装 OCR 程序或模型;多数用户无需配置,继续按既有策略回退视觉模型。
|
|
8
|
+
|
|
9
|
+
Open **DSH Settings → Vision Router → Local & device → Optional local OCR** (本地与设备 → 可选本地 OCR) to inspect and manage the two local engine choices:
|
|
10
|
+
|
|
11
|
+
### Tesseract / 系统优先,插件私有版可选
|
|
12
|
+
|
|
13
|
+
- If the machine already has usable system `tesseract` with **both** `chi_sim` and `eng` language data, **reuse it directly** and disable the redundant Install button. Never uninstall or modify the user's global Tesseract. / 系统已有可用的简体中文和英文 Tesseract 时直接复用,不重复下载、不改动系统安装。
|
|
14
|
+
- Otherwise an explicit **Install Tesseract** click can install a **private Tesseract.js 7.0.0/WASM** runtime and Chinese/English traineddata. It is not installed by npm during plugin installation and does not require a system-wide package manager operation. Pinned npm SHA-512 and language-data SHA-256 are checked, staged atomically, and removed only by the plugin-owned uninstall. / 未检测到完整系统版时,用户可以在设置里主动安装插件私有的 WASM 与中英文模型,或独立卸载。
|
|
15
|
+
- Managed recognition executes in a bounded Node subprocess with cancellation, resource limits and Electron Host compatibility. Installation and recognition can require temporary network access for the opt-in download, but later inference uses locally installed assets. / 安装时需联网,安装完成后的识别在本机进行;执行有超时、取消与资源限制。
|
|
16
|
+
- Native system `tesseract` is never owned by the plugin. The private WASM and system binary are distinct providers of the same `engine=tesseract` OCR compatibility path; neither is guaranteed to transcribe stylized Chinese typography perfectly. / 系统版与插件版均归入 Tesseract 兼容路径,复杂文字效果仍有局限。
|
|
17
|
+
|
|
18
|
+
### PP-OCRv6 small / ncnn — verified offline archive only
|
|
19
|
+
|
|
20
|
+
- macOS ARM64 and Windows x64 can install and uninstall a **trusted user-supplied local archive** through the Settings file picker. The existing owner-installed binary and five model assets are SHA-pinned, and native execution retains the earlier supervision/deadline gates. / 支持从用户自备的可信离线包在设置页安装和卸载,保持完整性校验和子进程边界。
|
|
21
|
+
- **The public PP-OCRv6 native archive remains NOT CLEARED FOR REDISTRIBUTION.** This release does **not** host, download or attach worker executables or model weights to npm or GitHub Release; a file picker is **not** an automatic public installer. / 原生包仍未通过公开分发审核,不提供官方公网一键下载,也不会把原生二进制和模型随 npm 打包。
|
|
22
|
+
- Damaged but verifiably plugin-owned PP installations may now be removed safely without relying on intact worker/model hashes; system/unowned paths remain protected. / 插件管理的损坏安装也可卸载,不允许清理无关用户目录。
|
|
23
|
+
|
|
24
|
+
## Fallback, privacy and defaults / 回退、隐私与默认行为
|
|
25
|
+
|
|
26
|
+
- `vision_ocr(auto)` continues to prefer an installed, verified PP-OCRv6 native worker where supported, then available managed/system Tesseract, and then the existing model fallback if local OCR is unavailable/empty. An explicit `engine=tesseract` never invokes the cloud vision chain; explicit `engine=vision` continues to bypass local engines. / 原来的 `auto` 优先级保持,新引擎未安装时不会影响视觉模型后备。
|
|
27
|
+
- **Default free vision fallback may transmit the image (or crop) and request metadata to an external provider.** Installing a local OCR engine does not make the full plugin or the chat model offline. Strict local-only vision continues to prevent the plugin's cloud visual requests; user must also use a local chat model for fully local end-to-end processing. / 云端后备依旧可能传图;严格本地模式按既有策略执行。
|
|
28
|
+
- No automatic first-run downloads, prompt to force-install either engine, change to existing user settings, or automatic Host/profile migration. / 不强制下载、不自动迁移、不更改用户现有设置。
|
|
29
|
+
|
|
30
|
+
## Review evidence and known limits / 审核与限制
|
|
31
|
+
|
|
32
|
+
- **#856 final head `c8d3b9278ec3259862a40926608d139be560aea7`: 14/14 GitHub Actions workflows passed, including two Node full-test versions (24.9.0/24.21.0), complete 28-job CI, exact minimum/recommended/current DSH Host and latest Alpha Host/Desktop gates, security analysis and browser Settings acceptance.**
|
|
33
|
+
- **Real Mac and Windows x64 isolated private install → image OCR → uninstall:** Both passed without altering global packages. Both recognized a generated `HELLO 123` screenshot (confidence 87/88). The Mac Chinese sample `你好世界 123` came back as `你 好 世界 123` (confidence 94), highlighting spacing limitations rather than perfect transcription. / Mac、Windows 真实安装/识别/卸载通过,中文可能出现空格。
|
|
34
|
+
- Existing PP native worker tests are from earlier 3.3.0/isolated work and do not constitute approval of public native asset redistribution, nor do they prove original Issue #836 reporter-specific images were recognized exactly. / 仍不可将实验室验证误当作公开原生包放行。
|
|
35
|
+
|
|
36
|
+
## Compatibility and upgrade / 兼容与升级
|
|
37
|
+
|
|
38
|
+
- DSH `>=0.2.1-rc.5 <0.3.0-0`; Node.js `>=24.9.0`. No support-floor change.
|
|
39
|
+
- Before upgrading, back up DSH Profile, Settings, Sessions and attachments; run the read-only `doctor --upgrade-preflight`; keep `v3.3.0` available as rollback. No automatic migration.
|
|
40
|
+
- Third-party Desktop builders and unreviewed installations are not certified solely by official Host CI. / 第三方打包器需另行验收。
|
|
41
|
+
- Verify the protected release SHA, GitHub Release asset SHA256SUMS and npm tarball identity/provenance before assuming the installed build is v3.4.0. / 以正式工作流和包体哈希为准。
|