DeepSeek Harness 插件

dsh-artifact-sumarilk

Render ECharts, Mermaid, Three.js, and sandboxed custom HTML inline in DeepSeek Harness conversations — declarative payloads fed to the real engines.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
sumarilkkxx/dsh-artifact
最近更新
2026年8月20日
分类
界面增强
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/sumarilkkxx/dsh-artifact
插件名:dsh-artifact-sumarilk
作者:sumarilkkxx

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<p align="center"> <img src="assets/dsh-artifact-logo.svg" alt="dsh-artifact logo" width="96" /> </p>

<p align="center"><strong>Turn natural-language requests into native, interactive ECharts and Mermaid visualizations inside DeepSeek Harness.</strong></p>

<p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-5EEAD4?style=flat-square" alt="MIT license" /></a> <img src="https://img.shields.io/badge/runtime-DeepSeek%20Harness-60A5FA?style=flat-square" alt="DeepSeek Harness" /> <img src="https://img.shields.io/badge/engines-ECharts%20%2B%20Mermaid-A78BFA?style=flat-square" alt="ECharts and Mermaid" /> <img src="https://img.shields.io/badge/payload-pure%20JSON-34D399?style=flat-square" alt="Pure JSON payloads" /> </p>

<p align="center"><a href="README.zh-CN.md">简体中文</a></p>

<p align="center"> <img src="assets/dsh-artifact-banner.png" alt="dsh-artifact — native ECharts and Mermaid visualization canvas for DeepSeek Harness" width="100%" /> </p>

What it is

dsh-artifact is a visualization renderer for DeepSeek Harness. Ask for a chart or diagram in ordinary language; the model understands the intent, chooses the appropriate native engine, emits a declarative payload, and the result appears directly in the conversation as an interactive canvas.

It is built for a near-native ECharts and Mermaid authoring experience—not a small set of hand-drawn chart templates. The browser receives a real ECharts option or Mermaid source and renders it with the real engine.

Your request  →  model understands the intent  →  ECharts option / Mermaid code  →  interactive canvas

Highlights

From a request to a native canvas

Describe the visualization you need in ordinary language. dsh-artifact keeps the complete workflow inside the conversation: the model reasons about the request, prepares a native engine payload, and renders the result as an interactive canvas with appearance controls and PNG export.

<p align="center"> <a href="https://raw.githubusercontent.com/sumarilkkxx/dsh-artifact/master/assets/dsh-artifact-workflow.webp" target="_blank" rel="noopener noreferrer" title="Open the full-size animation"> <img src="assets/dsh-artifact-workflow.webp" alt="A natural-language request becoming a native GitHub-style calendar heatmap inside DeepSeek Harness" width="100%" /> </a> </p>

<p align="center"><sub>One request, from streamed reasoning and tool execution to a native ECharts calendar heatmap. The demonstration preserves the actual DeepSeek Harness interface.</sub></p>

Built around real rendering engines

Capability
Native enginesECharts 6, the official ECharts-GL extension when an option needs it, and Mermaid 11
Broad ECharts coverageNative JSON-expressible series and components: cartesian, pie, radar, calendar heatmap, graph, sankey, tree, map, parallel, timeline, dataset, visualMap, dataZoom, and more
Diagram-first MermaidFlowcharts, sequence, class, state, ER, gantt, journey, pie, and other Mermaid-supported diagrams
Interactive canvasTooltips, legends, zoom, pan, 3D controls, and responsive resizing come from the actual renderer
Appearance controlsIn-canvas ECharts-inspired palettes and light/dark backgrounds; photographic globes retain their real-world surface and expose background mode only
Image downloadDownload ECharts, ECharts-GL, and Mermaid canvases as 2× PNG images using the active background; standard ECharts and Mermaid diagrams also support SVG download
Safe by designPure JSON across the declarative boundary; isolated custom HTML runs in a CSP-restricted sandbox iframe

Install

Install the DeepSeek Harness CLI first (one time):

npm install -g @deepseek-ai/dsh

If this is your first time using DSH, run dsh web once to initialize the web profile, then stop it before adding the plugin.

# GitHub install (recommended; prebuilt engine assets are included)
dsh plugin --profile web add github:sumarilkkxx/dsh-artifact

# Local development
dsh plugin --profile web add link:/path/to/dsh-artifact

Start or restart dsh web, then hard-refresh the browser (Cmd/Ctrl+Shift+R). pnpm must be available on PATH because the DSH plugin command uses it internally.

Use it naturally

Ask for the result you need. For example:

> Compare quarterly revenue and margin for 2024 in a dual-axis chart, highlight the best quarter, and use a dark canvas.

> Create a GitHub-style calendar heatmap for this year's daily commits.

> Draw a sequence diagram for OAuth login with success and failure paths.

The model calls render_artifact and returns a live canvas in the conversation. Use the Appearance control to switch palette/background where appropriate, and the adjacent Download action to save a PNG.

Engine contract

render_artifact

ParameterTypePurpose
enginestringecharts (default) or mermaid
optionobject / stringA native ECharts option for echarts; pure JSON only, no JavaScript functions
mapsobject / stringOptional legal GeoJSON/SVG registry for ECharts geo and map visualizations
codestringMermaid source for mermaid
themestringauto, tech-blue, minimal, night-purple, forest, or amber
modestringauto, light, or dark
titlestringConversation card title
heightnumberCanvas height in px (default 360, minimum 120)

The plugin passes ECharts options to setOption without translating them into a preset catalogue. Explicit values in an option take precedence over the in-canvas theme, exactly as they do in ECharts. ECharts-GL is loaded only when a supported 3D option requires it; it remains an ECharts compatibility layer, not a separate 3D scene editor.

JavaScript callbacks cannot cross the JSON security boundary. Prefer ECharts string templates such as {c}% for formatters. For genuinely callback-driven custom experiences, use render_html.

render_html

ParameterTypePurpose
htmlstringSelf-contained HTML fragment or document; inline CSS/JS is allowed
titlestringConversation card title
heightnumberCanvas height in px (default 400, minimum 120)

render_html is the deliberately separate escape hatch for custom widgets. It runs in an opaque-origin iframe with a CSP that blocks network access, top-level navigation, and form submission. Its contents cannot be exported by the host, so it intentionally has no PNG download control.

Native ECharts example

{
  "engine": "echarts",
  "title": "2024 quarterly revenue",
  "mode": "dark",
  "option": {
    "tooltip": { "trigger": "axis" },
    "legend": { "top": 28 },
    "xAxis": { "type": "category", "data": ["Q1", "Q2", "Q3", "Q4"] },
    "yAxis": { "type": "value", "name": "Revenue (10k CNY)" },
    "series": [{ "type": "bar", "name": "Revenue", "data": [120, 180, 150, 210] }]
  }
}

Security and compatibility

  • The declarative payload is validated as lossless JSON. Functions, undefined, and symbols are rejected.
  • Engine assets are served only from the plugin route; traversal attempts are blocked.
  • Map visualizations must include legal GeoJSON/SVG through maps; the plugin never fetches map data from the network.
  • The plugin ships its renderer assets locally, so ECharts and Mermaid render without a CDN dependency.

Development

npm install
npm run build

# Add the local plugin, then restart dsh web and hard-refresh.
dsh plugin --profile web add .
PathDescription
index.jsHost tool definitions, validation, prompt guidance, and local asset route
client.jsDeepSeek Harness toolviews, renderer dispatch, appearance controls, and PNG export
assets/Committed ECharts, ECharts-GL, Mermaid, and project media assets
docs/showcase/Source and pixel assets for the README motion study
scripts/build.mjsCopies renderer distributions into assets/

The plugin has no @deepseek-ai/* runtime imports. ECharts, ECharts-GL, and Mermaid are build-time dependencies used to create the committed local assets.

Roadmap

  • [x] Native ECharts and Mermaid canvases
  • [x] ECharts-GL compatibility for JSON-expressible ECharts 3D options
  • [x] Light/dark appearance controls and PNG export
  • [x] Sandboxed HTML escape hatch
  • [ ] Optional action round-trip from a canvas back to the model
  • [ ] More declarative rendering engines

Contributing

Contributions are welcome. Keep the declarative channel function-free, preserve the sandbox boundary, and commit rebuilt assets whenever an engine version changes.

License

[MIT](LICENSE)