dsh-gitbash-preset:让 DeepSeek Harness 极简模式在 Windows 上可用 Git Bash
liceses/dsh-gitbash-preset
DSH plugin:一键安装极简模式 Git Bash 预设,让 Windows 上 bash 工具真正可用。
为 DeepSeek Harness 的极简模式提供 Git Bash 支持,解决 Windows 上 bash 不可用的问题。
dsh plugin --profile web add github:liceses/dsh-gitbash-preset- 分类
- 开发与运维
- 平台
- DSH-Plugin
- 作者
- liceses
- 分发方式
- 插件
dsh-gitbash-preset 核心特性
dsh-gitbash-preset 仓库信息

dsh-gitbash-preset 仓库简介
dsh-gitbash-preset 是 DeepSeek Harness(DSH)的插件(DSH plugin),用于在 Windows 上修复 DSH 自带极简模式无法使用 bash 的问题。该插件通过一键安装「极简模式 (Git Bash)」agent preset,将 bash 调用映射到 Git for Windows 的 bash(MSYS),使极简模式在 Windows 上真正可用。它解决了两个核心问题:PTY 平台限制(win32 上不支持)和 shell 缺失(Windows 默认无 bash)。插件提供幂等安装、自动探测 bash 路径、沙箱感知门控等能力,并保持极简模式原有的 persona 和 str_replace_editor 工具不变。
dsh-gitbash-preset 这个 DSH plugin 支持哪些核心特性?
该插件具备多项实用特性:幂等安装(预设已存在时跳过,除非 force: true);自动探测 bash(依次检查 GIT_BASH 环境变量、常见安装目录、PATH 中的 bash.exe,最后兜底为 bash);沙箱感知门控(仅在完全访问策略下执行命令,受限时给出升级指引);极简模式不变(固定 persona、str_replace_editor、无上下文压缩)。此外,bash 每次调用都使用新 shell,不保持 cd/export 状态,这是 Windows 上 PTY 不可用时的替代设计。
dsh-gitbash-preset 怎么安装?
安装命令如下,执行后重启 DSH 生效:
dsh plugin --profile web add github:liceses/dsh-gitbash-preset
也可以手动合并 cordis.patch.yml 到 profile patch 层,或者不装插件,直接把 agent-presets/minimal-gitbash/ 目录复制到 ~/.dsh/.agent-presets/。
dsh-gitbash-preset 如何使用?
在 Web 界面新建会话,选择「极简模式 (Git Bash)」。启用 bash 有两种方式:一是将会话沙箱切换到完全访问,之后所有 bash 调用直接走 git bash;二是保持 workspace-write,让模型在第一次调用失败后按提示使用 sandbox_permissions: "danger-full-access" 进行单次升级(走正常审批流程)。
dsh-gitbash-preset 有哪些配置项?
预设配置(agent.cordis.yml 中 gitbash-executor)包括:shellPath(默认自动探测,可显式指定)、timeoutMs(默认 120000)、maxTimeoutMs(默认 600000)、maxOutputBytes(默认 64000)、graceMs(默认 3000)。插件配置(cordis.patch.yml)有 force 字段(默认 false,是否覆盖已有预设)。
dsh-gitbash-preset 的开发与限制是什么?
开发方面,运行 npm run check 进行语法检查,npm run test 运行 10 个单元测试(路径转换、探测优先级、配置校验)。限制包括:沙箱为 workspace-write 或更窄时 git bash 无法启动(MSYS 受限令牌限制),需切换完全访问或单次升级;bash 每次调用新 shell,不保持状态。该插件由 liceses 维护,采用 MIT 协议,最近更新于 2026-08。