A lightweight, general-purpose attachment Dock for DSH: paste, drop, or choose images, PDFs, documents, archives, code, and other files, review and manage them before sending, then pass them to the Agent as local paths. It gives non-image files a consistent attachment entry point.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-paste-to-path
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Johnny-xuan/dsh-paste-to-path
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
A universal attachment dock for DSH.
English | 简体中文
[!IMPORTANT] Final release — v0.0.7
DSH now provides an official generic-file attachment pipeline, so the compatibility gap this plugin was created to fill has been closed. Version
0.0.7is the final release; no further versions are planned.DSH Native owns ordinary files and images by default. Enable Take over DSH Native attachments only when you explicitly want the classic path-backed P2P workflow. Long-text conversion remains independently available.
The rest of this README documents the classic P2P workflow available when takeover is enabled.
dsh-paste-to-path adds a general-purpose attachment Dock to the DSH Web composer.
Paste, drop, or choose images, PDFs, Word and Excel documents, archives, code, logs, and other files, then review and manage them together before sending.
The DSH 0.1.2-rc.1 Web composer has a native image attachment path, but PDFs, Office documents, archives, and other formats do not have the same model-independent entry point. Even an image may fail when the selected model does not support image input or the active adapter is text-only.
dsh-paste-to-path does not extend the model's native content types. It takes a simpler route:
File
↓
DSH Host
↓
Local path
↓
Agent
↓
Your own tools
Send images to your own vision tool, PDFs to a document reader, and archives to shell or extraction tools.
The plugin owns attachment intake, management, and path delivery. Your Agent tool stack decides how to read the file.
Path flow at a glance
What it does
Universal attachment Dock
Paste, drop, or choose a file and an attachment card appears above the composer. The plugin's paperclip button accepts any file type and routes it through this Dock rather than DSH's native image rail.
Each card shows the file name, size, category, and path. You can remove it before sending.
Images also have thumbnails and lightbox previews.
File-manager clipboard support
The plugin catches every real File object exposed by the browser, including empty files. It can also turn a pasted file: URI or absolute path into a card when that path already exists on the DSH Host.
Path conversion is transactional: every candidate path must exist on the DSH Host. If any candidate is unavailable, the original clipboard text is pasted normally without an attachment error or a partial conversion.
Browsers do not consistently expose non-image files copied from Windows Explorer, Finder, or Linux file managers. If the paste event contains neither file bytes nor a usable Host path, an ordinary web page cannot reconstruct the hidden OS clipboard entry. To address Issue #2, the plugin reads Explorer's FileDropList at this point when DSH runs on a local Windows Host through a direct localhost connection; remote clients never access the Host clipboard. In other cases, use the plugin's paperclip button or drag and drop. A path from a remote browser's device is not a path on the DSH Host.
One flow for many file types
Images, PDFs, Office documents, code, logs, archives, and other binary files all use the same attachment flow:
File → Save on Host → Path reference → Agent
You do not need a separate model-input protocol for every file type.
Turn long pasted text into an attachment
Normal text still pastes normally.
When pasted content crosses the configured threshold, the plugin can save it as a .txt file instead of putting tens of thousands of characters directly into the composer.
The default threshold is 8000 characters.
Edit text files before sending
Text and code attachments can be edited directly in the Dock when they are below the configured size limit.
The default limit is 1 MiB.
Open files with the system application
For a local DSH deployment, the authenticated session.openWorkspacePath Remote API can open an attachment with the system's default application.
Installation
Install into a DSH Web profile:
dsh plugin --profile web add dsh-paste-to-path
You can also install the current GitHub branch directly:
dsh plugin --profile web add github:Johnny-xuan/dsh-paste-to-path
Restart DSH after installation:
dsh web
The package includes a dsh.bundle manifest, so the required loader patch is loaded with the plugin.
How it works
When you paste, drop, or choose a file, the plugin catches it and saves a private copy on the DSH Host:
<workspace>/.dsh/pastes/<category>/
The composer does not contain the file's contents. It keeps an attachment reference instead.
If you paste an absolute path that already exists on the DSH Host, the plugin links that existing file instead of copying it. Linked files are never editable from the Dock.
When you send the message, DSH's reference codec expands that reference into a short path instruction:
Paste / drop file
│
▼
Save on DSH Host
│
▼
Attachment Dock
shows the file card
│
▼
Send message
│
▼
reference codec
creates a path instruction
│
▼
Agent receives the path
│
▼
Uses an available tool to read it
The implementation uses DSH's extension mechanisms:
conversation.input.dockconversation.input.left- input-trigger reference codec
settingsScope
No DSH core modification is required.
What the Agent receives
The plugin does not put file bytes in the initial model request.
For example, a PDF expands to:
Document attachment: /absolute/path/to/report.pdf
Read it using an appropriate tool for this file format.
An image expands similarly:
Image attachment: /absolute/path/to/image.png
Inspect it using an available image-reading method.
Text, code, archives, and other formats receive equivalent path instructions.
The instructions do not require a particular tool. The Agent decides what to do next from the tools that are actually available in the current session.
Bring your own tools
dsh-paste-to-path does not parse file contents.
Connect whichever tools fit your Agent environment, for example:
- images → your own
read_imageor vision tool - PDF / Word / Excel → document readers
- scans → OCR
- code / logs → shell or filesystem tools
- ZIP / TAR → archive extractors
The plugin does not install these tools or assume that the current model has their capabilities.
Any compatible tool that can access the file path on the DSH Host can read the stored attachment.
If the Agent has no suitable tool, the file still enters the Dock and is saved on the Host, but the Agent cannot understand its contents.
Why paths
In DSH's native attachment path, supported file formats and model capabilities are closely related.
In DSH 0.1.2-rc.1, the native Web image intake accepts:
- PNG
- JPEG
- WebP
- GIF
Other MIME types do not enter the same native image path.
An image that passes the format check may still fail if it reaches a model without image input or a text-only adapter.
dsh-paste-to-path separates two concerns:
Give the file to the Agent
and:
Understand the file's contents
The plugin handles only the first.
The file becomes an ordinary file on the Host. The Agent's tool layer handles the second.
Configuration
Version 0.0.7 exposes two primary choices:
| Option | Default | Description |
|---|---|---|
| Take over DSH Native attachments | Off | When enabled, files, images, paste, drop, the picker, and the attachment Dock all use classic P2P. When disabled, ordinary attachments stay entirely with DSH Native. |
| Turn long pasted text into an attachment | On | Converts qualifying plain-text pastes into .txt attachments. This works with either attachment owner. |
The long-text character threshold is a subordinate setting of the second option. It defaults to 8000 and remains editable from the plugin settings page.
The corresponding profile defaults are:
- insert:
- id: paste-to-path
name: dsh-paste-to-path
config:
takeOverNativeAttachments: false
longTextAsAttachment: true
longTextThreshold: 8000
With takeover off, P2P does not register its file picker or Dock and does not consume ordinary file paste or drop events. With takeover on, the complete classic workflow described in this README becomes active.
The settings UI follows DSH's Language preference and includes English and Simplified Chinese. Path instructions sent to the Agent remain stable English protocol text.
File storage
With a workspace, attachments are stored under:
<workspace>/.dsh/pastes/<category>/
Without a workspace, storage falls back to:
$DSH_HOME/tmp-paste/<category>/
Files copied into plugin storage use permissions:
0600
An existing Host path pasted as an attachment is linked in place. The plugin does not copy it, change its permissions, or allow Dock editing of the original file.
Removing an attachment from the Dock removes only its reference from the current draft. It does not delete the file from disk.
The path therefore remains valid for undo, re-send, or later reference.
Privacy
Files chosen, dropped, or exposed as browser File objects are uploaded to your own DSH Host and saved on its local filesystem. Existing Host paths are only linked in place.
In classic takeover mode, every plugin HTTP route uses DSH's browser authentication and Host/Origin trust checks. Attachment records are isolated by session, and route registrations are removed with the plugin's Cordis lifecycle.
The plugin itself does not:
- upload files directly to a model provider
- upload files to a third-party file service
- parse file contents during upload
The initial model request contains only the file path and a short instruction.
If the Agent later uses another tool or external service to process the file, that tool's own behavior and configuration apply.
Design boundary
dsh-paste-to-path owns only this part:
File
↓
Attachment Dock
↓
Host filesystem
↓
Path reference
This part:
Path
↓
Vision / PDF Reader / OCR / Shell / ...
belongs to the Agent's tool layer.
The plugin therefore does not:
- modify or replace a model adapter
- pretend that the model supports vision
- bind the workflow to a fixed vision, OCR, or document tool
- parse attachment contents during transport
- create a native DSH
imagecontent block
Compatibility
The final release, 0.0.7, targets:
DeepSeek Harness >= 0.1.5-rc.1 and < 0.2.0
It has been tested with DSH 0.1.6-alpha.2. Users maintaining older DSH installations without official generic-file attachments can pin dsh-paste-to-path@0.0.6.
No further plugin releases are planned because DSH now owns and maintains the attachment architecture this project originally supplied.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 31002
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 3752
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1127
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 498
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 465
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 432
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.