DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Mermaid Diagram — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
M

dsh-mermaid-diagram

Mermaid Diagram

DeepSeek Harness (dsh) 插件,为模型提供 Mermaid 图表工具,并在 Web UI 中将结果渲染为图表卡片。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:ButterHost69/dsh-mermaid-diagram#d90b3d616140315bb12dcd06da95a830046b8257
README兼容性版本

兼容性与来源证明

Mermaid Diagram 以 dsh-mermaid-diagram 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/6

版本

0.1.0stable
2026/10/6

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/6
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 ui-customization 分类下经过校验的插件。

Client Ui Skill Explorer@linxin666/dsh-client-ui-skill-explorerDSH 技能中心:按来源(bundled / project / user / custom / runtime)浏览已加载的技能,在 Web GUI 面板中启用或禁用、创建和删除技能。Remote Web Ui@linxin666/dsh-remote-web-ui通过扫码配对访问 dsh Web GUI,共享一个官方界面:设置按钮旁的二维码可将手机和 PC 配对到同一个 Web GUI(手机采用竖屏触控适配层,PC 使用完整桌面界面),通过一次性令牌和 rClient Ui Task Board@linxin666/dsh-client-ui-task-board面向 DSH Web GUI 的主机权威任务面板,支持实际会话执行、主机 cron 调度以及可选的跨平台空闲睡眠保护;以挂载方式提供,无需修改 DSH 源代码。Client Ui Git Graph@linxin666/dsh-client-ui-git-graph外部 dsh Web GUI 插件:空会话 Git 分支选择器和 Git 图,包含实际的主机端 Git 操作与防护,作为 dsh 配置文件包

README

dsh-mermaid-diagram

A DeepSeek Harness (dsh) plugin that gives the model a Mermaid diagram tool and renders each diagram as a card in the Web UI conversation.

The model calls mermaid with diagram source; the call renders as an interactive card with a Diagram / Code toggle, a copy action, and a fallback to the source whenever rendering fails. Diagrams are ordinary session events, so a card replays from the log.

Features

  • One model-facing tool, mermaid, with source and optional title parameters.
  • Renders any Mermaid-supported diagram type: flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, and more.
  • Theme-aware: the diagram follows the host light/dark theme and re-renders when the theme changes.
  • Streaming-safe: a card shows progress while the call streams and renders once the arguments are complete.
  • Replay-safe: the source is read from the logged call arguments, so a card survives reload and history paging.
  • Failure-safe: invalid source falls back to the source view with a notice instead of a broken card.
  • Localized card copy (English and Simplified Chinese), following the host language.
  • Bundles Mermaid locally and serves it from the plugin's own host route; no CDN and no network dependency at render time.
  • The ~3.5 MB Mermaid runtime is loaded only after the first diagram appears, so it costs nothing at boot.

Requirements

  • dsh 0.2.1-alpha.1 (verified) or a compatible release.
  • Node.js ^22.19 || >=24.
  • A Web profile (dsh web) for the card. The tool itself also registers in profiles without a web server.

Install

From this repository (a git install builds the package during installation):

dsh plugin --profile web add -w github:ButterHost69/dsh-mermaid-diagram

pnpm ≥10 refuses to run a git dependency's prepare script until it is allowed. If the first add fails, copy the exact package key pnpm prints into allowBuilds in the profile's pnpm-workspace.yaml:

allowBuilds:
  dsh-mermaid-diagram: true

Then run the add again. Treat that allowance as permission to run this package's build on your machine.

From a local checkout:

dsh plugin --profile web add -w /absolute/path/to/dsh-mermaid-diagram

Restart dsh web (or reload the page) after installing.

Usage

Ask the model for a diagram, for example:

Draw a flowchart of our release process.

The model calls the mermaid tool, and the result appears as a card:

  • Diagram shows the rendered SVG (the default).
  • Code shows the diagram source.
  • Copy source copies the source to the clipboard.

When the source cannot be rendered, the card opens in Code with the render error above the source.

How it works

PieceResponsibility
src/index.ts (host)Registers the mermaid tool and serves the bundled Mermaid runtime from /dsh-mermaid-diagram/mermaid-runtime.js.
src/diagram.tsArgument normalization, the size bound, and the model-facing summary. Shared by both halves.
src/client/index.tsRegisters one keyed tool.call.toolview entry for the mermaid wire tool.
src/client/MermaidCard.tsxReads the diagram from the call, lazily loads the runtime, renders the SVG, and owns the card states.
src/client/mermaid-runtime.tsLoads the runtime asset once per page and caches it on globalThis.mermaid.

The tool's call and result are ordinary session events, so the card derives everything from the log: the recorded call.argsRaw supplies the source, and result.meta is not needed.

Limits

  • A source over 50,000 characters is rejected by the tool before it reaches the browser, because Mermaid parses and lays out synchronously.
  • The card renders Mermaid's strict security level; labels are sanitized by Mermaid.
  • Very tall diagrams scroll inside the card rather than expanding the transcript.

Development

npm install
npm run build     # tsc declarations + tsdown bundles + the Mermaid runtime asset
npm test          # vitest: host logic, card model, and card component
npm run typecheck

Build output lands in lib/: index.js (host), client.js (browser half, wrapped for the DSH client module loader), and mermaid-runtime.js (the bundled Mermaid UMD asset plus its license notice).

License

MIT. See LICENSE.

The bundled Mermaid runtime is Mermaid, MIT licensed; its notice ships beside the asset as lib/mermaid-runtime.js.LEGAL.txt.

Prior art: MrmoLabs/dsh-mermaid renders Mermaid fenced code blocks by enhancing the transcript DOM. This plugin takes the documented tool-view seam instead, so the capability is an explicit model tool rather than a Markdown rewrite.