前言¶
在 DeepSeek Harness(DSH)中,如果希望 agent 能读取屏幕内容或描述图片,可以把视觉能力作为工具挂入现有会话。下面介绍的 dsh-tool-eyes 就是这类本地视觉“眼睛”插件。
它提供两个工具:screen 用于视觉描述,ocr 用于文字提取。
这是什么¶
dsh-tool-eyes 是 go-farther-and-farther 维护的 DSH 插件,许可证为 MIT。
它解决的核心问题是:在 Windows 环境下,让 DSH agent 能调用本地视觉端点描述屏幕或图片,或调用 Windows 内置 OCR 引擎逐字提取文本。
核心功能¶
screen¶
screen 捕获屏幕或描述已有图片文件,经本地 OpenAI-compatible 视觉端点返回文字描述。
它接受可选 image 路径;不提供时捕获屏幕。
screen 的提示词要求视觉模型只描述可见内容,降低小模型名称幻觉。
本地优先方面,screen 可指向本地端点,使图片不出本机。
ocr¶
ocr 使用 Windows 内置 OCR 引擎逐字提取文本,零模型、零 GPU、零云端。
它也接受可选 image 路径;不提供时捕获屏幕。
ocr 完全本地,无网络。
安装与启用¶
先确认环境要求:
- Windows 10/11
- Node.js >= 22.19
- DeepSeek Harness >= 0.1.0-rc.6
screen需要任一 OpenAI-compatible VLM endpoint,例如llama.cpp、LM Studio、Ollama或任意网关
该包仅发布在 GitHub,不在 npm。安装命令如下:
dsh plugin --profile web add https://github.com/go-farther-and-farther/dsh-tool-eyes
安装后重启 dsh web,screen 和 ocr 工具会自动出现在 agent toolkit。
配置¶
如果需要指定 screen 使用的视觉端点,可以在 profile 的 cordis.patch.yml 中按 id tool-eyes 配置 baseUrl、model、timeoutMs。
结构示例如下:
- id: tool-eyes
name: 'dsh-tool-eyes'
config:
baseUrl: <baseUrl>
model: <model>
timeoutMs: <timeoutMs>
其中 baseUrl 指向 OpenAI-compatible 视觉端点,model 用于指定模型,timeoutMs 用于指定超时参数。
典型用法¶
在对话中,可以这样使用:
- 让
screen回答what is on my screen?或describe this image file,并可加prompt聚焦区域或细节。 - 让
ocr执行read all the text on screen或transcribe this error dialog。
两者都可传 image 路径;不传则截图。
插件捆绑了 lib/capture.ps1 与 lib/ocr.ps1,也可独立运行:
powershell -NoProfile -ExecutionPolicy Bypass -File lib\capture.ps1 -Prompt "<focus>" -BaseUrl <baseUrl>
powershell -NoProfile -ExecutionPolicy Bypass -File lib\ocr.ps1 -Image <image path>
capture.ps1 可带 -Prompt 和 -BaseUrl 参数,ocr.ps1 可带 -Image 参数。
适用场景与注意¶
适合以下情况:
- 在 Windows 10/11 上使用 DSH,并想让 agent 读取屏幕文字或描述图片。
- 希望
ocr完全本地、无网络。 - 希望
screen指向本地端点,使图片不出本机。
注意:
screen会将捕获图片发送到配置的baseUrl。- 插件以当前 dsh 进程权限运行。安装前应检查源码与许可证;当前许可证为 MIT。
结尾¶
经过上面的步骤,dsh-tool-eyes 可以给 DSH agent 增加两个本地视觉工具:screen 负责描述,ocr 负责逐字提取。
GitHub:https://github.com/go-farther-and-farther/dsh-tool-eyes
目录页:当前未提供可确认链接。