KLRSL/dsh-biomemory
DeepSeek Harness的生物仿生记忆系统插件——透明的Markdown记忆、经审批的写入、冻结快照注入
Project Overview项目介绍
This is a native cross-session memory plugin built exclusively for DeepSeek Harness (DSH). It implements a biologically inspired memory system that mimics how the human brain stores and manages information, with layered organization, graded approval gates, automatic memory metabolism, and full user edit access. To install the plugin, you can run the DSH CLI command dsh plugin add github:KLRSL/dsh-biomemory when you have git installed, then restart your DSH instance to activate it. All memory data is stored in a single SQLite file using Node.js’s built-in node:sqlite module, so no external native dependencies are required.
This plugin is designed for DSH users who need to retain long-term memory across multiple chat sessions and accumulate project knowledge over time. When you add a new important memory such as a user preference or project decision, it will automatically trigger a manual approval step before being saved to the permanent storage layer. At the start of each new session, high-priority locked memories and user preferences are automatically injected as a frozen context snapshot. It supports three search modes for memory retrieval: exact keyword, semantic, and hybrid, and allows full edit, delete, and rollback operations on individual memory entries.
The plugin requires Node.js version 22.19.0 or higher, and DSH runtime version 0.1.1-rc.2 or higher, and has been tested on multiple recent DSH pre-release versions. It is released under the permissive MIT open source license, so you can use, modify, and distribute it freely under the terms of the license. On first run, it automatically migrates any existing old Markdown-format memories to the new SQLite database and retains a read-only backup of the original files. Semantic search uses a local offline embedding model by default, and if the model is missing, it automatically falls back to TF-IDF keyword search that still delivers full core functionality.
这是专为 DeepSeek Harness(DSH)打造的原生跨会话记忆插件,模拟人脑记忆机制,实现分层存储、分级审批、自动代谢、透明可编辑的长时记忆管理。你可以通过 DSH 命令行工具执行 dsh plugin add github:KLRSL/dsh-biomemory 完成安装,安装后重启 DSH 即可启用。它基于 Node 内置的 node:sqlite 存储数据,无额外外部原生依赖。
它面向需要在 DSH 多轮会话之间保留长期记忆、沉淀项目知识的开发者和普通用户。典型工作流为:添加新记忆时重要记忆自动触发人工审批,会话启动自动注入高优先级冻结记忆快照,检索支持三种模式,还支持记忆编辑、删除、回滚操作。定期运行记忆代谢和深度反思,可自动完成低权重记忆归档和项目冲突分析。
该插件要求 Node 版本不低于 22.19.0,DSH 运行时版本不低于 0.1.1-rc.2,已在多个 DSH 预发布版本实测通过。它采用 MIT 开源许可,可自由使用修改,首次启动会自动迁移旧 Markdown 记忆并保留只读备份。语义检索默认用离线本地嵌入模型,缺失时自动降级为关键词检索,不影响核心功能。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-biomemory(KLRSL/dsh-biomemory)
仓库:https://github.com/KLRSL/dsh-biomemory
本站详情页:https://www.yhbd.top/plugins/klrsl-dsh-biomemory/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 6 · 最近提交 2026-09-30 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
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:KLRSL/dsh-biomemory
把 KLRSL/dsh-biomemory 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-biomemory
生物仿生记忆系统:跨会话记忆插件,像人脑一样分层记、分级审、会代谢、透明可改。
v0.9.2 · MIT License · DSH ≥ 0.1.1-rc.2(已在 0.1.5-rc.1 / 0.1.5-rc.2 / 0.2.0-rc.2(桌面版) 实测)· Node ≥ 22.19.0
⚠️ Node 版本提示:本插件用
node:sqlite。已在 Node 24.19 实测通过;Node 22.x 上该模块可能仍需--experimental-sqlite(本机无 22.x,未能实测)。若启动报node:sqlite不可用,请升级到 24.x 或加上该 flag。
给 DeepSeek Harness(DSH)的跨会话记忆插件:像人脑一样分层记、分级审、会代谢、透明可改。数据层为 SQLite(node:sqlite 内置、WAL 模式、零外部依赖),旧 Markdown 记忆首次启动自动迁移并保留只读备份。
功能特性
| 能力 | 说明 |
|---|---|
| 分层记忆 | Memory / Retrieved / Applied 三层分离——存储层、查询候选、已注入快照;检索到 ≠ 已采用,执行与否由 AI 结合上下文判断 |
| 分级审批 | 重要记忆(用户偏好/项目决策/踩坑教训)人工审批,普通事实自动写入;审批通道不可用时按 approvalFallback 降级(auto/deny) |
| 自动沉淀 | 会话结束自动注入「沉淀本轮」指令;启动自动注入冻结记忆快照(锁定与偏好最高优先级,冲突行为记忆置顶 [冲突] 标注) |
| 记忆代谢 | 半衰期衰减 + 引用巩固(用进废退)+ 冲突豁免 + 低权重归档;执行前自动备份、支持断点续跑与 dry-run 预览 |
| 深度反思 | 主题聚类 / 趋势统计 / 冲突提醒 / 遗忘建议,纯本地无 LLM,报告写入 longterm/reflections/ |
| 记忆类别 | memory_class 自动推断:user_decision / user_preference / fact / model_suggestion / model_inference(建议 ≠ 决定) |
| 来源可溯 | source_ref 记录来源,add 缺省记 session:<id>;结构化审计五元组(时间/操作者/事件/条目/详情)全程可查 |
| 确定性检索 | 单一检索路径:命中字段权重(text 1.0 / summary 0.5 / entities 0.25)+ 命中次数有界加成 + weight 有界加成(≤50%)。v0.9.0 起移除嵌入模型与 semantic/hybrid 模式 |
| 透明可改 | 每条记忆可编辑/删除/回滚(删除前自动备份);SQLite 单文件即所有数据,.db 直接用标准工具查看 |
| 零原生依赖 | node:sqlite 内置 + 纯 JS 实现,无原生模块冲突;纯 host 插件(无 UI 半边),只用 memory 工具与 /memory 命令 |
安装
从 GitHub 安装(推荐)
# 需要已安装 git;--profile web 换成你的 profile 名
dsh plugin --profile web add github:KLRSL/dsh-biomemory
本地 bundle(开发 / link)
# 在项目目录下执行
dsh plugin --profile web add link:./dsh-biomemory
dsh plugin 会自动把安装的包登记到 profile 的 dsh.profile.bundles 并挂载补丁;安装完成后重启 DSH。
安装后验证:
# 1. 工具已注册 —— 在会话中直接调用(对话内模型可见)
memory action=query text="测试"
# 2. 数据层就绪 —— 首次启动后应出现
ls ~/.dsh/biomemory/
# biomemory.db biomemory.db-wal biomemory.db-shm
# 3. 旧 Markdown 记忆自动迁移(保留只读备份,不删除)
# 迁移状态可通过 Web API 查看:
# GET /biomemory/api/status → migration 字段
# 4. 使用 —— 无需任何 UI:直接用 memory 工具或 /memory 命令
# memory action=query text="关键词" # 查(自动召回也在后台生效)
# memory action=add track=agent text="…" # 写(重要记忆会弹审批)
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
zilliztech/memsearch
sandbaseai/sandbase-harness
text2future/flowix
tinqiao-oss/engramory
a86582751/dsh-nexttavern
PerryLink/dsh-memento