
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
dsh-web-mermaid
Advanced tools
DeepSeek Harness (DSH) Web 插件:把聊天 Markdown 中的 ```mermaid 围栏代码块离线渲染为 Mermaid 图表(SVG)。mermaid 运行时随插件内置,不依赖任何在线 CDN。
DeepSeek Harness(DSH)Web 插件:把聊天 Markdown 中的 ```mermaid 围栏代码块自动渲染为 Mermaid 图表(SVG)。
dsh-web-mermaid@0.1.0(https://www.npmjs.com/package/dsh-web-mermaid)完全离线:mermaid 运行时(vendor/mermaid.min.js,v11.16.1)随插件内置,由插件 Host 半通过同源路由提供,不依赖任何在线 CDN。
window.__DSH_MERMAID_ASSET__ = '…',可覆盖 mermaid 资源地址(默认同源路由)。DSH 的 MarkdownText 把围栏代码块渲染为 <div class="md-code-block">(banner 里显示语言名,代码体为 <pre><code>;shiki 语言表不含 mermaid,因此 mermaid 块恒为纯文本代码体)。本插件在浏览器端用 MutationObserver 扫描 .md-code-block,判定语言名为 mermaid 后,用 mermaid.render 把代码体替换为 SVG 容器(保留 banner 与复制按钮),并对主题切换做重渲染。
维护提示:
.md-code-block结构来自@deepseek-ai/dsh-client-ui-primitives的CodeBlock组件;若 DSH 大版本升级改变该 DOM,本插件有文本回退判定(banner 文本 =mermaid),一般仍可工作,但建议升级后顺手验证。
插件按 DSH 官方 bundle 机制打包(manifest 声明 dsh.bundle.patch,包内自带 cordis.patch.yml),用 DSH 自带的插件命令一键安装:
# 从 npm 安装(推荐):
dsh plugin --profile web add dsh-web-mermaid
# 备选:从 GitHub 或本地目录安装:
dsh plugin --profile web add "github:vtxf/dsh-web-mermaid"
dsh plugin --profile web add "file:/path/to/dsh-web-mermaid"
# 卸载:
dsh plugin --profile web remove dsh-web-mermaid
安装或卸载后重启 dsh web 即可。
原理:dsh plugin 转发 pnpm 安装依赖,并自动把声明了 dsh.bundle.patch 的包加入 profile 的 dsh.profile.bundles 层;包内 cordis.patch.yml 即该层的 patch,随包自动注册插件行(- insert: [{ id: dsh-web-mermaid, name: dsh-web-mermaid }])。无需 junction、无需手改任何配置文件。
手动兜底(不使用
dsh plugin时):把插件装进 profile 的node_modules,并在$DSH_HOME/profiles/web/cordis.patch.yml追加- insert: [{ id: dsh-web-mermaid, name: dsh-web-mermaid }](见cordis.patch.example.yml)。
无需任何操作:在对话中让助手输出 ```mermaid 围栏块,消息结束后自动变成图表。例如:
```mermaid
graph TD
A[开始] --> B{判断}
B -->|是| C[继续]
B -->|否| D[结束]
```
dsh-web-mermaid/
├── package.json # npm 包声明(dsh.bundle + dsh.client + exports["./client"])
├── index.js # Host 半:注册 /plugin-assets/dsh-web-mermaid/mermaid.min.js 路由
├── client.js # 浏览器半:渲染核心 + __ModuleLoader__.load 包装
├── cordis.patch.yml # bundle patch:随 dsh plugin add 自动注册插件行
├── cordis.patch.example.yml # 手动安装兜底示例
├── vendor/
│ ├── mermaid.min.js # mermaid@11.16.1 UMD(离线内置)
│ ├── LICENSE # mermaid MIT 许可
│ └── SOURCE.md # 来源与升级记录
├── CHANGELOG.md # 版本历史
└── prototype/ # 本地开发存档(.gitignore 排除,不随包发布)
client.js 与 prototype/dynamic-client-half.js(两者同源;prototype 仅本地存档,不发布);vendor/SOURCE.md;CHANGELOG.md;npm publish --registry https://registry.npmjs.org(无 TOTP 账号走浏览器 Passkey 认证,需在交互终端执行);package.json 的 name: dsh-web-mermaid 不变(client 模块系统按包名关联 bundle id)。见 CHANGELOG.md。
插件本体 MIT(见 LICENSE);内置 mermaid 为 MIT(见 vendor/LICENSE)。
FAQs
DeepSeek Harness (DSH) Web 插件:把聊天 Markdown 中的 ```mermaid 围栏代码块离线渲染为 Mermaid 图表(SVG)。mermaid 运行时随插件内置,不依赖任何在线 CDN。
The npm package dsh-web-mermaid receives a total of 63 weekly downloads. As such, dsh-web-mermaid popularity was classified as not popular.
We found that dsh-web-mermaid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.