Commit fd7c058
authored
## Summary
Filter out system-injected prompts and sentinel replies that were
leaking into long-term memory:
- **Sentinel replies** (`NO_REPLY`, `HEARTBEAT_OK`, `HEARTBEAT_CHECK`)
are now skipped in `captureMessages()` for all roles
- **Boot-check prompts** (e.g. "You are running a boot check", "##
Memory system — ACTION REQUIRED") are filtered before storage
- **`stripMemoryInjection()`** expanded with additional patterns for
boot-check text and standalone sentinel values in user messages
## 修复说明
过滤掉泄露到长期记忆中的系统注入提示和哨兵回复:
- 哨兵回复(`NO_REPLY`、`HEARTBEAT_OK`、`HEARTBEAT_CHECK`)在 `captureMessages()`
中对所有角色跳过
- 启动检查提示(如"You are running a boot check"、"## Memory system — ACTION
REQUIRED")在存储前被过滤
- `stripMemoryInjection()` 增加了启动检查文本和用户消息中独立哨兵值的额外匹配模式
Closes #1298
1 file changed
+36
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
64 | 85 | | |
65 | 86 | | |
66 | 87 | | |
| |||
232 | 253 | | |
233 | 254 | | |
234 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
235 | 271 | | |
236 | 272 | | |
237 | 273 | | |
| |||
0 commit comments