dsh-agent-soul 0.9.9 → 0.9.10

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
@@ -7,6 +7,36 @@
7
7
 
8
8
  ---
9
9
 
10
+ ## 0.9.10 · 2026-11-09
11
+
12
+ 外部复检轮 **R15(重构轮)**,3 个提交 / 13 文件 / +451 −137。**对外行为零变化**,
13
+ 四道门禁(lint / 87 测试 / 11 契约 / bundle 零 diff)全绿;特征测试先于拆分提交,拆分后一条未改。
14
+
15
+ ### 重构
16
+
17
+ - **`segment-memory.js` 的 `text()` 拆分**(#28):~150 行的编排降为 ~35 行调度 + 三个**文件私有**函数
18
+ (`collectDiaryMaterial` / `memoryBudgetPlan` / `computeRecallText`)。无新增导出,契约零变化。
19
+ 分开的五条路径(首轮整卡 / 关召回老路 / 退化 query / 粘性复用 / 按句召回)与粘性读写位置逐个比对一致,
20
+ 所有事故注释随代码搬到对应函数。
21
+
22
+ ### 修复
23
+
24
+ - **preview.html 的 CSS 已经漂移了**(#35):手工抄的那份还停在 `.soul-legend`,`styles.js` 早已是
25
+ `.soul-banner` —— 也就是说预览页一直是错的,只是没人比对过。现在同步 + 新增
26
+ `tests/preview-css.test.js` 逐字符比对(塞一个空格就红)。
27
+ - **构建会静默吞掉未登记的片段**(#32):`lib/client/` 下不在 `ORDER` 里的文件不报错、拼不进 bundle、
28
+ 页签一片空白。现在反向扫描,未登记直接构建失败并列出文件名;`DECL_RE` 同时放宽到 `let/const`
29
+ (原来顶层 `let/const` 逃过跨片段重名检查)。
30
+
31
+ ### 变更
32
+
33
+ - **`revOf` 三处逐字重复收敛到 `memory/constants.js`**(#33):快照 `+revOf`,理由已入 `SNAPSHOT_CHANGES.md`。
34
+ - `summarizeConversations` 标注废弃(#34,主流程已不用,`tests/diary.test.js` 仍经门面在测)。
35
+ **更正一处文档错误**:`askAgentToWrite` 的 `force` 参数**不是**死代码 ——
36
+ `regenerateDiary` 确实传 `{ force: true }`,手动重写在用。
37
+
38
+ ---
39
+
10
40
  ## 0.9.9 · 2026-11-09
11
41
 
12
42
  外部复检轮 **R14**(按 `docs/HANDOFF.md` §8 只交付不发布),本会话逐条复核后合并发布。
package/docs/HANDOFF.md CHANGED
@@ -1,7 +1,7 @@
1
- # 交接文档 · dsh-agent-soul `0.9.9`
1
+ # 交接文档 · dsh-agent-soul `0.9.10`
2
2
 
3
3
  > 给接手的人(或 AI)。读完这一份就能开工,不需要翻聊天记录。
4
- > 写作时间:2026-11-08(0.9.9 于 2026-11-09 更新)· 对应提交 `1b51d58` · tag `v0.9.9` · npm `latest = 0.9.9`
4
+ > 写作时间:2026-11-08(0.9.10 于 2026-11-09 更新)· tag `v0.9.10` · npm `latest = 0.9.10`
5
5
 
6
6
  ---
7
7
 
@@ -33,7 +33,7 @@
33
33
 
34
34
  | 指标 | 数值 |
35
35
  |---|---|
36
- | 测试 | **85** 个测试文件 / 0 失败;契约 **11** / 0 |
36
+ | 测试 | **87** 个测试文件 / 0 失败;契约 **11** / 0 |
37
37
  | 代码量 | `lib/` 97 个文件 / ~19.9k 行 |
38
38
  | 运行时依赖 | **零**(`dependencies` 为空,刻意如此) |
39
39
  | 支持 | Node ≥ 22.19;CI 跑 Node 22 + 24 + Windows |
@@ -191,11 +191,11 @@ git switch -c fix/your-topic main # 从干净 main 拉
191
191
 
192
192
  ---
193
193
 
194
- ## 5. 当前遗留(8 条,全部是「结构」而非「功能」)
194
+ ## 5. 当前遗留(3 条)
195
195
 
196
196
  > 完整版在 [`docs/KNOWN-ISSUES.md`](KNOWN-ISSUES.md),每条带代码位置、影响、建议改法、验证程度(A 实测 / B 读代码 / C 仅归档)。
197
197
  >
198
- > **`0.9.9` 之后,「某个功能坏了」类的已知问题已经清零。** 剩下的只有一类:**代码结构**。
198
+ > **`0.9.10` 之后,「功能坏了」和「零散清理」类问题**全部清零**。** 只剩两条大文件重构 + 一条受宿主限制的。
199
199
 
200
200
  ### 唯一的「用户能感觉到」的一条
201
201
 
@@ -203,17 +203,16 @@ git switch -c fix/your-topic main # 从干净 main 拉
203
203
  |---|---|---|---|
204
204
  | **23** | 「错误边界」接不住**渲染期**异常 → 白屏 | `lib/client/app.js` | 需要 `React.Component` 基类;本 bundle 作用域里没有,**做不了**,只能等宿主暴露 |
205
205
 
206
- ### 可维护性(7 条,改起来有风险、但改了不解决用户问题)
206
+ ### 大文件重构(2 条,有依赖顺序,别反过来)
207
207
 
208
208
  | # | 问题 | 建议 |
209
209
  |---|---|---|
210
- | **26** | `diary/scheduler.js` 687 行混五种职责 | 拆 `diary/agent.js` + `diary/deliver.js` |
211
- | **27** | `diary/compose.js` 591 行四类职责,`composeDiarySetup` 放错位置 | 移到 `scheduler` 或 `diary/agent.js` |
212
- | **28** | `segment-memory.js` 的 `text()` ~150 行、8 种职责的上帝函数 | 拆 `runToneForTurn` / `collectDiaryMaterial` / `computeRecallText` / `applyBudget` |
213
- | **32** | `build-client.mjs` 的 `ORDER` 硬编码;`DECL_RE` 只认 4 空格的 `var/function` | 自动扫描片段 + 放宽正则(`let/const` 现在逃检) |
214
- | **33** | `revOf` 三处重复、`pad2`/`dateKeyOf` 同构重复、测试断言工具复制 40+ 份 | 收敛到 `constants.js` 与 `tests/helpers/` |
215
- | **34** | `summarizeConversations` 死代码仍从门面导出;`askAgentToWrite` 的 `force` 参数恒 false | 删掉或标注 |
216
- | **35** | `docs/preview.html` 手抄 `styles.js` 整套 CSS | 生成或加一致性检查 |
210
+ | **27** | `diary/compose.js` 591 行四类职责,`composeDiarySetup` 放错位置 | 先把 `composeDiarySetup` 移回 `scheduler` 或新建 `diary/agent.js`,再按职责切四块 |
211
+ | **26** | `diary/scheduler.js` 687 行混五种职责 | 拆 `diary/agent.js` + `diary/deliver.js`。**必须最后做**:它依赖 #27 的产物 |
212
+
213
+ > 已清掉的:#28(`text()` 拆成三个私有函数)、#32(构建拒绝未登记片段)、
214
+ > #33(`revOf` 收敛)、#34(死代码标注;并更正了「`force` 恒 false」这个**我方文档错误** ——
215
+ > `regenerateDiary` 实际传了 `{ force: true }`)、#35(preview CSS 已漂移,现为逐字符门禁)。
217
216
 
218
217
  ### 明确「不修」的(想清楚了,别捡起来)
219
218
 
@@ -234,19 +233,21 @@ git switch -c fix/your-topic main # 从干净 main 拉
234
233
 
235
234
  ## 6. 建议的下一轮顺序(0.9.9 后)
236
235
 
237
- **功能类问题已清零**,剩下的都是重构。顺序建议:
236
+ **功能类与清理类问题已清零**,只剩两条大文件重构。顺序是硬约束(先 #27 后 #26):
238
237
 
239
- 1. **`#28 segment-memory.js` 的 `text()`** —— 8 种职责、~150 行。它是最难单测的一块,
240
- 先补特征测试再拆;拆成 `runToneForTurn` / `collectDiaryMaterial` / `computeRecallText` / `applyBudget`。
241
- 2. **`#27 diary/compose.js`** —— 591 行四职责,`composeDiarySetup` 放错位置,移到 `scheduler` 或 `diary/agent.js`。
242
- 3. **`#26 diary/scheduler.js`** —— 687 行五职责,拆 `diary/agent.js` + `diary/deliver.js`。
243
- **必须放最后**:它依赖前两步的产物,先拆它会把 compose 的边界搞得更乱。
244
- 4. **`#32–#35`(零风险清理)** —— 构建脚本硬编码、重复实现、死代码、预览页 CSS。
245
- 可以和上面同轮做,也可以单独一次提交。
246
- 5. **`#23`** —— 除非宿主文档明确暴露了 `React.Component`,否则不要动。
238
+ 1. **`#27 diary/compose.js`(591 行四职责)** —— 先把 `composeDiarySetup` 移到 `scheduler`
239
+ 或新建的 `diary/agent.js`,再按职责切四块。
240
+ 2. **`#26 diary/scheduler.js`(687 行五职责)** —— 拆 `diary/agent.js` + `diary/deliver.js`。
241
+ **必须放最后**:它依赖 #27 的产物,先拆它会把 compose 的边界搞得更乱。
242
+ 3. **`#23`** —— 除非宿主文档明确暴露了 `React.Component`,否则不要动。
247
243
 
248
- > 重构的纪律:**每一轮只拆一个文件**,拆之前先把该文件的特征测试补齐(断言当前行为,而不是理想行为),
249
- > 拆完测试必须一条不改就全绿。做不到就说明拆错了。
244
+ > 重构的纪律(R15 已验证有效,照抄):
245
+ > **先补特征测试钉住当下行为 → 再拆 → 特征测试一条不改必须全绿 → 毒化一次证明测试网有效。**
246
+ >
247
+ > R15 的两个实践细节值得学:
248
+ > ① 特征测试**单独一个提交**、并且要在**拆分之前**就在旧代码上全绿 —— 否则它可能断言的是实现;
249
+ > ② 毒化点要选对:R15 第一版选了「粘性复用分支」,但召回是确定性的、重算结果字节相同 → 不会红,
250
+ > 换到「回声头」才红。**毒化不红时,先怀疑毒化点选错了,别急着怀疑测试无效。**
250
251
 
251
252
  ---
252
253
 
@@ -1,11 +1,16 @@
1
- # 已知问题清单(截至 0.9.9;R13 划掉 23 条,R14 再划 4 条)
1
+ # 已知问题清单(截至 0.9.10;R13 划 23 条、R14 划 4 条、R15 划 5 条)
2
2
 
3
3
  > 2026-11-08 R13 轮:~~划线~~ 条目已修,测试锚定在 `tests/r13-batch.test.js`(36 断言),
4
4
  > 修法见提交历史(fix/known-issues-r13 分支 R13 批次一~五)。
5
5
  >
6
6
  > **2026-11-09 R14 轮(0.9.9)**:又划掉 **#2 #15 #20 #21** 四条,测试锚定在
7
7
  > `tests/r14-notes-redact-sessions.test.js`(13 断言),四条均经发布方毒化复核为红。
8
- > **仍打开:#23 #26–#28 #32–#35 与第五、六节。**
8
+ >
9
+ > **2026-11-09 R15 轮(0.9.10,重构)**:划掉 **#28 #32 #33 #34 #35**。
10
+ > #28 的 `text()` 拆成三个文件私有函数(无新导出,契约只多了 #33 的 `revOf`);
11
+ > 特征测试 `tests/r15-segment-feature.test.js`(13 断言)**先于拆分提交**,拆分后一条不改全绿。
12
+ > #35 是**真问题**:preview 的 CSS 确实已经漂移到旧类名,现在是逐字符比对的硬门禁。
13
+ > **仍打开:#23 #26 #27 与第五、六节。**
9
14
  >
10
15
  > **2026-11-08 复核补丁(0.9.8)**:R13 的 #1(`/diary/list` 只读头部 400 字节)按字节切 UTF-8,
11
16
  > 中文预览末尾会出现 `�`(U+FFFD)—— 400 % 3 ≠ 0,边界必然落在汉字中间。
@@ -77,14 +82,14 @@
77
82
  |---|---|---|---|
78
83
  | 26 | `diary/scheduler.js` 687 行混五种职责 | 改一处要读整文件 | 拆 `diary/agent.js` + `diary/deliver.js` |
79
84
  | 27 | `diary/compose.js` 591 行四类职责,`composeDiarySetup` 放错位置 | 同上 | 移到 `scheduler` 或 `diary/agent.js` |
80
- | 28 | `host/runtime/segment-memory.js` 的 `text()` 约 150 行、8 种职责的上帝函数 | 难以单测 | 拆 `runToneForTurn` / `collectDiaryMaterial` / `computeRecallText` / `applyBudget` |
85
+ | ~~28~~ ✅已修(2026-11-08 R15) | `host/runtime/segment-memory.js` 的 `text()` 约 150 行、8 种职责的上帝函数 | 难以单测 | 拆 `collectDiaryMaterial` / `memoryBudgetPlan` / `computeRecallText`(均文件私有,无新导出) |
81
86
  | ~~29~~ ✅已修(2026-11-08 R13) | `index.js` 顶部注释的注入顺序漏了 `soul:data-policy` | 文档与代码漂移 | 补一句 |
82
87
  | ~~30~~ ✅已修(2026-11-08 R13) | `extract` 游标对「无 id 会话」统一用 `'default'` 键 | 两个会话互吃扫描窗口 | 用会话对象身份做键 |
83
88
  | ~~31~~ ✅已修(2026-11-08 R13) | `TITLE_CACHE` / `PATH_CACHE` 全仓库唯一无上限缓存 | 长跑内存缓慢增长 | 用 `trimMap` 限一下 |
84
- | 32 | `build-client.mjs` 的 `ORDER` 硬编码;符号扫描 `DECL_RE` 只认 4 空格的 `var/function` | 新增片段漏登记会静默丢失;`let/const` 逃检 | 自动扫描 + 放宽正则 |
85
- | 33 | `revOf` 三处逐字重复;`pad2`/`dateKeyOf` 同构重复;测试断言工具在 40+ 文件逐份复制 | 改一处要改 N 处 | 收敛到 `constants.js` 与 `tests/helpers/assert.mjs` |
86
- | 34 | `summarizeConversations` 成死代码仍从门面导出;`askAgentToWrite` 的 `force` 参数恒 false | 误导读者 | 删掉或标注 |
87
- | 35 | `docs/preview.html` 手工复制 `styles.js` 整套 CSS | 改样式后预览过期 | 生成或加一致性检查 |
89
+ | ~~32~~ ✅已修(2026-11-08 R15) | `build-client.mjs` 的 `ORDER` 硬编码;符号扫描 `DECL_RE` 只认 4 空格的 `var/function` | 新增片段漏登记会静默丢失;`let/const` 逃检 | 构建反向扫描 + 未登记即失败;`DECL_RE` 放宽到 `let/const` |
90
+ | ~~33~~ ✅已修(2026-11-08 R15) | `revOf` 三处逐字重复(`card.js`/`card-io.js`/`state/cards.js`) | 改一处要改 N 处 | 收敛到 `memory/constants.js` 单份导出(快照 +revOf,已入档) |
91
+ | ~~34~~ ✅已处理(2026-11-08 R15) | `summarizeConversations` 主流程已不用 | 误导读者 | docblock 标注 ⚠️ 废弃(测试迁移后连门面导出一起删)。**更正**:`force` 参数**不是**死代码 —— `regenerateDiary` 传 `{ force: true }`,手动重写在用 |
92
+ | ~~35~~ ✅已修(2026-11-08 R15) | `docs/preview.html` 手工复制 `styles.js` 整套 CSS | 改样式后预览过期 | 已实测漂移(`.soul-legend` vs `.soul-banner`);同步 + 新增 `tests/preview-css.test.js` 逐字符比对 |
88
93
 
89
94
  ---
90
95
 
@@ -107,18 +112,21 @@
107
112
 
108
113
  ---
109
114
 
110
- ## 七、建议的下一轮顺序(0.9.9 后更新)
115
+ ## 七、建议的下一轮顺序(0.9.10 后更新)
116
+
117
+ 只剩两条,且都是「大文件」重构,按依赖顺序:
111
118
 
112
- 前四批(一致性 / 日志请求层 / 性能 / 前端里的多数)已在 R13、R14 清完。剩下的是:
119
+ 1. **#27 `diary/compose.js`(591 行四职责)** —— 先把 `composeDiarySetup` 移回 `scheduler` 或新建
120
+ `diary/agent.js`,再按职责切四块。
121
+ 2. **#26 `diary/scheduler.js`(687 行五职责)** —— **必须最后做**:它依赖前一步的产物,
122
+ 先拆它会把 compose 的边界搞得更乱。
123
+ 3. **#23(渲染期白屏)** —— 除非宿主文档明确暴露了 `React.Component`,否则不要动。
113
124
 
114
- 1. **重构:#26–#28**(三个大文件)—— **单独一轮**,先补特征测试再拆。这是当前最大的一块技术债,
115
- 也是后面所有改动的摩擦来源。建议顺序:`segment-memory.js` 的 `text()` → `diary/compose.js` → `diary/scheduler.js`。
116
- 2. **#32–#35**(构建脚本硬编码、重复实现、死代码、预览页 CSS)—— 零风险清理,可以和重构同轮做。
117
- 3. **#23**(渲染期白屏)—— 除非宿主文档明确暴露了 `React.Component`,否则不要动。
118
- 4. **第五节「不修」的 3 类** —— 保持不修,理由已写。
125
+ 重构纪律(R15 已验证有效,照抄):**先补特征测试钉住当下行为 → 再拆 → 特征测试一条不改必须全绿 →
126
+ 毒化一次证明测试网有效**。R15 的 13 条特征断言就是这么用的。
119
127
 
120
- > 这一轮之后,**「某个功能坏了」类的已知问题已经清零**,剩下的都是「代码结构不好」和
121
- > 「特定部署形态下才成立」的差异。换句话说:功能面可以放心用,改造成本才是接下来要还的账。
128
+ > 这一轮之后,**功能类与清理类已知问题全部清零**。剩下的两条是纯重构,
129
+ > 风险已经从「用户会踩到」变成「改的人会踩到」。
122
130
 
123
131
  ---
124
132
 
package/docs/preview.html CHANGED
@@ -75,17 +75,6 @@ border:1px solid var(--soul-line);border-radius:14px;overflow:hidden;background:
75
75
  .soul-err{margin:0;padding:6px 0;font-size:12px;color:var(--soul-err)}
76
76
  .soul-pill{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid var(--soul-line-soft);color:var(--soul-muted);white-space:nowrap}
77
77
  .soul-hint{font-size:11px;color:var(--soul-faint)}
78
- .soul-legend{display:flex;gap:9px;align-items:flex-start;padding:8px 0;border-bottom:.5px solid var(--soul-line-soft)}
79
- .soul-legend:last-child{border-bottom:none}
80
- .soul-lv{flex:0 0 auto;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:600;background:rgba(127,127,127,.14);color:var(--soul-muted);margin-top:1px}
81
- .soul-legend.on .soul-lv{background:var(--soul-brand);color:#fff}
82
- .soul-legend-body{flex:1 1 auto;min-width:0}
83
- .soul-legend-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12.5px}
84
- .soul-path{margin-top:2px;font-size:11px;line-height:15px;color:var(--soul-faint);word-break:break-all;font-family:var(--dsw-font-family-mono,ui-monospace,Menlo,monospace)}
85
- .soul-warn-box{margin-top:9px;padding:8px 10px;border:1px solid rgba(255,176,32,.45);border-radius:8px;background:rgba(255,176,32,.10);font-size:11.5px;line-height:17px;color:var(--soul-warn)}
86
- .soul-btn:disabled{opacity:.45;cursor:not-allowed}
87
- .soul-priority{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--soul-faint)}
88
- .soul-section-title{font-size:14px;font-weight:600;margin:0}
89
78
  .soul-banner{border:1px solid var(--soul-line-soft);border-radius:9px;padding:8px 11px;background:rgba(127,127,127,.05)}
90
79
  .soul-banner-line{display:flex;gap:10px;padding:3px 0;font-size:12px;align-items:flex-start}
91
80
  .soul-banner-key{flex:0 0 92px;color:var(--soul-faint);white-space:nowrap}
@@ -110,6 +99,33 @@ border:1px solid var(--soul-line);border-radius:14px;overflow:hidden;background:
110
99
  .soul-row-label{flex:0 0 52px;font-size:12px;color:var(--soul-faint);white-space:nowrap}
111
100
  .soul-filebar{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid var(--soul-line-soft);border-radius:8px;background:rgba(127,127,127,.04);font-size:11.5px;color:var(--soul-faint);flex-wrap:wrap}
112
101
  .soul-filebar-path{flex:1 1 auto;min-width:0;word-break:break-all;font-family:var(--dsw-font-family-mono,ui-monospace,Menlo,monospace);color:var(--soul-muted)}
102
+ .soul-section-title{font-size:14px;font-weight:600;margin:0}
103
+ .soul-legend{display:flex;gap:9px;align-items:flex-start;padding:8px 0;border-bottom:.5px solid var(--soul-line-soft)}
104
+ .soul-legend:last-child{border-bottom:none}
105
+ .soul-lv{flex:0 0 auto;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:600;background:rgba(127,127,127,.14);color:var(--soul-muted);margin-top:1px}
106
+ .soul-legend.on .soul-lv{background:var(--soul-brand);color:#fff}
107
+ .soul-legend-body{flex:1 1 auto;min-width:0}
108
+ .soul-legend-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12.5px}
109
+ .soul-path{margin-top:2px;font-size:11px;line-height:15px;color:var(--soul-faint);word-break:break-all;font-family:var(--dsw-font-family-mono,ui-monospace,Menlo,monospace)}
110
+ .soul-warn-box{margin-top:9px;padding:8px 10px;border:1px solid rgba(255,176,32,.45);border-radius:8px;background:rgba(255,176,32,.10);font-size:11.5px;line-height:17px;color:var(--soul-warn)}
111
+ .soul-btn:disabled{opacity:.45;cursor:not-allowed}
112
+ .soul-priority{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--soul-faint)}
113
+ .soul-mood-hero{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
114
+ .soul-mood-face img{width:104px;height:82px;object-fit:contain;border-radius:10px;background:rgba(127,127,127,.10);display:block}
115
+ .soul-mood-num{font-size:34px;font-weight:650;line-height:1;letter-spacing:-.02em}
116
+ .soul-mood-label{font-size:13px;color:var(--soul-muted);margin-top:3px}
117
+ .soul-mood-reason{flex:1 1 220px;min-width:0;font-size:12px;line-height:18px;color:var(--soul-muted);border-left:2px solid var(--soul-line);padding-left:10px}
118
+ .soul-dim{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:12px}
119
+ .soul-dim-name{flex:0 0 46px;color:var(--soul-faint)}
120
+ .soul-dim-val{flex:0 0 30px;text-align:right;color:var(--soul-muted)}
121
+ .soul-tl{display:flex;flex-direction:column;gap:0;max-height:320px;overflow:auto}
122
+ .soul-tl-item{display:flex;gap:9px;padding:8px 2px;border-bottom:.5px solid var(--soul-line-soft);font-size:11.5px;line-height:17px}
123
+ .soul-tl-item:last-child{border-bottom:none}
124
+ .soul-tl-time{flex:0 0 88px;color:var(--soul-faint);white-space:nowrap}
125
+ .soul-tl-delta{flex:0 0 40px;text-align:right;font-weight:600}
126
+ .soul-tl-delta.up{color:#c0392b}
127
+ .soul-tl-delta.down{color:#2f6b46}
128
+ .soul-tl-body{flex:1 1 auto;min-width:0;color:var(--soul-muted);word-break:break-word}
113
129
  @supports not (color:var(--dsw-alias-label-primary)){.soul-app{--soul-fg:#241f18;--soul-muted:#6f6558;--soul-faint:#9a9084;--soul-line:#e0d7c8;--soul-line-soft:#ece5d8;--soul-bg:#fffdf8;--soul-bg2:#f6f2ea;--soul-brand:#1f6feb;--soul-ok:#2f6b46;--soul-warn:#8a6a2f;--soul-err:#a83a2c}}
114
130
  </style>
115
131
  </head>
@@ -40,6 +40,11 @@ function describeFinishReason(reason) {
40
40
  /**
41
41
  * 把当天对话全文压缩成摘要。
42
42
  *
43
+ * ⚠️ 已废弃(2026-11-09 KNOWN-ISSUES #34):日记主流程不再走它(scheduler.js
44
+ * 现在直接用 composeDiaryText 组装),导出只为兼容旧调用方/测试
45
+ * (tests/diary.test.js 仍在测它)。新代码**不要**调用;等测试迁移后连门面
46
+ * 导出一起删。
47
+ *
43
48
  * 跟 mood.js 的 judgeMood 同款模式:流式调用 + 超时保护。
44
49
  * 失败返回 null,调用方用原始对话兜底(截断后直接塞进 prompt)。
45
50
  *