DSH | dsh-memory-lite | 轻量跨会话记忆:一个 memory 工具 + 设置页"记忆库"卡片 #4835
Replies: 2 comments 1 reply
|
这个实现规模很小、依赖面也窄,四个显式 operation 和可见 tool result 很适合做原型。我审了 0.1.0( “Nothing leaves your machine” 目前不成立
README 应明确这一区别。现阶段不要存 credential、客户数据、私有源码或认证材料。 当前文件协议会丢数据工具和浏览器 RPC 都是独立的
最低修复建议:单进程 mutation queue + 跨进程锁/revision、sync temp generation + atomic publish + prior backup、corrupt quarantine 并拒绝写入、stable id/idempotency key,以及并发 Host/中断写/fault injection 测试。 还需要 scope 和 budget固定文件让同一 OS home 下所有 project/profile 共享一库,没有 tenant/user/workspace/agent 隔离。 建议 scope 从 Host 执行上下文派生,不让模型传 user/workspace id;每条记录补 scope、source、created/updated、trust、稳定 id;对 note/tag/count/file/result bytes 与 estimated tokens 分别设上限。Recall 文本应显式标为 untrusted evidence,不能覆盖当前 system/developer policy。
我维护一个社区 Handbook(与插件及官方仓库无隶属关系),已把本次审查和安全下一版的 10 项契约整理在: 如果作者发布修复 commit,我会按新实现复核并更新结论。 |
|
已修复,麻烦复核,感谢!
Regards,
Paco
| |
Paco(Panke) Yi
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2026年8月28日 13:25 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***>,
***@***.***> |
| 主题 | Re: [deepseek-ai/deepseek-harness] DSH | dsh-memory-lite | 轻量跨会话记忆:一个 memory 工具 + 设置页"记忆库"卡片 (Discussion #4835) |
这个实现规模很小、依赖面也窄,四个显式 operation 和可见 tool result 很适合做原型。我审了 0.1.0(fd373ae),建议先修正一个隐私表述,再补存储事务:
“Nothing leaves your machine” 目前不成立
recall/list 返回值经过 renderText() 成为普通 text tool result。这个结果会进入 DSH Session 的模型可见 surface,并在后续 model step 发送给当前 provider。因此:
memory-lite.json 文件本身保存在本地;
被 recall 的内容可能离开本机、发送到远程模型,并再次持久化进 Session log。
README 应明确这一区别。现阶段不要存 credential、客户数据、私有源码或认证材料。
当前文件协议会丢数据
工具和浏览器 RPC 都是独立的 loadStore() → 修改 → saveStore():
两个并发 save 可以读到同一版本、生成相同 id,后写者覆盖先写者;
多个 profile/process 固定共享 ~/.dsh/memory-lite.json,但没有 cross-process lock/revision;
writeFile() 直接替换 live 文件,崩溃可能留下截断 JSON;
loadStore() 把“文件不存在”和“JSON 损坏”都当成空库,下一次 save 会把损坏但可能可恢复的唯一副本覆盖掉。
最低修复建议:单进程 mutation queue + 跨进程锁/revision、sync temp generation + atomic publish + prior backup、corrupt quarantine 并拒绝写入、stable id/idempotency key,以及并发 Host/中断写/fault injection 测试。
还需要 scope 和 budget
固定文件让同一 OS home 下所有 project/profile 共享一库,没有 tenant/user/workspace/agent 隔离。limit <= 100 只限制条数,不限制单条 note、tags、文件字节、tool-result 字节或 token;一个超大 note 仍可吃满上下文。
建议 scope 从 Host 执行上下文派生,不让模型传 user/workspace id;每条记录补 scope、source、created/updated、trust、稳定 id;对 note/tag/count/file/result bytes 与 estimated tokens 分别设上限。Recall 文本应显式标为 untrusted evidence,不能覆盖当前 system/developer policy。
forget 是永久副作用,也建议加入 approval/policy、审计和 undo/trash;Settings 卡片删除至少要确认。手工编辑 JSON 只应在所有 writer 停止后进行。
我维护一个社区 Handbook(与插件及官方仓库无隶属关系),已把本次审查和安全下一版的 10 项契约整理在:
https://github.com/sandbaseai/deepseek-harness-handbook/blob/main/docs/en/architecture/sessions-vs-memory.md#case-study-dsh-memory-lite-010
如果作者发布修复 commit,我会按新实现复核并更新结论。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
dsh-memory-lite —— 轻量跨会话记忆插件
dsh 的每个会话都是白纸开局:转录落盘是为了审计,但模型再也看不到它。这个插件给 agent 一个显式的
memory工具,让用户偏好、项目决策、关键约束在重启、升级、换 profile 之后依然健在。仓库:https://github.com/pacoyi/dsh-memory-lite
安装
```sh
dsh plugin --profile web add github:pacoyi/dsh-memory-lite
All reactions