Introduction

In the DSH (DeepSeek Harness) web profile, when pasting large blocks of text into the input box, the default behavior is for the original text to go directly into the message body. Pasting in long logs, long errors, and long documents makes the message itself very heavy, and the model also has to process the original text within the message.

dsh-auto-paste solves this problem: when pasted text exceeds a threshold, the plugin automatically saves the content as an attachment file in the current session workspace, and only inserts a path reference into the input box, allowing the model to read the file via that path. It is generated and extended from the create-dsh-plugin template. This article introduces its features, installation method, and verification steps.

What is it

dsh-auto-paste is a DeepSeek Harness plugin targeting the web client paste hook (dsh.client.platform: web). The GitHub repository is under the name sakuraqqq (https://github.com/sakuraqqq/dsh-auto-paste). The author and MIT copyright holder in package.json is misakamaster, and the license is MIT. dsh-auto-paste@0.1.2 has been published on npm (dist-tag: latest), while the source repository tag is v0.1.0. The correspondence between the two is not documented in the materials.

It does two things: intercept large-scale pasting on the client side and save it to disk; while also registering a save_paste tool as a fallback. The plugin does not initiate any network requests and only writes local files under the workspace pastes/.

Core Features

Web Client Paste Hook (Main Path)

When pasting text exceeding the threshold (default 500 characters), the process is as follows:

  1. The client intercepts the paste event and calls the host’s pasteStore/savePaste via the existing connection RPC (/api → Typert gateway);
  2. The host writes the text to pastes/<timestamp>.txt in the current session workspace;
  3. A file path reference is inserted into the input box, for example [Saved large paste as attachment: pastes/20260815-103000.txt (1234 characters)];
  4. After the message is sent, the model reads the file content via that path.

On save failure, it falls back to a normal paste (original text goes directly into the input box) without losing data.

Size Limit

Text exceeding 1 MiB will be rejected by the server (size limit to prevent resource exhaustion): it errors out and falls back to a normal paste without saving to disk.

save_paste Tool (Discipline Fallback)

The host also registers the save_paste tool. When a user pastes large amounts of text and the input box hook does not intercept it, the model can proactively call this tool to persist the text as pastes/<timestamp>.txt and reference the path in the reply. The README suggests adding a discipline line to the project’s AGENTS.md:

## dsh-auto-paste Discipline
When a user pastes large amounts of text (approx. 500+ characters): if the input box hook does not intercept, proactively call the save_paste tool to store the text into pastes/<timestamp>.txt and reference that workspace relative path in the reply. Do not repeat the original text.

Installation and Enablement

npm i dsh-auto-paste                          # Latest version (dist-tag: latest); --save-exact for exact version
npm i dsh-auto-paste@0.1.2                    # Or specify version
# Execute in the plugin parent directory to register the package name to the target profile:
dsh plugin --profile web add dsh-auto-paste
dsh --profile web                             # Restart web profile

After restarting, observe [dsh-auto-paste] host ready ...; refresh the browser page, and the console will show [dsh-auto-paste] client paste listener ready (minChars=500).

After an npm release, there is a delay of a few seconds to a few minutes for domestic mirrors (npmmirror) to synchronize. Use the official registry registry.npmjs.org as the standard during installation.

Method 2: Install from Local Directory (Development/Debug)

# Execute in the plugin parent directory (repository root); relative paths anchor to the calling directory, do not execute inside the plugin directory
dsh plugin --profile web add ./dsh-auto-paste
dsh --profile web

After changing the plugin, first run pnpm install && pnpm run build (tsc compiles to dist/), then restart dsh --profile web and refresh the page.

Threshold Adjustment

The minChars threshold defaults to 500 characters and can be adjusted in the row config of cordis.patch.yml.

Verification

Verification without API Key

When there is no DEEPSEEK_API_KEY, you can verify loading and event chain:

dsh --profile web --dump-config | grep dsh-auto-paste   # Config layer contains this line
dsh plugin --profile headless add ./dsh-auto-paste
dsh --profile headless "run a probe"                    # host loading

Without a key, --verify can only prove that loading, listing, and events are normal; model calls will report MISSING_CREDENTIAL. End-to-end verification (the model actually calling the save_paste tool) requires setting DEEPSEEK_API_KEY.

Use Cases and Notes

Suitable for users who frequently paste long logs and long documents under the DSH web profile: keeping only the path reference in the message, saving the original text as a workspace file for the model to read on demand. Combined with the save_paste tool and the AGENTS.md discipline line, the model can also provide a fallback even if the hook does not intercept.

Pay attention to a few points before installing and using:

  1. Node Version: DSH requires ^22.19.0 || >=24.0.0. Older versions (like v22.17) only warn about EBADENGINE but do not block, but upgrading is recommended.
  2. Dependency Line: The plugin locks @deepseek-ai/dsh-tools 0.1.0-rc.6 (exact, next tag line, npm latest is an expired 0.0.1-rc.1); @deepseek-ai/cordis ^4.0.1 is a peerDependency provided by the host; zod ^4.4.3. Do not manually override the version of dsh-tools during secondary development.
  3. The plugin runs with the current dsh process permissions; check the source code and license before installing. This plugin is under the MIT license and can be used, modified, and redistributed (including for commercial use), provided the copyright notice and license text are retained. The manifest states that it does not initiate any network requests and only writes local files under the workspace pastes/.
  4. Secondary Development Tips: The package is pure ESM ("type": "module"), dsh.bundle.patch → ./cordis.patch.yml is a hard requirement for dsh to load the plugin; if missing, it will be treated as a normal dependency.

Conclusion

dsh-auto-paste uses a client hook plus a tool to change “large paste goes directly into message body” to “save to disk as attachment and leave path reference in message”. The implementation is not complex, and the boundaries are clear: failure fallback, 1 MiB limit, and no network requests.

Project homepage: https://github.com/sakuraqqq/dsh-auto-paste ; Community plugin directory page: https://www.skillhub.cn/plugins/sakuraqqq/dsh-auto-paste . The directory is an independent community site and has no official affiliation with DeepSeek / Hyperbolic.