dsh-memory-eternal:DeepSeek Harness 的本地記憶插件

前言

DeepSeek Harness(DSH)插件生態裏,記憶能力通常要解決兩個問題:會話結束後,如何把有用結論留下來;後續 Agent 需要歷史上下文時,如何只取相關內容。dsh-memory-eternal 是面向這個場景的記憶插件。它把對話沉澱到本地 Markdown Vault,使用自研去重和自研 CJK 檢索,並讓 Agent 通過 memory_recall 工具按需召回歷史上下文。

這是什麼

dsh-memory-eternal 由 EternalNight996 維護,許可證爲 MIT。

它的定位是 DSH 記憶插件,不移植任何既有記憶框架。記憶內容存儲在本地 Markdown 文件中,可 git 管理。插件不改 DSH 源碼,一個記憶庫可供多個 Agent 共享。

核心功能

自動沉澱與按需召回

  • 對話結束後自動沉澱知識卡到本地 Markdown Vault。
  • Agent 通過 memory_recall 工具按需召回歷史上下文。
  • 安裝並重啓後,日常沉澱不需要人工逐條觸發。

圖形化知識庫

  • 設置頁提供圖形化知識庫,包含統計、搜索、知識圖譜。
  • 側邊欄支持一鍵彈窗。
  • 側邊欄底部「記憶」按鈕進入記憶庫。
  • DSH 設置 → 記憶 爲純配置頁。

審覈與回收

  • 新卡默認進入審覈中心(pending),人工批准後入主庫。
  • 支持已駁回和回收站。
  • 回收站軟刪卡 30 天內可恢復,超期自動永久刪除。

多 Agent 與瀏覽器界面

  • 支持 DeepSeek Harness(DSH)、Claude Code、Codex CLI / Cursor 接入。
  • 提供瀏覽器獨立界面,數據與 DSH 內嵌頁同步。

服務自管理與推薦配置

  • 支持服務自管理:autoWebMode、watchdogAutoSpawn、autoMcpSetup。
  • 提供一鍵推薦配置:A 輕量省心 / B 極致省錢 / C 高質量。

安裝與啓用

在 DSH 中安裝

在 DSH CLI 中安裝到 web profile:

dsh plugin --profile web add dsh-memory-eternal

在 DSH profile 中更新時,資料要求使用 pnpm;npm install 會報 EUNSUPPORTEDPROTOCOL。也可以進入 profile 目錄後更新:

cd ~/.dsh/profiles/web && pnpm add dsh-memory-eternal@latest

重啓 dsh web 後,自動沉澱知識卡、memory_recall 工具、圖形化界面立即生效。

在其他 Agent 中使用

單獨安裝 CLI:

npm i -g dsh-memory-eternal

然後接入對應工具:

dsh-memory connect claude
dsh-memory connect codex
dsh-memory connect cursor

這些命令用於把 dsh-memory 接入 Claude Code、Codex CLI / Cursor。自動掛載 MCP 默認關;開啓會影響 Claude Code / Codex / Cursor 配置。

典型用法

檢索與手動沉澱

dsh-memory recall "數據庫選型"
dsh-memory capture "重要結論..."

recall 用於檢索記憶;capture 用於手動沉澱一條內容。

自動掛載與 MCP 接入

dsh-memory setup [--dry-run]
dsh-memory connect claude
dsh-memory connect codex
dsh-memory connect cursor
dsh-memory mcp

setup 用於重跑或預覽自動掛載;connect 用於接入 Claude Code、Codex CLI / Cursor;mcp 用於 MCP 接入。

Web 界面與服務保活

dsh-memory serve [--port 7999]
dsh-memory open
dsh-memory watchdog [--port 7799]

serve 用於前臺運行 Web;open 用於打開瀏覽器獨立界面;watchdog 用於保活 Web。看門狗爲獨立 node 進程,約 +47 MB 內存。

autoWebMode 和 watchdogAutoSpawn 的改動需重啓 DSH 生效。

適用場景與注意

適合需要本地記憶、跨 Agent 共享記憶庫,並希望記憶文件可讀、可 git 管理的 DSH 使用者。

使用前注意:

  • 要求 Node >= 22。
  • 依賴 @deepseek-ai/schemastery,peerDependencies 包含 @deepseek-ai/cordis、@deepseek-ai/dsh-llm、@deepseek-ai/dsh-tools。
  • 蒸餾知識卡、語義去重喂 AI 會調用 AI,可能產生成本;關閉可減少調用。
  • zcode(智譜)暫無原生 MCP,可經社區 zcode-open-bridge 轉 MCP 或用 CLI。
  • 插件以當前 dsh 進程權限運行,安裝前應檢查源碼與許可證。

獲取

  • GitHub:https://github.com/EternalNight996/dsh-memory-eternal
  • 目錄頁線索:https://www.skillhub.cn/plugins/EternalNight996/dsh-memory-eternal(該 URL 來自插件線索,未在本篇資料中核實)
羽毛球分组比赛记分
小程序二维码

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

小夜