DeepSeek Harness 插件

vision-translation

Native dsh (DeepSeek Harness) Cordis plugin adapter for vision-translation: grounds images into <vision-context> via the Python CLI (PROTOCOL v1). Spawns cli.py, never re-implements core logic.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
BingL-Li/vision-translation
最近更新
2026年8月20日
分类
视觉与多模态
GitHub stars
0
载体类型
plugin
包路径
adapters/dsh
目录证据
上游声明已找到 dsh.bundle
证据路径
adapters/dsh/package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/BingL-Li/vision-translation/tree/HEAD/adapters/dsh
插件名:vision-translation
作者:BingL-Li

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

vision-translation-dsh — native dsh adapter

A native dsh (DeepSeek Harness) Cordis plugin that lets any dsh profile ground images through the [vision-translation](../../README.md) pipeline. It registers one tool, vision_translate, and returns a structured <vision-context> block that the main model reasons over.

> Chosen npm package name: vision-translation-dsh (checked free on the > npm registry at implementation time via npm view vision-translation-dsh). > This adapter lives in the repo at [adapters/dsh/](.). For an MCP-based > alternative see [adapters/mcp/](../mcp/).

Discoverability (official dsh plugin tag)

Per the dsh README, plugin repos get discovered through the dsh-plugin topic and the npm keywords of the published package. This adapter ships the required tags:

  • GitHub topic: dsh-plugin (add it on the repository's About/Topics page).
  • npm keywords: dsh, dsh-plugin, deepseek-harness,

deepseek-harness-plugin, cordis, cordis-plugin, vision, vision-translation, visual-primitives, mcp, grounding.

The dsh profile installs the plugin by package name (vision-translation-dsh) via the [bundle patch](#install), so discoverability does not affect the plugin id or tool id (vision-translate).

How it works

The plugin is the thin non-Python shell the architecture prescribes ([ADAPTERS.md](../../ADAPTERS.md), [CONTRIBUTING.md](../../CONTRIBUTING.md)):

dsh agent ──tools──▶ vision_translate(image, question?, model?, max_objects?)
                          │  (uses the dsh attachment ref directly)
                          ▼
                    spawn `python cli.py`  (PROTOCOL v1 stdin envelope)
                          │  b64 envelope (attachment) or image.path
                          ▼
                    core (vision_translation.py) → <vision-context>

Key difference vs the MCP preset: the dsh Web UI hands images to the model as ImageBlock attachments — an opaque sha256:<hex> reference, not a file path. A stdio MCP tool can only ever receive strings, so the MCP path cannot see Web-uploaded images. This native plugin resolves the ref through ctx.attachments.readImage and ships the bytes to the CLI over a stdin b64 envelope — no shared filesystem required. This is the host integration the ADAPTERS.md registry marks as the native-plugin trigger.

Install

With a dsh workspace, add the package as a profile dependency and merge the bundle patch:

npm add vision-translation-dsh          # or pnpm add / yarn add

Then append the - insert: block from [cordis.patch.yml](cordis.patch.yml) to your profile's cordis.patch.yml (e.g. ~/.dsh/profiles/web/cordis.patch.yml) or mount it as a deployment bundle patch. The block registers the plugin row id: vision-translate for the vision-translation-dsh package.

Zero runtime dependencies; the only peer packages are dsh's @deepseek-ai/dsh-tools and @deepseek-ai/dsh-attachment, which any dsh profile already provides.

Profile configuration

config keydefaultmeaning
cliPath"" (auto)Absolute path to cli.py. Resolution order: cliPath → env VISION_TRANSLATION_CLI → package-relative ../../cli.py (in-repo adapters/dsh layout).
pythonBin"python3"Python binary used to run cli.py.
toolCallTimeoutMs120000Cooperative tool-call timeout; also the CLI kill timer.

Merging via the bundle patch:

- insert:
    - id: vision-translate
      name: vision-translation-dsh
      config:
        cliPath: ""            # "" = auto-detect
        pythonBin: "python3"
        toolCallTimeoutMs: 120000

Tool usage

vision_translate(image, question?, model?, max_objects?)

  • imagerequired. A local absolute/relative file path or a dsh

image attachment reference (sha256:<hex> / attachment:sha256:<hex>).

  • question — optional guiding question for the parse focus.
  • model — optional auxiliary VLM override (empty → the CLI's default chain).
  • max_objects — optional primitive cap (1..16, default 16, clamped).

Returned value is a string: the <vision-context> text when vision succeeded, or an explicit vision unavailable (reason: …) message when it could not produce context (no key, VLM down, …). When the result says vision is unavailable, tell the user you cannot see the image — do not guess or fabricate it. error states surface as a failed tool call.

Comparing with the MCP preset

axisMCP preset (adapters/mcp/)native plugin (this adapter)
image inputlocal file path onlyfile path or dsh attachment ref (Web uploads work)
processone stdio MCP server per hostspawns python cli.py per call only; no server
lifecyclelong-lived server processCordis plugin, HMR with the profile
bytesCLI reads the fileb64 stdin envelope for attach-ments; path for files
depsmcp + venvzero runtime deps (peer-only)

Privacy

  • Images are sent to the configured OpenRouter auxiliary VLM (default

xiaomi/mimo-v2.5) by the Python core. See [vision_translation.py](../../vision_translation.py).

  • The API key is never hardcoded or read by this plugin. The CLI resolves

it itself, in order: process env OPENROUTER_API_KEY, ~/.hermes/.env, or ~/.env (see cli._ensure_key / PROTOCOL.md).

  • No image bytes, OCR text, or full request is written to logs.

Development / test

Node ≥ 20 required (uses node:test). Tests are offline and dependency-free:

cd adapters/dsh
npm test        # = node --test "tests/**/*.test.js" (Node ≥ 20 built-in glob)

npm pack --dry-run verifies the publishable tarball (only lib/, cordis.patch.yml, README.md package.json contents).

License

MIT © 2026 Binglun Li. See [LICENSE](LICENSE).