前言¶
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.jsondata/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*xProve that x>0 follows from x>0 and x<10Check regex [A-Z]\d{3} against B456
TCM¶
forge-tcm 的 herb-pair retrieval 需要用户自备 formula_db.json。资料给出的示例问题是:
附子 配 干姜 有哪些方剂?
记忆¶
forge-memory 用于读取用户提供的记忆文件。资料给出的文件路径为:
memory.json.forge-temp/memory_current.jsondata/memory_current.json
适用场景与注意¶
适合:
- 希望在 DSH 中接入 gate 计算、形式化检查、TCM 查询、记忆召回或证据审计的开发者。
- 使用 Windows 并可直接使用 prebuilt
.exebinaries 的环境。 - 在 Linux/macOS 从
src/go构建 gate binaries 的环境。
注意:
- 插件会在当前 dsh 进程权限下运行,安装前应检查源码与许可证。
formula_db.json不随仓库分发,TCM herb-pair retrieval 需要自行提供。forge-memory读取用户提供的记忆文件。- 资料说明 gates 是 pure logic,不包含 private data。
- 文件访问通过
ctx.fs,资料强调没有 barefscalls。 - 已核实资料中存在不一致记录: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