前言¶
在 DSH(DeepSeek Harness)的 Web 界面裏工作時,對話中產生的結論、記錄和階段性產出都留在會話記錄裏。如果你同時把騰訊 IMA 當作知識庫使用,就得手動把這些內容搬運進 IMA 的每日筆記和知識庫,偶爾一次還好,長期做就是重複勞動。
本地 Claude Code 用戶對這件事有一套現成做法:ima-upload 工作流。下面介紹的 dsh-plugin-ima-sync,做的就是把這個流程搬到 DSH Web 上,由插件自動完成上傳。
這是什麼¶
dsh-plugin-ima-sync 是一個 DSH 插件,作者爲 nan1010082085,許可證爲 MIT。一句話定位:把 DSH 對話進度自動上傳到騰訊 IMA(每日筆記 + Work 知識庫)。
它來自作者的 dsh-plugins monorepo 中的 packages/ima-sync。這個 monorepo 裏還有另外兩個插件:chat-sync(把本地 Claude Code / Codex CLI / Cursor Agent 的對話同步進 DSH Web GUI)和 mcp-sync(掃描本地 MCP 配置並註冊工具)。每個包獨立發版,發佈後通過腳本同步到獨立倉庫 nan1010082085/dsh-plugin-ima-sync。
DSH 的理念是「一切皆插件」,插件經 dsh plugin 命令裝進 profile。這個插件對應的 profile 是 web。
核心功能¶
已覈實的能力有三條:
- 把 DSH 對話進度自動上傳到騰訊 IMA,落點是每日筆記和 Work 知識庫。
- 鏡像本地 Claude Code 的 ima-upload 工作流,即 package.json description 中的 “mirroring the local Claude Code ima-upload workflow”。
- 面向 DSH Web 平臺:package.json 中
dsh.client.platform字段爲web。
實現層面可以確認幾個點:
- 入口爲
lib/index.js,type爲 module,另外導出./lib/client.js。 - 通過
cordis.patch.yml提供 bundle patch(dsh.bundle.patch)。 - 客戶端注入三個包:
@deepseek-ai/dsh-client-runtime、@deepseek-ai/dsh-client-locale、@deepseek-ai/dsh-client-ui-settings。 - 運行時依賴只有
@deepseek-ai/schemastery(^3.18.0)。
安裝¶
三種安裝方式都走 dsh plugin 命令,且都裝進 web profile。README 推薦的是 GitHub 方式,理由是插件有獨立倉庫,版本隨發佈同步:
# GitHub 安裝(推薦,獨立倉庫,版本同步)
dsh plugin --profile web add github:nan1010082085/dsh-plugin-ima-sync
如果習慣從 npm 拿包,直接用包名安裝:
# npm 安裝
dsh plugin --profile web add dsh-plugin-ima-sync
要改源碼調試,用本地 link 方式安裝,改完重啓 dsh web 即生效:
# 本地 link 安裝(改源碼重啓 dsh web 即生效)
dsh plugin --profile web add link:$(pwd)/packages/ima-sync
第三條命令來自 dsh-plugins monorepo 的 README,前提是你當前在倉庫目錄內,$(pwd) 展開後指向 packages/ima-sync。
版本與發佈¶
有一處不一致需要說明:README 的包表格裏 ima-sync 版本是 0.8.2,package.json 裏是 0.8.3,無法確認當前實際版本。安裝時以 npm 或倉庫頁面顯示爲準。
對想參與開發的人,README 給出的流程是:
# 語法檢查
node --check packages/ima-sync/lib/*.js
# 發佈(每個包獨立版本)
cd packages/ima-sync && npm publish
# 同步到獨立 GitHub repo(發佈後必須執行)
./scripts/sync-repos.sh ima-sync
先做語法檢查,再進入包目錄 npm publish;發佈後必須執行 sync-repos.sh,把代碼同步到獨立 GitHub 倉庫。
適用場景與注意¶
適合的人:在 DSH Web 上工作、同時用騰訊 IMA 做知識庫的人;以及想把本地 Claude Code 的 ima-upload 流程延續到 DSH 的用戶。
使用前有幾點需要注意:
- 插件以當前 dsh 進程的權限運行。安裝任何第三方插件前,建議先到 GitHub 倉庫讀一遍源碼,確認行爲符合預期,再決定是否安裝。
- 許可證爲 MIT(README badge、README 結尾、package.json 三處一致),源碼可自由查閱和修改,但許可證不等於安全審計。
- 該插件面向 web 平臺(
dsh.client.platform爲web),其它平臺的情況資料中沒有提及。 - 前面提到的版本號不一致問題,安裝前留意實際版本。
小結¶
dsh-plugin-ima-sync 解決的問題很具體:讓 DSH Web 的對話進度不再停留在會話記錄裏,自動進入騰訊 IMA 的每日筆記和 Work 知識庫。如果你同時使用這兩個工具,可以在讀完源碼後裝上試用。
- GitHub 倉庫:https://github.com/nan1010082085/dsh-plugin-ima-sync
- 社區目錄頁:https://www.skillhub.cn/plugins/nan1010082085/dsh-plugin-ima-sync (skillhub.cn 是社區維護的插件目錄,與 DeepSeek、幻方無官方從屬關係)