dsh-file-memory
其他 活跃维护

dsh-file-memory

ICCuse/dsh-file-memory

提供轻量级文件型会话记忆工具,可将会话关键前提原封不动写入笔记文件,即使发生上下文压缩也不会丢失记忆内容,支持随时调用已存储的历史信息,开箱即用无需额外配置。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
21 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ICCuse/dsh-file-memory
git clone https://github.com/ICCuse/dsh-file-memory.git
git clone git@github.com:ICCuse/dsh-file-memory.git
README.md main

@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'.