前言¶
用 DeepSeek Harness(下稱 DSH)做智能體開發時,聊天中的 agent 默認自己完成所有工作。但很多人的機器上已經裝好並登錄了 Cursor CLI,有時希望把「實現一個功能」「review 一個文件」這類邊界清晰的獨立任務直接交給它跑,而不是手動切窗口、複製上下文。
dsh-cursor-acp 解決的就是這個問題:它註冊一個 cursor_agent 工具,讓當前聊天的 agent 在普通對話裏把獨立任務交給本機已登錄的 Cursor CLI(經 ACP)執行。下面按準備、安裝、使用、排查的順序介紹。
這是什麼¶
這是 loeanxi 維護的 DSH 社區插件,採用 MIT 許可,當前版本 0.2.0。DSH 的理念是「一切皆插件」,這個插件就是這一思路下的社區產物。
它的一句話定位:在普通聊天中把獨立任務交給本機已登錄的 Cursor CLI(經 ACP)執行。
需要說明兩點:它不是模型選擇器裏的一個 Cursor 條目,也不是 Cursor 官方產品。
開始前的準備¶
前置條件:在同一臺電腦上安裝 Cursor CLI 並登錄,或改用 CURSOR_API_KEY。
Windows(PowerShell):
irm 'https://cursor.com/install?win32=true' | iex
agent login
macOS / Linux:
curl https://cursor.com/install -fsS | bash
agent login
agent login 和 cursor_agent 必須能訪問 Cursor 服務器。瀏覽器代理或 Clash 式系統代理對終端不自動生效,Node 不會讀取,需要在將要使用的同一個窗口裏設置代理環境變量:
$env:HTTP_PROXY = "http://127.0.0.1:7890"
$env:HTTPS_PROXY = "http://127.0.0.1:7890"
$env:ALL_PROXY = "http://127.0.0.1:7890"
$env:NO_PROXY = "localhost,127.0.0.1"
$env:NODE_USE_ENV_PROXY = "1"
端口以你的代理軟件顯示爲準。設置後在同一窗口運行 agent login 並啓動 DSH。這個插件會向 Cursor 子進程轉發 HTTP_PROXY / HTTPS_PROXY / ALL_PROXY / NO_PROXY / NODE_USE_ENV_PROXY,所以在同一窗口設置是有效的。另外注意:如果 Clash 配置把 node.exe 設爲 DIRECT,子進程可能繞過代理,Settings 和 doctor 會提示這一點。
安裝與啓用¶
從 npm 安裝(首選):
dsh plugin --profile desktop add dsh-cursor-acp
Web 端:
dsh plugin --profile web add dsh-cursor-acp
也可以從 GitHub 安裝:
dsh plugin --profile desktop add github:loeanxi/dsh-cursor-acp
dsh plugin --profile web add github:loeanxi/dsh-cursor-acp
安裝後需要重啓 DeepSeek Harness。Node 引擎要求爲 ^22.19.0 || >=24.0.0。
安裝後的檢查¶
打開 Settings → Cursor subagent,依次確認三件事:
1、頁面會檢測是否找到 CLI。注意找到 CLI 不等於已登錄,頁面還會檢查 agent status 的登錄狀態,以及當前進程是否有 HTTPS_PROXY 與 NODE_USE_ENV_PROXY=1;未登錄或代理缺失時頁面會說明。頁面不顯示郵箱。
2、可以選擇子任務模型參數(effort、Fast、model)後點 Apply。該選擇隻影響 cursor_agent,不影響當前聊天的模型;選擇由插件自身存儲,在原版 DSH 上也生效,不依賴 Host 設置 allowlist。
3、點 Test 按鈕做連通性驗證,它會發送一次官方只讀任務(agent --print --mode ask,回覆 pong)。Test 會消耗少量 Cursor 額度,且不會啓動完整 ACP 會話。
怎麼用¶
在聊天裏直接提請求,例如 “Have Cursor implement this feature” 或 “Have Cursor review this file”。消息中給出足夠的細節,agent 會自行調用 cursor_agent。
任務在當前工作區文件夾運行,使用你的 Cursor 訂閱額度;父聊天只看到最終結果。
找不到 CLI 時¶
運行 doctor 子命令診斷:
dsh plugin --profile desktop exec dsh-cursor-acp doctor
Web 端用 --profile web:
dsh plugin --profile web exec dsh-cursor-acp doctor
doctor 會打印 CLI 路徑、登錄/代理提示,以及本 dsh 能否加載 @deepseek-ai/dsh-subagent-acp / dsh-tool-subagent。這兩個官方包缺失時,Settings 會說明,且 cursor_agent 不會註冊。
適用場景與注意¶
適合已經在本機裝好 Cursor CLI、有 Cursor 訂閱,想讓 DSH 聊天中的 agent 把獨立子任務委託出去的人。父聊天只拿最終結果,適合把邊界清晰的工作交出去。
使用前注意:
1、任務消耗的是你的 Cursor 訂閱額度,Test 也會消耗少量額度。
2、代理環境變量要在將要使用的同一個窗口設置,瀏覽器代理對終端無效。
3、插件依賴官方包 @deepseek-ai/dsh-subagent-acp 與 dsh-tool-subagent,缺失時 cursor_agent 不註冊。
4、插件以當前 dsh 進程的權限運行。安裝任何社區插件前,建議先檢查源碼與許可證;本插件採用 MIT,源碼在 GitHub 上。
結尾¶
回顧一下:dsh-cursor-acp 把本機已有的 Cursor CLI 接進 DSH 的聊天流程——一行安裝命令、一個設置頁、一個 doctor 子命令,覆蓋了從啓用到排障的路徑,讓聊天中的 agent 多一個可以委託獨立任務的執行器。
- 目錄頁:https://www.skillhub.cn/plugins/loeanxi/dsh-cursor-acp
- GitHub:https://github.com/loeanxi/dsh-cursor-acp
目錄頁爲社區維護的獨立站點,與 DeepSeek / 幻方無官方從屬關係。