DeepSeek Harness Plugin

chillydusk/dsh-diagram-studio

Stars ★ 0 Downloads (30d) 427 Category UI Enhancements Added 2026-12-01 npm dsh-diagram-studio

Edits diagram-draw blueprints, checks structure, and applies reviewable repair plans in a DSH diagram workbench. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-diagram-studio

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:chillydusk/dsh-diagram-studio

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Spec-driven diagram review, deterministic doctor, and natural-language repair for DSH + diagram-draw.

CI

Diagram Studio is a DeepSeek Harness (DSH) plugin that turns diagram correction into a reviewable loop:

spec → blueprint → SVG/PNG/HTML → doctor → repair plan → atomic patch → re-render

It never calls an image-generation API. blueprint.json remains the only source; the Host runs local diagram-draw scripts.

Diagram Studio

Features

  • PNG preview with a full-screen lightbox and download
  • Click a block to select it; click a node/edge in the list to jump
  • Node labels, positions, shapes, font sizes
  • Edge arrows, solid/dashed style, edge names
  • Canvas ratio, auto/grid layout, columns, rows, gaps, margins, font/line widths, style profile
  • Spec card (blueprint.spec) for required nodes, edges, groups, and constraints
  • Deterministic doctor: missing nodes/edges, broken endpoints, duplicate edges, orphan nodes, group references, node limits, missing labels, out-of-bounds, overlap, estimated crossings
  • Natural-language repair: the agent writes repair-plan.json; select operations and apply atomically
  • Reference image drop: saves into diagrams/ref-* and triggers observation → blueprint → render
  • Undo history, rendered changelog, light/dark theme tokens

Install

  1. Install the skill:
node install-skill.mjs

or:

.\install-skill.ps1

This copies skill/diagram-draw to ~/.dsh/skills/diagram-draw.

  1. Install the dsh-diagram-studio-1.1.1.tgz from GitHub Releases as a local bundle (or install this directory). The npm package name is dsh-diagram-studio; if npm still serves 1.0.0, use the Release tarball because the old package has a mismatched Client module id.
  2. Disable/enable the diagram-studio row and refresh DSH.

Open Diagram Studio from the left sidebar or the right-side Diagram Studio guide tab.

Requirements

  • DSH with Client plugin support
  • Node.js 20+
  • Python 3.10+
  • Pillow
  • A CJK font (Microsoft YaHei, Noto Sans SC, etc.)
  • Edge/Chrome for PNG export; SVG/HTML work without it

Develop

npm test
npm run check
npm pack --dry-run
python -m unittest discover -s skill/diagram-draw/tests

Release

Push a v* tag to create a GitHub Release with the packed tarball. The Publish npm workflow publishes it when the repository has an NPM_TOKEN secret with publish access and 2FA bypass.

Architecture

client.js  → sidebar/main UI, preview, specs, doctor, repair plan
index.js   → same-origin Host API, local process bridge, reference/repair prompts
skill/     → diagram-draw renderer, patches, doctor, layout/routing

Limits

  • Block diagrams have full node/edge editing; timing/circuit diagrams are preview-only in 1.x.
  • The doctor is deterministic and cannot infer a missing business concept unless it is in the spec.
  • Natural-language repair needs an active agent session.
  • Reference replication needs a model with image input.

Security

Diagram rendering is local; no image API or external renderer. Repair requests and reference images are sent to the active DSH model through session prompts. The Host only touches <workspace>/diagrams/<slug>/, rejects path traversal, limits reference uploads, and applies patches only after a successful temporary render.

License

MIT. See LICENSE.

中文 README

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.