hezi2020/dsh-plugin-wiki--plugins-Anionex-dsh-vision-toolkit0

@dsh-external/dsh-vision-toolkit

DSH 原生视觉工具箱:集成图像问答、OCR、目标定位、UI 还原、像素对比、Artifacts 及 Web UI 界面。

AI 分析

核心用途是为 DSH 注入强大的多模态视觉处理能力,适合需要进行图像分析、界面 UI 还原或像素级对比的视觉任务。需配置兼容的视觉模型 API Key。

包名
@dsh-external/dsh-vision-toolkit
版本
0.1.2
许可证
MIT
最近更新
2026年8月14日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hezi2020/dsh-plugin-wiki#0f911a1b7aef331b19607a60c884be50e910c0ab&path:plugins/Anionex-dsh-vision-toolkit

Configuration fields

FieldDefaultContract
provider.baseUrlhttps://api.inferera.com/v1OpenAI-compatible base URL; normalized without trailing slashes
provider.credentialVISION_API_KEYDSH Credential reference, never a secret value
provider.modelgemini-3.6-flashMultimodal model name sent to remote tools
languagezhVision output language: zh or en
timeoutMs60000Whole-operation deadline, 1000-600000 ms; each tool may request a narrower override
maxImageBytes10485760Encoded-byte limit per input image
maxImagePixels40000000Decoded-pixel limit per input image
concurrency4In-flight operations per session, 1-16
runtime.modemanagedmanaged uses the packaged snapshot; external accepts only the exact pin
runtime.agentVisionToolkitPathunsetRequired in external mode; exported exact snapshot or clean pinned Git checkout
runtime.pythonunsetOptional Python 3.11+ bootstrap/interpreter override
allowedDirs[]Additional realpath-resolved input roots; the session workspace is always allowed

Usage patterns

Basic calls

vision_glance images=["screenshot.png"] query="What error is shown?"
vision_ground image="screenshot.png" target="the send button" preview=true
vision_detect image="screenshot.png" category="buttons" preview=true
vision_crop image="screenshot.png" region="1067,841,1108,881"
vision_trace image="icon.png" color=true output="icon.svg"
vision_pixel_diff original="reference.png" rebuilt="actual.png" runName="comparison"
vision_long_screenshot_ocr image="page.png" mode="general" jobs=2
vision_extract_foreground image="logo.png" mode="color"
vision_dominant_colors image="screen.png" region="0,0,600,300" top=8
vision_html_screenshot source="implementation.html" width=1200 height=720

Common workflows are vision_groundvision_cropvision_glance, vision_groundvision_cropvision_trace, and reference image → vision_html_screenshotvision_pixel_diff. Grounding and detection boxes always use original-image pixels (x1/y1/x2/y2).

UI restoration example

The checked-in UI restoration example renders a reference, an intentionally inaccurate first implementation, and the final implementation through vision_html_screenshot, then compares both candidates through vision_pixel_diff:

npm run example:ui-restoration
npm run example:ui-restoration:write

The committed evidence records an initial 6.04% difference across six non-zero worst regions and a final 0% difference with no non-zero worst region. Check mode reproduces the tool path and verifies the committed assets; write mode intentionally refreshes the evidence.