yjh051108/dsh-engram-relay
dsh-engram-relay public mirror (upstream: dsh-external/dsh-engram-relay): cross-session hierarchical memory + hash×semantic×causal ultra-sparse wake-up, 13 engram_* tools, BSD-3-Clause
Project Overview项目介绍
This repository hosts FengShi, a native plugin built exclusively for DeepSeek Harness (DSH). It acts as an external cross-session memory brain for DSH agents, combining memory and knowledge into a single self-organizing semantic graph that works across global, project, and session levels. To install the plugin, you first clone the repository, run npm install --legacy-peer-deps to install the exact locked dependencies, then build the project with npm run build. After that, you can either hot inject it for development or add it normally to your DSH profile, before starting the local LingShu calibration service.
FengShi is designed for any DSH user that wants to improve their agent's long-term memory retention and answer accuracy. In normal workflow, it automatically injects relevant memory clues into every conversation turn with the agent. When the agent encounters a question it cannot answer based on existing knowledge, FengShi will automatically generate a new knowledge card and add it to the semantic graph on the fly. This means the next time the same or related question comes up, the agent can pull the correct information directly, reducing hallucinations and avoiding ungrounded answers.
FengShi is released under the open-source BSD-3-Clause license for its engineering code, with conceptual protocol rights retained by the original author. After installation, you need to start the LingShu calibration service written in Python, which runs locally on port 18766 and includes a watchdog that automatically restarts the service if it crashes. By default, the plugin uses pure algorithmic semantic matching, but you can optionally configure an ONNX BGE embedding model for additional verification. There is a daily limit of five new knowledge cards to prevent noise pollution in the semantic graph.
风识(FengShi)是专为DSH开发的原生插件,为DSH智能体提供跨会话的外置统一记忆大脑,核心是将记忆与知识融合为一张自组织语义图。默认采用纯算法实现语义匹配,无需额外启用embedding模型,支持分层存储跨会话记忆、自动注入浅思维线索、灵枢知识校准、自动生成知识卡和补全语义簇等功能。
面向需要提升DSH智能体长期记忆能力和回答准确率的开发者与普通用户,日常使用中该插件会在每轮对话自动注入相关记忆线索,当智能体遇到无法回答的问题时,会当场自动生成知识卡存入语义图谱,下次遇到同类问题即可直接调用,有效降低错误率,避免无依据硬答。
该项目采用BSD-3-Clause许可证开源,安装需要克隆仓库后通过npm安装依赖并构建,再装配到DSH,另外需要启动Python运行的灵枢校准服务,默认开启纯算法语义匹配,也可配置启用ONNX BGE模型做验证,每日生成知识卡上限为5张避免噪声污染。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-engram-relay(yjh051108/dsh-engram-relay)
仓库:https://github.com/yjh051108/dsh-engram-relay
本站详情页:https://www.yhbd.top/plugins/yjh051108-dsh-engram-relay/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 3 · 最近提交 2026-09-19 · 主语言 Python
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:yjh051108/dsh-engram-relay
把 yjh051108/dsh-engram-relay 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
风识 FengShi · DSH 统一大脑
跨会话记忆图谱(agent 自组织)+ 灵枢知识校准器(白箱验证)+ 浅思维自动注入 + 自动补卡/补簇 + 跨端联动(知+忆)。 让 DSH 的 agent 拥有「记得住、懂得多、不硬答、当场学、学得快」的外置大脑。 百查询出招正确率 ~90%;闲聊/新域零污染(诚实边界);使用者自己补卡/补簇当场生效。
是什么
风识是一个 DSH 插件,把记忆与知识融合为一张自组织语义图:
一体两器官(r60 定版,详见 AGENTS.md 同名节):知识=去情景可共享(学科卡),经验=带情景第一人称(节点/因果/确认制);融合在接缝不在合并——verify 四态带
📎 相关记忆、respond 命中亦回头找经验、双不会共学一环、命名空间互不吞并(合并是幻觉,互见才是融合)。
统一自适应语义图(agent 建边 · 强化遗忘 · 软簇)
├─ 存储层:节点=记忆/概念(蒸馏+agent 织网),跨会话分层 global/project/session
├─ 召回层:哈希+纯算法语义匹配(SemanticScorer 三通道,零模型)
├─ 浅思维:图上算子(条件/验证/边界)→ 每轮自动注入 3 行
└─ 深挖层:15 个工具(recall/store/open/link/verify/respond…)渐进披露
灵枢(常驻校准器):
· D_norm 验证闸门——记忆敢想,灵枢把关敢不敢说对
· 诚实边界——不知道就说不知道(不裁决,防过度自信)
· 自动补卡——agent 求助且无答案(双不会)→ 当场生成知识卡 → 下次即有
设计原则
- 零 embedding:语义匹配为纯算法(词汇 n-gram / 共现桥 / 图传播),可解释、可审计;ONNX bge 仅作对比验证(显式配置启用)
- 算法是参谋,agent 是主人:建边由 agent 决策,算法只给候选建议
- 浅注入,深挖掘:每轮自动注入 3 行线索,细节由 agent 用工具渐进披露
- 人类式学习:不会 → 求助 → 查不到 → 当场补卡(当日上限 5 张,防噪声);弱命中高频 → 自动补词网(俗语→规范词桥接)
- 诚实边界:证据不足不裁决,图谱外明说,绝不硬答
功能清单
| 能力 | 说明 |
|---|---|
| 记忆注入 | 每轮 API 调度自动注入相关记忆入口(记忆+浅思维三行) |
| 浅思维 | 条件(邻域 kind 分布)/ 验证(灵枢校准)/ 边界(教训邻域+边界词) |
| 自动补卡 | agent 求助无答案 → LLM 生成知识卡(空返回时启发式保底)→ 灵枢写入 |
| 自动补簇 | 弱命中查询 ≥3 次 → 从查询提取俗语词自动建簇(零 LLM,相关性质量门)→ 词网自组织 |
| 占位卡治理 | 无答案补卡的占位卡标 pending——不参与出招/验证(防污染),等 LLM 生成真卡 |
| 蒸馏保底 | 回合后 LLM 蒸馏;空返回时启发式直接沉淀(记忆不断流) |
| 自动成族 | 语义图软簇(层次聚类,分辨率可调)——无硬分类 |
| 跨域桥 | agent 跨域对话触发桥边——「融会贯通」的结构化形态 |
| 灵枢自愈(v0.4.0) | 插件托管灵枢服务:未运行自动拉起 start_lingshu.py、崩溃按需重启(10s 冷却)、只 kill 自拉起进程(手动实例尊重)、不可用友好降级 |
| 过时记忆淘汰(v0.4.0) | 闲置 45 天 + 重要度门槛 → 自动退役(退出召回,search 可见 🗄,open/confirm 复活);蒸馏同题刷新/旧题接替;同标题只留最新;工具 engram_retire 手动处置 |
| 验证缓存(v0.4.0) | 灵枢验证 LRU(TTL 10min):同主题重复轮次零 HTTP;error 不缓存(恢复即重试) |
| 工具面 | 15 个工具:recall/store/propose/confirm/reject/open/search/link/update/remove/promote/status/verify/respond/retire |
装配(与本地一致)
1. 克隆与构建
git clone https://github.com/yjh051108/dsh-engram-relay.git fengshi
cd fengshi
npm install --legacy-peer-deps # 依赖精确锁定(package-lock.json 已入库)
npm run build # 构建 lib/(tsc host + tsdown client)
2. 装配到 DSH
# 方式 A:热装(免重启,开发用)
# 用 DSH 注入器 dev_inject_plugin 指向本仓库目录
# 方式 B:正常装配(重启生效,生产用)
dsh plugin --profile web add .
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
vshulcz/deja-vu
adoresever/graph-memory
mnemon-dev/mnemon
Phant0Meow/dsh-meow-memory
slow-stack/mneme
Aik358/dsh-auto-memory