DeepSeek Harness Plugin

YangRuiYangDan/dsh-media-card

Stars ★ 0 Downloads (30d) 828 Category Tools & Capabilities Added 2026-10-17 npm dsh-media-card

Show local images and short videos in the DSH conversation card with one-click download of the original file, or offer any other local file for download; works over local and remote connections and keeps the media itself out of the model's vision context.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-media-card

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:YangRuiYangDan/dsh-media-card

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Show a local image or short video in the current DeepSeek Harness conversation card, with one-click download. Works on local and remote connections.

简体中文 · MIT · Tutorial

Community plugin for DeepSeek Harness. Not an official DeepSeek AI product.

Conversation markdown still will not render a local file:// or Windows path. Official read_image remains the model-vision path. This plugin is for the human sitting at the card — preview and download.

Features

Tool dsh_show_media · one argument file_path
Images PNG, JPEG, WebP, GIF
Videos MP4, WebM, MOV, M4V, MKV · 64MiB cap
Display inline original-file preview (not the official attachment downsample)
Download every card carries a ⬇ Download link saving the original file
Preview click the image (or the video frame) · Esc / backdrop / × closes
Remote works over a GET preview endpoint, so it is usable over LAN / tunnel / public hub remote connections
Scope this conversation card only · does not occupy shell.overlay

Compared to 0.1.0: switched to a GET inline/download endpoint so remote connections work; fixed host and browser dependency resolution (inject); removed the flaky POST RPC channel and internal diagnostics.

Relative paths resolve against the session workspace.

{ "file_path": "C:\\path\\to\\photo.webp" }

Install

From npm (published):

dsh plugin --profile web add dsh-media-card

From GitHub (no build step — lib/ is the source):

dsh plugin --profile web add github:YangRuiYangDan/dsh-media-card

Or a local checkout:

dsh plugin --profile web add /path/to/dsh-media-card

Restart web, then ask the agent to show a local file.

What it does

  • The agent calls dsh_show_media; the card inlines the original media and offers a download link.
  • Images follow the deployment's attachment limit; videos cap at 64MiB (DEFAULT_VIDEO_CAP).
  • Click the image or the video frame to open a larger preview.

Security

  • The server trusts loopback plus the deployment's configured trusted hosts (the same principle as dsh's own /api) — so it does not depend on any specific remote-access plugin, and works with any setup that can reach dsh.
  • Only image/video extensions are accepted, and reads are size-capped.
  • This is not an auth layer; protect remote access with whatever protects your dsh deployment (rdsh gateway pairing/login, reverse-proxy auth, tailscale, etc.).

What this is not

  • Not a replacement for read_image (model vision still uses the official path).
  • Not a process-wide floating overlay.
  • Not a second gallery. It only customizes the dsh_show_media tool card.

Development

Host: lib/index.js (defineTool + GET preview/download endpoint).
Client: lib/client.js (window.__ModuleLoader__, keyed tool.call.toolview).
Shared: lib/media.js.

node --check lib/index.js && node --check lib/client.js && node --check lib/media.js

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.