Skip to main content
Back to plugins
M

dsh-mneme

modusensus/dsh-mneme

Cross-session memory: SQLite with a human-editable Markdown mirror, background consolidation (dedup, merge, conflict resolution), and six memory tools.

Install

dsh plugin --profile web add github:modusensus/dsh-mneme

README

dsh-mneme

dsh-mneme

npm version license Awesome CI node tests

中文 | English


🇨🇳 dsh-mneme(中文)

记忆主权,归还于你 —— 记忆不再是黑盒,而是你读得懂、改得动的 Markdown。

dsh-mneme 是一个 DeepSeek Harness (DSH) 插件,为 Agent 提供持久的跨会话记忆能力。Mneme(Μνήμη)——希腊记忆女神 Mnemosyne 之名,掌管记忆与梦境,正如 autoDream 在后台巩固记忆。

不同于把记忆锁进数据库的插件,Mneme 把记忆写成你读得懂的 Markdown——你始终握着记忆的主权:看得见、改得动、删得掉,记忆这回事不该让 Agent 一个人说了算。

✨ 特性一览

  • 🧠 记忆主权:SQLite + 可人工编辑的 Markdown 镜像,双向同步——记忆透明、可审查、归你所有
  • autoDream 梦境巩固:后台自动去重 / 合并 / 归档 / 冲突裁决(fail-safe 校验),越用越精炼
  • 6 个模型工具memory_save / memory_search / memory_list / memory_update / memory_delete / memory_forget
  • 自动注入 + 会话摘要:新会话自动带入相关记忆,会话结束自动提炼偏好 / 决策 / 教训
  • Web 记忆面板:官方设置面板内嵌,按类型浏览、全文搜索 + 语义(向量)搜索
  • 用户设置 + 自定义指令:用户画像、行为规则每轮注入;注册斜杠命令
  • 向量搜索:OpenAI 兼容 embeddings API,语义匹配字面不同但意思相近的记忆

🔮 语义增强(完全离线,v0.2+)

完全离线的语义记忆引擎——embedding、rerank、搜索全在本地,零 API 成本:

  • 本地 Embedding:三后端可选——ONNX(Xenova/bge-small-zh-v1.5,离线)/ Ollama / OpenAI 兼容,失败自动逐级降级,最差回退关键词搜索
  • Rerank 精排Xenova/bge-reranker-base 对召回候选交叉编码精排,提升 Top-K 准确率
  • autoDream 语义增强:对记忆向量聚类(clusterMemories),自动发现主题相近 / 疑似矛盾的记忆,巩固更精准
  • 搜索流水线:混合召回(关键词 + 向量)→ Rerank → Top-K

cordis.patch.yml 配置 embedProvider(默认 openai 保持 v0.1 行为,切到 local 即完全离线)。无需数据迁移。

📖 详见 语义架构 · 本地模型部署 · v0.1 迁移

📦 安装(DSH)

# 安装插件(自动注册 bundle 层)
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web

需要 Node 24+(node:sqlite)。安装 / 配置 / 架构详见 插件完整文档

📁 仓库结构

dsh-mneme/   插件本体(npm 包 @modusensus/dsh-mneme)
docs/        设计文档与实施计划

🧪 本地开发

cd dsh-mneme
npm install
npm test          # 198 个测试
npm run stress    # 三轴线压测(长会话检索 / 冲突仲裁 / 多 Agent 并发)
npm run sync      # src → lib 同步(发布时自动执行)

📄 文档

文档路径
插件完整文档(功能 / 安装 / 配置 / 架构)dsh-mneme/README.md
语义架构dsh-mneme/docs/SEMANTIC.md
本地模型部署指南dsh-mneme/docs/LOCAL_MODEL.md
v0.1 迁移说明dsh-mneme/docs/MIGRATION.md
插件设计docs/superpowers/specs/2026-08-13-dsh-mneme-design.md
autoDream 设计docs/superpowers/specs/2026-08-13-dsh-mneme-autodream-design.md
实施计划(核心插件)docs/superpowers/plans/2026-08-13-dsh-memory.md
实施计划(autoDream)docs/superpowers/plans/2026-08-13-dsh-memory-autodream.md

📜 License

MIT


🇬🇧 dsh-mneme (English)

Memory sovereignty, returned to you — memory is no longer a black box, but Markdown you can read and edit.

dsh-mneme is a DeepSeek Harness (DSH) plugin that gives agents persistent cross-session memory. Mneme (Μνήμη) — named after Mnemosyne, the Greek goddess of memory and dreams, mirroring how autoDream consolidates memories in the background.

Unlike plugins that lock memory inside a database, Mneme writes memory as human-readable Markdown — memory sovereignty stays with you: see it, edit it, delete it. Memory shouldn't be decided by the agent alone.

✨ Features

  • 🧠 Memory sovereignty: SQLite + human-editable Markdown mirror, two-way sync — memory is transparent, auditable, and yours
  • autoDream consolidation: background dedup / merge / archive / conflict resolution (fail-safe validation), refined with use
  • 6 model tools: memory_save / memory_search / memory_list / memory_update / memory_delete / memory_forget
  • Auto-injection + session summary: relevant memories injected at session start, preferences / decisions / lessons distilled at session end
  • Web memory panel: embedded in the official settings panel — browse by type, full-text + semantic (vector) search
  • User settings + custom commands: user profile and behavior rules injected every turn; register slash commands
  • Vector search: OpenAI-compatible embeddings API for semantic matching of differently-worded but related memories

🔮 Semantic Enhancement (fully offline, v0.2+)

A fully-offline semantic memory engine — embedding, rerank and search all run locally, zero API cost:

  • Local embedding: three interchangeable backends — ONNX (Xenova/bge-small-zh-v1.5, offline) / Ollama / OpenAI-compatible — degrading automatically, falling back to keyword search at worst
  • Rerank: Xenova/bge-reranker-base cross-encoder re-ranking of recall candidates for sharper Top-K
  • autoDream semantic boost: vector clustering (clusterMemories) surfaces topically-close or potentially conflicting memories for more precise consolidation
  • Search pipeline: hybrid recall (keyword + vector) → rerank → Top-K

Configure embedProvider in cordis.patch.yml (default openai keeps v0.1 behavior; switch to local for fully offline). No data migration needed.

📖 See Semantic architecture · Local model guide · v0.1 migration

📦 Install (DSH)

# Install the plugin (auto-registers the bundle layer)
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web

Requires Node 24+ (node:sqlite). Full install / config / architecture docs in the plugin README.

📁 Repository Structure

dsh-mneme/   plugin package (npm @modusensus/dsh-mneme)
docs/        design docs & implementation plans

🧪 Local Development

cd dsh-mneme
npm install
npm test          # 198 tests
npm run stress    # three-axis stress test (long-session retrieval / conflict arbitration / concurrent agents)
npm run sync      # src → lib sync (runs automatically on publish)

📄 Docs

DocPath
Full plugin docs (features / install / config / architecture)dsh-mneme/README.md
Semantic architecturedsh-mneme/docs/SEMANTIC.md
Local model guidedsh-mneme/docs/LOCAL_MODEL.md
v0.1 migrationdsh-mneme/docs/MIGRATION.md
Plugin designdocs/superpowers/specs/2026-08-13-dsh-mneme-design.md
autoDream designdocs/superpowers/specs/2026-08-13-dsh-mneme-autodream-design.md
Implementation plan (core)docs/superpowers/plans/2026-08-13-dsh-memory.md
Implementation plan (autoDream)docs/superpowers/plans/2026-08-13-dsh-memory-autodream.md

📜 License

MIT

Related plugins