Repository navigation
Releases
Releases · ChenYueqi2024/dsh-memory
v0.4.0 — 兜底口径统一 · 频率节制 · 来源引用接线
W12 全文 review 后的修复版:
修复(P1)
session/disposed兜底沉淀路径补传 workspace:此前漏传,该路径沉淀的记忆全部打成全局,web 模式下会跨工作区泄漏- 兜底路径改用与
agent/turn-stopping一致的增量口径:此前对已抽取过的尾部窗口重复抽取,reinforce 反复灌置信度、抵消按类别衰减的设计 - dsh-commit 配套修复见其 v0.2.1
新增
autoExtractMinIntervalMs(默认 90s):自动抽取是付费 LLM 调用且在轮次边界 await,长会话不再每轮付费,间隔内增量自然累积- 注入段每行带来源引用(
#编号 - 日期):Agent 被问“你怎么知道的”有硬证据,配合防注入声明与 memory_forget 形成可追溯闭环
稳健性
- markHit 存储写入补 catch:prompt 组装期未处理 rejection 在 Node 22 下会崩宿主进程
- merge 去重时 kind 以最新分类为准(半衰期随 kind 联动,陈旧分类不锁定衰减速度)
- 清理死代码 jaccard()
测试:27/27 通过(新增注入格式与来源引用、kind 刷新用例)。headless 实测:新会话注入段带来源引用、记忆按工作区打标、turn-end 输出 reinforce 不重复新增。
插件不含任何密钥:抽取走安装者自己的 dsh 模型路由与凭证。
v0.3.0 - Approval flow + per-kind decay
New
- memory_approve approval flow (
requireApprovalconfig, default off): auto-extracted memories stay pending and are never injected until explicitly approved. Verified live: with a pending memory and tools disabled, the agent genuinely does not know the fact; after approval it recalls it. - Per-kind decay half-lives: facts 14d, decisions/conventions 30d, preferences 45d.
- English README (README.en.md).
v0.2.0 - Conflict adjudication + robustness
New
- Conflict adjudication (supersede): when new information overturns an existing memory, the old record is marked superseded (kept for audit, never injected) and the new fact lands independently. Supersede runs before dedupe so same-topic rewrites are not swallowed.
- LLM semantic alignment: the extraction call receives the existing memory list; duplicates are reinforced instead of re-extracted ({new, reinforce, supersede} contract).
- Robustness: injection character budget (4000), memory text cap (500 chars), extraction failure backoff (3 consecutive failures pause auto-extraction for 10 minutes).
- Publish-ready: npm metadata with dsh peer ranges, prepublishOnly, no bundled credentials (extraction uses the installing user model route).
Verification
- 24/24 unit tests
- Live end-to-end conflict cycle: supersede -> new fact stored -> next session recalls the updated fact