yan5236/dsh-memory

DeepSeek Harness(DSH)的两阶段长期记忆插件:按会话提取 + 全局整合、始终注入的摘要,以及memory_list/read/search/add工具。

Project Overview项目介绍

dsh-memory is a native long-term memory plugin built exclusively for DeepSeek Harness, following the Codex memory system design adapted specifically for DSH’s environment. To install it, you can either run the DSH CLI command dsh plugin --profile web add 'git+https://github.com/yan5236/dsh-memory.git#main' or copy the pre-written one-prompt install block into an active DSH conversation to let the agent handle the entire setup process. After installation, you need to run dsh --profile web --dump-config to verify the plugin is registered correctly in your profile, then restart your running DSH process to activate the plugin fully.

This plugin is designed for regular DeepSeek Harness users who grow frustrated with repeating their personal preferences and avoiding the same known mistakes in every new session. It follows a documented two-phase workflow: after a session ends, it waits a 3-minute default debounce period before extracting structured durable knowledge from the session log, filtering low-signal content, redacting secrets, and saving the processed output. Then, every 6 hours by default, it consolidates new extracted memories into a global searchable handbook and a dense summary that is automatically injected into every new session’s system prompt, and users can access four on-demand tools for manual memory management.

This plugin is released under the permissive open source MIT license, and it has no external dependencies outside of a working DeepSeek Harness installation. Users can adjust multiple configuration options via the DSH settings page, including memory storage root path, consolidation cooldown, debounce timing, maximum summary character count, and model selection for each phase of the memory pipeline. By default, memory files are stored in the $DSH_HOME/memories/ directory, and the plugin notes that manual edits to memory files are not recommended unless you understand exactly what you are doing with your own memory files.

这是一款为 DeepSeek Harness 开发的原生长期记忆插件,采用双阶段记忆管线工作:会话结束后自动提取当前会话的有效记忆,之后定期将新提取的原始记忆合并整合到全局记忆库中。它会在每个新会话的系统提示中自动注入浓缩的记忆索引摘要,同时提供四款按需调用的记忆检索工具,满足不同场景下的记忆查询需求。

这款插件解决了 DSH 每次重启会话都需要重复说明用户偏好、重复踩已知问题坑的痛点,适合需要长期和 DSH 交互、积累了大量个性化配置和偏好的用户使用。正常工作流中,会话结束后会延迟提取记忆,合并到全局后生成可检索的手册,用户也可以随时通过提供的工具手动检索、新增或管理记忆内容。

该插件以 MIT 许可证开源,仅依赖 DeepSeek Harness 环境,可通过命令行或一键复制提示的方式安装。安装后需要验证配置是否正确写入,重启 DSH 后即可使用,默认记忆文件存储在 $DSH_HOME/memories/ 路径,用户也可在配置中自定义记忆存储的根路径。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 'git+https://github.com/yan5236/dsh-memory.git#main'

把 yan5236/dsh-memory 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

English · 简体中文

dsh-memory · Long-term memory plugin for DeepSeek Harness

A two-phase memory pipeline (per-session extraction → global consolidation), a summary that is always injected into new sessions, and four on-demand retrieval tools.

Why long-term memory

Without memory, every session restates user preferences and re-steps known landmines. dsh-memory extracts durable knowledge from finished sessions and periodically consolidates it into a dense navigation summary (injected into every session) plus a grep-friendly handbook, so future sessions need fewer repeated instructions, waste fewer tool calls, and avoid known failure modes.

The design is adapted from the Codex memories system (two-phase extraction/consolidation, three-layer artifact layout, job claims, cooldown, redaction) and re-composed for DSH: no SQLite, no git baseline, no resident consolidation subagent.

Features

  • 🧠 Phase 1 per-session extraction: after a session turns stop (debounced, 3 min default), its log is read, filtered, rendered, and redacted, then a model extracts structured memory (raw_memory + rollout_summary + slug). Low-signal sessions produce an empty no-op.
  • 🧩 Phase 2 global consolidation: on a cooldown (6 h default) the new raw memories are merged into MEMORY.md (handbook) and memory_summary.md (dense index, exact v1 first line); raw input is rotated into an archive and never consolidated twice.
  • 📥 Always-injected summary: memory_summary.md (hard size cap) is injected through the system prompt of every session — zero effort for the model to see the index.
  • 🔍 Four memory tools: memory_list / memory_read / memory_search / memory_add (writes only on explicit user request).
  • 🔒 Safety discipline: session content is treated as data, never instructions; secrets are redacted on both input and output; memory paths are confined to the memory root.
  • 🔁 Reliable scheduling: one durable claim per session (KV-persisted); restarts never re-extract or double-consolidate; failures retry with backoff; orphaned claims recover.
  • ⚙️ Settings page: Settings → Long-term memory for stats, manual runs, and config.
  • 🗂️ Memory manager: the "Open memory bank" button opens a dedicated dialog with a VS Code-style collapsible file tree (folders nest their contents), in-dialog editing, and two-step deletion. A persistent warning reminds you: memory files generally need no manual edits unless you know what you are doing.
  • 🎚️ Per-phase reasoning effort: Phase 1 extraction and Phase 2 consolidation each have their own reasoning level (off/low/high/max; empty follows the model default), so you can balance speed and memory quality per stage; run logs record the effort actually applied.

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-skillopt 下一个 Next dsh-mnemos →