@remnic/core 1.1.1 → 1.1.3

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 (497) hide show
  1. package/dist/abort-error.js +1 -0
  2. package/dist/abstraction-nodes.js +1 -0
  3. package/dist/access-audit.js +1 -0
  4. package/dist/access-cli.js +76 -51
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.d.ts +50 -5
  7. package/dist/access-http.js +38 -16
  8. package/dist/access-idempotency.js +1 -0
  9. package/dist/access-mcp.d.ts +10 -5
  10. package/dist/access-mcp.js +37 -14
  11. package/dist/access-schema.d.ts +133 -13
  12. package/dist/access-schema.js +20 -1
  13. package/dist/access-service-_AEUMVyX.d.ts +1981 -0
  14. package/dist/access-service.d.ts +11 -6
  15. package/dist/access-service.js +39 -14
  16. package/dist/active-memory-bridge.js +1 -0
  17. package/dist/active-recall.js +1 -0
  18. package/dist/active-recall.js.map +1 -1
  19. package/dist/behavior-learner.js +1 -0
  20. package/dist/behavior-learner.js.map +1 -1
  21. package/dist/behavior-signals.js +1 -0
  22. package/dist/bootstrap.d.ts +6 -4
  23. package/dist/bootstrap.js +1 -0
  24. package/dist/boxes.js +1 -0
  25. package/dist/briefing.d.ts +9 -5
  26. package/dist/briefing.js +10 -6
  27. package/dist/buffer-surprise-report.js +1 -0
  28. package/dist/buffer-surprise.js +1 -0
  29. package/dist/buffer.d.ts +1 -1
  30. package/dist/buffer.js +1 -0
  31. package/dist/calibration.d.ts +8 -1
  32. package/dist/calibration.js +10 -2
  33. package/dist/calibration.js.map +1 -1
  34. package/dist/capsule-cli.d.ts +137 -0
  35. package/dist/capsule-cli.js +34 -0
  36. package/dist/capsule-crypto-5CYAGVC5.js +18 -0
  37. package/dist/capsule-export-NZQPOTQ4.js +17 -0
  38. package/dist/capsule-export-NZQPOTQ4.js.map +1 -0
  39. package/dist/capsule-import-SDCUXLEV.js +16 -0
  40. package/dist/capsule-import-SDCUXLEV.js.map +1 -0
  41. package/dist/capsule-merge-DI7PNQ2H.js +189 -0
  42. package/dist/capsule-merge-DI7PNQ2H.js.map +1 -0
  43. package/dist/causal-behavior.js +1 -0
  44. package/dist/causal-behavior.js.map +1 -1
  45. package/dist/causal-chain.js +1 -0
  46. package/dist/causal-consolidation.js +12 -9
  47. package/dist/causal-consolidation.js.map +1 -1
  48. package/dist/causal-retrieval.js +2 -1
  49. package/dist/causal-retrieval.js.map +1 -1
  50. package/dist/causal-trajectory-graph.js +4 -1
  51. package/dist/causal-trajectory-graph.js.map +1 -1
  52. package/dist/causal-trajectory.js +2 -1
  53. package/dist/chunk-2LSZVONP.js +67 -0
  54. package/dist/chunk-2LSZVONP.js.map +1 -0
  55. package/dist/chunk-32KD5IHZ.js +245 -0
  56. package/dist/chunk-32KD5IHZ.js.map +1 -0
  57. package/dist/{chunk-VDX363PS.js → chunk-34F3PLWZ.js} +10 -3
  58. package/dist/chunk-34F3PLWZ.js.map +1 -0
  59. package/dist/chunk-3KIS4VGT.js +228 -0
  60. package/dist/chunk-3KIS4VGT.js.map +1 -0
  61. package/dist/chunk-3LCWFNVS.js +350 -0
  62. package/dist/chunk-3LCWFNVS.js.map +1 -0
  63. package/dist/chunk-43EKP2UK.js +26 -0
  64. package/dist/chunk-43EKP2UK.js.map +1 -0
  65. package/dist/chunk-457A4P3L.js +119 -0
  66. package/dist/chunk-457A4P3L.js.map +1 -0
  67. package/dist/{chunk-KUB6JU6H.js → chunk-47WOM4YW.js} +2 -2
  68. package/dist/{chunk-HK3FGIEW.js → chunk-4PLGJRBV.js} +656 -20
  69. package/dist/chunk-4PLGJRBV.js.map +1 -0
  70. package/dist/{chunk-BGJGXLZ7.js → chunk-55FXRRSJ.js} +11 -8
  71. package/dist/chunk-55FXRRSJ.js.map +1 -0
  72. package/dist/{chunk-ULYOGL6R.js → chunk-5HRY2WRF.js} +7 -3
  73. package/dist/chunk-5HRY2WRF.js.map +1 -0
  74. package/dist/chunk-6TBWYBJ3.js +236 -0
  75. package/dist/chunk-6TBWYBJ3.js.map +1 -0
  76. package/dist/chunk-74EMIVE4.js +329 -0
  77. package/dist/chunk-74EMIVE4.js.map +1 -0
  78. package/dist/chunk-74WWN7ZW.js +82 -0
  79. package/dist/chunk-74WWN7ZW.js.map +1 -0
  80. package/dist/{chunk-B5WXLVDY.js → chunk-7GCMLT7J.js} +245 -25
  81. package/dist/chunk-7GCMLT7J.js.map +1 -0
  82. package/dist/chunk-A6XUJE5D.js +126 -0
  83. package/dist/chunk-A6XUJE5D.js.map +1 -0
  84. package/dist/chunk-AJA46VX5.js +393 -0
  85. package/dist/chunk-AJA46VX5.js.map +1 -0
  86. package/dist/{chunk-DFTTJYSO.js → chunk-AKUCB2OG.js} +525 -24
  87. package/dist/chunk-AKUCB2OG.js.map +1 -0
  88. package/dist/chunk-ASIQZXYO.js +277 -0
  89. package/dist/chunk-ASIQZXYO.js.map +1 -0
  90. package/dist/{chunk-ZEM3OK2K.js → chunk-B2TL6GA2.js} +3 -3
  91. package/dist/chunk-BJMBJZ2Y.js +290 -0
  92. package/dist/chunk-BJMBJZ2Y.js.map +1 -0
  93. package/dist/chunk-BT7NVCML.js +79 -0
  94. package/dist/chunk-BT7NVCML.js.map +1 -0
  95. package/dist/chunk-CK5NTM2S.js +454 -0
  96. package/dist/chunk-CK5NTM2S.js.map +1 -0
  97. package/dist/{chunk-3GXCSUXR.js → chunk-CRU27Q4J.js} +2 -2
  98. package/dist/{chunk-F5VP6YCB.js → chunk-DCE6SQLA.js} +572 -155
  99. package/dist/chunk-DCE6SQLA.js.map +1 -0
  100. package/dist/{chunk-CUPFXL3J.js → chunk-DHRQHX36.js} +4 -4
  101. package/dist/chunk-DHRQHX36.js.map +1 -0
  102. package/dist/{chunk-GKFXUTJ2.js → chunk-DR7MCMPS.js} +981 -61
  103. package/dist/chunk-DR7MCMPS.js.map +1 -0
  104. package/dist/chunk-FP2373TW.js +149 -0
  105. package/dist/chunk-FP2373TW.js.map +1 -0
  106. package/dist/{chunk-RBBWYEFJ.js → chunk-G2WADRQ3.js} +1 -1
  107. package/dist/chunk-G7D6GZ5J.js +48 -0
  108. package/dist/chunk-G7D6GZ5J.js.map +1 -0
  109. package/dist/chunk-H7XKCNR6.js +60 -0
  110. package/dist/chunk-H7XKCNR6.js.map +1 -0
  111. package/dist/{chunk-VYM3VWOF.js → chunk-IM3JSE73.js} +966 -329
  112. package/dist/chunk-IM3JSE73.js.map +1 -0
  113. package/dist/chunk-IXEJRKCZ.js +18 -0
  114. package/dist/chunk-IXEJRKCZ.js.map +1 -0
  115. package/dist/chunk-IYY4MCPG.js +275 -0
  116. package/dist/chunk-IYY4MCPG.js.map +1 -0
  117. package/dist/{chunk-BK2EFTE2.js → chunk-JWSENLQI.js} +508 -28
  118. package/dist/chunk-JWSENLQI.js.map +1 -0
  119. package/dist/chunk-KNKUID7G.js +183 -0
  120. package/dist/chunk-KNKUID7G.js.map +1 -0
  121. package/dist/chunk-L2IO2QPY.js +2036 -0
  122. package/dist/chunk-L2IO2QPY.js.map +1 -0
  123. package/dist/{chunk-SPI27QT6.js → chunk-L5IIGA5V.js} +9 -4
  124. package/dist/chunk-L5IIGA5V.js.map +1 -0
  125. package/dist/{chunk-RGLL5SPU.js → chunk-LVYGDT5V.js} +56 -82
  126. package/dist/chunk-LVYGDT5V.js.map +1 -0
  127. package/dist/{chunk-ZAIM4TUE.js → chunk-LW2NMHDW.js} +46 -1
  128. package/dist/chunk-LW2NMHDW.js.map +1 -0
  129. package/dist/{chunk-3OGMS3PE.js → chunk-LZRYQK6L.js} +3 -2
  130. package/dist/chunk-LZRYQK6L.js.map +1 -0
  131. package/dist/chunk-MDYG7VI7.js +48 -0
  132. package/dist/chunk-MDYG7VI7.js.map +1 -0
  133. package/dist/chunk-MXC3AP5I.js +74 -0
  134. package/dist/chunk-MXC3AP5I.js.map +1 -0
  135. package/dist/{chunk-S3EEFKNY.js → chunk-N7X62G74.js} +26 -11
  136. package/dist/chunk-N7X62G74.js.map +1 -0
  137. package/dist/chunk-NN3TS5BM.js +147 -0
  138. package/dist/chunk-NN3TS5BM.js.map +1 -0
  139. package/dist/chunk-OA3L7BFR.js +183 -0
  140. package/dist/chunk-OA3L7BFR.js.map +1 -0
  141. package/dist/{chunk-LK6SGL53.js → chunk-OR64ZGRZ.js} +3 -2
  142. package/dist/chunk-OR64ZGRZ.js.map +1 -0
  143. package/dist/chunk-OZHRDTDX.js +240 -0
  144. package/dist/chunk-OZHRDTDX.js.map +1 -0
  145. package/dist/chunk-PCUKNJAZ.js +165 -0
  146. package/dist/chunk-PCUKNJAZ.js.map +1 -0
  147. package/dist/{chunk-6PFRXT4K.js → chunk-PFV5C235.js} +11 -6
  148. package/dist/chunk-PFV5C235.js.map +1 -0
  149. package/dist/chunk-PZ5AY32C.js +10 -0
  150. package/dist/chunk-PZ5AY32C.js.map +1 -0
  151. package/dist/{chunk-XZ2TIKGC.js → chunk-Q7FJ5ZHM.js} +30 -10
  152. package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
  153. package/dist/{chunk-7I7FKFZH.js → chunk-R2L7SUX2.js} +6 -6
  154. package/dist/{chunk-JL2PU6AI.js → chunk-R2XRID2N.js} +2 -2
  155. package/dist/{chunk-WCLICCGB.js → chunk-RILIVK4O.js} +91 -4
  156. package/dist/chunk-RILIVK4O.js.map +1 -0
  157. package/dist/{chunk-C2EFFULQ.js → chunk-RK2Y4XOM.js} +163 -20
  158. package/dist/chunk-RK2Y4XOM.js.map +1 -0
  159. package/dist/{chunk-TP4FZJIZ.js → chunk-RULE4VG5.js} +5 -1
  160. package/dist/chunk-RULE4VG5.js.map +1 -0
  161. package/dist/{chunk-PVPWZSSI.js → chunk-SMA4IMHV.js} +19 -3
  162. package/dist/chunk-SMA4IMHV.js.map +1 -0
  163. package/dist/{chunk-WVVA7F5A.js → chunk-SS253RXF.js} +30 -16
  164. package/dist/chunk-SS253RXF.js.map +1 -0
  165. package/dist/chunk-TUFG6VXY.js +875 -0
  166. package/dist/chunk-TUFG6VXY.js.map +1 -0
  167. package/dist/chunk-TYEOAFH3.js +251 -0
  168. package/dist/chunk-TYEOAFH3.js.map +1 -0
  169. package/dist/chunk-UKJAGEXH.js +260 -0
  170. package/dist/chunk-UKJAGEXH.js.map +1 -0
  171. package/dist/{chunk-KVBLZUKV.js → chunk-USFPPRAF.js} +93 -3
  172. package/dist/chunk-USFPPRAF.js.map +1 -0
  173. package/dist/{chunk-EPQJM2GC.js → chunk-VTJVUHRK.js} +22 -36
  174. package/dist/chunk-VTJVUHRK.js.map +1 -0
  175. package/dist/{chunk-O5ETUNBT.js → chunk-VTU2B4VF.js} +7 -3
  176. package/dist/chunk-VTU2B4VF.js.map +1 -0
  177. package/dist/chunk-WIICJPET.js +45 -0
  178. package/dist/chunk-WIICJPET.js.map +1 -0
  179. package/dist/{chunk-VBVG2M5G.js → chunk-WPGJYVUH.js} +6 -2
  180. package/dist/chunk-WPGJYVUH.js.map +1 -0
  181. package/dist/{chunk-YNQKWQT4.js → chunk-WSZIHQBK.js} +31 -11
  182. package/dist/{chunk-YNQKWQT4.js.map → chunk-WSZIHQBK.js.map} +1 -1
  183. package/dist/{chunk-NZLQTHS5.js → chunk-WW3QQF4H.js} +4 -1
  184. package/dist/chunk-WW3QQF4H.js.map +1 -0
  185. package/dist/{chunk-FVA6TGI3.js → chunk-Y3WQ4ZWK.js} +42 -2
  186. package/dist/chunk-Y3WQ4ZWK.js.map +1 -0
  187. package/dist/chunk-YNJHCGDT.js +309 -0
  188. package/dist/chunk-YNJHCGDT.js.map +1 -0
  189. package/dist/{chunk-ALXMCZEU.js → chunk-Z2E7VW55.js} +6 -3
  190. package/dist/chunk-Z2E7VW55.js.map +1 -0
  191. package/dist/{chunk-INXV5JBT.js → chunk-ZGXSCMQN.js} +1992 -410
  192. package/dist/chunk-ZGXSCMQN.js.map +1 -0
  193. package/dist/{chunk-W6SL7OFG.js → chunk-ZTSE2ZJ6.js} +12 -2
  194. package/dist/{chunk-W6SL7OFG.js.map → chunk-ZTSE2ZJ6.js.map} +1 -1
  195. package/dist/chunking.js +1 -0
  196. package/dist/cipher-GVE2GQ5H.js +28 -0
  197. package/dist/cipher-GVE2GQ5H.js.map +1 -0
  198. package/dist/citations.js +1 -0
  199. package/dist/{cli-BkeRaYfk.d.ts → cli-x2APT9a6.d.ts} +26 -7
  200. package/dist/cli.d.ts +11 -6
  201. package/dist/cli.js +68 -34
  202. package/dist/codex-thread-key.js +1 -0
  203. package/dist/commitment-ledger.js +1 -0
  204. package/dist/compression-optimizer.js +1 -0
  205. package/dist/config.d.ts +2 -1
  206. package/dist/config.js +5 -2
  207. package/dist/connectors-cli-DFGtY2DB.d.ts +257 -0
  208. package/dist/connectors-cli.d.ts +2 -0
  209. package/dist/connectors-cli.js +22 -0
  210. package/dist/connectors-cli.js.map +1 -0
  211. package/dist/consolidation-operator.d.ts +65 -5
  212. package/dist/consolidation-operator.js +6 -1
  213. package/dist/consolidation-provenance-check.d.ts +1 -1
  214. package/dist/consolidation-provenance-check.js +3 -2
  215. package/dist/consolidation-undo.d.ts +1 -1
  216. package/dist/consolidation-undo.js +1 -0
  217. package/dist/consolidation-undo.js.map +1 -1
  218. package/dist/{contradiction-review-WIUBAR52.js → contradiction-review-5LTTVDQV.js} +2 -1
  219. package/dist/contradiction-review-5LTTVDQV.js.map +1 -0
  220. package/dist/{contradiction-scan-E3GJTI4F.js → contradiction-scan-3Z6YW7YA.js} +2 -1
  221. package/dist/{contradiction-scan-E3GJTI4F.js.map → contradiction-scan-3Z6YW7YA.js.map} +1 -1
  222. package/dist/cross-namespace-budget.js +1 -0
  223. package/dist/cue-anchors.js +1 -0
  224. package/dist/dashboard-runtime.js +1 -0
  225. package/dist/day-summary.js +1 -0
  226. package/dist/delinearize.js +1 -0
  227. package/dist/direct-answer-wiring.js +1 -0
  228. package/dist/direct-answer.js +1 -0
  229. package/dist/dreams-ledger-LR2NBAZE.js +286 -0
  230. package/dist/dreams-ledger-LR2NBAZE.js.map +1 -0
  231. package/dist/embedding-fallback.js +3 -1
  232. package/dist/{engine-F3GOXGE5.js → engine-ICC2DSQF.js} +10 -7
  233. package/dist/engine-ICC2DSQF.js.map +1 -0
  234. package/dist/entity-retrieval.d.ts +1 -1
  235. package/dist/entity-retrieval.js +9 -6
  236. package/dist/entity-schema.js +1 -0
  237. package/dist/evals.js +1 -0
  238. package/dist/evidence-pack.d.ts +16 -0
  239. package/dist/evidence-pack.js +8 -0
  240. package/dist/evidence-pack.js.map +1 -0
  241. package/dist/explicit-capture.d.ts +6 -4
  242. package/dist/explicit-capture.js +1 -0
  243. package/dist/extraction-judge-telemetry.js +1 -0
  244. package/dist/extraction-judge-training.js +1 -0
  245. package/dist/extraction-judge.js +1 -0
  246. package/dist/extraction.js +9 -8
  247. package/dist/fallback-llm.js +3 -2
  248. package/dist/first-start-migration-4MHQEOSD.js +263 -0
  249. package/dist/first-start-migration-4MHQEOSD.js.map +1 -0
  250. package/dist/forget-PLR6J5DN.js +69 -0
  251. package/dist/forget-PLR6J5DN.js.map +1 -0
  252. package/dist/framework-CyHYDcri.d.ts +153 -0
  253. package/dist/fs-utils-IRVUFB6G.js +30 -0
  254. package/dist/fs-utils-IRVUFB6G.js.map +1 -0
  255. package/dist/graph-dashboard-diff.js +1 -0
  256. package/dist/graph-dashboard-key.js +1 -0
  257. package/dist/graph-dashboard-parser.js +1 -0
  258. package/dist/graph-edge-decay-PWB63GRE.js +207 -0
  259. package/dist/graph-edge-decay-PWB63GRE.js.map +1 -0
  260. package/dist/graph-edge-reinforcement.d.ts +81 -0
  261. package/dist/graph-edge-reinforcement.js +24 -0
  262. package/dist/graph-edge-reinforcement.js.map +1 -0
  263. package/dist/graph-events.d.ts +87 -0
  264. package/dist/graph-events.js +14 -0
  265. package/dist/graph-events.js.map +1 -0
  266. package/dist/graph-recall.js +1 -0
  267. package/dist/graph-retrieval.js +1 -0
  268. package/dist/graph-snapshot.d.ts +112 -0
  269. package/dist/graph-snapshot.js +19 -0
  270. package/dist/graph-snapshot.js.map +1 -0
  271. package/dist/graph.d.ts +105 -7
  272. package/dist/graph.js +20 -3
  273. package/dist/harmonic-retrieval.js +1 -0
  274. package/dist/himem.js +1 -0
  275. package/dist/hygiene.js +1 -0
  276. package/dist/identity-continuity.js +1 -0
  277. package/dist/importance.js +1 -0
  278. package/dist/index.d.ts +562 -13
  279. package/dist/index.js +365 -96
  280. package/dist/index.js.map +1 -1
  281. package/dist/intent.js +1 -0
  282. package/dist/json-extract.js +1 -0
  283. package/dist/json-store.js +1 -0
  284. package/dist/kdf-7S6RWKLZ.js +26 -0
  285. package/dist/kdf-7S6RWKLZ.js.map +1 -0
  286. package/dist/legacy-hook-compat.js +1 -0
  287. package/dist/legacy-hook-compat.js.map +1 -1
  288. package/dist/lifecycle.js +1 -0
  289. package/dist/live-connectors-runner.d.ts +48 -0
  290. package/dist/live-connectors-runner.js +17 -0
  291. package/dist/live-connectors-runner.js.map +1 -0
  292. package/dist/local-llm.js +3 -2
  293. package/dist/logger.js +1 -0
  294. package/dist/memory-action-policy.js +1 -0
  295. package/dist/memory-cache.d.ts +2 -1
  296. package/dist/memory-cache.js +4 -1
  297. package/dist/memory-governance-KG52RITE.js +37 -0
  298. package/dist/memory-governance-KG52RITE.js.map +1 -0
  299. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  300. package/dist/memory-lifecycle-ledger-utils.js +4 -1
  301. package/dist/memory-projection-format.js +1 -0
  302. package/dist/{memory-projection-store-DeSXPh1j.d.ts → memory-projection-store-D3vBHS4J.d.ts} +1 -0
  303. package/dist/memory-projection-store.d.ts +1 -1
  304. package/dist/memory-projection-store.js +1 -0
  305. package/dist/memory-worth-bench.js +1 -0
  306. package/dist/memory-worth-bench.js.map +1 -1
  307. package/dist/memory-worth-filter.js +1 -0
  308. package/dist/memory-worth-outcomes.d.ts +1 -1
  309. package/dist/memory-worth-outcomes.js +1 -0
  310. package/dist/memory-worth.js +1 -0
  311. package/dist/metadata-FC3XPDRQ.js +21 -0
  312. package/dist/metadata-FC3XPDRQ.js.map +1 -0
  313. package/dist/migrate-from-identity-anchor-TTEDEJGX.js +8 -0
  314. package/dist/migrate-from-identity-anchor-TTEDEJGX.js.map +1 -0
  315. package/dist/model-registry.js +1 -0
  316. package/dist/models-json.js +1 -0
  317. package/dist/native-knowledge.js +1 -0
  318. package/dist/negative.js +1 -0
  319. package/dist/objective-state-writers.js +1 -0
  320. package/dist/objective-state-writers.js.map +1 -1
  321. package/dist/objective-state.js +1 -0
  322. package/dist/openai-chat-compat.js +1 -0
  323. package/dist/operator-toolkit.d.ts +46 -2
  324. package/dist/operator-toolkit.js +29 -17
  325. package/dist/opik-exporter.js +1 -0
  326. package/dist/opik-exporter.js.map +1 -1
  327. package/dist/{orchestrator-CmJ-NTdJ.d.ts → orchestrator-ChkesB8U.d.ts} +177 -13
  328. package/dist/orchestrator.d.ts +6 -4
  329. package/dist/orchestrator.js +58 -42
  330. package/dist/page-versioning.js +1 -0
  331. package/dist/path-RMTY5Y5A.js +9 -0
  332. package/dist/path-RMTY5Y5A.js.map +1 -0
  333. package/dist/patterns-cli.d.ts +160 -0
  334. package/dist/patterns-cli.js +29 -0
  335. package/dist/patterns-cli.js.map +1 -0
  336. package/dist/peers-6OSQ3NK6.js +44 -0
  337. package/dist/peers-6OSQ3NK6.js.map +1 -0
  338. package/dist/plugin-id.js +1 -0
  339. package/dist/policy-runtime.js +1 -0
  340. package/dist/{port-BADbLZU5.d.ts → port-hqGnoStS.d.ts} +6 -0
  341. package/dist/profiling.js +1 -0
  342. package/dist/purge-6ATBGT77.js +205 -0
  343. package/dist/purge-6ATBGT77.js.map +1 -0
  344. package/dist/qmd-recall-cache.d.ts +1 -1
  345. package/dist/qmd-recall-cache.js +1 -0
  346. package/dist/qmd.d.ts +2 -1
  347. package/dist/qmd.js +4 -3
  348. package/dist/reasoning-trace-recall.js +1 -0
  349. package/dist/reasoning-trace-types.js +1 -0
  350. package/dist/recall-audit-anomaly.js +1 -0
  351. package/dist/recall-audit.js +1 -0
  352. package/dist/recall-disclosure-escalation.d.ts +84 -0
  353. package/dist/recall-disclosure-escalation.js +14 -0
  354. package/dist/recall-disclosure-escalation.js.map +1 -0
  355. package/dist/recall-explain-renderer.js +4 -1
  356. package/dist/recall-mmr.js +1 -0
  357. package/dist/recall-qos.js +1 -0
  358. package/dist/recall-query-policy.js +1 -0
  359. package/dist/recall-state.d.ts +7 -0
  360. package/dist/recall-state.js +2 -1
  361. package/dist/recall-tag-filter.d.ts +56 -0
  362. package/dist/recall-tag-filter.js +14 -0
  363. package/dist/recall-tag-filter.js.map +1 -0
  364. package/dist/recall-tokenization.js +1 -0
  365. package/dist/recall-xray-cli.d.ts +9 -2
  366. package/dist/recall-xray-cli.js +9 -4
  367. package/dist/recall-xray-renderer.js +4 -1
  368. package/dist/recall-xray.d.ts +116 -2
  369. package/dist/recall-xray.js +9 -3
  370. package/dist/reconstruct.js +1 -0
  371. package/dist/release-changelog.js +2 -0
  372. package/dist/release-changelog.js.map +1 -1
  373. package/dist/relevance.js +1 -0
  374. package/dist/rerank.js +1 -0
  375. package/dist/{resolution-QBTDHTG7.js → resolution-YGIBORXI.js} +2 -1
  376. package/dist/{resolution-QBTDHTG7.js.map → resolution-YGIBORXI.js.map} +1 -1
  377. package/dist/resolve-auth-token.d.ts +51 -0
  378. package/dist/resolve-auth-token.js +12 -0
  379. package/dist/resolve-auth-token.js.map +1 -0
  380. package/dist/resolve-provider-secret.d.ts +13 -1
  381. package/dist/resolve-provider-secret.js +6 -1
  382. package/dist/resume-bundles.js +5 -4
  383. package/dist/retrieval-agents.d.ts +1 -1
  384. package/dist/retrieval-agents.js +1 -0
  385. package/dist/retrieval-tiers.js +1 -0
  386. package/dist/retrieval.js +1 -0
  387. package/dist/sanitize.js +1 -0
  388. package/dist/schemas.d.ts +15 -2
  389. package/dist/schemas.js +2 -1
  390. package/dist/sdk-compat.js +1 -0
  391. package/dist/sdk-compat.js.map +1 -1
  392. package/dist/secure-store-4R2GSO7S.js +156 -0
  393. package/dist/secure-store-4R2GSO7S.js.map +1 -0
  394. package/dist/semantic-chunking.js +1 -0
  395. package/dist/{semantic-consolidation-CxJU6MJk.d.ts → semantic-consolidation-ByBXb-sf.d.ts} +3 -3
  396. package/dist/semantic-consolidation.d.ts +2 -2
  397. package/dist/semantic-consolidation.js +12 -6
  398. package/dist/semantic-rule-promotion.d.ts +1 -1
  399. package/dist/semantic-rule-promotion.js +9 -6
  400. package/dist/semantic-rule-verifier.d.ts +1 -1
  401. package/dist/semantic-rule-verifier.js +9 -6
  402. package/dist/session-integrity.js +1 -0
  403. package/dist/session-observer-bands.js +1 -0
  404. package/dist/session-observer-state.js +1 -0
  405. package/dist/session-toggles.js +2 -0
  406. package/dist/session-toggles.js.map +1 -1
  407. package/dist/signal.js +1 -0
  408. package/dist/skills-registry.js +2 -0
  409. package/dist/skills-registry.js.map +1 -1
  410. package/dist/source-attribution.js +1 -0
  411. package/dist/state-NCHQ4TRG.js +8 -0
  412. package/dist/state-NCHQ4TRG.js.map +1 -0
  413. package/dist/state-store-3EH7HYIN.js +16 -0
  414. package/dist/state-store-3EH7HYIN.js.map +1 -0
  415. package/dist/storage.d.ts +76 -2
  416. package/dist/storage.js +8 -5
  417. package/dist/store-contract.js +1 -0
  418. package/dist/summarizer.js +6 -5
  419. package/dist/summary-snapshot.js +1 -0
  420. package/dist/temporal-index.js +1 -0
  421. package/dist/temporal-supersession.d.ts +1 -1
  422. package/dist/temporal-supersession.js +2 -1
  423. package/dist/temporal-validity.d.ts +52 -0
  424. package/dist/temporal-validity.js +14 -0
  425. package/dist/temporal-validity.js.map +1 -0
  426. package/dist/threading.js +1 -0
  427. package/dist/tier-migration.d.ts +2 -2
  428. package/dist/tier-migration.js +1 -0
  429. package/dist/tier-routing.js +1 -0
  430. package/dist/tier-stats-62ZVDFKS.js +152 -0
  431. package/dist/tier-stats-62ZVDFKS.js.map +1 -0
  432. package/dist/tmt.js +1 -0
  433. package/dist/tokens.js +3 -1
  434. package/dist/topics.js +1 -0
  435. package/dist/trace-C5ETWBEF.js +290 -0
  436. package/dist/trace-C5ETWBEF.js.map +1 -0
  437. package/dist/transcript.js +1 -0
  438. package/dist/trust-zones.js +1 -0
  439. package/dist/tui-RI7P6PBS.js +13 -0
  440. package/dist/tui-RI7P6PBS.js.map +1 -0
  441. package/dist/types-V3FJ26TF.js +30 -0
  442. package/dist/types-V3FJ26TF.js.map +1 -0
  443. package/dist/types.d.ts +634 -9
  444. package/dist/types.js +10 -3
  445. package/dist/utility-learner.js +1 -0
  446. package/dist/utility-runtime.js +1 -0
  447. package/dist/utility-telemetry.js +1 -0
  448. package/dist/verified-recall.js +9 -6
  449. package/dist/version-utils.js +1 -0
  450. package/dist/whitespace.js +1 -0
  451. package/dist/work-product-ledger.js +1 -0
  452. package/package.json +2 -1
  453. package/dist/access-service-Br8ZydTK.d.ts +0 -827
  454. package/dist/chunk-3OGMS3PE.js.map +0 -1
  455. package/dist/chunk-6PFRXT4K.js.map +0 -1
  456. package/dist/chunk-ALXMCZEU.js.map +0 -1
  457. package/dist/chunk-B5WXLVDY.js.map +0 -1
  458. package/dist/chunk-BGJGXLZ7.js.map +0 -1
  459. package/dist/chunk-BK2EFTE2.js.map +0 -1
  460. package/dist/chunk-C2EFFULQ.js.map +0 -1
  461. package/dist/chunk-CUPFXL3J.js.map +0 -1
  462. package/dist/chunk-DFTTJYSO.js.map +0 -1
  463. package/dist/chunk-EPQJM2GC.js.map +0 -1
  464. package/dist/chunk-F5VP6YCB.js.map +0 -1
  465. package/dist/chunk-FVA6TGI3.js.map +0 -1
  466. package/dist/chunk-GKFXUTJ2.js.map +0 -1
  467. package/dist/chunk-HK3FGIEW.js.map +0 -1
  468. package/dist/chunk-INXV5JBT.js.map +0 -1
  469. package/dist/chunk-KVBLZUKV.js.map +0 -1
  470. package/dist/chunk-LK6SGL53.js.map +0 -1
  471. package/dist/chunk-LTCGGW2D.js +0 -14
  472. package/dist/chunk-LTCGGW2D.js.map +0 -1
  473. package/dist/chunk-NZLQTHS5.js.map +0 -1
  474. package/dist/chunk-O5ETUNBT.js.map +0 -1
  475. package/dist/chunk-PVPWZSSI.js.map +0 -1
  476. package/dist/chunk-RGLL5SPU.js.map +0 -1
  477. package/dist/chunk-S3EEFKNY.js.map +0 -1
  478. package/dist/chunk-SPI27QT6.js.map +0 -1
  479. package/dist/chunk-TP4FZJIZ.js.map +0 -1
  480. package/dist/chunk-ULYOGL6R.js.map +0 -1
  481. package/dist/chunk-VBVG2M5G.js.map +0 -1
  482. package/dist/chunk-VDX363PS.js.map +0 -1
  483. package/dist/chunk-VYM3VWOF.js.map +0 -1
  484. package/dist/chunk-WCLICCGB.js.map +0 -1
  485. package/dist/chunk-WVVA7F5A.js.map +0 -1
  486. package/dist/chunk-X6GF3FX2.js +0 -26
  487. package/dist/chunk-X6GF3FX2.js.map +0 -1
  488. package/dist/chunk-XZ2TIKGC.js.map +0 -1
  489. package/dist/chunk-ZAIM4TUE.js.map +0 -1
  490. /package/dist/{contradiction-review-WIUBAR52.js.map → capsule-cli.js.map} +0 -0
  491. /package/dist/{engine-F3GOXGE5.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  492. /package/dist/{chunk-KUB6JU6H.js.map → chunk-47WOM4YW.js.map} +0 -0
  493. /package/dist/{chunk-ZEM3OK2K.js.map → chunk-B2TL6GA2.js.map} +0 -0
  494. /package/dist/{chunk-3GXCSUXR.js.map → chunk-CRU27Q4J.js.map} +0 -0
  495. /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
  496. /package/dist/{chunk-7I7FKFZH.js.map → chunk-R2L7SUX2.js.map} +0 -0
  497. /package/dist/{chunk-JL2PU6AI.js.map → chunk-R2XRID2N.js.map} +0 -0
package/dist/types.d.ts CHANGED
@@ -1,3 +1,54 @@
1
+ /**
2
+ * dreams-ledger.ts — per-phase telemetry for the Dreams consolidation pipeline.
3
+ *
4
+ * Every scheduled or manual phase run appends one JSONL entry to
5
+ * <memoryDir>/state/dreams-ledger.jsonl
6
+ *
7
+ * The entry records which phase ran, how long it took, and a small
8
+ * itemsProcessed counter so `remnic dreams status` can aggregate the last
9
+ * 24-hour window without scanning the full memory corpus.
10
+ *
11
+ * This module is intentionally side-effect-free on import (no fs calls at
12
+ * module load time) so tests can import it without touching the filesystem.
13
+ */
14
+ /** The three named phases of the Dreams consolidation pipeline. */
15
+ type DreamsPhase = "lightSleep" | "rem" | "deepSleep";
16
+ /** Aggregated stats for a single phase over a time window. */
17
+ interface DreamsPhaseStatus {
18
+ phase: DreamsPhase;
19
+ /** Number of phase runs in the window. */
20
+ runCount: number;
21
+ /** Total wall-clock milliseconds across all runs in the window. */
22
+ totalDurationMs: number;
23
+ /** Total items processed across all runs in the window. */
24
+ totalItemsProcessed: number;
25
+ /** ISO-8601 timestamp of the most recent completed run, or null if none. */
26
+ lastRunAt: string | null;
27
+ /** Duration of the most recent run in ms, or null if none. */
28
+ lastDurationMs: number | null;
29
+ }
30
+ /** Shape returned by `getDreamsStatus` — the canonical telemetry response. */
31
+ interface DreamsStatusResult {
32
+ /** ISO-8601 start of the query window (inclusive). */
33
+ windowStart: string;
34
+ /** ISO-8601 end of the query window (exclusive). */
35
+ windowEnd: string;
36
+ /** Per-phase summaries, always present for all three phases. */
37
+ phases: {
38
+ lightSleep: DreamsPhaseStatus;
39
+ rem: DreamsPhaseStatus;
40
+ deepSleep: DreamsPhaseStatus;
41
+ };
42
+ }
43
+ /** Public result shape — identical to what HTTP, MCP, and CLI surfaces expose. */
44
+ interface DreamsRunResult {
45
+ phase: DreamsPhase;
46
+ dryRun: boolean;
47
+ durationMs: number;
48
+ itemsProcessed: number;
49
+ notes?: string;
50
+ }
51
+
1
52
  type ReasoningEffort = "none" | "low" | "medium" | "high";
2
53
  type TriggerMode = "smart" | "every_n" | "time_based";
3
54
  type SignalLevel = "none" | "low" | "medium" | "high";
@@ -12,6 +63,20 @@ type IdentityInjectionMode = "recovery_only" | "minimal" | "full";
12
63
  type CaptureMode = "implicit" | "explicit" | "hybrid";
13
64
  type MemoryOsPresetName = "conservative" | "balanced" | "research-max" | "local-llm-heavy";
14
65
  type ExtractionPassSource = "base" | "proactive";
66
+ /**
67
+ * Scope classification for extracted facts (issue #XXX).
68
+ *
69
+ * - `"project"` — knowledge specific to one codebase: file paths, environment
70
+ * configs, deployment details, project-specific workarounds, team/stakeholder
71
+ * info tied to one project.
72
+ * - `"global"` — knowledge that applies across projects: core framework bugs,
73
+ * library behavior, API patterns, user preferences, tool configurations,
74
+ * general coding patterns, infrastructure knowledge.
75
+ *
76
+ * Default is `"project"` when a coding context is active, `"global"` when no
77
+ * coding context is present.
78
+ */
79
+ type MemoryScope = "project" | "global";
15
80
  type SlotMismatchMode = "error" | "warn" | "silent";
16
81
  type CodexCompactionFlushMode = "signal" | "heuristic" | "auto";
17
82
  type DreamingNarrativePromptStyle = "reflective" | "diary" | "analytical";
@@ -48,6 +113,41 @@ interface RecallTierExplain {
48
113
  lineRange?: [number, number];
49
114
  }>;
50
115
  }
116
+ /**
117
+ * Recall disclosure depth (issue #677). Selects how much content each
118
+ * recall result returns:
119
+ *
120
+ * - `"chunk"` — semantic chunk excerpt (cheapest; default).
121
+ * - `"section"` — full markdown section / memory body (current pre-#677 behavior).
122
+ * - `"raw"` — raw transcript / archive excerpts from `lcm/` when present.
123
+ *
124
+ * Disclosure is **orthogonal** to the retrieval-tier ladder
125
+ * (`RetrievalTier` / `RETRIEVAL_TIERS`). The tier ladder controls *which
126
+ * pipeline stage served a result*; disclosure controls *how deep into the
127
+ * underlying memory the result reaches*. A request can mix any retrieval
128
+ * tier with any disclosure depth.
129
+ *
130
+ * Default is `"chunk"` when the caller omits the field; this preserves the
131
+ * existing recall behavior because callers that did not request a disclosure
132
+ * level continue to receive the same chunk-shaped previews they always had.
133
+ * Surfaces (CLI / HTTP / MCP) and downstream telemetry are wired in later
134
+ * PRs of #677.
135
+ */
136
+ type RecallDisclosure = "chunk" | "section" | "raw";
137
+ /**
138
+ * Ordered list of disclosure levels, cheapest to most expensive. Used for
139
+ * validation, escalation policy comparisons, and future telemetry rollups.
140
+ * Treat this as the single source of truth — do not hard-code disclosure
141
+ * strings elsewhere.
142
+ */
143
+ declare const RECALL_DISCLOSURE_LEVELS: readonly RecallDisclosure[];
144
+ /**
145
+ * Default disclosure level when a caller omits `disclosure`. Set to `chunk`
146
+ * so callers that did not opt in to deeper disclosure see the same
147
+ * preview-shaped behavior as before #677.
148
+ */
149
+ declare const DEFAULT_RECALL_DISCLOSURE: RecallDisclosure;
150
+ declare function isRecallDisclosure(value: unknown): value is RecallDisclosure;
51
151
  interface RecallSectionConfig {
52
152
  id: string;
53
153
  enabled?: boolean;
@@ -131,11 +231,33 @@ interface NativeKnowledgeOpenClawWorkspaceConfig {
131
231
  excludeGlobs: string[];
132
232
  sharedSafeGlobs: string[];
133
233
  }
234
+ /**
235
+ * OpenClaw SecretRef shape (issue #757).
236
+ *
237
+ * OpenClaw resolves these at runtime via its built-in secret resolver
238
+ * (e.g. exec providers like `kc_*` for macOS Keychain). Plugins receive
239
+ * the raw object in `pluginConfig` and must call the gateway's resolver
240
+ * before using the value. Standalone Remnic does NOT resolve SecretRefs;
241
+ * operators must use plain strings or `${ENV_VAR}` expansion instead.
242
+ */
243
+ interface SecretRef {
244
+ source: string;
245
+ provider?: string;
246
+ id?: string;
247
+ command?: unknown;
248
+ [key: string]: unknown;
249
+ }
250
+ type AgentAccessAuthToken = string | SecretRef;
134
251
  interface AgentAccessHttpConfig {
135
252
  enabled: boolean;
136
253
  host: string;
137
254
  port: number;
138
- authToken?: string;
255
+ /**
256
+ * Bearer token. Either a literal string (env-expanded) or an unresolved
257
+ * SecretRef object preserved verbatim from openclaw.json — resolved at
258
+ * service-start time via {@link resolveAgentAccessAuthToken}.
259
+ */
260
+ authToken?: AgentAccessAuthToken;
139
261
  principal?: string;
140
262
  maxBodyBytes: number;
141
263
  }
@@ -149,6 +271,104 @@ interface DreamingConfig {
149
271
  narrativePromptStyle: DreamingNarrativePromptStyle;
150
272
  watchFile: boolean;
151
273
  }
274
+ /**
275
+ * Light-sleep phase config (issue #678 PR 2/4).
276
+ *
277
+ * Groups existing top-level lifecycle-policy gates under a unified namespace.
278
+ * When `dreams.phases.lightSleep.*` keys are set they WIN over the legacy
279
+ * top-level keys; the legacy keys remain readable for backward compatibility.
280
+ *
281
+ * Light sleep: recent activity scoring + clustering (tier-routing value score,
282
+ * observation ledger, buffer state — `runLifecyclePolicyPass` in orchestrator).
283
+ */
284
+ interface DreamsLightSleepConfig {
285
+ /** Phase master switch. Mirrors `lifecyclePolicyEnabled` when not set explicitly. */
286
+ enabled: boolean;
287
+ /** Minimum interval between light-sleep passes in milliseconds. */
288
+ cadenceMs: number;
289
+ /** Value score above which a memory is treated as hot. Mirrors `lifecyclePromoteHeatThreshold`. */
290
+ promoteHeatThreshold: number;
291
+ /** Value score below which a memory starts to decay. Mirrors `lifecycleStaleDecayThreshold`. */
292
+ staleDecayThreshold: number;
293
+ /** Value score below which a memory is eligible for archive. Mirrors `lifecycleArchiveDecayThreshold`. */
294
+ archiveDecayThreshold: number;
295
+ /** Whether stale memories are filtered from recall. Mirrors `lifecycleFilterStaleEnabled`. */
296
+ filterStaleEnabled: boolean;
297
+ }
298
+ /**
299
+ * REM phase config (issue #678 PR 2/4).
300
+ *
301
+ * Groups existing top-level semantic-consolidation and supersession gates.
302
+ * When `dreams.phases.rem.*` keys are set they WIN over the legacy top-level
303
+ * keys.
304
+ *
305
+ * REM: cross-session synthesis, supersession resolution, semantic consolidation
306
+ * (`runSemanticConsolidation` in orchestrator).
307
+ */
308
+ interface DreamsRemConfig {
309
+ /** Phase master switch. Mirrors `semanticConsolidationEnabled` when not set explicitly. */
310
+ enabled: boolean;
311
+ /**
312
+ * How often the REM pass runs, in milliseconds.
313
+ * Derived from `semanticConsolidationIntervalHours` (×3 600 000) when not set explicitly.
314
+ */
315
+ cadenceMs: number;
316
+ /** Cosine-similarity threshold for cluster membership. Mirrors `semanticConsolidationThreshold`. */
317
+ similarityThreshold: number;
318
+ /** Minimum cluster size before consolidation runs. Mirrors `semanticConsolidationMinClusterSize`. */
319
+ minClusterSize: number;
320
+ /** Max cluster operations per run. Mirrors `semanticConsolidationMaxPerRun`. */
321
+ maxPerRun: number;
322
+ /** Minimum gap between consolidation passes (ms). Mirrors `consolidationMinIntervalMs`. */
323
+ minIntervalMs: number;
324
+ }
325
+ /**
326
+ * Deep-sleep phase config (issue #678 PR 2/4).
327
+ *
328
+ * Groups existing versioning and tier-migration gates.
329
+ * When `dreams.phases.deepSleep.*` keys are set they WIN over the legacy
330
+ * top-level keys.
331
+ *
332
+ * Deep sleep: promotion to durable memory, hot→cold tier migration,
333
+ * page-version snapshots, archive (`engram-nightly-governance` cron,
334
+ * `tier-migration.ts`, `page-versioning.ts`, `hygiene.ts`).
335
+ */
336
+ interface DreamsDeepSleepConfig {
337
+ /**
338
+ * Phase master switch. No single direct legacy mirror; defaults false unless
339
+ * an existing deep-sleep surface such as nightly governance auto-registration,
340
+ * tier migration, or page versioning is explicitly enabled. Set to `false`
341
+ * to disable those surfaces without removing legacy config keys.
342
+ */
343
+ enabled: boolean;
344
+ /** True only when dreams.phases.deepSleep.enabled was explicitly configured. */
345
+ enabledExplicitlySet?: boolean;
346
+ /**
347
+ * Minimum interval between deep-sleep passes in milliseconds.
348
+ * Informational only in PR 2; PR 4 will wire this into the cron scheduler.
349
+ */
350
+ cadenceMs: number;
351
+ /** Enable page-version snapshots on every overwrite. Mirrors `versioningEnabled`. */
352
+ versioningEnabled: boolean;
353
+ /** Max snapshots per page. Mirrors `versioningMaxPerPage`. */
354
+ versioningMaxPerPage: number;
355
+ }
356
+ /**
357
+ * Unified dreams phases config block (issue #678 PR 2/4).
358
+ *
359
+ * Operators set `dreams.phases.{lightSleep,rem,deepSleep}.*` in their plugin
360
+ * config. Values under this block WIN over the equivalent legacy top-level keys
361
+ * when both are set. Legacy keys continue to be parsed so existing configs do
362
+ * not need to change.
363
+ *
364
+ * This block is intentionally separate from `DreamingConfig` which controls the
365
+ * diary surface (`surfaces/dreams.ts`) — a different feature. See docs/dreams.md.
366
+ */
367
+ interface DreamsPhasesConfig {
368
+ lightSleep: DreamsLightSleepConfig;
369
+ rem: DreamsRemConfig;
370
+ deepSleep: DreamsDeepSleepConfig;
371
+ }
152
372
  /** Procedural memory (issue #519): mining + recall gates. All sub-features default off. */
153
373
  interface ProceduralConfig {
154
374
  enabled: boolean;
@@ -191,6 +411,17 @@ interface CodingModeConfig {
191
411
  * issue #569; declared here so the schema ships in one slice.)
192
412
  */
193
413
  branchScope: boolean;
414
+ /**
415
+ * When true (default), project-scoped and branch-scoped sessions include
416
+ * the root/default namespace in their read fallbacks so globally useful
417
+ * memories remain visible from any project. When false, project-scoped
418
+ * sessions only see their own namespace (strict isolation).
419
+ *
420
+ * CLAUDE.md #30: configuration gate for the recall fan-out to the root
421
+ * namespace. Does not affect writes — those always go to the project
422
+ * namespace only.
423
+ */
424
+ globalFallback: boolean;
194
425
  }
195
426
  /**
196
427
  * Session-scoped coding context. Produced by `resolveGitContext()` in the
@@ -401,6 +632,21 @@ interface PluginConfig {
401
632
  * Default false — enable explicitly after bench validation.
402
633
  */
403
634
  recallDirectAnswerEnabled: boolean;
635
+ /**
636
+ * Disclosure auto-escalation policy (issue #677 PR 4/4). When set to
637
+ * `"auto"`, recalls without an explicit caller-supplied disclosure
638
+ * escalate from `chunk` to `section` if the top-K confidence falls
639
+ * below {@link recallDisclosureEscalationThreshold}. `raw` is never
640
+ * auto-selected — it requires an explicit caller request. Default
641
+ * `"manual"` preserves pre-#677 behavior.
642
+ */
643
+ recallDisclosureEscalation: "manual" | "auto";
644
+ /**
645
+ * Top-K confidence threshold (in `[0, 1]`) below which auto-escalation
646
+ * promotes `chunk` → `section`. Only consulted when
647
+ * {@link recallDisclosureEscalation} is `"auto"`. Default `0.5`.
648
+ */
649
+ recallDisclosureEscalationThreshold: number;
404
650
  /**
405
651
  * Graph-based retrieval tier via Personalized PageRank (issue #559 PR 4).
406
652
  * When true, recall builds a retrieval graph from memory frontmatter
@@ -542,11 +788,40 @@ interface PluginConfig {
542
788
  activeRecallAttachRecallExplain: boolean;
543
789
  activeRecallAllowChainedActiveMemory: boolean;
544
790
  dreaming: DreamingConfig;
791
+ /**
792
+ * Unified dreams-phases config block (issue #678 PR 2/4).
793
+ * Groups existing lifecycle, REM, and deep-sleep gates under one namespace.
794
+ * Values here WIN over equivalent legacy top-level keys when set. See docs/dreams.md.
795
+ */
796
+ dreamsPhases: DreamsPhasesConfig;
545
797
  procedural: ProceduralConfig;
798
+ /**
799
+ * At-rest encryption configuration (issue #690 PR 3/4).
800
+ *
801
+ * When `secureStoreEnabled` is true, `StorageManager` reads and
802
+ * writes memory files through the `secure-fs` encryption layer.
803
+ * The store must be unlocked via `remnic secure-store unlock` before
804
+ * any recall or store operations will succeed.
805
+ *
806
+ * When `secureStoreEncryptOnWrite` is true (the default when enabled),
807
+ * every new memory write is encrypted. Set to false to pause new
808
+ * encryptions while still being able to decrypt existing files.
809
+ */
810
+ secureStoreEnabled: boolean;
811
+ /** Encrypt new writes when the secure-store is unlocked. Default true. */
812
+ secureStoreEncryptOnWrite: boolean;
546
813
  codingMode: CodingModeConfig;
547
814
  heartbeat: HeartbeatConfig;
548
815
  slotBehavior: SlotBehaviorConfig;
549
816
  codexCompat: CodexCompatConfig;
817
+ /**
818
+ * When true (default), the extraction prompt instructs the LLM to classify
819
+ * each fact as `"project"` or `"global"` scope. Global-scoped facts are
820
+ * promoted to the shared namespace so they are visible across all projects.
821
+ * When false, all facts go to whatever namespace the session is in (pre-
822
+ * scope-classification behavior). Rule 30: configuration gate.
823
+ */
824
+ extractionScopeClassificationEnabled: boolean;
550
825
  /** Enable the LLM-as-judge fact-worthiness gate on extracted facts. Default false (opt-in). */
551
826
  extractionJudgeEnabled: boolean;
552
827
  /** Model override for the judge LLM. Empty string means use the local model. */
@@ -657,6 +932,82 @@ interface PluginConfig {
657
932
  * `chooseConsolidationOperator`. Issue #561 PR 3.
658
933
  */
659
934
  operatorAwareConsolidationEnabled: boolean;
935
+ /**
936
+ * When true, the pattern-reinforcement maintenance job runs on its
937
+ * configured cadence and clusters duplicate non-procedural memories
938
+ * by normalized content. Clusters with `>= patternReinforcementMinCount`
939
+ * members produce a canonical (most-recent) memory tagged with
940
+ * `reinforcement_count` + `last_reinforced_at`; the older duplicates
941
+ * are marked `superseded` and pointed at the canonical. Default
942
+ * `false` — opt-in until bench validation lands.
943
+ */
944
+ patternReinforcementEnabled: boolean;
945
+ /**
946
+ * Minimum interval (ms) between pattern-reinforcement runs. Default
947
+ * `7 * 24 * 60 * 60 * 1000` (7 days). Set to `0` to disable cadence
948
+ * gating (useful for tests / manual invocation).
949
+ */
950
+ patternReinforcementCadenceMs: number;
951
+ /**
952
+ * Minimum cluster size before pattern reinforcement promotes a
953
+ * canonical and supersedes duplicates. Default `3`. Clamped to
954
+ * `>= 2` at config-parse time — a "cluster of 1" is just a single
955
+ * memory and a "cluster of 0" is meaningless.
956
+ */
957
+ patternReinforcementMinCount: number;
958
+ /**
959
+ * Memory categories the pattern-reinforcement job considers.
960
+ * Default `["preference", "fact", "decision"]`. The job
961
+ * intentionally skips procedural memories so it stays disjoint from
962
+ * the procedural mining pipeline.
963
+ */
964
+ patternReinforcementCategories: string[];
965
+ /** issue #687 PR 3/4: opt-in recall score boost for reinforced memories. Default false. */
966
+ reinforcementRecallBoostEnabled: boolean;
967
+ /** Score bonus per unit of reinforcement_count. Range [0, 1]. Default 0.05. */
968
+ reinforcementRecallBoostWeight: number;
969
+ /** Maximum additive reinforcement boost per result. Range [0, 1]. Default 0.3. */
970
+ reinforcementRecallBoostMax: number;
971
+ /**
972
+ * Async peer profile reasoner — issue #679 PR 2/5.
973
+ *
974
+ * Default `false` (opt-in). When enabled, the reasoner runs after
975
+ * `runSemanticConsolidation` (the REM phase of the dreams pipeline)
976
+ * and updates per-peer profile.md files with provenance-tagged
977
+ * field updates derived from the peer's interaction log.
978
+ */
979
+ peerProfileReasonerEnabled: boolean;
980
+ /**
981
+ * Model identifier used by the peer profile reasoner. Logged for
982
+ * telemetry only — actual dispatch is via the same FallbackLlmClient
983
+ * the orchestrator uses for semantic consolidation. Default `gpt-5.2`.
984
+ */
985
+ peerProfileReasonerModel: string;
986
+ /**
987
+ * Minimum new interaction-log entries a peer must accumulate since
988
+ * the previous reasoner run before being processed again. Default 5.
989
+ * Setting to 0 forces every run to consider every peer.
990
+ */
991
+ peerProfileReasonerMinInteractions: number;
992
+ /**
993
+ * Hard cap on the total number of profile fields the reasoner will
994
+ * apply across all peers in a single run. Default 8.
995
+ */
996
+ peerProfileReasonerMaxFieldsPerRun: number;
997
+ /**
998
+ * When true, inject the active peer's profile fields into the recall
999
+ * context as a "## Peer Profile" section. Default false (opt-in,
1000
+ * Gotcha #30/#48 — least-privileged default). Requires the session's
1001
+ * peer ID to be registered via `setPeerIdForSession` before recall.
1002
+ */
1003
+ peerProfileRecallEnabled: boolean;
1004
+ /**
1005
+ * Maximum number of peer profile fields to inject per recall. Only
1006
+ * the most-recently-updated N fields are included to keep the context
1007
+ * budget predictable. Default 5. Setting to 0 disables field
1008
+ * injection even when `peerProfileRecallEnabled` is true.
1009
+ */
1010
+ peerProfileRecallMaxFields: number;
660
1011
  creationMemoryEnabled: boolean;
661
1012
  memoryUtilityLearningEnabled: boolean;
662
1013
  promotionByOutcomeEnabled: boolean;
@@ -1060,6 +1411,33 @@ interface PluginConfig {
1060
1411
  graphLateralInhibitionBeta: number;
1061
1412
  /** Number of top competing nodes considered for inhibition (default 7). */
1062
1413
  graphLateralInhibitionTopM: number;
1414
+ /** Enable the periodic graph-edge confidence decay job. Default false (opt-in). */
1415
+ graphEdgeDecayEnabled: boolean;
1416
+ /** Cadence in milliseconds at which the cron triggers the decay job. Default 7d. */
1417
+ graphEdgeDecayCadenceMs: number;
1418
+ /** Decay window passed through to `decayEdgeConfidence`. Default 90 days. */
1419
+ graphEdgeDecayWindowMs: number;
1420
+ /** Per-window confidence drop. Default 0.1. */
1421
+ graphEdgeDecayPerWindow: number;
1422
+ /** Floor confidence will not decay below. Default 0.1. */
1423
+ graphEdgeDecayFloor: number;
1424
+ /** Confidence threshold for the "below visibility" telemetry counter. Default 0.2. */
1425
+ graphEdgeDecayVisibilityThreshold: number;
1426
+ /**
1427
+ * Issue #681 PR 3/3 — minimum edge confidence required for an edge to be
1428
+ * traversed during spreading activation. Edges with `confidence` below this
1429
+ * floor are pruned and contribute neither activation nor downstream
1430
+ * neighbors. Legacy edges without `confidence` are treated as 1.0 so they
1431
+ * always pass the floor. Range `[0, 1]`; default `0.2`.
1432
+ */
1433
+ graphTraversalConfidenceFloor: number;
1434
+ /**
1435
+ * Issue #681 PR 3/3 — number of PageRank-style refinement iterations applied
1436
+ * on top of the BFS spreading-activation scores. Each iteration redistributes
1437
+ * a node's confidence-weighted activation along its outgoing edges. Set to 0
1438
+ * to disable refinement and use raw BFS scores. Default `8`.
1439
+ */
1440
+ graphTraversalPageRankIterations: number;
1063
1441
  temporalMemoryTreeEnabled: boolean;
1064
1442
  tmtHourlyMinMemories: number;
1065
1443
  tmtSummaryMaxTokens: number;
@@ -1084,6 +1462,7 @@ interface PluginConfig {
1084
1462
  /** Briefing configuration knobs — see BriefingConfig for field docs. */
1085
1463
  briefing: BriefingConfig;
1086
1464
  codex: CodexConnectorConfig;
1465
+ connectors: LiveConnectorsConfig;
1087
1466
  /** Enable the MECE taxonomy knowledge directory. Default false. */
1088
1467
  taxonomyEnabled: boolean;
1089
1468
  /** Auto-regenerate RESOLVER.md when taxonomy changes. Default true. */
@@ -1263,6 +1642,126 @@ interface CodexConnectorConfig {
1263
1642
  */
1264
1643
  codexHome: string | null;
1265
1644
  }
1645
+ /**
1646
+ * Container for live-connector config blocks (issue #683 PR 2/N).
1647
+ *
1648
+ * Lives at `connectors.*` rather than the top level so future connectors
1649
+ * (Notion, Gmail, GitHub) can slot in without bloating `PluginConfig`.
1650
+ *
1651
+ * Every child block must default to `enabled: false` per CLAUDE.md gotcha
1652
+ * #30 (escape hatch by default) and gotcha #48 (least-privileged enum
1653
+ * defaults). Concrete connectors are also expected to short-circuit at
1654
+ * registration time when their credentials are not populated.
1655
+ */
1656
+ interface LiveConnectorsConfig {
1657
+ /** Google Drive live connector (issue #683 PR 2/N). */
1658
+ googleDrive: GoogleDriveLiveConnectorConfig;
1659
+ /** Notion live connector (issue #683 PR 3/N). */
1660
+ notion: NotionLiveConnectorConfig;
1661
+ /** Gmail live connector (issue #683 PR 4/6). */
1662
+ gmail: GmailLiveConnectorConfig;
1663
+ /** GitHub live connector (issue #683 PR 5/6). */
1664
+ github: GitHubLiveConnectorConfig;
1665
+ }
1666
+ /**
1667
+ * Operator-facing config for the Google Drive live connector. The connector
1668
+ * module itself defines a separate, *validated* `GoogleDriveConnectorConfig`
1669
+ * shape (frozen, post-validation). This interface is the pre-validation
1670
+ * shape that `parseConfig` round-trips through.
1671
+ *
1672
+ * `clientId` / `clientSecret` / `refreshToken` are stored as strings here so
1673
+ * the schema can ship in `openclaw.plugin.json` and operators can populate
1674
+ * them from a secret store (e.g. an env-substituted plist or systemd
1675
+ * EnvironmentFile). They MUST NEVER be committed to source. The repo-wide
1676
+ * privacy policy in CLAUDE.md applies.
1677
+ */
1678
+ interface GoogleDriveLiveConnectorConfig {
1679
+ /** Master gate. Default false — operators must opt in explicitly. */
1680
+ enabled: boolean;
1681
+ /** OAuth2 client id. Populate from a secret store; never commit. */
1682
+ clientId: string;
1683
+ /** OAuth2 client secret. Populate from a secret store; never commit. */
1684
+ clientSecret: string;
1685
+ /** OAuth2 refresh token. Populate from a secret store; never commit. */
1686
+ refreshToken: string;
1687
+ /** Poll interval in ms. Default 300000 (5 min); min 1000; max 86400000 (24h). */
1688
+ pollIntervalMs: number;
1689
+ /** Optional folder-id scope. Empty array = all accessible files. */
1690
+ folderIds: string[];
1691
+ }
1692
+ /**
1693
+ * Operator-facing config for the Notion live connector (issue #683 PR 3/N).
1694
+ * The connector module defines a separate validated `NotionConnectorConfig`
1695
+ * shape (frozen, post-validation). This interface is the pre-validation shape
1696
+ * that `parseConfig` round-trips through.
1697
+ *
1698
+ * `token` is stored as a string here so operators can populate it from a
1699
+ * secret store (e.g. an env-substituted plist or systemd EnvironmentFile).
1700
+ * It MUST NEVER be committed to source. The repo-wide privacy policy in
1701
+ * CLAUDE.md applies.
1702
+ */
1703
+ interface NotionLiveConnectorConfig {
1704
+ /** Master gate. Default false — operators must opt in explicitly. */
1705
+ enabled: boolean;
1706
+ /** Notion integration token. Starts with `secret_`. Populate from a secret store; never commit. */
1707
+ token: string;
1708
+ /** Array of Notion database ids to import pages from. Empty = connector is a no-op. */
1709
+ databaseIds: string[];
1710
+ /** Poll interval in ms. Default 300000 (5 min); min 1000; max 86400000 (24h). */
1711
+ pollIntervalMs: number;
1712
+ }
1713
+ /**
1714
+ * Operator-facing config for the Gmail live connector (issue #683 PR 4/6).
1715
+ * The connector module defines a separate validated `GmailConnectorConfig`
1716
+ * shape (frozen, post-validation). This interface is the pre-validation shape
1717
+ * that `parseConfig` round-trips through.
1718
+ *
1719
+ * OAuth2 credentials are stored as strings here so operators can populate
1720
+ * them from a secret store (e.g. env-substituted plist or systemd
1721
+ * EnvironmentFile). They MUST NEVER be committed to source. The repo-wide
1722
+ * privacy policy in CLAUDE.md applies.
1723
+ */
1724
+ interface GmailLiveConnectorConfig {
1725
+ /** Master gate. Default false — operators must opt in explicitly. */
1726
+ enabled: boolean;
1727
+ /** OAuth2 client id. Populate from a secret store; never commit. */
1728
+ clientId: string;
1729
+ /** OAuth2 client secret. Populate from a secret store; never commit. */
1730
+ clientSecret: string;
1731
+ /** OAuth2 refresh token issued for the Gmail scope. Populate from a secret store; never commit. */
1732
+ refreshToken: string;
1733
+ /** Gmail userId. Defaults to "me" (the authenticated user). */
1734
+ userId: string;
1735
+ /** Gmail search query applied in addition to the watermark filter. Default "in:inbox". */
1736
+ query: string;
1737
+ /** Poll interval in ms. Default 300000 (5 min); min 1000; max 86400000 (24h). */
1738
+ pollIntervalMs: number;
1739
+ }
1740
+ /**
1741
+ * Operator-facing config for the GitHub live connector (issue #683 PR 5/6).
1742
+ * The connector module defines a separate validated `GitHubConnectorConfig`
1743
+ * shape (frozen, post-validation). This interface is the pre-validation shape
1744
+ * that `parseConfig` round-trips through.
1745
+ *
1746
+ * `token` is stored as a string here so operators can populate it from a
1747
+ * secret store (e.g. an env-substituted plist or systemd EnvironmentFile).
1748
+ * It MUST NEVER be committed to source. The repo-wide privacy policy in
1749
+ * CLAUDE.md applies.
1750
+ */
1751
+ interface GitHubLiveConnectorConfig {
1752
+ /** Master gate. Default false — operators must opt in explicitly. */
1753
+ enabled: boolean;
1754
+ /** GitHub personal access token. Populate from a secret store; never commit. */
1755
+ token: string;
1756
+ /** GitHub login of the user whose comments will be imported. Required. */
1757
+ userLogin: string;
1758
+ /** Repos to poll in "owner/repo" format. Empty = connector is a no-op. */
1759
+ repos: string[];
1760
+ /** Poll interval in ms. Default 300000 (5 min); min 1000; max 86400000 (24h). */
1761
+ pollIntervalMs: number;
1762
+ /** Whether to fetch Discussion comments in addition to issue/PR comments. Default false. */
1763
+ includeDiscussions: boolean;
1764
+ }
1266
1765
  interface BootstrapOptions {
1267
1766
  dryRun?: boolean;
1268
1767
  sessionsDir?: string;
@@ -1387,7 +1886,16 @@ interface BufferSurpriseEvent {
1387
1886
  turnCountInWindow: number;
1388
1887
  }
1389
1888
  /** Memory status for lifecycle management */
1390
- type MemoryStatus = "active" | "pending_review" | "rejected" | "quarantined" | "superseded" | "archived";
1889
+ type MemoryStatus = "active" | "pending_review" | "rejected" | "quarantined" | "superseded" | "archived"
1890
+ /**
1891
+ * Operator explicitly forgot the memory (issue #686 PR 4/6). Soft
1892
+ * delete: the file stays on disk and a page-version snapshot is kept
1893
+ * so the act is reversible during a configurable retention window
1894
+ * (default 90 days), but the memory is excluded from recall, browse,
1895
+ * and entity attribution. After the retention window passes, a
1896
+ * future maintenance cron will hard-delete forgotten memories.
1897
+ */
1898
+ | "forgotten";
1391
1899
  type LifecycleState = "candidate" | "validated" | "active" | "stale" | "archived";
1392
1900
  type VerificationState = "unverified" | "user_confirmed" | "system_inferred" | "disputed";
1393
1901
  type PolicyClass = "ephemeral" | "durable" | "protected";
@@ -1419,7 +1927,7 @@ interface MemoryFrontmatter {
1419
1927
  expiresAt?: string;
1420
1928
  /** IDs of parent memories this was derived from (lineage tracking) */
1421
1929
  lineage?: string[];
1422
- /** Memory status: active (default), pending_review, rejected, quarantined, superseded, or archived */
1930
+ /** Memory status: active (default), pending_review, rejected, quarantined, superseded, archived, or forgotten */
1423
1931
  status?: MemoryStatus;
1424
1932
  /** ID of memory that superseded this one */
1425
1933
  supersededBy?: string;
@@ -1427,6 +1935,35 @@ interface MemoryFrontmatter {
1427
1935
  supersededAt?: string;
1428
1936
  /** Timestamp when archived */
1429
1937
  archivedAt?: string;
1938
+ /**
1939
+ * Explicit fact validity start (issue #680). ISO 8601 timestamp.
1940
+ *
1941
+ * When present, marks the moment at which the fact begins being
1942
+ * "true" / authoritative. When absent at read time, callers fall
1943
+ * back to `created` so legacy memories written before #680 still
1944
+ * participate in `as_of` recall filtering without a migration.
1945
+ */
1946
+ valid_at?: string;
1947
+ /**
1948
+ * Explicit fact validity end (issue #680). ISO 8601 timestamp.
1949
+ *
1950
+ * Set automatically by the temporal-supersession pipeline when a
1951
+ * newer fact supersedes this one — the value is the superseder's
1952
+ * `valid_at` (or `created` if no `valid_at` was set). May also be
1953
+ * set manually for facts that are known to expire at a specific
1954
+ * point in time.
1955
+ */
1956
+ invalid_at?: string;
1957
+ /**
1958
+ * Timestamp when the operator explicitly forgot this memory
1959
+ * (issue #686 PR 4/6). Set by `remnic forget <id>`. Memories with
1960
+ * `status === "forgotten"` are excluded from recall, browse, and
1961
+ * entity attribution; the file remains on disk until the retention
1962
+ * window passes.
1963
+ */
1964
+ forgottenAt?: string;
1965
+ /** Optional human-readable reason captured by `remnic forget --reason`. */
1966
+ forgottenReason?: string;
1430
1967
  /** Policy-driven lifecycle state used for retrieval eligibility/ranking. */
1431
1968
  lifecycleState?: LifecycleState;
1432
1969
  /** Verification provenance used by lifecycle policy. */
@@ -1492,12 +2029,35 @@ interface MemoryFrontmatter {
1492
2029
  */
1493
2030
  derived_from?: string[];
1494
2031
  /**
1495
- * Which consolidation operator produced this memory (issue #561). See
1496
- * `ConsolidationOperator` in `semantic-consolidation.ts` for the
1497
- * operator algebra. Absent on memories that were not produced by a
1498
- * consolidation pass.
2032
+ * Which consolidation operator produced this memory (issue #561,
2033
+ * extended in #687). See `ConsolidationOperator` in
2034
+ * `semantic-consolidation.ts` for the operator algebra. Absent on
2035
+ * memories that were not produced by a consolidation pass.
2036
+ *
2037
+ * `"pattern-reinforcement"` (issue #687 PR 2/4) tags memories that
2038
+ * were promoted to canonical by the pattern-reinforcement
2039
+ * maintenance job after observing the same content across
2040
+ * multiple sessions.
2041
+ */
2042
+ derived_via?: "split" | "merge" | "update" | "pattern-reinforcement";
2043
+ /**
2044
+ * Number of source memories that reinforced this canonical memory
2045
+ * (issue #687 PR 2/4). Set by the pattern-reinforcement
2046
+ * maintenance job when it clusters duplicate memories and promotes
2047
+ * the most recent member to canonical. Counts the cluster size at
2048
+ * the time of the run; subsequent runs update this monotonically.
2049
+ *
2050
+ * Always a positive integer when present. Absent on memories that
2051
+ * have not been touched by pattern reinforcement.
2052
+ */
2053
+ reinforcement_count?: number;
2054
+ /**
2055
+ * ISO 8601 timestamp recording the most recent pattern-reinforcement
2056
+ * run that touched this memory (issue #687 PR 2/4). Updated each
2057
+ * time the cluster size grows. Absent when `reinforcement_count`
2058
+ * is absent.
1499
2059
  */
1500
- derived_via?: "split" | "merge" | "update";
2060
+ last_reinforced_at?: string;
1501
2061
  }
1502
2062
  /** Memory link relationship types */
1503
2063
  type MemoryLinkType = "follows" | "references" | "contradicts" | "supports" | "related";
@@ -1543,6 +2103,62 @@ interface MemoryFile {
1543
2103
  frontmatter: MemoryFrontmatter;
1544
2104
  content: string;
1545
2105
  }
2106
+ /**
2107
+ * Public type representing the **Observation** stage in the
2108
+ * Trace → Observation → Primitive pipeline (issue #685).
2109
+ *
2110
+ * - **Trace**: raw conversation turns captured in `buffer.ts`. Noisy,
2111
+ * verbose, ephemeral.
2112
+ * - **Observation** (this type): post-extraction, importance-scored
2113
+ * fact candidate emitted by `extraction.ts` / `extraction-judge.ts`.
2114
+ * Already distilled — but not yet consolidated against the corpus.
2115
+ * - **Primitive**: the durable `MemoryFile` written by `storage.ts`,
2116
+ * reinforced over time by `compounding/engine.ts`.
2117
+ *
2118
+ * `MemoryObservation` is the named handle on the intermediate stage
2119
+ * the codebase has always produced but never publicly typed. It lets
2120
+ * callers (telemetry, doctor surfaces, tests, downstream tooling)
2121
+ * inspect the post-extraction shape without reaching into extraction
2122
+ * internals.
2123
+ *
2124
+ * Naming note: this is intentionally NOT the same as the existing
2125
+ * `state/observation-ledger/` directory, which is telemetry storage
2126
+ * for the extraction pipeline (turn-count aggregates rebuilt by
2127
+ * `maintenance/rebuild-observations.ts` and judge verdict events
2128
+ * appended by `extraction-judge-telemetry.ts`). Lifecycle events on
2129
+ * primitives — status flips, supersessions, archival, forget — live
2130
+ * in `state/memory-lifecycle-ledger.jsonl`, written by
2131
+ * `StorageManager`. A `MemoryObservation` describes the in-flight
2132
+ * candidate that became (or didn't become) a primitive; the ledger
2133
+ * directory is how the pipeline reports on itself. See
2134
+ * `docs/trace-to-primitive.md` for the full pipeline walkthrough.
2135
+ */
2136
+ interface MemoryObservation {
2137
+ /** Stable id for this observation, distinct from any primitive id. */
2138
+ id: string;
2139
+ /** Source session id the trace came from. */
2140
+ sessionId?: string;
2141
+ /** ISO timestamp the observation was emitted. */
2142
+ observedAt: string;
2143
+ /** The extracted fact candidate (category, content, confidence, tags, etc.). */
2144
+ fact: ExtractedFact;
2145
+ /** Importance score in [0,1], from `importance.ts`. */
2146
+ importance?: number;
2147
+ /**
2148
+ * Whether the observation passed the extraction judge
2149
+ * (`extraction-judge.ts`). When `false`, the observation was
2150
+ * captured for telemetry but not persisted as a primitive.
2151
+ */
2152
+ judgeAccepted?: boolean;
2153
+ /** Optional reason the judge gave when rejecting. */
2154
+ judgeRejectionReason?: string;
2155
+ /**
2156
+ * Id of the resulting `MemoryFile` primitive once consolidation runs.
2157
+ * Absent until consolidation decides to ADD/MERGE/UPDATE the
2158
+ * observation into the corpus.
2159
+ */
2160
+ resultingPrimitiveId?: string;
2161
+ }
1546
2162
  /** Ordered step for extracted procedure memories (issue #519). */
1547
2163
  interface ExtractedProcedureStep {
1548
2164
  order: number;
@@ -1562,6 +2178,13 @@ interface ExtractedFact {
1562
2178
  entityRef?: string;
1563
2179
  source?: ExtractionPassSource;
1564
2180
  promptedByQuestion?: string;
2181
+ /**
2182
+ * Whether this fact is project-scoped or globally applicable.
2183
+ * When `extractionScopeClassificationEnabled` is true, the extraction LLM
2184
+ * classifies each fact. Default is `"project"` when a coding context is
2185
+ * active, `"global"` when no coding context is present.
2186
+ */
2187
+ scope?: MemoryScope;
1565
2188
  /** Structured key-value attributes extracted from the content (e.g., product attributes, dates, quantities). */
1566
2189
  structuredAttributes?: Record<string, string>;
1567
2190
  /** When category is `procedure`, ordered steps with intents (persisted under procedures/). */
@@ -1722,6 +2345,8 @@ interface QmdSearchExplain {
1722
2345
  rrf?: number;
1723
2346
  rerankScore?: number;
1724
2347
  blendedScore?: number;
2348
+ /** Additive boost applied from `reinforcement_count` frontmatter (issue #687 PR 3/4). */
2349
+ reinforcementBoost?: number;
1725
2350
  }
1726
2351
  interface MetaState {
1727
2352
  extractionCount: number;
@@ -2040,4 +2665,4 @@ interface HourlySummary {
2040
2665
  generatedAt: string;
2041
2666
  }
2042
2667
 
2043
- export { type AccessTrackingEntry, type ActiveRecallChatType, type ActiveRecallModelFallbackPolicy, type ActiveRecallPromptStyle, type ActiveRecallQueryMode, type ActiveRecallThinking, type AgentAccessHttpConfig, type AgentDefaultsConfig, type AgentPersona, type AgentPersonaModelConfig, type BehaviorLoopAdjustment, type BehaviorLoopPolicyState, type BehaviorSignalDirection, type BehaviorSignalEvent, type BehaviorSignalType, type BootstrapOptions, type BootstrapResult, type BriefingActiveThread, type BriefingCalendarSourceError, type BriefingConfig, type BriefingFocus, type BriefingFollowup, type BriefingOpenCommitment, type BriefingRecentEntity, type BriefingResult, type BriefingSections, type BriefingWindow, type BufferEntryState, type BufferState, type BufferSurpriseEvent, type BufferTurn, type CalendarEvent, type CalendarSource, type CaptureMode, type Checkpoint, type CodexCompactionFlushMode, type CodexCompatConfig, type CodexConnectorConfig, type CodingContext, type CodingModeConfig, type CompressionGuidelineActivationState, type CompressionGuidelineOptimizerActionSummary, type CompressionGuidelineOptimizerEventCounts, type CompressionGuidelineOptimizerRuleUpdate, type CompressionGuidelineOptimizerSourceWindow, type CompressionGuidelineOptimizerState, type ConfidenceTier, type ConsolidationAction, type ConsolidationItem, type ConsolidationObservation, type ConsolidationResult, type ContinuityImprovementLoop, type ContinuityIncidentCloseInput, type ContinuityIncidentOpenInput, type ContinuityIncidentRecord, type ContinuityIncidentState, type ContinuityLoopCadence, type ContinuityLoopReviewInput, type ContinuityLoopStatus, type ContinuityLoopUpsertInput, type ContradictionScanConfig, type ConversationThread, type CronConversationRecallMode, type CronRecallMode, type DaySummaryResult, type DreamingConfig, type DreamingNarrativePromptStyle, type EngramTraceEvent, type EntityActivityEntry, type EntityFile, type EntityMention, type EntityRelationship, type EntitySchemaDefinition, type EntitySchemaSectionDefinition, type EntityStructuredSection, type EntityTimelineEntry, type ExtractedFact, type ExtractedProcedureStep, type ExtractedQuestion, type ExtractedReasoningTrace, type ExtractedReasoningTraceStep, type ExtractedRelationship, type ExtractionPassSource, type ExtractionResult, type FileHygieneConfig, type GatewayConfig, type HeartbeatConfig, type HeartbeatDetectionMode, type HourlySummary, type IdentityInjectionMode, type ImportanceLevel, type ImportanceScore, type LifecycleState, type LlmTraceCallback, type LlmTraceEvent, type MemoryActionEligibilityContext, type MemoryActionEligibilitySource, type MemoryActionEvent, type MemoryActionOutcome, type MemoryActionPolicyDecision, type MemoryActionPolicyResult, type MemoryActionStatus, type MemoryActionType, type MemoryCategory, type MemoryFile, type MemoryFrontmatter, type MemoryIntent, type MemoryLifecycleEvent, type MemoryLifecycleEventType, type MemoryLifecycleStateSummary, type MemoryLink, type MemoryLinkType, type MemoryOsPresetName, type MemoryProjectionCurrentState, type MemoryStatus, type MemorySummary, type MetaState, type ModelApi, type ModelDefinitionConfig, type ModelProviderAuthMode, type ModelProviderConfig, type NamespacePolicy, type NativeKnowledgeConfig, type NativeKnowledgeFolderRuleConfig, type NativeKnowledgeObsidianVaultConfig, type NativeKnowledgeOpenClawWorkspaceConfig, type PluginConfig, type PolicyClass, type PrincipalFromSessionKeyMode, type PrincipalRule, type ProceduralConfig, type QmdSearchExplain, type QmdSearchResult, type QuestionEntry, type ReasoningEffort, type RecallPipelineConfig, type RecallPlanMode, type RecallSectionConfig, type RecallTierExplain, type RecallTraceEvent, type RelevanceFeedback, type RetrievalTier, SPECULATIVE_TTL_DAYS, type ScoredEntity, type SemanticChunkingConfigShape, type SessionObserverBandConfig, type SignalLevel, type SignalScanResult, type SlotBehaviorConfig, type SlotMismatchMode, type TopicScore, type TranscriptEntry, type TriggerMode, type VerificationState, confidenceTier };
2668
+ export { type AccessTrackingEntry, type ActiveRecallChatType, type ActiveRecallModelFallbackPolicy, type ActiveRecallPromptStyle, type ActiveRecallQueryMode, type ActiveRecallThinking, type AgentAccessAuthToken, type AgentAccessHttpConfig, type AgentDefaultsConfig, type AgentPersona, type AgentPersonaModelConfig, type BehaviorLoopAdjustment, type BehaviorLoopPolicyState, type BehaviorSignalDirection, type BehaviorSignalEvent, type BehaviorSignalType, type BootstrapOptions, type BootstrapResult, type BriefingActiveThread, type BriefingCalendarSourceError, type BriefingConfig, type BriefingFocus, type BriefingFollowup, type BriefingOpenCommitment, type BriefingRecentEntity, type BriefingResult, type BriefingSections, type BriefingWindow, type BufferEntryState, type BufferState, type BufferSurpriseEvent, type BufferTurn, type CalendarEvent, type CalendarSource, type CaptureMode, type Checkpoint, type CodexCompactionFlushMode, type CodexCompatConfig, type CodexConnectorConfig, type CodingContext, type CodingModeConfig, type CompressionGuidelineActivationState, type CompressionGuidelineOptimizerActionSummary, type CompressionGuidelineOptimizerEventCounts, type CompressionGuidelineOptimizerRuleUpdate, type CompressionGuidelineOptimizerSourceWindow, type CompressionGuidelineOptimizerState, type ConfidenceTier, type ConsolidationAction, type ConsolidationItem, type ConsolidationObservation, type ConsolidationResult, type ContinuityImprovementLoop, type ContinuityIncidentCloseInput, type ContinuityIncidentOpenInput, type ContinuityIncidentRecord, type ContinuityIncidentState, type ContinuityLoopCadence, type ContinuityLoopReviewInput, type ContinuityLoopStatus, type ContinuityLoopUpsertInput, type ContradictionScanConfig, type ConversationThread, type CronConversationRecallMode, type CronRecallMode, DEFAULT_RECALL_DISCLOSURE, type DaySummaryResult, type DreamingConfig, type DreamingNarrativePromptStyle, type DreamsDeepSleepConfig, type DreamsLightSleepConfig, type DreamsPhase, type DreamsPhaseStatus, type DreamsPhasesConfig, type DreamsRemConfig, type DreamsRunResult, type DreamsStatusResult, type EngramTraceEvent, type EntityActivityEntry, type EntityFile, type EntityMention, type EntityRelationship, type EntitySchemaDefinition, type EntitySchemaSectionDefinition, type EntityStructuredSection, type EntityTimelineEntry, type ExtractedFact, type ExtractedProcedureStep, type ExtractedQuestion, type ExtractedReasoningTrace, type ExtractedReasoningTraceStep, type ExtractedRelationship, type ExtractionPassSource, type ExtractionResult, type FileHygieneConfig, type GatewayConfig, type GitHubLiveConnectorConfig, type GmailLiveConnectorConfig, type GoogleDriveLiveConnectorConfig, type HeartbeatConfig, type HeartbeatDetectionMode, type HourlySummary, type IdentityInjectionMode, type ImportanceLevel, type ImportanceScore, type LifecycleState, type LiveConnectorsConfig, type LlmTraceCallback, type LlmTraceEvent, type MemoryActionEligibilityContext, type MemoryActionEligibilitySource, type MemoryActionEvent, type MemoryActionOutcome, type MemoryActionPolicyDecision, type MemoryActionPolicyResult, type MemoryActionStatus, type MemoryActionType, type MemoryCategory, type MemoryFile, type MemoryFrontmatter, type MemoryIntent, type MemoryLifecycleEvent, type MemoryLifecycleEventType, type MemoryLifecycleStateSummary, type MemoryLink, type MemoryLinkType, type MemoryObservation, type MemoryOsPresetName, type MemoryProjectionCurrentState, type MemoryScope, type MemoryStatus, type MemorySummary, type MetaState, type ModelApi, type ModelDefinitionConfig, type ModelProviderAuthMode, type ModelProviderConfig, type NamespacePolicy, type NativeKnowledgeConfig, type NativeKnowledgeFolderRuleConfig, type NativeKnowledgeObsidianVaultConfig, type NativeKnowledgeOpenClawWorkspaceConfig, type NotionLiveConnectorConfig, type PluginConfig, type PolicyClass, type PrincipalFromSessionKeyMode, type PrincipalRule, type ProceduralConfig, type QmdSearchExplain, type QmdSearchResult, type QuestionEntry, RECALL_DISCLOSURE_LEVELS, type ReasoningEffort, type RecallDisclosure, type RecallPipelineConfig, type RecallPlanMode, type RecallSectionConfig, type RecallTierExplain, type RecallTraceEvent, type RelevanceFeedback, type RetrievalTier, SPECULATIVE_TTL_DAYS, type ScoredEntity, type SecretRef, type SemanticChunkingConfigShape, type SessionObserverBandConfig, type SignalLevel, type SignalScanResult, type SlotBehaviorConfig, type SlotMismatchMode, type TopicScore, type TranscriptEntry, type TriggerMode, type VerificationState, confidenceTier, isRecallDisclosure };