DeepSeek Harness Forge Plugins:爲 DSH 增加 gate 計算、TCM 與記憶工具

前言

DSH 的插件化用法會把外部能力掛到 agent 上。本文介紹 jinguanghai/deepseek-harness-forge-plugins。它面向需要在 DSH 中接入 gate 計算、TCM 查詢、記憶召回和證據審計的開發者。下面按已覈實資料介紹功能、安裝方式和使用示例。

這是什麼

deepseek-harness-forge-plugins 由 jinguanghai 維護,許可證爲 MIT。資料給出的定位是:

Forge plugins for DeepSeek Harness: gate computing + TCM + memory (13 tools).

已覈實資料列出 4 個插件:forge-gates、forge-tcm、forge-memory、evidence-first,合計 13 個工具。資料還說明其爲零 npm 依賴、pure Cordis plugins,文件訪問通過 ctx.fs 沙箱化,要求 dsh >= 0.1.0-rc.5。

核心功能

forge-gates

forge-gates 提供 gate 計算與形式化檢查工具:

  • forge_math:symbolic math simplification / evaluation。
  • forge_logic:formal proof / equivalence checking。
  • forge_regex:regex fullmatch validation。
  • forge_eprover:TPTP first-order theorem proving。
  • forge_system:state-machine model checking,面向 deadlock / invariant。
  • forge_repair:code defect fix suggestions。

forge-tcm

forge-tcm 提供 TCM 相關工具:

  • tcm_diagnose:TCM pattern diagnosis。
  • tcm_herb_pair:herb-pair retrieval。資料說明 herb-pair retrieval 需要用戶自行提供 formula_db.json,該數據不隨倉庫分發。

forge-memory

forge-memory 提供記憶相關工具:

  • memory_recall:BM25 memory recall。
  • memory_fold_list、memory_fold_preview、memory_fold_deep:folded-memory tools。

資料說明 forge-memory 讀取用戶提供的記憶文件,例如:

  • memory.json
  • .forge-temp/memory_current.json
  • data/memory_current.json

evidence-first

evidence-first 提供:

  • evidence_audit:用於審計 unverified completion claims。

安裝與啓用

先確認 DSH 版本滿足:

dsh >= 0.1.0-rc.5

安裝插件

倉庫資料給出的 GitHub 安裝命令是:

dsh plugin add github:jinguanghai/deepseek-harness-forge-plugins

資料也給出 Cordis bundle 安裝示例:

dsh plugin add ./plugins/forge-gates

或:

pnpm add dsh-forge-gates

這裏的示例以 forge-gates 爲例;已覈實資料列出了四個插件路徑,可按需註冊。

使用本地預設

可以把倉庫放到預設目錄,例如:

~/.dsh/.agent-presets/forge-plus/

在預設目錄的 agent.cordis.yml 中註冊插件路徑:

plugins:
  - path: ./plugins/forge-gates
  - path: ./plugins/forge-tcm
  - path: ./plugins/forge-memory
  - path: ./plugins/evidence-first

然後啓動 DSH:

npx @deepseek-ai/dsh web

典型用法

計算、邏輯與正則

資料給出的示例問題包括:

  • Simplify 3*(x+1)-3*x
  • Prove that x>0 follows from x>0 and x<10
  • Check regex [A-Z]\d{3} against B456

TCM

forge-tcm 的 herb-pair retrieval 需要用戶自備 formula_db.json。資料給出的示例問題是:

附子 配 乾薑 有哪些方劑?

記憶

forge-memory 用於讀取用戶提供的記憶文件。資料給出的文件路徑爲:

  • memory.json
  • .forge-temp/memory_current.json
  • data/memory_current.json

適用場景與注意

適合:

  • 希望在 DSH 中接入 gate 計算、形式化檢查、TCM 查詢、記憶召回或證據審計的開發者。
  • 使用 Windows 並可直接使用 prebuilt .exe binaries 的環境。
  • 在 Linux/macOS 從 src/go 構建 gate binaries 的環境。

注意:

  • 插件會在當前 dsh 進程權限下運行,安裝前應檢查源碼與許可證。
  • formula_db.json 不隨倉庫分發,TCM herb-pair retrieval 需要自行提供。
  • forge-memory 讀取用戶提供的記憶文件。
  • 資料說明 gates 是 pure logic,不包含 private data。
  • 文件訪問通過 ctx.fs,資料強調沒有 bare fs calls。
  • 已覈實資料中存在不一致記錄:README badge 顯示 tools-12,而正文/清單寫 13 tools;INSTALL 描述提到 Three plugins are published as Cordis bundles,但 package.json 依賴列出四個插件包。本文按已覈實清單介紹 4 個插件、13 個工具。
  • 資料未提供分類、星標數或目錄頁 URL。

結尾

這套插件的價值,是把 gate 計算、TCM 查詢、記憶召回和證據審計以 DSH 插件形式接出來。適合在 DSH 中需要外部工具和可檢查證據的開發者。資料未提供目錄頁 URL;GitHub 地址如下:

https://github.com/jinguanghai/deepseek-harness-forge-plugins

羽毛球分组比赛记分
小程序二维码

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

小夜