前言¶
DeepSeek Harness(DSH)的擴展方式以插件爲主。這裏的“插件”是接入 DSH 的能力單元;社區目錄是獨立站點,與 DeepSeek / 幻方無官方從屬關係,不應理解爲官方應用商店。
對於需要在外部系統中調用 DSH Agent 的場景,常見的做法是圍繞一個 DSH 進程建立調用通道。UllrAI/dsh-mqtt 做的事情是:讓 DSH 進程可以通過 MQTT broker 接收控制請求,並向客戶端輸出規範化事件與終態結果。下面介紹它的定位、能力、安裝啓用方式,以及需要注意的邊界。
這是什麼¶
dsh-mqtt 是一個面向 DeepSeek Harness(DSH)的 MQTT protocol driver and agent worker gateway,由 UllrAI 維護,許可證爲 MIT。
它把 DSH 進程變成一個可通過 MQTT 訪問的 worker 入口:客戶端通過 MQTT 請求控制 DSH,DSH 執行後輸出規範化的 session/event、agent status、agent error 與終態結果。當前資料中給出的安裝版本爲 0.1.6,目標 DSH 版本爲 0.1.0-rc.8。
核心能力¶
dsh-mqtt 提供的能力集中在 MQTT 連接、會話控制、結果可靠性和受控輸出:
- MQTT 3.1.1 和 MQTT 5 連接,支持
TCP、TLS、WebSocket、secure WebSocket; - broker 認證,支持直接提供或從環境變量提供 username/password 憑證,支持自定義 CA,以及可選 mutual TLS;
- 持久 MQTT session、重連、retained presence、Last Will;
- node-scoped 的
submit、steer、inject、cancel命令; - DSH agent creation 和受控 Session continuation;
- 規範化的
session/event、agent status、agent error 輸出; - 跨重連和重啓的 QoS 1 request 與 control deduplication;
- durable terminal results 和 interrupted-request recovery;
- 使用 workspace aliases,而不是讓調用方直接提供文件系統路徑;
- active-request 和 payload limits;
- 默認安全的事件暴露,並支持顯式開啓 full-event opt-in;
- 面向 ACL 的版本化 topic layout。
需要強調的是,它是一個 long-running host plugin,不是 mqtt_publish 或 mqtt_subscribe 這類 model tool。也就是說,它隨 DSH 進程運行,而不是作爲單次模型工具被臨時調用。
安裝與啓用¶
先確認環境。資料中列出的前置條件爲:
- Node.js
^22.19.0或>=24; pnpm在PATH中可用。
下面介紹安裝步驟。
1、使用資料中給出的 npm 安裝命令,把插件加入 DSH profile:
npx @deepseek-ai/dsh plugin --profile web add dsh-mqtt@0.1.6
2、編輯 profile 配置文件,調整其中的 mqtt-gateway row:
~/.dsh/profiles/web/cordis.patch.yml
如果使用自定義 $DSH_HOME,也編輯其等價路徑下的配置文件。
3、檢查配置。資料中提示,配置文件中的路徑字段由 Node.js 解析,~ 和環境變量不會在這些值中展開,因此應使用絕對路徑。示例配置中出現 requireControllerAuth: true;管理 API 和 standalone page 默認監聽 loopback。
4、在不啓動完整 DSH 的情況下檢查組合後的 profile:
npx @deepseek-ai/dsh --profile web --dump-config
5、設置 provider credential 後啓動 DSH。資料中給出的示例如下:
export DEEPSEEK_API_KEY='...'
npx @deepseek-ai/dsh --profile web
6、打開 DSH settings,選擇 MQTT Worker。
適用場景與注意¶
適合使用 dsh-mqtt 的情況,通常包括:
- 需要通過 MQTT broker 向 DSH worker 提交請求;
- 需要觀察規範化的
session/event、agent status 或 agent error; - 需要執行
submit、steer、inject、cancel等 node-scoped 控制; - 需要 broker 認證、自定義 CA、mutual TLS、persistent session、Last Will 等連接與可用性能力;
- 需要 QoS 1 去重、持久終態結果、中斷請求恢復;
- 需要默認安全的事件暴露,同時保留顯式 full-event opt-in 的空間。
需要注意的邊界:
dsh-mqtt是 long-running host plugin,不是mqtt_publish或mqtt_subscribemodel tool。- 當前版本
0.1.6目標是 DSH0.1.0-rc.8。資料說明 DSH 是 developer preview,可能引入 breaking changes。 - 該插件會以當前
dsh進程權限運行。安裝前建議檢查源碼與許可證;本項目許可證爲MIT。 - 配置文件路徑解析依賴 Node.js。資料明確
~和環境變量不會在這些路徑值中展開。 - 資料中給出的
category: 工作流與stars: 2來自插件行信息;抓取的 README 與package.json未展示這些字段,因此不應作爲已覈實事實引用。
鏈接¶
- GitHub:https://github.com/UllrAI/dsh-mqtt
- 資料中給出的目錄頁:https://www.skillhub.cn/plugins/UllrAI/dsh-mqtt(該鏈接來自提供的插件信息,未在本次抓取的 README/package.json 中核實)