dshbase

Plugin directory / Developer / dsh-matlab

dsh-matlab

Verified · install-tested on dsh weijianguizhou

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-20Last push
Cross-platformPlatform

What it does

A plugin in the Developer category for DeepSeek Harness.

✅
Our take
Works — verified, early-stage project

A plugin in the Developer category for DeepSeek Harness. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-matlab

DSH(DeepSeek Harness)插件:给 Agent 提供 matlab.run 工具——直接跑 MATLAB 代码并返回输出和图片。

特性

  • matlab.run 工具:传 MATLAB 代码 → 写入临时 .m 脚本 → matlab -batch 执行 → 返回 stdout/stderr。
  • 自动存图:代码产生的所有 figure 自动保存为 PNG,返回文件路径(存于工作区 .dsh-matlab/figures/)。
  • 安全审批:MATLAB 可执行任意代码,默认每次调用前请求用户批准(可关闭)。
  • 本地执行:跑在你本机的 MATLAB 上(路径可在插件配置里改)。
  • 零侵入:纯 host 工具插件,不修改任何官方代码。

安装

在目标 profile 中作为 link 依赖安装并加入 bundle 层:

dsh plugin --profile desktop add link:/path/to/dsh-matlab

或在 profiles/<name>/package.json 手动加入依赖,并确保它出现在 dsh.profile.bundles 列表中。装完重启 DSH Desktop 即生效。

配置

插件行可带 config(示例,加在你的 profile 的组合配置里):

- id: matlab
  name: dsh-matlab
  config:
    matlabPath: "D:\\Program Files\\MATLAB 2025\\bin\\matlab.exe"   # MATLAB 可执行文件
    timeoutMs: 120000
    requireApproval: true

不配置则用默认值(检测到的本机 MATLAB 路径)。

开发构建

npm install   # 安装运行时依赖
npm run check # 语法检查

工作原理

  1. matlab.run 接收 code(MATLAB 代码)和可选 workdir。
  2. 把代码写到工作区 .dsh-matlab/run-*.m,末尾追加存图代码段。
  3. 通过 host 子进程通道执行 matlab -batch "run('...')",捕获 stdout/stderr。
  4. 把 .dsh-matlab/figures/ 下的 PNG 列进结果返回给模型。
  5. 退出码非 0 时以 MATLAB_RUN_FAILED 报错,错误信息含 MATLAB stderr,模型可据此改代码重试。

目录结构

src/host/index.js  工具定义(defineTool)与审批钩子
cordis.patch.yml   bundle 补丁:插入插件行

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-matlab for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:weijianguizhou/dsh-matlab

Headless (CLI) profile:

dsh plugin --profile headless add github:weijianguizhou/dsh-matlab

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7819 plugins →