DeepSeek Harness 插件

jinguanghai/deepseek-harness-forge-plugins#forge-gates

Star 数 ★ 0 分类 工具与能力 收录于 2026-08-14

真实计算验证门:数学化简、逻辑证明、正则校验、E-prover 一阶逻辑、状态机检查与代码修复,由 Go 编译的二进制支撑(附 Windows 预编译产物)。

安装

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:jinguanghai/deepseek-harness-forge-plugins#path:/plugins/forge-gates

GitHub 来源的插件在安装时会在你的机器上执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

一切皆插件 (Everything is a Plugin)。 — 把铸剑炉 (Forge) 的兵器库带进 DeepSeek Harness

License: MIT Tools Plugins Dependencies dsh OS

12 个生产级工具 · 3 个插件 · 零 npm 依赖 · 纯 Cordis —— 给 DeepSeek Harness 智能体装上真正的计算大脑:符号数学、形式逻辑、定理证明、正则验证、状态机检测、代码修复、中医诊断、经验记忆召回。


✨ 为什么选铸剑炉插件?

🧮 真计算 符号数学与逻辑永不幻觉 —— 每个工具调用编译后的 gate 二进制,返回已验证结果
🧠 形式推理 TPTP 一阶逻辑定理证明(EPROVER)+ 状态机模型检测,不只是文字生成
🀄 中医能力 独有的八极八势卦象诊断 + 古籍方剂药对检索 —— DeepSeek Harness 生态唯一的中医插件
🪶 零依赖 纯 Cordis 插件,无 npm install、无框架启动代码,放进去就能用
🔒 沙箱化 文件访问全部走 ctx.fs(宿主平面纪律),无裸 fs 调用
🎁 开箱即用 Windows 预编译 exe 已挂在 Releases,Linux/macOS 一条命令自编译

🔌 插件与工具

插件 工具 功能 实测示例
forge-gates forge_math 符号化简 / 求值 3*(x+1)-3*x3
forge_logic 形式证明 / 等价判定 x>0 and x<10 -> x>0proved
forge_regex 整串匹配正则验证 [A-Z]\d{3} vs B456pass
forge_eprover TPTP 一阶逻辑定理证明 CNF 公理 → theorem / counter-sat
forge_system 状态机模型检测(死锁/不变量) 6 状态 → passed
forge_repair 代码缺陷修复建议 except:except Exception:
forge-tcm tcm_diagnose 八极八势中医态势诊断 文本/向量 → 卦象+六势态+战略
tcm_herb_pair 药对同现方剂检索 附子+干姜 → 916 首方剂
forge-memory memory_recall BM25 经验召回 查询 → 排序片段
memory_fold_list 折叠记忆索引(π/φ) 列出折叠区段
memory_fold_preview 预览折叠区段 内容预览
memory_fold_deep 深度读取折叠区段 全文

12 个工具 · 3 个插件 · MIT · 支持 dsh ≥ 0.1.0-rc.5


🚀 快速开始

# 1. 把仓库放到任意位置,例如:
#    ~/.dsh/.agent-presets/forge-plus/   (仓库根即预设目录)

# 2. 在预设里注册插件(见 examples/agent.cordis.yml.snippet)

# 3. 启动 DeepSeek Harness:
npx @deepseek-ai/dsh web

agent.cordis.yml 片段:

# 放在你的预设目录内
plugins:
  - path: ./plugins/forge-gates
  - path: ./plugins/forge-tcm
  - path: ./plugins/forge-memory

然后直接对智能体说:

"化简 3(x+1)-3x"3"证明 x>0 且 x<10 推出 x>0"proved"用正则 [A-Z]\d{3} 验证 B456 和 order B456 ok" → pass/fail ✅ "附子 配 干姜 有哪些方剂?" → 从你的古籍库返回排序方剂 ✅


🔧 环境变量

变量 默认值 用途
FORGE_GATE_BIN <repo>/bin/windows gate 二进制目录(Linux/macOS 请用 src/go 自行编译)
FORGE_HOME process.cwd() 记忆数据目录(memory.json / .forge-temp/memory_current.json / data/memory_current.json
FORGE_DATA cwd / data/ 中医方剂库目录(须含 formula_db.json

🔨 从源码编译 gate(Linux / macOS / Windows)

cd src/go
for g in math logic regex eprover system repair tcm; do
  go build -o ${g}_gate${EXT} ${g}_gate.go
done   # Windows: set EXT=.exe

💡 Windows 用户:预编译 exe 已挂在 v0.1.0 Release,无需编译。


🏗️ 架构

DeepSeek Harness (dsh) 智能体
        │  inject: ['tools']
        ▼
   ┌─ forge-plus 预设 ──────────────────┐
   │ forge-gates ── forge-memory ── forge-tcm │
   │        └──────┐         └────────┐      │
   │       子进程               │      │
   │               ▼                 ▼      │
   │     ┌─ gate 二进制 ────┐  ┌─ 数据 ──────┐│
   │     │ math / logic /   │  │ memory.json││
   │     │ regex / eprover /│  │ formula_db ││
   │     │ system / repair  │  │ (自备)     ││
   │     │ tcm              │  └────────────┘│
   │     └──────────────────┘                │
   └─────────────────────────────────────────┘
Gate 协议:工具调用 gate 二进制,每个二进制向 stdout 输出一个 JSON 对象。

📊 数据说明

  • forge-tcm 药对检索需要 formula_db.json —— 私有古籍方剂库(家传古籍数据),不随本仓库分发。请自行准备,并用 FORGE_DATA 指向其目录。
  • forge-memory 读取 memory.json / .forge-temp/memory_current.json / data/memory_current.json —— 记忆文件自备(data/ 中有空模板)。
  • gate 本身是纯逻辑(不内嵌任何私有数据)。

🎯 项目渊源

铸剑炉 (Forge) 是一个通用数字智能体:多语言编译沙箱 + 18 门 Gate(Python / Go / Node / Rust / EPROVER / TCM / …),LLM 大脑驱动代码身体,自我进化架构。本仓库是它的 dsh 原生插件家族 —— 同样的 Gate、同样的纪律,现在 一切皆插件

📜 License

MIT © jinguanghai

安装方式

三个插件均为 Cordis bundle 格式,可装入任意 dsh 配置:

# 1 dsh CLI(本地目录 / 离线包)
dsh plugin add ./plugins/forge-gates
# 2 pnpm(npm registry / 本地 tgz)
pnpm add dsh-forge-gates
# 3 手动:把插件目录符号链接进 profile 的 node_modules,
#    并在 package.json 的 dsh.profile.bundles 中登记

Windows 预编译 .exe 已随 bundle 分发(bin/windows/)。 最新离线包:https://github.com/jinguanghai/deepseek-harness-forge-plugins/releases/latest

Linux/macOS:用 src/go/ 一条命令编译 7 个 gate,见 BUILDING

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →