liceses/dsh-gitbash-preset
DeepSeek Harness 插件:一键安装「极简模式 (Git Bash)」agent preset —— 将 DSH 内置极简模式中的 bash 调用映射至 Git for Windows 的 bash(MSYS),使 Windows 上的极简模式真正可用。
Project Overview项目介绍
This is a native DeepSeek Harness (DSH) plugin built exclusively for DSH on Windows, designed to fix the issue that DSH’s built-in minimal agent preset cannot work properly on Win32 systems. It delivers an installable variant of the default minimal preset, retaining the original persona and str_replace_editor toolset while rerouting all bash command executions to Git for Windows’s MSYS bash. It ships with a DSH bundle manifest and can be installed directly via the DSH CLI with a single one-line command, or added manually by patching the profile configuration to your existing DSH setup.
After installation, you need to restart DSH for the plugin to take effect. On first run, the plugin automatically copies the preset to your DSH user preset directory, and it skips copying if the preset already exists unless you enable the force overwrite option in the plugin configuration. It automatically detects the Git Bash installation path from common Windows install locations, environment variables, and system PATH, so most users do not need to manually configure the shell path. To use the preset, you create a new session in the DSH web interface and select the 'Minimal Mode (Git Bash)' option from the preset list.
This plugin is released under the open-source MIT license, and it has no external dependencies beyond a working DSH installation and Git for Windows installed on your Windows system. It has several documented limitations: it only works with newer DSH versions that use the prefix persona field, so users on older versions need to manually edit the preset configuration to change prefix to text. It also requires the session sandbox to be set to full access to launch Git Bash, due to MSYS runtime limitations on Windows restricted tokens, and does not bypass DSH’s default sandbox security boundaries.
这是专为 DeepSeek Harness (DSH) 开发的原生插件,用来解决 DSH 自带极简模式无法在 Windows 上正常使用的问题。它提供了一个可一键安装的极简模式预设变体,将 bash 命令调用映射到 Git for Windows 自带的 MSYS bash,保留了原极简模式的 persona 和双工具集,同时增加沙箱感知门控不突破原有安全边界。
安装方式支持通过 DSH 命令行一键添加,也支持手动复制预设文件,安装后重启 DSH 即可生效。它会自动探测 Git Bash 的安装路径,也支持用户手动配置指定路径,幂等安装逻辑默认不会覆盖用户已有的自定义预设,除非开启强制覆盖选项。它面向所有在 Windows 平台上使用 DSH 极简模式的开发者,解决原有模式无法运行命令的痛点。
本插件遵循 MIT 开源协议,无额外依赖,本身已经包含完整的功能代码和预设配置。它存在一些使用限制:仅支持适配了 prefix 字段的新版 DSH,旧版需要手动修改配置字段;Git Bash 需要在完全访问沙箱权限下才能启动,不绕过沙箱边界;每次命令调用会启动新 shell,不保留会话状态。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-gitbash-preset(liceses/dsh-gitbash-preset)
仓库:https://github.com/liceses/dsh-gitbash-preset
本站详情页:https://www.yhbd.top/plugins/liceses-dsh-gitbash-preset/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 131 · 最近提交 2026-09-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add @icelily/dsh-gitbash-preset
把 liceses/dsh-gitbash-preset 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-gitbash-preset
DeepSeek Harness 插件:一键安装「极简模式 (Git Bash)」agent preset —— 把 DSH 自带极简模式中的 bash 调用映射到 Git for Windows 的 bash(MSYS),让 Windows 上的极简模式真正可用。
About
DSH 自带的极简模式在 Windows 上无法使用,失败有两层原因:
- PTY 平台限制:极简模式的持久 bash 依赖 PTY 后端,而
@deepseek-ai/dsh-subprocess-local在 win32 上直接拒绝(terminal inspection is unsupported on platform win32),与 bash 是否存在无关; - 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 注册模型工具 |
| 执行器 | gitbash-executor.mjs 通过 host 的 subprocess 服务执行 bash -c,处理超时、后台、输出截断与错误诊断 |
| 沙箱门控 | run/start 校验策略:仅 danger-full-access(或部署无沙箱)放行,否则抛出带指引的错误 |
安装
dsh plugin --profile web add @icelily/dsh-gitbash-preset
或手动合并 cordis.patch.yml 到 profile patch 层。重启 DSH 后生效;重启后插件会自动安装预设(已存在则 no-op,不会覆盖你已有的版本)。
也可以不装插件,直接把 agent-presets/minimal-gitbash/ 目录复制到 ~/.dsh/.agent-presets/。
使用
- Web 界面新建会话,选择 极简模式 (Git Bash);
- 二选一启用 bash:
- 把会话沙箱切到完全访问,之后所有 bash 调用直接走 git bash;
- 或保持 workspace-write,让模型在第一次调用失败后按提示用
sandbox_permissions: "danger-full-access"+ justification 单次升级(走正常审批流程)。
配置
预设配置(agent-presets/minimal-gitbash/agent.cordis.yml 中 gitbash-executor):
| 字段 | 默认 | 说明 |
|---|---|---|
shellPath |
自动探测 | 显式指定时优先(如 'C:\\Program Files\\Git\\bin\\bash.exe') |
timeoutMs |
120000 | 单次命令默认超时(上限 maxTimeoutMs) |
maxTimeoutMs |
600000 | 超时上限 |
maxOutputBytes |
64000 | 单流保留字节数(溢出写入 spill 文件) |
graceMs |
3000 | 终止进程的 SIGTERM→SIGKILL 宽限 |
插件配置(cordis.patch.yml 插入行):
| 字段 | 默认 | 说明 |
|---|---|---|
force |
false |
预设已存在时是否用包内文件覆盖(保留用户额外文件) |
开发
npm run check # 三个文件语法检查(插件、执行器、测试)
npm run test # 单元测试:路径转换 / 探测优先级 / 配置校验,10 个用例
限制
- DSH 版本:预设按当前
@deepseek-ai/dsh-persona的字段名prefix编写。若你的 DSH 较旧(只认text),切换预设会报$.prefix missing required value,把agent.cordis.yml里的prefix:改回text:即可; - 升级注意:安装器对已存在的预设默认 no-op,
0.1.3之前的版本装出的预设是坏的(text字段)。升级插件后,在插件行配置force: true或删掉~/.dsh/.agent-presets/minimal-gitbash/再重启,才会写入修好的文件; - 会话沙箱为 workspace-write(或更窄)时,git bash 无法启动(MSYS 受限令牌限制),需切换完全访问或单次升级——这是沙箱边界,插件不绕过;
- 与原极简模式不同,bash 为每次调用新 shell(不保持 cd/export 状态)——Windows 上 PTY 持久会话不可用,此为替代设计。
License
MIT
chuspeeism/dashi-taskboard
zhoushoujianwork/easyeda-agent
morluto/rea
gitroomhq/postiz-agent
linhay/harmony-next.skills
yzlnew/infra-skills
sjh9714/dsh-win32
FeatherHunter/dsh-mattpocock-skills-deck