
liceses/dsh-gitbash-preset
1060Last commit Aug 15, 2026
dsh-gitbash-preset DSH plugin
This plugin delivers a preset variant of DSH's minimal mode that works on Windows. It replaces the persistent bash session with per-command invocations of Git Bash, and includes sandbox-aware gating to ensure security boundaries are respected. The preset is installed automatically on plugin startup, with automatic detection of the Git Bash executable.
How to install the dsh-gitbash-preset DSH plugin
dsh plugin --profile web add @icelily/dsh-gitbash-presetCopying does not run this command. Review the repository and version before installing the dsh-gitbash-preset DSH plugin.
dsh-gitbash-preset DSH plugin data source
dsh-gitbash-preset DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-gitbash-preset DSH plugin can do
- Idempotent installation: copies preset to user's preset root on startup, skips if already present, overwrites only with force flag
- Automatic detection of Git Bash path via environment variable, common install directories, or PATH lookup
- Sandbox-aware gating: only allows execution under 'danger-full-access' sandbox policy, otherwise provides clear upgrade instructions
- Preserves the original minimal mode persona and str_replace_editor tool without context compression
Where the dsh-gitbash-preset DSH plugin fits
- Run DSH minimal mode on Windows where the default persistent bash fails due to PTY limitations
- Execute bash commands in a Windows environment without needing a separate Linux subsystem
- Use Git Bash as the shell for DSH tool calls, with automatic path detection and configurable timeout/output limits
- Integrate minimal mode into existing DSH web profiles on Windows machines
Who the dsh-gitbash-preset DSH plugin is for
- DSH users on Windows who want to use the minimal mode preset
- Developers who need a bash execution environment in DSH without requiring WSL or Cygwin
dsh-gitbash-preset DSH plugin limitations
- Git Bash cannot start when sandbox is set to workspace-write or narrower due to MSYS restricted token limitations; requires danger-full-access or single-use upgrade
- Unlike the original minimal mode, each bash invocation starts a new shell — no persistent cd/export state between commands
- Only available on Windows platform (Git Bash is a Windows-specific tool)
dsh-gitbash-preset DSH plugin: from the repository README
Quoted from the liceses/dsh-gitbash-preset README, the upstream source of the dsh-gitbash-preset DSH plugin. Copyright remains with the original authors.
DeepSeek Harness 插件:一键安装「极简模式 (Git Bash)」agent preset —— 把 DSH 自带极简模式中的 bash 调用映射到 Git for Windows 的 bash(MSYS),让 Windows 上的极简模式真正可用。 ## About DSH 自带的极简模式在 Windows 上无法使用,失败有两层原因: 1. **PTY 平台限制**:极简模式的持久 bash 依赖 PTY 后端,而 `@deepseek-ai/dsh-subprocess-local` 在 win32 上直接拒绝(`terminal inspection is unsupported on platform win32`),与 bash 是否存在无关; 2. **shell 缺失**:即便绕过 PTY,`@deepseek-ai/dsh-bash-local` 硬编码从 PATH 找 `bash`,Windows 上默认没有。 本插件交付一个可安装的预设变体:**同一套极简 persona + str_replace_editor 双工具表面**,但 bash 工具每次命令执行 `<git bash> -c <command>`,并通过沙箱感知门控保证不绕过安全边界。 ## 特性 - **幂等安装**:插件启动时把打包的预设复制到用户预设根(`${DSH_HOME:-~/.dsh}/.agent-presets/minimal-gitbash/`),已存在则跳过,`force: true` 才覆盖; - **自动探测 bash**:`GIT_BASH` 环境变量 → 常见安装目录(ProgramFiles / ProgramFiles(x86) / LOCALAPPDATA)→ PATH 中的 `bash.exe` → 兜底 `bash`,无需硬编码路径; - **沙箱感知门控**:MSYS 运行时无法在 Windows 受限令牌沙箱内启动(无法创建 signal pipe),因此命令仅在"完全访问"策略下执行——不绕过沙箱,受限时给出明确升级指引; - **极简不变**:固定 persona、`str_replace_editor`、无上下文压缩,与原极简模式一致。 ## 工作原理 | 环节 | 说明 | | --- | --- | | 插件行 | `cordis.patch.yml` 在 web profile 组合中插入 `dsh-gitbash-preset`,启动时安装预设文件 | | 预设组合 | `agent.cordis.yml` 中 `gitbash-shell` 组以 entry-local realm 提供 `shell` 服务,`tool-bash` 注册模型工具 | | 执行器 | `gitbas
Read the full READMERepository license: MIT
dsh-gitbash-preset DSH plugin questions
How do I install this plugin?
Run `dsh plugin --profile web add @icelily/dsh-gitbash-preset` in your terminal. After restarting DSH, the preset will be installed automatically. You can also manually copy the `agent-presets/minimal-gitbash/` directory to `~/.dsh/.agent-presets/` if you prefer not to use the plugin.
Does this plugin require full access sandbox?
Yes, the Git Bash execution only works when the sandbox policy is set to 'danger-full-access' (or no sandbox). If you have a narrower sandbox like workspace-write, the plugin will fail gracefully and provide instructions to upgrade. You can either change the session sandbox to full access or use a single-use justification flow.
Why does each bash call start a new shell?
On Windows, persistent bash sessions (like the original minimal mode) require PTY support, which is not available in the standard DSH local subprocess backend. To work around this, the plugin uses a new shell for each command invocation. This means state like current directory or exported variables is not preserved between calls.
Can I configure the Git Bash path manually?
Yes, you can set the `shellPath` option in the preset configuration (agent.cordis.yml) to explicitly specify the path, e.g., `'C:\Program Files\Git\bin\bash.exe'`. The plugin also automatically detects the path via environment variables, common install directories, and PATH lookup.
How do I uninstall this plugin?
Run `dsh plugin --profile web remove @icelily/dsh-gitbash-preset` and restart DSH. The preset files copied to `~/.dsh/.agent-presets/minimal-gitbash/` will not be removed automatically; you can delete them manually if you no longer need them.