Jelee0145/dsh-mem

Plugin插件 Native原生 ⭐ 3 Memory & Knowledge记忆与知识库

为dsh构建持久化跨工作区记忆的插件

Project Overview项目介绍

dsh-mem is a native out-of-tree bundle plugin built exclusively for DeepSeek Harness (DSH). It adds durable cross-session long-term memory that agents can access across every chat session, with four core tools: memory_save, memory_recall, memory_forget, and memory_list. It stores all saved facts, preferences, and project decisions in a single JSON file at $DSH_HOME/memory/memory.json. You can install it from the npm registry, a Git repository, or a local checkout using DSH’s built-in dsh plugin add command, which automatically resolves dependencies and registers the plugin.

dsh-mem follows DSH’s standard capability seam pattern, splitting functionality into three separate modules: the service definition, the service provider, and the tool consumer. The service definition lays out the abstract memory contract and types that other modules can depend on. The default service provider implements atomic JSON file persistence, with all writes done atomically to avoid data corruption. The consumer module registers the four memory tools that agents can call directly in conversations.

Currently, dsh-mem has a few known limitations. It does not support concurrent writes from multiple DSH processes sharing the same root storage location. It also does not ship with an edit API for existing memory entries, so to update a fact you must first forget the old entry then save the new one. All memory content is stored as free-form text, and developers can easily extend the plugin by swapping storage providers or adding new commands.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,为DSH中的AI代理提供跨会话的持久化长期记忆能力。它实现了完整的能力分层架构,包含服务定义、服务提供者和消费者模块,对外暴露四个记忆操作工具:memory_save、memory_recall、memory_forget、memory_list,所有记忆数据都持久化存储在 $DSH_HOME/memory/memory.json 文件中。

该插件支持从npm注册表、Git仓库或本地检出三种方式安装,官方推荐使用DSH内置的插件命令 dsh plugin add 完成安装,不建议直接使用npm安装作为普通依赖。卸载插件不会删除已存储的记忆数据,如需清除所有历史记忆需要手动操作存储文件。它适用于需要让AI代理记住长期偏好、项目信息和决策的DSH用户。

该插件依赖@deepseek-ai/cordis和@deepseek-ai/dsh相关包,这些依赖会在安装时自动拉取。它目前存在一些已知限制:不支持多进程并发写入,暂不提供编辑接口,记忆内容为纯文本格式。开发者可以通过替换存储提供者、新增人机命令等方式对插件进行扩展。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • 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 dsh-mem

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

READMEREADME

dsh-mem — cross-session memory for DeepSeek Harness

English | 中文

An out-of-tree bundle plugin for DeepSeek Harness (dsh) that implements a complete capability seam — Service Definition + Service Provider + Consumer. It gives agents durable long-term memory shared across every session: the memory_save / memory_recall / memory_forget / memory_list tools persist facts, preferences, and decisions to $DSH_HOME/memory/memory.json.

Install

Install from the npm registry (published as dsh-mem):

dsh plugin --profile <name> add dsh-mem

dsh plugin add is the dsh way to install a plugin: it resolves the package from npm (via pnpm) into the profile and registers its bundle layer. Do not use npm install dsh-mem — that installs the package as a plain dependency without activating any profile layer.

From git instead (runs the package's self-contained prepare build; the first install asks you to allow the build in the profile's pnpm-workspace.yaml):

dsh plugin --profile demo add github:Jelee0145/dsh-mem

Or from a local checkout:

dsh plugin --profile demo add ./dsh-memory

Verify the composed layer without booting, then boot:

dsh --profile demo --dump-config   # expect a "# == dsh-mem" layer with memory / tool-memory rows
dsh --profile demo                 # new sessions can call the memory_* tools

Uninstall: dsh plugin --profile demo remove dsh-mem.

To disable without uninstalling (hot-reloaded, no restart), disable the rows in the profile's own cordis.patch.yml:

- id: memory
  disabled: true
- id: tool-memory
  disabled: true

Memory data is never touched by uninstall; it lives in $DSH_HOME/memory/memory.json (default ~/.dsh/memory/). Back it up or delete it separately if you want to clear it.

The capability seam

Role Module Mounted row Notes
Service Definition src/memory.ts (dsh-mem/memory) — abstract MemoryService declaring the ctx.memory contract and types; loading it directly fails loud
Service Provider src/provider.ts (dsh-mem/provider) memory MemoryFile extends MemoryService; atomic JSON-file persistence
Consumer src/tool.ts (dsh-mem/tool) tool-memory function plugin registering the four tools; resolves the service via ctx.get('memory') per call

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-youmind-plugin 下一个 Next dsh-fleet →