Foreword¶
When performing agent tasks in DSH, the model output is often Markdown: plans, reports, comparison tables, migration instructions. Keeping these in the session is fine, but if you need to forward, archive, or open them offline, you need a complete page. dsh-md-html-render provides this capability: rendering Markdown into a standalone, self-contained HTML.
The DSH ecosystem emphasizes “everything is a plugin”; the community directory is an independent site, not an official app store. Below is an introduction to the positioning, installation, usage, and considerations of this plugin.
What is it¶
dsh-md-html-render is a DeepSeek Harness (DSH) plugin maintained by LeslieWylie, licensed under MIT.
It has two entry points:
- The model-callable
md_html_rendertool, usable in headless profiles. - The MD drawer in the Web GUI, allowing browsing, rendering, editing, and exporting Markdown in Web sessions.
Both use the same renderer. The output is standalone HTML with embedded styles; it does not load external stylesheets, fonts, scripts, or images.
The GitHub repository address is https://github.com/LeslieWylie/dsh-md-preview . Starting from v0.3.0, the package name changed from dsh-md-preview to dsh-md-html-render; the GitHub repository path remains dsh-md-preview. The README states it is currently not on npm, and the installation source is GitHub.
Core Features¶
Model Invocation¶
The tool signature is:
md_html_render(markdown, title?, save_path?) -> { html, savedPath?, error? }
Parameter description:
| Parameter | Required | Description |
|---|---|---|
markdown |
Yes | Markdown source |
title |
No | Page title |
save_path |
No | Output file path, resolved by the session fs service, and adheres to sandbox policies |
If save_path is rejected by the sandbox, the tool will still return the HTML along with an error.
Web GUI Drawer¶
In the Web GUI, first click MD in the session header, then browse the working directory. After clicking a .md file, you can render, edit, or export it in place, following the harness theme.
The Drawer’s readFile only accepts .md, .markdown, .mdx, or .txt.
Rendering & Security¶
The boundaries of this plugin are clear:
- No runtime dependencies.
- All reads and writes go through the harness
fsservice and sandbox. - Document text is HTML-escaped; unsafe link targets are collapsed; raw HTML execution is not allowed.
- The
fsservice is the only hard dependency; if missing, the plugin logs a warning and remains inert. - Can run in headless, Web GUI, or both.
The runtime environment requires Node ^22.19.0 || >=24.0.0.
Installation and Enablement¶
First, confirm that the current Node version meets the requirements.
Add the dependency in the profile’s package.json:
// ~/.dsh/profiles/<profile>/package.json
{
"dependencies": {
"dsh-md-html-render": "github:LeslieWylie/dsh-md-preview#v0.3.0"
}
}
Then install and start:
cd ~/.dsh/profiles/<profile> && pnpm install
dsh --profile <profile>
After the above steps, the headless profile gains md_html_render; the Web GUI profile also gains the MD drawer.
If you don’t want to edit the profile, you can also do a temporary load as shown in the README:
dsh --profile web --patch <(printf -- "- insert:\n - id: md-preview\n name: dsh-md-html-render\n")
Typical Usage¶
Let the Model Generate HTML¶
You can use a prompt similar to the following:
Render this migration plan to
~/Desktop/plan.html
After the model calls md_html_render, it will return html; if it successfully writes to save_path, it will include savedPath; if the write is rejected, it will include error.
View Local Markdown in Web GUI¶
Start a profile with Web GUI, then click MD in the session header. Find the target Markdown file, click to render, and then edit or export as needed. The exported page uses the same renderer as md_html_render.
Applicable Scenarios and Notes¶
Suitable for the following situations:
- Headless DSH profiles need to turn Markdown into complete HTML.
- Need to view, edit, and export Markdown in place in the Web GUI.
- Want the output page to not depend on external resources, and the plugin has no runtime dependencies.
- Need all file operations to go through the harness fs service and sandbox.
Notes before installation:
- The plugin runs with the current dsh process permissions; although reads and writes go through the harness fs service and sandbox, it is still recommended to check the source code first.
- License is MIT, can be used according to license requirements.
- When the
fsservice is missing, the plugin will not load its capabilities, only logging a warning and remaining inert. - Do not confuse the
dsh-md-previewon npm with this plugin; this plugin’s package name isdsh-md-html-render.
Verification¶
When verifying from source, run:
npm test
This will execute four sets of tests. Harness-related packages are used as regular devDependencies for testing; if the test log shows SKIPPED, consider this run as unverified.
Resources¶
- GitHub: https://github.com/LeslieWylie/dsh-md-preview
- License: MIT
- Verified resources do not provide a directory page URL; if needed to search in the community directory, search by the plugin name
dsh-md-html-render.