zhujunpeng12/dsh-memory-system 预览 preview

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 开源许可证,不适合多租户服务端、高频多写者并发或全自动无审批记忆场景。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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

DSH Memory System

dsh-memory-system

让 DeepSeek Harness 跨会话记住项目、规则和纠正,同时把数据留在本机 Markdown。

CI npm DSH Python License: MIT

English · 工作原理 · 安全边界 · 参与贡献

它不是另一个黑盒向量库:启动时只注入有预算的热记忆,需要历史细节时才做可解释的中文 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 →

← 上一个 Prev dsh-behavior-enhancer 下一个 Next dsh-custom-background →