DeepSeek Harness (dsh) 採用插件化架構,@openllmsh/dsh 是一個插件包,用於將 Harness 流量路由至 OpenLLM 網關,並註冊 OpenLLM MCP 服務器。它將 OpenLLM 作爲默認模型添加到內置 llm-pi-ai 適配器。這是一個純配置 Cordis 補丁層,無運行時代碼。
核心功能¶
該插件提供以下能力:
- LLM 路由器:在 dsh 的內置
llm-pi-ai適配器中添加openllm提供者,指向本地網關http://127.0.0.1:8787/v1,並將其設爲默認模型。無 API Key,認證由守護進程處理。 - MCP 服務器:註冊
openllm mcpstdio 服務器,提供openllm、claude-context和supermemory工具組。 - 純配置層:通過
cordis.patch.yml實現補丁,無運行時代碼。
前置條件¶
在使用此插件前,必須滿足以下條件:
- 安裝 OpenLLM:需先安裝 OpenLLM。
- 運行守護進程:必須確保
openllmd正在運行。 - Node.js 版本:引擎要求 Node.js ^22.19.0 || >=24.0.0。
安裝與啓用¶
插件安裝到具體的 profile 中,請根據運行環境選擇對應命令:
瀏覽器 UI (web profile):
dsh plugin --profile web add github:openllmsh/dsh
Headless / CLI (headless profile):
dsh plugin --profile headless add github:openllmsh/dsh
本地開發/調試 (demo profile):
dsh plugin --profile demo add .
安裝後請重啓對應的 profile。
工作原理¶
- 通信機制:插件僅與本地網關
http://127.0.0.1:8787通信。插件本身不持有密鑰或來源。 - 認證處理:網關無需插件提供認證,由 OpenLLM 守護進程自行讀取
~/.openllm/.env並處理上游認證。 - 運行位置:插件在宿主的 DeepSeek Harness 進程上運行,依賴宿主的
@deepseek-ai/dsh-base提供的基礎環境。
開發與構建¶
源碼位於 src/index.ts(佔位符),實際邏輯在 cordis.patch.yml。
pnpm install
pnpm build # 使用 tsdown 編譯 lib/index.mjs (+ .d.mts)
pnpm typecheck # TypeScript 類型檢查
dsh plugin --profile demo add . # 鏈接到測試配置
dsh --profile demo --dump-config # 檢查插件樹
注意:lib/ 目錄已提交到倉庫,直接從 GitHub 安裝無需構建步驟。修改 src/ 後需重新構建並提交 lib/。
許可與鏈接¶
- License: MIT
- Owner: openllmsh
- Repository: https://github.com/openllmsh/dsh
- Catalog: https://www.skillhub.cn/plugins/openllmsh/dsh