中文 | English
致力优化dsh插件token效率,提升ai性能,减少token消耗,减少任务总时间的插件,解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token、时间和模型注意力浪费,会持续更新。
tips:本项目的 ops 是广义 operations (运行操作)的缩写,代指本插件处于dsh和系统/代码/文件操作的基础工具位置。本项目不是 operations(运维)插件。
在现阶段,本插件的三个主要功能:
- 提供独立 bash 5.3.15 并优先使用bash,让你的AI不再和PowerShell打架
- 独立 PowerShell 7.6.6,用于必要的 Windows 原生操作,沿用宿主
pwsh工具。PowerShell 7 比自带的 PowerShell 5 也有不少优化 - 一些 Rust 编写的性能更好的,更快的读取、查找、替换工具,加速任务运行,减少不必要的输入输出。由于部分工具不经过 DSH 的受限终端后端,命令与后台任务工具只在完全权限时启用。
- 未来会加入一系轻量短输出的好用的rust工具,致力于优化token效率,均可开关和单独配置
执行顺序:工具包 → bash → PowerShell 7。
仅支持 Windows x64,后续补充 Rust 工具后会支持 Linux 和 Mac(Linux 和 Mac 下不提供 bash 功能)。目标宿主 DSH 0.2.0-rc.2。
在目标 DSH 应用的插件市场中输入 npm 包名 dsh-ops,安装后选择启用。安装归属于当前运行的 profile,桌面端为 desktop。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
npx --yes dsh-ops@latest install --profile desktop
npx --yes dsh-ops@latest install --profile web
npx --yes dsh-ops@latest install --profile tui必须显式选择目标 profile;tui 映射到 dsh-TUI 产品的 dsh-tui profile,不是旧的 tui 目录。请先初始化目标应用。该入口委托官方 DSH CLI 安装,不另写一套 profile 锁与回滚逻辑。
桌面端必须使用桌面应用自带的 CLI;默认探测 %LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd。安装在其它位置时加 --dsh-cli "<安装目录>\resources\runtime\cli\bin\dsh.cmd"。Web/TUI 需要可用的 DSH CLI,可同样显式指定。
也可以直接使用官方命令:
dsh plugin --profile web add dsh-ops
dsh plugin --profile dsh-tui add dsh-ops
"<桌面安装目录>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-ops普通 DSH CLI 不能管理保留的 desktop profile;不要把它与桌面自带入口混淆。
更新:重新运行相同的 npx --yes dsh-ops@latest install --profile ...,或用官方 CLI add dsh-ops@latest。按应用提示重载;替换已加载代码时重启应用。
当前版本 0.2.9 是纯 bug 修复版:PATH 回退时跳过 Windows WSL 启动器、在 spawn 前拒绝 ops_bash 未声明参数,并且不再通过 remount 持久化一次性旧 shell 回退迁移,避免配置重载期间拖慢 Desktop。没有新增 feat、组件、配置键或运行时能力。三个二进制依赖仍固定为 0.2.1,本次不重新发布 npm 载荷。
卸载与查看状态:
npx --yes dsh-ops@latest status --profile desktop
npx --yes dsh-ops@latest uninstall --profile desktop把 desktop 换成 web 或 tui 即可。也可在市场卸载,或执行官方 dsh plugin --profile ... remove dsh-ops。二进制随 profile 的插件依赖管理;卸载移除依赖引用,不误删系统 shell、其它 profile 的副本或包管理器共享缓存。