dshbase

插件目录 / Knowledge / dsh-plugin-recall

dsh-plugin-recall

已验证 · 实测可装 truelove-dreamer

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-14最近推送
跨平台平台

功能简介

DeepSeek Harness plugin: cross-session memory for the model. Full-text search all past sessions (SQLite FTS5 via ctx.sessionQuery) and bring the strongest matching excerpts back into the current context — recall earlier decisions, commands, and mistakes.

✅
我们的评价
可用 — 实测通过,早期项目

DeepSeek Harness plugin: cross-session memory for the model. Full-text search all past sessions (SQLite FTS5 via ctx.sessionQuery) and bring the strongest matching excerpts back into the current context — recall earlier decisions, commands, and mistakes. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-plugin-recall

DeepSeek Harness 插件:给模型跨会话记忆 —— 全文检索所有历史会话,把最强匹配片段带回当前上下文。

背景

DSH 已经把每个会话持久化,并用 SQLite FTS5 建了全文索引(ctx.sessionQuery.searchSessions),但没有任何面向模型的工具去读它 —— 新会话对旧会话的决策、命令、踩过的坑一无所知。recall 把这个现成索引变成模型的能力:开新会话先 recall 一下,接着上次的进度继续。

使用

模型工具 recall:

recall query: "we decided to use sqlite"     # 默认返回最多 5 个会话
recall query: "publish script" limit: 3
recall query: "权限绕过" sessionIds: ["s_xxx"]   # 限定会话范围

返回每个命中会话:session id、时间、事件类型、live/persisted 标记、最强匹配片段。查询按字面短语处理(永不解释为 FTS 可执行语法)。

人类命令 /recall <查询>: 同样输出。

安装

dsh plugin --profile web add dsh-plugin-recall

挂载(标准 web profile 已含 dsh-session-query-sqlite,无需额外配置):

- insert:
    - id: recall
      name: dsh-plugin-recall

设计说明

  • 复用官方基建:直接调用 ctx.sessionQuery.searchSessions(SQLite FTS5),不改任何官方包;sessionQuery 未挂载时工具给出明确提示,而不是让组合加载失败。
  • 纯逻辑可单测:参数校验 / 请求构建 / 命中映射 / 渲染在 lib/recall.js,npm test 零依赖。
  • 只拷贝叶字段:命中结果从 live 服务对象提取为纯 JSON(sessionId / time / type / snippet),绝不引用内部对象。

诚实边界

  • 依赖 ctx.sessionQuery 存在;openAt: never 配置下全文检索被禁用时,recall 会报错提示。
  • 命中片段是 FTS5 的高亮摘录(unicode61 分词器,AI 匹配不到 token BRAID 这类子串),不是精确回溯;需要精确读取请配合 session 工具。
  • 检索范围为当前 DSH_HOME 的持久化会话语料,不含其他机器/部署的历史。

本地开发

cd plugins/dsh-plugin-recall
npm test          # node --test,零依赖

接线集成测试(真实 Cordis + mock sessionQuery):见仓库根 test-wiring.mjs。

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-plugin-recall」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:truelove-dreamer/dsh-plugin-recall

Headless(CLI)profile:

dsh plugin --profile headless add github:truelove-dreamer/dsh-plugin-recall

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7819 个插件 →