Skip to main content

dsh-image-bridge

5Stars0Forks0Issues0Watchers

Provides image bridging for DSH Web plain text model: saves pasted images to local paths and rewrites them as text markers for sending, allowing the model to independently call visual tools from its directory to view images.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
dsh-plugindsh-plugin-marketdsh-plugin-verifydsh-pluginsimageocrvision

Install

cmdweb profile
$ dsh plugin --profile web add @kbpoyo/dsh-image-bridge

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin kbpoyo/dsh-image-bridge for me: review the repository at https://github.com/kbpoyo/dsh-image-bridge first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Provides image bridging for pure text models in DSH Web that don't support native image input: saves pasted images to a hidden directory in the session workspace, and replaces the native image with text containing the path and instructions for the model to call visual tools itself.

Core Features

  • Injects a "Bridge & Send Image" button to the right of the input box in pure text model sessions (automatically hidden for multimodal models)
  • Intercepts send/enter: in pure text models, messages containing images are automatically rewritten to bridge text before the native gate, equivalent to using the button
  • Images are saved to the hidden directory <cwd>/.dsh-image-bridge/ in the session workspace, with filenames containing timestamp and sequence number
  • Validates quantity, media type, and single/total size according to host attachments.imageLimits
  • Bridge text explicitly tells the model to first look at vision/OCR/grounding tools in its own directory, with zero skill binding
  • Auto-cleanup: 24-hour TTL, cleans up oldest files first when total size exceeds 512 MB, inspection every 6 hours

Technical Implementation

  • Language: JavaScript (ES Modules, type: "module"), client-side uses React
  • Key Dependencies: zod (Wire contract schema), @deepseek-ai/dsh-typert-protocol (Host/Client RPC bridge), @deepseek-ai/cordis ^4.0.1
  • Architecture: Server registers TypertRemoteService exposing bridgeState / bridgeSend two RPCs, and wraps apiProxy.sessions.prompt to automatically rewrite image-containing messages before the native gate; client registers button in conversation.input.right slot, calls host typert endpoint via connection.rpc, subscribes to modelDirectories store + 1s fallback polling to sense model switching
  • Entry Files: lib/index.js (server Cordis plugin), lib/client.js (browser-side ModuleLoader injection), lib/typert.js (Wire contract schema), cordis.patch.yml (DSH bundle patch)

Use Cases

Use when you want a pure text model (lower cost or no vision tier) to view images: after pasting an image, click "Bridge & Send Image" or press Enter, the plugin saves the image locally, tells the model where the image is via text marker, then lets the model call its own vision capabilities. Suitable for users who want to reuse existing session models without switching to expensive multimodal models, and the model already has vision skills/tools configured.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH>= 0.1.0-rc.6peerDependencies declares @deepseek-ai/dsh-typert-protocol ^0.1.0-rc.6, bundle patch auto-mounts via dsh plugin add
Node.jsNot declaredpackage.json doesn't declare engines.node
PlatformCross-platformRestrictions come from host workspace and sandbox service availability; this plugin doesn't declare os/cpu in package.json; client injection platform is web (DSH Web profile)
Native ModulesNoneNo native module dependencies; image file writing and cleanup both go through host shell service (base64 -d / file -b / find / du)

Installation

dsh plugin --profile web add github:kbpoyo/dsh-image-bridge

Configuration

This plugin requires no additional configuration. cordis.patch.yml has config: {} as an empty object; all runtime parameters (bridge directory root, cleanup TTL/limit, model capability query, message path and size extraction) are obtained from host services (sandboxPolicy.workspaceRoot, attachments.imageLimits, llm.resolveModelInfo).

FAQ

Q: Is there anything I need to configure before using it after installation?

A: No. config in cordis.patch.yml defaults to empty; after npm install, restart dsh web to take effect. A "Bridge & Send Image" button will appear when pasting images in pure text model sessions; you can also run dsh --profile web --dump-config to confirm the plugin configuration layer is mounted.

Q: What image formats and sizes are supported?

A: Follows host attachments.imageLimits configuration: supports PNG / JPEG / WebP / GIF (other image/* types fallback to saving as .png), single file size, total message size, and image count per message are all defined by the host; the button performs full validation against these limits on click, exceeding limits shows an error directly without sending.

Q: Where are the temporary bridged images stored? Will they stay forever?

A: Saved to the hidden directory <cwd>/.dsh-image-bridge/ under the current session workspace (starts with dot, not shown by default file managers). Files not accessed for over 24 hours are automatically deleted; when total directory size exceeds 512 MB, oldest files are cleaned up first; the directory is also cleaned when the plugin is uninstalled. Manually deleting the directory has no effect; it will be automatically recreated on next bridge.

Q: Will the button disappear after switching to a multimodal model?

A: Yes. The client subscribes to the official model directory store (event-driven) with a 1-second fallback polling, and the button is hidden immediately upon switching; in multimodal mode, images go through native sending, the plugin stays completely silent without interception or rewriting.

Q: Can the model really "see" the images? Do I need to specify visual tools?

A: It depends on whether the model's own directory has vision-type (general VQA), OCR, or grounding tools—the plugin doesn't bind or call any specific tools, only states in the text marker "first check currently available skills and tools then call". You don't need to specify tools; if the model directory has no vision capability, it will honestly say "please install vision skills or switch to a multimodal model".

Q: The button keeps showing in custom provider's pure text model, what should I do?

A: The adapter only reports as multimodal when the model declares input: ['text','image'] (or actively reports image capability). Custom providers configured in settings that don't have input in the model declaration are reported as pure text by the adapter—the plugin faithfully reads this. This is a configuration layer fact, not a bug. The solution is to add input: ['text','image'] in the model declaration, or switch to an adapter-managed directory with correctly reported capabilities.

Q: Can I switch back to pure text model after sending images?

A: No, this is a DSH native restriction (once the session log contains native images, switching back to pure text model is forbidden). To switch back, you need to run /compact or start a new session; this plugin doesn't bypass this restriction.

Q: Will images sent from parent agent to subagent automatically bridge?

A: No. Image-containing messages from parent to subagent don't go through session.prompt; this plugin's apiProxy.sessions.prompt wrapper only covers main session sending; subagent image sending still hits the native gate MODEL_DOES_NOT_SUPPORT_IMAGES.

Getting Started Difficulty

Beginner — users only need to paste images in the Web client and click the button (or press Enter), no configuration needed; effects are visible immediately after installation, model capability detection and switching awareness are automatically handled by the plugin.

Known Issues & Limitations

  • For custom providers (settings config), if the model declaration doesn't include input: ['text','image'], the adapter reports as pure text, the bridge button shows faithfully—you need to add input field in the model declaration (README.md:87-89)
  • Cannot switch back to pure text model after sending native images (DSH native restriction), needs /compact or new session, plugin doesn't bypass (README.md:90)
  • Parent to subagent image sending is not covered: subagent path doesn't go through session.prompt, still uses native gate (README.md:91)
  • If apiProxy.sessions.prompt is not available at startup (host load timing), auto-bridging is skipped (only button flow still works), a console line will be printed explaining this (lib/index.js:307-309)
  • Any bridge failure (bridge directory not writable, disk full, etc.) falls back to native behavior and logs error to console; the frontend onClick path shows an error message (lib/index.js:166-171 / lib/client.js:201-205)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/kbpoyo/dsh-image-bridge)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory