Preface¶
DeepSeek Harness (hereinafter referred to as DSH) treats models, tools, skills, conversations and UI as plugins, with the official slogan “Everything is a plugin”. The developer preview version has been open-sourced, and the community has quickly launched a number of independent directory sites for retrieving and installing third-party plugins. These directory sites have no official affiliation with DeepSeek / Fangtian (Huifang), and the installation commands shall prevail in the original text of each plugin’s detail page.
In this ecosystem, agents can write code smoothly, but design work often stops at “generating an image”. You cannot select layers in the image, nor modify copy or adjust spacing by nodes. OpenPencil saves design drafts as version-controllable .op files; dsh-openpencil connects it to DSH’s conversation interface, allowing agents to create, preview and modify on a real canvas instead of just sending back a PNG.
This article is compiled based on the community directory detail page, the plugin’s GitHub repository README, npm package descriptions, and the public repositories of OpenPencil and DeepSeek Harness: what this plugin is, what it can do, how to install it, and what the current limitations are.
What is this¶
dsh-openpencil is a UI enhancement plugin maintained by ZSeven-W, which connects OpenPencil to DeepSeek Harness. The community directory positions it as “OpenPencil design preview and editing plugin for DSH”; the repository README describes it more specifically: preview, inspect and edit real .op documents during conversations.
Its target problem is clear: agents no longer only return a generated image, but drive an editable and interactive design canvas. .op is a Design-as-Code file in JSON format in OpenPencil, suitable for being put into Git for diffs. The current npm package name of the plugin is @zseven-w/dsh-openpencil, with the released version 0.1.0-rc.1. The README states that it has been tested on DSH 0.1.0-rc.6. The license is MIT, and the main language is TypeScript.
The community directory included this plugin on 2026-08-15, when it had 72 stars; when this article was written, the GitHub repository showed 101 stars. Star counts will change, please refer to the repository page for the latest data.
Core Features¶
The repository divides its capabilities into preview, canvas, editor and a set of design tools for agents to call. Only the parts verified in the README / npm instructions are listed below.
Precise Multi-frame Preview¶
The installed headless OpenPencil exporter renders previews with design fidelity: the first top-level artboard on the active page is made into a replayable large PNG; multi-frame documents will add a horizontally scrollable thumbnail track, supporting click to select and previous/next frame. The large image also supports manual zooming, resetting, fitting to artboard and fitting to content.
The rendering uses openpencil_render. It will generate a content-addressable, immutable .op snapshot, and draw every top-level artboard on the active page. Optional parameters include:
- scale: range 0 < scale <= 8, default 1
- editable: default false; the edit entry will only be enabled when set to true
Do not pass width / height for precise rendering paths. These two parameters describe the runtime viewport, not the design export size, and are only accepted by the lower-fidelity Jian fallback path.
The precise renderer looks for the OpenPencil binary in the following order:
1. Environment variables DSH_OPENPENCIL_BINARY or DSH_OPENPENCIL_DESKTOP
2. /Applications/OpenPencil.app/Contents/MacOS/openpencil-desktop
3. ~/Applications/OpenPencil.app/Contents/MacOS/openpencil-desktop
4. openpencil-desktop on PATH
If the precise renderer cannot be found, Jian may provide a fallback preview marked with runtime-preview. The plugin will not silently switch to the fallback path when precise rendering fails, times out, or the PNG is invalid.
Read-only Interactive Canvas¶
The “Open interactive canvas” on the tool card will mount the read-only OpenPencil Web SDK on demand, supporting panning, zooming and fitting. You can view any page, nested node or inactive page without leaving the current conversation.
The Web SDK canvas and the hosted editor are two independent paths. The read-only canvas cannot be used as a full editor. The viewer resources (ESM SDK, WASM, CanvasKit) are also lazy-loaded after the canvas is opened; when resources are missing or invalid, the PNG preview is still available, but the canvas button will no longer be displayed.
Hosted Editor¶
When editable: true, editing actions will open the hosted OpenPencil editor: selection, layers, properties, drawing tools, undo/redo, and explicit save. The currently released DSH 0.1.0-rc.6 uses the plugin’s own scalable right-side workbench, and can also switch to full screen; small viewports will automatically go full screen. The tool card and editor will follow DSH’s Chinese/English language and light/dark theme without reloading the editing session.
The editing session uses OpenPencil’s hosted Web Host, with the same architecture as op-vscode. The plugin only starts the Host after the user authorizes the operation, stores the daemon token in memory, verifies the iframe origin, and closes the process when the session ends. If DSH reloads or uninstalls the plugin with unsaved changes on the canvas, the Host will keep an opaque local recovery draft for up to seven days. When you open the same source file again, it will first ask whether to restore; the recovery will not overwrite the .op file until the user explicitly saves.
Saving uses optimistic hashing and atomic replacement. If the source file is modified outside the editor, the plugin will report a conflict instead of overwriting it directly.
Agent Design Tools¶
The plugin registers five tools that allow agents to operate the real canvas through a transactional batch_design program:
| Tool | Function |
|---|---|
openpencil_new |
Create a new .op file with one transactional batch_design, written atomically via DSH’s sandboxed filesystem; no need to open the editor beforehand |
openpencil_create |
Generate or reorganize nodes on an existing active canvas using batch_design |
openpencil_edit |
Modify a specifically designated node, or the currently selected node by the user |
openpencil_render |
Generate an immutable snapshot and render all top-level artboards on the active page; optional scale and editable |
openpencil_selection |
Read the currently selected nodes on the active editor canvas |
New documents will only be published after the entire batch_design session succeeds. The tool will not overwrite existing paths; failed batches will not leave empty files.
Capability Grant and Result Format¶
Image and document grants are signed, hash-bound capabilities. Browser metadata will not expose any host machine path; signed preview/edit grants will not enter the standard tool results or model context. The results seen by the model remain ordinary JSON; the browser-side presentationMeta.$dshOpenPencil carries the preview URL, artboard list, document snapshot and editor launch grant. The results will also record renderer, rendererBinary, fidelity and warning messages.
Installation and Activation¶
The installation command given on the community directory detail page is as follows, run it in the DeepSeek Harness terminal:
dsh plugin add github:ZSeven-W/dsh-openpencil
For reproducible installations, pin the commit hash as instructed on the directory page:
dsh plugin add github:ZSeven-W/dsh-openpencil#<commit>
Replace <commit> with the actual commit hash from the repository. The directory page states: the plugin runs with the permissions of the current dsh process, and may execute code during installation. You should inspect the source code repository and license before installing.
The GitHub README also provides an npm installation method for web configuration, and specifies the tested DSH version. If you do not have DSH installed locally:
npm install -g @deepseek-ai/dsh@0.1.0-rc.6
dsh plugin --profile web add @zseven-w/dsh-openpencil@latest
dsh web
If you do not want to install DSH globally, the equivalent method provided by the README is:
pnpm dlx --package=@deepseek-ai/dsh@0.1.0-rc.6 dsh plugin --profile web add @zseven-w/dsh-openpencil@latest
pnpm dlx --package=@deepseek-ai/dsh@0.1.0-rc.6 dsh web
The plugin package itself is public and does not require an npm token. If the DSH prerelease package you use requires registry authentication, the README requires you to place credentials in user-level or temporary npm configurations, and not include them in the plugin repository.
Precise preview relies on the local OpenPencil desktop app or openpencil-desktop executable. The OpenPencil repository provides multiple installation methods including macOS Homebrew, desktop app and CLI; after installation, make sure the dsh process can find it according to the binary lookup order above.
Typical Usage¶
The agent workflow given in the repository README can be reproduced without preparing a .op file in advance.
- Put forward design requirements in natural language on the DSH web interface, such as making an app page or a set of presentation artboards, and specify a workspace relative path (such as
designs/home.op). - The agent should call
openpencil_newwith this new path and the first completebatch_designprogram. The tool executes the program in a private hosted OpenPencil daemon, and writes the authoritative document only after the entire batch succeeds. - The agent then calls
openpencil_renderwith the returned path as parameter, and setseditable: true,autoOpen: true. A multi-frame gallery will appear in the conversation, and the editor will expand once. Historical cards in playback and cards that have been initially settled will not open automatically. - For subsequent modifications to an existing active canvas, use
openpencil_createandopenpencil_edit. These changes will not be saved to disk until the user clicks Save in the editor. - When you need to check which nodes the user currently selected, call
openpencil_selection.
The README also lists applicable design types: app pages, presentations, social media content and infographics, etc. These capabilities come from OpenPencil’s own layers, properties, drawing, components and templates, and the plugin is responsible for connecting them to DSH conversations and tool loops.
From a developer’s perspective, the repository source code structure also corresponds to the above division of labor: src/index.ts is the Cordis service entry, design-tools.ts / new-tool.ts register tools, renderer.ts is responsible for precise rendering and Jian fallback, editor-host.ts manages the editor lifecycle, and client/ contains the browser-side workbench, gallery and selection panel. cordis.patch.yml mounts the plugin to the DSH bundle. These are source code layout notes, and you do not need to compile them yourself for daily use; local building requires Node 24.11 or newer, and pnpm.
Applicable Scenarios and Notes¶
This plugin is suitable for the following groups:
- Users who already use the DSH web interface and want agents to directly produce editable design drafts instead of just generating images
- Users who need to store design drafts as .op files in repositories for diffs and subsequent iterations
- Users who need to check multi-frame artboards, layers and selections in conversations before deciding whether to save
Please pay attention to the current limitations, which are all listed in the repository’s Current Limits:
- Subsequent edits to an existing canvas require the hosted editor to be already open; changes will not be written until the user performs a Save operation
- The lightweight Web SDK canvas is read-only; full editing uses a separate hosted editor. DSH 0.1.0-rc.6 uses a scalable right-side workbench, which can switch to full screen
- The precise gallery only covers the top-level artboards of the active page; inactive pages and nested nodes need to be viewed via the interactive canvas
- There is no production-grade retention strategy for rendering and snapshot caching
- DSH 0.1.0-rc.6 will not persist browser display metadata for nested tools in PTC / Code Mode; the plugin uses same-origin, session-bound endpoints for read-only preview recovery. Edit grants are only sent to recent, trusted live results
Regarding security, the community directory and repository are consistent: the plugin runs with the permissions of the current dsh process, and may execute code during installation. Before installing, you should read the GitHub source code and MIT license, confirm that the maintainer is ZSeven-W and the package name is @zseven-w/dsh-openpencil. For reproducible environments, pin the GitHub commit or npm version, and do not长期使用 the unpinned @latest tag.
Precise rendering relies on the local OpenPencil binary. If the precise renderer cannot be found, the Jian fallback preview will carry the runtime-preview tag, and its fidelity is lower than the official export path. Do not treat it as the final design acceptance drawing.
Summary¶
dsh-openpencil connects OpenPencil’s .op canvas to DeepSeek Harness conversations: multi-frame precise preview, read-only interactive canvas, hosted editor, plus five transactional design tools. It is suitable for turning the workflow of “state requirements → modify real canvas → preview and verify → iterate again” into a single continuous flow in DSH, instead of pasting screenshots back and forth.
The plugin is still in prerelease (version 0.1.0-rc.1), and requires a matching DSH version and local OpenPencil renderer. Both the community directory and the official repository remind: please inspect the source code and license first before installing it into your current process.
- Community Directory: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-openpencil/
- GitHub: https://github.com/ZSeven-W/dsh-openpencil
- OpenPencil: https://github.com/ZSeven-W/openpencil
- DeepSeek Harness: https://github.com/deepseek-ai/deepseek-harness