返回目录

dsh-gitbash-preset

编辑精选维护状态: 活跃

liceses/dsh-gitbash-preset

DeepSeek Harness 插件:一键安装「极简模式 (Git Bash)」agent preset —— 把 DSH 自带极简模式中的 bash 调用映射到 Git for Windows 的 bash(MSYS),让 Windows 上的极简模式真正可用。

前往 GitHub
$ dsh plugin --profile web add @icelily/dsh-gitbash-preset

131

星标

0

Fork

JavaScript

语言

MIT

许可证

2026-08-15

创建于

2026-09-14

最近推送

一个 DSH 插件,通过 Git for Windows(MSYS)接管极简模式的 bash,提供幂等安装与沙箱感知门控,让 Windows 上的极简模式可用。

DSH 适配

原生运行时

作者声明

安全审计

未审计

最后核验

2026-08-24

许可证

MIT

01它能帮你完成什么?

  • 把极简模式的 bash 转到 Git for Windows(MSYS),让 DSH 极简模式在 Windows 上可用

    一个可安装的 agent 预设,通过 git bash 执行命令,并带沙箱感知门控

    在 Windows 上使用 DeepSeek Harness(dsh)、需要极简模式 bash 工具的用户

02如何接入 DeepSeek Harness?

前置条件

  • 已安装 Git for Windows(提供 bash / MSYS)
  • 使用 web profile 的 DeepSeek Harness(dsh)

安装步骤

  1. 01

    运行 `dsh plugin --profile web add @icelily/dsh-gitbash-preset`

    $ dsh plugin --profile web add @icelily/dsh-gitbash-preset

  2. 02

    或手动把 `cordis.patch.yml` 合并进 profile 的 patch 层

  3. 03

    重启 DSH——插件会在启动时自动安装预设(已存在则为 no-op)

验证接入成功

  • 在 Web 界面新建会话,选择「极简模式 (Git Bash)」预设

03DSH 适配与能力边界

DSH 适配原生运行时

通过 cordis.patch.yml 交付的 DSH agent preset;把极简模式的 bash 调用映射到 Git for Windows 的 bash(MSYS)

  • 幂等安装预设

    web profile 下的 DSH 启动→把打包的预设复制到 `${DSH_HOME:-~/.dsh}/.agent-presets/minimal-gitbash/`;已存在则跳过,`force: true` 才覆盖

    在用户 DSH_HOME 预设根下写入预设文件
  • 自动探测 bash

    DSH 宿主环境→`GIT_BASH` 环境变量 → 常见安装目录 → PATH 中的 `bash.exe` → 兜底 `bash`

  • 沙箱感知门控

    bash 的 run / start 请求→仅在 `danger-full-access`(或无沙箱的部署)下执行;否则抛出带指引的错误

    未开启完全访问策略时命令会被拦截

04适合谁?何时不该用?

适合

  • 在 Windows 上使用 DeepSeek Harness(dsh)、需要极简模式 bash 工具的用户

不适合

  • 为 Windows 设计。DSH 极简模式在 win32 上原本无法使用:PTY 后端不被支持,且 PATH 中默认没有 bash。
  • bash 仅在完全访问沙箱策略下运行;受限策略时模型必须用 `sandbox_permissions: "danger-full-access"` 加理由单次升级。
  • 依赖 Git for Windows(MSYS bash)。若没有,bash 解析会兜底到裸 `bash`,而默认 Windows 安装里并不存在。

05兼容性、维护与安全提示

  • 为 Windows 设计。DSH 极简模式在 win32 上原本无法使用:PTY 后端不被支持,且 PATH 中默认没有 bash。
  • bash 仅在完全访问沙箱策略下运行;受限策略时模型必须用 `sandbox_permissions: "danger-full-access"` 加理由单次升级。
  • 依赖 Git for Windows(MSYS bash)。若没有,bash 解析会兜底到裸 `bash`,而默认 Windows 安装里并不存在。
2026-08-152026-08-16作者未说明

MIT · 无最新发布(latest_release: null)

06常见问题

为什么 DSH 极简模式在 Windows 上会失败?

两层原因:持久 bash 依赖的 PTY 后端在 win32 上被 `@deepseek-ai/dsh-subprocess-local` 直接拒绝(`terminal inspection is unsupported on platform win32`),而 `@deepseek-ai/dsh-bash-local` 又硬编码从 PATH 找 `bash`,Windows 默认没有。

怎么安装 dsh-gitbash-preset?

运行 `dsh plugin --profile web add @icelily/dsh-gitbash-preset`,或手动把 `cordis.patch.yml` 合并进你的 profile patch 层。重启 DSH 后插件会在启动时自动安装预设(已存在则为 no-op)。

为什么 bash 只在完全访问沙箱下才允许?

MSYS 无法在 Windows 受限令牌沙箱内启动(无法创建 signal pipe),所以执行器只在 `danger-full-access`(或无沙箱部署)下运行;否则抛出明确的升级指引,而不是绕过沙箱。

它是怎么找到 Git for Windows 的 bash 的?

依次检查 `GIT_BASH` 环境变量、常见安装目录(ProgramFiles / ProgramFiles(x86) / LOCALAPPDATA)、PATH 中的 `bash.exe`,最后兜底到裸 `bash`——无需硬编码路径。

不装插件能直接用预设吗?

可以——直接把 `agent-presets/minimal-gitbash/` 目录复制到 `~/.dsh/.agent-presets/` 即可,不需要安装插件。

08数据与来源

  • 作者声明github.comdb21575b52e2…

    把 DSH 自带极简模式中的 bash 调用映射到 Git for Windows 的 bash(MSYS),让 Windows 上的极简模式真正可用。

  • 作者声明github.comdb21575b52e2…

    `cordis.patch.yml` 在 web profile 组合中插入 `dsh-gitbash-preset`,启动时安装预设文件

页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-08-24。发现错误?提交更正。

🏆

最佳 DeepSeek Harness 插件

从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。

DSH Plugins 是独立的 DeepSeek Harness 插件市场,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。