dsh-sci
已验证 · 实测可装 Blaczz
功能简介
零依赖科学计算工具:单位转换、物理常数、龙格库塔ODE
可用 — 实测通过,早期项目
零依赖科学计算工具:单位转换、物理常数、龙格库塔ODE 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-sci 🔬
Zero-dependency scientific computing tools for DeepSeek Harness: physical-unit conversion, CODATA physical constants, and Runge–Kutta ODE/dynamical-system simulation. No core changes.
A DeepSeek Harness (DSH) pure tool plugin registering three model tools that scientists reach for daily — all implemented as zero-dependency pure functions: no network, no external software, fully unit-tested.
| Tool | Purpose | Example |
|---|---|---|
units_convert |
Physical unit conversion (length/mass/time/temperature/energy/pressure/frequency/force/angle/volume/area/electric, 70+ units) | 1 eV → J, 0 ℃ → K, 1 kWh → J |
physical_constants |
Look up CODATA physical constants (c, h, e, k, G, N_A, …) | physical_constants("h") |
ode_solve |
4th-order Runge–Kutta integration of common dynamical systems (the simulation engine) | exponential / logistic / harmonic / damped / pendulum / predator-prey / SIR / Lorenz / Van der Pol |
✨ Features
- Zero dependencies: unit conversion, physical constants, and the RK4 integrator are hand-written pure functions — no runtime
node_modules, no network. - Safe simulation:
ode_solveuses a curated model library (9 dynamical systems) with parameters, not arbitrary code execution — safe for the model to call. - Verified accuracy: the RK4 integrator is checked against analytic solutions (
e^-t,cos t) in unit tests. - Zero core changes: pure
ctx.tools.register, no client bundle.
📦 Install
Prereqs: DSH (dsh web works), Node ≥ 22.19, pnpm.
# From GitHub (prebuilt lib/ committed)
dsh plugin --profile web add "github:Blaczz/dsh-sci#main"
# Local directory
cd dsh-sci && npm install --legacy-peer-deps && npm run build
dsh plugin --profile web add ./dsh-sci
Restart dsh web after install, then ask the agent: "convert 5 eV to joules", "look up the Planck constant", or "simulate a damped oscillator with ω=2, ζ=0.1 out to t=20".
🔬 Usage
User: simulate the Lotka-Volterra predator-prey model, alpha=1, beta=0.1, gamma=1, delta=0.02, to t=50
agent → ode_solve(model="lotka-volterra", params={...}, tEnd=50)
→ returns the time series + final state [prey, predator]
User: how many joules is 1 electron-volt?
agent → units_convert(value=1, from="eV", to="J") → 1.602176634e-19
User: list all physical constants
agent → physical_constants() → c, h, e, k, G, N_A, … all
🛠️ Development
npm install --legacy-peer-deps
$env:DSH_NODE_MODULES = "$env:USERPROFILE\.dsh\profiles\node_modules"
npm run setup:dsh-workspace
npm run verify # ★ one-shot gate: clean + typecheck + test + build
npm test # vitest (24 tests: units / constants / ODE accuracy + manifest)
Layout
dsh-sci/
├── package.json # dsh.bundle.patch (pure tool plugin)
├── cordis.patch.yml # bundle patch layer
├── scripts/ # build (tsc only) / clean / setup-dsh-workspace / verify
├── src/
│ ├── units.ts # ★ unit conversion (70+ units, dimension + factor + offset)
│ ├── constants.ts # ★ CODATA 2018 physical constants
│ ├── ode.ts # ★ RK4 integrator + 9-model dynamical-system library
│ └── index.ts # host half: registers the 3 tools
└── tests/ # units / constants / ode / manifest
🧩 Ecosystem positioning
- Fills a gap: the DSH ecosystem previously had zero
physics/ode/numerical/fftplugins, and theunitshits were all "unit-test / unit-economics" false positives — no physical unit conversion. The existingdsh-scienceprojects are reproducible Python/R workbenches (not numerical tools), anddsh-robotic-harnessis MuJoCo robotics (a heavy dependency). - Technical route: follows the zero-dependency pure-tool pattern of
omdsh-dev/dsh-tool-*, with pure functions under test. - Zero core changes: pure
ctx.tools.register, no external software, no network.
⚖️ License
MIT © 2026 Blaczz. An independent community plugin, not affiliated with DeepSeek Harness.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-sci」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Blaczz/dsh-sci Headless(CLI)profile:
dsh plugin --profile headless add github:Blaczz/dsh-sci 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。