dsh-herdr-site:讓 Herdr 識別 DSH 面板狀態

前言

Herdr 是一個用於 AI 編碼代理的終端工作區管理器。它僅能識別內置檢測器(如 opencode、claude、codex 等)發現的代理。由於 dsh/cc-tui 不在 Herdr 的默認列表中,使用 dsh 的面板在 Herdr 中會顯示爲普通的終端進程,無法顯示狀態、面板跳轉或支持 --wait 參數。

dsh-herdr-site 插件通過 Herdr 的 custom-integration 協議,將 dsh agent 的狀態上報給 Herdr,從而解決上述問題。

插件簡介

該插件由 WuJiaoJue 維護,採用 MIT 許可證。它主要解決 DSH 面板在 Herdr 中“失聯”的問題,通過協議對接讓 Herdr 能夠感知代理的真實運行情況。

核心功能

  1. 狀態報告:將 dsh agent 的狀態轉換爲 Herdr 可識別的狀態。
  2. 狀態映射:
    • agent/status = running(正在運行一輪對話) -> working
    • agent/status = idle(沒有活躍驅動) -> idle
    • ask_user_question pending(模型等待輸入) -> blocked
  3. 交互增強:支持 Herdr 的面板跳轉和 --wait 功能。
  4. 自定義消息:支持配置 blockMessage,在 blocked 狀態時顯示具體原因。

安裝與啓用

安裝前請確保已安裝 DeepSeek Harness (DSH) 並配置了 dsh-cc-tui 或 dsh-base profile。

使用官方安裝命令(推薦,包含預構建包):

dsh plugin --profile cc-tui add dsh-herdr-site

也可以從 GitHub 安裝:

dsh plugin --profile cc-tui add github:WuJiaoJue/dsh-herdr-site

安裝完成後,插件會自動通過 dsh.bundle.patch 被添加到 profile 的 bundle 層棧中。

配置

插件支持通過 blockMessage 配置項,在代理處於 blocked 狀態時顯示提示信息。配置需寫在 profile 的 cordis.patch.yml 中:

- id: herdr-site
  config:
    blockMessage: '模型等待你的回答'

兼容性與限制

  • Herdr 版本:需要 Herdr v0.8.0 或更高版本,且需實現 pane report-agent / pane release-agent 接口。
  • DSH Profile:適用於 cc-tui 和 dsh-tui profile。
  • Kernel 版本:嚴格限制爲以下版本之一,不使用 caret 範圍以避免版本衝突:
    • 0.1.0-rc.6
    • 0.1.1-rc.2
    • 0.1.2-rc.1
    • 0.2.0-rc.2
  • dsh-tui 限制:dsh-tui profile 不支持 ask_user_question 工具,因此在該 profile 下不會觸發 blocked 狀態,僅支持 working 和 idle。
  • 依賴說明:僅 schemastery 爲運行時依賴,其他爲類型依賴。

總結

dsh-herdr-site 是連接 DSH 與 Herdr 的橋樑,它通過標準協議實現了狀態的同步與交互功能的恢復。對於需要使用 Herdr 管理所有 AI 代理的開發者,這是一個必要的集成工具。

插件詳情與源碼:https://github.com/dsh-plugin-collection/dsh-herdr-site

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

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

小夜