GIT121995/dsh-memory-gate
检索≠注入:面向DeepSeek Harness的CBDC门控记忆——决定记忆如何被使用(使用/验证/忽略+反馈学习+审计),而非仅仅存储
Project Overview项目介绍
This is a native long-term memory plugin built exclusively for DeepSeek Harness. It implements the CBDC (Claim → Belief → Decision → Consumption) authority gating flow, which requires every retrieved memory to pass an approval check before entering the model context. Every memory gets a clear decision of use, verify, or ignore, and post-use user feedback updates the confidence score of each memory, so accuracy improves over time. All memory data is stored locally on your machine in SQLite with FTS5 full-text search, no external embedding model or third-party memory API is required.
To install the plugin, you need pnpm set up on your system, and you can install it via the DSH plugin command dsh plugin --profile web add dsh-memory-gate. It supports three operating modes you can switch between based on your use case: shadow mode only audits memory without injecting any into context, assist is the default mode that injects approved memory and marks untrusted memory for verification, and enforce mode only injects high-confidence memory. It also provides a full set of /memory slash commands for managing your memory library, from adding new memory to running feedback calibration and merging duplicate entries.
This plugin requires Node.js version 22.5 or newer, and is compatible with DeepSeek Harness version 0.1.0-rc.6 and above. It is released under the open source MIT license, and is an unofficial community-maintained plugin, not an official DeepSeek product. Current limitations include lexical-level trigger matching that only covers common phrases, and automatic memory extraction only recognizes explicit memory declarations. It does not backfill memory from sessions before the plugin was installed, and does not store full conversation transcripts. A known minor issue is that Node.js 22 will print an experimental warning for the built-in SQLite module, which does not affect normal operation of the plugin.
这是一款专为 DeepSeek Harness 开发的原生长期记忆插件,核心实现了 CBDC(声明→置信→决策→消费)权威门控机制。每条检索到的记忆在进入模型上下文前都会先得到 use/verify/ignore 的裁决,使用后的反馈会反向更新记忆置信度,让记忆越用越精准。存储层采用本地 SQLite + FTS5,无需调用任何 embedding 模型或外部记忆 API。
插件支持三种运行模式,可按场景切换 shadow(仅审计零注入)、assist(默认,注入可用记忆并标记待核验项)、enforce(仅注入高置信记忆)。提供了 /memory 开头的完整管理命令,支持记忆新增、搜索、删除、反馈校准、近重复合并、历史日志回挖等操作,适配不同开发场景的记忆管理需求。
本插件要求 Node.js 版本不低于 22.5,兼容 0.1.0-rc.6 及以上版本的 DeepSeek Harness,采用 MIT 许可证开源,属于社区非官方插件。当前为词法级触发召回,仅支持常见表达,自动提取仅识别明确记忆声明,不回填安装前的历史会话,符合社区插件的使用预期。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-memory-gate(GIT121995/dsh-memory-gate)
仓库:https://github.com/GIT121995/dsh-memory-gate
本站详情页:https://www.yhbd.top/plugins/git121995-dsh-memory-gate/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-10 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 dsh-memory-gate
把 GIT121995/dsh-memory-gate 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-memory-gate(记忆闸门)
核心立场:检索到 ≠ 注入。前身是
dsh-memory-cbdc(v0.1.x); v0.2.0 起更名为 dsh-memory-gate,CBDC 保留为机制名(见下)。 旧仓库地址仍会重定向到本仓库。
DeepSeek Harness 的长期记忆插件,只回答一个问题:记忆记住了,然后呢?
它把稳定信息保存为可撤销的 Claim,并在每次模型调用前执行 CBDC
(Claim → Belief → Decision → Consumption)权威门控——每条记忆先经裁决
(use / verify / ignore),才决定能否进入上下文;使用后的反馈
(helped/harmful)反向更新置信度,越用越准,全程可审计。默认注入
≤3 条 / 1200 字符,不增加第二次模型调用。
(存储层:本地 SQLite + FTS5,无 embedding、无外部记忆 API。)
这是社区插件,不属于 DeepSeek 官方项目。许可证为 MIT。
Long-term memory for DeepSeek Harness that cares about how memory is
used, not just stored — retrieved ≠ injected: every recall passes
CBDC (Claim → Belief → Decision → Consumption) authority gating and lands
as an explainable use / verify / ignore decision before it can enter
context. Post-use feedback updates belief, so memory gets more accurate
over time — all auditable, bounded (≤3 claims / 1200 chars by default),
no extra model call. (Local SQLite + FTS5 storage; no embeddings, no
external memory API.)
当前版本:0.12.0。目标 Harness:0.1.5-rc.1(兼容 0.1.0-rc.6 起的 Harness),Node.js >=22.5。
v1 能力
- 使用前裁决:每条记忆注入前过 CBDC(Claim → Belief → Decision →
Consumption)权威门控,输出可解释的
use/verify/ignore决策。 - 使用中克制:默认最多注入 3 条、1200 字符;全局偏好走 capsule 通道特权注入;不增加第二次模型调用。
- 使用后学习:
/memory ok(或feedback <#n> helped)把当次查询的 区分性词项学进触发词(只存词项、不存查询原文),harmful/stale 降低 置信度并触发隔离——越用越准,/memory explain全程可审计。 - 近重复合并:写入时新记忆与同作用域已有词项重叠 ≥ 60% 时,旧条目
自动标
superseded、新记忆记录取代关系;/memory consolidate可手动 全库合并,避免"相近表达"堆成重复记忆。 - 三种运行模式:
shadow(只审计零注入)、assist(默认,注入 use + 标出 verify)、enforce(只注入高置信)——按场景切换"怎么用"。 - 双通道召回:少量可信全局偏好/约束组成记忆胶囊,其余记忆经词项触发。
- session、workspace、global 三种作用域;workspace 路径只保存哈希键。
- 显式
/memory管理命令和保守的中英文自动提取。
技术规格:本地 SQLite + FTS5 存储,不调用 embedding 或外部记忆 API; 写时触发词含繁→简、全角→半角归一与双语同义折叠;API Key、Token、密码 和私钥样式内容在落库前拒绝;数据库或策略异常时不阻断 Agent,只省略 本次记忆注入。
安装
Harness 的插件管理依赖 pnpm。
Linux / WSL:
npm install -g pnpm
dsh plugin --profile web add dsh-memory-gate
dsh web --dump-config | sed -n '/memory-gate/,+18p'
Windows PowerShell:
npm install -g pnpm
dsh plugin --profile web add dsh-memory-gate
dsh web
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ruvnet/ruflo
sandbaseai/sandbase-harness
mnemon-dev/mnemon
syncable-dev/memtrace-public
huiliyi37/dsh-tianshu-tui
PerryLink/dsh-memento
xiehuan123/dsh-deepread
PerryLink/dsh-plugin-guide