dsh-gitbash-preset
Manifest valid★ 131DeepSeek Harness Plugin: One-click install the "Minimal Mode (Git Bash)" agent preset — maps the bash calls in DSH's built-in minimal mode to the bash (MSYS) of Git for Windows, making minimal mode fully functional on Windows.
dsh-gitbash-preset
DeepSeek Harness plugin: one-click install of the "Minimal Mode (Git Bash)" agent preset — maps the bash invocations in DSH's built-in minimal mode to Git for Windows's bash (MSYS), making minimal mode actually usable on Windows.
About
DSH's built-in minimal mode does not work on Windows, for two reasons:
- PTY platform limitation: minimal mode's persistent bash depends on the PTY backend, and
@deepseek-ai/dsh-subprocess-localrejects it outright on win32 (terminal inspection is unsupported on platform win32), regardless of whether bash is present; - Missing shell: even if you bypass the PTY,
@deepseek-ai/dsh-bash-localhardcodes looking upbashfrom PATH, which is not present by default on Windows.
This plugin ships an installable preset variant: the same minimal persona + str_replace_editor dual-tool surface, but the bash tool executes <git bash> -c <command> for each command, with sandbox-aware gating to ensure security boundaries are not bypassed.
Features
- Idempotent installation: at startup, the plugin copies the bundled preset into the user preset root (
${DSH_HOME:-~/.dsh}/.agent-presets/minimal-gitbash/); if it already exists it is skipped, and onlyforce: trueoverwrites it; - Automatic bash detection:
GIT_BASHenvironment variable → common install directories (ProgramFiles / ProgramFiles(x86) / LOCALAPPDATA) →bash.exeon PATH → falls back tobash, no hardcoded paths required; - Sandbox-aware gating: the MSYS runtime cannot start inside a Windows restricted-token sandbox (cannot create the signal pipe), so commands only run under the "full access" policy — no bypassing the sandbox, with clear upgrade guidance when restricted;
- Minimal stays unchanged: fixed persona,
str_replace_editor, no context compression — identical to the original minimal mode.
How it works
| Stage | Description |
|---|---|
| Plugin line | cordis.patch.yml inserts dsh-gitbash-preset into the web profile composition and installs the preset files at startup |
| Preset composition | In agent.cordis.yml, the gitbash-shell group provides the shell service with an entry-local realm, and tool-bash registers the model tool |
| Executor | gitbash-executor.mjs executes bash -c via the host's subprocess service, handling timeouts, background execution, output truncation, and error diagnostics |
| Sandbox gating | run/start validates the policy: only danger-full-access (or deployments without a sandbox) is allowed through; otherwise an error with guidance is thrown |
Installation
dsh plugin --profile web add @icelily/dsh-gitbash-preset
Alternatively, manually merge cordis.patch.yml into the profile patch layer. Restart DSH to take effect; after restarting, the plugin will install the preset automatically (no-op if it already exists, and it will not overwrite your existing version).
You can also skip installing the plugin and simply copy the agent-presets/minimal-gitbash/ directory into ~/.dsh/.agent-presets/.
Usage
- In the web UI, create a new session and select Minimal Mode (Git Bash);
- Choose one of two ways to enable bash:
- Switch the session sandbox to full access, and all bash calls will go directly through git bash;
- Or keep workspace-write, and let the model upgrade once, after the first call fails, using
sandbox_permissions: "danger-full-access"+ justification as prompted (through the normal approval flow).
Config
Preset configuration (gitbash-executor in agent-presets/minimal-gitbash/agent.cordis.yml):
| Field | Default | Description |
|---|---|---|
shellPath | auto-detected | Explicit value takes priority when set (e.g., 'C:\\Program Files\\Git\\bin\\bash.exe') |
timeoutMs | 120000 | Default timeout per command (capped by maxTimeoutMs) |
maxTimeoutMs | 600000 | Maximum timeout |
maxOutputBytes | 64000 | Bytes retained per stream (overflow is written to a spill file) |
graceMs | 3000 | Grace period for SIGTERM→SIGKILL when terminating the process |
Plugin configuration (the line inserted by cordis.patch.yml):
| Field | Default | Description |
|---|---|---|
force | false | Whether to overwrite with the bundled files when the preset already exists (user's extra files are preserved) |
Development
npm run check # 三个文件语法检查(插件、执行器、测试)
npm run test # 单元测试:路径转换 / 探测优先级 / 配置校验,10 个用例
Limitations
- DSH version: the preset is written for the current
@deepseek-ai/dsh-personafield nameprefix. If your DSH is older (only acceptstext), switching to the preset will report$.prefix missing required value— just changeprefix:back totext:inagent.cordis.yml; - Upgrade note: the installer is no-op by default for an existing preset, and presets installed by versions before
0.1.3are broken (textfield). After upgrading the plugin, setforce: truein the plugin line configuration, or delete~/.dsh/.agent-presets/minimal-gitbash/and restart, to write the fixed files; - When the session sandbox is workspace-write (or narrower), git bash cannot start (MSYS restricted-token limitation); you must switch to full access or do a one-time upgrade — this is a sandbox boundary and the plugin does not bypass it;
- Unlike the original minimal mode, bash is a fresh shell per invocation (cd/export state is not preserved) — persistent PTY sessions are unavailable on Windows, so this is a substitute design.
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.1 | — | — |
| 0.1.2 | — | — |
Comments
Loading…
Similar plugins
by KannaKuron
DSH plugin: Git Bash shell for all agent modes on Windows (replaces pwsh executor)
★ 41
MIT
JavaScript
Oct 28, 2026
dsh plugin --profile web add dsh-gitbash-shellby Very12345
Git-for-Windows bash executor for DeepSeek Harness: a ctx.shell provider that runs commands through the installed Git Bash, so an agent preset can offer a bash tool on Windows without WSL.
★ 0
MIT
JavaScript
Oct 4, 2026
dsh plugin --profile web add @very12345/dsh-bash-windowsby inmny
DeepSeek Harness 插件:让DSH使用Git Bash,能够保持read-only, workspace-write, full-access权限控制依旧可用
★ 18
↓ 84/wk
MIT
JavaScript
Sep 20, 2026
dsh plugin --profile web add dsh-plugin-git-bashby yunuo110
DeepSeek Harness (DSH) bundle plugin: makes the existing bash tool run Git Bash on Windows and disables pwsh.
★ 8
MIT
JavaScript
Sep 4, 2026
dsh plugin --profile web add dsh-gitbashby LAN-TINA-WS
DeepSeek Harness Windows 默认 Shell 策略:探测 git-bash/MSYS2,配置面板一键切换 bash/pwsh,动态注册 bash 工具并裁剪提示词工具面 · DSH 组合插件。
★ 7
↓ 71/wk
MIT
TypeScript
Sep 10, 2026
dsh plugin --profile web add dsh-windows-shell-policyby zimzaza4
在 Windows 环境中为 DeepSeek Harness 提供 Git Bash 与 WSL 2 bash 工具,含 bwrap 沙箱、审批模式、后台任务
★ 12
↓ 164/wk
MIT
JavaScript
Oct 19, 2026
dsh plugin --profile web add @zimzaza4/dsh-bash-win