PlantUML 图表工作室,支持本地渲染、源码编辑、SVG/PNG 导出及智能体工具。
安装
# Release 预构建包
dsh plugin --profile web add -w "https://github.com/sonhoang23/dsh-uml/releases/download/v0.1.0/dsh-uml-0.1.0.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:sonhoang23/dsh-uml
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
DSH UML Studio
PlantUML diagrams, right inside DeepSeek Harness.
Edit source, preview diagrams locally, and export your work without leaving DSH.
Quick start · Features · How it works · Troubleshooting · Tiếng Việt
[!IMPORTANT] Experimental MVP — not a stable release. Source code and regression tests are present, but end-to-end acceptance in a live DSH profile/browser is still pending. This package is currently marked
privateand is intended to be built and installed from a local checkout, not from npm.
Why DSH UML Studio?
Turn a PlantUML file into a diagram without switching to an external editor or sending diagram source to a remote rendering service.
| Visual workflow | DSH integration |
|---|---|
| Preview / Source / Split — inspect a diagram, edit its source, or work side by side. | Native UML Studio tab — available in DSH's right-sidebar new-tab menu, independently of Better Sidebar. |
Navigate and export — zoom, pan, fit, and download .puml, SVG, or PNG. |
Optional Better Sidebar viewer — open and edit UML files directly from Files, with a dedicated tab action. |
| Mobile-first controls (experimental) — responsive toolbar, stacked Split mode, pinch-to-zoom, and auto-fit to the actual pane. | Container-aware layout — adapts to narrow DSH tabs as well as phones. |
| Local rendering — browser-side PlantUML TeaVM + Viz.js; no remote PlantUML server/CDN. | Agent tools — uml_validate checks PlantUML syntax, and uml_render generates SVG using a local headless engine. |
Preview
This repository does not yet include a verified screenshot or recording of the running Studio. We won't substitute an invented UI mockup. Until live acceptance is complete, explore the actual PlantUML example and the source-backed workflow below. Guidance for adding real captures is in assets/README.md.
Quick start
Requirements
- DeepSeek Harness (DSH)
>=0.2.2-0 <0.3.0 - Node.js
>=24.9.0,pnpm, and an existing DSHwebprofile - Optional: Better Sidebar
0.32.1(use DSH0.2.2-rc.2+within the 0.2.2 line for this integration)
1. Clone, install, and build
git clone https://github.com/sonhoang23/dsh-uml.git
cd dsh-uml
pnpm install
pnpm check
pnpm check runs the TypeScript check, unit tests, and build. Do not proceed with plugin installation if it fails.
2. Register the local plugin in your DSH web profile
dsh plugin --profile web add .
dsh plugin --profile web install
3. Restart DSH Web and open the Studio
Restart your running dsh web process, hard-refresh the browser, then choose UML Studio from the right-sidebar new-tab menu. Start with the built-in sample or import a local .puml file.
[!TIP] On Windows,
Package unavailable/Not runningafter installation usually points to profile package resolution or build setup, not to PlantUML syntax. Follow the Windows troubleshooting guide.
How it works
Draw a diagram
In the native Studio, switch between Preview, Source, and Split. Use +, −, and Fit to navigate the preview; export with PUML ↓, SVG ↓, or PNG ↓.
@startuml
actor User
participant "DSH Agent" as Agent
participant "UML Studio" as UML
User -> Agent: Create a diagram
Agent -> UML: PlantUML source
UML --> Agent: SVG preview
Agent --> User: Diagram ready
@enduml
The native Studio can import a local file into the browser editor or export the current draft; importing is not the same as saving back to a DSH workspace file.
Work with a file using Better Sidebar (optional)
When Better Sidebar is available, open a .puml, .plantuml, .uml, .pu, or .wsd file from Files to use the dedicated viewer/editor, or select Mở trong UML Studio to open a dedicated tab.
File-backed editing uses authenticated, session-scoped file routes, tracks unsaved changes, and checks the source file's modification time before saving to reduce overwrite conflicts. Ordinary Markdown and text files keep their existing viewers.
Use the agent tools
| Tool | Purpose |
|---|---|
uml_validate |
Validate PlantUML source and return diagnostics (such as syntax errors). |
uml_render |
Render PlantUML source into SVG returned to the agent. |
Both tools use the official headless TeaVM PlantUML engine without requiring Java. DSH can create and save .puml files through its normal file tools; these UML tools do not write files themselves.
Architecture
flowchart TB
DSH["DeepSeek Harness"]
UI["dsh-uml browser client"]
Native["Native right-sidebar UML Studio"]
Better["Better Sidebar adapter (optional)"]
Browser["Local PlantUML TeaVM + Viz.js"]
Files["Session-scoped file read/write"]
Agent["DSH agent tools"]
Headless["Headless PlantUML TeaVM"]
DSH --> UI
UI --> Native
UI -.-> Better
Native --> Browser
Better --> Browser
Better --> Files
DSH --> Agent
Agent --> Headless
- The plugin uses DSH's native sidebar extension points; it does not patch DSH core or modify Better Sidebar's source.
- Browser rendering happens locally. The
.pumlfile remains the source of truth for file-backed editing. - Browser SVG is sanitized and displayed as an image rather than injected as executable inline markup.
Status and limitations
- Experimental: live DSH/browser acceptance remains pending; see the development checklist.
- Security boundary: external
!include,!includeurl,!include_sprites, and!importdirectives are blocked. PlantUML source is limited to 100,000 characters. - Scope: one diagram per file is the intended MVP workflow. Cold browser-engine load and isolation still need evaluation before release.
- Roadmap ideas (not shipped): diagram templates, PlantUML blocks inside Markdown, richer syntax diagnostics, and AI-assisted explanations.
Mobile experience (experimental)
The Studio adapts to the actual DSH pane width, not only the device viewport. Narrow layouts default to Preview, stack Split vertically, and provide larger touch controls and pinch-to-zoom. Mobile acceptance on physical devices is still pending; see the mobile test matrix.
Documentation
- Troubleshooting — version/profile checks and Windows
Package unavailablerecovery - Development and acceptance — architecture notes, build commands, and live testing checklist
- Real screenshot guidelines — how to add verified product imagery
- Vietnamese README — hướng dẫn bằng tiếng Việt
Contributing
Issues, reproducible bug reports, and focused pull requests are welcome. Please describe your DSH and Node versions, whether Better Sidebar is enabled, and the steps needed to reproduce the problem. Run pnpm check before submitting a code change; see development notes.
License
Released under the MIT License. Built on the official PlantUML TeaVM engine and the DSH extension APIs.
Prebuilt GitHub releases
Versioned experimental tarballs are published on GitHub Releases by the release workflow after the repository checks pass. Install a published .tgz using dsh plugin --profile web add <tarball-url> followed by dsh plugin --profile web install. The source-install instructions remain available above. Clean-profile installation of the release asset must be verified separately.
链接
同类插件
tt-a1i/archify#integrations/deepseek-harness★ 99972
从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。
dream-num/dsh-univer-office★ 761
为 DeepSeek Harness 打造一个真正的办公环境。Univer Office 插件将电子表格、文档、幻灯片、画布、多维表格等汇聚到同一个运行时——数据互联、修改经过校验、变更按版本管理,并以隔离工作树支持多 Agent 协作。
ECNU/EduWork#dsh-knowledge-studio★ 410
基于工作区资料的 Studio,复用 DSH 模型与共享成果服务,制作报告、演示文稿、表格、思维导图、测验、闪卡及音视频。Office 生成需 Python 3.12+ 及相关依赖,并配置 DSH_OFFICE_PYTHON;媒体渲染需 Chromium;本地语音转写另需 whisper.cpp 和模型。
Roland0511/dsh-marktext★ 389
基于 MarkText 内核 muya 的右侧栏所见即所得 Markdown 编辑器:打开 .md 按渲染结果编辑,保存走 ctx.fs 并带版本守卫。
PerryLink/dsh-industry-research★ 227
面向 DeepSeek Harness 的确定性行业研究报告:公司与行业研究流程基于分阶段证据产出结构化、可核验的报告。
joeseesun/qiaomu-ui-learn-dsh★ 89
浏览界面设计参考和交互标本,练习设计测验,并导出 Markdown 学习笔记。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。