dsh-memu-memory 1.1.3 → 1.2.1

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 (184) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +39 -6
  3. package/README.zh.md +39 -7
  4. package/docs/active-memory-ab.md +385 -0
  5. package/docs/binding-lifecycle.md +99 -0
  6. package/docs/contributing.md +3 -3
  7. package/docs/emotion-model-spec.md +281 -0
  8. package/docs/env-and-commands.md +8 -0
  9. package/docs/host-api.md +2 -2
  10. package/docs/memory-semantics.md +12 -10
  11. package/docs/recall-benchmark.md +238 -0
  12. package/docs/troubleshooting.md +396 -395
  13. package/lib/active-memory.js +165 -0
  14. package/lib/activity-log.js +23 -6
  15. package/lib/binding-diagnostics.js +8 -3
  16. package/lib/client.js +335 -35
  17. package/lib/consolidation-ledger.js +347 -0
  18. package/lib/consolidation-receipt.js +284 -0
  19. package/lib/consolidation-snapshot.js +274 -0
  20. package/lib/consolidation-worker.js +144 -0
  21. package/lib/curator.js +86 -31
  22. package/lib/cycle.js +40 -6
  23. package/lib/graph.js +139 -5
  24. package/lib/index.js +33 -1
  25. package/lib/inject.js +104 -76
  26. package/lib/local-embedding-manager.js +24 -6
  27. package/lib/memory.js +534 -88
  28. package/lib/mood.js +268 -39
  29. package/lib/preset-scope.js +1 -1
  30. package/lib/private.js +430 -43
  31. package/lib/prompts/private-consolidation.coding.md +1 -0
  32. package/lib/prompts/private-consolidation.md +1 -0
  33. package/lib/prompts/private-consolidation.mixed.md +1 -0
  34. package/lib/prompts/private-consolidation.rp.md +1 -0
  35. package/lib/prompts.js +4 -4
  36. package/lib/remote-summary.js +51 -25
  37. package/lib/rpc.js +54 -5
  38. package/lib/state.js +29 -12
  39. package/lib/text-similarity.js +106 -0
  40. package/lib/tools.js +113 -10
  41. package/lib/vector-migration.js +28 -3
  42. package/lib/vector-profile.js +51 -0
  43. package/package.json +4 -2
  44. package/scripts/acceptance-local.mjs +2 -1
  45. package/scripts/active-memory-ab-live.mjs +655 -0
  46. package/scripts/active-memory-ab.mjs +1302 -0
  47. package/scripts/chain-matrix.mjs +11 -1
  48. package/scripts/check-all.mjs +10 -1
  49. package/scripts/replay.mjs +573 -0
  50. package/tests/activation.test.mjs +89 -0
  51. package/tests/active-memory-ab.test.mjs +745 -0
  52. package/tests/active-memory.test.mjs +129 -0
  53. package/tests/activity-log.test.mjs +126 -0
  54. package/tests/activity-wiring.test.mjs +103 -0
  55. package/tests/appendix-b.test.mjs +216 -0
  56. package/tests/appendix-b2.test.mjs +166 -0
  57. package/tests/audit-regression.test.mjs +272 -0
  58. package/tests/audit-safety.test.mjs +227 -0
  59. package/tests/backend-compensation.test.mjs +272 -0
  60. package/tests/backup.test.mjs +793 -0
  61. package/tests/binding-diagnostics.test.mjs +720 -0
  62. package/tests/browser.test.mjs +366 -0
  63. package/tests/client-render.test.mjs +892 -0
  64. package/tests/coalesce.test.mjs +113 -0
  65. package/tests/config.test.mjs +159 -0
  66. package/tests/consolidation-credential.test.mjs +331 -0
  67. package/tests/consolidation-feed.test.mjs +96 -0
  68. package/tests/consolidation-fork.test.mjs +489 -0
  69. package/tests/consolidation-ledger.test.mjs +298 -0
  70. package/tests/consolidation-snapshot.test.mjs +360 -0
  71. package/tests/consolidation-value.test.mjs +89 -0
  72. package/tests/context-scope.test.mjs +40 -0
  73. package/tests/cue.test.mjs +44 -0
  74. package/tests/curator-commit.test.mjs +277 -0
  75. package/tests/curator-probe.test.mjs +433 -0
  76. package/tests/curator.test.mjs +150 -0
  77. package/tests/cycle.test.mjs +411 -0
  78. package/tests/disclosure.test.mjs +231 -0
  79. package/tests/doc-drift.test.mjs +222 -0
  80. package/tests/embedding-catalog.test.mjs +266 -0
  81. package/tests/embedding-download.test.mjs +391 -0
  82. package/tests/embedding-runtime.test.mjs +389 -0
  83. package/tests/emotion-chain.test.mjs +84 -0
  84. package/tests/emotion-contract.test.mjs +445 -0
  85. package/tests/engine.test.mjs +35 -0
  86. package/tests/fixtures/active-memory-ab/README.md +56 -0
  87. package/tests/fixtures/active-memory-ab/cases/01-clean-dense-turn.json +351 -0
  88. package/tests/fixtures/active-memory-ab/cases/02-clean-thin-turn.json +122 -0
  89. package/tests/fixtures/active-memory-ab/cases/03-clean-starved-small.json +125 -0
  90. package/tests/fixtures/active-memory-ab/cases/04-clean-large-thin.json +137 -0
  91. package/tests/fixtures/active-memory-ab/cases/05-clean-half-step.json +166 -0
  92. package/tests/fixtures/active-memory-ab/cases/06-clean-duplicate-reread.json +197 -0
  93. package/tests/fixtures/active-memory-ab/cases/07-clean-recent-recall.json +125 -0
  94. package/tests/fixtures/active-memory-ab/cases/08-global-relevant.json +111 -0
  95. package/tests/fixtures/active-memory-ab/cases/09-global-irrelevant-conflict.json +158 -0
  96. package/tests/fixtures/active-memory-ab/cases/10-no-human-turn.json +97 -0
  97. package/tests/fixtures/active-memory-ab/cases/11-clean-scale-100.json +137 -0
  98. package/tests/fixtures/active-memory-ab/cases/12-clean-scale-1000.json +137 -0
  99. package/tests/fixtures/active-memory-ab/cases/13-clean-scale-5000.json +137 -0
  100. package/tests/fixtures/active-memory-ab/cases/14-clean-scale-20000.json +137 -0
  101. package/tests/fixtures/active-memory-ab/lead-ai-reviewed-reference.json +191 -0
  102. package/tests/fixtures/active-memory-ab/manifest.json +199 -0
  103. package/tests/fixtures/recall-bench/01-paraphrase.json +184 -0
  104. package/tests/fixtures/recall-bench/02-exact.json +153 -0
  105. package/tests/fixtures/recall-bench/03-negation.json +173 -0
  106. package/tests/fixtures/recall-bench/04-no-answer.json +162 -0
  107. package/tests/fixtures/recall-bench/05-conflict.json +194 -0
  108. package/tests/fixtures/recall-bench/06-boundary.json +273 -0
  109. package/tests/fixtures/recall-bench/07-secret.json +191 -0
  110. package/tests/fixtures/recall-bench/08-coding.json +164 -0
  111. package/tests/fixtures/recall-bench-gold-candidates/01-paraphrase.json +193 -0
  112. package/tests/fixtures/recall-bench-gold-candidates/02-exact.json +197 -0
  113. package/tests/fixtures/recall-bench-gold-candidates/03-negation.json +244 -0
  114. package/tests/fixtures/recall-bench-gold-candidates/04-no-answer.json +189 -0
  115. package/tests/fixtures/recall-bench-gold-candidates/05-conflict.json +245 -0
  116. package/tests/fixtures/recall-bench-gold-candidates/06-boundary.json +279 -0
  117. package/tests/fixtures/recall-bench-gold-candidates/07-secret.json +224 -0
  118. package/tests/fixtures/recall-bench-gold-candidates/08-coding.json +218 -0
  119. package/tests/fixtures/repetition-eval/01-zh-rp.json +93 -0
  120. package/tests/fixtures/repetition-eval/02-en.json +97 -0
  121. package/tests/fixtures/repetition-eval/03-code.json +91 -0
  122. package/tests/fixtures/repetition-eval/04-names.json +116 -0
  123. package/tests/fixtures/repetition-eval/05-user-quote.json +96 -0
  124. package/tests/fixtures/repetition-eval/06-agreement.json +86 -0
  125. package/tests/graph-cascade.test.mjs +190 -0
  126. package/tests/graph-view.test.mjs +187 -0
  127. package/tests/graph.test.mjs +94 -0
  128. package/tests/hook-order.test.mjs +72 -0
  129. package/tests/humanlike.test.mjs +232 -0
  130. package/tests/hybrid-recall.test.mjs +122 -0
  131. package/tests/inbound.test.mjs +393 -0
  132. package/tests/inject-guide.test.mjs +364 -0
  133. package/tests/inject.test.mjs +222 -0
  134. package/tests/injection-budget-settings.test.mjs +35 -0
  135. package/tests/injection-budget.test.mjs +64 -0
  136. package/tests/injection-chain.test.mjs +191 -0
  137. package/tests/loader-register.mjs +3 -0
  138. package/tests/loader.mjs +12 -0
  139. package/tests/local-embedding-entry.test.mjs +95 -0
  140. package/tests/local-embedding-manager.test.mjs +476 -0
  141. package/tests/local-embedding-protocol.test.mjs +95 -0
  142. package/tests/local-embedding-worker.test.mjs +346 -0
  143. package/tests/managed-memory.test.mjs +591 -0
  144. package/tests/managed-runtime.test.mjs +40 -0
  145. package/tests/media.test.mjs +132 -0
  146. package/tests/migration-payload.test.mjs +42 -0
  147. package/tests/mood.test.mjs +109 -0
  148. package/tests/multiprocess.test.mjs +29 -0
  149. package/tests/new-session-gate.test.mjs +361 -0
  150. package/tests/package-shipping.test.mjs +84 -0
  151. package/tests/preset-scope.test.mjs +212 -0
  152. package/tests/prompts.test.mjs +250 -0
  153. package/tests/react-snapshot.test.mjs +23 -0
  154. package/tests/recall-bench.test.mjs +306 -0
  155. package/tests/recall-dedup.test.mjs +417 -0
  156. package/tests/remote.test.mjs +140 -0
  157. package/tests/rename.test.mjs +30 -0
  158. package/tests/repetition-detector-snapshot.test.mjs +231 -0
  159. package/tests/repetition-eval-live.test.mjs +177 -0
  160. package/tests/repetition-eval.test.mjs +373 -0
  161. package/tests/salient-date.test.mjs +142 -0
  162. package/tests/settings-beat.test.mjs +221 -0
  163. package/tests/short-term.test.mjs +166 -0
  164. package/tests/sidebar-beat.test.mjs +212 -0
  165. package/tests/sidebar-refresh.test.mjs +123 -0
  166. package/tests/sidebar.test.mjs +70 -0
  167. package/tests/snippet.test.mjs +47 -0
  168. package/tests/source-kind.test.mjs +52 -0
  169. package/tests/state.test.mjs +150 -0
  170. package/tests/stats.test.mjs +112 -0
  171. package/tests/storage.test.mjs +125 -0
  172. package/tests/stubs/dsh-llm.js +5 -0
  173. package/tests/stubs/dsh-session.js +7 -0
  174. package/tests/stubs/dsh-tools.js +101 -0
  175. package/tests/tool-schema.test.mjs +73 -0
  176. package/tests/tools.test.mjs +184 -0
  177. package/tests/ui-defaults.test.mjs +57 -0
  178. package/tests/update-fields.test.mjs +138 -0
  179. package/tests/vector-migration.test.mjs +790 -0
  180. package/tests/vector-profile.test.mjs +425 -0
  181. package/tests/visibility-migration.test.mjs +152 -0
  182. package/tests/webui-auth.test.mjs +454 -0
  183. package/tests/webui.test.mjs +165 -0
  184. package/tests/windows-env.test.mjs +89 -0
@@ -0,0 +1,111 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "global-relevant",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "relevant",
11
+ "title": "全局干扰(相关):相关全局条目可以进上下文,但不许被复制进私有写",
12
+ "annotationNotes": "合成代理标注:全局条目是合成数据,只用来量预算与泄漏,不代表真实全局库内容。",
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": "这个项目里,全局记忆只由 curator 写,主 agent 只读,别让检查 worker 去动全局层。"
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": "明白,worker 只写私有层,全局只读。"
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:03:00.000Z"
59
+ }
60
+ ],
61
+ "globalEntries": [
62
+ {
63
+ "id": "mem-gb-relevant-curator",
64
+ "relevant": true,
65
+ "title": "全局只由 curator 写",
66
+ "content": "全局记忆写入只走 curator;主 agent 与检查 worker 都只读,不要复制全局正文进私有条目。",
67
+ "tags": [
68
+ "全局",
69
+ "curator"
70
+ ]
71
+ },
72
+ {
73
+ "id": "mem-gb-relevant-scope",
74
+ "relevant": true,
75
+ "title": "文件夹 clamp",
76
+ "content": "文件夹 clamp 落在四处:ensureSession、setSessionScope、注入准入、记忆读写。",
77
+ "tags": [
78
+ "clamp"
79
+ ]
80
+ },
81
+ {
82
+ "id": "mem-gb-irrelevant-weather",
83
+ "relevant": false,
84
+ "title": "天气",
85
+ "content": "明天有雨,记得带伞。",
86
+ "tags": [
87
+ "天气"
88
+ ]
89
+ }
90
+ ],
91
+ "conflicts": []
92
+ },
93
+ "labels": {
94
+ "expected": [
95
+ {
96
+ "id": "mem-ab-global-readonly",
97
+ "class": "preference",
98
+ "sourceSeq": 1,
99
+ "note": "worker 只写私有层,全局只读"
100
+ }
101
+ ],
102
+ "mainProactive": [],
103
+ "userReminders": []
104
+ },
105
+ "expect": {
106
+ "minBackgroundChecks": 1,
107
+ "coveredLabelIds": [
108
+ "mem-ab-global-readonly"
109
+ ]
110
+ }
111
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "global-irrelevant-conflict",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "irrelevant-conflict",
11
+ "title": "全局干扰(无关且冲突):冲突条目只进 held,不进可召回覆盖",
12
+ "annotationNotes": "合成代理标注:冲突来自合成全局条目,用来验证“矛盾新写 pending_review 记 held”的管线规则。",
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": "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": "另外端口固定用 9032,不要再用 8080。"
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": "记下了,端口 9032。"
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
+ "globalEntries": [
104
+ {
105
+ "id": "mem-gb-conflict-backup",
106
+ "relevant": false,
107
+ "title": "备份保留三份",
108
+ "content": "备份目录固定保留最新三份,旧的不要自动清理。",
109
+ "tags": [
110
+ "备份"
111
+ ]
112
+ },
113
+ {
114
+ "id": "mem-gb-irrelevant-port",
115
+ "relevant": false,
116
+ "title": "旧端口",
117
+ "content": "Web GUI 默认监听 8080。",
118
+ "tags": [
119
+ "端口"
120
+ ]
121
+ }
122
+ ],
123
+ "conflicts": [
124
+ {
125
+ "globalId": "mem-gb-conflict-backup",
126
+ "labelId": "mem-ab-global-backup-change"
127
+ }
128
+ ]
129
+ },
130
+ "labels": {
131
+ "expected": [
132
+ {
133
+ "id": "mem-ab-global-backup-change",
134
+ "class": "decision",
135
+ "sourceSeq": 1,
136
+ "note": "备份只留最新一份,与合成全局条目冲突 → held"
137
+ },
138
+ {
139
+ "id": "mem-ab-global-port",
140
+ "class": "preference",
141
+ "sourceSeq": 6,
142
+ "note": "端口固定 9032"
143
+ }
144
+ ],
145
+ "mainProactive": [],
146
+ "userReminders": []
147
+ },
148
+ "expect": {
149
+ "minBackgroundChecks": 1,
150
+ "heldAtLeast": 1,
151
+ "coveredLabelIds": [
152
+ "mem-ab-global-port"
153
+ ],
154
+ "uncoveredLabelIds": [
155
+ "mem-ab-global-backup-change"
156
+ ]
157
+ }
158
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "no-human-turn",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "没有真人回合:纯工具轮询不构成检查理由",
12
+ "annotationNotes": "合成代理标注:这条 case 没有应记事件,用来验证 no-human-turn 与“没有新事实”是两回事。",
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": "plugin:dsh-memu-memory"
28
+ },
29
+ "content": [
30
+ {
31
+ "type": "text",
32
+ "text": "(插件提示:本轮召回 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": "工具跑完了,没有新的人类指令。"
46
+ },
47
+ {
48
+ "type": "tool-call",
49
+ "toolCallId": "c1",
50
+ "name": "run_code",
51
+ "arguments": {
52
+ "codeLength": 120
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "type": "tool/result",
61
+ "at": "2026-10-30T02:00:00.000Z",
62
+ "toolCallId": "c1",
63
+ "data": {
64
+ "message": {
65
+ "isError": false,
66
+ "content": [
67
+ {
68
+ "type": "text",
69
+ "text": "ok"
70
+ }
71
+ ]
72
+ }
73
+ }
74
+ },
75
+ {
76
+ "type": "step/end",
77
+ "at": "2026-10-30T02:00:00.000Z",
78
+ "step": 1
79
+ },
80
+ {
81
+ "type": "turn/end",
82
+ "at": "2026-10-30T02:03:00.000Z"
83
+ }
84
+ ]
85
+ },
86
+ "labels": {
87
+ "expected": [],
88
+ "mainProactive": [],
89
+ "userReminders": []
90
+ },
91
+ "expect": {
92
+ "maxBackgroundChecks": 0,
93
+ "blockedReasons": [
94
+ "no-human-turn"
95
+ ]
96
+ }
97
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-scale-100",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "规模梯度 100 事件:低于 largeTranscriptEvents,饥饿豁免仍然生效",
12
+ "annotationNotes": "合成代理标注。与 clean-large-thin 同证据、同标签、同 expect 形状,唯一变量是 padding.count,用于标定 largeTranscriptEvents 阈值。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": 22,
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": 22
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-scale-plan-scope",
117
+ "class": "decision",
118
+ "sourceSeq": 1,
119
+ "note": "迁移脚本先跑通,日志以产出为准"
120
+ },
121
+ {
122
+ "id": "mem-ab-scale-thin-tail",
123
+ "class": "promise",
124
+ "sourceSeq": 94,
125
+ "note": "末尾薄回合(“继续”)本身没有新事实,用于量漏记"
126
+ }
127
+ ],
128
+ "mainProactive": [],
129
+ "userReminders": []
130
+ },
131
+ "expect": {
132
+ "minBackgroundChecks": 1,
133
+ "wakeReasons": [
134
+ "starved"
135
+ ]
136
+ }
137
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "active-memory-ab-case",
4
+ "id": "clean-scale-1000",
5
+ "draft": true,
6
+ "notGold": true,
7
+ "gold": false,
8
+ "review": "pending",
9
+ "annotationSource": "synthetic-proxy",
10
+ "interference": "off",
11
+ "title": "规模梯度 1000 事件:仍在阈值下,饥饿豁免生效",
12
+ "annotationNotes": "合成代理标注。与 clean-large-thin 同证据、同标签、同 expect 形状,唯一变量是 padding.count,用于标定 largeTranscriptEvents 阈值。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": 247,
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": 247
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-scale-plan-scope",
117
+ "class": "decision",
118
+ "sourceSeq": 1,
119
+ "note": "迁移脚本先跑通,日志以产出为准"
120
+ },
121
+ {
122
+ "id": "mem-ab-scale-thin-tail",
123
+ "class": "promise",
124
+ "sourceSeq": 994,
125
+ "note": "末尾薄回合(“继续”)本身没有新事实,用于量漏记"
126
+ }
127
+ ],
128
+ "mainProactive": [],
129
+ "userReminders": []
130
+ },
131
+ "expect": {
132
+ "minBackgroundChecks": 1,
133
+ "wakeReasons": [
134
+ "starved"
135
+ ]
136
+ }
137
+ }