Repository navigation
Releases: GooDAnDReaDY/dsh-vision-bridge
Releases · GooDAnDReaDY/dsh-vision-bridge
Release list
v0.6.22 [DSH v0.2.19]
English
Core Domain Decomposition and Modularization (#438)
- Domain Partitioning: Decomposed monolithic
lib/vision-core.js(1317 lines) into four cohesive, decoupled modules:lib/vision-config.js(338 lines): Schemas (Config),wrapConfig,plainConfig, plugin metadata (name,inject), and model capability predicates (sanitizeAllowed,shouldBridgeForModel,acceptsImages,blocksHaveImage).lib/security.js(439 lines): Settings authentication (isTrustedSettingsRequest,isLoopbackAddress), API key masking and stable label derivation (deriveKeyLabel), path traversal protection (resolveInside,isPathAllowed), SSRF protection (safeFetch,isSafeFetchUrl,isPrivateIp), masking helpers, and bounded body reader (readBoundedBody).lib/providers.js(33 lines): Provider definitions (FREE_VISION_PROVIDERS) and key resolution (resolveChannelApiKey).lib/media-utils.js(504 lines): Sharp transforms (compressImage,stripEXIF,deskewImage,enhanceImage), OCR (runLocalOCR), image inspection, perceptual hashes (contentHash,pHash), and session-scoped attachment isolation (SessionScopedAttachmentMap).
- Transparent Backwards-Compatible Facade:
lib/vision-core.jsreduced to a 14-line facade re-exporting 100% of symbols (48 exports), ensuring zero disruption to existing tools, routes, and tests. - Strict Line Budget Compliance: All hand-written modules strictly comply with the <= 600 lines limit.
- Verification: Added
test/438_vision_core_domains.test.js. 509 tests across 145 suites pass 100% green. Preflight:FAIL=0 WARN=5.
Commit Correspondence
- Gitea commit:
e8ffc72ed7b8dd062492f39257e8ce358a329fa5 - Mirror commit:
c56d230fcafb6d24c7e7c5e8dddbe27a0c494bd5
中文
核心模块领域解耦与模块化 (#438)
- 领域解耦:将原先庞大的
lib/vision-core.js(1317行)解耦重构为4个职责清晰的高内聚领域模块:lib/vision-config.js(338行):配置 Schema (Config)、wrapConfig、plainConfig、插件元数据以及模型能力判定。lib/security.js(439行):设置鉴权、Loopback/Origin 校验、密钥脱敏与指纹生成 (deriveKeyLabel)、路径穿越防御 (resolveInside,isPathAllowed)、SSRF 防御 (safeFetch) 以及请求体边界限制。lib/providers.js(33行):免费模型列表 (FREE_VISION_PROVIDERS) 及 API 密钥解析。lib/media-utils.js(504行):Sharp 图像处理、本地 OCR、尺寸测量、感知哈希 (pHash) 与会话级附件隔离缓存 (SessionScopedAttachmentMap)。
- 100% 向后兼容门面:
lib/vision-core.js简化为 14 行的轻量门面,全量重导出 48 个导出符号,保证所有现有工具、路由及测试零破坏。 - 严格代码行数预算:所有手写模块严格满足 <= 600 行上限规范。
- 全量测试验证:新增
test/438_vision_core_domains.test.js,全套 509 项测试(145 个测试套件)100% 通过。Preflight 检查FAIL=0 WARN=5。
提交对应关系
- Gitea 提交:
e8ffc72ed7b8dd062492f39257e8ce358a329fa5 - 镜像公开提交:
c56d230fcafb6d24c7e7c5e8dddbe27a0c494bd5
Русский
Декомпозиция ядра vision-core по предметным доменам (#438)
- Разбиение по доменам: Монолитный
lib/vision-core.js(1317 строк) разделён на 4 предметных модуля с высокой когезией:lib/vision-config.js(338 строк): СхемыConfig,wrapConfig,plainConfig, плагинные константы, предикаты поддержки моделей.lib/security.js(439 строк): Проверка доверенных запросов и origin, маскирование ключей и генерация стабильных меток (deriveKeyLabel), защита от обхода каталогов (resolveInside,isPathAllowed), защита от SSRF (safeFetch,isPrivateIp), маскирование PII/путей/секретов, ограничение тела запросов (readBoundedBody).lib/providers.js(33 строки): СправочникFREE_VISION_PROVIDERSи разрешение ключей каналов (resolveChannelApiKey).lib/media-utils.js(504 строки): Sharp-трансформации, OCR, размеры, FNV/pHash, сессионная изоляция аттачейSessionScopedAttachmentMap, утилитаbestEffort.
- Прозрачный фасад:
lib/vision-core.js(14 строк) сохраняет 100% обратную совместимость, реэкспортируя все 48 символов. - Соблюдение лимита строк: Все рукописные модули строго удовлетворяют правилу <= 600 строк.
- Проверка: Добавлен тест
test/438_vision_core_domains.test.js. Полный набор тестов: 509 тестов (145 сьютов) — 100% PASS. Preflight:FAIL=0 WARN=5.
Соответствие коммитов
- Gitea commit:
e8ffc72ed7b8dd062492f39257e8ce358a329fa5 - Mirror commit:
c56d230fcafb6d24c7e7c5e8dddbe27a0c494bd5
v0.6.21 [DSH v0.2.19]
English
Client Slot Modernization and Storage Containment (#435)
- Settings Slot Modernization: Retired the dead
settings.plugin.itemslot registration fromlib/client.js. Configuration card now binds exclusively to modern DSH live seats:plugins.row.config(row seat) andplugins.item(Plugins list seat). - Storage Directory Containment: Constrained relative
evidenceDirinlib/storage.js(resolveStorageDir) to the plugin's base storage directory viaresolveInside, preventing directory traversal escapes (../..). - Comprehensive Regression Suite: Added
test/issue-435-audit-dead-slot-storage.test.jsvalidating dead slot retirement and storage directory boundary containment. Full test suite passes 505 green tests across 145 suites.
Commit Correspondence
- Gitea commit:
547fa4e5d4294f162cc6feef6928e761077a6cdd - Mirror commit:
fb93090239edb736a6eedfc4a79d0acaa519930a
中文
客户端设置插槽现代化与存储目录限制 (#435)
- 设置插槽现代化:从
lib/client.js中移除了已停用的settings.plugin.item插槽注册。设置卡片现仅绑定至 DSH 现代活动席位:plugins.row.config(行内设置席位)与plugins.item(插件列表席位)。 - 存储目录边界限制:在
lib/storage.js(resolveStorageDir)中通过resolveInside将相对路径evidenceDir限制在基础存储目录内,阻止目录遍历逃逸(../..)。 - 完整回归测试:新增
test/issue-435-audit-dead-slot-storage.test.js,验证插槽废弃及存储路径安全限制。全套 505 项测试(145 个测试套件)全部通过。
提交对应关系
- Gitea 提交:
547fa4e5d4294f162cc6feef6928e761077a6cdd - 镜像公开提交:
fb93090239edb736a6eedfc4a79d0acaa519930a
Русский
Модернизация слотов настроек и ограничение каталога хранилища (#435)
- Модернизация слотов настроек: Удалена устаревшая регистрация слота
settings.plugin.itemизlib/client.js. Карточка настроек регистрируется только в актуальных посадочных местах ядра DSH:plugins.row.config(строчный слот) иplugins.item(слот списка плагинов). - Ограничение путей хранилища: В
lib/storage.js(resolveStorageDir) относительный путьevidenceDirбезопасно ограничен базовым каталогом хранилища плагина черезresolveInside, предотвращая обход каталогов (../..). - Регрессионные тесты: Добавлен сьют
test/issue-435-audit-dead-slot-storage.test.js, подтверждающий отсутствие устаревшего слота и изоляцию каталогов хранилища. Все 505 тестов в 145 сьютах успешно пройдены.
Соответствие коммитов
- Gitea commit:
547fa4e5d4294f162cc6feef6928e761077a6cdd - Mirror commit:
fb93090239edb736a6eedfc4a79d0acaa519930a
v0.6.20 [DSH v0.2.19]
English
Channels Persistence Error Handling and Rollback Safety (#432)
- Settings Persistence Error Propagation: In
POST /dsh-vision-bridge/channels(lib/routes/config.js), removed silent suppression of persistence failures. Failures fromscope.set('channels', ...)now log vialogger.errorand return HTTP 500 with descriptive error details. - In-Memory Configuration Rollback: Reverted in-memory
config.channelsback to pre-mutation state whenever channel persistence rejects, preventing state desynchronization and data loss across restarts. - Persistence Status Reporting: HTTP 200 channel save response now exposes
persisted: Boolean(...), allowing callers and Web UI to verify physical persistence. - Web UI Diagnostics & Feedback: Web UI checks
persistedflag in channel configuration responses, notifying users if storage lacks persistence, with complete English and Chinese localization. - Regression Suite: Added comprehensive test cases in
test/issue-410-channels-persistence.test.jsverifying error propagation, rollback, and logger calls. All 499 tests pass.
Commit Correspondence
- Gitea commit:
ccf93085c36052569c110a1a08422edaf89906c6 - Mirror commit:
c11af2a57c3c3eaa7b7a365e7a0e95d76f67a41f
中文
频道配置持久化错误处理与状态回滚保护 (#432)
- 设置持久化错误传递:在
POST /dsh-vision-bridge/channels(lib/routes/config.js) 中移除了对持久化失败的静默吞没。底层scope.set('channels', ...)失败时将调用logger.error记录日志并返回 HTTP 500 详细错误信息。 - 内存配置状态安全回滚:当持久化存储失败时,将内存中的
config.channels自动回滚至变更前状态,避免重启后出现数据静默丢失和状态不一致。 - 持久化状态反馈:HTTP 200 响应中增加
persisted: Boolean(...)字段,供调用方和前端界面确认是否已真正写入持久化存储。 - Web UI 状态诊断与反馈:更新 Web UI 频道配置保存逻辑,检查
persisted状态标志,并在未持久化或失败时显示状态徽标,已包含英文和中文多语言支持。 - 回归测试:在
test/issue-410-channels-persistence.test.js中新增了错误传递、内存回滚和日志记录的完整测试用例。全部 499 项测试均通过。
提交对应关系
- Gitea 提交:
ccf93085c36052569c110a1a08422edaf89906c6 - 镜像公开提交:
c11af2a57c3c3eaa7b7a365e7a0e95d76f67a41f
Русский
Обработка ошибок сохранения каналов и откат конфигурации (#432)
- Проброс ошибок сохранения настроек: В обработчике
POST /dsh-vision-bridge/channels(lib/routes/config.js) устранено подавление сбоев сохранения. При ошибке вызоваscope.set('channels', ...)событие логируется черезlogger.errorи возвращается HTTP 500 с подробным описанием ошибки. - Откат конфигурации в памяти: При отказе сохранения каналов в хранилище
config.channelsв оперативной памяти откатывается к исходному состоянию до мутации, исключая рассинхронизацию и потерю настроек при перезапуске. - Индикация статуса персистентности: Ответ HTTP 200 теперь включает флаг
persisted: Boolean(...), позволяя клиентам и Web UI проверять факт физической записи на диск. - Диагностика в Web UI: Web UI проверяет флаг
persistedпри сохранении каналов и информирует пользователя при отсутствии постоянного хранилища (с поддержкой локализации на английском и китайском). - Регрессионные тесты: Добавлены проверки обработки ошибок, отката состояния и вызова логгера в
test/issue-410-channels-persistence.test.js. Все 499 тестов успешно пройдены.
Соответствие коммитов
- Gitea commit:
ccf93085c36052569c110a1a08422edaf89906c6 - Mirror commit:
c11af2a57c3c3eaa7b7a365e7a0e95d76f67a41f
v0.6.19 [DSH v0.2.19]
v0.6.19 [DSH v0.2.19]
Audit Verification Residual Defect Resolution (#429)
- Settings Persistence Reflection & Volatile Metadata (#363, #374, #401): Marked all 49 configurable fields in
lib/vision-core.jsConfigschema with.volatile()to ensure reliable DSH API configuration persistence. Reflected persistence capability (persisted: true/false) inGET /dsh-vision-bridge/config. - Symlink Traversal Containment in
resolveInside(#369, #373, #376): RefactoredresolveInsideinlib/vision-core.jsto isolaterealpathSynclookups, ensuring path traversal escaping the target boundary throws clearPath escapes directoryerrors rather than getting suppressed byENOENThandling. - Cache Key Parameter Granularity for
detail(#377): Addeddetail(auto/low/high) into the cache key derivation inlib/cache.jsandlib/vision-pipeline.js, ensuring detail variations do not collide or share cache entries. - Suppression of Local Disk Bypass on DSH FS Denial (#380): In
lib/image-resolution.js, whendshFs.readBytesfails or denies access, immediately returnnullinstead of falling back to directreadFileSyncfrom local storage. - PNG Decoder Hardening (#383): Enhanced
decodePnginlib/image-processing.jswithzlib.crc32validation for IDAT chunks, rejection of invalidfiltervalues (< 0 or > 4) and unsupported interlacing (interlace > 0), and enforcement of maximum decompressed byte boundaries. - Accurate Preprocessed State Reporting (#384): In
lib/image-processing.jssmartOptimizeImage, reportpreprocessed: falseand surface descriptive warnings when downscaling is requested butsharpis unavailable. - Execution Context Session Isolation (#379): Extracted execution context
sessionIdacross analysis, OCR, document, and grounding tools (lib/tools/analysis.js,lib/tools/grounding.js,lib/tools/document.js,lib/tools/ocr.js) and passed it toattachmentById.get(id, sessionId)to prevent cross-session attachment leaks. - Multi-Channel Provider Routing in
vision_compare(#387): Routedvision_comparethroughcallVisionModelWithBytes, honoring configured HTTP providers and channel fallbacks instead of bypassing to catalog streams. - Strict Boolean Type Validation for Tool Assessments (#394): Enforced
typeof parsed.passed === 'boolean'invision_audit_accessibilityandvision_verify_generated_image, rejecting string"true"/"false"evaluations. - Comprehensive Regression Suite: Added
test/429_audit_residual_fixes.test.jsvalidating all 9 domain defect areas, bringing full test suite to 497 green tests across 144 suites.
SHA Correspondence
- Gitea commit:
08d4c55311e492c6ad1239f67ca7c188b77a1211 - Public sanitized commit:
10fec8f0e7537db681229aa96da774cd337ec384
v0.6.18 [DSH v0.2.19]
v0.6.18 [DSH v0.2.19]
Diagnostics Logger & Facade Modularization (Block 8)
- Host Diagnostics Logger Integration (#366): Routed all host-side diagnostics and error reporting through the DSH plugin logger (
getLogger(ctx, 'vision-bridge')) instead of bareconsole.*calls acrosslib/image-processing.js,lib/vision-core.js,lib/tools/*, andlib/index.js. Browser-side diagnostics inlib/client.jspreserved intact. Addedtest/366_host_logger_diagnostics.test.jsenforcing zero host-sideconsole.*calls. - Modularization of Facade Monolith (#412): Decomposed monolithic
lib/index.js(previously ~1600 lines) into focused single-responsibility domain modules:lib/agent-boundary.js:agent/pre-stepimage sanitization,llm/streambackstop, and modality bridge.lib/vision-pipeline.js: multi-channel routing, model selection, pHash & LRU caching, and complexity classification.lib/image-resolution.js: attachment and filesystem image resolution (resolveImageBytes&resolveSourceBytes).lib/journal-evidence.js: in-flight batch manager, audit journal, and evidence persistence.lib/storage.js: storage directory resolution and persistence probing.lib/provider-discovery.js: Ollama and free provider auto-discovery.lib/routes-deps.js: HTTP route registrations wiring.- Shrank
lib/index.jsdown to 553 lines (< 800 lines criterion), maintaining 100% test coverage with 488 passing tests across 143 suites.
v0.6.17 [DSH v0.2.19]
Release v0.6.17 [DSH v0.2.19]
Flagship multimodal vision hub for DeepSeek Harness: WebUI localization, client lifecycle disposers, composer attachment bindings, design contract modernization.
What's Changed
- #399 (fix(i18n)): Wired complete Chinese dictionary (
zh) and slot translatorprops.tto WebUI inlib/client.js. Supported flexible parameter signatures inmakeT, delegating to companion translator first, resolving Chinese locales, and falling back to English. - #400 (fix(client)): Cleaned up global DOM event listeners (
document click,window dragover/drop,lightbox keydown) and locale disposer on unmount; resetappliedand global window flags on unmount. - #408 (fix(composer)): Bound PDF import pages directly to composer
inputActions.addAttachments(attachmentIds)and fallback eventdsh:add-attachments, eliminating plaintext[Attachment: ...]string injection intotextarea.value. Localized PDF toasts in English and Chinese. - #402 (docs(design)): Modernized internal
docs/design/DESIGN.mdspecification to mandate DSH 0.2plugins.row.config(@goodandready/dsh-vision-bridge#dsh-vision-bridge) withctx.configForms(update(),page/summaryviews), keepingsettings.plugin.itemstrictly as legacy fallback. Preserved owner policy excluding internaldocs/from npm and git. - #403: Confirmed public GitHub mirror parity with npm release at 0.6.16.
- CI Guards: Guarded optional host Chrome and Tesseract OCR executions in test suites 404, 406, and 407 to skip gracefully in containerized CI environments without external binaries.
Validation
- 486 unit and integration tests passing across 143 suites (
npm test). - Zero Cyrillic characters in
lib/. - Zero unannotated empty catch blocks.
Package and Mirror Correspondence
- npm:
@goodandready/dsh-vision-bridge@0.6.17 - Gitea:
8fc025c3203e87c5400c1a6754ca5db37c24319d - GitHub:
04b1dc5a450e44a7df8b0c3934dd08d0a938cc3e
v0.6.16: Agent Tools & Export Correctness (Block 6)
Bug Fixes & Improvements
- Agent Tools & Export Correctness (Block 6):
- Canonical English OCR Default & Language Discovery (#404): Replaced hardcoded
rus+eng/eng+ruslanguage defaults inrunLocalOCR,vision_ocr, andvision_ocr_localwith canonical English ('eng'). Added dynamic host capabilities discovery viagetTesseractLanguages()(tesseract --list-langs). Added normalization and aliases for Chinese language packs (zh,zh-cn,chinese->chi_sim,zh-tw->chi_tra). Provided graceful fallback to vision LLM with informative warnings when requested language packs are missing invision_ocr, and truthful reporting invision_ocr_local. AddedocrLangconfiguration option. - Truthful Contract for vision_export_report (#406): Fixed
vision_export_reportwhen givenformat: 'pdf'to generate genuine%PDF-document artifacts via headless Chrome, publishing the artifact withreport.pdffilename andapplication/pdfmediaType. Alignedoutput.schema(report,format,filename,mediaType,attachmentId), and enforced strict format validation rejecting unsupported formats with clear errors. - Full-Page Screenshot Beyond Fixed Viewport (#407): Enhanced
vision_html_screenshotto honorfullPage: trueby measuring documentscrollHeightdynamically and capturing the complete document beyond the fixed 1024 viewport height using Chrome CDP (Page.captureScreenshot,captureBeyondViewport). Kept standard 1024 viewport clipping whenfullPage === false.
- Canonical English OCR Default & Language Discovery (#404): Replaced hardcoded
Refs: #404, #406, #407
v0.6.15
Release v0.6.15: Channel pipeline, routing, resilience & cancellation (Block 5 fixes: #386, #387, #388, #397, #398, #405)
v0.6.14
Release v0.6.14 (Block 4: Output Schemas, Truthfulness, Security Trust & Harness Contracts)
v0.6.13 [DSH v0.2.0-rc.1]
@goodandready/dsh-vision-bridge v0.6.13 [DSH v0.2.0-rc.1]
Overview & Purpose
Production release v0.6.13 delivers Block 3: Cache Identity, Bbox Normalization, Pixel Diff, Crop Parsing, and Quality Metrics, ensuring accurate caching across varied prompts and modes, deterministic bounding box scaling across resolutions, exact alpha-aware visual diffing, and authentic image quality diagnostics.
Key Changes & Bug Fixes
1. Cache Identity & Null Cache Safety (#377, #378)
- Task-Specific Perceptual Cache Keys: Prevented
pHashcache cross-contamination on identical images by generating perceptual cache keys incorporating prompt, model, mode, and promptVersion (pHashKeyFor). Different prompts or modes on identical image bytes no longer return stale answers from previous tasks. - Null Cache Guarding: Added null-guards on
descriptionByHashacross all lookups and writes whenconfig.cacheEnabled === false, eliminatingTypeError: Cannot read properties of null (reading 'has').
2. Vision Crop Parsing & Attachment Cap Enforcement (#390, #409)
- Deterministic Numeric Bbox Parsing: Corrected regex in
vision_cropfrom^s*\[?s*dto^\s*\[?\s*-?\dand supported numeric array/string coordinates, preventing unnecessary VLM grounding on deterministic regions and rejecting invalid coordinates. - Enforced 300 Attachment Cap: Routed crop and annotate attachment writes through
recordAttachment()instead of rawattachmentById.set(), strictly enforcing the 300-entry capacity limit and preventing memory leaks of image buffers.
3. Bbox Normalization Consistency (#391)
- Resolution-Invariant Bbox Scaling: Removed dimension-based heuristics (>1000px vs <=1000px) and axis-swapping in
normalizeBbox(). Standardized 0..1000 and 0..1 scale preservation across arbitrary resolutions while supporting explicit pixel units for rect objects and unit options.
4. Pixel Diff Alpha, Tolerance=0 & Dimension Mismatch (#392)
- Alpha Channel Awareness: Factored alpha channel differences (
da) into pixel comparison, detecting transparency regressions. - Strict Tolerance=0: Honored explicit
tolerance: 0without fallback to default 30. - Consistent Dimension Mismatch Metrics: Fixed dimension mismatch calculation to maintain consistent
totalPixelsanddiffPixels, stripping undeclared properties to comply with the tool output schema.
5. Optimizer Auto Format & Deterministic Quality Measurements (#393, #395)
- Fixed Undeclared Variable: Resolved undeclared
autovariable insmartOptimizeImage()image compression options (format: options.format || 'auto'), eliminating runtimeReferenceError. - Authentic Quality Diagnostics: Enhanced
analyzeImageQuality()to perform genuine decoding (PNG or via sharp for other supported formats) and throw on corrupt/invalid input instead of fabricating constant 50/50/100 fake metrics with undeclared note properties.
Quality Gates & Verification
- Full Test Suite: 421 tests passing (
npm test). - New Test Coverage:
test/issue-377-cache-identity.test.jstest/issue-390-crop-and-attachment-cap.test.jstest/issue-391-normalize-bbox.test.jstest/issue-392-pixel-diff.test.jstest/issue-393-optimizer-and-quality.test.js
- Preflight: Verified zero Cyrillic in
lib/and zero unannotated catch blocks. - npm Package: Published
@goodandready/dsh-vision-bridge@0.6.13(29 files, 131.4 kB). - Public Mirror: Synchronized with GitHub
GooDAnDReaDY/dsh-vision-bridgetagv0.6.13.
Related Issues & PRs
- Block 3 PR: #417
- Release PR: #418
- Issues closed: #377, #378, #390, #391, #392, #393, #395, #409