DeepSeek Harness plugin

dsh-recall-fengshen

DSH plugin: `recall` — search and read the calling agent's own session log, including events shadowed by compaction

Jump to install

Source facts

Repository
fengshenx/dsh-remind
Latest update
Aug 18, 2026
Category
Workflow & Automation
GitHub stars
1
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/fengshenx/dsh-remind
Plugin: dsh-recall-fengshen
Author: fengshenx

Check the source files

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

File explorer3 files
README.mdSource · read only

dsh-remind

English: [README_EN.md](./README_EN.md)

DSH 插件:为模型提供 remind 工具——搜索并读取调用代理自己的会话日志,包括被压缩(compaction)遮蔽的事件。

压缩从不删除事件:它把一段可见历史替换成摘要检查点(checkpoint),被替换的事件仍留在持久日志中,分类为 shadowedremind 就是模型回到那段内容的正式途径——surfaces: ["shadowed"] 逐字取回压缩前内容,seq 读取任意精确事件。

安装

前置:DSH(dsh web 可正常运行)、Node.js ≥ 20、pnpm ≥ 10(dsh plugin 命令需要)。插件发布在 npm,一条命令安装并自动挂载:

dsh plugin --profile web add dsh-remind

dsh plugin add 会在 profile 目录安装 npm 包,并因包内声明了 dsh.bundle.patch 而自动把插件注册进 dsh.profile.bundles——下次启动自动挂载,无需手动改任何配置文件

remind 是 host 侧工具,挂载需要重启一次:

# 重启 dsh web(视你的启动方式而定)
# 例如:pm2 restart dsh-web,或 Ctrl+C 后重新 dsh web

卸载

dsh plugin --profile web remove dsh-remind

使用

重启后,模型(如我)的工具列表里会出现 remind。示例调用:

remind { query: "Agent/Sub Agent有能力回忆 压缩", max_results: 10 }

返回压缩前被遮蔽的原始消息,逐字可读。参数:

参数说明
query必填:空格分隔的多关键词,事件需同时包含全部关键词(不区分大小写)才匹配
max_results可选:最多返回的命中条数(1-10,默认 10,内部上限 10)
surfaces可选:只返回指定表面分类的事件(current / shadowed / log-only),省略则全表面

命中按相关度排序:每条命中先给标题行(#seq 类型 [表面]),正文紧随其后、以空行分隔——正文不受行数限制(可跨行),只受字符上限约束;长事件本身的内容由命中位置窗口保证(见下)。

  • 相关度排序:长词(稀有)与出现密度高的命中靠前,同分时新的优先;中文长词按 2-4 字片段兜底匹配——压缩改写导致长句原文不连续时仍能召回
  • 长事件截断:超过约 2400 字符的事件只保留命中位置附近的内容(以命中为中心各取一半),超出部分标注「…(省略N字符)…」
  • 匹配归一化:NFKC + 小写;查询不含全角/组合字符时走纯小写快路径(此时事件里的全角变体如 ABC 不再匹配 abc
  • 回声抑制:remind 自己的 tool/result 不参与匹配(它只是其他事件的投影),但它的调用参数(query)仍作为事实可回忆
  • query 最长 200 字符,超出会报错
  • 会话从未压缩时,搜索返回提示而非结果列表(早期内容都在当前上下文里)

设计要点:只读调用者自己的会话日志,无跨会话访问;当前 step 的事件总是排除;fork 子会话继承父日志前缀,因此也能回忆父历史。

配置

maxResults(每次调用命中数上限)与 maxCharsPerEvent(每个事件文本字符上限,默认 20000)为必填部署配置,可在挂载行的 config 中调整。

开发

pnpm install
pnpm build        # tsc 出类型 + tsdown 出 lib/
pnpm test         # vitest(含真实 Loader 组合测试)
npm pack --dry-run  # 检查发布内容

本地调试(未发布 npm 时)

dsh plugin 支持本地路径,安装为 link: 符号链接(源码实时指向插件目录):

dsh plugin --profile web add /Users/<you>/<path>/dsh-remind

它会自动完成两件事:把包加入 profile 的 dsh.profile.bundles,并在启动时应用插件自带的 cordis.patch.yml。之后:

1. 如果 profile 的 cordis.patch.yml 里有旧的 manual 挂载行(同一 tool-remind id),删掉它,否则重复插入冲突; 2. 重启 web server,dsh --profile web --dump-config 应显示 # == dsh-remind 段; 3. 每次改 src/pnpm build 再重启 web server 生效(无需重新 plugin add)。

工作原理简述

  • 插件是普通 npm 包:dsh.bundle.patch 声明(cordis.patch.yml)+ 标准插件行。
  • dsh plugin add 的 bundle 协调(DSH apps/cli/src/plugin.ts):安装后检查包是否声明 dsh.bundle,是则追加进 profile 的 dsh.profile.bundles;启动时作为 patch 层自动合并。
  • 运行时:remind 通过 exec.agent.session.events 读取调用者自己的完整事件日志,surface 分类复用 @deepseek-ai/dsh-session-querybuildSessionEventRecords(与官方 session-query 工具同一套词汇)。

License

MIT