DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Pen — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
P

@local/dsh-pen

Pen

Drawing canvas for the model: brush tools, screenshots, and a zoomable canvas panel in the right sidebar.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:shine-yu-student/dsh-pen#dc31ace70639e2a59c6d70f8cfe0c7b4e74d71e7
READMECompatibilityVersions
whale-dsh-pen

Compatibility and provenance

Pen is published as @local/dsh-pen and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/29/2026

Versions

1.0.0stable
9/29/2026

Related plugins

Loading related plugins…

Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
Not declared
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/29/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in ui-customization.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profileExperimental Web profile layer for Agent Teams Remote and UI pluginsAb Chartdsh-ab-chartChart rendering tool with the browser card that draws its calls, in one publishable plugin packageWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editin

README

dsh-pen(画笔画布)

DeepSeek Harness 的扩展(bundle):给模型一块尺寸可控的画布、一组可组合的笔刷,以及 截图回看能力;同时在 DSH 的右侧侧边栏里给用户一个可缩放、可拖动的实时画布面板, 带「导出 PNG」按钮。

以下是 Deepseek V4.1 Flash 通过调用工具自行创作的宣传照片。

whale-dsh-pen

模型侧用一条 pen_draw 调用就能描述任意多条绘画操作(线段、折线、曲线、圆、椭圆、矩形、圆弧、 路径、填充、清空),它们按数组顺序一次画完;不同 pen_draw 调用之间并发安全,可以在同一条消息里 并行提交。多模态模型可以用 pen_screenshot 截取画布的任意矩形区域直接看图。

由于目前扩展功能尚不完善,模型在对图片编辑时会重新创作整张照片,因而造成极大的非预期 token 消耗。如果想预先尝试,你最好确认自己领到了鸡蛋。

工具

工具作用
pen_create创建指定像素尺寸的画布(替换旧画布),可指定背景色与面板显示名
pen_draw提交一批绘画操作;任一操作非法则整批不画,并报出 operations[i].<字段>
pen_canvas读取状态(尺寸、版本、操作数)或清空当前画布
pen_screenshot渲染指定区域并作为图片返回(可 maxWidth 缩放)
pen_export把画布写成 PNG 文件(默认写到会话工作目录)

绘画操作(pen_draw.operations[])

kind 取 line / polyline / curve / circle / ellipse / rect / arc / path / fill / clear。 通用笔画参数:brush、color、strokeWidth、opacity、dash;闭合图形(polyline、curve、 circle、ellipse、rect、path)另可给 fill。

  • 笔刷:pen(默认)、marker、highlighter、dashed、dotted;strokeWidth / opacity / dash 可覆盖预设。
  • 颜色:#rgb、#rrggbb、#rrggbbaa、rgb() / rgba()、常用颜色名。
  • path 支持 M/m L/l H/h V/v C/c Q/q Z;curve 是穿过全部控制点的 Catmull-Rom 样条。
  • 坐标单位是画布像素,原点在左上角,y 向下。

用户侧面板(右侧侧边栏)

客户端半边把画布放进 DSH 右侧侧边栏,输入框上方不再占用任何空间:

  • 画布页签:以 sidebarRightTabs 注册页面类型 pen,页签正文注册在 sidebar.right.pane.tab (key = 包名),由 sidebarRight.openTab('pen') 打开、聚焦或关闭,可停靠/浮动/分屏,跟随会话保存布局;
  • 面板内容:每 700ms 轮询本会话画布状态,按 revision 拉取 /pen/image 预览,画布更新自动刷新;
  • 鼠标操作:滚轮以指针位置为锚点缩放(0.05×–16×),按住左键拖拽平移,双击或「适应窗口」 重新贴合,右下角浮标提供 − / 百分比(点击回到 1:1)/ + / 适应窗口;
  • 输入框画笔按钮(conversation.input.right):打开或聚焦画布页签,页签在最前时再点一次关闭; 面板未打开而画布已存在时(例如模型调用 pen_create、或刷新页面)自动揭示一次,用户手动关闭后不再打扰;
  • 动作:新建画布(宽/高/背景色)、导出 PNG(下载全分辨率 PNG)、清空;
  • 面板文案走客户端 locale 服务(zh / en),颜色只用 DSH 主题 token,样式表随插件卸载移除。

面板本身不做栅格化:预览图和导出的 PNG 都由 Host 渲染,所以模型看到的截图、面板预览、导出文件 是同一份像素(可用 sha256 直接对比验证)。

配置(bundle 行 config)

字段默认值说明
defaultWidth / defaultHeight1024 / 768pen_create 缺省尺寸
defaultBackground#ffffff缺省背景色
maxWidth / maxHeight2048 / 2048画布尺寸上限
previewMaxWidth1400面板预览图最大宽度
quality2超采样倍率(1–4),越大越平滑越慢
maxOperations4000单块画布累计操作数上限
routePrefix/pen浏览器路由前缀
exportDirectory''强制导出目录;空表示会话工作目录
promptSectiontrue是否向系统提示词追加画布使用说明

截图输出会按 attachment store 的 maxImageDimension / maxImagePixels 自动限幅。

安装

plugin_manager install_bundle  # target: /home/rshine/toy_projects/dsh-pen

cordis.patch.yml 只插入一行;Host 半边注册工具与 /pen 路由,客户端半边由 package.json 的 dsh.client 声明(platform: web,注入 dsh-client-ui-conversation、dsh-client-ui-sidebar-right 与 dsh-client-locale)。客户端半边等 sidebarRight / sidebarRightTabs 两个服务就绪后才注册 UI, 因此没有右侧侧边栏的组合下它只是安静地不贡献界面。

开发

node scripts/build.mjs      # 由 lib/shared/*.js 与 lib/client-src/factory.js 生成两个产物
node tests/host.spec.mjs    # Host:工具、路由、光栅化、schema 子集与并发声明
node tests/client.spec.mjs  # 客户端:模块工厂、右侧栏页签注册、面板渲染、缩放/平移手势与卸载清理
  • lib/shared/raster.js:零依赖软件光栅化 + PNG 编码器(超采样抗锯齿、虚线、圆角笔画)。
  • lib/shared/ops.js:笔刷表、操作校验/归一化、填充与描边、路径与样条解析。
  • lib/pen-shared.cjs:生成文件,Host 通过 createRequire 引入上面的共享源码。
  • lib/client-src/factory.js:面板源码;lib/client/pen-client.js 是生成文件(浏览器产物)。

改动 lib/shared/ 或 lib/client-src/ 后必须重新执行 node scripts/build.mjs。