Neplich/dsh_plugin--packages-agent-dsh-agent-imagevault ↗★ 1

@neplich/dsh-agent-imagevault

归档工具结果中的图片为普通文件,并通过本地地址在聊天流中展示。 适合需要长期保存并展示工具生成图片的用户;归档目录可手动清理,附件对象不受影响。

包名
@neplich/dsh-agent-imagevault
兼容性
待验证
Harness 依赖范围
^0.1.2-alpha.3
Cordis 依赖范围
^4.0.2
版本
0.1.0
许可证
MIT
最近更新
2026年9月1日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Neplich/dsh_plugin#c83599509c2f790ba23c59b19d90e521fa774c1d&path:packages/agent/dsh-agent-imagevault

@neplich/dsh-agent-imagevault

中文文档

Image archiving and chat-stream display for tool results. Two independent jobs:

  1. Archive — every image block in any tool result (screenshots, read_image, uploads, …) is copied out of the durable attachment store into a plain-file export directory. Source-agnostic: it works with any tool that produces images.
  2. Display — a loopback HTTP server answers GET /sha256:. straight from the content-addressed attachment store, giving every session image a stable URL that lives exactly as long as the session history. The Web GUI's markdown renderer accepts http(s) image URLs, so the agent can embed them (![shot](http://127.0.0.1:9335/sha256:….png)) to show images in the chat stream.

Also registers one tool: imagevault_dir, which reports the display URL pattern and the export directory.

Why not just files?

Chat images (uploads and tool screenshots alike) already live durably in the content-addressed attachment store at $DSH_HOME/attachments/v1/objects/ — that store's lifetime matches the session history. Serving display URLs directly from it means zero duplication and links that never expire with temp-cleanups. The exported plain files are a convenience for opening images locally; they live in a temp directory the OS may clean, which never breaks chat display.

Install

dsh plugin --profile  add @neplich/dsh-agent-imagevault

Config (cordis.yml)

KeyDefaultMeaning
port9335Loopback port for the display HTTP server
exportDir/dsh-image-vaultDirectory receiving archived image files
storeDir$DSH_HOME/attachments/v1/objectsAttachment object root of the local backend

Uninstall

dsh plugin --profile  remove @neplich/dsh-agent-imagevault

Removing the plugin stops the display server and the archive listener. Artifacts:

ArtifactDefault locationCleanup
Exported image files/dsh-image-vault/Left to OS temp cleanup, or delete manually
Attachment objects$DSH_HOME/attachments/Not touched — shared session data owned by the attachment service, not by this plugin

Known limitations

  • The display route reads the local attachment backend's file layout (objects//); with a non-local backend mounted it answers 404 (archiving still works through the public readImage contract).
  • Archived files are a copy — deleting them never affects the session's own images.