SymPy-Calculate
Agent 与会话 活跃维护

SymPy-Calculate

11350613/SymPy-Calculate

轻量级智能体预设,在最小配置上加入无状态符号计算工具,每次调用启动独立 Python 进程执行完整脚本并调用本地 SymPy 完成运算,结果隔离且可复现。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
237 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:11350613/SymPy-Calculate
git clone https://github.com/11350613/SymPy-Calculate.git
git clone git@github.com:11350613/SymPy-Calculate.git
README.md main

SymPy-Calculate

A third-party DeepSeek Harness agent preset based on minimal. It adds one
stateless tool, sympy_calculate, which runs a complete Python script in a
fresh process against a local SymPy development checkout.

Security: sympy_calculate executes arbitrary Python with the current
user's permissions and inherited environment. It is not sandboxed. Enable
it only in sessions whose model and permission policy you trust.

Highlights

  • Each call is bounded by a 120-second timeout; stdout and stderr are each capped at 2,000,000 characters.

Set up SymPy

The tool defaults to ~/sympy-dev/sympy and its venv:

sudo apt install -y python3-venv
mkdir -p ~/sympy-dev
git clone https://github.com/sympy/sympy.git ~/sympy-dev/sympy
python3 -m venv ~/sympy-dev/sympy/venv
~/sympy-dev/sympy/venv/bin/python -m pip install -e ~/sympy-dev/sympy

For a different checkout or interpreter, set SYMPY_ROOT / SYMPY_PYTHON
before starting DSH.

Install

Among shipped profiles, install into web only. The web bundle provides
the agent-preset-registry service the preset needs. A custom profile can
use the preset if that profile provides the service as well.

The easiest way is from the Web UI: go to Plugins → Add plugin, enter
@e_11350613/dsh-sympy-calculate@1.0.6, choose Custom address under
Registry, and enter https://registry.npmjs.org/. Then select Install.
No GitHub URL or SSH key is needed.

Add plugin dialog with the package name filled in and a custom npm registry selected

Alternatively, from the CLI, install
@e_11350613/dsh-sympy-calculate
from npm into the web profile. If dsh is already on your PATH, replace
the npx --yes @deepseek-ai/dsh@0.2.1-rc.2 prefix with dsh.

npx --yes @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web add \
  @e_11350613/dsh-sympy-calculate@1.0.6
Alternative installs: GitHub tarball, GitHub shorthand, or a DeepSeek Harness source checkout HTTPS tarball, if you prefer to install directly from GitHub: ```sh npx --yes @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web add \ https://codeload.github.com/11350613/SymPy-Calculate/tar.gz/v1.0.6 ``` Git shorthand, when GitHub SSH access is already configured: ```sh npx --yes @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web add \ github:11350613/SymPy-Calculate#v1.0.6 ``` From a DeepSeek Harness source checkout, use `pnpm dsh`: ```sh pnpm dsh plugin --profile web add \ @e_11350613/dsh-sympy-calculate@1.0.6 ```

Start or restart the web profile. SymPy Calculate will then be
available as an agent preset for new tasks.

Verify

Check the composed profile:

npx --yes @deepseek-ai/dsh@0.2.1-rc.2 --profile web --dump-config \
  | grep "SymPy Calculate"

In the Web UI, confirm that SymPy Calculate appears as an agent preset
without a Failed to load badge.

Usage

sympy_calculate expects one complete script:

{
  "code": "from sympy import *\n\nx = symbols('x')\nprint(integrate(x**2 / (1 + x**4), (x, -oo, oo)))\n"
}

Output:

sqrt(2)*pi/2

Troubleshooting

Symptom Fix
sympy_calculate: no Python interpreter under ... Run the SymPy setup above, or export SYMPY_ROOT / SYMPY_PYTHON before starting dsh.
Remove the plugin npx --yes @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web remove @e_11350613/dsh-sympy-calculate
Removal fails with ERR_PNPM_MISSING_TARBALL_INTEGRITY Run cd ~/.dsh/profiles/web && pnpm remove @e_11350613/dsh-sympy-calculate --config.trust-lockfile=true (skips lockfile verification for this removal), then restart DSH.

Tested on

Issues

Bug reports and feature requests: https://github.com/11350613/SymPy-Calculate/issues

License

MIT. See LICENSE.