phelpsyacht/dshmath-manim
deepseek harness Manim数学插件
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH), designed to help DSH's LLM agent generate mathematical animation videos using Manim CE. It registers four tools and two skills to DSH's agent context, enabling the model to take natural language descriptions of mathematical concepts and turn them directly into rendered animation videos. To use it, you first need to install Python dependencies: run pip install manim numpy to get the required rendering libraries on your local machine. After that, you can load the plugin into DSH with the dsh --patch command, or install it via npm, tarball, or directly from GitHub, following DSH's standard plugin packaging conventions.
The plugin caters to both non-technical users and advanced users with different workflow needs. Non-coding users can launch the built-in zero-code wizard by running python3 py/wizard_server.py --port 8321 from the project root, then open the local http://127.0.0.1:8321 address in a browser to generate animations. You just select a pre-built template, fill out parameters in the auto-generated Chinese form, and click the generate button to preview and download your animation video, no code required at all. For advanced use cases that are not covered by existing templates, the plugin supports custom Manim code generation with built-in safety checks to prevent malicious operations.
The plugin includes multiple security layers to keep your system safe when rendering animations. All template-based rendering only does simple text parameter replacement, and it never evaluates untrusted input from the model directly. For custom code generated by the model, AST static checking is run first to intercept dangerous imports and function calls like os or eval that could pose a security risk. All rendering runs in an isolated Python child process with configured timeouts, so any failed or malicious process can be terminated cleanly without affecting your main DSH instance. This plugin is released under the open-source Apache 2.0 license, with peer dependencies properly aligned to DSH version 0.1.5-rc.2 and newer.
这是专为DeepSeek Harness(DSH)开发的原生插件,基于Manim CE实现将数学概念渲染为动画视频的功能。它为DSH的大语言模型代理提供了四个工具和两个内置技能,允许模型直接根据自然语言描述的数学概念生成对应动画视频。它同时支持零代码模板渲染和自定义代码渲染两种路径,还内置了安全校验机制,能够满足不同复杂度的动画生成需求。
面向不懂代码的用户,该插件提供了零代码可视化向导服务,用户只需选择预设模板,通过中文表单填写参数,即可一键生成数学动画,全程无需编写任何代码。插件内置了六个常用数学动画模板,涵盖函数绘图、导数切线、定积分、几何图形、极坐标曲线和3D曲面,能够满足绝大多数基础数学动画的生成需求。
该插件遵循DSH的Cordis插件规范,需要本地安装带Manim和NumPy的Python环境才能完成渲染,同时提供npm发布、压缩包、GitHub源码等多种安装方式。它采用AST静态安全校验和进程隔离机制保障运行安全,拦截危险操作,还支持自动错误修正重试,有效提升了动画渲染的成功率。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dshmath-manim(phelpsyacht/dshmath-manim)
仓库:https://github.com/phelpsyacht/dshmath-manim
本站详情页:https://www.yhbd.top/plugins/phelpsyacht-dshmath-manim/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 Apache-2.0 · ⭐ 3 · 最近提交 2026-09-30 · 主语言 Python
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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命令行安装
dsh plugin --profile web add dshmath-manim
把 phelpsyacht/dshmath-manim 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dshmath-manim
DeepSeek Harness(dsh)数学动画插件 —— 基于 Manim CE 将数学概念渲染为动画视频。
「一切皆插件」:本插件以 Cordis 插件形式提供一组 Tool,模型通过自然语言即可生成数学动画。
架构
┌─────────────────────────────────────────────────────────────┐
│ DeepSeek Harness (dsh) │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ dshmath-manim (TS / Cordis 插件) │ │
│ │ tools: list_math_templates / render_math_scene │ │
│ │ render_math_code / validate_math_code │ │
│ └──────────────────────┬────────────────────────────────┘ │
│ │ spawn python3 (沙箱子进程) │
└─────────────────────────┼───────────────────────────────────┘
▼
py/manim_runner.py(渲染执行器)
├── 模板系统(JSON 声明参数模式 + Python 场景代码)
├── AST 静态安全校验(拦截 os/import/eval 等)
└── manim CLI 渲染(low/medium/high/ultra)
目录结构
dshmath-manim/
├── math-manim.cordis.yml # 插件加载配置
├── package.json / tsconfig # TS 插件(tools 注册)
├── src/
│ ├── index.ts # 插件入口,注册 4 个工具
│ └── runner.ts # TS ⇄ Python 桥接(子进程 + 超时 + 安全环境)
└── py/
├── manim_runner.py # 渲染执行器(模板/校验/渲染,JSON 输出)
├── templates/ # 数学动画模板
│ ├── function_plot # 函数绘图(一/二元函数)
│ ├── derivative_tangent# 导数与切线(数值斜率)
│ ├── definite_integral # 定积分(曲线下面积)
│ ├── geometry # 几何图形(三角形/圆/正多边形)
│ ├── polar_plot # 极坐标曲线(心形线等)
│ └── surface_3d # 3D 曲面(ThreeDScene)
└── examples/ # 自定义场景示例(走 render_math_code 自由代码路径)
├── spring_mass_oscillator.py # 弹簧振荡(简谐运动,含 x(t) 轨迹同步)
├── spring_oscillator.py # 弹簧振子(位移-时间)
└── bouncing_ball.py # 小球弹跳
数学动画向导(零代码使用)
面向只懂数学、不懂代码的用户。启动后浏览器打开即可使用:
python3 py/wizard_server.py --port 8321
# 打开 http://127.0.0.1:8321
流程:选择场景卡片(函数图像/导数切线/定积分/几何/极坐标/3D 曲面)→ 填写数学参数(全中文表单)→ 点击「生成动画」→ 预览并下载视频。全程无任何代码。
每个模板在 py/templates/*.json 中带有 ui 元数据(中文标签、参数提示、控件类型、下拉选项),向导页面由此自动生成表单。
提供的工具(模型可见)
| 工具 | 作用 | 适用场景 |
|---|---|---|
list_math_templates |
列出模板与参数模式 | 开场发现能力 |
render_math_scene |
模板参数化渲染(安全) | 推荐路径 |
render_math_code |
渲染模型自写 Manim 场景 | 模板不匹配时 |
validate_math_code |
AST 静态安全校验 | 渲染前的自愈检查 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Minglink/dsh-infinite-gen-4
kenryu42/cc-safety-net
hyhmrright/brooks-lint
toby-bridges/api-relay-audit
hashgraph-online/hol-guard
SeaOf0/dsh-redteam-model
howmp/dsh-pentest