zhujunpeng12/dsh-memory-system
DeepSeek Harness 的本地优先持久记忆基础设施:热启动、中文 BM25 冷召回、租约锁定事务写入、只读治理
Project Overview项目介绍
This is a native DSH plugin built exclusively for DeepSeek Harness that adds persistent cross-session memory for coding agents. It requires DeepSeek Harness 0.1.0-rc.7 or newer, Node.js 22 or 24, and Python 3.10 or higher to run. You can install it directly via the official DSH CLI with the command npx @deepseek-ai/dsh plugin --profile web add github:zhujunpeng12/dsh-memory-system. After installation, you just need to restart Harness and run the memory_gate command in a new session to complete initialization. First run automatically creates the default ~/.dsh-memory/ directory skeleton for your memory vault, so you do not need to manually set up the folder structure before starting.
All memory data stays local on your machine in plain Markdown files, so you can review and edit any memory with a standard text editor or Obsidian. The system injects a 14KB maximum hot memory bundle at session start, and only pulls longer historical details on demand using Chinese BM25 keyword ranking, which provides fully interpretable recall results. It prioritizes write safety: all writes default to dry-run preview, require manual user approval before committing, and use a single-writer lease lock and transaction system to prevent file corruption. It is ideal for individual developers and small teams that value local privacy, auditability, and safe writes.
This project is released under the open source MIT license, and it does not collect any user personal data. It is not suited for scenarios that require multi-tenant server-side hosting, high-concurrent multi-writer access, semantic vector search, or fully automatic unapproved memory writes. It has several known limitations: cold recall uses BM25 not semantic vectors, it does not support git branch-level isolation, and hot memory is only injected once per session. If you run into installation issues, you can refer to the troubleshooting documentation included in the repository.
这是专为 DeepSeek Harness 开发的原生插件,为 DSH 的 Agent 提供跨会话持久化记忆能力,所有用户记忆数据始终保留在使用者本地的 Markdown 文件中,默认不需要依赖外部数据库、向量服务或外部 API。它在新会话启动时注入大小受限的热记忆,需要历史细节时才会通过中文 BM25 算法完成可解释召回。
它遵循写入安全和本地优先的设计原则,所有写操作默认开启干运行预览,必须经过用户确认才会正式落盘,同时采用单写者租约锁、事务快照和提交回执机制保证写入不会损坏现有文件。它适合重视记忆可审计、本地隐私保护、中文召回质量和写入安全的个人或小团队 DSH 工作流。
安装需提前准备好 DSH 0.1.0-rc.7 以上版本、Node.js 22/24 和 Python 3.10+,可通过 DSH 官方 CLI 一键安装,重启后运行 memory_gate 完成初始化,首次运行会自动创建本地记忆库目录。项目采用 MIT 开源许可证,不适合多租户服务端、高频多写者并发或全自动无审批记忆场景。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-memory-system(zhujunpeng12/dsh-memory-system)
仓库:https://github.com/zhujunpeng12/dsh-memory-system
本站详情页:https://www.yhbd.top/plugins/zhujunpeng12-dsh-memory-system/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 8 · 最近提交 2026-08-21 · 主语言 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 8 stars - very few users, little community feedback星标只有 8,几乎没人在用,遇到问题缺少社区反馈
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命令行安装
npx @deepseek-ai/dsh plugin --profile web add github:zhujunpeng12/dsh-memory-system
把 zhujunpeng12/dsh-memory-system 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
它不是另一个黑盒向量库:启动时只注入有预算的热记忆,需要历史细节时才做可解释的中文 BM25 召回;所有写入默认预览,并通过租约锁、before-image、SHA-256 前置条件和回执保护。默认使用 ~/.dsh-memory/,无需 Obsidian、数据库、向量服务或外部 API。
隐私边界:仓库只包含机制,不包含任何个人数据。画像、规则、事件和项目笔记始终留在使用者本机;也可用
MEMORY_VAULT指向自己的 Obsidian Vault。
30 秒安装
前提:已安装 DeepSeek Harness 0.1.0-rc.7,Node.js 22/24 与 Python 3.10+ 可用。
npx @deepseek-ai/dsh plugin --profile web add github:zhujunpeng12/dsh-memory-system
重启 Harness 后,在新会话让 Agent 运行 memory_gate。成功时会看到门禁结果,并且首轮上下文包含 [vault-bootstrap];首次运行会自动创建 ~/.dsh-memory/ 骨架。
遇到 Cannot find package、ctx.agents 或热包未注入,请看 安装故障排查。
AI 代装提示(复制整句给你的 Agent)
请把 github:zhujunpeng12/dsh-memory-system 安装到 DeepSeek Harness 的 web profile,重启后运行 memory_gate,并确认新会话收到 [vault-bootstrap]。不要读取或上传任何私人记忆内容。
为什么选它
| 你关心的事 | 本项目的取舍 |
|---|---|
| 数据能否直接看懂 | 事实源是本机 Markdown,可用编辑器或 Obsidian 审阅 |
| 中文历史能否召回 | exact + 中文 bigram BM25 + 标题/路径/项目重排,返回来源和 trace |
| Agent 会不会乱写记忆 | 写操作默认 dry-run;用户确认后才进入可恢复事务 |
| 多会话会不会写坏文件 | 单写者租约锁、心跳、崩溃恢复、before-image 与提交回执 |
| 是否需要模型或数据库服务 | 不需要;默认零后台 LLM、零向量服务、零数据库 |
| 上下文会不会越积越重 | 热包 ≤14KB、冷包 ≤4.2KB,细节按需打开 |
适合:重视可审计、本地优先、中文召回和写入安全的个人/小团队 DSH 工作流。
不适合:需要多租户服务端、高频多写者、默认语义向量或全自动无审批记忆写入的场景。
为什么需要它
Agent 会话之间默认是失忆的。本系统用 六层机制 把「记忆」变成可工程化的闭环:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Awesome-AI-Pedia/Awesome-AI-Pedia
hr98w/dsh-memory
Thanksgiver233/comm-protocol-hub
rainow/dsh-simple-wiki-memory