jean3690/dsh-drawio
DSH drawio插件:AI驱动画图(validate/render/edit/template工具)+ 侧栏实时SVG画板,内嵌diagrams.net官方编辑器
Project Overview项目介绍
This is a native plugin built exclusively for the DeepSeek Harness (DSH) Web GUI, adding AI-powered draw.io (diagrams.net) diagramming capabilities to the DSH workflow. It ships with both a set of agent tools for AI-driven diagram creation and editing, and a dedicated side panel that lets you view and edit diagrams alongside your chat conversation. The core processing pipeline converts drawio XML mxfile data to SVG via a zero-dependency pure TypeScript translator, then generates PNG for inline preview in chat and real-time rendering in the side panel. To install the plugin, run the command dsh plugin --profile web add https://github.com/jean3690/dsh-drawio then restart your dsh web instance to activate it.
The four included agent tools are drawio_template, which generates skeleton files for four common diagram types: flowcharts, architecture diagrams, network diagrams, and organization charts. Next is drawio_edit, which handles structured edits like adding, deleting, moving, resizing, restyling, and relabeling nodes and connections without requiring the LLM to manually edit raw XML. Third is drawio_validate, which parses and checks existing drawio files for structural issues with nodes and connections. Finally, drawio_render handles generating PNG previews for the chat window and updated SVG for the side panel. The side panel always stays visible next to chat and lets you open the official embedded drawio editor for manual tweaks.
The plugin has a few known limitations that users should be aware of before first use. Shapes like images, complex tables, and specialized UML shapes are only rendered as labeled placeholder boxes. Polylines without explicit waypoints only get basic orthogonal routing, which differs slightly from drawio's full routing algorithm, though following the included SKILL specification avoids this discrepancy. The core translator is zero-dependency, with the only native dependency being @resvg/resvg-js for PNG rasterization on the DSH host side. The plugin is distributed under the Apache-2.0 license, and includes pre-bundled offline static assets for the official drawio webapp.
这是专为 DeepSeek Harness (DSH) Web GUI 开发的原生 Drawio 插件,为 DSH 提供 AI 驱动的画图工具与侧边「Drawio 画板」功能。它的核心流程是将 drawio XML 格式通过纯 TypeScript 翻译器转换为 SVG,再生成可预览的 PNG 文件,内置四个 agent 工具:模板生成、结构化改图、文件校验、渲染输出。可通过命令行 dsh plugin --profile web add https://github.com/jean3690/dsh-drawio 安装,重启 DSH Web 后即可生效。
工作流方面,用户请求生成图表后,agent 会先调用模板工具生成对应类型(流程图/架构图/网络/组织图)的骨架文件,再渲染出 PNG 在对话内预览。用户可在右侧侧边画板打开内置的官方 drawio 编辑器拖拽精修,保存后自动写回工作区,AI 修改后已打开的编辑器会自动刷新。它面向需要让 AI 协助绘制各类图表的 DSH 用户,支持边对话边看图编辑。
该插件核心翻译器零依赖,仅宿主端栅格化 PNG 需要 @resvg/resvg-js 依赖,内置 drawio webapp 静态资源支持离线使用。已知限制包括图片形状、复杂表格和专用 UML 形状仅渲染占位,无显式路径点的折线布线与官方 drawio 有差异。插件采用 Apache-2.0 许可证,支持配置启用的工具、PNG 缩放倍率和默认字体。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-drawio(jean3690/dsh-drawio)
仓库:https://github.com/jean3690/dsh-drawio
本站详情页:https://www.yhbd.top/plugins/jean3690-dsh-drawio/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 NOASSERTION · ⭐ 8 · 最近提交 2026-09-07 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 8 stars - very few users, little community feedback星标只有 8,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add https://github.com/jean3690/dsh-drawio
把 jean3690/dsh-drawio 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-drawio
DSH(DeepSeek Harness)Web GUI 的 diagrams.net(drawio)插件:agent 画图工具 + 侧边栏「Drawio 画板」,工作区 .drawio 文件所见即所得。
用户/模型 → drawio XML (mxfile) → 纯 TS 翻译器 → SVG → PNG(对话内联预览 / 画板实时渲染 / 导出)
能力(AI 驱动 drawio)
Agent 工具(默认开启,可配置关闭)
| 工具 | 作用 |
|---|---|
drawio_template |
生成 4 类图的 mxfile 骨架:flowchart / architecture / network / orgchart |
drawio_edit |
结构化改图:upsert/delete/move/resize/restyle/relabel 节点与连线,改完写回 + 渲染预览。模型绝不手改 XML |
drawio_validate |
解析校验工作区 .drawio 文件或内联 XML,报告节点/连线/结构问题 |
drawio_render |
渲染为 SVG(+PNG),写入工作区,并在对话中内联 PNG 预览 |
配套 skill skills/drawio/SKILL.md:模型按受支持样式子集产出 XML、用 drawio_edit 改图,保证渲染一致。
画板(右侧并排栏)
- 边对话边看图:画板是 frame grid 的最右侧隐式列(宽度可拖 300~1000px 并持久化),打开时对话自动缩窄但始终可见,不再占用/隐藏会话区
- 列出工作区所有
.drawio文件(递归扫描,深度与条数受限) - 官方 drawio 编辑器嵌入:选中文件 → 「在编辑器中打开」→ 内置 diagrams.net webapp(本地 assets,离线可用)→ 拖拽节点/连线/样式,File → Save 经 postMessage 桥自动写回工作区(保存后画板 XML/预览即时同步)
- AI 联动:agent 用
drawio_edit改文件后,已打开的编辑器自动重载刷新 - 缩放看图:工具栏
− % + 适应缩放,或 Ctrl/⌘ + 滚轮在光标处缩放(放大后可滚动平移);文件列表默认隐藏、图占满画板,点「文件」再展开 - 独立页面 + 弹回:「独立页面」在新标签页打开全屏官方编辑器;独立页的「保存」写回工作区、「弹回画板」保存并在侧栏画板显示后自动关闭标签页
- 备用的 XML 源码 + SVG 预览分屏编辑、导出 PNG、复制 SVG
- 支持泳道/分组/富文本标签/正交连线/虚线/箭头等常见特性
渲染覆盖范围(纯 TS 零依赖翻译器,宿主与浏览器共用)
- 形状:矩形、圆角、椭圆、菱形、六边形、三角、圆柱、泳道、纯文本、图片占位
- 样式:填色/描边/线宽/虚线/透明度/字号/颜色/粗斜下划线/对齐/间距/自动换行
- HTML 标签:
<b> <i> <u> <font> <span style> <br> <h1-h6>及实体 - 连线:显式 waypoints、
orthogonalEdgeStyle自动布线、curved平滑、起止箭头(classic/block/open/oval/diamond)、边标签与exitX/exitY/entryX/entryY锚点 - 分组/泳道子节点坐标偏移、
dx/dy页偏移、压缩 mxfile(需 inflater)
安装
dsh plugin --profile web add https://github.com/jean3690/dsh-drawio
重启 dsh web 后生效:侧边栏出现「Drawio 画板」入口,四个 drawio_* 工具进入模型工具集,skill 自动可加载,内置 drawio webapp 挂在 /drawio/*。
AI 驱动用法
我要一张登录流程图
→ agent: drawio_template 骨架 → 写 docs/登录流程.drawio → drawio_render(对话内预览)
你在画板里点开该文件「在编辑器中打开」→ 官方编辑器拖拽精修 → Save 写回
刚才那张图把「校验通过?」改成菱形,并加一条「验证码校验」分支
→ agent: read 现有 .drawio(记住 cell id)→ drawio_edit(结构化 ops) → 预览
画板里开着的编辑器自动刷新
配置(cordis.patch.yml → dsh plugin 后编辑 profile 的 cordis.yml 或补丁)
- insert:
- id: dsh-drawio
name: dsh-drawio
config:
agentTools: ['drawio_validate', 'drawio_render', 'drawio_template'] # 或 '*' / []
pngScale: 2 # PNG 预览倍率
fontFamily: "Helvetica, Arial, 'PingFang SC', sans-serif"
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
sz1698/dsh-bg-new
wei-806206088/dsh-skin
liustack/modlens
Alisa0808/vox-director
Anionex/agent-vision-toolkit
Anionex/dsh-vision-toolkit
omdsh-dev/dsh-browser
shanliuling/dsh-image-gen