DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Scientific Computing — DeepSeek Harness 插件(DSH Plugin)
← Plugins
S

@kiwifruit/dsh-scientific-computing

Scientific Computing

NumPy/SciPy 科学计算工具 — 以 DSH Cordis 插件形式集成,模型通过 math_compute 工具发起任意 NumPy/SciPy 运算

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:kiwifruit13/dsh-scientific-computing#771bec7ee4289c43e7dc479e77bb578fa05592f5
README兼容性版本

兼容性与来源证明

Scientific Computing 以 @kiwifruit/dsh-scientific-computing 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/26

版本

0.1.1stable
2026/8/26
最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
GPL-3.0
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/8/26
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

DSH-Scientific-Computing

NumPy / SciPy 数学计算工具,以 DSH(DeepSeek Harness)Cordis 插件形式集成到 AI Agent 的工具调用链。

模型可通过 math_compute 工具随时发起任意 NumPy / SciPy 运算,返回结构化 JSON 结果。


目录结构

DSH-Scientific-Computing/
├── src/
│   └── index.js              # DSH Cordis 插件(ESM,name/Config/apply)
├── scripts/
│   ├── math_compute_tool.py  # Python 计算引擎(stdin JSON → stdout JSON,安全重构版)
│   ├── run_tests.py          # 30 用例回归测试(含注入防御)
│   └── verify_plugin.py      # 五层验证脚本
├── docs/
│   ├── 集成指南.md            # 权威操作指导(唯一真相源)
│   └── 坑与经验沉淀.md         # 踩坑记录
├── cordis.patch.yml          # 发布版 bundle patch(npm 包名)
├── package.json              # npm 包清单
├── LICENSE                   # GPL-3.0
├── README.md                 # 本文档
└── AGENTS.md / CLAUDE.md     # 项目规范

安装

方式一:npm(推荐)

dsh plugin --profile web add @kiwifruit/dsh-scientific-computing

方式二:源码直装

dsh plugin --profile web add file:/你的路径/DSH-Scientific-Computing

前置条件

  • Python 3.8+,已安装 numpy 和 scipy
  • DSH(dsh CLI 可用)
  • Node.js ≥ 18
pip install numpy scipy

快速验证

1. Python 引擎独立测试

echo '{"operation":"sum","args":[[1,2],[3,4]],"module":"numpy"}' \
  | python scripts/math_compute_tool.py

# → {"success": true, "result": {"type": "array", "value": 10}}

2. 全量回归测试

python scripts/run_tests.py
# PASS: 30/30 all passed

覆盖数组聚合、线性代数(含 solve/lstsq)、FFT、优化(lambda)、布尔参数、keepdims、注入防御、非法类型。

3. 插件合规验证

python scripts/verify_plugin.py

支持的运算

类别操作module
数组聚合sum, mean, std, var, min, max, argmin, argmax, cumsum, prod, tracenumpy
线性代数inv, det, eig, eigvals, svd, qr, norm, pinv, solvenumpy.linalg
信号处理fft, ifft, rfft, irfft, fft2, ifft2, fftfreqnumpy.fft
矩阵乘法dot, matmulnumpy
优化minimize, linprog, least_squares, rootscipy.optimize
其他normscipy.linalg

Lambda 函数传参

优化类操作需要传 lambda,须用字符串形式:

{
  "operation": "minimize",
  "module": "scipy.optimize",
  "kwargs": {
    "fun": "lambda x: x[0]**2 + x[1]**2",
    "x0": [1, 0]
  }
}

配置

通过 cordis.patch.yml 或 config 参数配置:

字段默认值说明
pythonPath'python'Python 解释器路径(系统 PATH 或绝对路径)
enginePath自动解析Python 引擎脚本路径;缺省从插件 install 位置自动解析

覆盖 enginePath

如需使用自定义 Python 脚本:

- insert:
    - id: scientific-computing
      name: '@kiwifruit/dsh-scientific-computing'
      config:
        pythonPath: 'python'
        enginePath: 'C:/custom/maths/math_compute_tool.py'

输出格式

成功

{
  "success": true,
  "result": {
    "type": "array" | "scalar" | "result" | "other",
    "value": [...]
  }
}

失败

{
  "success": false,
  "error": "Import error: No module named 'numpy'"
}

通信协议

插件 (JS)                    Python 引擎
   │                          │
   │── JSON stdin ──────────→│  module, operation, args, kwargs
   │←── JSON stdout ─────────│  success, result
   │                          │

验证清单

#检查项命令
1插件已安装dsh plugin --profile web list
2模块形状合法node -e "import('./src/index.js').then(m=>console.log(m.name))"
3引擎直连正常echo '{"operation":"sum","args":[[1,2]]}' | python scripts/math_compute_tool.py
4完整测试通过python scripts/run_tests.py
5合规验证通过python scripts/verify_plugin.py

发布到 npm

npm publish --access public

最后更新:2026-08-26