IWAIBAOLI/dsh-with-pencil

DeepSeek Harness 内置官方 Pencil(pen.dev)画布:对话绑定的工作区、实时代理编辑,以及 7 个 MCP 设计工具——无头引擎 + 浏览器编辑器。

Project Overview项目介绍

This is a DSH-native plugin that integrates the official Pencil design editing capabilities from pen.dev into DeepSeek Harness. It enables DeepSeek to act as the primary design agent, coordinating between the Pencil canvas, the active conversation context, and user input. The plugin registers nine core model tools to facilitate this collaboration, and it can be installed by running a DSH CLI command after you have set up a working DSH Web profile. After installation, you will need to restart your DSH Web process to activate the plugin.

The plugin loads the Pencil canvas on demand instead of opening it automatically when DSH starts. When you switch between different conversations, the canvas saves its state and restores it when you return to the original conversation. It supports live edits by the agent with immediate rendering and atomic saves, and it can export designs to PNG or PDF, insert external images, and resolve file conflicts. You can create a dedicated Pencil Designer agent preset using the provided prompt to get started quickly with design tasks.

The plugin itself is released under the MIT license, and it only provides integration code without modifying the original Pencil source code. The official Pencil editor is downloaded on first canvas open, verified with a SHA-256 checksum, and cached locally for future use. For non-multimodal models, the text mode is enabled by default and requires an additional image translation proxy plugin, while multimodal models can use native screenshots directly. Offline users can pre-download the official editor and specify its path via an environment variable.

这是一个专为 DeepSeek Harness 开发的原生插件,能够将官方 pen.dev Pencil 的设计编辑能力整合进 DSH 工作流。它让作为设计代理的 DeepSeek 可以和 Pencil 画布、当前活动对话协同工作,提供了 9 个核心模型工具,支持代理和用户共同完成设计任务。安装需要先有可用的 DSH Web 配置文件,再通过 DSH CLI 命令完成安装。

插件提供了按需打开的 Pencil 画布,画布会跟随对话切换隐藏和恢复,支持代理实时编辑并立即渲染保存,支持导出 PNG/PDF、插入图片、管理设计冲突。用户可以按照提供的提示词创建名为 Pencil Designer 的代理预设,将 Pencil 相关工具绑定到该预设,方便快速开始设计工作。界面默认采用 42% 右侧分屏布局,支持拖动调整,也可以切换为浮动窗口,适配不同使用习惯。

插件遵循 MIT 许可,不修改官方 Pencil 源码,仅做对接整合,首次打开画布才会下载验证过的官方编辑器并缓存。非多模态模型默认使用文本模式,需要依赖额外的图片转译路由;多模态模型可以直接使用原生截图。插件支持离线使用,用户可预先下载官方编辑器,通过环境变量指定路径使用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 22 stars - an early-stage project星标 22,属于早期项目
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命令行安装

npx @deepseek-ai/dsh@0.1.7-rc.2 plugin --profile web add dsh-with-pencil@0.6.0

把 IWAIBAOLI/dsh-with-pencil 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-with-pencil

Awesome DSH Plugin

English · 简体中文

English

Use the official pen.dev Pencil editing capabilities inside DeepSeek Harness. DeepSeek remains the design agent; this community DSH plugin makes its model tools, the active conversation, and the Pencil canvas work together.

This is not a Pencil rewrite or a standalone design product. It integrates the official @pen.dev/cli headless engine and a compatible official browser editor with DSH. It is independent and is not endorsed by pen.dev or DeepSeek.

What it provides

  • An on-demand Pencil canvas that does not open when Harness starts.
  • Conversation-bound workspaces: the canvas hides when you switch conversations and returns with its original editor session when you switch back.
  • Live Agent edits through the visible editor IPC, with immediate rendering and acknowledged, atomic disk saves.
  • A serialized official headless fallback when the browser canvas is closed.
  • Selection context injection for the next Agent turn, plus real image attachments from Pencil screenshots.
  • Workspace-safe file opening, creation, Save As, live PNG/PDF export, imports, generated images, design libraries, external-change reloads, and conflict resolution.
  • A native DSH right-Sidebar tab with the built-in split, resize, float, and session layout restoration controls.

The plugin registers nine core model tools:

  • pencil_mcp_open
  • pencil_mcp_get_app_state
  • pencil_mcp_batch_get
  • pencil_mcp_get_guidelines
  • pencil_mcp_execute
  • pencil_mcp_get_screenshot
  • pencil_mcp_export_html
  • pencil_mcp_export_nodes
  • pencil_mcp_insert_image

Create a Pencil Agent preset

Send this prompt once in a normal Harness conversation:

Create and validate a Harness Agent Preset named Pencil Designer; do not merely explain the steps. Base it on the standard coding preset and retain the fixed official tools.

Assign these Pencil design tools to the preset, and no other design tools: pencil_mcp_open, pencil_mcp_get_app_state, pencil_mcp_batch_get, pencil_mcp_get_guidelines, pencil_mcp_execute, pencil_mcp_get_screenshot, pencil_mcp_export_html, pencil_mcp_export_nodes, and pencil_mcp_insert_image. Bind Harness read_image if available for local image files. With DeepSeek-V4.1-Flash, the model can inspect screenshot attachments directly.

The persona must tell the Agent to complete .pen design tasks directly using only the tools assigned to this preset. Before calling a tool, read its own description and parameter definitions in the Agent's available-tools list; those descriptions are the complete usage reference — do not search for, probe, or verify usage anywhere else.

The persona must require the Agent, when starting a new design, to first use pencil_mcp_open to create a .pen file inside the workspace, then edit, take screenshots, and visually verify it until it is saved. Verify visually with pencil_mcp_get_screenshot (a visual-fidelity spot check: colors, font rendering, alignment/spacing, layout positions). Verify text and property content with pencil_mcp_batch_get (node reads). Use pencil_mcp_export_nodes only for deliverable files. Do not use unspecified design tools or inspect any source code or repository to find tools or study their usage. Prefer the assigned design tools for .pen edits; do not treat direct JSON editing as the default.

When finished, report the preset name/path and how to select the preset. Do not modify any other preset.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-pilot 下一个 Next dsh-sessions-manager →