jinguanghai/deepseek-harness-forge-plugins
Forge-plus: math/logic/regex/eprover/system/repair gates + TCM diagnosis + memory recall plugins for DeepSeek Harness (dsh)
已收录
3
Dev, Memory, Tools
Bundle 已验证
功能介绍
jinguanghai/deepseek-harness-forge-plugins#evidence-first: 证据铁律守卫:模型声称成功但上下文中没有对应工具执行记录时,自动注入警告。 jinguanghai/deepseek-harness-forge-plugins#forge-gates: 真实计算验证门:数学化简、逻辑证明、正则校验、E-prover 一阶逻辑、状态机检查与代码修复,由 Go 编译的二进制支撑(附 Windows 预编译产物)。 jinguanghai/deepseek-harness-forge-plugins#forge-memory: 基于 BM25 关键词检索的记忆召回。 jinguanghai/deepseek-harness-forge-plugins#forge-tcm: 中医工具集:八纲辨证与药对查询。
适合
- 适合需要用编译验证门检查符号数学、逻辑、正则、一阶逻辑证明、状态机或代码修复建议的 DSH 工作流。
- 适合需要在模型缺少近期对应工具执行记录却声称完成时收到警告的 Agent。
- 适合已有本地记忆文件、希望使用 BM25 关键词召回及折叠记忆查看的用户。
- 适合基于自备方剂语料进行八纲辨证与药对检索的中医工作流。
不适合
- 不适合不愿或无法在 Linux、macOS 上构建 Go 验证门二进制的用户;预编译产物仅提供 Windows 版本。
- 不适合没有兼容本地记忆文件的召回流程;随附数据只是空模板。
- 不适合配置数据目录中没有 `formula_db.json` 方剂语料的中医查询。
- 不适合要求证明结果正确性的通用完成声明审计;evidence-first 只检查是否存在匹配的执行记录。
README
⚒️ Forge Plugins for DeepSeek Harness
Everything is a Plugin. — Bring the Forge (铸剑炉) arsenal into DeepSeek Harness.
13 production-grade tools · 4 plugins · zero npm dependencies · pure Cordis — the fastest way to give your DeepSeek Harness agent a real compute brain: symbolic math, formal logic, theorem proving, regex verification, model checking, code repair, TCM diagnosis, and memory recall.
✨ Why Forge Plugins?
| 🧮 Real computation | Symbolic math and logic that never hallucinate — every tool runs a compiled gate binary and returns verified results |
| 🧠 Formal reasoning | TPTP first-order theorem proving (EPROVER) + state-machine model checking, not just text generation |
| 🀄 TCM diagnosis | Unique 八极八势 (Eight Trigrams) pattern diagnosis and herb-pair retrieval across an ancient-formula corpus — the only TCM plugin for DeepSeek Harness |
| 🪶 Zero deps | Pure Cordis plugins, no npm install, no framework bootstrap code — drop-in and go |
| 🔒 Sandboxed | All file access goes through ctx.fs (host-plane discipline) — no bare fs calls |
| 🎁 Prebuilt binaries | Windows .exe included in Releases — Linux/macOS build from src/go in one command |
🔌 Plugins and Tools
| Plugin | Tool | What it does | Example result |
|---|---|---|---|
| forge-gates | forge_math |
Symbolic simplification / evaluation |
3*(x+1)-3*x → 3
|
forge_logic |
Formal proof / equivalence check |
x>0 and x<10 -> x>0 → proved
|
|
forge_regex |
Fullmatch regex validation |
[A-Z]\d{3} vs B456 → pass
|
|
forge_eprover |
TPTP first-order theorem proving | CNF axioms → theorem / counter-sat | |
forge_system |
State-machine model checking (deadlock/invariant) | 6 states → passed | |
forge_repair |
Code defect fix suggestions | bare except: → except Exception:
|
|
| forge-tcm | tcm_diagnose |
八极八势 TCM pattern diagnosis | text/vector → trigram + strategy |
tcm_herb_pair |
Herb-pair co-occurrence retrieval | 附子+干姜 → 916 formulas | |
| forge-memory | memory_recall |
BM25 experience recall | query → ranked snippets |
memory_fold_list |
Folded-memory index (π/φ) | list folded sections | |
memory_fold_preview |
Preview a folded section | content preview | |
memory_fold_deep |
Deep-read a folded section | full content | |
| evidence-first | evidence_audit |
Evidence audit: warns when a “done/success/fixed” claim has no tool-execution evidence | “任务完成” with no tool call → ⚠️ warning |
13 tools · 4 plugins · MIT · works with dsh ≥ 0.1.0-rc.5
🚀 Quick Start
# 1. Put this repo anywhere, e.g.:
# ~/.dsh/.agent-presets/forge-plus/ (repo root = preset dir)
# 2. Register plugins in your agent preset (see examples/agent.cordis.yml.snippet)
# 3. Start DeepSeek Harness:
npx @deepseek-ai/dsh web
agent.cordis.yml snippet:
# inside your preset directory
plugins:
- path: ./plugins/forge-gates
- path: ./plugins/forge-tcm
- path: ./plugins/forge-memory
- path: ./plugins/evidence-first
Then just ask your agent:
“Simplify 3(x+1)-3x” →
3✅ “Prove that x>0 follows from x>0 and x<10” →proved✅ “Check regex [A-Z]\d{3} against B456 and order B456 ok” → pass/fail ✅ “附子 配 干姜 有哪些方剂?” → ranked formulas from your corpus ✅
🔧 Environment
| Variable | Default | Purpose |
|---|---|---|
FORGE_GATE_BIN |
<repo>/bin/windows |
gate binary dir (Linux/macOS: go build from src/go, see below) |
FORGE_HOME |
process.cwd() |
memory data dir (memory.json / .forge-temp/memory_current.json / data/memory_current.json) |
FORGE_DATA |
cwd / data/
|
TCM formula dir (must contain formula_db.json) |
🔨 Build Gates from Source (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 users: prebuilt
.exebinaries are attached to the v0.1.0 Release — no build needed.
🏗️ Architecture
DeepSeek Harness (dsh) agent
│ inject: ['tools']
▼
┌─ forge-plus preset ──────────────────┐
│ forge-gates ── forge-memory ── forge-tcm │
│ └──────┐ └────────┐ │
│ subprocess │ │
│ ▼ ▼ │
│ ┌─ gate binaries ──┐ ┌─ data ─────┐│
│ │ math / logic / │ │ memory.json││
│ │ regex / eprover /│ │ formula_db ││
│ │ system / repair │ │ (yours) ││
│ │ tcm │ └────────────┘│
│ └──────────────────┘ │
└─────────────────────────────────────────┘
Gate protocol: tools invoke gate binaries, each writes ONE JSON object to stdout.
📊 Data Notes
-
forge-tcm herb-pair retrieval requires
formula_db.json— a private ancient-formula corpus (家传古籍数据) that is NOT distributed with this repo. Provide your own and pointFORGE_DATAat it. -
forge-memory reads
memory.json/.forge-temp/memory_current.json/data/memory_current.json— bring your own memory files (empty templates indata/). - The gates themselves are pure logic (no private data baked in).
🎯 Project Lineage
Forge (铸剑炉) is a general-purpose digital agent: a multi-language compiler sandbox with 18 tool gates (Python / Go / Node / Rust / EPROVER / TCM / …), an LLM brain over a code body, and self-evolving architecture. This repo is its dsh-native plugin family — same gates, same discipline, now Everything is a Plugin.
- Main project: github.com/jinguanghai/forge
- DeepSeek Harness: deepseek-ai/deepseek-harness
📜 License
MIT © jinguanghai
INSTALL
Three plugins are published as Cordis bundles – install any of them into a dsh profile:
# 1 dsh CLI (local dir / tarball)
dsh plugin add ./plugins/forge-gates
# 2 pnpm (npm registry / local tarball)
pnpm add dsh-forge-gates
# 3 Manual: symlink/copy the plugin dir into your profile's node_modules,
# then add the bundle entry to package.json's dsh.profile.bundles.
Prebuilt Windows .exe binaries ship inside each bundle (bin/windows/).
Latest bundle tarballs: https://github.com/jinguanghai/deepseek-harness-forge-plugins/releases/latest
Linux/macOS: build the 7 gate binaries from
src/go/in one command, see BUILDING.
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:jinguanghai/deepseek-harness-forge-plugins#path:/plugins/evidence-first。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。