dsh-gitbash-shell
In a curated listMaintenance: Activekannakuron/dsh-gitbash-shell
DSH plugin: Git Bash shell for all agent modes on Windows (replaces pwsh executor)
$ dsh plugin add dsh-gitbash-shellInstall
dsh has no central install command — add this plugin’s entry (documented in its README) to your profile or patch config, then restart.
How installs work41
stars
5
forks
JavaScript
Language
MIT
License
2026-08-23
Created
2026-11-04
Last push
README
dsh-gitbash-shell
简体中文 | English
Unreleased/实验性实现讨论:下述 fail-closed 与两个显式工具尚未正式发布,不是发布候选;安装公开 npm 包不保证包含这些变更。详见设计、接口与待讨论决定、验证矩阵与复现及 CHANGELOG。
让 DeepSeek Harness (dsh) 在 Windows 上默认用 Git Bash 跑命令的官方风格插件 —— 不替换宿主执行器(官方 PowerShell 执行器原样保留):新增自有 bash 工具 (私有 Git Bash 执行器实例,不注册为服务),并为所有模式注册对应的 Git Bash 版 agent preset。
它解决什么
官方 Windows 组合默认把 dsh-pwsh-sandbox 作为 ctx.shell(PowerShell 执行器),
且各 preset 的 tool-bash 行在 win32 上被禁用——因为在 Windows 上裸 bash
会解析到 C:\Windows\System32\bash.exe(WSL 占位)。本插件不替换这个执行器:
它新增一个自有 bash 工具,执行在私有的 Git Bash 执行器实例上(继承官方
@deepseek-ai/dsh-bash-sandbox,bashPath 只认 Git for Windows)。沙箱语义在
POSIX 宿主上完整保留;
Windows 宿主上受限模式有一处重要例外——见下方
「安全语义:Windows 上的受限模式」。
安装本插件后(v0.35.0 起,默认):
-
官方四个模式直接获得 Git Bash——模式列表保持官方原样,不再新增变体: 每个会话创建时,本插件探测该模式的工具面,「有 pwsh 无 bash」(官方 Windows 组合的形态)即在该会话内注册自有 bash 工具(对官方 tool-bash 逐调用镜像: 后台任务、审批升级、渲染行为不变)。宿主官方
pwsh工具是真正的 PowerShell(v0.39.0 起,本插件不再替换执行器),默认被隐藏、开关显示——见下一条。 -
bash 工具说明附带路由规则:能用 Git Bash 就用 Git Bash;只有必须用到 Windows 原生能力(cmdlet/注册表/服务/WMI)时才用 PowerShell;bash 出错在 bash 里修,禁止在 bash 里嵌
pwsh -Command(变量展开与输出编码会在那里坏掉)。 -
pwsh工具(官方 PowerShell,默认隐藏,开关显示):宿主官方的pwsh工具 就是真正的 PowerShell(官方解析器自动优先 PowerShell 7),可直接用于 Windows 原生操作(cmdlet/注册表/服务/WMI)。默认关闭(pwshTool开关):该工具对本插件 会话隐藏,主机保持 bash 优先;开启后它直接可见可用——无需安装任何额外组件。 旧 PowerShell 7 旁路工具(v0.37–v0.38.5 的独立工具)已随 v0.39.0 新架构退役; 命令仍然首选 bash 工具。pwshTool与experimentalNative的工具面可见性只影响新会话或重启后的 会话:运行中的会话会保持它创建时的工具面,保存开关只在宿主日志留一行提示,不会中途重建。 实验原生工具的执行门禁仍按当前开关立即生效。 -
gb_*FastCtx 文件工具(默认关,v0.39.4 起弃用):gb_inspect_local_file/gb_grep/gb_glob/gb_replace(Rust 实现:批量范围读取带 token 预算、grep 截断 标注、编码探测)。它们是官方 read/grep/glob/edit 的补充——官方工具接 文件沙箱,仍是默认推荐。dsh-ops 0.3.0 起原生ops_*文件工具取代了 FastCtx 上游,本组默认关闭(fastctxTools显式开启可恢复);已安装 dsh-ops 时无论开关如何都会自动让位。与 dsh-ops 并存时本插件继续负责/c/方言统一:ops_*的入参(含root/operations[].path/protect) 自动转换、返回与报错路径自动回流/c/。 -
与 dsh-ops 并存:bash 只留一份(v0.42.0;v0.46.0 跟随 0.4.3 行集):宿主机制决定「可见但拒绝」到不了「看不见」——
tools.restrict只能过滤继承面,而ops_bash注册在 agent 自有层。于是本插件直接接管 dsh-ops 自带的publishBashTool开关(经官方 configEditor 通道写为false):安装本插件时ops_bash不再出现在模型工具面;ops 的 pwsh7 overlay(给官方 pwsh 工具供路径)与文件/后台增强不受影响 ——publishBashTool 的门只套在mountSessionBash上,pwsh 走mountBundledPwsh独立路径。 行集随 dsh-ops 0.4.3 变化:旧版开关在dsh-ops-shell组件行上;0.4.3 起该行消失,改成四个 preset-mode 行dsh-ops-mode-minimal/-standard/-ptc/-cordis(四行的执行计划都含 Windows shell,都能发ops_bash),本插件对在场的每一行都写false,旧行仍在的混合 profile 也照样处理。ops_run无需处理:它在 dsh-ops 的 bundle 装配中本就没有发布路径——bundle 只有 mode/discovery/compat/panel/tui 八行,前台ops_run只是未被任何调用点使用的默认参数。 停用或卸载本插件的瞬间自动还原(dispose 钩子撤回覆盖,同 row 的其它设置原样保留),重新启用 又会自动接管。三个边界:①关机状态下卸载的残余覆盖,用 dsh-ops 设置卡「恢复默认」一键撤回; ②停用时若覆盖值已被你手动改回true,视为你的选择、不动它;③dsh-ops 0.4.3 起按 preset id 门控:它只认官方四个 preset,本插件的ptc-cordis与「· Git Bash」变体 id 不在其中——那些 会话里 dsh-ops 什么也不发布(也不隐藏官方 pwsh/read/glob/grep),我们的 bash 是唯一命令工具。 无设置开关——想用ops_bash就停用本插件,还原是自动的。 后台任务与文件/PTC 增强全部让给 dsh-ops(2026-10-19 用户决策):剔除清单被守卫测试 锁死为ops_bash+ops_run两项,永不含ops_run_background/ops_job_*——你启用 dsh-ops 的「后台任务」组件后,这组全局工具在普通会话与 PTC 创造模式下原样可见可用, 本插件不做任何 deny。bash 归 gitbash,后台与增强归 dsh-ops,职责互不越界。
四个「· Git Bash」变体 preset 仍保留,默认关闭(variantPresets 开关,
设置卡可开):开启后注册 standard-gitbash/minimal-gitbash/code-gitbash/
cordis-gitbash 四个变体并停用官方模式的工具补位(两者互斥)。
⚠️ 从 0.34.x 升级:变体默认关闭。全局默认模式会自动迁移——若你之前把默认设成 某个变体(
*-gitbash),升级后首次启动会经官方设置通道切到对应官方模式 (standard-gitbash→standard、minimal-gitbash→minimal、code-gitbash→ptc、cordis-gitbash→cordis);打开variantPresets则不迁移、一切照旧。钉在变体上的 旧会话无法被迁移(官方agent-preset/locked锁定),请新建会话。
原有 标准模式/极简模式/PTC 模式/创造模式(shipped)与
dsh-ptc-cordis-preset 的 PTC 创造模式 用户 preset 均不受影响、自动受益。
宿主要求与 preset 对齐
自 v0.49.0 起宿主下限为 dsh >= 0.2.2-rc.1:门禁读 engines.dsh(rc.1 的 app-boot 只要见到该字段就忽略 peer,semver 以 includePrerelease: true 求值),peerDependencies 同步声明并标 optional;只服务这一代宿主。四个变体的行集是 src/compositions.js
里已提交的 JS 数据,镜像官方 0.2.2-rc.1 的 standard/minimal/ptc/cordis 行切分并叠加
Git Bash 增量;跟随 dsh 升级的对齐由冒烟测试
compositions: dsh >=0.2.2-rc.1 executor shape and profile-context gates 锁住。
preset id 保持 code-gitbash 不变——会话钉在 id 上,dsh 0.1.2 把内置 code
改名 ptc 时本插件的变体 id 就没有跟随(改名会让已固定的会话报 preset not found)。
可选官方行按包探测接入:rc.1 全工具 preset 自带时间上下文(time-context)与
提醒工具(schedule_*),极简 preset 自带 image-only tool-fs 与专属 compaction 组,
全工具 preset 另有插件市场(tool-plugin-market)。本插件在挂载时按 ctx.baseUrl
探测这些包,可用才纳入对应变体;剥掉某个包的 profile 只降级该行,不会拒绝整棵
preset 挂载。
0.2.2-rc.1 基线:官方全工具 preset 的 tool-fs 行带
config: { applyPatch: false },本插件的 standard/cordis/ptc 变体同步,极简变体不加;
插件管理/市场行按 rc.1 门控(cordis 两者跟 profileContext,standard 仅 manager 跟
profileContext,ptc 两者恒禁用)。dsh.compatibility.dshReleases 只登记
0.2.2-rc.1。
安装(公开 npm 插件,推荐)
npm: dsh-gitbash-shell, 源码与 Release: github.com/KannaKuron/dsh-gitbash-shell
# web 图形界面
dsh plugin --profile web add dsh-gitbash-shell
dsh plugin add 会自动:① pnpm 安装 npm 包 dsh-gitbash-shell;
② 检测到包声明的 dsh.bundle 后把它追加进该 profile 的
dsh.profile.bundles。重启该 profile 的 host 后生效。
它做了什么
bundle patch(cordis.patch.yml)是纯新增(v0.39.0 起):只插入本插件行
gitbash-shell,不禁用、不替换任何官方行——宿主官方 PowerShell 执行器与全部
官方组件保持原位。旧版「替换执行器」的三步 patch 在 route B 下变成运行时工作:
More in デスクトップ・アプリ
open-design
by nexu-io
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create motion, prototypes, websites, apps, dashboards, presentations, images, and videos with your team and AI agents. Share work, exchange feedback, and iterate together in one workspace.
dsh-desktop
by anywhere-labs
Modern desktop client for the DeepSeek Harness (dsh) plugin ecosystem. Everything is a plugin — even the desktop shell itself.
picgo
by molunerfinn
:rocket: The Ultimate Image Uploader for Efficient Creators. Supports Obsidian, Typora, VS Code etc. and 60+ image hosting services (S3, GitHub, Cloudflare R2, Imgur, Aliyun OSS...). Paste, upload, done.
dsh-desktop
by dataelement
Modern desktop client for the DeepSeek Harness (dsh) plugin ecosystem.
