ICCuse/dsh-file-memory

File-backed working memory tools for DeepSeek Harness: memorize/recall key premises verbatim in a session notes file so they survive context compaction losslessly

Bundle 已验证 MIT TypeScript 未知
Bundle 已验证

已收录

0

Memory

Bundle 已验证

版本未知
语言TypeScript
许可证MIT
在 GitHub 查看

预览

第 1 个预览,共 2 个:ICCuse/dsh-file-memory
第 2 个预览,共 2 个:ICCuse/dsh-file-memory

功能介绍

文件型工作记忆:memorize/recall 把关键前提逐字保存在会话笔记文件,无损挺过上下文压缩。

适合

  • 需要让关键前提在多次上下文压缩后仍精确保留的长任务 Agent 会话。
  • 要求选定事实逐字节召回、而不是从摘要中重新推断的任务。
  • 适合用会话级笔记并按子串快速检索的工作区工作流。

不适合

  • 没有 Agent 后端或未挂载文件系统服务的会话;这两项都是工具运行前提。
  • 需要全局、结构化、语义化知识库,而非会话级逐行笔记的用户。
  • 当前必须使用已发布 npm 包的用户;文档中的安装来源是代码仓库。

README

@deepseek-ai/dsh-file-memory

中文 English

File-backed working memory for long tasks. Two model-facing tools — memorize and recall — keep key premises as verbatim bytes in a session-scoped notes file inside the workspace, so they survive context compaction losslessly: a summarizer can blur or drop a fact, but a file round-trips it byte-exact.

Why

Compaction checkpoints are LLM-generated and LLM-rewritten generation after generation; the prompt-space “state document” proposals still re-summarize the previous state every pass. Files are the only lossless medium the agent already has: write once, read back exactly. This is the pragmatic complement to prompt-space compaction, usable today on the shipped compaction-basic backend.

Tools

Tool Behavior
memorize(entries) Appends verbatim deduplicated lines to <workspace>/.dsh-notes/<session>.md.
recall(query?) Reads the notes back, optionally filtered to lines containing query; caps output at maxRecallChars.

Both require an agent-backed session and a mounted fs service; they resolve the notes file relative to the session’s workspace cwd (falling back to the backend default when the session has no cwd).

Config

Field Default Meaning
maxRecallChars 6000 Recall output cap.
notesDir .dsh-notes Notes directory name inside the workspace; must be a bare directory name.

maxRecallChars must be an integer >= 1; misconfiguration throws at plugin load.

Install

Not on npm yet - install from this repository:

npm install github:ICCuse/dsh-file-memory
# or: pnpm add github:ICCuse/dsh-file-memory

Then mount the bundle (declared in package.json ‘dsh.bundle’):

- id: dsh-file-memory
  name: 'dsh-file-memory'

Or, once published, ‘dsh plugin –profile web add dsh-file-memory’.

常见问题常见问题

在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:ICCuse/dsh-file-memory。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。