DeepSeek Harness 插件

dsh-visualization

Secure Mermaid, data-table, and Vega-Lite visualization bundle for DeepSeek Harness Web.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
shaomingbo/dsh-visualization
最近更新
2026年8月22日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-21

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

安装

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

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

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

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

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

GitHub:https://github.com/shaomingbo/dsh-visualization
插件名:dsh-visualization
作者:shaomingbo

检查来源文件

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

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

dsh-visualization

Secure optional Mermaid, data-table, and Vega-Lite rendering for DeepSeek Harness Web.

It is a GitHub-distributed DSH bundle, not a shell modification. Without it, assistant fences remain ordinary copyable code blocks.

Install

dsh plugin --profile web add github:shaomingbo/dsh-visualization#v0.2.0

Or run the package installer:

npx --yes github:shaomingbo/dsh-visualization#v0.2.0

Restart npx @deepseek-ai/dsh web, then hard-refresh the browser. To update:

dsh plugin --profile web update dsh-visualization

To remove it:

dsh plugin --profile web remove dsh-visualization

Host compatibility

The plugin selects its adapter by Host capability. Releases that provide the session-keyed conversation.chat.assistant.codeBlock slot use the native renderer seam. Published rc.2 Hosts that serve companion JavaScript under /plugins/<id>/ but lack that slot use a fail-open DOM adapter: it observes settled code blocks, mounts the same secure renderer beside the Host source, and hides the Host block only after a valid preview exists. Unknown markup, streaming content, parse failures, and renderer failures keep the original source visible. The active mode is exposed as document.documentElement.dataset.dshVisualizationAdapter for local diagnostics.

Supported content

FenceBehavior
mermaidMermaid diagrams with a beautiful-mermaid-inspired two-color system, neo layout, DSH light/dark tokens, rounded surfaces, fine borders, and soft shadows.
kanban, quadrantChart, C4Context, C4Container, C4Component, C4Dynamic, C4Deployment, requirementDiagramDirect Mermaid subtype fences. The body may omit the diagram header; the renderer adds it privately while preserving the original source for copy/display.
textCompatibility routing only: a block is treated as Mermaid when its first non-empty line is a supported Mermaid header. Ordinary text blocks keep the native code fallback.
csv, tsv, json-tableFilterable, sortable, paginated native table.
vega-liteStatic inline-only Vega-Lite v6 chart in a one-shot Worker.

Mermaid also supports flowchart/graph, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram, gantt, pie, mindmap, timeline, gitGraph, and journey. xychart-beta and sankey-beta are intentionally not enabled.

Direct subtype examples

Fence languages are matched case-insensitively by DSH. These bodies intentionally omit the repeated Mermaid header:

backlog[Backlog] theme[Theme upgrade] doing[In progress] dark[Dark-mode verification]

x-axis Low effort --> High effort y-axis Low impact --> High impact Dark mode: [0.35, 0.82]

Person(user, "User") System(app, "DSH Web") Rel(user, app, "Uses")

requirement dark_mode { id: "REQ-1" text: "Readable in both color schemes" risk: medium verifymethod: test }

The palette is recalculated when the DSH theme changes. If host tokens are unavailable, light and dark zinc fallbacks keep text, nodes, boundaries, and connectors readable. C4 diagrams use a compact three-column layout; when unsafe embedded person icons are removed, their labels are moved into the freed space instead of leaving a large visual gap.

Security

  • Rich rendering starts only after an assistant message settles; streaming stays plain code. The legacy adapter never deletes Host DOM and restores the original block on unload.
  • Mermaid rejects directives, active links/callbacks, arbitrary HTML labels, remote resources, and unsafe CSS. Legacy <br/> label breaks are converted to inert separator text only in the private render input; copied source is unchanged. C4 embedded image icons are stripped; text and shapes remain.
  • SVG is sanitized, structurally checked, locally ID-prefixed, serialized into a Blob, and shown through <img>; no raw SVG enters the document.
  • Vega-Lite runs in a disposable Worker with AST interpretation, a deny-all loader, bounded input/output, and a two-second termination deadline.
  • No network fonts, external data, image loads, or raw HTML are enabled.

Artifact size

The checked-in browser artifact intentionally contains the Mermaid/DOMPurify/css-tree/table implementation (~7.4 MB uncompressed). The optional Vega worker is a separate self-contained artifact (~1.8 MB). Neither is present until this optional package is installed.

Development

npm test
npm run check
npm pack --dry-run

The lib/ directory is committed on purpose: GitHub/pnpm installs consume prebuilt artifacts and do not build the plugin during profile installation. lib/ is the release authority; src/ is retained as readable source reference, not a standalone build interface. The package exposes no TypeScript integration API: its supported integration is the DSH bundle metadata plus its capability-selected native/legacy browser adapters. When changing source, regenerate both browser artifacts with the matching DSH client packaging tool and review the resulting lib/ diff before tagging.

License

MIT. Derived DSH source retains the upstream DeepSeek copyright notice.