Steak DSH:面向終端編碼任務的 DSH 插件包與啓動器

前言

在終端裏用 DeepSeek Harness(dsh)做編碼時,常見做法是直接跑官方 CLI 或自己疊 profile。工具面偏大時,單次任務的 token 與調用成本容易上去;改完代碼後也未必自動跑一遍項目裏的檢查命令。若要在「少動現有 dsh profile」的前提下,加上模型相關開關、編輯後校驗、文件編輯邊界和更精簡的默認工具集,需要一個可單獨安裝、又能當插件掛進 profile 的方案。steak-dsh 即爲此設計:它是 DeepSeek Harness 的插件包與啓動器,由 Pareto Cybernetics 維護,在 SkillHub 上歸類爲客戶端插件。

這是什麼

steak-dsh 在倉庫 README 中的定位是:爲終端編碼任務提供的 dsh 插件包與啓動器;在保留你已有 profile 的前提下,增加 model flags、編輯後檢查(verify-after-edit)、文件編輯邊界(owned paths),以及更小的默認工具清單。運行環境要求 Node 22+,無運行時 npm 依賴,許可證爲 MIT。支持的 dsh 版本範圍爲 >=0.2.2-rc.1 <0.3.0。當前 package.json 中的版本號爲 0.10.3。

默認情況下,智能體會以對你機器的完整訪問權限執行命令,且不會停下來詢問,以便長會話在你離開時能跑完。若需要沙箱,可使用 --permission workspace-write 或 --permission read-only。owned paths 限制的是文件類工具,不限制 shell;當邊界依賴「不能隨意執行 shell」時,應加上 --no-shell。

核心功能

下面介紹與已抓取 README 一致的能力要點。

插件包與啓動器

  • 通過 Cordis patch(cordis.patch.yml)向 dsh 注入 bundle,安裝腳本會嘗試將 bundle 加入 headless profile;若該步失敗,啓動器仍可使用。
  • 啓動器命令爲 steak-dsh,提供 run、chat、tui 等子命令,並支持 --stock 在對比實驗中省略 bundle。

編輯後校驗(verify-after-edit)

--verify "npm test" 會在編輯後運行你指定的檢查命令。若連續兩次失敗,校驗會暫停,直到下一次請求。持久化配置可寫在 $DSH_HOME/steak-dsh.json(默認 ~/.dsh/steak-dsh.json):

{ "projects": { "/abs/path/to/project": { "verify": { "command": "npm test", "failLimit": 2, "timeoutMs": 90000 } } } }

項目下的 .steak-dsh/config.json 僅在用戶配置裏把該項目列入 "trusted" 時纔會被讀取。

模型與網關

  • 通過 --model provider/model 指定模型;網關場景可配合 --base-url、--api、--key-env(環境變量名,而非 key 本身)。--api 可爲 openai-completions、openai-responses 或 anthropic-messages。
  • --effort 控制推理強度;run 可加 --json 輸出 dsh NDJSON。

可選登錄路由

README 列出兩條可選、依賴本地 CLI 登錄的路由(純文本,不需網關 flag,且不能與 --stock 同用):

  • claude-code/<model>:使用已安裝的 Claude Code CLI;需 claude auth login;用法積分需設置 STEAK_DSH_CLAUDE_CODE_ALLOW_USAGE_CREDITS=1。
  • openai-codex/<model>:使用 Codex CLI 文件登錄與 dsh 的 Codex 傳輸;需 codex login。

steak-dsh models 可列出可用模型;--json --provider openai-codex 可過濾機器可讀輸出。

基準數據(歷史版本)

倉庫中記錄了 0.1.0 時期、20 個小 Python 任務(每臂 5 次重複)的對比結果,README 明確說明不是當前版本的實測,也不代表大項目表現。在相同模型上,Steak DSH 相對 stock dsh 的成本比約爲:DeepSeek V4.1 Flash 0.84(95% 區間 0.76–0.93);Qwen 4 Max(加權 token,非美元)0.70(0.62–0.78)。可用倉庫內 benchmarks/summarize.py 在無模型訪問時復算。

安裝與啓用

macOS / Linux

安裝腳本會校驗 release 的 SHA-256,使用已有 Node 22+ 與 dsh,或安裝私有副本,並嘗試將 bundle 加入 headless profile:

curl -fsSL https://github.com/michael-berardi/steak-dsh/releases/latest/download/install.sh | sh

文件位於 ~/.steak-dsh,命令 shim 位於 ~/.local/bin;無需 sudo。若 PATH 未包含 shim 目錄,按安裝輸出提示配置後執行:

steak-dsh doctor

Windows

irm https://github.com/michael-berardi/steak-dsh/releases/latest/download/install.ps1 | iex

Windows 下安裝目錄與命令均在 %LOCALAPPDATA%\steak-dsh。

已有 Node 與受支持 dsh 時

僅安裝全局啓動器:

npm i -g github:michael-berardi/steak-dsh#v0.10.3

或僅向 profile 添加插件(版本號以資料爲準):

dsh plugin --profile headless add github:michael-berardi/steak-dsh#v0.10.3

安裝目錄可通過環境變量覆蓋:STEAK_DSH_HOME、STEAK_DSH_BIN_DIR、STEAK_DSH_VERSION、STEAK_DSH_DSH_VERSION、STEAK_DSH_RELEASE_BASE。卸載時刪除安裝目錄與 shim,若曾加入 profile bundle,再執行 dsh plugin --profile headless remove steak-dsh。再次運行安裝腳本即可升級。

典型用法

先在 dsh 中配置好模型,再按需加權限與校驗,例如:

steak-dsh run --permission workspace-write --verify "npm test" "fix the failing parser test"
steak-dsh run --model deepseek-official/deepseek-flash "add a --json flag"
steak-dsh chat --model deepseek-official/deepseek-flash
steak-dsh tui --model deepseek-official/deepseek-flash --permission workspace-write --approval-policy ask
steak-dsh run --json --owned-path "$PWD/src" --no-shell "rename the parser helper"
steak-dsh --help

說明:run 與 chat 在需要審批時會拒絕請求,即使傳入 --approval-policy ask;只有 TUI 能響應審批提示。TUI 必須通過 --model 指定模型;--add-dir 在 TUI 的 SDK 連接上不可用。

適用場景與注意

適合誰:已在終端用 dsh 做編碼、希望用更小默認工具集和可選 verify 降本控險,又不想推倒重來改現有 profile 的開發者;也需要用統一啓動器對接網關或 Claude Code / Codex 登錄路由時,可對照 README 的 flag 與 docs/profiles.md、docs/terminal.md、SECURITY.md。

權限與信任:插件與 dsh 進程以你當前用戶權限運行。安裝前應在 GitHub 閱讀源碼與 MIT 許可證,並理解默認「全機訪問、不停頓詢問」的行爲;敏感項目優先 --permission workspace-write / read-only,並結合 owned-path 與 --no-shell。

生態說明:DeepSeek Harness 社區奉行「一切皆插件」;SkillHub 目錄頁 爲獨立站點,與 DeepSeek / 幻方無官方從屬關係,本文不構成官方背書。

結尾

steak-dsh 把插件包、啓動器與可選校驗、路徑邊界和模型相關開關收在一個 MIT 項目裏,便於在 stock dsh 之外做可控對比(--stock)與復現倉庫內歷史基準。進一步瞭解可查閱 GitHub 倉庫 與 SkillHub 插件頁。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜