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.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-recall
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:truelove-dreamer/dsh-plugin-recall
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
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匹配不到 tokenBRAID这类子串),不是精确回溯;需要精确读取请配合 session 工具。 - 检索范围为当前 DSH_HOME 的持久化会话语料,不含其他机器/部署的历史。
本地开发
cd plugins/dsh-plugin-recall
npm test # node --test,零依赖
接线集成测试(真实 Cordis + mock sessionQuery):见仓库根 test-wiring.mjs。
Links
More in this category
volcengine/OpenViking#examples/dsh-memory-plugin★ 38815
OpenViking memory and context bundle for DeepSeek Harness: pre-step auto-recall and profile injection, session capture, `viking://` URI guarding, and recall/write memory tools backed by an OpenViking server.
vectorize-io/hindsight#coding-agents★ 37670
Hindsight, agent memory that learns: long-term project memory with auto recall and retain, knowledge pages, deep reflection, and per-repo memory banks.
agentscope-ai/ReMe#dsh★ 3526
Connects DeepSeek Harness to ReMe's local-first, self-evolving personal knowledge base: automatically captures completed main-agent conversations as user-owned Markdown memory, searches conversations and source material through reme_search with BM25, optional embeddings, and wikilink expansion, and schedules daily memory consolidation.
zilliztech/memsearch#MemSearch★ 2670
Shared Markdown memory for DSH and other coding agents, with automatic capture, pre-step context injection, searchable recall, and memory-to-skill self-evolution through a review panel.
vshulcz/deja-vu#extensions/dsh★ 1074
Reads the session files thirty-three other coding agents on this machine already wrote — Claude Code, Codex, Cursor, VS Code Copilot Chat, opencode, OpenClaw, Hermes, Kimi, Cline, Zed and more — including sessions from before it was installed: six tools (deja_recall, deja_session, deja_blame, deja_fix, deja_how, deja_remember), a /deja command, and optional automatic recall added to the runtime context. Local BM25 index, no LLM, no embeddings, no network (dsh plugin --profile web add dsh-deja).
adoresever/graph-memory★ 630
Traceable, searchable cross-session memory for DeepSeek Harness — conversation knowledge as typed graph nodes (TASK/SKILL/EVENT) and typed edges.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.