@restregular/dsh-memory 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  本项目的版本记录。安装 id 与 npm 版本一一对应。
4
4
 
5
+ ## 0.16.2 — memory_get 去重的审计与端到端覆盖
6
+
7
+ - **补审计缺口**:所有候选都被会话级去重时,`renderRecallBlock` 返回 `null`,`dedupIds` 没有写进结果,审计只能看到 `dedupSkipped` 数量、看不到具体跳过了哪些 id。现在 `dedupIds` 在“全部去重”和“预算省略”路径上也会返回。
8
+ - **端到端测试**:新增真实 `session/event` 链路测试(`tool/call` → `tool/result` → `injectionState` → 下一次 pre-step):
9
+ - `memory_get` 取正文后,下一次普通召回不再追加同一条消息,审计能列出被去重的 id;
10
+ - 记录 `updatedAt` 变化后,下一次召回重新注入新版本;
11
+ - 只取 `summary` 时不算正文,仍可通过召回补全文;
12
+ - 自动召回关闭时去重标记仍然生效。
13
+ - 语义保持不变:`memory_get` 默认和显式 `fields: ["content"]` 都显示完整正文;只有正文进入上下文才记为 `content_injected`。
14
+
5
15
  ## 0.16.1 — memory_get 取正文也参与会话级去重
6
16
 
7
17
  - **补上去重缺口**:0.16.0 把正文入口从 `memory_search` 移到 `memory_get` 后,工具读到的正文没有记进会话注入状态,后续普通召回 / 摘要 / 自动召回仍可能把同一条记忆再塞一遍。
@@ -389,6 +389,8 @@ export class MemoryInjector {
389
389
  const block = renderRecallBlock(freshHits, cfg, optionsForRender)
390
390
  const base = {
391
391
  ids: [], candidates: candidates.length, dedupSkipped: deduplicated.length, updated, omitted: [], query,
392
+ // 全部候选都被去重时 block 为 null;把 id 留在结果里,审计才能解释"跳过了哪条"。
393
+ dedupIds: deduplicated,
392
394
  tokens: 0, rawHits: hits.length, tagFiltered, supersededExcluded, expiredExcluded,
393
395
  retrieval: { ok: true, count: hits.length },
394
396
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restregular/dsh-memory",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "DeepSeek Harness 记忆系统(单包单入口):JSONL 存储 + 本地向量检索(BGE-M3)+ 五个模型工具 + 自动召回注入 + 管理面板。",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",