Preface¶
When doing multi-turn Agent development in DeepSeek Harness (DSH), a common scenario is: within the same session, the Agent modifies multiple files, and the sidebar title doesn’t reflect “which document is currently being watched”; while diagram source files like .mmd and .d2 are often opened as plain text by the built-in preview. Community maintainer Sayi has packaged four DSH plugins in the repository Sayi/dsh-plugin-kit: an Agent mode that locks a session to a single file, a reusable preview shell, and two shell-based Mermaid / D2 previews. The preview plugins register themselves by extension, and the file plugin only handles “open this address”; each can be installed independently and may be absent independently. See the directory page at skillhub.cn/plugins/Sayi/dsh-plugin-kit (community plugin directory, with no official affiliation to DeepSeek / High-Flyer).
What Is This¶
dsh-plugin-kit (intro: deepseek harness plugin kit) is a monorepo-style plugin collection targeting the DSH desktop client (repository documentation written against the 0.2.x plugin / slot interface). The root package dsh-file-session provides the Agent Preset “File Session”; the three packages under packages/ provide preview capabilities. Licensed under MIT © 2026 Sayi, with all subpackages also under MIT.
dsh-file-session one file per session ← bind / guard / rename / Agent mode
dsh-preview-kit preview shell (required by the two below)
dsh-mermaid *.mmd *.mermaid → Mermaid 12, rendered in-browser
dsh-d2 *.d2 → d2 CLI, compiled on the Host side
Core Features¶
dsh-file-session: One File Per Session¶
The following describes the behavioral boundaries of the file session plugin to help determine whether it fits your workflow.
- Bind to a single file: via the entry “New File / Select File”, or created by the Agent in the conversation; the first file the Agent writes to becomes the bound file.
- Binding is lifelong: once bound, it cannot be switched or unbound; to edit another file, you need to open a new session (by design, not a defect).
- Write guard: the Agent can only write to the bound file; writing elsewhere is rejected with a reason, while reads are unrestricted.
- File deleted: it will clearly indicate the file does not exist, and silent recreation is not allowed; recreation at the original path is only permitted after explicit user request.
- Session rename: after binding, the session title becomes the file name, distinguishable in the sidebar.
- Right-side preview: the bound file is opened in the right sidebar and rendered by the preview plugin corresponding to its extension; the built-in text preview remains available when no dedicated preview is installed.
For complete documentation, see the repository docs/file-session.md.
dsh-preview-kit: Preview Shell¶
Both diagram preview plugins require this package. The shell provides:
- Header row: path, view dropdown, “Reload File”, “Open With” (same set of Remote interfaces as the built-in preview).
- Diagram view: drag to pan, scroll wheel / pinch to zoom, shortcuts
+-0and arrow keys, scale menu (25%–400%, fit width). - Code view: syntax highlighting provided by each preview plugin.
- Diagnostic routing: the browser side reports rendering progress and platform capabilities to the Host (booleans / numbers / type names only, no paths or secrets).
dsh-mermaid and dsh-d2¶
| Plugin | Extension | Rendering Method |
|---|---|---|
| dsh-mermaid | *.mmd, *.mermaid |
Mermaid 12, rendered in-browser; lazy-loaded chunk ~5 MB; on syntax error, displays both the error and source code |
| dsh-d2 | *.d2 |
Host-side invocation of d2 CLI to compile; chunk ~22 KB (highlight.js + D2 syntax) |
Mermaid is registered in the extension band, with priority higher than the built-in preview’s fallback band.
Installation and Activation¶
Install one by one in the DSH plugin manager. The README states that each address is verified to work, and each installation should only produce one dependency change (the manager uses this to determine which package was installed). Do not use a single repository root address to attempt installing all four packages at once, as this will result in “Unable to determine which package was installed from the dependency changes”.
| To Install | What to Enter in DSH |
|---|---|
dsh-file-session |
github:Sayi/dsh-plugin-kit |
dsh-preview-kit |
github:Sayi/dsh-plugin-kit#path:packages/dsh-preview-kit |
dsh-mermaid |
github:Sayi/dsh-plugin-kit#path:packages/dsh-mermaid |
dsh-d2 |
github:Sayi/dsh-plugin-kit#path:packages/dsh-d2 |
Suggested order:
- If using Mermaid or D2 preview, install
dsh-preview-kitfirst; if not installed, the preview will lazy-load and prompt for the above path address. - Then install
dsh-mermaid/dsh-d2as needed; the file session can be used independently without depending on the preview packages.
Prerequisites
- DSH desktop client (0.2.x plugin interface).
- Only
dsh-d2requires the locald2CLI, e.g.,brew install d2, or specify the executable path via the environment variableDSH_D2_BIN.
Verify the File Plugin
The file plugin provides a read-only health route (no paths or secrets):
curl -s "$DSH_WEB_URL/dsh-file-session/health"
# Example: {"ok":true,"bindings":1,"liveAgents":0,"client":{"stamp":"…","injected":[…],"seats":3}}
# The port changes across restarts: read it from the page URL or environment variable DSH_WEB_URL, do not hardcode the port.
Uninstallation is performed in the plugin manager. When dsh-preview-kit is absent, the two preview plugins will prompt how to install it; dsh-file-session can work independently.
Typical Usage¶
- Install
dsh-file-session(and the preview-kit + mermaid/d2 as needed). - Create or select a session with the Agent Preset “File Session”, bind a document via “New File / Select File”, or let the Agent create and write to the first file to complete the binding.
- Edit the bound file; if the extension is
.mmd/.mermaid/.d2, the corresponding preview plugin renders it on the right side; after modifying the source, click “Reload File” to re-render. - When another document is needed, open a new session and bind again; do not attempt to rebind within the same session.
Use Cases and Notes¶
Who It’s For
- Developers who want the Agent to modify only one file and reduce accidental modifications to other paths in the repository.
- Those who want to preview Mermaid / D2 source files directly in DSH, with unified shell capabilities such as pan/zoom, code view, and “Open With”.
Please Be Aware Before Use
- The plugins run under the current DSH process permissions; before installation, it is recommended to read the GitHub source code and the MIT license, and assess the trust boundary yourself.
- The diagnostic route is an open GET, reporting only counts and type information; if not needed, you can remove the related capability yourself (see README “Known Limitations”).
- The “Open With” for
.mmd/.d2depends on system file associations; when no association exists, it falls back to the platform’s list of known applications. - Each package in the repository includes host + browser test suites (the README provides the assertion counts); the root package
dsh-file-sessionversion is 0.1.0 (seepackage.json).
Conclusion¶
dsh-plugin-kit splits “single-file Agent session” and “composable diagram previews” into four independently installable DSH plugins; the installation addresses follow the table in the README. For further details and development conventions, see the GitHub repository README; for the community index, see skillhub.cn/plugins/Sayi/dsh-plugin-kit.