DeepSeek Harness plugin

dsh-memory-joyiok

DeepSeek Harness 共享持久记忆插件:所有会话共享一个记忆库,提供 memory_add / memory_search / memory_list / memory_remove 工具,并在 Web 侧边栏提供 Memory 面板

Jump to install

Source facts

Repository
joyiok/dsh-memory
Latest update
Aug 15, 2026
Category
Memory
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/joyiok/dsh-memory
Plugin: dsh-memory-joyiok
Author: joyiok

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-memory

DeepSeek Harness(DSH)共享持久记忆插件。

  • 一个所有会话共享的记忆库:存储在 $DSH_HOME/storages/dsh-memory.json

web / headless / 任何工作目录的会话都读写同一份数据。

  • Agent 工具memory_add / memory_search / memory_list / memory_remove

新会话里 Agent 会自动先检索记忆、遇到值得记住的事实会主动写入。

  • Web 侧边栏:底部 Memory 按钮,面板支持查看、搜索、添加、删除记忆。
  • 原子写入:临时文件 + rename,跨进程写入安全;读取按 mtime 感知外部更新。

安装

cd /home/joy/Documents
dsh plugin --profile web add /home/joy/Documents/dsh-memory-plugin
dsh plugin --profile headless add /home/joy/Documents/dsh-memory-plugin

安装完成后重启 dsh web

dsh web

验证:dsh --profile web --dump-config 应出现:

# == dsh-memory
- id: memory
  name: dsh-memory

使用

让 Agent 记忆 / 回忆

用户:记住:我们的正式语言是中文,token 预算每月 5000 万
Agent:调用 memory_add(content: ..., tags: ["preference", "budget"])

(新会话)
用户:我们之前说过 token 预算多少?
Agent:调用 memory_search(query: "预算") 后回答

Web 面板

左下角 Memory → 输入框写内容 + 逗号分隔标签 → 保存;列表内可搜索、删除。

工具参数

工具参数说明
memory_addcontent 必填;tags / category 可选写入一条共享记忆
memory_searchquery 必填;limit 可选搜索内容 / 标签 / 分类
memory_listcategory / tags / limit 可选列出记忆
memory_removeid 必填按 id 删除记忆

配置

可在 profile 的 cordis.patch.yml 覆盖(覆盖整行 config):

- id: memory
  config:
    file: /path/to/shared-memory.json   # 默认 $DSH_HOME/storages/dsh-memory.json
    maxContentChars: 20000              # 单条记忆最大字符数
    defaultSearchLimit: 20
    maxToolLimit: 100

禁用插件:

- id: memory
  disabled: true

结构

src/index.js               # 宿主半体:Typert RPC + 4 个记忆工具 + 系统提示注入
src/store.js               # 持久化核心:原子读写、缓存、搜索
lib/client.js              # 浏览器半体:侧边栏 Memory 面板
lib/typert.host.js         # Typert host 清单(memory/*)
lib/typert.remote-client.js# Typert remote 描述符(参考)
cordis.patch.yml           # dsh bundle 补丁:插入 memory 行
scripts/build.mjs          # esbuild 构建脚本(node scripts/build.mjs)

注意

  • 记忆内容对所有会话可见,请勿写入密钥、口令等敏感信息。
  • 如果 JSON 文件损坏,插件会把损坏文件备份为 dsh-memory.json.corrupt-<ts> 并重新开始。