@yolk_vat-y/dsh-project-memory 0.6.11 → 0.7.0

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +104 -120
  2. package/README.md +14 -105
  3. package/README.zh-CN.md +14 -105
  4. package/client/client.js +228 -95
  5. package/client/client.js.map +1 -1
  6. package/package.json +2 -2
  7. package/scripts/file-peak.mjs +1 -1
  8. package/scripts/tool-schema-size.mjs +1 -1
  9. package/skills/project-memory/SKILL.md +1 -1
  10. package/skills/project-memory/scripts/pm-digest.mjs +20 -6
  11. package/src/audit.js +10 -2
  12. package/src/auto-inject.js +124 -38
  13. package/src/client/MemoryView.tsx +119 -40
  14. package/src/client/TaskCommandNode.tsx +6 -4
  15. package/src/client/TaskComponents.tsx +13 -16
  16. package/src/client/TaskPanel.tsx +41 -15
  17. package/src/client/client.ts +4 -7
  18. package/src/client/paging.js +1 -14
  19. package/src/client/settings-card.tsx +9 -0
  20. package/src/client/task-data-store.ts +57 -7
  21. package/src/client/task-hooks.ts +0 -2
  22. package/src/client/task-scope.js +16 -1
  23. package/src/client/task-ui-store.ts +1 -1
  24. package/src/commands/insight-actions.js +91 -94
  25. package/src/commands/task-actions.js +7 -5
  26. package/src/commands/tasks.js +34 -10
  27. package/src/doc-index.js +3 -1
  28. package/src/enhancer.js +0 -12
  29. package/src/index-failures.js +1 -1
  30. package/src/index-pipeline.js +11 -2
  31. package/src/index.js +60 -14
  32. package/src/inject-visible.js +282 -0
  33. package/src/insight-store.js +133 -68
  34. package/src/lazy.js +29 -23
  35. package/src/llm-route.js +1 -1
  36. package/src/llm.js +1 -8
  37. package/src/ops.js +18 -5
  38. package/src/parsers/pdfjs-parser.js +3 -33
  39. package/src/project-memory-service.js +195 -0
  40. package/src/project-profile.js +0 -4
  41. package/src/setup/taskbridge.js +38 -6
  42. package/src/store.js +639 -147
  43. package/src/symbols.js +2 -4
  44. package/src/tools/context.js +14 -0
  45. package/src/tools/forget.js +7 -17
  46. package/src/tools/index-doc.js +62 -21
  47. package/src/tools/index-repo.js +17 -15
  48. package/src/tools/lesson-tools.js +10 -13
  49. package/src/tools/output.js +33 -0
  50. package/src/tools/query-memory.js +7 -12
  51. package/src/tools/remember.js +8 -18
  52. package/src/tools/stats.js +4 -9
  53. package/src/tools/task-tools.js +23 -22
  54. package/src/tools/watch-repo.js +16 -15
  55. package/src/util/flush.js +1 -1
  56. package/src/util/fs.js +135 -20
  57. package/src/util/insight-fields.js +22 -0
  58. package/src/util/message-source.js +20 -0
  59. package/src/util/relative-time.js +24 -0
  60. package/src/util/search.js +0 -1
  61. package/src/util/task-view.js +8 -15
  62. package/src/util/value.js +16 -0
  63. package/src/vector-index.js +2 -2
  64. package/src/watch.js +25 -8
  65. package/client/client.d.ts +0 -27
  66. package/client/client.d.ts.map +0 -1
  67. package/client/style.css +0 -395
package/CHANGELOG.md CHANGED
@@ -1,8 +1,53 @@
1
+ ## 0.7.0 (2026-11-12)
2
+
3
+ **兼容**:`shards/` 的落盘布局从「一文件一分片」改为按 32KB 目标的哈希桶(`bucket-000xx.json`,`format.json` 记 `bucketCount` / `bucketSize`)——新版本能读旧布局,首次写入时自动整体重排,不需要手工重建索引;**旧版本读不懂新布局**(会看到空 store),要回退请先备份 `.dsh-project-memory/`。统计工具 `memory_stats` 改名为 `pm_stats`(与 `dsh-memory-tiers` 撞名),提示词、skill 与自动化里写死旧名的地方要跟着改。无新增配置键,`client/` 产物不变。
4
+
5
+ - **工具**:统计工具 `memory_stats` 改名为 `pm_stats`——`dsh-memory-tiers` 也注册 `memory_stats`,同进程同时启用时后注册方整条 fiber 因 `tool "memory_stats" is already registered` 失败;改名后两插件可共存(除工具名外无行为变化,`test/tool-schema-size` 加回归断言)。(PR #12,@chen3tu)
6
+ - **工具**:注册改为逐个 try/catch——将来任何工具名被别的插件占用时只丢那一个工具并在日志点名,其余工具、客户端面板与 `/tasks` 照常可用(此前一次重名会让整条 fiber failed,12 个工具一起消失)。
7
+ - **存储**:缩桶重排把空桶写成空文件,加载时忽略越界桶,避免清理失败/崩溃后已删条目复活;会话绑定按“相对加载基线的变化”合并,成功写盘后清墓碑;任务归档按显式改动而不是 `updatedAt` 合并;迁移保护态不再每次 save 全量重排;文件热点时间取最新;注入回滚恢复 `lastHitAt`。
8
+ - **注入**:压缩只保留 card-only 消息时也把会话条目额度归零,不再永久失明。
9
+ - **工具/命令**:`index_doc` 拒绝源码文件,避免覆盖符号索引;`roots.exclude` 优先于 explicit 豁免;`watch_repo` 在 watchlist 未落盘时明确告警;服务 `remember/forget` 同时检查 global 落盘;已删除的会话根不再被 TaskBridge 重建;`session/disposed` 补延迟写 flush;`git -C … checkout/rm` 正确抽取写目标。
10
+ - **客户端**:编辑不再把 `pattern/choice/problem` 静默覆盖成标题;切会话时旧 `/tasks` 响应被丢弃且新刷新排队补发;任务卡动作后失效记忆缓存;缓存命中推进请求闸门;分页失败重试重放失败页;procedure 步骤被截断时不回传整份 `steps`;同步中禁止进入行内编辑。
11
+ - **其他**:工具 schema 预算计入工具名;`file-peak` 报错路径修正;README 测试数与当前套件对齐。
12
+
13
+ - **全量修复(存储 / 注入对账 / 工具 / 客户端)**,不新增配置键,`client/` 产物已重建。
14
+ - **注入对账**:正文回退只认本插件自己的消息(压缩摘要/recall 里的 `- [ins_…]` 不再永久压制条目);乐观登记下一步与 surface 对账(宿主 abort 时不再整会话失明);`historyLost` 把会话额度一并归零;provenance 上限与 `maxItemsPerSession` 对齐;`reconcile` 增加 `degraded / genSupported / historyLost`。
15
+ - **旁路日志**:日志建目录后立即补 `.gitignore`;主日志 `dropped` 截断到 40 并记 `droppedTotal`(1000 条候选的单行从 113KB 降到 KB 级)。
16
+ - **持久化**:读失败(EACCES/EISDIR)进入只读模式、不覆盖读不出的分片;重写不复活跨进程删除;扩桶按摊还计数;任务跨进程合并按字段(steps / files / fileMeta)而不是整条二选一。
17
+ - **工具/命令**:`save_lesson` / `remember` / `forget` / `select_task` / `archive_task` / `/tasks` 在未落盘时给出 `persisted:false` 或明确警告;`roots.deny/exclude` 对 symlink 别名生效;原生服务的 `recall/stats` 也过根护栏;TaskBridge 相对路径按会话 cwd 解析;显式切换任务/清空步骤会推空宿主清单;`/insight edit|list` 校验 scope;services `recall` 支持 `taskId`。
18
+ - **客户端**:记忆页打开时也取 `/tasks`(降级按钮不再永远禁用);记忆页命令走统一 `invokeCommand`(超时/取消/错误信封);分页发现 total 变化时回到第一页重取;`BroadcastChannel` 缺失时软降级;根比较归一大小写/分隔符;切换 scope 关闭编辑表单;设置服务部分缺失时点名告警。
19
+ - **文档/打包**:README 性能表更新为 v3 实测;`pm-digest` 区分桶数与源文件数;删除过时的 `client/client.d.ts`,构建前清理 `client/` 产物。
20
+
21
+ - **第二轮修复**:补齐上一批的“半修”与低优先设计项,无新增配置键。
22
+ - 旧消息(无 `source.memory`)改用**整行文本 hash** 对账:正文/结论改了会重发,不再因为 `hash=null` 永久压制;procedure 旧消息仍可能重发一次(老正文没有 id)。
23
+ - 旧宿主(无 `replaceGeneration`)每 32 次 ensure 做一次全量重建,等长/中间替换也能发现;删除只写不读的 `maxSeq`。
24
+ - `index_repo` / `index_doc` 在 `save()` 未落盘时也追加与写工具一致的警告。
25
+ - `/tasks` 快照对 steps/files/insights 分别截断到 50/50/20,超出量由 `totals` 回报,避免单条命令消息膨胀。
26
+ - `/insight edit|save` 的 `files` 被丢弃时在文案里回报数量。
27
+ - 服务 `stats` 增加 `taskInsights`;`forget` 命中超 cap 时返回 `tooMany/matched`,不再与“没命中”同形。
28
+ - 客户端动作后的前缀重载改为**连续翻页**直到原条数(单页仍 ≤200),超过 200 条不再被截断。
29
+ - 跨标签页广播增加 `sessionId / boundTaskId / sentAt`:同项目同会话同步绑定,乱序快照按时间丢弃。
30
+ - `tool-schema-size` 从 `toolDefinitions()` 注册表生成,新增工具自动进预算。
31
+ - **补充修复**:注入被宿主 abort/丢弃时回滚额度、冷却、`seen` 与命中计数(`recordHit` 支持负 delta),pre-step 增加 abort 闸门;任务卡用 `e` 指纹对账,条目全被跳过的下一步/重启不再重发卡;旧 procedure 按整块文本 hash 对账。
32
+ - **存储**:缩桶重排按“实际写过的桶”清理(空桶里的已删条目不再复活);锁内合并读失败时放弃本次写入(不覆盖另一进程);`format.json` 读失败不再 cleanup 掉新桶;`pruneTasks` 的归档不被跨进程合并回滚;锁新增 `up`(uptime)判重启;turn/end flush 使用 1.5s 预算。
33
+ - **工具**:`/tasks insight` 写命令落盘失败返回 error 而不是 success;原生服务四动词要求 root 存在;`index_doc` 超大/排除时摘掉旧索引(无 store 时不建);已归档任务拒绝 task 级写入;`index_repo` 成功/删除后清理后台失败账本。
34
+
35
+ - **store 布局 v3:目标尺寸哈希桶**。`shards/` 从“一文件一 shard”改为 `bucket-*.json`(目标 32KB,按 `sha256(relPath) % bucketCount` 分配,桶数随体积伸缩)。全量索引的文件操作数约降一个量级;单文件更新只重写它所属的一个桶。旧 `format.json` v2 / 逐文件分片在首次 `save()` 时自动迁移,迁移后删除旧分片。
36
+ - 兼容性:新版本能读 v2 并自动迁移;**旧版本读不懂 v3 桶**(会看到空 store),确认要回退时请先备份 `.dsh-project-memory/`。
37
+ - 损坏隔离粒度从“单文件”变为“单桶”:一个桶损坏会影响桶内文件,它们会在下一次扫描时重新索引。
38
+
39
+ ## 0.6.12 (2026-11-09)
40
+
41
+ **兼容**:无新增配置键,无 store 格式变更,`client/` 产物不变;直接覆盖升级即可。
42
+
43
+ - **内部重构**:`isRecord`、ISO 时间比较与消息取文本收敛到 `src/util/value.js` / `src/util/text.js`;12 个工具共用 `TEXT_OUTPUT` 与项目上下文初始化。
44
+ - **切 kind 的字段清理**统一到 `src/util/insight-fields.js`,`save_lesson` 与面板编辑共用同一判据。
45
+ - **时间戳只接受非空字符串**:缺失、非法或非字符串一律按 0 处理(此前数字会走 `Date.parse`)。
46
+
1
47
  ## 0.6.11 (2026-11-06)
2
48
  **兼容**:`format.json` 仅在成功从旧版 store 迁移时多一个可选的 `migratedFrom: 'legacy'` 标记(旧版本读到会忽略);无新增配置键,无破坏性 store 变更。
3
49
 
4
-
5
- ### 修复(2026-11-05 审计)
50
+ ### 修复
6
51
 
7
52
  - **旧版 store 迁移不再删库**:`entries.json` 有数据、`index.json` 缺失/无 `files` 时,`load()` 保护性跳过后 `save()` 不再补写 `format.json`;成功迁移的标记带 `migratedFrom: 'legacy'`,没有标记的旧 `format.json` 也不会触发清理。
8
53
  - **锁回收失败不再同步忙等**:stale 分支补 deadline 与 10ms 等待;只读目录 / Windows 持续占用下 `acquireDirLock()` 按 `timeoutMs` 返回 `null`,不再挂死 `save()` / 退出 flush。
@@ -19,21 +64,13 @@
19
64
  - **面板记忆列表在 `root` / 绑定任务变化后重取**;编辑 procedure 不再把合成摘要写进 `body`。
20
65
  - **空提交不再创建空 store**;`save_lesson` 改 `kind` 时清掉旧 kind 专属字段;`truncate()` 的缺省上限与 `timeAgo()` 的非法时间不再输出 `undefined` / `NaN天前`。
21
66
 
22
- **测试**:新增 `test/audit-2026-11-05.test.mjs`(19 项:迁移保护/并发合并/畸形任务/global 缺失/锁超时/lazy 顺序/队列身份/reinject/ops/词边界/向量清理/watch/scan/kind/空提交/truncate)。`npm test` **977 项 / 58 个文件**全绿、`npm run typecheck` 通过;`npm run build:client` 后 `client/` 与源码一致。
23
-
24
- **工具描述统一为英文,并写清「改而不是新建」**:12 个工具的描述与参数说明此前中英混排(3 中 / 9 英),现在全部英文。两处措辞补上更新优先:`save_lesson` 直说「看到的记忆记错、过时或不够用时,带 id 再写一次就地覆盖,别另建一条」;`query_memory` 补一句「查询后顺手用 id 更新过时、记错的条目」。
25
-
26
- schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(中文字符约 1 token/字,其余约 4 字符/token)。同一份内容实测:中文 4854 字符 / ~1772 token,英文 6734 字符 / ~1684 token——字符少不代表 token 少,按 token 判才选得对(这次英文略低,故取英文)。
67
+ **工具描述统一为英文**:12 个工具的描述与参数说明此前中英混排,现全部英文,并写明记忆过时/记错时带 `id` 就地更新。
27
68
 
28
69
  ### 适配 dsh 0.2.2-rc.1
29
70
 
30
71
  **开发依赖对齐新宿主**:`dsh-tools` / `dsh-llm` / 四个 client 包从 `0.2.1-rc.2` 升到 `0.2.2-rc.1`,`@deepseek-ai/cordis` 从 `^4.0.4`(实际装 4.0.5)升到 `^4.1.0` —— 0.2.2 的 client 包 peer 已是 `~4.1.0`,旧依赖下的全绿只证明了 0.2.1 兼容。`package-lock.json` 同步重新生成。
31
72
 
32
- **逐项核对 0.2.2 的接口变更**:`agent/pre-step`(dispatcher 仍注入 `agent`)、`session/event` / `session/disposed`、v4 消息 source 准入(仍拒 `kind: 'plugin'`、接受生产者自有 kind)、`ctx.tools.register`、`ctx.inject(['commands'])`、`workingDirectory.get(session)`、`sessions.list` 快照(`byId` + `retainedBy.mainView` + `blank`)、`shell.overlay` / `conversation.chat.commandview` 槽位、`remote.commands` 扁平服务、`ctx.configForms.get`、`inputTriggers.registerSource` —— 均未变;投影帧改 `changes[]`、已释放单元保留检查点、`session.list` 摘要去掉 contextPressure/contextBreakdown、LLM `purpose` 改为类型级声明、Loader 条目树改 `commit(change)` —— 插件都没读这些面。
33
-
34
- **补齐 `apply_patch` 的文件追踪**:这个 0.2.2 的可选工具只收整段补丁文本(`input`),路径写在 `*** Add/Update/Delete File:` 与 `*** Move to:` 行里。TaskBridge 与动作平面此前只认 `file_path`/`path`,开启该工具后跨文件补丁会漏记任务热点、审计也指不到具体文件;现在都从正文提取路径(相对会话当前工作目录再归一到项目根,项目外丢弃)。
35
-
36
- **实测**:`npm test` 全绿、`npm run typecheck` 通过、`npm run build:client` 产物与源码一致;0.2.2-rc.1 的 web profile 里工具注册、skill 注册与 pre-step 注入均正常。
73
+ **补齐 `apply_patch` 的文件追踪**:该工具只收整段补丁文本,路径写在 `*** Add/Update/Delete File:` 与 `*** Move to:` 行里;TaskBridge 与动作平面现在都从正文提取路径,跨文件补丁不再漏记任务热点。
37
74
 
38
75
  ## 0.6.10 (2026-11-04)
39
76
 
@@ -42,8 +79,7 @@ schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(
42
79
  ### 性能
43
80
 
44
81
  - **CJK 分词从「逐字符判断」改成「整段匹配」**:`tokenizeRaw` 此前对整篇文本逐码点调用 `CJK_RANGE.test()` 并累积字符串,纯英文文档也要跑满整篇。现在用一条从 `CJK_RANGE` 派生的正则一次取出所有连续段,再按原有规则结算(段长 1 产单字、≥2 产全部相邻二元组)。**输出逐字节一致**,所以 `TOKENIZER_VERSION` 不动、旧 store 不需要回填;等价性由 `test/tokenizer-equivalence.test.mjs` 差分守住(冻结旧实现当标尺 + 固定输出契约 + 18 个边界串 + 5 个真实文件 + 2000 组固定种子随机拼接 + `stem` 两态)。
45
- - **同会话 A/B**(Node 24.19 / WSL2 / 20 vCPU,同一小时内交替跑、每个版本两遍,引用页缓存已热的那遍):TypeScript 整树(14,528 文件 / 95,316 条目)首次查询的 IDF 重建 **1.44–1.53 s → 0.94–0.96 s**(约 −35%),抽取 9.42–9.51 s → 8.79–8.95 s(−6%),冷索引 10.66 s → 10.00 s(−6%);文档为主的语料(249 文件 / 889 条目)抽取 242–252 ms → 216–219 ms(−13%)、IDF 58–59 ms → 43–44 ms(−26%)。查询 p50 无可测变化(在噪声内)。
46
- - **已知代价**:极端构造输入(CJK 单字与拉丁字母逐字交替,如 `中a文a` 重复)实测 **0.97×**——段长恒为 1 时,正则产出的段数组比逐字累积多一层分配;真实代码与文档里不出现这个密度。README 的性能表是 2026-10-13 的历史测量口径,本轮未重测。
82
+ - **同会话 A/B**:首次查询的 IDF 重建快约 35%,抽取与冷索引快约 6%;查询 p50 在噪声内。极端构造输入(CJK 单字与拉丁字母逐字交替)约 0.97×,真实语料不出现该密度。
47
83
 
48
84
  ### 修复
49
85
 
@@ -61,11 +97,9 @@ schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(
61
97
  - `save_lesson` 的 `scope` 描述改为与实现一致:绑定任务时默认 `task`,否则 `project`。
62
98
  - **体检脚本读不到自定义 `memoryDir`**:`skills/project-memory/scripts/pm-digest.mjs` 把 store 目录写死成 `<root>/.dsh-project-memory`,配了自定义 `memoryDir` 的项目只会得到「no memory store」。现在依次按 `--memory-dir <name>` / `DSH_PROJECT_MEMORY_DIR` / 默认名解析;都没命中时在项目根下一层按 `format.json` 标记找唯一候选并标注 `auto-detected`,多个候选不猜、报错点名怎么传参。
63
99
 
64
- **测试**:新增 `test/audit-2026-11-02.test.mjs`(13 项:save_lesson kind 保留、watch/lazy 超限摘旧条目、archive_task 解绑与注入/召回守卫、maxTokens 0 零注入、watch stop/poll 不重建缺失根、str_replace_editor 的 ops/TaskBridge、手工 promote 保留字段与容量、空任务 payload root、空 memoryDir 归一、POSIX 盘符路径丢弃)与 `test/tokenizer-equivalence.test.mjs`(5 项:固定输出契约、18 个边界串、5 个真实语料文件、2000 组固定种子随机拼接、`stem` 两态——全部与冻结的旧实现逐字节比对)与 `test/memorydir-guard.test.mjs`(4 项:空/`.`/`..`/含 `..` 段/绝对路径回落默认目录且不移动 store、嵌套相对目录仍允许、默认告警对同一坏值只发一次、`memoryDir: '.'` 不把 `*` 写进项目根);`test/skill.test.mjs` 补 1 项(自定义 `memoryDir` 的三种解析路径 + 多候选不猜)。`npm test` **956 项 / 57 个文件**全绿、`npm run typecheck` 通过。
65
-
66
100
  ## 0.6.9 (2026-11-02)
67
101
 
68
- **兼容**:无新增配置键,无 store 格式变更(启动时会顺手把 `watch.json` 里大小写重复的根条目合并成一条;文件格式不变)。三个既有键——`watchInterval` / `autoIndexOnFirstUse` / `llmQueryExpansion`——在 `Config` 里标成 `.volatile()`:这是宿主设置表单的准入条件(只有 volatile 字段能被 settings 接口写入),也让它们在运行中原地更新而不重启插件。profile / 命令行的写法完全不变。插件内部读取统一走 `cfgValue()`:volatile 字段在运行时是 ref(`.get()`),直接把 ref 当布尔会读错。升级后**需要重启一次 dsh**——volatile 元数据只在装配期解析。两处**行为变化**:① 扫描与懒索引都跳过隐藏路径(任一段以 `.` 开头,如 `.env` / `.github/**`),显式 `index_doc` 仍可索引(已存在的隐藏路径条目会在下一次完整扫描被清理);② `autoContext.maxTokens: 0` 现在真的零注入(此前被 `|| 400` 顶回默认值)。
102
+ **兼容**:无新增配置键,无 store 格式变更(加载时合并 `watch.json` 里大小写重复的根条目)。三个既有键 `watchInterval` / `autoIndexOnFirstUse` / `llmQueryExpansion` 标为 `.volatile()`,可在插件设置页原地修改;升级后需重启一次 dsh。两处行为变化:① 扫描与懒索引跳过隐藏路径(显式 `index_doc` 仍可索引);② `autoContext.maxTokens: 0` 现在真的零注入。
69
103
 
70
104
  ### 新增:插件页上的可视化设置(web)
71
105
 
@@ -92,8 +126,6 @@ schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(
92
126
  - **Electron 宿主里 PDF 索引全灭(issue #10)**:pdf.js 只在 `isNodeJS` 为真时兜底 `workerSrc`,而宿主进程是 Electron 且 `process.type !== 'browser'` → 默认值整块跳过,每次解析都抛 `No "GlobalWorkerOptions.workerSrc" specified`。现在 `loadPdfjs()` 在 worker 未配置时用 `import.meta.resolve`(老 Node 退回 `createRequire`)解析 `pdf.worker.mjs` 的 `file://` URL 兜底;显式 `configurePdfjsWorker()` 与 pdf.js 自己的默认值仍优先。原实现里的 `configuredWorkerSrc` 分支因无人调用恒为假,纯 Node 测试里 `isNodeJS` 又恰好为真,所以这个洞从首版起一直没人发现(0.6.3 与 0.6.8 上都能复现),且失败只写一条 W 级日志。
93
127
  - **大小写不同的同一目录不再被登记两次**:`watch_repo` 先以 `D:\proj`、后以 `d:\PROJ` 登记时,`watch.json` 会留两条、watch 每轮扫两遍,而 `watch_repo({watch:false})` 只删得掉其中一条(另一条下次启动复活)。`WatchManager` 与 watchlist 现在按 `storeKey()` 归一(保留第一次出现的写法;加载时顺手把老 store 里的重复条目合并)。
94
128
 
95
- **测试**:新增 `test/pdfjs-host.test.mjs`(2 项:纯 Node 对照组;子进程里把 `process.type` / `process.versions.electron` 改成 Electron 宿主形态后解析 PDF,并断言正文命中——只断言"没抛错"会放过空正文的假成功)。新增 `test/settings-card.test.mjs`(10 项:三个 volatile 键与默认值(并断言其余键不进命名空间)、`cfgValue()` 的 ref/普通值双形状、空路径 `[[]]` 读成"全部重读"、watch 关停/改间隔即重排、整份 `apply()` 在 ref 形状 Config 上装配、槽位注册的 key 与命名空间、默认收起与展开后 3 行、`Button` 以 forwardRef 对象形状参与注册、命名空间未提供与缺 settings 控件两种零注册)。本轮另补 7 项回归:`maxTokens: 0` 零注入、相对 root 按会话 cwd 解析、git / walk 两种扫描的隐藏路径口径一致、懒索引也跳过隐藏路径、畸形任务缺 `files` 的归一、`GlobalStore.markDirty()` 进入退出 flush、watch 根与 watch.json 的大小写归一(2 项)。新增 `test/index-failures.test.mjs`(3 项:账本按根隔离与上限、懒索引失败登记与成功清除、`index_repo` 报出后台失败)。`npm test` **930 项 / 54 个文件**全绿、`npm run typecheck` 通过;`npm run build:client` 后 `client/` 零 diff(CI 也会复核产物与源码一致)。
96
-
97
129
  ## 0.6.8 (2026-10-30)
98
130
 
99
131
  **兼容**:条目上多一个可选的 `mtimeMs`(旧条目缺省时按老行为整读 + 哈希)。无新增配置键,无破坏性 store 变更。懒索引不再对已有记录的文件问 gitignore,新文件仍问。
@@ -108,8 +140,6 @@ schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(
108
140
  - `watch` / `index_repo` / `index_doc` 也记录 `mtimeMs`。
109
141
  - 新增 `test/lazy-batch.test.mjs`。
110
142
 
111
- **实测**(同会话旧 vs 新):12k 文件 / 48k 条目的 store、WSL 挂 `/mnt/c`(NTFS 悲观代理)下,重复读 66.0 → 0.9 ms p50、改一个文件后单独索引 96.5 → 32.7 ms p50;本机 ext4(200 文件 git 仓库)重复读 1.4 → 0.007 ms、改文件 1.7 → 0.19 ms。四个真实语料(vue / voice / harness 3k / 全树)同会话 A/B 的冷索引、查询与 watch 内核重索引都在 ±5% 噪声内(小语料冷加载本身抖动大,vue 7–11 ms)。
112
-
113
143
  ### 修复
114
144
 
115
145
  - 构建:产物改为跨平台确定。lightningcss 的 `[hash]` 会把 `filename` 算进类名,此前传的是绝对路径,换台机器构建就整套换类名;现改用相对 POSIX 路径。`.gitattributes` 统一 LF(sourcemap 的 `sourcesContent` 会原样嵌入源文件行尾),CI 增加产物一致性校验。
@@ -117,15 +147,13 @@ schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(
117
147
  - `index_doc`:先 stat 再读正文,记录里的 mtime 不会比内容新。
118
148
  - 懒索引的根缓存:会话根兜底不再入缓存(判据是 `findProjectRootWithSource()` 的 `source`,不靠 `root === sessionRoot` 猜)——子目录里 5s 内新建的 `.git` / `package.json` 立刻生效。
119
149
 
120
- **测试**:`npm test` **892 项 / 51 个文件**全绿;`npm run typecheck` 通过。新增 `test/lazy-batch.test.mjs`(7 项:mtime 快路径、touch 后回填 mtime、批内一次 save、批量 gitignore 与逐个判定一致、会话根兜底不缓存)。
121
-
122
150
  ## 0.6.7 (2026-10-28)
123
151
 
124
152
  **兼容**:无新增配置键,也没有破坏性的 store 变更——条目上只多一个可选的 `explicit` 标记(旧条目缺省即按非显式处理)。一处判据语义变化:原生 Windows 壳现在签 `windows` 而不是 `wsl`,写了 `guard.hosts: ['wsl']` 又想覆盖原生 Windows 命令的条目要改成 `windows`。老 profile 与旧 store 直接升级。
125
153
 
126
154
  ### 修复:Windows 上重启后的残留写锁把写入永久挡死(且默认静默)
127
155
 
128
- 锁的"pid 复用"判定只读 `/proc/<pid>`(Linux-only),Windows 上 `processStartMs()` 恒为 `null`;而 `lockIsStale()` 对"同机 + pid 存活"是绝不回收。于是崩在写盘途中、或断电/强杀留下的 `.write.lock`,在重启后一旦旧 pid 被系统服务复用,就永远被当成"活锁":`save()` 每次返回 `false`(`lastSaveOk=false`,但按设计默认不打印),重试 5 次(≈20s)后放弃,退出 flush 也拿不到锁——记忆静默丢失,只能手删 `.write.lock` 或重启 dsh。现在锁内容多一个 `boot`(`Date.now() - os.uptime()*1000`);`at`/`boot` 早于本次开机即判残留。**这条只对同机锁生效**:跨机锁仍只按 mtime 判(网络盘上另一台机器的 `at` 早于本机开机是常态,套用会抢掉真正在写的机器——原作者"宁可等也不能双写"的取舍保留)。另加 `acquireDirLock({ maxHoldMs })` 兜"同一次启动内 pid 被复用":`save()` 传 10 分钟,默认 `0` 表示不设上限、维持原契约。
156
+ Windows 上崩溃/断电留下的 `.write.lock`,在旧 pid 被系统服务复用后会永远被当成“活锁”,`save()` 静默失败。锁内容现在多一个 `boot`,`at`/`boot` 早于本次开机即判残留(只对同机锁生效,跨机锁仍按 mtime 判);另加 `acquireDirLock({ maxHoldMs })` 兜同一次启动内的 pid 复用,`save()` 传 10 分钟。
129
157
 
130
158
  ### 修复:`when.writes` / `guard.paths` 在 Windows 路径上永不命中
131
159
 
@@ -223,15 +251,13 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
223
251
 
224
252
  `GlobalStore.flushPending()` 返回 `commit()` 的 `fn` 返回值(通常 undefined),`flushDirtyStores()` 把已成功落盘的 global store 计成 0。现在显式返回 `lastCommitOk`。
225
253
 
226
- **测试**:`npm test` **885 项 / 50 个文件**全绿;`npm run typecheck` 通过。新增 `test/windows-compat.test.mjs`(11 项:跨开机残留锁、跨机锁不被误伤、`maxHoldMs`、反斜杠/绝对路径的 `writes` 与 `guard`、Windows 命令形态、`hosts`、路径 token、store 缓存键、BOM;判据都在字符串/时间层面,Linux CI 同样能跑,"同实例"那条按 `win32/darwin` 分支断言)与俄语词干固定样例 `test/fixtures/ru-stems.json`(200 个词形,与 snowballstemmer 3.1.1 一致)。
227
-
228
254
  ## 0.6.6 (2026-10-27)
229
255
 
230
256
  **升级注意**:这是一次**行为变更**——注入会变少。没有新增配置键、没有 store 格式变更,老 profile 直接升级。变化只在"什么时候允许全文注入":子代理提示词、其它工具的参数、后台任务 / 子代理通知,以及人类消息里的删除 / 清理 / 渲染 / 基准类词,不再触发全文注入。
231
257
 
232
258
  ### 修复:注入的"这一步在做什么"取错了来源
233
259
 
234
- **证据**(用插件自己的审计日志复盘一次真实会话——作者在插件仓库里跑 30–40 分钟审计,含 4 个子代理):17 次注入 / 8,654 字符,可判定与本步任务无关 **6.2k(72%)**。其中:
260
+ **证据**(用插件自己的日志复盘一次真实会话):17 次注入 / 8,654 字符,可判定与本步任务无关 **6.2k(72%)**。其中:
235
261
 
236
262
  - `find src client test scripts bench docs -type f` → `run-bench`(只是目录名 `bench`),4 条基准 procedure、1,777 字符;
237
263
  - 子代理提示词里的"删除后的悬空状态""版本迁移" → 父会话 `file-delete` / `migrate` 连续 8 步;
@@ -250,7 +276,7 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
250
276
 
251
277
  ### 修复:跨进程写的三条数据安全问题(多开 dsh)
252
278
 
253
- **背景**:审计给出三条可复现缺陷,全部发生在"两个 dsh 实例共用一个 store"这个插件明确支持的场景里。
279
+ **背景**:三条可复现缺陷,全部发生在"两个 dsh 实例共用一个 store"这个插件明确支持的场景里。
254
280
 
255
281
  1. **锁可被抢,release 无所有权校验**。旧锁只有 mtime:持锁超过 10s 就被第二个进程当成死锁抢走;原持有者到点 release 又无条件 unlink,把对方的锁删掉,第三个进程随即进入——实测三者同时"持锁"。
256
282
  现在锁内容带 `{pid, host, token, at}`:同机 pid 活着就绝不回收(Linux 上再用 `/proc/<pid>` 的启动时刻识别 pid 复用);release 校验 token,不删别人的锁。
@@ -259,14 +285,10 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
259
285
  3. **跨进程删除被复活**。A 加载后持有旧快照,B `forget` 落盘,A 下一次 save 把"磁盘没有但内存有"当成"本地新增"写回——"真删、无撤销"的承诺失效(任务同形;global 层同形)。
260
286
  现在合并规则是:磁盘缺失的条目只有**本进程新建**的才补写,否则视为对方已删、从内存里丢掉。顺带修掉一个更直接的变体:`tasks` 合并从不清理 `_deletedTaskIds`,删任务会在**同一次 save 里**被自己刚读到的磁盘副本写回来。
261
287
 
262
- **测试**:新增 `test/store-lock.test.mjs`(10 条,含两个真子进程的删除复活回归、同步等锁与退出 flush)。`npm test` **835 项 / 48 个文件**全绿。
263
-
264
288
  ### 新增:把用法做成宿主 skill
265
289
 
266
290
  `skills/project-memory/`:`SKILL.md`(唯一事实源,frontmatter 提供 name / description,注册时剥掉)+ `scripts/pm-digest.mjs`(零依赖体检:store 大小、insight / 任务计数、trigger 覆盖、绑定数)。`apply()` 用 `ctx.inject(['skills'], …)` 注册,`resourceBase` 指向包内目录;没有 `skills` 服务的宿主静默跳过。`package.json files` 加 `skills`。
267
291
 
268
- **测试**:`npm test` **825 项 / 48 个文件**全绿;`npm run typecheck` 通过。新增 `test/signal-source.test.mjs`(端到端:通知不算人话 / 回退会话缓存、subagent 参数不产 op、目录名不产 `run-bench`、散文删除只记录)与 `test/skill.test.mjs`。
269
-
270
292
  ### 性能:Windows / NTFS 上大量小文件(不 OOM,但会被"每次 save 的文件操作数"拖慢)
271
293
 
272
294
  **实测**:同一份 400 个小文件,`WSL 挂 /mnt/c`(9p,NTFS 的**悲观**代理)与 ext4 对照:
@@ -315,7 +337,7 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
315
337
 
316
338
  ## 0.6.5 (2026-10-24)
317
339
 
318
- **升级注意**:`allowUnsafeRoots: true` 的作用面比 0.6.4 大。此前它只放开**显式**工具调用与 `autoIndexOnFirstUse`,懒索引、会话审计与 TaskBridge 即使开着也始终不动;现在它放开内置名单的**所有**根判定入口,这三条链路会在放行的目录里建 store、写审计。只想放开某个目录时用 `roots.allow`(精确匹配,不影响 `deny` / `exclude`);家目录、系统目录如非必要仍建议保持 `false`。
340
+ **升级注意**:`allowUnsafeRoots: true` 的作用面比 0.6.4 大。此前它只放开**显式**工具调用与 `autoIndexOnFirstUse`,懒索引、会话日志与 TaskBridge 即使开着也始终不动;现在它放开内置名单的**所有**根判定入口,这三条链路会在放行的目录里建 store、写日志。只想放开某个目录时用 `roots.allow`(精确匹配,不影响 `deny` / `exclude`);家目录、系统目录如非必要仍建议保持 `false`。
319
341
 
320
342
  ### 新增:可配置的项目根名单(issue #8)
321
343
 
@@ -329,12 +351,10 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
329
351
 
330
352
  优先级 `exclude` > `deny` > `allow` > 内置名单。`allowUnsafeRoots: true` 保留为兼容开关,只作用于内置名单、`deny` / `exclude` 仍然优先——它的作用面变化见上面的升级注意。
331
353
 
332
- **生效面**:判定收敛到 `util/fs.js` 的 `compileRootPolicy()` / `rootRejection()`,以下入口共用同一结论——显式工具调用(`index_repo` / `index_doc` / `remember` / `query_memory` / `stats` / 任务工具)、懒索引、watch 轮询、会话审计、TaskBridge。`listProjectFiles()` 的 walk 与 git 两条分支都应用 `roots.exclude`;父根的完整扫描会跳过被排除子树,并清掉之前索引过的条目。
354
+ **生效面**:判定收敛到 `util/fs.js` 的 `compileRootPolicy()` / `rootRejection()`,以下入口共用同一结论——显式工具调用(`index_repo` / `index_doc` / `remember` / `query_memory` / `stats` / 任务工具)、懒索引、watch 轮询、会话日志、TaskBridge。`listProjectFiles()` 的 walk 与 git 两条分支都应用 `roots.exclude`;父根的完整扫描会跳过被排除子树,并清掉之前索引过的条目。
333
355
 
334
356
  **自愈**:新增 `deny` / `exclude` 后,已经登记在 `watch.json` 里的根会在下次启动时自动摘掉,不需要手删。拒绝文案会说明命中的规则,并指出要改的字段(`- id: project-memory` 的 `config:` 下)。
335
357
 
336
- **测试**:新增 `test/root-policy.test.mjs`,覆盖精确/前缀语义、优先级、`~` 展开、相对路径告警、Windows 大小写、walk/git 两条扫描分支、watch 自愈与各入口的一致性。`npm test` **810 项 / 45 个文件**全绿;`npm run typecheck` 通过。
337
-
338
358
  ## 0.6.4 (2026-10-23)
339
359
 
340
360
  **0.6.3 之后的收口**:11 个提交全部是修复与内部整理,没有新增工具、没有删除配置项。用户能感觉到的变化集中在三处——语料开始跟随 `.gitignore`、几个"设成 0 本该关闭"的旋钮真的关闭了、面板里改一步不再整份回写。**升级前请读第一条与「向量层」那条**。
@@ -367,7 +387,7 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
367
387
 
368
388
  ### 修复:经验层与洞察层各用一套打分器,`save_lesson` 写出的条目恒 0 分
369
389
 
370
- **问题**:`save_lesson` 写出的 experience 条目没有 `problem` / `solution`,而旧 `rankExperienceScored` 拼给 BM25 的文档是三个字面量 `undefined` → 该条目**恒 0 分**;洞察桶又按 kind 排除了 experience,于是两条召回路径同时断掉:条目在库里,查不到,`query_memory` 还会印出 `Problem: undefined`。同一处还有两个连带问题:只给 `pattern` 的 lesson,`vectorText` 只认 title/problem/body,空串让 `vectorNear` 返回 null,0.9 自动覆盖与 0.7 近邻提示整体失效;只给 `choice` 的 decision,标题落成 `(untitled)`。影子审计里 `rel` 的分子是 BM25 分、分母却是融合 top,实测能到 5.925。
390
+ **问题**:`save_lesson` 写出的 experience 条目没有 `problem` / `solution`,而旧 `rankExperienceScored` 拼给 BM25 的文档是三个字面量 `undefined` → 该条目**恒 0 分**;洞察桶又按 kind 排除了 experience,于是两条召回路径同时断掉:条目在库里,查不到,`query_memory` 还会印出 `Problem: undefined`。同一处还有两个连带问题:只给 `pattern` 的 lesson,`vectorText` 只认 title/problem/body,空串让 `vectorNear` 返回 null,0.9 自动覆盖与 0.7 近邻提示整体失效;只给 `choice` 的 decision,标题落成 `(untitled)`。影子日志里 `rel` 的分子是 BM25 分、分母却是融合 top,实测能到 5.925。
371
391
 
372
392
  **改法**:经验层改用洞察层同一个 `insightToEntry` + `rankEntriesMergedScored`,命中后用 `byId` 换回原条目,`rankExperience(Scored)` 删除;`normalizeInsight` 的标题链补 `choice`;`vectorText` 用同一条链(title → pattern → problem → choice → topic → body)并截 200 字符;影子记录新增 `lexTop`,`rel = 词法分 / lexTop`,真实排序判据仍用融合分;渲染侧 problem→title、solution→fix→choice→body 兜底。
373
393
 
@@ -432,9 +452,9 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
432
452
 
433
453
  **影响**:每轮固定开销降约 43%;工具行为与参数契约不变。
434
454
 
435
- ### 整理:审计写入器归一、global store 单例、`steps` 纳入密钥检测
455
+ ### 整理:日志写入器归一、global store 单例、`steps` 纳入密钥检测
436
456
 
437
- - 影子审计与主审计共用一份配置归一(`cfgSideLog()`:默认开、只认显式 `false`、非法上限退回默认值)与一个写入器;两者只剩文件名与默认上限不同(审计 256 KB、影子 512 KB,各留一代 `.1`)。日志名、字段、轮转行为全不变。
457
+ - 影子日志与主日志共用一份配置归一(`cfgSideLog()`:默认开、只认显式 `false`、非法上限退回默认值)与一个写入器;两者只剩文件名与默认上限不同(主日志 256 KB、影子 512 KB,各留一代 `.1`)。日志名、字段、轮转行为全不变。
438
458
  - `GlobalStore` 按文件路径复用实例(与 project store 的 `storeCache` 同语义):两个工具 / 会话交错读写同一份 `global.json`,不再后写覆盖先写。
439
459
  - 向量缓存的键加上模型指纹;taskbridge 的会话 Map 改成有界并在 `disposed` 时清理。
440
460
  - `remember` 的 `source_file` 走 `normalizeCitationFiles()`:项目外的路径丢弃并回报,不再把任意绝对路径写进记忆。
@@ -465,8 +485,6 @@ Snowball 词干不幂等(`память → памя → пам`)。`recallIt
465
485
 
466
486
  README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内部文件名换成中性写法;测试夹具里的内部文件名改成 `notes.md` 这类占位。零运行时行为变化。
467
487
 
468
- **测试**:`npm test` 720 → **756 项 / 44 个文件**(新增 `gitignore-index` / `store-concurrent` / `tool-schema-size`;`insight-store`、`recall`、`recall-vector-fusion`、`vector-index`、`auto-inject`、`client-toolview`、`client-task-sync` 等在既有 `ok` 块内补断言);`npm run typecheck` 通过;`npm run build:client` 重建与提交产物零差异。
469
-
470
488
  ## 0.6.3 (2026-10-20)
471
489
 
472
490
  ### 新增:删除留痕——`forget` 仍真删,但最近 5 条可从 `deleted.json` 找回
@@ -504,12 +522,8 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
504
522
 
505
523
  `ops.js` 的写盘判据里,重定向一支是 `>>?\s*\S`——它把**丢弃输出**也算成写文件。实测 `ls .agents 2>/dev/null | head` 抽出 `targets=['.agents']`、`cat package.json 2>&1` 抽出 `['package.json']`,而 `ops.targets` 正是 `when.writes` 的匹配面:列目录 / 看文件会误触发一条 `writes:['package.json']` 的教训。现在 `>` / `>>` / `2>` 之后是 `&`(合并 fd)或 `/dev/null`(丢弃)时不算写,`> file`、`2> file`、`1>> file` 照旧算。
506
524
 
507
- **测试**:`npm test` 705 → **720 项 / 41 个文件**(新增 `client-task-sync`;`insight-store` +1、`host-contract` +1、`taskbridge` +1、`root-guards` +8,其余在既有 `ok` 块内补断言),`npm run typecheck` 通过。
508
-
509
525
  ## 0.6.2 (2026-10-17)
510
526
 
511
- `npm test` **705 项 / 40 个文件**;`npm run typecheck` 通过。
512
-
513
527
  ### 兼容:dsh 0.2.1-rc.2
514
528
 
515
529
  - **开发依赖对齐新宿主**:`@deepseek-ai/dsh-tools` / `dsh-llm` / 四个 client 包从 `0.2.0-rc.2` 升到 `0.2.1-rc.2`,`package-lock.json` 重新生成;`client/client.js` 按 0.2.1 的 seed 模块重建。
@@ -525,8 +539,6 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
525
539
  - **动作后的重放不再超过宿主单页上限**:`reloadWindowRequest()` 返回 `limit = 已加载条数`(客户端注释还写着"正常永远走 PAGE_SIZE=30"),而宿主 `INSIGHT_PAGE_MAX=200` 是**静默**截断;重放又是替换式 `setRows`,于是滚到 500 条再点任意动作,列表被打回 200 条。改法:客户端用 `HOST_PAGE_MAX=200` 夹住 `limit`,载荷回报的 `nextOffset` 让哨兵继续把 200..N 追加回来。`client/client.js` 已同步重建。`test/insight-paging.test.mjs` 加一条交叉断言,把客户端常量与宿主 `INSIGHT_PAGE_MAX` 钉在一起(browser bundle 进不了服务端模块,只能靠测试防漂移)。
526
540
  - **`insight.*` 四个旋钮补进 Schema**:`autoMergeCos` / `autoMergeMargin` / `hintCos` / `maxForgetMatches` 在 `cfgInsight` 里读取、README 与 `types.js` 也写了,却没在 `src/index.js` 的 `Config` 里声明——与 0.5.8 给 `autoContext` 补声明是同一类问题:走 `cordis.patch.yml` 配它们,能不能活到代码取决于宿主是否按 `additionalProperties: false` 校验,但无论哪种,文档与 Schema 已经不一致。新增 `test/config-schema.test.mjs`:凡 `cfgInsight()` 会算出的数值键都必须在 `Config.insight` 声明,且 Schema 默认值等于运行时兜底值。
527
541
 
528
- **测试**:`npm test` 701 → 705 项 / 39 → 40 个文件(新增空根零副作用、客户端上限三条、契约交叉断言、Schema 一致性);`npm run typecheck` 通过。
529
-
530
542
  ### 修改:统一存储——`experience.json` 退休,经验笔记成为 `kind:'experience'` 的 insight
531
543
 
532
544
  **问题**:同一个概念有两个真相源——`experience.json` 服务 `remember`/`forget`/`query_memory`,`insights.json` 里又躺着一份 `source:'migrate'` 的**影子副本**,靠 `visibleInsights` 里一个特判(排除 `kind:'experience' && source:'migrate'`)才不至于在 `## Insights` 与 `## Experience` 里各出现一次。写入、删除、容量、向量索引各维护一套,正是"结构有点乱"的来源。上一版把 `forget` 做成了全层一套,但底下仍然是两套存储。
@@ -542,8 +554,6 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
542
554
  **升级路径**(至少覆盖 0.5.0,三种真实形态都有测试):只有 `experience.json`、没有 `insights.json` 的 0.4/0.5.0 store;`migratedAt` 已存在但旧文件还在的 0.5.x/0.6.x store;v1/v2 `insights.json`。都能直接加载,导入幂等、不重复。
543
555
  **降级注意**:回到 ≤0.6.x 的老版本后,那些笔记在旧版里查不到——老版本从空的 `store.experience` 出发、又用特判排除 `source:'migrate'` 的影子。**数据没丢**(仍在 `insights.json`),只是旧版本不再展示。
544
556
 
545
- **测试**:新增迁移归档 / 已迁移老 store 也要归档 / 无 insights.json 的旧版形态 3 项;删掉随能力一起消失的用例(经验层容量与动态上限、`store-cache` 的"经验写入"失效探针、run-test 的 `addExperience` 系列),并把 `supersede boundary`(共享前缀不互相顶掉)改到新写路径上继续钉住。707 → 701 项。
546
-
547
557
  ### 修改:`forget` 通吃全层(教训 / 决策 / 流程 / 经验笔记,task / project / global)
548
558
 
549
559
  **问题**:`forget` 只删旧的 `experience.json`(`store.removeExperience`),insight 层**没有删除入口**——模型发现某条记错了、过时了,只能新写一条"本条修正 ins_xxx",于是矛盾的两条长期共存、又都在注入候选里(真实使用里出现过好几对这种"新条目声明修正旧条目"的记录,被修正的那条一直在注入)。写入侧上一版已经能就地改,删除侧一直缺着。
@@ -553,7 +563,7 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
553
563
  - **精确 id 优先**:命中即删那一条,不被当成关键词。
554
564
  - **关键词**沿用旧经验层**一直以来的判据**——查询侧覆盖率(命中词 / 查询词数)≥ 0.5,而不是排序/去重用的两侧取大:删除查询通常只有一个词,用两侧取大会被长正文稀释到接近 0,"删掉 pnpm 那条"就永远删不掉。换层不顺带改判据。
555
565
  - **上限保护**:关键词命中超过 `insight.maxForgetMatches`(默认 10)时**一条都不删**,只列出候选(id + 标题 + 所在层)让人给更具体的词或逐个 id。删除是真删且无撤销,一次 `forget 'pnpm'` 扫掉十几条精选记忆不可接受。
556
- - **回报说清删了什么**:`Removed N memory entries:` + 每条的 `id《标题》(层)`。旧实现只回一个计数,事后无法审计。
566
+ - **回报说清删了什么**:`Removed N memory entries:` + 每条的 `id《标题》(层)`。旧实现只回一个计数,事后无法核对。
557
567
 
558
568
  `save_lesson` 的近邻提示同步补上"确认过时的用 forget 删掉它",写入与删除两条路闭环。`test/insight-store.test.mjs` 新增 2 项(+2):精确 id 删 project / global / task(global 要验落盘)、关键词删旧经验层、上限保护超限不删、无匹配不炸,以及 `forget` 工具端到端的回报内容。
559
569
 
@@ -572,11 +582,9 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
572
582
 
573
583
  **`save_lesson` 新增 `id`**:给了 id 就是就地更新,只覆盖本次显式传的字段,忽略 `scope`——条目留在原来的层(global → project → 各任务,`findInsightAnywhere` 负责定位)。未知 id **显式失败**,绝不静默新建。带 id 时跳过向量加载(不需要比对)。
574
584
 
575
- **测试**:`test/insight-store.test.mjs` 新增两组(判定矩阵用注入的 fake cosine,不依赖 leanvec)+3 项:0.95 自动覆盖且旧值进 `prev`、0.80 只提示、0.50 不提示、0.95/0.93 领先不足不覆盖、跨层就地更新、未知 id 失败、`prev` 跨层保留,以及工具端到端的 id 更新/写回。
576
-
577
585
  ### 修复:dsh 0.2.1 起 `session.header.cwd` 不再是「当前工作目录」
578
586
 
579
- 0.2.1 引入 `@deepseek-ai/dsh-working-directory`:`header.cwd` 变成**原始项目身份 / 权限根**,而 `working_directory({cd})` 改的是会话投影里的当前执行目录,**不写回 header**。本插件的根解析(索引 / 检索 / 懒索引 / 审计注入 / 任务桥)此前一律读 `header.cwd`,于是用户 cd 到另一个项目后,记忆仍然读写**原项目**的 store——不报错,只是静默错根。
587
+ 0.2.1 引入 `@deepseek-ai/dsh-working-directory`:`header.cwd` 变成**原始项目身份 / 权限根**,而 `working_directory({cd})` 改的是会话投影里的当前执行目录,**不写回 header**。本插件的根解析(索引 / 检索 / 懒索引 / 注入 / 任务桥)此前一律读 `header.cwd`,于是用户 cd 到另一个项目后,记忆仍然读写**原项目**的 store——不报错,只是静默错根。
580
588
 
581
589
  取值现在收敛到 `src/util/session-dir.js` 的 `sessionWorkingDir()`:`ctx.get('workingDirectory').get(session)` → `session.header.cwd` → `agent.session.header.cwd`。新服务用 `ctx.get()` **软探测**(不能进顶层 `inject`,那是装配期门控,老宿主上会让插件整个不挂载),服务缺失或抛错都回退 `header.cwd`。没 cd 过时该投影的 `init` 就是 `header.cwd`,两者恒等,因此对既有行为是 **no-op**。`test/session-dir.test.mjs` 9 项钉住每条取值路径。
582
590
 
@@ -594,8 +602,6 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
594
602
 
595
603
  ## 0.6.1 (2026-10-15)
596
604
 
597
- `npm test` **650 → 675 项 / 36 个文件**;`npm run typecheck` 通过。
598
-
599
605
  ### 修复:物化后的 `searchText` 不在 storeCache 的上界里
600
606
 
601
607
  `residentBoundBytes` 只数 `_textChars`,而 `allEntries()` 物化 `searchText` 时只 bump 物化版本、不补这笔文本量。于是上界停在物化前的水位,门禁据此跳过精确计量与逐出——实测最多到预算的 **2.06 倍**(真实语料 1.07~1.15 倍)。现在物化按文件记进 `_textChars`,与写路径同一套替换语义。
@@ -610,8 +616,6 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
610
616
 
611
617
  ## 0.6.0 (2026-10-13)
612
618
 
613
- `npm test` **616 → 650 项 / 34 → 36 个文件**;`npm run typecheck` 通过。注入场景集 8 → **13** 个,另加 3 个 hint-only 场景。
614
-
615
619
  ### 新增:可选语义层(只重排经验 / 洞察两层)
616
620
 
617
621
  可选依赖 `leanvec` 随安装默认可用并自动启用(约 79 MB、约 +130 MB RSS);未安装或 `vectorDir: 'off'` 时逐字段退回纯词法。只改这两层排序,返回条数与文档/符号层不变;`vectorAlpha` 默认 `0.5`。
@@ -658,8 +662,6 @@ README 双语与 CHANGELOG 里的具体框架名、硬件与机器信息、内
658
662
 
659
663
  ## 0.5.16 (2026-10-11)
660
664
 
661
- `npm test` **592 → 616 项 / 30 → 34 个文件**;`npm run typecheck` 通过。
662
-
663
665
  ### 性能:`chunkText` 不再对整份正文物化(只对有 section 结构的文档有效)
664
666
 
665
667
  原实现先把整份正文 `split(/\r?\n/)`,再把所有 section 的正文同时留在内存里。现在逐行扫描,
@@ -768,7 +770,7 @@ fiber 里 `provide`):读它不需要 inject 的**唯一**路径是 `ctx.get(
768
770
 
769
771
  - **`insight.files` 只收项目内相对路径**(此前零校验):`save_lesson` 的参数描述一直写着「项目相对
770
772
  路径」,但项目外的绝对路径会原样落盘 —— 实测本仓库 144 处引用里 **3 处项目外、6 处真悬空**,
771
- 事后只能靠审计发现"查不到"。现在写入期收敛:反斜杠归一、`./` 前缀去掉、重复合并、
773
+ 事后只能靠日志发现"查不到"。现在写入期收敛:反斜杠归一、`./` 前缀去掉、重复合并、
772
774
  **项目内绝对路径 → 项目相对路径**,其余(项目外绝对 / `..` 逃出根 / 没有根时无法判定的绝对路径)
773
775
  **丢弃并把数量写进返回文本**(不静默少几行)。两条写入路径共用同一个纯函数
774
776
  `normalizeCitationFiles`(`src/util/fs.js`):工具 `save_lesson` 与面板编辑(`/tasks insight edit`)。
@@ -799,7 +801,7 @@ fiber 里 `provide`):读它不需要 inject 的**唯一**路径是 `ctx.get(
799
801
  多会话任一在跑即活跃、回合结束的节拍恢复(有改动回 base / 无改动继续退避)、`watch: false` 与
800
802
  `stop()` 之后活跃信号不抛错也不复活定时器。
801
803
 
802
- ### 修复:`budget` 掉落的两维数字在审计面被抹掉
804
+ ### 修复:`budget` 掉落的两维数字在日志被抹掉
803
805
 
804
806
  `57b464c` 给 `dropped` 加了 `remaining` / `need`(理由写在代码里:"还剩 38 字符、这条最少要 120"
805
807
  与"根本没预算"在日志里长得一样,配额逼近上限时那条**永久静默的细缝**因此不可诊断)。
@@ -808,7 +810,7 @@ fiber 里 `provide`):读它不需要 inject 的**唯一**路径是 `ctx.get(
808
810
  `test/injection-budget.test.mjs` 断言的是 `buildInjection` 的**内存产物**:
809
811
  两处各自有测试,接缝没人测。
810
812
 
811
- - 审计投影原样保留这两维。只对带数字的条目落键 —— coverage 等没有量纲的掉落占绝大多数,
813
+ - 日志投影原样保留这两维。只对带数字的条目落键 —— coverage 等没有量纲的掉落占绝大多数,
812
814
  不该为此多出两个 `null`。
813
815
  - **回归**:`buildInjection` → `auditRecordFrom` → `appendInjectionAudit` → 读回最后一行,
814
816
  断言 `remaining: 30` / `need: 120` 真的落到盘上(回退修复即失败)。
@@ -816,7 +818,6 @@ fiber 里 `provide`):读它不需要 inject 的**唯一**路径是 `ctx.get(
816
818
 
817
819
  ## 0.5.15 (2026-10-06)
818
820
 
819
- `npm test` **563 → 592 项 / 30 个文件**;`npm run eval:injection` 逐项不变
820
821
  (命中 14 / 假阳性 0 / 漏召 0,P/R 1.00/1.00,7 次注入 857 字符)。
821
822
 
822
823
  ### 变更:工具 schema 预算瘦身 —— 每次请求固定开销 -356 token(粗估)
@@ -924,14 +925,13 @@ id 前缀规则 `replace(/[\\/:\s]/g, '_')` 曾在**三处各写一份**(`doc-
924
925
  50 MB 反而 328 MB),所以脚本以 **RSS 为主口径**,heap 只作参考。
925
926
  - 顺手清账:`parsePdfInfo()` 零调用方(且自己会整份读盘)→ 删除。
926
927
 
927
- ### 文档:README 测试数断言审计
928
+ ### 文档:README 测试数断言
928
929
 
929
930
  README(英/中)的测试数此前停在 561,而 `npm test` 实测已是 563(`readiness` 15→16、
930
931
  `ops` 6→7 两处漏更)。本次与新增用例一起对齐到 **592**,逐项相加与实测一致。
931
932
 
932
933
  ## 0.5.14 (2026-10-02)
933
934
 
934
- `npm test` **540 → 561 项 / 28 → 30 个文件**;`npm run eval:injection` 逐项不变
935
935
  (命中 14 / 假阳性 0 / 漏召 0,P/R 1.00/1.00,7 次注入 857 字符)。
936
936
 
937
937
  ### 修复:`/` 菜单里「工作流」三行点了没反应
@@ -1426,17 +1426,17 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1426
1426
  **精确匹配**:只拒绝这些目录本身,子目录照常可用(`~/Library/Mobile Documents/…/proj` 仍是合法项目根)。
1427
1427
  - 所有会写盘/扫描的入口统一过这道关:`index_repo`、`watch_repo`、`index_doc`、`remember`/
1428
1428
  `forget`/`lesson`/`query_memory`/`memory_stats`/任务工具、watch 管理器、`autoIndexOnFirstUse`。
1429
- - **项目根推导收敛成 `util/fs.js` 里的唯一策略**,懒索引 / 会话审计 / TaskBridge / 所有工具
1429
+ - **项目根推导收敛成 `util/fs.js` 里的唯一策略**,懒索引 / 会话日志 / TaskBridge / 所有工具
1430
1430
  用同一套顺序:显式 `root` → 显式登记的根(`watch_repo`)→ 最近的 VCS/清单标记 →
1431
1431
  **会话工作目录本身(只要它是安全目录)** → `null`。旧实现是"标记优先,找不到就兜底到文件
1432
- 所在目录",且审计/工具侧直接用原始 cwd、懒索引用标记根,同一个会话会分裂成两个 store。
1432
+ 所在目录",且日志/工具侧直接用原始 cwd、懒索引用标记根,同一个会话会分裂成两个 store。
1433
1433
  现在"有没有标记"不再决定"能不能用"——只决定"这个根是声明的还是推定的"。没有标记的散目录
1434
1434
  仍然**不会**被升格:只有会话 cwd(人明确选择的工作位置)才有这个资格。
1435
1435
  - **推定根会通告模型**:根来自无标记的会话工作目录时,首次注入前追加一行"记忆根 = X
1436
1436
  (无项目标记,按会话工作目录推定);若要改,给 index_repo / watch_repo / remember /
1437
1437
  query_memory 传 `root: <dir>`,或在项目目录里重启 dsh"。每个会话一次,与常驻任务卡同类
1438
1438
  (状态声明,不占条目额度),`autoContext.rootNotice: false` 可关。
1439
- - 危险根里**自动路径零副作用**:懒索引不索引、auto-inject 不读 store 也不写审计(不再把
1439
+ - 危险根里**自动路径零副作用**:懒索引不索引、auto-inject 不读 store 也不写日志(不再把
1440
1440
  `.dsh-project-memory` `mkdirSync` 进家目录)、TaskBridge 不建档不记文件;即使被显式调用的工具
1441
1441
  也会收到可执行的拒绝说明,只有新配置 `allowUnsafeRoots: true` 才放行显式调用。
1442
1442
  - 有界化:`walkDir` 返回 `{files, truncated}` 并支持 `maxScanFiles`(默认 20000)/`maxScanDepth`
@@ -1449,7 +1449,7 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1449
1449
 
1450
1450
  验证:新增 `test/root-guards.test.mjs`(69 项:判定与例外、**用 `path.win32` 在任意平台上
1451
1451
  模拟验证 Windows 分支**、每个入口的拒绝、历史污染自愈、安全无标记 cwd 照常可用、推定根通告、
1452
- 审计与懒索引用同一个根、截断不误删、auto-inject 静默);
1452
+ 日志与懒索引用同一个根、截断不误删、auto-inject 静默);
1453
1453
  `test/run-test.mjs` 里依赖旧语义(启发式、兜底、temp ceiling)的断言改为新契约;
1454
1454
  `injection-audit` / `injection-budget` 的夹具根补上项目标记,避免根通告混进它们的计数。
1455
1455
  全量测试与 `npm run typecheck` 通过。
@@ -1567,7 +1567,7 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1567
1567
 
1568
1568
  - 新增 `admission-shadow.jsonl`:**每步**一行(含零注入的静默步与对照组),带本步全部被评分的
1569
1569
  候选 + 判据特征(`rel` / `coverage` / `matched` / `support` / `terms` / `decision`)与场景
1570
- (`query` / `ops` / `writes`)。主审计只在真的注入时写,静默步零痕迹 → "换个阈值会怎样"
1570
+ (`query` / `ops` / `writes`)。主日志只在真的注入时写,静默步零痕迹 → "换个阈值会怎样"
1571
1571
  永远无法离线回答,也攒不出训练样本。`decision` 直接指出每条候选卡在哪一关。
1572
1572
  - `scoreHints` 只做加法:影子候选单独一条路径,`hints` / `dropped` 的行为一字未改。
1573
1573
  - 配置:`autoContext.shadowLog`(默认 true)/ `shadowMaxBytes`(默认 2 MB,超限轮转 `.1`)。
@@ -1588,7 +1588,7 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1588
1588
 
1589
1589
  ## 0.5.7 (2026-09-20) — bug-fix release
1590
1590
 
1591
- 发布前审计在 313 项全绿下发现并修复以下缺陷,新增 18 项回归测试(共 331)。
1591
+ 发布前在 313 项全绿下发现并修复以下缺陷,新增 18 项回归测试(共 331)。
1592
1592
 
1593
1593
  ### 数据完整性
1594
1594
 
@@ -1659,84 +1659,75 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1659
1659
 
1660
1660
  ### Fixed (the README promised a benchmark the npm package did not contain)
1661
1661
 
1662
- - **`scripts/` was missing from `package.json`'s `files` whitelist, so the published tarball shipped a README that told users to run a script it did not include.** `README.md` / `README.zh-CN.md` are inside the package, and their *Performance → Reproduce it on your own project* section (plus the Development block) documents `npm run bench -- /path/to/your/project` and `node scripts/bench.mjs` — but `npm pack` contained only `src/`, `client/`, `cordis.patch.yml` and the three documents: no `scripts/bench.mjs`, no `scripts/bench-synthetic.mjs`. Anyone installing the plugin from npm and following the reproduce instructions found the file absent, which is exactly the "trust the numbers" position that section exists to avoid. `scripts` is now in `files`, so both harnesses ship with the package; they still need no dsh instance, no network and no model calls, since they import only `src/`. Verified with `npm pack --dry-run` (tarball now lists `scripts/bench.mjs`, `scripts/bench-synthetic.mjs`, `scripts/bench-store.mjs`).
1663
- - **`bench/` stays local-only** — it is git-ignored and has never been tracked. It holds the raw measurement logs (`bench/results/`) and the scratch profilers; the synthetic harness it used to contain is `scripts/bench-synthetic.mjs`. Note this is a *packaging* fix only: those harnesses were already on GitHub, so "the README references a script that is not in the repository" was never true for the git remote — it was true only for the npm tarball.
1664
- - **Both READMEs advertised a stale test count.** They still said `280 tests` (the pre-0.5.5 number) while the three unreleased fixes above took the suite to **286**; the figures are now the measured ones (core 180 → 184, host-contract 7 → 9, everything else unchanged).
1662
+ - **npm 包缺 `scripts/`**:`files` 补上 `scripts`,tarball 现在带 `bench.mjs` / `bench-synthetic.mjs` / `bench-store.mjs`,README 的复现命令可用。
1663
+ - `bench/` 保持本地忽略;合成基准移到 `scripts/bench-synthetic.mjs`。
1664
+ - 两份 README 的测试数从 280 更正为实测值。
1665
1665
 
1666
1666
  ### Fixed (silent injection re-sent memory that was already in context)
1667
1667
 
1668
- - **Dedupe was whole-block, so a benign change anywhere re-sent every item.** The only guard was a fingerprint of the whole injected block, and that block changes for reasons that have nothing to do with the memory being new: the resident task card advances, the observed tool-call window slides, and `fitBody` re-truncates the last item whenever the remaining budget shifts. Measured on a real 66-step session: **20 injections carrying 41 item-sends for 9 unique items — 78% of them re-sends**, including the same 1732-char procedure three times and another 1008-char one six times.
1669
- - **Items are now remembered per session** (`sessionId → insightId → { hash, step }`) and an unchanged, already-injected item is filtered out of `buildInjection` **before** budget scheduling, so the budget it used to occupy goes to new items instead. The hash is over the injected body, so editing an insight re-injects it immediately. Only items that actually made it into an appended message are recorded — a budget-dropped item was never seen and must stay eligible. Per-session memory is capped (600 items) like the other session tables.
1670
- - **Why "once per session" is safe as the default:** the host session history is append-only — `agent-loop` has no compaction, and `agent/inbox/spliced` only touches the *pending* inbox. A re-send is therefore pure duplication. `autoContext.reinjectItemsAfter` (default `0`) exists for setups where history is trimmed outside the plugin: `N > 0` allows the same item again once `N` pre-steps have passed (it still has to change the block to be observable, since an identical block is already in history).
1671
- - **Regression:** two handler-level checks drive one session across steps and assert that a task-card advance no longer re-sends the procedure, that a fully unchanged step injects nothing at all, and that `reinjectItemsAfter: 2` re-injects on the third step; plus one schema check for the default. Suite 283 → **286** checks.
1668
+ - **整块去重会把旧条目再发一遍**:改为按会话记住已注入条目(id + 正文 hash),未变的不再进入预算调度。
1669
+ - 只记录真正进入消息的条目;编辑条目会立即重发;每会话上限 600 条。
1670
+ - **为什么默认「每会话一次」安全**:宿主历史只追加,重发是纯重复;`autoContext.reinjectItemsAfter`(默认 0)供外部裁剪历史的场景。
1672
1671
 
1673
1672
  ### Changed (the budget-drop audit is now opt-in — the user's terminal stays clean)
1674
1673
 
1675
- - **`auto-inject` no longer prints `degraded: … insights kept out by budget` unless the operator asks for it.** The line exists so a budget drop can never be *silent*, but the terminal is the **user's** surface, and a drop is **normal priority-based degradation, not a failure**: the resident task card and authored triggers take the 1200-char budget first, and lower-priority hints lose out. On a real host one `dsh web` start printed five such lines (four from a single busy project store, one global), which reads as "the plugin is broken" — exactly the first impression that gets a plugin uninstalled. New `autoContext.budgetLog` selects the level: `off` (**default**, never prints), `once` (at most one line per session, on the first drop), `all` (one line per changed dropped set — the previous behaviour). Accounting itself is unchanged in every mode: the per-session dedupe and the 200-session cap still run, so switching the log on later still reflects the current state. `README.md` / `README.zh-CN.md` document the key in both the `autoContext` row and the `cordis.patch.yml` example.
1676
- - **Regression:** the degraded check now drives two steps of one session (two different dropped sets) and asserts: silent by default, silent for `off`, ≥2 lines for `all`, exactly 1 line for `once`. Three schema checks were added as well — the *resolved default* is `off`, an explicit `budgetLog` survives `Config` and reaches the engine, and an unknown value is rejected — because the last config-default bug in this file was exactly this class (a key the engine reads but the schema does not declare). Suite 280 → **283** checks.
1674
+ - **预算丢弃日志默认关闭**:新增 `autoContext.budgetLog`(`off` 默认 / `once` / `all`),记账逻辑不变。
1677
1675
 
1678
1676
  ### Fixed (the silent-injection hint gate was dead in production)
1679
1677
 
1680
- - **A config schema default pinned the `legacy` hint gate on, making the shipped relative threshold dead code.** `autoContext.relevanceMin` carried `default(0.25)`, so `cfgEngine()` always saw a number and therefore always chose the legacy branch — `normalizedTokenOverlap >= 0.25`, the very judgement PR2 replaced because natural-language messages measure 0.014–0.057 against an insight and can never pass it. The documented default (`signalMinRatio: 0.5`, BM25 relative to the layer's top score) was unreachable in a real host, so only authored triggers could ever inject. The default is removed (the key remains, for explicitly opting back into the old behaviour), and `entryMaxInsights` / `signalMinRatio` / `editedMax` / `skipEchoSelfTodo` are now declared in the schema rather than being read by the engine but absent from it. The test suite could not catch this because every readiness test builds its config object by hand and never goes through `Config`.
1681
- - **Regression:** 4 new checks asserting that the *resolved default* config yields `relevanceMin: null` and `signalMinRatio: 0.5`, that an explicit `relevanceMin` still restores the legacy gate, and that the engine-only keys round-trip through the schema. Suite 276 → **280**.
1678
+ - **相对阈值在生产里是死代码**:`autoContext.relevanceMin` 的 schema 默认值把 `signalMinRatio: 0.5` 挡在门外;现移除默认值,并补齐只读未声明的键。
1682
1679
 
1683
1680
  ### Added (standalone benchmark — `scripts/bench.mjs`)
1684
1681
 
1685
- - **`npm run bench -- <projectPath>` measures the shipped index/query path on a real project, with no dsh instance, no network and no model calls.** It walks the project, builds its store in a temp directory (never the project's own `.dsh-project-memory`), and reports: cold index split into read+hash / extract / commit; cold load measured from a *copied* store (so the in-process store cache cannot fake it); IDF rebuild, cold and hot query latency through the real scorer (p50/p95/max over `--samples`, default 100); single-file hot re-index sampled **evenly across file sizes**; store size and bytes/entry; and whole-chunk `terms` versus the ≤300-char summary. Flags: `--json`, `--no-pdf`, `--keep`, `--max-files` (default 20000), `--queries <labeled-set.json>` (runs the hit@5 / hit@10 / MRR method on your own corpus).
1686
- - **The READMEs now point at it** (`Performance → Reproduce it on your own project`, plus the Development block) instead of asking readers to trust the tables. The labeled-set figures in Design tradeoff #4 are scoped to their internal corpus, with the method shipped; the docs also state the two caveats found while building it — `read+hash` is OS-page-cache sensitive, and real projects score slower than the synthetic corpus.
1687
- - **Retired the local-only harnesses it replaces** (`test/ablation*.mjs`, `test/doc-coverage*.mjs`, `test/gen-queries.mjs`, `test/simulate-agent.mjs`, `test/queries.json`) together with the dead `.gitignore` entries for them and for the August debug scaffolding.
1688
- - **The synthetic harness ships too.** `bench/microbench.mjs` moved to `scripts/bench-synthetic.mjs` (`npm run bench:synthetic -- 5000`), so the synthetic table is reproducible as well; `bench/` itself stays local-only.
1689
- - **Every published number re-measured on 2026-09-14** (Node 24.19): 5k-file cold index 269 ms avg (p50 267), cold load 40 ms, cached query over 20k entries p50 2.6 / p95 5.4 ms, hot single-file re-index p50 2.4 ms, 10k-file cold index 551 ms avg, cold load 90 ms, IDF rebuild 106 ms at 40k entries (57 ms at 20k, 12 ms at 4k), symbol scan 12.9–19.2 µs/file. Table captions now name the environment and the reproduce command; the real-project example quotes the warm-cache run and states the cold-cache first run (787 ms vs 253 ms) instead of hiding it. `README.md`, `README.zh-CN.md` and the local notes were updated together so no two documents quote different numbers.
1682
+ - **新增独立基准**:`npm run bench -- <projectPath>` 在真实项目上测冷索引、冷加载、查询、热重索引与体积,不需要 dsh / 网络 / 模型。
1683
+ - README 指向该脚本与复现命令,并写明页缓存敏感的已知口径。
1684
+ - 删除被它取代的本地 harness 脚本。
1685
+ - 合成基准移到 `scripts/bench-synthetic.mjs`。
1686
+ - 所有公开数字按 2026-09-14 重测,README 与环境、复现命令同步。
1690
1687
 
1691
1688
  ### Docs (README realigned with shipped behaviour)
1692
1689
 
1693
- - **`README.md` / `README.zh-CN.md` re-synced with the code.** Removed claims that documented superseded behaviour: the client-plugin contract version (0.1.2-rc.1 → **0.1.5-rc.1**, bumped in v0.5.3); the auto-created task title rule (v0.5.3 reversed it to **first todo entry → first human message**, and added the subagent exception); and the write path (`O(1) version bump` → only a **dirty** write bumps the version, so the 15 s watch poll cannot clear the IDF cache). `blindSpots` is now described as always empty rather than "empty for newly indexed documents"; the IDF-rebuild note carries its scale; `index_repo` / `watch_repo` document the missing-root guards. De-duplicated two feature bullets that restated each other (document `terms`; L1 regex vs. symbol memory). The Chinese README no longer claims multi-instance writes are safe — it now carries the same in-process-only lock caveat as the English one.
1694
- - **Two design-tradeoff entries corrected.** (a) "Subagent sessions never auto-create tasks" was stated as a feature; it is a deliberate non-goal, so it moved to a new tradeoff **§11 "Subagent sessions are out of scope for now"** ("not designed yet", with the cost stated) and the feature bullet now only points at it. (b) **§6 "Explicit `remember` over implicit learning" was factually wrong**: v0.5 ships `reflection-pipeline.js`, an opt-in LLM path that *does* infer lessons/decisions from the conversation on task switch-away/archive, and promotion runs automatically inside normal writes. §6 is now **"Model-facing memory: the agent writes, and no human has to be in the loop"** and states the actual policy: any scope writable by the agent at any time, promotion deterministic on `sourceTaskIds` corroboration (≥2 → project, ≥ `globalPromoteTasks` → global), and **`draft` described as a provenance label plus a corroboration threshold — not an approval queue** (a draft graduates on corroboration, which is intended; the panel is an optional inspection surface, not a step in the write path).
1690
+ - **README 与实现对齐**:修正客户端契约版本、任务标题规则、写入版本语义与 `blindSpots` 说明,中英文口径统一。
1691
+ - **设计取舍改正**:subagent 不建任务标为 §11 非目标;§6 改为「面向模型:agent 写入,无人工审批队列」。
1695
1692
 
1696
1693
  ### Fixed (console noise: watching the temp dir, PDF warnings, repeat failure logs)
1697
1694
 
1698
- - **The shared temp directory is no longer watchable.** `WatchManager.addRoot()`, `restorePersisted()` and `watch_repo` now refuse a root that is the filesystem root or `os.tmpdir()` (`isUnwatchableRoot()` in `src/util/fs.js`), and a persisted entry for one is self-healed out of the watchlist on the next start. This was the root cause of a real spam loop: reading any file directly under `/tmp` made `findProjectRoot` fall back to `/tmp` as the project root, `src/lazy.js` then auto-registered it as a watch root, and every 15 s poll re-indexed every file left under `/tmp` — including the test suite's deliberately broken `pm-pdf-*/big.pdf` fixtures, which printed `Invalid PDF structure` on every poll and re-created `/tmp/.dsh-project-memory` forever. Subdirectories of the temp dir (a project that genuinely lives there) still work.
1699
- - **pdf.js warnings are silenced** (`verbosity: 0` added to `PDFJS_OPTIONS`). `Warning: Indexing all PDF objects` is pdf.js's own recovery path for a broken or non-linearized PDF. It is not actionable from here, and a failed parse already reports its own error.
1700
- - **A permanently failing file is reported once, not every poll.** `watch` still retries a failed index every interval by design (so a file that gets fixed is picked up), but it now remembers the last reported error per file (`state.failures`) and stays quiet until the message changes or the file indexes successfully.
1701
- - **Tests:** suite 269 → **276** checks: a repeatedly failing file logs once, `watch_repo` / `addRoot` refuse the shared temp dir, the refusal is not persisted, `addRoot` refuses the filesystem root, and `restorePersisted` drops an unwatchable persisted root.
1695
+ - **共享临时目录不再可 watch**:根为文件系统根或 `os.tmpdir()` 一律拒绝,历史条目自愈剔除;临时目录的子目录仍可用。
1696
+ - pdf.js 告警静音(`verbosity: 0`)。
1697
+ - 永久失败的文件每个错误只报一次。
1702
1698
 
1703
1699
  ### Fixed (watch / save hot path)
1704
1700
 
1705
- - **A no-op `save()` no longer rewrites the store.** `commit()` always called `save()`, and `save()` ran `mkdirSync`, bumped `_version` and cleared the IDF cache even when nothing had changed. Since `watch` calls `commit()` for every watched root every 15 s, this (a) wiped the query-side IDF cache on every poll — cancelling the v0.3.4 IDF-reuse optimization whenever `watch` was on — and (b) **re-created the memory directory of any persisted watch root that no longer existed**, so a deleted root came back every 15 s. `save()` now returns before touching the disk unless something is dirty; stale `*.tmp` cleanup still runs unconditionally.
1706
- - **Dead watch roots are dropped instead of re-created.** `WatchManager.addRoot()` now refuses a root that does not exist, `restorePersisted()` removes such roots from the persisted watchlist on startup, and `watch_repo` rejects a non-existent root rather than persisting it.
1707
- - **Tests:** suite 231 → **235** checks. New: `no-op save() keeps the IDF cache` / `dirty save() invalidates the IDF cache`, plus `restorePersisted skips a root that no longer exists`, `a dead root is dropped from the persisted watchlist` and `addRoot refuses a non-existent root`.
1701
+ - **无变化的 `save()` 不再重写 store**:不 mkdir、不 bump 版本、不清 IDF 缓存;不存在的 watch 根不再被每次复活。
1702
+ - 失效 watch 根在启动时从持久清单删除。
1708
1703
 
1709
1704
  ### Fixed (Task Panel / 「隐藏提示信息」开关)
1710
1705
 
1711
- - **The hints toggle now hides every hover tooltip, not just two.** `showHints` was only wired to the step-edit hint and the drag-cancel button; the drag handle, panel-style / view-cycle / minimize / close buttons, card title rename hint, step status tooltip, file-path copy hint, mini-bar hint and the memory-view hints all ignored it — so clicking the button changed almost nothing. Every `title` hint in the panel now honours the switch (the toggle's own tooltip is kept so it stays discoverable).
1712
- - **The preference lives in the UI store and persists.** `showHints` moved from component-local state to `dsh-pm-task-panel-ui` (localStorage, default on), so it survives refreshes and remounts instead of silently resetting to “show”; the button dims and sets `aria-pressed` while hints are off, giving feedback without hovering.
1706
+ - **「隐藏提示信息」覆盖面板全部 tooltip**,状态存进 UI store,刷新后保留;关闭时按钮变暗并设 `aria-pressed`。
1713
1707
 
1714
1708
  ### Fixed (index_repo root validation)
1715
1709
 
1716
- - **`index_repo` no longer builds a store for a root that does not exist.** Both the tool and `autoIndexOnFirstUse` only ran `path.resolve()` first: on Linux/macOS a Windows-style path such as `D:\project\foo` resolved to the relative `<cwd>/D:\project\foo`, and the store's `mkdirSync` then created that literal directory together with its `.dsh-project-memory` (verified: `new ProjectMemoryStore(dir).load().commit(…)` creates every missing parent). `assertIndexRoot()` (`src/util/fs.js`) now rejects a missing or non-directory root before anything is written, and names the Windows-path case in the error message. `index_doc`'s file check and `watch_repo`'s `existsSync` guard are unchanged.
1717
- - **Tests:** `test/doc-index.test.mjs` gains 1 check (suite 7 → 8, total 237 → **238**): a missing root and a Windows-style path are both rejected with zero filesystem side effects.
1710
+ - **`index_repo` 拒绝不存在的根 / Windows 盘符路径**,在建目录前返回错误。
1718
1711
 
1719
1712
  ### Added (unified recall: the insight layer becomes searchable — PR1)
1720
1713
 
1721
- - **`query_memory` now searches insights.** `type: 'insight'` was added, and `type: 'all'` appends an `## Insights (lessons / decisions / procedures)` section. Before this, lessons/decisions/procedures had **no retrieval path at all**: `util/search.js` had no insight ranker and the tool's `type` enum had no insight value, so a lesson could only reach an agent through silent injection. Verified against this repository's own store: the "public face" lesson now returns at score 100 for a natural-language query.
1722
- - **New `src/recall.js` — one retrieval core, ranked per layer.** Every layer gets an adapter to the same entry contract (`title` / `keywords` / `summary` / `terms` / `sourcePath` — the shape `weightedFieldText` already scores), its own top-k, and a layer prior. Cross-layer order is only ever a *hint* (`flat`); it is never spliced into one score, because the doc/symbol streamer and the in-memory BM25 have different scales. `query_memory` routes doc / symbol / experience / insight through this single call, so the experience layer no longer carries its own scoring path inside the tool.
1723
- - **Scope visibility follows the session binding.** `project` / `global` insights are visible to every session; `task`-level insights only to a session bound to that task (`select_task`). Drafts stay out of recall. The v0.4 `experience.json` → `insights.json` migration shadow (`kind: 'experience'`, `source: 'migrate'`) is excluded from the insight layer so a note is not listed once as an insight and again as an experience — convergence the store's own comment had deferred to this PR.
1724
- - **Normative-heading prior.** A doc chunk whose heading matches the multilingual normative set (必须 / 禁止 / 铁律 / rules / must / must not / do not …) is boosted ×1.5 within the doc layer: deterministic, model-free, no new dependency. This is the "「必须遵守」never surfaced" case — `test/recall.test.mjs` first pins today's term-frequency ordering, then asserts the prior flips it.
1725
- - **Invariants held:** indexing still never calls a model (no index-time LLM), recall adds no LLM call (`llmQueryExpansion` remains opt-in, default off), and the plugin still has exactly one runtime dependency.
1726
- - **Tests:** new `test/recall.test.mjs` (8 checks); suite 238 → **246**.
1714
+ - **`query_memory` 支持 insight**(`type: 'insight'`,`all` 追加洞察段)。
1715
+ - **新增 `src/recall.js`**:同一召回核按层适配、各层 top-k 与先验,跨层顺序只作提示。
1716
+ - 任务级 insight 只对绑定会话可见;草稿不进召回;迁移影子条目去重。
1717
+ - 规范标题(必须 / 禁止 / rules / must …)在文档层 ×1.5。
1718
+ - 索引与召回都不新增模型调用。
1727
1719
 
1728
1720
  ### Added (readiness: triggers for every insight kind, two windows — PR2)
1729
1721
 
1730
- - **`trigger` is no longer procedure-only.** Any lesson / decision / procedure may carry `trigger: { keywords, symbols, actions, paths, scope }`. A hit injects the entry **before the action**, in full, at priority 1 — deterministic, auditable (`reasons[].why`), and independent of wording. `actions` are normalized ids (`git-commit`, `npm-publish`, `go-public`, …) matched by a small lexicon that also reads **human intent** ("提交 / 发包 / 公开"), so the block arrives while the model is still planning instead of after it acted.
1731
- - **Two windows, one matcher.** The pre-emptive window matches the turn's human text; the reactive window matches `tool/call` arguments observed through `session/event`. DSH has no pre-tool interceptor (`tool/call` is appended after the call is decided), so these are the only two honest windows — both feed one `ReadinessContext`.
1732
- - **The hint gate became scale-free.** It used to be `normalizedTokenOverlap(humanMessage, insight) >= 0.25`, normalized by the **larger** token set, so a real message measured 0.014–0.057 and could never fire. It is now the recall core's BM25 plus a **relative** threshold (`autoContext.signalMinRatio`, default `0.5` = at least half of the layer's top score), with zero-score candidates always dropped. The old judgement stays reachable only by explicitly setting `relevanceMin` (undocumented knob; profiles that set it keep the old behaviour).
1733
- - **Budget is a schedule, not a number.** Resident task card → trigger hits (full) → hints (truncated). Every decision is recorded as `reasons` (why injected) or `dropped` (why not), so silence is never the only signal. Procedures still inject **only** through the trigger channel, so a statistical hit cannot bypass `trigger.scope` profile filtering.
1722
+ - **trigger 不再只属于 procedure**:任何 kind 可带 `when`,命中时在下一次动作前全文注入。
1723
+ - 两个匹配窗口(人类消息 / 观察到的 tool/call)共用一套 `ReadinessContext`。
1724
+ - 提示阈值改为相对分数(`signalMinRatio` 0.5),旧 `relevanceMin` 仅显式设置时保留。
1725
+ - 预算按「常驻任务卡 → trigger → hint」调度,决策记进 `reasons` / `dropped`。
1734
1726
  - **Measured against this repository's own store:** the original commit-turn message ("…你顺便提交一下…") now injects the public-face lesson via `hint:relative:1.00`; reworded and relying on an observed `git commit`, only an authored `trigger.actions` reaches it (`trigger:action:git-commit`) — the two channels are complementary, not redundant.
1735
- - **Tests:** new `test/readiness.test.mjs` (10 checks); suite 246 → **256**.
1736
1727
 
1737
1728
  ### Added (write path + measurement: derived triggers, v1→v2, degraded, labeled eval — PR3)
1738
1729
 
1739
- - **Derived triggers are additive and never force-inject.** `deriveTrigger()` builds `{ keywords, actions, paths }` from an entry's own text with the same deterministic lexicon and path scanner the readiness matcher uses (bounded: ≤ 6 / ≤ 4 / ≤ 6), and stores it as `triggerDerived`. It only feeds the entry's search text, so it improves recall; whether an entry is injected **deterministically** is still decided solely by the authored `trigger`. This is the "explicit over implicit" trade-off carried through to injection.
1730
+ - **派生 trigger 只增强召回、不强制注入**;`triggerDerived` 不写正文。
1740
1731
  - **`insights.json` v1 → v2, lazily and idempotently.** On load, entries without `triggerDerived` are back-filled in memory (pure, model-free, no field rewriting); the next commit writes `version: 2`. A second pass is a no-op.
1741
1732
  - **The write path accepts the full trigger.** `normalizeInsight` no longer whitelists `keywords`/`symbols`/`scope` only — it keeps `actions` and `paths` too, and a trigger consisting *only* of `actions`/`paths` is no longer dropped. `save_lesson`'s schema exposes both, and its descriptions now say "any kind", not "procedure".
1742
1733
  - **Silence is not the only signal.** When the budget keeps entries out, `installAutoInject` logs one `degraded` record per session and drop-set (`… kept out by budget — id(reason), …`) instead of silently shrinking the injection.
@@ -1750,7 +1741,6 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1750
1741
  | 0.70 | 1.00 | 1.00 |
1751
1742
 
1752
1743
  The shipped default sits in the safe zone with margin, and 0.20 visibly admits weak matches — so the number is justified by data rather than chosen by feel. The table is the **9-case** set measured after the hint-precision fix below (the `0.20` figure was 0.86 on the earlier 8-case set; adding "缩写巧合(PR)不得命中" turns one more row into a genuine weak match, `7/9 = 0.78`). It lives under `test/` (CI-enforced, shipped) rather than the git-ignored `bench/`, deliberately: a threshold that only exists on one machine is not a threshold.
1753
- - **Tests:** new `test/insight-derive.test.mjs` (6 checks) and `test/readiness-eval.test.mjs` (4 checks, including the sweep table); suite 256 → **266**.
1754
1744
 
1755
1745
  ### Fixed (readiness hint precision: query source, acronym noise, stub truncation)
1756
1746
 
@@ -1758,7 +1748,6 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1758
1748
  - **A 1–2 character latin token is no longer hint evidence.** Measured on this repository's own store, the message "PR 干嘛…" put an unrelated "automatic security PR" lesson at the top of the insight layer on the strength of the acronym `PR` alone, i.e. `relative:1.00`. `hintQueryText()` drops *standalone* 1–2 character latin tokens; path-shaped tokens are preserved so `src/util/fs.js` still contributes `src`/`util`. Authored triggers are untouched: deterministic matching stays literal.
1759
1749
  - **No stub truncations.** A body that cannot fit its channel's useful minimum (trigger 48 chars, hint 120 chars) is dropped and recorded instead of emitting `- [ins_…] procedure ` — a fragment that costs tokens and conveys nothing.
1760
1750
  - **Eval set grew to 9 cases** (added "缩写巧合(PR)不得命中"). The shipped `signalMinRatio 0.5` still scores `precision 1.00 / recall 1.00`; the `0.20` column now shows two *genuine* weak matches (`h-weak`, and `a-pr` on 检查), which is precisely the evidence that 0.5 — not 0.2 — is the right shipped point. Measured after the fix on the real store, the same message yields `[trigger:重启, hint:提交]` instead of `[trigger:重启, hint:PR, hint:提交]`.
1761
- - **Tests:** `test/readiness.test.mjs` 10 → 13 checks; suite 266 → **269**.
1762
1751
 
1763
1752
  ## 0.5.4 (2026-09-12)
1764
1753
 
@@ -1771,14 +1760,12 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1771
1760
  - **Existing stores are back-filled automatically.** `index_repo`, `watch` and `lazy` treat a doc record whose entries lack `terms` as needing re-extraction even when the content hash is unchanged (`docEntriesNeedBackfill`), so the coverage fix reaches stores indexed before 0.5.4 without a manual `reindex: true`. It is a one-shot pass: once entries carry `terms`, the hash skip resumes.
1772
1761
  - **Rule-based keywords** (`extractKeywords`: title-weighted top terms) replace the previous placeholder 5–10 keywords, so `keywords` is deterministic and reproducible. Bilingual keyword expansion and self-reported blind spots are intentionally **not** produced at index time: the `blindSpots` field and its rendering are retained for compatibility, but new entries leave it empty.
1773
1762
  - **Recall-time opt-in LLM is routed explicitly and visibly.** `config.llmQueryExpansion` (default off) and `reflection.enabled` (default off) are the only remaining model calls, and both are recall-time and opt-in. They resolve `provider`/`model` through `src/llm-route.js` (config override → session `requestHeader().config` → agent options → last-seen `request/header` route). When no route is available or a call fails, search falls back explicitly and records a one-time `degraded` entry rather than failing silently.
1774
- - **Tests:** `test/doc-index.test.mjs` (new) pins summary ≤300 / terms covering past char 300 / BM25 hitting a post-300 term / zero model calls at index time even with a routed `exec` / deterministic bounded `extractTerms` / the automatic back-fill. `test/llm-route.test.mjs` covers the recall-time routing contract. `test/run-test.mjs` asserts watch indexing makes **zero** model calls and that doc entries are structural.
1775
1763
 
1776
1764
  ### Changed (injection semantics + signals)
1777
1765
 
1778
1766
  - **The injected block now declares `form: 'snapshot'`, not `'notice'`.** The autocontext block is current state that a later injection supersedes; `notice` means "a one-off account of something that just happened", so the old declaration was semantically wrong for both the transcript UI and the model. The channel is untouched (still appended through `agent/pre-step` as a plugin `user/message`). The host's `ContextFormed` is a discriminated union (`packages/llm/llm/src/message.ts:81-96`), so `snapshot` carries `sections: [{ name, text }]` and must **not** carry `notice`'s `summary`; the section is named `project-memory` and its `text` is exactly the assembled block.
1779
1767
  - **Per-file `reads` / `writes` counters are now collected.** `task.fileMeta[rel]` gained `reads` and `writes` alongside the retained `n` (which stays the read+write total for old tasks). This is **collect-only**: `hotSortFiles`, the resident "editing now" list and the dedupe fingerprint still read only `lastWriteAt` / `lastReadAt`, so no ordering or injection behaviour changes. It starts collecting the one signal a full-index memory plugin cannot observe — what the model actually read.
1780
1768
  - **`query_memory` memory rows carry a status placeholder.** Each doc/symbol row now prints `- status: <value>`, defaulting to `exact` for every entry (the vocabulary is `exact | needs-verify | re-verified | refreshed | demoted`). No state machine is implemented yet; this is a forward-compatible output contract so real values can land later without changing the rendering again.
1781
- - **Tests:** suite 227 → **231** checks. `test/host-contract.test.mjs` now drives a real injection and pins the source shape (`form: 'snapshot'`, `sections[0].name`, no `summary`); `test/taskbridge.test.mjs` pins `reads`/`writes`/`n`; `test/run-test.mjs` pins the `status` placeholder on doc and symbol rows.
1782
1769
 
1783
1770
  ### Files
1784
1771
  - src/doc-index.js (new), src/doc-pipeline.js, src/llm.js, src/llm-route.js (new), src/util/text.js, src/util/search.js, src/link.js, src/index.js, src/watch.js, src/lazy.js, src/reflection-pipeline.js, src/auto-inject.js, src/setup/taskbridge.js, src/tools/index-doc.js, src/tools/index-repo.js, src/tools/query-memory.js, src/tools/task-tools.js, src/commands/task-actions.js, test/doc-index.test.mjs (new), test/llm-route.test.mjs, test/host-contract.test.mjs, test/taskbridge.test.mjs, test/run-test.mjs, test/reflection-pipeline.test.mjs, package.json, CHANGELOG.md
@@ -1865,7 +1852,6 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1865
1852
  ### Files
1866
1853
  - src/similarity.js, src/insight-store.js, src/global-seed.js, src/types.js, src/tools/lesson-tools.js, src/reflection-pipeline.js, src/auto-inject.js, src/project-profile.js, src/commands/insight-actions.js, src/client/MemoryView.tsx
1867
1854
  - Changed: src/store.js, src/index.js, src/tools/task-tools.js, src/commands/tasks.js, src/commands/task-actions.js, src/client/{TaskPanel,TaskComponents,task-data-store,locales}.ts(x), TaskPanel.module.css, package.json
1868
- - Tests: insight-store 11 / reflection-pipeline 5 / auto-inject 9 / insight-actions 7 (total 209, exit 0)
1869
1855
 
1870
1856
  ### Notes
1871
1857
  - Design rationale, deviations (non-destructive migration; reflection triggers subset; auto-inject host verification) and the live-verification checklist live in the internal design notes.
@@ -1933,8 +1919,6 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
1933
1919
  - TaskBridge 测试增至 11 项(新增反向接管、空写语义等);既有 166 项全绿
1934
1920
  - 清理:移除废弃 client 包依赖与死代码,样式收敛到 dsw token
1935
1921
 
1936
-
1937
-
1938
1922
  ## 0.4.1 (2026-09-03)
1939
1923
 
1940
1924
  ### TS 6.x 兼容
@@ -2129,4 +2113,4 @@ git 会读取工作区里任意目录下的 `.gitignore`,`*` 连这个文件
2129
2113
  - 初始版本:文档(PDF/Markdown/txt)与代码符号的持久化项目记忆
2130
2114
  - 读取时索引(lazy indexing)、增量刷新、watch 后台保鲜
2131
2115
  - BM25 检索(含 CJK 查询扩展)与经验笔记(remember/forget)
2132
- - dump 反射转储自动过滤、并发写串行化
2116
+ - dump 反射转储自动过滤、并发写串行化