One shell tool for PowerShell / Git Bash / WSL on Windows plus an interactive PTY terminal; the default terminal is chosen by the user in DSH settings.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:MAXeaglet/dsh-bash-terminal
GitHub-sourced plugins run build scripts on your machine at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness (DSH) plugin: one shell tool that runs commands through PowerShell / Git Bash / WSL on Windows, plus an interactive terminal tool — all following the terminal you choose in the Web UI settings.
Features
| Backend | Runs | Syntax / paths | Env vars |
|---|---|---|---|
powershell (default) |
pwsh -NoLogo -NoProfile -NonInteractive -Command <cmd> |
PowerShell; C:\\... |
$env:NAME |
gitbash |
Git for Windows bash -lc <cmd> |
POSIX; /d/WorkSpace; PATH includes /usr/bin and /mingw64/bin |
$NAME |
wsl |
wsl [-d <distro>] -e bash -lc <cmd> |
Linux; /mnt/d/... |
$NAME (via WSLENV) |
- User decides, the AI cannot override: pick the default terminal in Settings -> General -> Default terminal (PowerShell / Git Bash / WSL). The setting persists through the DSH settings system; the
shelltool always obeys it. - Official sandbox seam: the
shelltool resolves the DSH sandbox policy per call and confines PowerShell / Git Bash argv throughctx.sandbox— same fail-closedSandboxUnavailableErrorsemantics as the shipped executors. WSL runs unconfined (its Linux-VM isolation IS the sandbox). Officialsandbox_permissions/justificationescalation and denial markers included. - Interactive terminal: the
terminaltool opens persistent real-PTY sessions over the officialctx.subprocess.spawnTerminalseam (node-pty). Actionsopen/send/read/signal/close; shell state persists across calls; sessions are managed as background jobs and auto-close when idle. - Background execution via the generic jobs registry (
run_in_background/job_output/job_kill).
Install
The package ships the official dsh.bundle manifest (its own cordis.patch.yml): listing dsh-bash-terminal in a profile's dsh.profile.bundles auto-applies the mount — no manual profile edits.
npm install -g dsh-bash-terminal
dsh plugin --profile web add dsh-bash-terminal # adds to profile bundles + applies the patch
powershell -ExecutionPolicy Bypass -File install.ps1 install # patches the DSH settings-UI allowlist (see below)
# restart dsh web
DSH limitation: the Web settings client only exposes a hard-coded allowlist of settings namespaces (
dsh-host-apiproxy); third-party settings writes are refused withsettings-not-exposedotherwise.install.ps1patches the allowlist (with a backup) — re-run it after upgrading DSH;install/uninstallrestores it.
For local development (junction install, source changes apply instantly) see the Chinese README's development section.
Sandbox
danger-full-accesssessions run directly (no wrapping).- Confined sessions wrap PowerShell / Git Bash argv through
ctx.sandbox.confine; fail-closed when no backend is available. - WSL is never wrapped (its VM isolation is the sandbox; results report
enforcement: wsl-isolation). - Denied calls render the official
[sandbox: file access denied under <mode> mode]marker plus a same-turn escalation hint; the model may retry once withsandbox_permissions+justification(user-approved viactx.approval). - Note: DSH's Windows ACL sandbox launcher (
node-addon-landlock-run-win32-x64) is not yet published on npm; the integration is architecture-ready and activates automatically when DSH ships it.
Interactive terminal
terminal actions: open (start a session on the configured default terminal), send (write input + read new output), read, signal (SIGINT = Ctrl+C etc.), close, list (enumerate live sessions). Reads wait for output to settle (quiet 300ms, cap 5s) so send returns the complete reply; buffer overflow reports a truncated notice. State (cwd / variables / aliases) persists across calls; end input with \\n. Sessions are background jobs (job_kill works) and auto-close after 10 idle minutes (idleMs overrides on open).
Interactive terminal known limits (ConPTY)
- Windows PowerShell 5.1 cannot start in a ConPTY (0x8009001d) — install PowerShell 7 for interactive PowerShell (one-shot commands are unaffected).
- wsl.exe interactive mode may hit a WSL service RPC error under ConPTY (0x8007072c, intermittent) — one-shot
wsl -e bash -lc ...works; for interactive WSL prefer a real terminal (Windows Terminal / WSL app) or retry. - Git Bash interactive sessions work fully.
Config
Web UI: Settings -> General -> Default terminal. Plugin row config overrides: defaultShell, timeoutMs, maxTimeoutMs, pwshPath, gitBashPath, wslPath.
Uninstall
powershell -ExecutionPolicy Bypass -File install.ps1 uninstall
Tests
node test/unit.mjs && node test/apply.mjs && node test/client.mjs && node test/terminal.mjs
Links
More in this category
liustack/modlens★ 1199
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
Anionex/dsh-vision-toolkit★ 308
Vision tasks for text-only models: intent-aware image Q&A, long-screenshot OCR, UI reproduction, grounding, and pixel diff.
zhaoolee/notes★ 138
Export DSH conversations as Smartisan Notes-style PNGs, or create and update Markdown notes in a configured account-scoped workspace.
liustack/modsearch★ 85
Web search bridge for text-only agents: ask the web or X, get structured JSON evidence (search, fetch, citations).
Lum1104/dsh-browser★ 80
Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required.
taxueseek/argo★ 69
Search built for agents: multilingual coverage across web, academic, code, shopping, finance, news, and encyclopedias.