dsh-plugin
DayuanJiang/next-ai-draw-iodsh 的 draw.io 绘图插件:通过 next-ai-drawio MCP 服务器作图,点回复里的链接在右侧栏打开实时预览,可以手动修改图,AI 的每次修改都是可以恢复的版本。需 Node.js 18+,首次使用由 npx 下载 MCP 服务器。
在 DeepSeek Harness 中复刻 Pi 工具组:安装小写 read/write/edit/bash/find/grep/ls 核心工具,并保留 DSH-backed 网页、任务、计划、todo、think 与 slash 扩展。
English | 中文
Two Full Access-only DeepSeek Harness agent presets whose core tool contract is frozen to @earendil-works/pi-coding-agent 0.84.2.
read, bash, edit, write, grep, find, and ls.The presets use DSH's filesystem, subprocess, attachment, session, cancellation, model-routing, and presentation seams. They are designed and tested only with the danger-full-access permission preset; they do not implement escalation workflows for narrower policies.
| Tool | Pi-compatible behavior |
|---|---|
read(path, offset?, limit?) | Head truncation at 2,000 lines or 50 KiB, offset continuation, a 64 MiB whole-file safety cap, and PNG/JPEG/GIF/WebP/BMP handling subject to DSH attachment capabilities |
bash(command, timeout?) | Fresh real Bash process per call, no persistent state, no default timeout, tail truncation with a private full-output spill file |
edit(path, edits[]) | Original-file matching, unique non-overlapping edits, Pi-style fuzzy punctuation fallback, BOM and CRLF/LF preservation, one guarded atomic write |
write(path, content) | Complete UTF-8 write through DSH; missing parent directories are created by the DSH local filesystem backend |
grep(...) | ripgrep JSON search, default 100 matches, 500-character line clipping, optional context/glob/literal/case control |
find(pattern, path?, limit?) | fd glob search, default 1,000 results, .gitignore-aware relative paths |
ls(path?, limit?) | One directory, dotfiles included, case-insensitive sort, / after directories, default 500 entries |
All seven tools are visible by default. This intentionally differs from Pi 0.84.2's default four-tool activation (read, bash, edit, write): DSH does not reproduce Pi's dynamic tool-activation mechanism.
pi-compatible-plus additionally registers:
WebFetchWebSearchTaskTodoWriteExitPlanModeThinkSlashCommand/plan/compactThese are DSH-backed extensions, not Pi 0.84.2 core tools.
Install the bundle into the DSH Web profile:
dsh plugin --profile web add kingguuu8-svg/dsh-pi-compatible
Or install a local checkout:
dsh plugin --profile web add .
The bundle installs both presets into:
${DSH_HOME:-~/.dsh}/.agent-presets/pi-compatible/
${DSH_HOME:-~/.dsh}/.agent-presets/pi-compatible-plus/
Installation is idempotent and does not overwrite a complete existing preset. Set force: true on the bundle row in the profile patch to replace packaged files during an upgrade. A forced 0.1.x → 0.2.0 migration also removes the known package-owned legacy modules from the Core directory; unrelated user files are preserved.
After installation, create a new session and choose Pi-compatible Core or Pi-compatible Plus.
| Variable | Meaning |
|---|---|
PI_COMPAT_BASH_PATH | Absolute path to the real Bash executable |
PI_COMPAT_FD_PATH | Absolute path to fd |
PI_COMPAT_RG_PATH | Absolute path to rg |
PI_COMPAT_OFFLINE=1 | Disable fd/rg network download |
PI_OFFLINE=1 | Pi-compatible alias that also disables fd/rg download |
DSH_HOME | DSH home and the private pi-compatible/bin cache root |
Bash resolution follows Pi's platform intent: on Windows, Git Bash under Program Files is preferred before PATH Bash. PowerShell is never silently presented as bash.
fd and rg resolution is:
<DSH_HOME>/pi-compatible/bin;When GitHub publishes a SHA-256 asset digest, the downloader verifies it. Downloaded files and extraction directories are private to the current user.
The default persona is intentionally short and direct. To customize it, copy the preset to a new id and edit that copy's agent.cordis.yml. Tool compatibility is the stable product contract; persona text is not.
0.84.2 for this product line.read returns a conversion instruction instead of an image block.read rejects files above 64 MiB before whole-file decoding. Grep context expansion skips files above 10 MiB. These safety bounds prevent one tool call from exhausting the long-lived DSH host.sandbox:policy and approval:policy runtime-context prose because it duplicates the Full Access contract and mentions tool parameters that do not exist in Pi. DSH enforcement remains active, and all other runtime contexts remain available.npm run check
npm test
npm run test:integration
test:integration uses the globally installed DSH rc.6 local filesystem and subprocess packages, executes real Git Bash, and exercises downloaded/cached fd and ripgrep.session.create; no model request is required for mount validation.A user preset is a Cordis composition and has the authority of the plugins it loads. This bundle is intentionally Full Access-only and can execute arbitrary Bash commands and modify arbitrary files allowed by the host process. Review the source before installation.
MIT. See THIRD_PARTY_NOTICES.md for the Pi 0.84.2 behavior reference.