dsh-memu-memory 1.1.3 → 1.2.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 (173) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +31 -2
  3. package/README.zh.md +30 -2
  4. package/docs/active-memory-ab.md +385 -0
  5. package/docs/binding-lifecycle.md +99 -0
  6. package/docs/contributing.md +1 -1
  7. package/docs/emotion-model-spec.md +281 -0
  8. package/docs/host-api.md +2 -2
  9. package/docs/memory-semantics.md +12 -10
  10. package/docs/recall-benchmark.md +238 -0
  11. package/docs/troubleshooting.md +395 -395
  12. package/lib/active-memory.js +165 -0
  13. package/lib/activity-log.js +1 -1
  14. package/lib/binding-diagnostics.js +8 -3
  15. package/lib/client.js +33 -11
  16. package/lib/consolidation-ledger.js +347 -0
  17. package/lib/consolidation-receipt.js +284 -0
  18. package/lib/consolidation-snapshot.js +274 -0
  19. package/lib/consolidation-worker.js +115 -0
  20. package/lib/cycle.js +40 -6
  21. package/lib/inject.js +104 -76
  22. package/lib/local-embedding-manager.js +24 -6
  23. package/lib/memory.js +221 -19
  24. package/lib/mood.js +268 -39
  25. package/lib/preset-scope.js +1 -1
  26. package/lib/private.js +335 -40
  27. package/lib/prompts/private-consolidation.coding.md +1 -0
  28. package/lib/prompts/private-consolidation.md +1 -0
  29. package/lib/prompts/private-consolidation.mixed.md +1 -0
  30. package/lib/prompts/private-consolidation.rp.md +1 -0
  31. package/lib/prompts.js +4 -4
  32. package/lib/remote-summary.js +51 -25
  33. package/lib/rpc.js +9 -1
  34. package/lib/state.js +29 -12
  35. package/lib/tools.js +49 -2
  36. package/lib/vector-profile.js +27 -0
  37. package/package.json +2 -1
  38. package/scripts/acceptance-local.mjs +2 -1
  39. package/scripts/active-memory-ab-live.mjs +655 -0
  40. package/scripts/active-memory-ab.mjs +1302 -0
  41. package/scripts/chain-matrix.mjs +11 -1
  42. package/scripts/check-all.mjs +10 -1
  43. package/tests/activation.test.mjs +89 -0
  44. package/tests/active-memory-ab.test.mjs +745 -0
  45. package/tests/active-memory.test.mjs +129 -0
  46. package/tests/activity-log.test.mjs +126 -0
  47. package/tests/activity-wiring.test.mjs +103 -0
  48. package/tests/appendix-b.test.mjs +212 -0
  49. package/tests/appendix-b2.test.mjs +166 -0
  50. package/tests/audit-regression.test.mjs +272 -0
  51. package/tests/audit-safety.test.mjs +227 -0
  52. package/tests/backend-compensation.test.mjs +272 -0
  53. package/tests/backup.test.mjs +793 -0
  54. package/tests/binding-diagnostics.test.mjs +720 -0
  55. package/tests/browser.test.mjs +366 -0
  56. package/tests/client-render.test.mjs +892 -0
  57. package/tests/coalesce.test.mjs +113 -0
  58. package/tests/config.test.mjs +159 -0
  59. package/tests/consolidation-credential.test.mjs +320 -0
  60. package/tests/consolidation-fork.test.mjs +357 -0
  61. package/tests/consolidation-ledger.test.mjs +298 -0
  62. package/tests/consolidation-snapshot.test.mjs +321 -0
  63. package/tests/consolidation-value.test.mjs +89 -0
  64. package/tests/context-scope.test.mjs +40 -0
  65. package/tests/cue.test.mjs +44 -0
  66. package/tests/curator-probe.test.mjs +433 -0
  67. package/tests/curator.test.mjs +150 -0
  68. package/tests/cycle.test.mjs +411 -0
  69. package/tests/disclosure.test.mjs +231 -0
  70. package/tests/doc-drift.test.mjs +222 -0
  71. package/tests/embedding-catalog.test.mjs +266 -0
  72. package/tests/embedding-download.test.mjs +391 -0
  73. package/tests/embedding-runtime.test.mjs +389 -0
  74. package/tests/emotion-chain.test.mjs +84 -0
  75. package/tests/emotion-contract.test.mjs +445 -0
  76. package/tests/engine.test.mjs +35 -0
  77. package/tests/fixtures/active-memory-ab/README.md +56 -0
  78. package/tests/fixtures/active-memory-ab/cases/01-clean-dense-turn.json +351 -0
  79. package/tests/fixtures/active-memory-ab/cases/02-clean-thin-turn.json +122 -0
  80. package/tests/fixtures/active-memory-ab/cases/03-clean-starved-small.json +125 -0
  81. package/tests/fixtures/active-memory-ab/cases/04-clean-large-thin.json +137 -0
  82. package/tests/fixtures/active-memory-ab/cases/05-clean-half-step.json +166 -0
  83. package/tests/fixtures/active-memory-ab/cases/06-clean-duplicate-reread.json +197 -0
  84. package/tests/fixtures/active-memory-ab/cases/07-clean-recent-recall.json +125 -0
  85. package/tests/fixtures/active-memory-ab/cases/08-global-relevant.json +111 -0
  86. package/tests/fixtures/active-memory-ab/cases/09-global-irrelevant-conflict.json +158 -0
  87. package/tests/fixtures/active-memory-ab/cases/10-no-human-turn.json +97 -0
  88. package/tests/fixtures/active-memory-ab/cases/11-clean-scale-100.json +137 -0
  89. package/tests/fixtures/active-memory-ab/cases/12-clean-scale-1000.json +137 -0
  90. package/tests/fixtures/active-memory-ab/cases/13-clean-scale-5000.json +137 -0
  91. package/tests/fixtures/active-memory-ab/cases/14-clean-scale-20000.json +137 -0
  92. package/tests/fixtures/active-memory-ab/lead-ai-reviewed-reference.json +191 -0
  93. package/tests/fixtures/active-memory-ab/manifest.json +199 -0
  94. package/tests/fixtures/recall-bench/01-paraphrase.json +184 -0
  95. package/tests/fixtures/recall-bench/02-exact.json +153 -0
  96. package/tests/fixtures/recall-bench/03-negation.json +173 -0
  97. package/tests/fixtures/recall-bench/04-no-answer.json +162 -0
  98. package/tests/fixtures/recall-bench/05-conflict.json +194 -0
  99. package/tests/fixtures/recall-bench/06-boundary.json +273 -0
  100. package/tests/fixtures/recall-bench/07-secret.json +191 -0
  101. package/tests/fixtures/recall-bench/08-coding.json +164 -0
  102. package/tests/fixtures/recall-bench-gold-candidates/01-paraphrase.json +193 -0
  103. package/tests/fixtures/recall-bench-gold-candidates/02-exact.json +197 -0
  104. package/tests/fixtures/recall-bench-gold-candidates/03-negation.json +244 -0
  105. package/tests/fixtures/recall-bench-gold-candidates/04-no-answer.json +189 -0
  106. package/tests/fixtures/recall-bench-gold-candidates/05-conflict.json +245 -0
  107. package/tests/fixtures/recall-bench-gold-candidates/06-boundary.json +279 -0
  108. package/tests/fixtures/recall-bench-gold-candidates/07-secret.json +224 -0
  109. package/tests/fixtures/recall-bench-gold-candidates/08-coding.json +218 -0
  110. package/tests/fixtures/repetition-eval/01-zh-rp.json +93 -0
  111. package/tests/fixtures/repetition-eval/02-en.json +97 -0
  112. package/tests/fixtures/repetition-eval/03-code.json +91 -0
  113. package/tests/fixtures/repetition-eval/04-names.json +116 -0
  114. package/tests/fixtures/repetition-eval/05-user-quote.json +96 -0
  115. package/tests/fixtures/repetition-eval/06-agreement.json +86 -0
  116. package/tests/graph-view.test.mjs +187 -0
  117. package/tests/graph.test.mjs +77 -0
  118. package/tests/hook-order.test.mjs +72 -0
  119. package/tests/humanlike.test.mjs +232 -0
  120. package/tests/hybrid-recall.test.mjs +92 -0
  121. package/tests/inbound.test.mjs +393 -0
  122. package/tests/inject-guide.test.mjs +364 -0
  123. package/tests/inject.test.mjs +222 -0
  124. package/tests/injection-budget-settings.test.mjs +35 -0
  125. package/tests/injection-budget.test.mjs +64 -0
  126. package/tests/injection-chain.test.mjs +191 -0
  127. package/tests/loader-register.mjs +3 -0
  128. package/tests/loader.mjs +12 -0
  129. package/tests/local-embedding-entry.test.mjs +95 -0
  130. package/tests/local-embedding-manager.test.mjs +476 -0
  131. package/tests/local-embedding-protocol.test.mjs +95 -0
  132. package/tests/local-embedding-worker.test.mjs +346 -0
  133. package/tests/managed-memory.test.mjs +536 -0
  134. package/tests/managed-runtime.test.mjs +40 -0
  135. package/tests/media.test.mjs +132 -0
  136. package/tests/migration-payload.test.mjs +42 -0
  137. package/tests/mood.test.mjs +109 -0
  138. package/tests/multiprocess.test.mjs +29 -0
  139. package/tests/new-session-gate.test.mjs +361 -0
  140. package/tests/package-shipping.test.mjs +84 -0
  141. package/tests/preset-scope.test.mjs +212 -0
  142. package/tests/prompts.test.mjs +250 -0
  143. package/tests/react-snapshot.test.mjs +23 -0
  144. package/tests/recall-bench.test.mjs +306 -0
  145. package/tests/remote.test.mjs +140 -0
  146. package/tests/rename.test.mjs +30 -0
  147. package/tests/repetition-detector-snapshot.test.mjs +231 -0
  148. package/tests/repetition-eval-live.test.mjs +177 -0
  149. package/tests/repetition-eval.test.mjs +373 -0
  150. package/tests/salient-date.test.mjs +142 -0
  151. package/tests/settings-beat.test.mjs +221 -0
  152. package/tests/short-term.test.mjs +166 -0
  153. package/tests/sidebar-beat.test.mjs +208 -0
  154. package/tests/sidebar-refresh.test.mjs +123 -0
  155. package/tests/sidebar.test.mjs +70 -0
  156. package/tests/snippet.test.mjs +47 -0
  157. package/tests/source-kind.test.mjs +52 -0
  158. package/tests/state.test.mjs +150 -0
  159. package/tests/stats.test.mjs +112 -0
  160. package/tests/storage.test.mjs +125 -0
  161. package/tests/stubs/dsh-llm.js +5 -0
  162. package/tests/stubs/dsh-session.js +7 -0
  163. package/tests/stubs/dsh-tools.js +101 -0
  164. package/tests/tool-schema.test.mjs +73 -0
  165. package/tests/tools.test.mjs +184 -0
  166. package/tests/ui-defaults.test.mjs +57 -0
  167. package/tests/update-fields.test.mjs +138 -0
  168. package/tests/vector-migration.test.mjs +733 -0
  169. package/tests/vector-profile.test.mjs +425 -0
  170. package/tests/visibility-migration.test.mjs +152 -0
  171. package/tests/webui-auth.test.mjs +454 -0
  172. package/tests/webui.test.mjs +164 -0
  173. package/tests/windows-env.test.mjs +89 -0
@@ -0,0 +1,137 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-large-thin",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "大 transcript 薄回合:不吃饥饿豁免",
12
+ "annotationNotes": "合成代理标注:padding 是确定性工具轮询,文本完全相同,去重后只算 1 个工作单元;两个标签分别落在首回合与末尾薄回合。",
13
+ "snapshot": {
14
+ "domain": "coding",
15
+ "idleAtSnapshotEndMinutes": 20,
16
+ "lastInjectedAt": null,
17
+ "events": [
18
+ {
19
+ "type": "turn/start",
20
+ "at": "2026-10-30T02:00:00.000Z"
21
+ },
22
+ {
23
+ "type": "user/message",
24
+ "at": "2026-10-30T02:00:00.000Z",
25
+ "data": {
26
+ "source": {
27
+ "kind": "user"
28
+ },
29
+ "content": [
30
+ {
31
+ "type": "text",
32
+ "text": "先按计划把迁移脚本跑通,日志我看产出就行。"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "type": "assistant/message",
39
+ "at": "2026-10-30T02:00:00.000Z",
40
+ "data": {
41
+ "message": {
42
+ "content": [
43
+ {
44
+ "type": "text",
45
+ "text": "开始跑。"
46
+ }
47
+ ]
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "type": "step/end",
53
+ "at": "2026-10-30T02:00:00.000Z",
54
+ "step": 1
55
+ },
56
+ {
57
+ "type": "turn/end",
58
+ "at": "2026-10-30T02:00:30.000Z"
59
+ },
60
+ {
61
+ "type": "padding",
62
+ "at": "2026-10-30T02:01:00.000Z",
63
+ "startAt": "2026-10-30T02:01:00.000Z",
64
+ "count": 520,
65
+ "intervalMs": 1000,
66
+ "tool": "read",
67
+ "text": "polling: no change"
68
+ },
69
+ {
70
+ "type": "turn/start",
71
+ "at": "2026-10-30T02:10:00.000Z"
72
+ },
73
+ {
74
+ "type": "user/message",
75
+ "at": "2026-10-30T02:10:00.000Z",
76
+ "data": {
77
+ "source": {
78
+ "kind": "user"
79
+ },
80
+ "content": [
81
+ {
82
+ "type": "text",
83
+ "text": "继续"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "type": "assistant/message",
90
+ "at": "2026-10-30T02:10:00.000Z",
91
+ "data": {
92
+ "message": {
93
+ "content": [
94
+ {
95
+ "type": "text",
96
+ "text": "还在跑。"
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "type": "step/end",
104
+ "at": "2026-10-30T02:10:00.000Z",
105
+ "step": 520
106
+ },
107
+ {
108
+ "type": "turn/end",
109
+ "at": "2026-10-30T02:10:00.000Z"
110
+ }
111
+ ]
112
+ },
113
+ "labels": {
114
+ "expected": [
115
+ {
116
+ "id": "mem-ab-large-plan-scope",
117
+ "class": "decision",
118
+ "sourceSeq": 1,
119
+ "note": "迁移脚本先跑通,日志以产出为准"
120
+ },
121
+ {
122
+ "id": "mem-ab-large-thin-tail",
123
+ "class": "promise",
124
+ "sourceSeq": 7,
125
+ "note": "末尾薄回合(“继续”)本身没有新事实,用于量漏记"
126
+ }
127
+ ],
128
+ "mainProactive": [],
129
+ "userReminders": []
130
+ },
131
+ "expect": {
132
+ "maxBackgroundChecks": 0,
133
+ "blockedReasons": [
134
+ "large-transcript-thin"
135
+ ]
136
+ }
137
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-half-step",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "半步边界:tool/call 没有结果就 deferred,不推进游标",
12
+ "annotationNotes": "合成代理标注:throughSeq 停在 tool/call 上,之后的事件属于“尚未到达”,必须被排除在固定快照之外。",
13
+ "snapshot": {
14
+ "domain": "coding",
15
+ "throughSeq": 3,
16
+ "pendingCheck": true,
17
+ "idleAtSnapshotEndMinutes": 20,
18
+ "lastInjectedAt": null,
19
+ "events": [
20
+ {
21
+ "type": "turn/start",
22
+ "at": "2026-10-30T02:00:00.000Z"
23
+ },
24
+ {
25
+ "type": "user/message",
26
+ "at": "2026-10-30T02:00:00.000Z",
27
+ "data": {
28
+ "source": {
29
+ "kind": "user"
30
+ },
31
+ "content": [
32
+ {
33
+ "type": "text",
34
+ "text": "这条要记住:写记忆前必须重新核对父 binding 的 domain 和开关,父会话切库时剩余提交一律拒绝。"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "type": "assistant/message",
41
+ "at": "2026-10-30T02:00:00.000Z",
42
+ "data": {
43
+ "message": {
44
+ "content": [
45
+ {
46
+ "type": "text",
47
+ "text": "先读一下 binding 现状。"
48
+ },
49
+ {
50
+ "type": "tool-call",
51
+ "toolCallId": "c1",
52
+ "name": "read",
53
+ "arguments": {
54
+ "path": "lib/state.js"
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "type": "tool/call",
63
+ "at": "2026-10-30T02:00:12.000Z",
64
+ "toolCallId": "c1",
65
+ "name": "read",
66
+ "arguments": {
67
+ "path": "lib/state.js"
68
+ }
69
+ },
70
+ {
71
+ "type": "tool/result",
72
+ "at": "2026-10-30T02:00:24.000Z",
73
+ "toolCallId": "c1",
74
+ "data": {
75
+ "message": {
76
+ "isError": false,
77
+ "content": [
78
+ {
79
+ "type": "text",
80
+ "text": "binding: domain=coding,私有层开启,全局只读。"
81
+ }
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "type": "assistant/message",
88
+ "at": "2026-10-30T02:00:24.000Z",
89
+ "data": {
90
+ "message": {
91
+ "content": [
92
+ {
93
+ "type": "text",
94
+ "text": "读到绑定信息了。"
95
+ }
96
+ ]
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "type": "step/end",
102
+ "at": "2026-10-30T02:00:00.000Z",
103
+ "step": 1
104
+ },
105
+ {
106
+ "type": "turn/end",
107
+ "at": "2026-10-30T02:00:36.000Z"
108
+ },
109
+ {
110
+ "type": "turn/start",
111
+ "at": "2026-10-30T02:01:00.000Z"
112
+ },
113
+ {
114
+ "type": "user/message",
115
+ "at": "2026-10-30T02:01:00.000Z",
116
+ "data": {
117
+ "source": {
118
+ "kind": "user"
119
+ },
120
+ "content": [
121
+ {
122
+ "type": "text",
123
+ "text": "先停一下,等我确认。"
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ "type": "assistant/message",
130
+ "at": "2026-10-30T02:01:00.000Z",
131
+ "data": {
132
+ "message": {
133
+ "content": [
134
+ {
135
+ "type": "text",
136
+ "text": "好,停在这里。"
137
+ }
138
+ ]
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "type": "turn/end",
144
+ "at": "2026-10-30T02:01:30.000Z"
145
+ }
146
+ ]
147
+ },
148
+ "labels": {
149
+ "expected": [
150
+ {
151
+ "id": "mem-ab-half-rebind-check",
152
+ "class": "decision",
153
+ "sourceSeq": 1,
154
+ "note": "写入前重验父 binding,切库就拒绝剩余提交"
155
+ }
156
+ ],
157
+ "mainProactive": [],
158
+ "userReminders": []
159
+ },
160
+ "expect": {
161
+ "deferredAtLeast": 1,
162
+ "uncoveredLabelIds": [
163
+ "mem-ab-half-rebind-check"
164
+ ]
165
+ }
166
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-duplicate-reread",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "重复读与已写条目:整段前缀重放会再次提议同一条",
12
+ "annotationNotes": "合成代理标注:主模型已自己写入一条,后台检查再遇到它只能算重复,不能算新增覆盖;两次相同轮询结果去重后只算 1 个工作单元。",
13
+ "snapshot": {
14
+ "domain": "coding",
15
+ "idleAtSnapshotEndMinutes": 20,
16
+ "lastInjectedAt": null,
17
+ "events": [
18
+ {
19
+ "type": "turn/start",
20
+ "at": "2026-10-30T02:00:00.000Z"
21
+ },
22
+ {
23
+ "type": "user/message",
24
+ "at": "2026-10-30T02:00:00.000Z",
25
+ "data": {
26
+ "source": {
27
+ "kind": "user"
28
+ },
29
+ "content": [
30
+ {
31
+ "type": "text",
32
+ "text": "我把滚动窗口那个想法否掉了:宿主 seed 必须从 0 连续,窗口化不是改个计数能做到的。这条记一下。"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "type": "assistant/message",
39
+ "at": "2026-10-30T02:00:00.000Z",
40
+ "data": {
41
+ "message": {
42
+ "content": [
43
+ {
44
+ "type": "text",
45
+ "text": "记下了:不做窗口化 seed,等宿主给官方 windowed seed 再说。"
46
+ },
47
+ {
48
+ "type": "tool-call",
49
+ "toolCallId": "c1",
50
+ "name": "memu_remember",
51
+ "arguments": {
52
+ "memoryId": "mem-ab-dup-no-window"
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "type": "tool/call",
61
+ "at": "2026-10-30T02:00:00.000Z",
62
+ "toolCallId": "c1",
63
+ "name": "memu_remember",
64
+ "arguments": {
65
+ "memoryId": "mem-ab-dup-no-window"
66
+ }
67
+ },
68
+ {
69
+ "type": "tool/result",
70
+ "at": "2026-10-30T02:00:00.000Z",
71
+ "toolCallId": "c1",
72
+ "data": {
73
+ "message": {
74
+ "isError": false,
75
+ "content": [
76
+ {
77
+ "type": "text",
78
+ "text": "saved: mem-ab-dup-no-window"
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "type": "step/end",
86
+ "at": "2026-10-30T02:00:00.000Z",
87
+ "step": 1
88
+ },
89
+ {
90
+ "type": "turn/end",
91
+ "at": "2026-10-30T02:00:30.000Z"
92
+ },
93
+ {
94
+ "type": "turn/start",
95
+ "at": "2026-10-30T02:01:00.000Z"
96
+ },
97
+ {
98
+ "type": "user/message",
99
+ "at": "2026-10-30T02:01:00.000Z",
100
+ "data": {
101
+ "source": {
102
+ "kind": "user"
103
+ },
104
+ "content": [
105
+ {
106
+ "type": "text",
107
+ "text": "另外,检查凭证里要带上 snapshot 摘要和 scope generation,不然重启后没法判断是不是同一份快照。"
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ {
113
+ "type": "assistant/message",
114
+ "at": "2026-10-30T02:01:00.000Z",
115
+ "data": {
116
+ "message": {
117
+ "content": [
118
+ {
119
+ "type": "text",
120
+ "text": "明白,凭证固定带四样:fromSeq、throughSeq、snapshotSha256、scopeGeneration。"
121
+ }
122
+ ]
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "type": "tool/result",
128
+ "at": "2026-10-30T02:01:00.000Z",
129
+ "toolCallId": "c2",
130
+ "data": {
131
+ "message": {
132
+ "isError": false,
133
+ "content": [
134
+ {
135
+ "type": "text",
136
+ "text": "polling: no change"
137
+ }
138
+ ]
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "type": "tool/result",
144
+ "at": "2026-10-30T02:01:00.000Z",
145
+ "toolCallId": "c3",
146
+ "data": {
147
+ "message": {
148
+ "isError": false,
149
+ "content": [
150
+ {
151
+ "type": "text",
152
+ "text": "polling: no change"
153
+ }
154
+ ]
155
+ }
156
+ }
157
+ },
158
+ {
159
+ "type": "step/end",
160
+ "at": "2026-10-30T02:01:00.000Z",
161
+ "step": 2
162
+ },
163
+ {
164
+ "type": "turn/end",
165
+ "at": "2026-10-30T02:20:00.000Z"
166
+ }
167
+ ]
168
+ },
169
+ "labels": {
170
+ "expected": [
171
+ {
172
+ "id": "mem-ab-dup-no-window",
173
+ "class": "decision",
174
+ "sourceSeq": 1,
175
+ "note": "不做窗口化 seed,等宿主支持"
176
+ },
177
+ {
178
+ "id": "mem-ab-dup-credential-fields",
179
+ "class": "decision",
180
+ "sourceSeq": 7,
181
+ "note": "凭证必须带快照摘要与 scope generation"
182
+ }
183
+ ],
184
+ "mainProactive": [
185
+ "mem-ab-dup-no-window"
186
+ ],
187
+ "userReminders": []
188
+ },
189
+ "expect": {
190
+ "minBackgroundChecks": 1,
191
+ "duplicatesReproposedAtLeast": 1,
192
+ "coveredLabelIds": [
193
+ "mem-ab-dup-no-window",
194
+ "mem-ab-dup-credential-fields"
195
+ ]
196
+ }
197
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-recent-recall",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "刚注入过记忆:抑制而不是检查",
12
+ "annotationNotes": "合成代理标注:抑制是调度结果,不是 no_value;这条用来验证抑制不会被记成“检查过且没东西”。",
13
+ "snapshot": {
14
+ "domain": "coding",
15
+ "idleAtSnapshotEndMinutes": 20,
16
+ "lastInjectedAt": "2026-10-30T01:58:00.000Z",
17
+ "events": [
18
+ {
19
+ "type": "turn/start",
20
+ "at": "2026-10-30T02:00:00.000Z"
21
+ },
22
+ {
23
+ "type": "user/message",
24
+ "at": "2026-10-30T02:00:00.000Z",
25
+ "data": {
26
+ "source": {
27
+ "kind": "user"
28
+ },
29
+ "content": [
30
+ {
31
+ "type": "text",
32
+ "text": "刚注入过记忆的回合不要再 fork 一次,这条抑制规则保留。"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "type": "assistant/message",
39
+ "at": "2026-10-30T02:00:00.000Z",
40
+ "data": {
41
+ "message": {
42
+ "content": [
43
+ {
44
+ "type": "text",
45
+ "text": "保留:距上次注入不到召回冷却时间就不检查。"
46
+ }
47
+ ]
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "type": "step/end",
53
+ "at": "2026-10-30T02:00:00.000Z",
54
+ "step": 1
55
+ },
56
+ {
57
+ "type": "turn/end",
58
+ "at": "2026-10-30T02:00:30.000Z"
59
+ },
60
+ {
61
+ "type": "turn/start",
62
+ "at": "2026-10-30T02:01:00.000Z"
63
+ },
64
+ {
65
+ "type": "user/message",
66
+ "at": "2026-10-30T02:01:00.000Z",
67
+ "data": {
68
+ "source": {
69
+ "kind": "user"
70
+ },
71
+ "content": [
72
+ {
73
+ "type": "text",
74
+ "text": "嗯,其余照旧。"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "type": "assistant/message",
81
+ "at": "2026-10-30T02:01:00.000Z",
82
+ "data": {
83
+ "message": {
84
+ "content": [
85
+ {
86
+ "type": "text",
87
+ "text": "好。"
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ },
93
+ {
94
+ "type": "step/end",
95
+ "at": "2026-10-30T02:01:00.000Z",
96
+ "step": 2
97
+ },
98
+ {
99
+ "type": "turn/end",
100
+ "at": "2026-10-30T02:03:00.000Z"
101
+ }
102
+ ]
103
+ },
104
+ "labels": {
105
+ "expected": [
106
+ {
107
+ "id": "mem-ab-recall-suppress-rule",
108
+ "class": "decision",
109
+ "sourceSeq": 1,
110
+ "note": "距上次注入不足冷却时间就抑制检查"
111
+ }
112
+ ],
113
+ "mainProactive": [],
114
+ "userReminders": []
115
+ },
116
+ "expect": {
117
+ "maxBackgroundChecks": 0,
118
+ "blockedReasons": [
119
+ "recent-recall"
120
+ ],
121
+ "uncoveredLabelIds": [
122
+ "mem-ab-recall-suppress-rule"
123
+ ]
124
+ }
125
+ }