Favio8/dsh-plugin-deepeye

DeepEye视觉插件,适用于DeepSeek Harness(DSH):支持图像描述、OCR、VQA、UI布局和剪贴板分析。

Project Overview项目介绍

This is a native Cordis plugin built exclusively for DeepSeek Harness (DSH) that adds visual processing capabilities to text-only large language models. It can be installed through DSH’s profile plugin system as a standard DSH bundle, either via npm for released versions or by linking the local source directory for development. It provides features like image description, OCR text extraction, visual question answering, UI layout analysis, clipboard screenshot analysis, and automatic translation of pasted images even in text-only model sessions. It registers tools directly to DSH’s context without any intermediate MCP layer, so there is no extra overhead for tool calls.

It supports multiple backends including OpenAI GPT-4o, Google Gemini, Zhipu GLM-4V, and any custom OpenAI-compatible endpoint. It comes with built-in tools for smart image preprocessing, LRU result caching, user-friendly error handling, and non-blocking clipboard reading. The plugin automatically injects a system prompt to tell the base model when it should use the available visual tools. It solves a common pain point for DSH users by enabling pasted image messages to work with text-only models, making it ideal for any DSH user that works with images in text-only model sessions. The paste compatibility feature can be configured to off, auto, or force mode based on user preference.

This plugin is released under the open source MIT license. After installation, users need to configure an API key for their chosen visual model backend, which can be set via environment variables or directly in the cordis.yml configuration file. The plugin supports multi-layer API key resolution to make configuration easier for different environments. For local development, the plugin requires pnpm and the sharp native image processing library. If sharp is not installed, the plugin will still run but will not resize or compress images, leading to higher token usage and a one-time warning in the startup log.

这是一个专为 DeepSeek Harness (DSH) 开发的原生 Cordis 插件,为纯文本大语言模型添加视觉处理能力,支持图片描述、OCR文字提取、视觉问答、UI布局结构化分析、剪贴板截图分析,还能实现粘贴图片自动翻译,让纯文本模型会话中也可以直接粘贴图片发送。它是标准的 DSH bundle,可通过 DSH 的 profile 插件机制安装。

它支持OpenAI GPT-4o、Google Gemini、智谱GLM-4V以及任意兼容OpenAI规范的自定义端点,自带智能图片预处理、LRU结果缓存、友好错误处理和非阻塞剪贴板读取,会自动注入系统提示词让模型知道何时调用视觉能力,适合需要在DSH中使用纯文本模型处理图片内容的开发者和普通用户。它还解决了DSH纯文本模型无法发送带图消息的问题,实现了无缝粘贴体验。

本插件遵循MIT开源协议,安装后需要配置对应视觉模型的API密钥,可通过环境变量或cordis.yml配置文件设置,支持多层密钥解析。开发依赖pnpm和sharp原生库,若sharp未安装,插件仍可运行但图片不会缩放压缩,会产生更大的token开销,启动日志会给出一次性警告提示用户安装依赖。用户可以通过修改配置调整缓存大小、超时时间等参数满足个性化需求。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-plugin-deepeye

把 Favio8/dsh-plugin-deepeye 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DeepEye Vision for DSH

为 DeepSeek Harness 提供视觉能力的原生 Cordis 插件。

让纯文本模型获得"眼睛":图片描述、OCR 文字提取、视觉问答、UI 布局分析、剪贴板截图分析,以及粘贴图片自动翻译(在纯文本模型会话里直接粘贴图片也能发)。

特性

  • 原生集成 — 直接注册到 ctx.tools,无 MCP 中间层开销
  • 多后端 — 支持 OpenAI (GPT-4o)、Google Gemini、自定义 OpenAI-compatible 端点
  • 智能预处理 — 自动缩放过大图片、转换 JPEG 以节省 token
  • 结果缓存 — LRU 缓存减少重复 API 调用(含 TTL,键覆盖后端/模型,切换后端不会误命中)
  • 友好错误处理 — 鉴权失败/限流/超时给出可执行的修复建议,不再回显原始 API 报错
  • 非阻塞剪贴板读取 — vision_clipboard 异步读取系统剪贴板(不卡事件循环、可取消),且能区分「剪贴板是文本」「没有内容」并给出引导
  • System Prompt — 自动注入提示段落,让模型知道何时使用视觉能力
  • 粘贴图片兼容 — 纯文本模型(如 DeepSeek)会话中直接粘贴图片,自动翻译成文字后交给模型(见下文 pasteCompat)

安装

本插件是一个标准 dsh bundle(声明了 dsh.bundle.patch),通过 dsh 的 profile 插件机制安装:

# 发布后(npm 安装)
dsh plugin --profile web add dsh-plugin-deepeye

# 本地开发时(从插件源码目录的上一级执行)
dsh plugin --profile web add ./dsh-plugin-deepeye

安装时 dsh 会:

  1. 首次使用自动初始化 profile(含 @deepseek-ai/dsh-base)
  2. 用 pnpm 把本包链接进 profile 目录
  3. 因本包声明了 dsh.bundle,自动追加到 dsh.profile.bundles 层叠

验证与启动:

dsh --profile web --dump-config   # 确认出现 dsh-plugin-deepeye 层
dsh web                           # web 是 --profile web 的别名

配置

API Key 解析优先级

插件支持多层 API Key 解析,用户可以选择最方便的方式:

  1. cordis.yml 显式配置 — config.apiKey: !!js process.env.XXX
  2. 自动环境变量回退 — 根据 provider 自动匹配对应环境变量
  3. 通用变量 — DEEPEYE_API_KEY(适用于所有 provider)
provider 自动回退的环境变量
openai OPENAI_API_KEY
gemini GEMINI_API_KEY
custom DEEPEYE_API_KEY

最简配置:只需设置环境变量,无需在 cordis.yml 中显式写 apiKey:

# .env 或系统环境变量
export OPENAI_API_KEY=sk-xxx
# cordis.yml - 无需 apiKey 字段,自动从 OPENAI_API_KEY 读取
- id: deepeye-vision
  name: 'dsh-plugin-deepeye'
  config:
    provider: openai

使用 OpenAI

- id: deepeye-vision
  name: 'dsh-plugin-deepeye'
  config:
    provider: openai
    # apiKey: !!js process.env.OPENAI_API_KEY  # 可省略,自动回退
    model: gpt-4o                    # 可选,默认 gpt-4o
    # baseUrl: ''                    # 可选,代理或 Azure 端点

使用 Gemini

- id: deepeye-vision
  name: 'dsh-plugin-deepeye'
  config:
    provider: gemini
    model: gemini-2.0-flash          # 可选,默认 gemini-2.0-flash

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-desktop 下一个 Next dsh-minecraft-theme →