@remnic/core 1.1.11 → 1.1.13

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 (1462) hide show
  1. package/README.md +3 -3
  2. package/dist/access-cli.d.ts +2 -1
  3. package/dist/access-cli.js +293 -104
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +31 -62
  6. package/dist/access-http.js +53 -35
  7. package/dist/access-mcp.d.ts +31 -8
  8. package/dist/access-mcp.js +45 -34
  9. package/dist/access-schema.d.ts +197 -14
  10. package/dist/access-schema.js +16 -5
  11. package/dist/access-service-DcCDmNYC.d.ts +1542 -0
  12. package/dist/access-service.d.ts +30 -9
  13. package/dist/access-service.js +42 -32
  14. package/dist/action-confidence.d.ts +83 -0
  15. package/dist/action-confidence.js +22 -0
  16. package/dist/active-memory-bridge.d.ts +1 -1
  17. package/dist/active-memory-bridge.js +2 -2
  18. package/dist/active-recall.d.ts +1 -1
  19. package/dist/active-recall.js +11 -3
  20. package/dist/active-recall.js.map +1 -1
  21. package/dist/adapters/claude-code.d.ts +24 -0
  22. package/dist/adapters/claude-code.js +9 -0
  23. package/dist/adapters/codex.d.ts +25 -0
  24. package/dist/adapters/codex.js +9 -0
  25. package/dist/adapters/hermes.d.ts +35 -0
  26. package/dist/adapters/hermes.js +9 -0
  27. package/dist/adapters/index.d.ts +6 -0
  28. package/dist/adapters/index.js +26 -0
  29. package/dist/adapters/registry.d.ts +20 -0
  30. package/dist/adapters/registry.js +13 -0
  31. package/dist/adapters/replit.d.ts +28 -0
  32. package/dist/adapters/replit.js +9 -0
  33. package/dist/adapters/types.d.ts +43 -0
  34. package/dist/adapters/types.js +8 -0
  35. package/dist/behavior-learner.d.ts +1 -1
  36. package/dist/behavior-signals.d.ts +1 -1
  37. package/dist/bootstrap.d.ts +23 -6
  38. package/dist/boxes.d.ts +7 -0
  39. package/dist/boxes.js +1 -1
  40. package/dist/briefing.d.ts +5 -3
  41. package/dist/briefing.js +10 -7
  42. package/dist/buffer-surprise-report.d.ts +1 -1
  43. package/dist/buffer-surprise-report.js +1 -1
  44. package/dist/buffer.d.ts +18 -4
  45. package/dist/buffer.js +1 -1
  46. package/dist/calibration.d.ts +1 -1
  47. package/dist/calibration.js +6 -6
  48. package/dist/capsule-cli.d.ts +4 -4
  49. package/dist/capsule-cli.js +1 -1
  50. package/dist/capsule-crypto-5CYAGVC5.js +18 -0
  51. package/dist/capsule-merge-4MGKE7C5.js +189 -0
  52. package/dist/causal-behavior.d.ts +9 -29
  53. package/dist/causal-behavior.js +6 -3
  54. package/dist/causal-behavior.js.map +1 -1
  55. package/dist/causal-chain.js +3 -2
  56. package/dist/causal-consolidation.d.ts +2 -2
  57. package/dist/causal-consolidation.js +28 -17
  58. package/dist/causal-consolidation.js.map +1 -1
  59. package/dist/causal-retrieval.js +3 -3
  60. package/dist/causal-trajectory.js +1 -1
  61. package/dist/chunk-25MQ7IHJ.js +427 -0
  62. package/dist/chunk-25MQ7IHJ.js.map +1 -0
  63. package/dist/chunk-2F2W355T.js +256 -0
  64. package/dist/chunk-2F2W355T.js.map +1 -0
  65. package/dist/chunk-2KI4QFHU.js +228 -0
  66. package/dist/chunk-2KI4QFHU.js.map +1 -0
  67. package/dist/chunk-2PRQG7PV.js +86 -0
  68. package/dist/chunk-2PRQG7PV.js.map +1 -0
  69. package/dist/chunk-2QR3XXIC.js +2272 -0
  70. package/dist/chunk-2QR3XXIC.js.map +1 -0
  71. package/dist/chunk-2WWLHTZY.js +121 -0
  72. package/dist/chunk-326G7DJK.js +2185 -0
  73. package/dist/chunk-326G7DJK.js.map +1 -0
  74. package/dist/chunk-34DQE4KF.js +174 -0
  75. package/dist/chunk-34DQE4KF.js.map +1 -0
  76. package/dist/chunk-3APJ5EVB.js +601 -0
  77. package/dist/chunk-3APJ5EVB.js.map +1 -0
  78. package/dist/chunk-3HPAPHUK.js +51 -0
  79. package/dist/chunk-3HPAPHUK.js.map +1 -0
  80. package/dist/chunk-3JXBXXM2.js +69 -0
  81. package/dist/chunk-3JXBXXM2.js.map +1 -0
  82. package/dist/chunk-3KW65B36.js +681 -0
  83. package/dist/chunk-3KW65B36.js.map +1 -0
  84. package/dist/chunk-3UXOZBHV.js +20 -0
  85. package/dist/chunk-3UXOZBHV.js.map +1 -0
  86. package/dist/chunk-3VAL7ZL2.js +266 -0
  87. package/dist/chunk-3VAL7ZL2.js.map +1 -0
  88. package/dist/chunk-3Y4P7RXM.js +31 -0
  89. package/dist/chunk-3Y4P7RXM.js.map +1 -0
  90. package/dist/chunk-47VWKCAF.js +273 -0
  91. package/dist/chunk-47VWKCAF.js.map +1 -0
  92. package/dist/chunk-4CRG46BG.js +271 -0
  93. package/dist/chunk-4RA3C3EV.js +60 -0
  94. package/dist/chunk-4RA3C3EV.js.map +1 -0
  95. package/dist/chunk-5375UYTQ.js +914 -0
  96. package/dist/chunk-5375UYTQ.js.map +1 -0
  97. package/dist/chunk-56K5QLHX.js +506 -0
  98. package/dist/chunk-56K5QLHX.js.map +1 -0
  99. package/dist/chunk-5NXIJZFX.js +180 -0
  100. package/dist/chunk-5NXIJZFX.js.map +1 -0
  101. package/dist/chunk-5RGLBDQF.js +596 -0
  102. package/dist/chunk-5RGLBDQF.js.map +1 -0
  103. package/dist/chunk-5UZXUTVO.js +9 -0
  104. package/dist/chunk-5UZXUTVO.js.map +1 -0
  105. package/dist/chunk-65PG43EQ.js +105 -0
  106. package/dist/chunk-65PG43EQ.js.map +1 -0
  107. package/dist/chunk-66DHUKLO.js +57 -0
  108. package/dist/chunk-66DHUKLO.js.map +1 -0
  109. package/dist/chunk-6FC5EGNV.js +46 -0
  110. package/dist/chunk-6FC5EGNV.js.map +1 -0
  111. package/dist/chunk-6H2TESSP.js +62 -0
  112. package/dist/chunk-6H2TESSP.js.map +1 -0
  113. package/dist/chunk-6LVVDPJ4.js +32 -0
  114. package/dist/chunk-6LVVDPJ4.js.map +1 -0
  115. package/dist/chunk-6NKAQ74D.js +2237 -0
  116. package/dist/chunk-6NKAQ74D.js.map +1 -0
  117. package/dist/chunk-6RVI47ZR.js +159 -0
  118. package/dist/chunk-6RVI47ZR.js.map +1 -0
  119. package/dist/chunk-7AAT6G4Q.js +5117 -0
  120. package/dist/chunk-7AAT6G4Q.js.map +1 -0
  121. package/dist/chunk-7DTASS5T.js +29 -0
  122. package/dist/chunk-7DTASS5T.js.map +1 -0
  123. package/dist/chunk-7IASACLB.js +596 -0
  124. package/dist/chunk-7MNMYOFP.js +32 -0
  125. package/dist/chunk-7MNMYOFP.js.map +1 -0
  126. package/dist/chunk-7N4KAIGN.js +133 -0
  127. package/dist/chunk-7N4KAIGN.js.map +1 -0
  128. package/dist/chunk-7OZ53EXP.js +101 -0
  129. package/dist/chunk-7OZ53EXP.js.map +1 -0
  130. package/dist/chunk-7XYTQGCC.js +134 -0
  131. package/dist/chunk-7XYTQGCC.js.map +1 -0
  132. package/dist/chunk-A2XUIMJ3.js +341 -0
  133. package/dist/chunk-A2XUIMJ3.js.map +1 -0
  134. package/dist/chunk-AC5LO7IU.js +308 -0
  135. package/dist/chunk-AC5LO7IU.js.map +1 -0
  136. package/dist/chunk-AGZQD76C.js +201 -0
  137. package/dist/chunk-AGZQD76C.js.map +1 -0
  138. package/dist/chunk-AH2JUU6X.js +336 -0
  139. package/dist/chunk-AH2JUU6X.js.map +1 -0
  140. package/dist/chunk-APO3DCMU.js +361 -0
  141. package/dist/chunk-APO3DCMU.js.map +1 -0
  142. package/dist/chunk-BFBF3XEF.js +283 -0
  143. package/dist/chunk-BFBF3XEF.js.map +1 -0
  144. package/dist/chunk-BJ3KMYTB.js +1974 -0
  145. package/dist/chunk-BJ3KMYTB.js.map +1 -0
  146. package/dist/chunk-C5BCH4ZS.js +317 -0
  147. package/dist/chunk-C5BCH4ZS.js.map +1 -0
  148. package/dist/chunk-CHEL3SKB.js +6758 -0
  149. package/dist/chunk-CHEL3SKB.js.map +1 -0
  150. package/dist/chunk-CQZRLNMV.js +1491 -0
  151. package/dist/chunk-CQZRLNMV.js.map +1 -0
  152. package/dist/chunk-D46YSIYX.js +892 -0
  153. package/dist/chunk-D46YSIYX.js.map +1 -0
  154. package/dist/chunk-DB5A3NHS.js +906 -0
  155. package/dist/chunk-DB5A3NHS.js.map +1 -0
  156. package/dist/chunk-DINWEURR.js +648 -0
  157. package/dist/chunk-DINWEURR.js.map +1 -0
  158. package/dist/chunk-DK5LDEQM.js +530 -0
  159. package/dist/chunk-DK5LDEQM.js.map +1 -0
  160. package/dist/chunk-DOM4GKSW.js +34 -0
  161. package/dist/chunk-DOM4GKSW.js.map +1 -0
  162. package/dist/chunk-EDTHC6UD.js +1075 -0
  163. package/dist/chunk-EDTHC6UD.js.map +1 -0
  164. package/dist/chunk-EFJ3MQ4V.js +721 -0
  165. package/dist/chunk-EHRTFRWW.js +89 -0
  166. package/dist/chunk-EHRTFRWW.js.map +1 -0
  167. package/dist/chunk-FAJ7FZYM.js +11 -0
  168. package/dist/chunk-FAJ7FZYM.js.map +1 -0
  169. package/dist/chunk-FBYESMQ2.js +570 -0
  170. package/dist/chunk-FBYESMQ2.js.map +1 -0
  171. package/dist/chunk-FDU6HUUL.js +147 -0
  172. package/dist/chunk-FF4KLI5W.js +99 -0
  173. package/dist/chunk-FF4KLI5W.js.map +1 -0
  174. package/dist/chunk-FIT6DMX6.js +310 -0
  175. package/dist/chunk-FIT6DMX6.js.map +1 -0
  176. package/dist/chunk-FJ43PRLT.js +272 -0
  177. package/dist/chunk-FJ43PRLT.js.map +1 -0
  178. package/dist/chunk-FKFMOY3N.js +32 -0
  179. package/dist/chunk-FKFMOY3N.js.map +1 -0
  180. package/dist/chunk-FLTNHQK6.js +262 -0
  181. package/dist/chunk-FLTNHQK6.js.map +1 -0
  182. package/dist/chunk-GA454ALV.js +12436 -0
  183. package/dist/chunk-GA454ALV.js.map +1 -0
  184. package/dist/chunk-GGKRUQOO.js +228 -0
  185. package/dist/chunk-GIF42EW3.js +63 -0
  186. package/dist/chunk-GIF42EW3.js.map +1 -0
  187. package/dist/chunk-GL6I6MEQ.js +647 -0
  188. package/dist/chunk-H3ME6L6D.js +709 -0
  189. package/dist/chunk-H3ME6L6D.js.map +1 -0
  190. package/dist/chunk-HHLLAQGZ.js +1 -0
  191. package/dist/chunk-HXXBL2KD.js +2040 -0
  192. package/dist/chunk-I5V2VDIW.js +219 -0
  193. package/dist/chunk-I5V2VDIW.js.map +1 -0
  194. package/dist/chunk-I6K5FBRQ.js +35 -0
  195. package/dist/chunk-I6K5FBRQ.js.map +1 -0
  196. package/dist/chunk-ICRIXAP2.js +121 -0
  197. package/dist/chunk-ICRIXAP2.js.map +1 -0
  198. package/dist/chunk-J4EB7DNW.js +11 -0
  199. package/dist/chunk-J4EB7DNW.js.map +1 -0
  200. package/dist/chunk-JLFA7DQG.js +62 -0
  201. package/dist/chunk-JLFA7DQG.js.map +1 -0
  202. package/dist/chunk-KJTKLXTH.js +9 -0
  203. package/dist/chunk-KJTKLXTH.js.map +1 -0
  204. package/dist/chunk-KLAO5DGL.js +917 -0
  205. package/dist/chunk-KLAO5DGL.js.map +1 -0
  206. package/dist/chunk-KNKUID7G.js +183 -0
  207. package/dist/chunk-KOSORCJG.js +624 -0
  208. package/dist/chunk-KOSORCJG.js.map +1 -0
  209. package/dist/chunk-KUJVMMZQ.js +1262 -0
  210. package/dist/chunk-KUJVMMZQ.js.map +1 -0
  211. package/dist/chunk-LCR46JY5.js +123 -0
  212. package/dist/chunk-LCR46JY5.js.map +1 -0
  213. package/dist/chunk-LLQ2LLWF.js +148 -0
  214. package/dist/chunk-LLQ2LLWF.js.map +1 -0
  215. package/dist/chunk-LPMVBPA3.js +236 -0
  216. package/dist/chunk-LT3NLYSI.js +50 -0
  217. package/dist/chunk-LT3NLYSI.js.map +1 -0
  218. package/dist/chunk-LUDTDZLK.js +287 -0
  219. package/dist/chunk-LUDTDZLK.js.map +1 -0
  220. package/dist/chunk-M23FSH32.js +3963 -0
  221. package/dist/chunk-M23FSH32.js.map +1 -0
  222. package/dist/chunk-MC26UJIM.js +118 -0
  223. package/dist/chunk-ME6ESPZU.js +119 -0
  224. package/dist/chunk-ME6ESPZU.js.map +1 -0
  225. package/dist/chunk-MGKYQQYF.js +272 -0
  226. package/dist/chunk-MGKYQQYF.js.map +1 -0
  227. package/dist/chunk-MJFNCJXV.js +66 -0
  228. package/dist/chunk-MJFNCJXV.js.map +1 -0
  229. package/dist/chunk-MSWG7JI6.js +237 -0
  230. package/dist/chunk-MSWG7JI6.js.map +1 -0
  231. package/dist/chunk-MT25YHYH.js +141 -0
  232. package/dist/chunk-MT25YHYH.js.map +1 -0
  233. package/dist/chunk-MT4HVDUZ.js +53 -0
  234. package/dist/chunk-MY6TPVXW.js +219 -0
  235. package/dist/chunk-N2D6GXBM.js +267 -0
  236. package/dist/chunk-N2D6GXBM.js.map +1 -0
  237. package/dist/chunk-NJ3MJQZX.js +46 -0
  238. package/dist/chunk-NJ3MJQZX.js.map +1 -0
  239. package/dist/chunk-NMZY542O.js +335 -0
  240. package/dist/chunk-NMZY542O.js.map +1 -0
  241. package/dist/chunk-NNVTUXEB.js +23 -0
  242. package/dist/chunk-NZL6GGQE.js +375 -0
  243. package/dist/chunk-NZL6GGQE.js.map +1 -0
  244. package/dist/chunk-OAZ5MFUB.js +4124 -0
  245. package/dist/chunk-OAZ5MFUB.js.map +1 -0
  246. package/dist/chunk-OIGNEXKZ.js +237 -0
  247. package/dist/chunk-OIGNEXKZ.js.map +1 -0
  248. package/dist/chunk-OZKZ2TRP.js +3729 -0
  249. package/dist/chunk-OZKZ2TRP.js.map +1 -0
  250. package/dist/chunk-P4NEIHUT.js +108 -0
  251. package/dist/chunk-P7FMDTKL.js +103 -0
  252. package/dist/chunk-P7FMDTKL.js.map +1 -0
  253. package/dist/chunk-PD6O7AXF.js +110 -0
  254. package/dist/chunk-PD6O7AXF.js.map +1 -0
  255. package/dist/chunk-PHK3HARR.js +32 -0
  256. package/dist/chunk-PHK3HARR.js.map +1 -0
  257. package/dist/chunk-PIRJPV5T.js +98 -0
  258. package/dist/chunk-PIRJPV5T.js.map +1 -0
  259. package/dist/chunk-PK7H5L6Y.js +159 -0
  260. package/dist/chunk-PK7H5L6Y.js.map +1 -0
  261. package/dist/chunk-PR5FBTFU.js +233 -0
  262. package/dist/chunk-PR5FBTFU.js.map +1 -0
  263. package/dist/chunk-PU63GXWS.js +174 -0
  264. package/dist/chunk-PU63GXWS.js.map +1 -0
  265. package/dist/chunk-PYPOFEMK.js +294 -0
  266. package/dist/chunk-PYPOFEMK.js.map +1 -0
  267. package/dist/chunk-PZIAX57I.js +124 -0
  268. package/dist/chunk-PZIAX57I.js.map +1 -0
  269. package/dist/chunk-Q7P4WJDP.js +26 -0
  270. package/dist/chunk-Q7P4WJDP.js.map +1 -0
  271. package/dist/chunk-QDZ2RLEC.js +908 -0
  272. package/dist/chunk-QDZ2RLEC.js.map +1 -0
  273. package/dist/chunk-QQUAB63I.js +63 -0
  274. package/dist/chunk-QQUAB63I.js.map +1 -0
  275. package/dist/chunk-QRNI5JBH.js +18 -0
  276. package/dist/chunk-RHY3HH7P.js +601 -0
  277. package/dist/chunk-RHY3HH7P.js.map +1 -0
  278. package/dist/chunk-RK6F44Y6.js +84 -0
  279. package/dist/chunk-RK6F44Y6.js.map +1 -0
  280. package/dist/chunk-RRF5UOBJ.js +91 -0
  281. package/dist/chunk-RXDLTSWT.js +124 -0
  282. package/dist/chunk-RXDLTSWT.js.map +1 -0
  283. package/dist/chunk-RYED3SPJ.js +42 -0
  284. package/dist/chunk-RYED3SPJ.js.map +1 -0
  285. package/dist/chunk-S7KDBTWT.js +106 -0
  286. package/dist/chunk-S7KDBTWT.js.map +1 -0
  287. package/dist/chunk-SEDEKFYQ.js +1 -0
  288. package/dist/chunk-SOAU2OE2.js +125 -0
  289. package/dist/chunk-SOAU2OE2.js.map +1 -0
  290. package/dist/chunk-TECVW3JP.js +36 -0
  291. package/dist/chunk-TECVW3JP.js.map +1 -0
  292. package/dist/chunk-TFO23QT4.js +88 -0
  293. package/dist/chunk-TFO23QT4.js.map +1 -0
  294. package/dist/chunk-TK4UEOSK.js +76 -0
  295. package/dist/chunk-TK4UEOSK.js.map +1 -0
  296. package/dist/chunk-TKWGAOLV.js +122 -0
  297. package/dist/chunk-TKWGAOLV.js.map +1 -0
  298. package/dist/chunk-TMM4S4IJ.js +597 -0
  299. package/dist/chunk-TMM4S4IJ.js.map +1 -0
  300. package/dist/chunk-TMQLARTH.js +188 -0
  301. package/dist/chunk-TMQLARTH.js.map +1 -0
  302. package/dist/chunk-TPDBFYEG.js +130 -0
  303. package/dist/chunk-TPDBFYEG.js.map +1 -0
  304. package/dist/chunk-TPMQ3G6Z.js +145 -0
  305. package/dist/chunk-TPMQ3G6Z.js.map +1 -0
  306. package/dist/chunk-TZOLIGIG.js +61 -0
  307. package/dist/chunk-TZOLIGIG.js.map +1 -0
  308. package/dist/chunk-U3PN77QT.js +113 -0
  309. package/dist/chunk-U3WSW6PZ.js +277 -0
  310. package/dist/chunk-U4SCL7B7.js +640 -0
  311. package/dist/chunk-U4SCL7B7.js.map +1 -0
  312. package/dist/chunk-UWK5OXUJ.js +156 -0
  313. package/dist/chunk-UWK5OXUJ.js.map +1 -0
  314. package/dist/chunk-UWVJF25J.js +74 -0
  315. package/dist/chunk-UXHQAFNA.js +1317 -0
  316. package/dist/chunk-UXHQAFNA.js.map +1 -0
  317. package/dist/chunk-V5OCT34X.js +1 -0
  318. package/dist/chunk-V5OCT34X.js.map +1 -0
  319. package/dist/chunk-VLXA6PI2.js +304 -0
  320. package/dist/chunk-VLXA6PI2.js.map +1 -0
  321. package/dist/chunk-VNO6ZJ35.js +500 -0
  322. package/dist/chunk-VNO6ZJ35.js.map +1 -0
  323. package/dist/chunk-VW676BEI.js +827 -0
  324. package/dist/chunk-VW676BEI.js.map +1 -0
  325. package/dist/chunk-VWT3F4IV.js +2161 -0
  326. package/dist/chunk-VWT3F4IV.js.map +1 -0
  327. package/dist/chunk-W3LR522O.js +2296 -0
  328. package/dist/chunk-W3LR522O.js.map +1 -0
  329. package/dist/chunk-W4L6CZKA.js +96 -0
  330. package/dist/chunk-W4L6CZKA.js.map +1 -0
  331. package/dist/chunk-W4RVMTHR.js +372 -0
  332. package/dist/chunk-W4RVMTHR.js.map +1 -0
  333. package/dist/chunk-WEHSQBFR.js +188 -0
  334. package/dist/chunk-WEHSQBFR.js.map +1 -0
  335. package/dist/chunk-WELDCG6C.js +380 -0
  336. package/dist/chunk-WELDCG6C.js.map +1 -0
  337. package/dist/chunk-WZYKANL3.js +2800 -0
  338. package/dist/chunk-WZYKANL3.js.map +1 -0
  339. package/dist/chunk-XIG5PDM7.js +48 -0
  340. package/dist/chunk-XJNBEDFE.js +193 -0
  341. package/dist/chunk-XJNBEDFE.js.map +1 -0
  342. package/dist/chunk-XVVIG67A.js +291 -0
  343. package/dist/chunk-XVVIG67A.js.map +1 -0
  344. package/dist/chunk-XVZ7B3HG.js +135 -0
  345. package/dist/chunk-YBPYIAA5.js +73 -0
  346. package/dist/chunk-YBPYIAA5.js.map +1 -0
  347. package/dist/chunk-Z734BLO3.js +21 -0
  348. package/dist/chunk-Z734BLO3.js.map +1 -0
  349. package/dist/chunk-ZKSK55RC.js +269 -0
  350. package/dist/chunk-ZKSK55RC.js.map +1 -0
  351. package/dist/chunk-ZTFCYYEZ.js +69 -0
  352. package/dist/chunk-ZTFCYYEZ.js.map +1 -0
  353. package/dist/chunk-ZY2MNJR6.js +329 -0
  354. package/dist/chunk-ZY2MNJR6.js.map +1 -0
  355. package/dist/cli-D3VpkVwB.d.ts +1136 -0
  356. package/dist/cli.d.ts +42 -10
  357. package/dist/cli.js +121 -58
  358. package/dist/codex-cli-fallback.d.ts +1 -0
  359. package/dist/codex-cli-fallback.js +1 -1
  360. package/dist/commitment-ledger.js +1 -1
  361. package/dist/compat/checks.d.ts +5 -0
  362. package/dist/compat/checks.js +11 -0
  363. package/dist/compat/checks.js.map +1 -0
  364. package/dist/compat/types.d.ts +30 -0
  365. package/dist/compat/types.js +1 -0
  366. package/dist/compat/types.js.map +1 -0
  367. package/dist/compounding/engine.d.ts +221 -0
  368. package/dist/compounding/engine.js +32 -0
  369. package/dist/compounding/engine.js.map +1 -0
  370. package/dist/compounding/preference-consolidator.d.ts +92 -0
  371. package/dist/compounding/preference-consolidator.js +553 -0
  372. package/dist/compounding/preference-consolidator.js.map +1 -0
  373. package/dist/compression-optimizer.d.ts +1 -1
  374. package/dist/config.d.ts +5 -3
  375. package/dist/config.js +9 -4
  376. package/dist/conflict-policy-DyJ2wd-h.d.ts +4 -0
  377. package/dist/connectors/codex-materialize-runner.d.ts +64 -0
  378. package/dist/connectors/codex-materialize-runner.js +33 -0
  379. package/dist/connectors/codex-materialize-runner.js.map +1 -0
  380. package/dist/connectors/codex-materialize.d.ts +195 -0
  381. package/dist/connectors/codex-materialize.js +38 -0
  382. package/dist/connectors/codex-materialize.js.map +1 -0
  383. package/dist/connectors/index.d.ts +444 -0
  384. package/dist/connectors/index.js +115 -0
  385. package/dist/connectors/index.js.map +1 -0
  386. package/dist/connectors-cli-CwbyjGR7.d.ts +257 -0
  387. package/dist/connectors-cli.d.ts +1 -1
  388. package/dist/consolidation-provenance-check.d.ts +4 -2
  389. package/dist/consolidation-undo.d.ts +4 -2
  390. package/dist/contradiction/index.d.ts +258 -0
  391. package/dist/contradiction/index.js +43 -0
  392. package/dist/contradiction/index.js.map +1 -0
  393. package/dist/contradiction-review-ATP4S6IC.js +30 -0
  394. package/dist/contradiction-review-ATP4S6IC.js.map +1 -0
  395. package/dist/contradiction-scan-5A4IDZV5.js +13 -0
  396. package/dist/contradiction-scan-5A4IDZV5.js.map +1 -0
  397. package/dist/conversation-index/backend.d.ts +97 -0
  398. package/dist/conversation-index/backend.js +13 -0
  399. package/dist/conversation-index/backend.js.map +1 -0
  400. package/dist/conversation-index/chunker.d.ts +16 -0
  401. package/dist/conversation-index/chunker.js +8 -0
  402. package/dist/conversation-index/chunker.js.map +1 -0
  403. package/dist/conversation-index/cleanup.d.ts +11 -0
  404. package/dist/conversation-index/cleanup.js +9 -0
  405. package/dist/conversation-index/cleanup.js.map +1 -0
  406. package/dist/conversation-index/faiss-adapter.d.ts +6 -0
  407. package/dist/conversation-index/faiss-adapter.js +16 -0
  408. package/dist/conversation-index/faiss-adapter.js.map +1 -0
  409. package/dist/conversation-index/indexer.d.ts +23 -0
  410. package/dist/conversation-index/indexer.js +15 -0
  411. package/dist/conversation-index/indexer.js.map +1 -0
  412. package/dist/conversation-index/search.d.ts +6 -0
  413. package/dist/conversation-index/search.js +11 -0
  414. package/dist/conversation-index/search.js.map +1 -0
  415. package/dist/day-summary.d.ts +1 -1
  416. package/dist/delinearize.d.ts +1 -1
  417. package/dist/direct-answer-wiring.d.ts +1 -1
  418. package/dist/direct-answer-wiring.js +1 -1
  419. package/dist/direct-answer.d.ts +1 -1
  420. package/dist/embedding-fallback.d.ts +1 -1
  421. package/dist/embedding-fallback.js +2 -2
  422. package/dist/enrichment/index.d.ts +163 -0
  423. package/dist/enrichment/index.js +18 -0
  424. package/dist/enrichment/index.js.map +1 -0
  425. package/dist/entity-retrieval.d.ts +4 -2
  426. package/dist/entity-retrieval.js +9 -6
  427. package/dist/entity-schema.d.ts +1 -1
  428. package/dist/evals.js +1 -1
  429. package/dist/event-order-recall.d.ts +17 -0
  430. package/dist/event-order-recall.js +11 -0
  431. package/dist/event-order-recall.js.map +1 -0
  432. package/dist/evidence-pack.d.ts +3 -1
  433. package/dist/evidence-pack.js +5 -3
  434. package/dist/explicit-capture.d.ts +23 -6
  435. package/dist/explicit-capture.js +2 -2
  436. package/dist/explicit-cue-recall.d.ts +4 -1
  437. package/dist/explicit-cue-recall.js +4 -2
  438. package/dist/extraction-judge-telemetry.d.ts +1 -1
  439. package/dist/extraction-judge-training.d.ts +1 -1
  440. package/dist/extraction-judge-training.js +1 -1
  441. package/dist/extraction-judge.d.ts +1 -1
  442. package/dist/extraction.d.ts +1 -1
  443. package/dist/extraction.js +11 -10
  444. package/dist/faiss-adapter-CzPghc4C.d.ts +70 -0
  445. package/dist/fallback-llm.d.ts +4 -1
  446. package/dist/fallback-llm.js +6 -6
  447. package/dist/focused-list-recall.d.ts +17 -0
  448. package/dist/focused-list-recall.js +11 -0
  449. package/dist/focused-list-recall.js.map +1 -0
  450. package/dist/graph-edge-decay-5DI5GUNL.js +207 -0
  451. package/dist/identity-continuity.d.ts +1 -1
  452. package/dist/importance.d.ts +1 -1
  453. package/dist/index-DJ9QWMw-.d.ts +35 -0
  454. package/dist/index.d.ts +107 -715
  455. package/dist/index.js +657 -2611
  456. package/dist/index.js.map +1 -1
  457. package/dist/intent.d.ts +1 -1
  458. package/dist/intent.js +1 -1
  459. package/dist/lcm/archive.d.ts +89 -0
  460. package/dist/lcm/archive.js +12 -0
  461. package/dist/lcm/archive.js.map +1 -0
  462. package/dist/lcm/dag.d.ts +48 -0
  463. package/dist/lcm/dag.js +8 -0
  464. package/dist/lcm/dag.js.map +1 -0
  465. package/dist/lcm/engine.d.ts +116 -0
  466. package/dist/lcm/engine.js +20 -0
  467. package/dist/lcm/engine.js.map +1 -0
  468. package/dist/lcm/index.d.ts +12 -0
  469. package/dist/lcm/index.js +44 -0
  470. package/dist/lcm/index.js.map +1 -0
  471. package/dist/lcm/queue.d.ts +62 -0
  472. package/dist/lcm/queue.js +8 -0
  473. package/dist/lcm/queue.js.map +1 -0
  474. package/dist/lcm/recall.d.ts +20 -0
  475. package/dist/lcm/recall.js +8 -0
  476. package/dist/lcm/recall.js.map +1 -0
  477. package/dist/lcm/schema.d.ts +16 -0
  478. package/dist/lcm/schema.js +14 -0
  479. package/dist/lcm/schema.js.map +1 -0
  480. package/dist/lcm/summarizer.d.ts +38 -0
  481. package/dist/lcm/summarizer.js +12 -0
  482. package/dist/lcm/summarizer.js.map +1 -0
  483. package/dist/lcm/tools.d.ts +29 -0
  484. package/dist/lcm/tools.js +8 -0
  485. package/dist/lcm/tools.js.map +1 -0
  486. package/dist/lifecycle.d.ts +1 -1
  487. package/dist/live-connectors-runner.d.ts +1 -1
  488. package/dist/live-connectors-runner.js +5 -5
  489. package/dist/local-llm.d.ts +8 -4
  490. package/dist/local-llm.js +3 -3
  491. package/dist/maintenance/archive-observations.d.ts +18 -0
  492. package/dist/maintenance/archive-observations.js +8 -0
  493. package/dist/maintenance/archive-observations.js.map +1 -0
  494. package/dist/maintenance/backup-stamp.d.ts +3 -0
  495. package/dist/maintenance/backup-stamp.js +8 -0
  496. package/dist/maintenance/backup-stamp.js.map +1 -0
  497. package/dist/maintenance/memory-governance-cron.d.ts +85 -0
  498. package/dist/maintenance/memory-governance-cron.js +22 -0
  499. package/dist/maintenance/memory-governance-cron.js.map +1 -0
  500. package/dist/maintenance/memory-governance.d.ts +137 -0
  501. package/dist/maintenance/memory-governance.js +40 -0
  502. package/dist/maintenance/memory-governance.js.map +1 -0
  503. package/dist/maintenance/migrate-observations.d.ts +18 -0
  504. package/dist/maintenance/migrate-observations.js +9 -0
  505. package/dist/maintenance/migrate-observations.js.map +1 -0
  506. package/dist/maintenance/observation-ledger-utils.d.ts +10 -0
  507. package/dist/maintenance/observation-ledger-utils.js +10 -0
  508. package/dist/maintenance/observation-ledger-utils.js.map +1 -0
  509. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +15 -0
  510. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +28 -0
  511. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js.map +1 -0
  512. package/dist/maintenance/rebuild-memory-projection.d.ts +77 -0
  513. package/dist/maintenance/rebuild-memory-projection.js +35 -0
  514. package/dist/maintenance/rebuild-memory-projection.js.map +1 -0
  515. package/dist/maintenance/rebuild-observations.d.ts +17 -0
  516. package/dist/maintenance/rebuild-observations.js +9 -0
  517. package/dist/maintenance/rebuild-observations.js.map +1 -0
  518. package/dist/mcp-memory-inspector-app.d.ts +124 -0
  519. package/dist/mcp-memory-inspector-app.js +20 -0
  520. package/dist/mcp-memory-inspector-app.js.map +1 -0
  521. package/dist/memory-action-policy.d.ts +1 -1
  522. package/dist/memory-cache.d.ts +1 -1
  523. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  524. package/dist/memory-projection-store.d.ts +108 -3
  525. package/dist/memory-projection-store.js +2 -1
  526. package/dist/memory-provenance.d.ts +57 -0
  527. package/dist/memory-provenance.js +13 -0
  528. package/dist/memory-provenance.js.map +1 -0
  529. package/dist/memory-worth-outcomes.d.ts +4 -2
  530. package/dist/migrate/from-engram.d.ts +24 -0
  531. package/dist/migrate/from-engram.js +12 -0
  532. package/dist/migrate/from-engram.js.map +1 -0
  533. package/dist/models-json.d.ts +1 -1
  534. package/dist/namespaces/migrate.d.ts +50 -0
  535. package/dist/namespaces/migrate.js +50 -0
  536. package/dist/namespaces/migrate.js.map +1 -0
  537. package/dist/namespaces/principal.d.ts +17 -0
  538. package/dist/namespaces/principal.js +16 -0
  539. package/dist/namespaces/principal.js.map +1 -0
  540. package/dist/namespaces/search.d.ts +46 -0
  541. package/dist/namespaces/search.js +28 -0
  542. package/dist/namespaces/search.js.map +1 -0
  543. package/dist/namespaces/storage.d.ts +32 -0
  544. package/dist/namespaces/storage.js +28 -0
  545. package/dist/namespaces/storage.js.map +1 -0
  546. package/dist/native-knowledge.d.ts +1 -1
  547. package/dist/network/tailscale.d.ts +41 -0
  548. package/dist/network/tailscale.js +9 -0
  549. package/dist/network/tailscale.js.map +1 -0
  550. package/dist/network/webdav.d.ts +39 -0
  551. package/dist/network/webdav.js +10 -0
  552. package/dist/network/webdav.js.map +1 -0
  553. package/dist/objective-state-writers.d.ts +1 -1
  554. package/dist/objective-state-writers.js +2 -2
  555. package/dist/operator-toolkit.d.ts +4 -2
  556. package/dist/operator-toolkit.js +35 -17
  557. package/dist/opik-exporter.js +2 -2
  558. package/dist/opik-exporter.js.map +1 -1
  559. package/dist/orchestrator-DuWl9Hwx.d.ts +1244 -0
  560. package/dist/orchestrator.d.ts +24 -7
  561. package/dist/orchestrator.js +107 -65
  562. package/dist/path-MR5JPYOP.js +9 -0
  563. package/dist/path-MR5JPYOP.js.map +1 -0
  564. package/dist/patterns-cli.d.ts +1 -1
  565. package/dist/policy-runtime.d.ts +1 -1
  566. package/dist/qmd-recall-cache.d.ts +2 -2
  567. package/dist/qmd.d.ts +103 -4
  568. package/dist/qmd.js +23 -5
  569. package/dist/recall-disclosure-escalation.d.ts +1 -1
  570. package/dist/recall-explain-renderer.d.ts +3 -1
  571. package/dist/recall-explain-renderer.js +5 -3
  572. package/dist/recall-state.d.ts +1 -1
  573. package/dist/recall-tag-filter.d.ts +3 -1
  574. package/dist/recall-xray-cli.d.ts +3 -1
  575. package/dist/recall-xray-cli.js +6 -4
  576. package/dist/recall-xray-renderer.d.ts +3 -1
  577. package/dist/recall-xray-renderer.js +5 -3
  578. package/dist/recall-xray.d.ts +8 -1
  579. package/dist/recall-xray.js +4 -2
  580. package/dist/replay/normalizers/chatgpt.d.ts +6 -0
  581. package/dist/replay/normalizers/chatgpt.js +11 -0
  582. package/dist/replay/normalizers/chatgpt.js.map +1 -0
  583. package/dist/replay/normalizers/claude.d.ts +6 -0
  584. package/dist/replay/normalizers/claude.js +11 -0
  585. package/dist/replay/normalizers/claude.js.map +1 -0
  586. package/dist/replay/normalizers/openclaw.d.ts +6 -0
  587. package/dist/replay/normalizers/openclaw.js +11 -0
  588. package/dist/replay/normalizers/openclaw.js.map +1 -0
  589. package/dist/replay/normalizers/shared.d.ts +16 -0
  590. package/dist/replay/normalizers/shared.js +14 -0
  591. package/dist/replay/normalizers/shared.js.map +1 -0
  592. package/dist/replay/runner.d.ts +35 -0
  593. package/dist/replay/runner.js +16 -0
  594. package/dist/replay/runner.js.map +1 -0
  595. package/dist/replay/types.d.ts +57 -0
  596. package/dist/replay/types.js +19 -0
  597. package/dist/replay/types.js.map +1 -0
  598. package/dist/resolution-B7FNQSSP.js +12 -0
  599. package/dist/resolution-B7FNQSSP.js.map +1 -0
  600. package/dist/resolve-auth-token.d.ts +1 -1
  601. package/dist/resolve-provider-secret.js +2 -2
  602. package/dist/response-guidance-recall.d.ts +18 -0
  603. package/dist/response-guidance-recall.js +11 -0
  604. package/dist/response-guidance-recall.js.map +1 -0
  605. package/dist/resume-bundles.js +7 -5
  606. package/dist/retrieval-agents.d.ts +2 -2
  607. package/dist/retrieval-tiers.d.ts +1 -1
  608. package/dist/routing/engine.d.ts +35 -0
  609. package/dist/routing/engine.js +16 -0
  610. package/dist/routing/engine.js.map +1 -0
  611. package/dist/routing/store.d.ts +27 -0
  612. package/dist/routing/store.js +10 -0
  613. package/dist/routing/store.js.map +1 -0
  614. package/dist/runtime/better-sqlite.d.ts +8 -0
  615. package/dist/runtime/better-sqlite.js +10 -0
  616. package/dist/runtime/better-sqlite.js.map +1 -0
  617. package/dist/runtime/child-process.d.ts +32 -0
  618. package/dist/runtime/child-process.js +10 -0
  619. package/dist/runtime/child-process.js.map +1 -0
  620. package/dist/runtime/env.d.ts +5 -0
  621. package/dist/runtime/env.js +12 -0
  622. package/dist/runtime/env.js.map +1 -0
  623. package/dist/sdk-compat.js +1 -1
  624. package/dist/search/document-scanner.d.ts +22 -0
  625. package/dist/search/document-scanner.js +8 -0
  626. package/dist/search/document-scanner.js.map +1 -0
  627. package/dist/search/embed-helper.d.ts +35 -0
  628. package/dist/search/embed-helper.js +9 -0
  629. package/dist/search/embed-helper.js.map +1 -0
  630. package/dist/search/factory.d.ts +32 -0
  631. package/dist/search/factory.js +29 -0
  632. package/dist/search/factory.js.map +1 -0
  633. package/dist/search/index.d.ts +15 -0
  634. package/dist/search/index.js +50 -0
  635. package/dist/search/index.js.map +1 -0
  636. package/dist/search/lancedb-backend.d.ts +51 -0
  637. package/dist/search/lancedb-backend.js +10 -0
  638. package/dist/search/lancedb-backend.js.map +1 -0
  639. package/dist/search/meilisearch-backend.d.ts +48 -0
  640. package/dist/search/meilisearch-backend.js +10 -0
  641. package/dist/search/meilisearch-backend.js.map +1 -0
  642. package/dist/search/noop-backend.d.ts +26 -0
  643. package/dist/search/noop-backend.js +8 -0
  644. package/dist/search/noop-backend.js.map +1 -0
  645. package/dist/search/orama-backend.d.ts +53 -0
  646. package/dist/search/orama-backend.js +10 -0
  647. package/dist/search/orama-backend.js.map +1 -0
  648. package/dist/search/port.d.ts +61 -0
  649. package/dist/search/port.js +1 -0
  650. package/dist/search/port.js.map +1 -0
  651. package/dist/search/remote-backend.d.ts +39 -0
  652. package/dist/search/remote-backend.js +9 -0
  653. package/dist/search/remote-backend.js.map +1 -0
  654. package/dist/secure-store/index.d.ts +890 -0
  655. package/dist/secure-store/index.js +156 -0
  656. package/dist/secure-store/index.js.map +1 -0
  657. package/dist/semantic-VwGI14Ok.d.ts +69 -0
  658. package/dist/semantic-consolidation-4HkHWgeI.d.ts +180 -0
  659. package/dist/semantic-consolidation.d.ts +3 -3
  660. package/dist/semantic-consolidation.js +15 -8
  661. package/dist/semantic-rule-promotion.js +9 -6
  662. package/dist/semantic-rule-verifier.d.ts +1 -1
  663. package/dist/semantic-rule-verifier.js +10 -7
  664. package/dist/session-observer-bands.d.ts +1 -1
  665. package/dist/session-observer-state.d.ts +1 -1
  666. package/dist/shared-context/manager.d.ts +131 -0
  667. package/dist/shared-context/manager.js +15 -0
  668. package/dist/shared-context/manager.js.map +1 -0
  669. package/dist/signal.d.ts +1 -1
  670. package/dist/skills-registry.js +13 -1
  671. package/dist/skills-registry.js.map +1 -1
  672. package/dist/state-store-VZU2IA53.js +16 -0
  673. package/dist/state-store-VZU2IA53.js.map +1 -0
  674. package/dist/storage-paths.d.ts +9 -0
  675. package/dist/storage-paths.js +20 -0
  676. package/dist/storage-paths.js.map +1 -0
  677. package/dist/storage.d.ts +6 -2
  678. package/dist/storage.js +8 -5
  679. package/dist/summarizer.d.ts +6 -1
  680. package/dist/summarizer.js +11 -10
  681. package/dist/summary-snapshot.d.ts +1 -1
  682. package/dist/summary-snapshot.js +2 -1
  683. package/dist/surfaces/dreams.d.ts +16 -0
  684. package/dist/surfaces/dreams.js +282 -0
  685. package/dist/surfaces/dreams.js.map +1 -0
  686. package/dist/surfaces/heartbeat.d.ts +17 -0
  687. package/dist/surfaces/heartbeat.js +265 -0
  688. package/dist/surfaces/heartbeat.js.map +1 -0
  689. package/dist/targeted-fact-recall.d.ts +17 -0
  690. package/dist/targeted-fact-recall.js +11 -0
  691. package/dist/targeted-fact-recall.js.map +1 -0
  692. package/dist/telemetry-transcript.d.ts +7 -0
  693. package/dist/telemetry-transcript.js +16 -0
  694. package/dist/telemetry-transcript.js.map +1 -0
  695. package/dist/temporal-supersession.d.ts +4 -2
  696. package/dist/temporal-supersession.js +2 -1
  697. package/dist/temporal-validity.d.ts +1 -1
  698. package/dist/threading.d.ts +6 -1
  699. package/dist/threading.js +2 -1
  700. package/dist/tier-migration.d.ts +5 -3
  701. package/dist/tier-routing.d.ts +1 -1
  702. package/dist/tokens.js +2 -2
  703. package/dist/topics.d.ts +1 -1
  704. package/dist/transcript.d.ts +16 -2
  705. package/dist/transcript.js +2 -1
  706. package/dist/transfer/autodetect.d.ts +4 -0
  707. package/dist/transfer/autodetect.js +15 -0
  708. package/dist/transfer/autodetect.js.map +1 -0
  709. package/dist/transfer/backup.d.ts +21 -0
  710. package/dist/transfer/backup.js +17 -0
  711. package/dist/transfer/backup.js.map +1 -0
  712. package/dist/transfer/capsule-export.d.ts +113 -0
  713. package/dist/transfer/capsule-export.js +19 -0
  714. package/dist/transfer/capsule-export.js.map +1 -0
  715. package/dist/transfer/capsule-import.d.ts +124 -0
  716. package/dist/transfer/capsule-import.js +16 -0
  717. package/dist/transfer/capsule-import.js.map +1 -0
  718. package/dist/transfer/constants.d.ts +13 -0
  719. package/dist/transfer/constants.js +12 -0
  720. package/dist/transfer/constants.js.map +1 -0
  721. package/dist/transfer/export-json.d.ts +11 -0
  722. package/dist/transfer/export-json.js +11 -0
  723. package/dist/transfer/export-json.js.map +1 -0
  724. package/dist/transfer/export-md.d.ts +10 -0
  725. package/dist/transfer/export-md.js +13 -0
  726. package/dist/transfer/export-md.js.map +1 -0
  727. package/dist/transfer/export-sqlite.d.ts +9 -0
  728. package/dist/transfer/export-sqlite.js +12 -0
  729. package/dist/transfer/export-sqlite.js.map +1 -0
  730. package/dist/transfer/fs-utils.d.ts +61 -0
  731. package/dist/transfer/fs-utils.js +40 -0
  732. package/dist/transfer/fs-utils.js.map +1 -0
  733. package/dist/transfer/import-json.d.ts +16 -0
  734. package/dist/transfer/import-json.js +13 -0
  735. package/dist/transfer/import-json.js.map +1 -0
  736. package/dist/transfer/import-md.d.ts +14 -0
  737. package/dist/transfer/import-md.js +11 -0
  738. package/dist/transfer/import-md.js.map +1 -0
  739. package/dist/transfer/import-sqlite.d.ts +14 -0
  740. package/dist/transfer/import-sqlite.js +12 -0
  741. package/dist/transfer/import-sqlite.js.map +1 -0
  742. package/dist/transfer/sqlite-schema.d.ts +4 -0
  743. package/dist/transfer/sqlite-schema.js +10 -0
  744. package/dist/transfer/sqlite-schema.js.map +1 -0
  745. package/dist/transfer/types.d.ts +916 -0
  746. package/dist/transfer/types.js +30 -0
  747. package/dist/transfer/types.js.map +1 -0
  748. package/dist/trust-zones.d.ts +3 -2
  749. package/dist/trust-zones.js +1 -1
  750. package/dist/types.d.ts +88 -3
  751. package/dist/types.js +1 -1
  752. package/dist/user-model.d.ts +37 -0
  753. package/dist/user-model.js +28 -0
  754. package/dist/user-model.js.map +1 -0
  755. package/dist/utility-runtime.d.ts +1 -1
  756. package/dist/verified-recall.js +11 -8
  757. package/dist/work/board.d.ts +43 -0
  758. package/dist/work/board.js +14 -0
  759. package/dist/work/board.js.map +1 -0
  760. package/dist/work/boundary.d.ts +8 -0
  761. package/dist/work/boundary.js +14 -0
  762. package/dist/work/boundary.js.map +1 -0
  763. package/dist/work/storage.d.ts +39 -0
  764. package/dist/work/storage.js +11 -0
  765. package/dist/work/storage.js.map +1 -0
  766. package/dist/work/types.d.ts +75 -0
  767. package/dist/work/types.js +1 -0
  768. package/dist/work/types.js.map +1 -0
  769. package/package.json +2767 -6
  770. package/scripts/faiss_index.py +816 -0
  771. package/scripts/faiss_requirements.txt +3 -0
  772. package/skills/remnic-entities/SKILL.md +51 -0
  773. package/skills/remnic-memory-workflow/SKILL.md +61 -0
  774. package/skills/remnic-recall/SKILL.md +51 -0
  775. package/skills/remnic-remember/SKILL.md +56 -0
  776. package/skills/remnic-search/SKILL.md +51 -0
  777. package/skills/remnic-status/SKILL.md +51 -0
  778. package/src/abort-error.test.ts +49 -0
  779. package/src/abort-error.ts +46 -0
  780. package/src/abstraction-nodes.ts +162 -0
  781. package/src/access-audit.test.ts +178 -0
  782. package/src/access-audit.ts +125 -0
  783. package/src/access-cli.test.ts +439 -0
  784. package/src/access-cli.ts +438 -0
  785. package/src/access-http.test.ts +225 -0
  786. package/src/access-http.ts +1899 -0
  787. package/src/access-idempotency.ts +232 -0
  788. package/src/access-mcp.test.ts +568 -0
  789. package/src/access-mcp.ts +3056 -0
  790. package/src/access-schema-pi.test.ts +60 -0
  791. package/src/access-schema.ts +522 -0
  792. package/src/access-service-namespace.test.ts +123 -0
  793. package/src/access-service.ts +5629 -0
  794. package/src/action-confidence.test.ts +206 -0
  795. package/src/action-confidence.ts +466 -0
  796. package/src/active-memory-bridge.test.ts +285 -0
  797. package/src/active-memory-bridge.ts +217 -0
  798. package/src/active-recall.test.ts +484 -0
  799. package/src/active-recall.ts +459 -0
  800. package/src/adapters/claude-code.ts +56 -0
  801. package/src/adapters/codex.ts +57 -0
  802. package/src/adapters/hermes.ts +64 -0
  803. package/src/adapters/index.ts +6 -0
  804. package/src/adapters/registry.ts +41 -0
  805. package/src/adapters/replit.ts +55 -0
  806. package/src/adapters/types.ts +51 -0
  807. package/src/behavior-learner.ts +144 -0
  808. package/src/behavior-signals.ts +73 -0
  809. package/src/binary-lifecycle/backend.ts +117 -0
  810. package/src/binary-lifecycle/index.ts +35 -0
  811. package/src/binary-lifecycle/manifest.ts +79 -0
  812. package/src/binary-lifecycle/pipeline.ts +352 -0
  813. package/src/binary-lifecycle/scanner.ts +89 -0
  814. package/src/binary-lifecycle/types.ts +89 -0
  815. package/src/bootstrap.ts +178 -0
  816. package/src/boxes.ts +521 -0
  817. package/src/briefing.test.ts +1535 -0
  818. package/src/briefing.ts +1382 -0
  819. package/src/buffer-session.test.ts +443 -0
  820. package/src/buffer-surprise-report.ts +176 -0
  821. package/src/buffer-surprise-telemetry.test.ts +606 -0
  822. package/src/buffer-surprise-trigger.test.ts +766 -0
  823. package/src/buffer-surprise.test.ts +339 -0
  824. package/src/buffer-surprise.ts +203 -0
  825. package/src/buffer.ts +900 -0
  826. package/src/bulk-import/cli-command.test.ts +204 -0
  827. package/src/bulk-import/index.ts +34 -0
  828. package/src/bulk-import/pipeline.test.ts +445 -0
  829. package/src/bulk-import/pipeline.ts +178 -0
  830. package/src/bulk-import/registry.test.ts +151 -0
  831. package/src/bulk-import/registry.ts +72 -0
  832. package/src/bulk-import/types.test.ts +272 -0
  833. package/src/bulk-import/types.ts +145 -0
  834. package/src/calibration.ts +394 -0
  835. package/src/capsule-cli.test.ts +398 -0
  836. package/src/capsule-cli.ts +565 -0
  837. package/src/causal-behavior.ts +308 -0
  838. package/src/causal-chain.ts +419 -0
  839. package/src/causal-consolidation.ts +370 -0
  840. package/src/causal-retrieval.ts +286 -0
  841. package/src/causal-trajectory-graph.ts +60 -0
  842. package/src/causal-trajectory.ts +303 -0
  843. package/src/chunking.ts +220 -0
  844. package/src/citations.ts +232 -0
  845. package/src/cli.ts +9403 -0
  846. package/src/codex-cli-fallback.ts +162 -0
  847. package/src/codex-thread-key.ts +1 -0
  848. package/src/coding/access-coding-context.test.ts +197 -0
  849. package/src/coding/coding-branch-scope.test.ts +281 -0
  850. package/src/coding/coding-namespace.test.ts +360 -0
  851. package/src/coding/coding-namespace.ts +412 -0
  852. package/src/coding/coding-orchestrator.test.ts +249 -0
  853. package/src/coding/git-context.test.ts +507 -0
  854. package/src/coding/git-context.ts +336 -0
  855. package/src/coding/mcp-set-coding-context.test.ts +174 -0
  856. package/src/coding/review-context.test.ts +316 -0
  857. package/src/coding/review-context.ts +349 -0
  858. package/src/coding/wire-coding-context.test.ts +468 -0
  859. package/src/commitment-ledger.test.ts +78 -0
  860. package/src/commitment-ledger.ts +337 -0
  861. package/src/compat/checks.test.ts +206 -0
  862. package/src/compat/checks.ts +716 -0
  863. package/src/compat/types.ts +33 -0
  864. package/src/compounding/engine.ts +1686 -0
  865. package/src/compounding/preference-consolidator.ts +778 -0
  866. package/src/compression-optimizer.ts +312 -0
  867. package/src/config.test.ts +930 -0
  868. package/src/config.ts +3807 -0
  869. package/src/connectors/codex/instructions.md +160 -0
  870. package/src/connectors/codex/resources/namespace-cheatsheet.md +48 -0
  871. package/src/connectors/codex-marketplace.ts +500 -0
  872. package/src/connectors/codex-materialize-runner.ts +212 -0
  873. package/src/connectors/codex-materialize.ts +983 -0
  874. package/src/connectors/coerce.ts +62 -0
  875. package/src/connectors/index.test.ts +1570 -0
  876. package/src/connectors/index.ts +3222 -0
  877. package/src/connectors/live/framework.ts +164 -0
  878. package/src/connectors/live/github.test.ts +1218 -0
  879. package/src/connectors/live/github.ts +1068 -0
  880. package/src/connectors/live/gmail.test.ts +1706 -0
  881. package/src/connectors/live/gmail.ts +1293 -0
  882. package/src/connectors/live/google-drive.test.ts +696 -0
  883. package/src/connectors/live/google-drive.ts +724 -0
  884. package/src/connectors/live/index.ts +101 -0
  885. package/src/connectors/live/live-connectors.test.ts +689 -0
  886. package/src/connectors/live/notion.test.ts +1109 -0
  887. package/src/connectors/live/notion.ts +978 -0
  888. package/src/connectors/live/registry.ts +103 -0
  889. package/src/connectors/live/state-store.ts +399 -0
  890. package/src/connectors/live/transient-errors.ts +150 -0
  891. package/src/connectors/weclone-installer.test.ts +850 -0
  892. package/src/connectors-cli.ts +513 -0
  893. package/src/console/state.test.ts +224 -0
  894. package/src/console/state.ts +514 -0
  895. package/src/console/trace.test.ts +813 -0
  896. package/src/console/trace.ts +603 -0
  897. package/src/console/tui.test.ts +582 -0
  898. package/src/console/tui.ts +508 -0
  899. package/src/consolidation-operator.ts +182 -0
  900. package/src/consolidation-provenance-check.ts +551 -0
  901. package/src/consolidation-undo.ts +718 -0
  902. package/src/contradiction/contradiction-judge.test.ts +189 -0
  903. package/src/contradiction/contradiction-judge.ts +333 -0
  904. package/src/contradiction/contradiction-review.ts +574 -0
  905. package/src/contradiction/contradiction-scan.ts +504 -0
  906. package/src/contradiction/contradiction.test.ts +2230 -0
  907. package/src/contradiction/index.ts +37 -0
  908. package/src/contradiction/resolution.ts +383 -0
  909. package/src/conversation-index/backend.ts +323 -0
  910. package/src/conversation-index/chunker.ts +47 -0
  911. package/src/conversation-index/cleanup.ts +53 -0
  912. package/src/conversation-index/faiss-adapter.ts +384 -0
  913. package/src/conversation-index/indexer.test.ts +164 -0
  914. package/src/conversation-index/indexer.ts +192 -0
  915. package/src/conversation-index/search.ts +37 -0
  916. package/src/cross-namespace-budget.test.ts +275 -0
  917. package/src/cross-namespace-budget.ts +365 -0
  918. package/src/cue-anchors.ts +163 -0
  919. package/src/curation/index.ts +544 -0
  920. package/src/dashboard-runtime.ts +337 -0
  921. package/src/day-summary.ts +122 -0
  922. package/src/dedup/index.ts +330 -0
  923. package/src/dedup/semantic.test.ts +1577 -0
  924. package/src/dedup/semantic.ts +148 -0
  925. package/src/delinearize.ts +193 -0
  926. package/src/direct-answer-wiring.test.ts +473 -0
  927. package/src/direct-answer-wiring.ts +180 -0
  928. package/src/direct-answer.test.ts +484 -0
  929. package/src/direct-answer.ts +273 -0
  930. package/src/embedding-fallback.ts +565 -0
  931. package/src/enrichment/audit.ts +89 -0
  932. package/src/enrichment/index.ts +27 -0
  933. package/src/enrichment/pipeline.ts +197 -0
  934. package/src/enrichment/provider-registry.ts +85 -0
  935. package/src/enrichment/types.ts +100 -0
  936. package/src/enrichment/web-search-provider.ts +63 -0
  937. package/src/entity-retrieval.ts +774 -0
  938. package/src/entity-schema.ts +239 -0
  939. package/src/evals.ts +1312 -0
  940. package/src/event-order-recall.test.ts +4164 -0
  941. package/src/event-order-recall.ts +2802 -0
  942. package/src/evidence-pack.test.ts +89 -0
  943. package/src/evidence-pack.ts +388 -0
  944. package/src/explicit-capture.ts +530 -0
  945. package/src/explicit-cue-recall.test.ts +3019 -0
  946. package/src/explicit-cue-recall.ts +5545 -0
  947. package/src/extraction-judge-telemetry.ts +234 -0
  948. package/src/extraction-judge-training.ts +221 -0
  949. package/src/extraction-judge.ts +846 -0
  950. package/src/extraction-timeout.test.ts +265 -0
  951. package/src/extraction.ts +2719 -0
  952. package/src/fallback-llm.test.ts +1060 -0
  953. package/src/fallback-llm.ts +918 -0
  954. package/src/focused-list-recall.test.ts +734 -0
  955. package/src/focused-list-recall.ts +1160 -0
  956. package/src/graph-dashboard-diff.ts +35 -0
  957. package/src/graph-dashboard-key.ts +5 -0
  958. package/src/graph-dashboard-parser.ts +104 -0
  959. package/src/graph-edge-reinforcement.ts +192 -0
  960. package/src/graph-events.ts +151 -0
  961. package/src/graph-recall.test.ts +164 -0
  962. package/src/graph-recall.ts +189 -0
  963. package/src/graph-retrieval.test.ts +809 -0
  964. package/src/graph-retrieval.ts +823 -0
  965. package/src/graph-snapshot.ts +329 -0
  966. package/src/graph.ts +813 -0
  967. package/src/harmonic-retrieval.ts +223 -0
  968. package/src/himem.ts +154 -0
  969. package/src/hygiene.ts +87 -0
  970. package/src/identity-continuity.ts +333 -0
  971. package/src/importance.ts +328 -0
  972. package/src/importers/base.test.ts +294 -0
  973. package/src/importers/base.ts +436 -0
  974. package/src/importers/index.ts +21 -0
  975. package/src/index.ts +1204 -0
  976. package/src/intent.ts +154 -0
  977. package/src/json-extract.ts +85 -0
  978. package/src/json-store.ts +42 -0
  979. package/src/lcm/archive.ts +617 -0
  980. package/src/lcm/dag.ts +199 -0
  981. package/src/lcm/engine.ts +645 -0
  982. package/src/lcm/index.ts +7 -0
  983. package/src/lcm/queue.test.ts +178 -0
  984. package/src/lcm/queue.ts +200 -0
  985. package/src/lcm/recall.ts +117 -0
  986. package/src/lcm/schema.ts +154 -0
  987. package/src/lcm/summarizer.ts +235 -0
  988. package/src/lcm/tools.ts +191 -0
  989. package/src/lcm-engine.test.ts +660 -0
  990. package/src/legacy-hook-compat.test.ts +20 -0
  991. package/src/legacy-hook-compat.ts +45 -0
  992. package/src/lifecycle.ts +289 -0
  993. package/src/live-connectors-runner.ts +385 -0
  994. package/src/local-llm-qos.test.ts +303 -0
  995. package/src/local-llm-thinking.test.ts +292 -0
  996. package/src/local-llm.ts +1464 -0
  997. package/src/logger.ts +49 -0
  998. package/src/maintenance/archive-observations.ts +147 -0
  999. package/src/maintenance/backup-stamp.ts +3 -0
  1000. package/src/maintenance/dreams-ledger.ts +516 -0
  1001. package/src/maintenance/first-start-migration.ts +362 -0
  1002. package/src/maintenance/forget.test.ts +206 -0
  1003. package/src/maintenance/forget.ts +126 -0
  1004. package/src/maintenance/graph-edge-decay.test.ts +409 -0
  1005. package/src/maintenance/graph-edge-decay.ts +394 -0
  1006. package/src/maintenance/memory-governance-cron.ts +447 -0
  1007. package/src/maintenance/memory-governance.ts +1039 -0
  1008. package/src/maintenance/migrate-observations.ts +216 -0
  1009. package/src/maintenance/observation-ledger-utils.ts +54 -0
  1010. package/src/maintenance/pattern-reinforcement.test.ts +875 -0
  1011. package/src/maintenance/pattern-reinforcement.ts +369 -0
  1012. package/src/maintenance/purge.ts +334 -0
  1013. package/src/maintenance/rebuild-memory-lifecycle-ledger.ts +78 -0
  1014. package/src/maintenance/rebuild-memory-projection.ts +1234 -0
  1015. package/src/maintenance/rebuild-observations.ts +178 -0
  1016. package/src/maintenance/tier-stats.test.ts +378 -0
  1017. package/src/maintenance/tier-stats.ts +222 -0
  1018. package/src/mcp-memory-inspector-app.ts +421 -0
  1019. package/src/memory-action-policy.ts +80 -0
  1020. package/src/memory-cache.ts +208 -0
  1021. package/src/memory-extension/claude-code-publisher.ts +51 -0
  1022. package/src/memory-extension/codex-publisher.ts +149 -0
  1023. package/src/memory-extension/hermes-publisher.ts +51 -0
  1024. package/src/memory-extension/index.ts +100 -0
  1025. package/src/memory-extension/shared-instructions.ts +133 -0
  1026. package/src/memory-extension/types.ts +86 -0
  1027. package/src/memory-extension-host/host-discovery.ts +276 -0
  1028. package/src/memory-extension-host/index.ts +14 -0
  1029. package/src/memory-extension-host/render-extensions-block.ts +73 -0
  1030. package/src/memory-extension-host/types.ts +21 -0
  1031. package/src/memory-lifecycle-ledger-utils.ts +116 -0
  1032. package/src/memory-projection-format.ts +11 -0
  1033. package/src/memory-projection-store.ts +951 -0
  1034. package/src/memory-provenance.test.ts +196 -0
  1035. package/src/memory-provenance.ts +484 -0
  1036. package/src/memory-worth-bench.test.ts +71 -0
  1037. package/src/memory-worth-bench.ts +265 -0
  1038. package/src/memory-worth-filter.test.ts +209 -0
  1039. package/src/memory-worth-filter.ts +204 -0
  1040. package/src/memory-worth-frontmatter.test.ts +311 -0
  1041. package/src/memory-worth-outcomes.test.ts +316 -0
  1042. package/src/memory-worth-outcomes.ts +286 -0
  1043. package/src/memory-worth.test.ts +317 -0
  1044. package/src/memory-worth.ts +215 -0
  1045. package/src/message-parts/index.ts +806 -0
  1046. package/src/message-parts/message-parts.test.ts +421 -0
  1047. package/src/migrate/from-engram.ts +789 -0
  1048. package/src/model-registry.ts +313 -0
  1049. package/src/models-json.ts +76 -0
  1050. package/src/namespaces/migrate.ts +187 -0
  1051. package/src/namespaces/path.ts +25 -0
  1052. package/src/namespaces/principal.test.ts +195 -0
  1053. package/src/namespaces/principal.ts +86 -0
  1054. package/src/namespaces/search.test.ts +105 -0
  1055. package/src/namespaces/search.ts +233 -0
  1056. package/src/namespaces/storage.ts +74 -0
  1057. package/src/native-knowledge.ts +1823 -0
  1058. package/src/negative.ts +72 -0
  1059. package/src/network/tailscale.ts +179 -0
  1060. package/src/network/webdav.ts +385 -0
  1061. package/src/objective-state-writers.ts +951 -0
  1062. package/src/objective-state.ts +320 -0
  1063. package/src/onboarding/index.ts +529 -0
  1064. package/src/openai-chat-compat.ts +56 -0
  1065. package/src/operator-toolkit.ts +2132 -0
  1066. package/src/opik-exporter.test.ts +72 -0
  1067. package/src/opik-exporter.ts +587 -0
  1068. package/src/orchestrator-extraction-queue.test.ts +197 -0
  1069. package/src/orchestrator-flush.test.ts +1171 -0
  1070. package/src/orchestrator-pattern-reinforcement.test.ts +128 -0
  1071. package/src/orchestrator-source-attribution.test.ts +701 -0
  1072. package/src/orchestrator.ts +16368 -0
  1073. package/src/page-versioning.ts +450 -0
  1074. package/src/patterns-cli.ts +574 -0
  1075. package/src/peers/index.ts +54 -0
  1076. package/src/peers/migrate-from-identity-anchor.test.ts +291 -0
  1077. package/src/peers/migrate-from-identity-anchor.ts +350 -0
  1078. package/src/peers/peers.test.ts +419 -0
  1079. package/src/peers/profile-reasoner.ts +694 -0
  1080. package/src/peers/storage.ts +1350 -0
  1081. package/src/peers/types.ts +138 -0
  1082. package/src/plugin-id.ts +84 -0
  1083. package/src/policy-runtime.ts +209 -0
  1084. package/src/procedural/procedure-miner.ts +150 -0
  1085. package/src/procedural/procedure-recall.ts +93 -0
  1086. package/src/procedural/procedure-stats.ts +213 -0
  1087. package/src/procedural/procedure-types.ts +132 -0
  1088. package/src/procedural/reinforcement-core.test.ts +132 -0
  1089. package/src/procedural/reinforcement-core.ts +73 -0
  1090. package/src/profiling.test.ts +263 -0
  1091. package/src/profiling.ts +435 -0
  1092. package/src/projection/index.ts +398 -0
  1093. package/src/qmd-recall-cache.test.ts +138 -0
  1094. package/src/qmd-recall-cache.ts +111 -0
  1095. package/src/qmd.test.ts +257 -0
  1096. package/src/qmd.ts +2614 -0
  1097. package/src/reasoning-trace-recall.ts +201 -0
  1098. package/src/reasoning-trace-types.ts +235 -0
  1099. package/src/recall-audit-anomaly.test.ts +246 -0
  1100. package/src/recall-audit-anomaly.ts +297 -0
  1101. package/src/recall-audit.test.ts +51 -0
  1102. package/src/recall-audit.ts +72 -0
  1103. package/src/recall-budget-config.test.ts +87 -0
  1104. package/src/recall-disclosure-escalation.test.ts +196 -0
  1105. package/src/recall-disclosure-escalation.ts +158 -0
  1106. package/src/recall-disclosure-shaping.test.ts +146 -0
  1107. package/src/recall-disclosure.test.ts +214 -0
  1108. package/src/recall-explain-renderer.test.ts +140 -0
  1109. package/src/recall-explain-renderer.ts +356 -0
  1110. package/src/recall-mmr.test.ts +808 -0
  1111. package/src/recall-mmr.ts +607 -0
  1112. package/src/recall-qos.test.ts +85 -0
  1113. package/src/recall-qos.ts +82 -0
  1114. package/src/recall-query-policy.ts +221 -0
  1115. package/src/recall-state.test.ts +233 -0
  1116. package/src/recall-state.ts +456 -0
  1117. package/src/recall-tag-filter.ts +143 -0
  1118. package/src/recall-tokenization.ts +35 -0
  1119. package/src/recall-xray-cli.test.ts +118 -0
  1120. package/src/recall-xray-cli.ts +100 -0
  1121. package/src/recall-xray-disclosure-telemetry.test.ts +183 -0
  1122. package/src/recall-xray-renderer.test.ts +539 -0
  1123. package/src/recall-xray-renderer.ts +487 -0
  1124. package/src/recall-xray.test.ts +503 -0
  1125. package/src/recall-xray.ts +621 -0
  1126. package/src/reconstruct.ts +41 -0
  1127. package/src/release-changelog.ts +35 -0
  1128. package/src/relevance.ts +67 -0
  1129. package/src/replay/normalizers/chatgpt.ts +133 -0
  1130. package/src/replay/normalizers/claude.ts +102 -0
  1131. package/src/replay/normalizers/openclaw.ts +119 -0
  1132. package/src/replay/normalizers/shared.ts +69 -0
  1133. package/src/replay/runner.ts +197 -0
  1134. package/src/replay/types.ts +143 -0
  1135. package/src/rerank.test.ts +48 -0
  1136. package/src/rerank.ts +176 -0
  1137. package/src/resolve-auth-token.test.ts +226 -0
  1138. package/src/resolve-auth-token.ts +151 -0
  1139. package/src/resolve-provider-secret.test.ts +187 -0
  1140. package/src/resolve-provider-secret.ts +410 -0
  1141. package/src/response-guidance-recall.test.ts +3952 -0
  1142. package/src/response-guidance-recall.ts +4431 -0
  1143. package/src/resume-bundles.ts +415 -0
  1144. package/src/retrieval-agents.ts +623 -0
  1145. package/src/retrieval-tiers.ts +25 -0
  1146. package/src/retrieval.ts +104 -0
  1147. package/src/review/index.test.ts +201 -0
  1148. package/src/review/index.ts +536 -0
  1149. package/src/routing/engine.ts +162 -0
  1150. package/src/routing/store.ts +321 -0
  1151. package/src/runtime/better-sqlite.test.ts +32 -0
  1152. package/src/runtime/better-sqlite.ts +76 -0
  1153. package/src/runtime/child-process.ts +67 -0
  1154. package/src/runtime/env.ts +48 -0
  1155. package/src/sanitize.ts +58 -0
  1156. package/src/schemas.ts +449 -0
  1157. package/src/sdk-compat.ts +87 -0
  1158. package/src/search/document-scanner.ts +96 -0
  1159. package/src/search/embed-helper.ts +142 -0
  1160. package/src/search/factory.ts +189 -0
  1161. package/src/search/index.ts +10 -0
  1162. package/src/search/lancedb-backend.ts +342 -0
  1163. package/src/search/meilisearch-backend.ts +232 -0
  1164. package/src/search/noop-backend.ts +57 -0
  1165. package/src/search/orama-backend.ts +358 -0
  1166. package/src/search/port.ts +86 -0
  1167. package/src/search/remote-backend.ts +124 -0
  1168. package/src/secure-store/cipher.ts +271 -0
  1169. package/src/secure-store/cli-handlers.ts +355 -0
  1170. package/src/secure-store/cli-renderer.ts +131 -0
  1171. package/src/secure-store/header.ts +373 -0
  1172. package/src/secure-store/index.ts +137 -0
  1173. package/src/secure-store/kdf.ts +263 -0
  1174. package/src/secure-store/keyring.ts +106 -0
  1175. package/src/secure-store/metadata.ts +394 -0
  1176. package/src/secure-store/passphrase-reader.ts +252 -0
  1177. package/src/secure-store/secure-fs.ts +571 -0
  1178. package/src/secure-store/secure-store.test.ts +755 -0
  1179. package/src/semantic-chunking.ts +545 -0
  1180. package/src/semantic-consolidation.test.ts +182 -0
  1181. package/src/semantic-consolidation.ts +432 -0
  1182. package/src/semantic-rule-promotion.ts +183 -0
  1183. package/src/semantic-rule-verifier.ts +160 -0
  1184. package/src/session-integrity.ts +569 -0
  1185. package/src/session-observer-bands.ts +11 -0
  1186. package/src/session-observer-state.ts +346 -0
  1187. package/src/session-toggles.test.ts +96 -0
  1188. package/src/session-toggles.ts +159 -0
  1189. package/src/shared-context/manager.ts +810 -0
  1190. package/src/signal.ts +84 -0
  1191. package/src/skills-registry.test.ts +277 -0
  1192. package/src/skills-registry.ts +120 -0
  1193. package/src/source-attribution-roundtrip.test.ts +215 -0
  1194. package/src/source-attribution.test.ts +1425 -0
  1195. package/src/source-attribution.ts +639 -0
  1196. package/src/spaces/index.ts +627 -0
  1197. package/src/storage-paths.ts +117 -0
  1198. package/src/storage.ts +6657 -0
  1199. package/src/store-contract.ts +55 -0
  1200. package/src/summarizer.ts +844 -0
  1201. package/src/summary-snapshot.test.ts +681 -0
  1202. package/src/summary-snapshot.ts +238 -0
  1203. package/src/surfaces/dreams.test.ts +394 -0
  1204. package/src/surfaces/dreams.ts +346 -0
  1205. package/src/surfaces/heartbeat.test.ts +415 -0
  1206. package/src/surfaces/heartbeat.ts +325 -0
  1207. package/src/sync/index.ts +308 -0
  1208. package/src/targeted-fact-recall.test.ts +1694 -0
  1209. package/src/targeted-fact-recall.ts +2905 -0
  1210. package/src/taxonomy/default-taxonomy.ts +87 -0
  1211. package/src/taxonomy/index.ts +26 -0
  1212. package/src/taxonomy/resolver-doc-generator.ts +57 -0
  1213. package/src/taxonomy/resolver.ts +184 -0
  1214. package/src/taxonomy/taxonomy-loader.ts +186 -0
  1215. package/src/taxonomy/types.ts +48 -0
  1216. package/src/telemetry-transcript.ts +70 -0
  1217. package/src/temporal-index.ts +890 -0
  1218. package/src/temporal-supersession.test.ts +2703 -0
  1219. package/src/temporal-supersession.ts +493 -0
  1220. package/src/temporal-validity.test.ts +448 -0
  1221. package/src/temporal-validity.ts +123 -0
  1222. package/src/threading.ts +395 -0
  1223. package/src/tier-migration.ts +124 -0
  1224. package/src/tier-routing.ts +102 -0
  1225. package/src/tmt.ts +462 -0
  1226. package/src/tokens.test.ts +178 -0
  1227. package/src/tokens.ts +279 -0
  1228. package/src/topics.ts +147 -0
  1229. package/src/training-export/cli-date-validation.test.ts +258 -0
  1230. package/src/training-export/converter.test.ts +452 -0
  1231. package/src/training-export/converter.ts +319 -0
  1232. package/src/training-export/date-parse.ts +117 -0
  1233. package/src/training-export/index.ts +26 -0
  1234. package/src/training-export/registry.test.ts +85 -0
  1235. package/src/training-export/registry.ts +57 -0
  1236. package/src/training-export/types.ts +31 -0
  1237. package/src/transcript.ts +1179 -0
  1238. package/src/transfer/autodetect.ts +30 -0
  1239. package/src/transfer/backup.ts +138 -0
  1240. package/src/transfer/capsule-crypto.ts +485 -0
  1241. package/src/transfer/capsule-encrypt.test.ts +690 -0
  1242. package/src/transfer/capsule-export.ts +543 -0
  1243. package/src/transfer/capsule-fork.ts +375 -0
  1244. package/src/transfer/capsule-import.ts +564 -0
  1245. package/src/transfer/capsule-merge.ts +433 -0
  1246. package/src/transfer/conflict-policy.ts +16 -0
  1247. package/src/transfer/constants.ts +13 -0
  1248. package/src/transfer/exclusions.ts +37 -0
  1249. package/src/transfer/export-json.ts +65 -0
  1250. package/src/transfer/export-md.ts +59 -0
  1251. package/src/transfer/export-sqlite.ts +52 -0
  1252. package/src/transfer/fs-utils.ts +269 -0
  1253. package/src/transfer/import-json.ts +108 -0
  1254. package/src/transfer/import-md.ts +84 -0
  1255. package/src/transfer/import-sqlite.ts +100 -0
  1256. package/src/transfer/integrity.ts +71 -0
  1257. package/src/transfer/sqlite-schema.ts +16 -0
  1258. package/src/transfer/types.ts +297 -0
  1259. package/src/trust-zones.ts +1186 -0
  1260. package/src/types.ts +3074 -0
  1261. package/src/user-model.test.ts +124 -0
  1262. package/src/user-model.ts +162 -0
  1263. package/src/utility-learner.ts +353 -0
  1264. package/src/utility-runtime.ts +88 -0
  1265. package/src/utility-telemetry.ts +215 -0
  1266. package/src/utils/category-dir.ts +44 -0
  1267. package/src/utils/errno.ts +6 -0
  1268. package/src/utils/iso-timestamp.test.ts +37 -0
  1269. package/src/utils/iso-timestamp.ts +164 -0
  1270. package/src/utils/path.ts +26 -0
  1271. package/src/verified-recall.ts +138 -0
  1272. package/src/version-utils.test.ts +10 -0
  1273. package/src/version-utils.ts +9 -0
  1274. package/src/whitespace.ts +10 -0
  1275. package/src/work/board.ts +359 -0
  1276. package/src/work/boundary.ts +107 -0
  1277. package/src/work/storage.ts +436 -0
  1278. package/src/work/types.ts +82 -0
  1279. package/src/work-product-ledger.ts +265 -0
  1280. package/dist/access-service-BkXt3di1.d.ts +0 -2039
  1281. package/dist/capsule-crypto-SJS5VVAP.js +0 -18
  1282. package/dist/capsule-export-LLEVB2RG.js +0 -17
  1283. package/dist/capsule-import-UW45R2MZ.js +0 -16
  1284. package/dist/capsule-merge-DI7PNQ2H.js +0 -189
  1285. package/dist/chunk-2LGMW3DJ.js +0 -111
  1286. package/dist/chunk-2YMTO4ZJ.js +0 -265
  1287. package/dist/chunk-2YMTO4ZJ.js.map +0 -1
  1288. package/dist/chunk-363MWCD3.js +0 -9683
  1289. package/dist/chunk-363MWCD3.js.map +0 -1
  1290. package/dist/chunk-36CTNQY7.js +0 -1554
  1291. package/dist/chunk-36CTNQY7.js.map +0 -1
  1292. package/dist/chunk-457A4P3L.js +0 -119
  1293. package/dist/chunk-457A4P3L.js.map +0 -1
  1294. package/dist/chunk-4DXC6HQQ.js +0 -1837
  1295. package/dist/chunk-4DXC6HQQ.js.map +0 -1
  1296. package/dist/chunk-4IS4SXIQ.js +0 -2040
  1297. package/dist/chunk-57QNCUEZ.js +0 -1914
  1298. package/dist/chunk-57QNCUEZ.js.map +0 -1
  1299. package/dist/chunk-6AUUAZEX.js +0 -150
  1300. package/dist/chunk-6AUUAZEX.js.map +0 -1
  1301. package/dist/chunk-6TBWYBJ3.js +0 -236
  1302. package/dist/chunk-6XA7UN4Z.js +0 -135
  1303. package/dist/chunk-6Z6UH6TK.js +0 -2129
  1304. package/dist/chunk-6Z6UH6TK.js.map +0 -1
  1305. package/dist/chunk-74EMIVE4.js +0 -329
  1306. package/dist/chunk-74EMIVE4.js.map +0 -1
  1307. package/dist/chunk-74WWN7ZW.js +0 -82
  1308. package/dist/chunk-74WWN7ZW.js.map +0 -1
  1309. package/dist/chunk-767ODGE6.js +0 -183
  1310. package/dist/chunk-A4ACKWIW.js +0 -289
  1311. package/dist/chunk-A4ACKWIW.js.map +0 -1
  1312. package/dist/chunk-ASAITVLA.js +0 -64
  1313. package/dist/chunk-ASAITVLA.js.map +0 -1
  1314. package/dist/chunk-C5HUWVH2.js +0 -891
  1315. package/dist/chunk-C5HUWVH2.js.map +0 -1
  1316. package/dist/chunk-D54LZC5L.js +0 -147
  1317. package/dist/chunk-DF3RVK3X.js +0 -119
  1318. package/dist/chunk-DF3RVK3X.js.map +0 -1
  1319. package/dist/chunk-E6K4NIEU.js +0 -747
  1320. package/dist/chunk-E6K4NIEU.js.map +0 -1
  1321. package/dist/chunk-EEQLFRUM.js +0 -89
  1322. package/dist/chunk-EQINRHYR.js +0 -672
  1323. package/dist/chunk-EQINRHYR.js.map +0 -1
  1324. package/dist/chunk-ETOW6ACV.js +0 -158
  1325. package/dist/chunk-ETOW6ACV.js.map +0 -1
  1326. package/dist/chunk-EYNQTST2.js +0 -721
  1327. package/dist/chunk-FYIYMQ5N.js +0 -221
  1328. package/dist/chunk-FYIYMQ5N.js.map +0 -1
  1329. package/dist/chunk-G2WADRQ3.js +0 -219
  1330. package/dist/chunk-G4SK7DSQ.js +0 -121
  1331. package/dist/chunk-GGD5W7TB.js +0 -105
  1332. package/dist/chunk-GGD5W7TB.js.map +0 -1
  1333. package/dist/chunk-GVPWB7EY.js +0 -390
  1334. package/dist/chunk-GVPWB7EY.js.map +0 -1
  1335. package/dist/chunk-HJYHRE4S.js +0 -647
  1336. package/dist/chunk-I6BQZSML.js +0 -1451
  1337. package/dist/chunk-I6BQZSML.js.map +0 -1
  1338. package/dist/chunk-IBX3VFOM.js +0 -446
  1339. package/dist/chunk-IBX3VFOM.js.map +0 -1
  1340. package/dist/chunk-IXEJRKCZ.js +0 -18
  1341. package/dist/chunk-JBMSGZEQ.js +0 -441
  1342. package/dist/chunk-JBMSGZEQ.js.map +0 -1
  1343. package/dist/chunk-JRNQ3RNA.js +0 -284
  1344. package/dist/chunk-JRNQ3RNA.js.map +0 -1
  1345. package/dist/chunk-K6WK37A6.js +0 -865
  1346. package/dist/chunk-K6WK37A6.js.map +0 -1
  1347. package/dist/chunk-KBYWQWSB.js +0 -271
  1348. package/dist/chunk-KUHRUM6B.js +0 -14397
  1349. package/dist/chunk-KUHRUM6B.js.map +0 -1
  1350. package/dist/chunk-KWBPHZUU.js +0 -83
  1351. package/dist/chunk-KWBPHZUU.js.map +0 -1
  1352. package/dist/chunk-LIO5X3CM.js +0 -596
  1353. package/dist/chunk-MARWOCVP.js +0 -48
  1354. package/dist/chunk-MCC6KDQF.js +0 -5095
  1355. package/dist/chunk-MCC6KDQF.js.map +0 -1
  1356. package/dist/chunk-N5AKDXAI.js +0 -74
  1357. package/dist/chunk-NN3LPQ5D.js +0 -936
  1358. package/dist/chunk-NN3LPQ5D.js.map +0 -1
  1359. package/dist/chunk-O4XJUPSF.js +0 -533
  1360. package/dist/chunk-O4XJUPSF.js.map +0 -1
  1361. package/dist/chunk-OA3L7BFR.js +0 -183
  1362. package/dist/chunk-OA3L7BFR.js.map +0 -1
  1363. package/dist/chunk-OR64ZGRZ.js +0 -23
  1364. package/dist/chunk-P73JTV34.js +0 -275
  1365. package/dist/chunk-P73JTV34.js.map +0 -1
  1366. package/dist/chunk-P77UEOU2.js +0 -1521
  1367. package/dist/chunk-P77UEOU2.js.map +0 -1
  1368. package/dist/chunk-PB5KW5PL.js +0 -118
  1369. package/dist/chunk-PHNGXFQ6.js +0 -623
  1370. package/dist/chunk-PHNGXFQ6.js.map +0 -1
  1371. package/dist/chunk-QIGOEM65.js +0 -228
  1372. package/dist/chunk-RXTFCYQF.js +0 -108
  1373. package/dist/chunk-S2JJBLJG.js +0 -2101
  1374. package/dist/chunk-S2JJBLJG.js.map +0 -1
  1375. package/dist/chunk-S3IP6R6K.js +0 -219
  1376. package/dist/chunk-S3IP6R6K.js.map +0 -1
  1377. package/dist/chunk-SRBJUAMP.js +0 -403
  1378. package/dist/chunk-SRBJUAMP.js.map +0 -1
  1379. package/dist/chunk-URB2WSKZ.js +0 -350
  1380. package/dist/chunk-URB2WSKZ.js.map +0 -1
  1381. package/dist/chunk-VQXK37XA.js +0 -26
  1382. package/dist/chunk-VQXK37XA.js.map +0 -1
  1383. package/dist/chunk-VTU2B4VF.js +0 -146
  1384. package/dist/chunk-VTU2B4VF.js.map +0 -1
  1385. package/dist/chunk-VX2IUQFE.js +0 -613
  1386. package/dist/chunk-VX2IUQFE.js.map +0 -1
  1387. package/dist/chunk-WGK4VHGP.js +0 -4292
  1388. package/dist/chunk-WGK4VHGP.js.map +0 -1
  1389. package/dist/chunk-WTFWLUSX.js +0 -827
  1390. package/dist/chunk-WTFWLUSX.js.map +0 -1
  1391. package/dist/chunk-XJKFSSDW.js +0 -726
  1392. package/dist/chunk-XJKFSSDW.js.map +0 -1
  1393. package/dist/chunk-XMHBH5H6.js +0 -283
  1394. package/dist/chunk-XMHBH5H6.js.map +0 -1
  1395. package/dist/chunk-XMVFHBHT.js +0 -277
  1396. package/dist/chunk-Y5KDIOKF.js +0 -2403
  1397. package/dist/chunk-Y5KDIOKF.js.map +0 -1
  1398. package/dist/chunk-YNB73F22.js +0 -137
  1399. package/dist/chunk-YNB73F22.js.map +0 -1
  1400. package/dist/chunk-Z2E7VW55.js +0 -335
  1401. package/dist/chunk-Z2E7VW55.js.map +0 -1
  1402. package/dist/chunk-Z5S5HNGY.js +0 -2280
  1403. package/dist/chunk-Z5S5HNGY.js.map +0 -1
  1404. package/dist/chunk-ZL4S7ARC.js +0 -53
  1405. package/dist/chunk-ZTSE2ZJ6.js +0 -190
  1406. package/dist/chunk-ZTSE2ZJ6.js.map +0 -1
  1407. package/dist/cli-Cvy2SNhF.d.ts +0 -1259
  1408. package/dist/codex-materialize-CQlLTzke.d.ts +0 -139
  1409. package/dist/connectors-cli-DFGtY2DB.d.ts +0 -257
  1410. package/dist/contradiction-review-5LTTVDQV.js +0 -22
  1411. package/dist/contradiction-scan-3Z6YW7YA.js +0 -413
  1412. package/dist/contradiction-scan-3Z6YW7YA.js.map +0 -1
  1413. package/dist/engine-FOC3IJLA.js +0 -28
  1414. package/dist/fs-utils-IRVUFB6G.js +0 -30
  1415. package/dist/graph-edge-decay-PWB63GRE.js +0 -207
  1416. package/dist/index-1qIcnbG1.d.ts +0 -34
  1417. package/dist/memory-governance-F3QOJGEY.js +0 -37
  1418. package/dist/memory-projection-store-CY8TU40w.d.ts +0 -222
  1419. package/dist/orchestrator-AOQMo7QI.d.ts +0 -1784
  1420. package/dist/path-RMTY5Y5A.js +0 -9
  1421. package/dist/port-B6VEDIkC.d.ts +0 -53
  1422. package/dist/resolution-YGIBORXI.js +0 -101
  1423. package/dist/resolution-YGIBORXI.js.map +0 -1
  1424. package/dist/secure-store-4R2GSO7S.js +0 -156
  1425. package/dist/semantic-consolidation-ByBXb-sf.d.ts +0 -180
  1426. package/dist/state-store-3EH7HYIN.js +0 -16
  1427. package/dist/types-V3FJ26TF.js +0 -30
  1428. /package/dist/{capsule-crypto-SJS5VVAP.js.map → action-confidence.js.map} +0 -0
  1429. /package/dist/{capsule-export-LLEVB2RG.js.map → adapters/claude-code.js.map} +0 -0
  1430. /package/dist/{capsule-import-UW45R2MZ.js.map → adapters/codex.js.map} +0 -0
  1431. /package/dist/{contradiction-review-5LTTVDQV.js.map → adapters/hermes.js.map} +0 -0
  1432. /package/dist/{engine-FOC3IJLA.js.map → adapters/index.js.map} +0 -0
  1433. /package/dist/{fs-utils-IRVUFB6G.js.map → adapters/registry.js.map} +0 -0
  1434. /package/dist/{memory-governance-F3QOJGEY.js.map → adapters/replit.js.map} +0 -0
  1435. /package/dist/{path-RMTY5Y5A.js.map → adapters/types.js.map} +0 -0
  1436. /package/dist/{secure-store-4R2GSO7S.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  1437. /package/dist/{capsule-merge-DI7PNQ2H.js.map → capsule-merge-4MGKE7C5.js.map} +0 -0
  1438. /package/dist/{chunk-G4SK7DSQ.js.map → chunk-2WWLHTZY.js.map} +0 -0
  1439. /package/dist/{chunk-KBYWQWSB.js.map → chunk-4CRG46BG.js.map} +0 -0
  1440. /package/dist/{chunk-LIO5X3CM.js.map → chunk-7IASACLB.js.map} +0 -0
  1441. /package/dist/{chunk-EYNQTST2.js.map → chunk-EFJ3MQ4V.js.map} +0 -0
  1442. /package/dist/{chunk-D54LZC5L.js.map → chunk-FDU6HUUL.js.map} +0 -0
  1443. /package/dist/{chunk-QIGOEM65.js.map → chunk-GGKRUQOO.js.map} +0 -0
  1444. /package/dist/{chunk-HJYHRE4S.js.map → chunk-GL6I6MEQ.js.map} +0 -0
  1445. /package/dist/{state-store-3EH7HYIN.js.map → chunk-HHLLAQGZ.js.map} +0 -0
  1446. /package/dist/{chunk-4IS4SXIQ.js.map → chunk-HXXBL2KD.js.map} +0 -0
  1447. /package/dist/{chunk-767ODGE6.js.map → chunk-KNKUID7G.js.map} +0 -0
  1448. /package/dist/{chunk-6TBWYBJ3.js.map → chunk-LPMVBPA3.js.map} +0 -0
  1449. /package/dist/{chunk-PB5KW5PL.js.map → chunk-MC26UJIM.js.map} +0 -0
  1450. /package/dist/{chunk-ZL4S7ARC.js.map → chunk-MT4HVDUZ.js.map} +0 -0
  1451. /package/dist/{chunk-G2WADRQ3.js.map → chunk-MY6TPVXW.js.map} +0 -0
  1452. /package/dist/{chunk-OR64ZGRZ.js.map → chunk-NNVTUXEB.js.map} +0 -0
  1453. /package/dist/{chunk-RXTFCYQF.js.map → chunk-P4NEIHUT.js.map} +0 -0
  1454. /package/dist/{chunk-IXEJRKCZ.js.map → chunk-QRNI5JBH.js.map} +0 -0
  1455. /package/dist/{chunk-EEQLFRUM.js.map → chunk-RRF5UOBJ.js.map} +0 -0
  1456. /package/dist/{types-V3FJ26TF.js.map → chunk-SEDEKFYQ.js.map} +0 -0
  1457. /package/dist/{chunk-2LGMW3DJ.js.map → chunk-U3PN77QT.js.map} +0 -0
  1458. /package/dist/{chunk-XMVFHBHT.js.map → chunk-U3WSW6PZ.js.map} +0 -0
  1459. /package/dist/{chunk-N5AKDXAI.js.map → chunk-UWVJF25J.js.map} +0 -0
  1460. /package/dist/{chunk-MARWOCVP.js.map → chunk-XIG5PDM7.js.map} +0 -0
  1461. /package/dist/{chunk-6XA7UN4Z.js.map → chunk-XVZ7B3HG.js.map} +0 -0
  1462. /package/dist/{graph-edge-decay-PWB63GRE.js.map → graph-edge-decay-5DI5GUNL.js.map} +0 -0
@@ -1,1784 +0,0 @@
1
- import { SmartBuffer } from './buffer.js';
2
- import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions } from './port-B6VEDIkC.js';
3
- import { StorageManager } from './storage.js';
4
- import { TranscriptManager } from './transcript.js';
5
- import { HourlySummarizer } from './summarizer.js';
6
- import { LocalLlmClient } from './local-llm.js';
7
- import { FallbackLlmClient } from './fallback-llm.js';
8
- import { LiveConnectorsRunSummary } from './live-connectors-runner.js';
9
- import { ModelRegistry } from './model-registry.js';
10
- import { RelevanceStore } from './relevance.js';
11
- import { NegativeExampleStore } from './negative.js';
12
- import { LastRecallStore, TierMigrationStatusStore, GraphRecallExpandedEntry, TierMigrationStatusSnapshot, TierMigrationCycleSummary, LastRecallSnapshot } from './recall-state.js';
13
- import { RecallXraySnapshot } from './recall-xray.js';
14
- import { SessionObserverState } from './session-observer-state.js';
15
- import { EmbeddingFallback } from './embedding-fallback.js';
16
- import { L as LcmMessagePartInput, M as MessagePartSourceFormat } from './index-1qIcnbG1.js';
17
- import { PluginConfig, CodingContext, QmdSearchResult, BehaviorLoopPolicyState, BootstrapOptions, BootstrapResult, ConsolidationObservation, MemoryFile, DaySummaryResult, MemoryActionEvent, RecallPlanMode, MemoryIntent, EntityTimelineEntry, ExtractionResult, MemoryFrontmatter, IdentityInjectionMode } from './types.js';
18
- import { S as SemanticConsolidationResult } from './semantic-consolidation-ByBXb-sf.js';
19
- import { z } from 'zod';
20
- import { RuntimePolicyValues } from './policy-runtime.js';
21
- import { ProfilingCollector } from './profiling.js';
22
-
23
- /**
24
- * Pattern-reinforcement maintenance job (issue #687 PR 2/4).
25
- *
26
- * Reads all memories via `StorageManager.readAllMemories()`, clusters
27
- * non-procedural memories by normalized content, and reinforces the
28
- * most-recent member of each large-enough cluster:
29
- *
30
- * 1. Cluster across active AND already-superseded members. This is
31
- * load-bearing: after the first reinforcement pass, older
32
- * duplicates are marked `superseded`, so on the next pass the
33
- * "active count" alone would be just `canonical + N-new`. By
34
- * keeping superseded members in the cluster for the threshold
35
- * check, an established canonical (count >= minCount) keeps
36
- * growing as soon as a single new duplicate arrives.
37
- * `forgotten` / `archived` / `quarantined` / `pending_review` /
38
- * `rejected` stay excluded per CLAUDE.md rule 53.
39
- * 2. Pick the most-recent ACTIVE member of each cluster as the
40
- * canonical. Stamp it with `reinforcement_count` (total cluster
41
- * size including superseded members) and `last_reinforced_at`.
42
- * Record provenance: `derived_from = [...source-ids...]` and
43
- * `derived_via = "pattern-reinforcement"`.
44
- * 3. Mark any still-active duplicates with `status: "superseded"`
45
- * and point `supersededBy` at the canonical id.
46
- *
47
- * The job is idempotent: re-running on the same corpus does not
48
- * double-bump `reinforcement_count` (the bump-only-on-change guard
49
- * compares cluster size to the canonical's previous counter), and
50
- * already-superseded duplicates simply pass through.
51
- *
52
- * Recall integration (boost from `reinforcement_count`) and the CLI
53
- * surface ship in PR 3/4 and PR 4/4 respectively — this PR only wires
54
- * the maintenance job and storage plumbing.
55
- */
56
-
57
- interface PatternReinforcementClusterResult {
58
- /** Memory id of the canonical (most-recent) member. */
59
- canonicalId: string;
60
- /** Cluster size at run time (mirrors `reinforcement_count`). */
61
- count: number;
62
- /** IDs of the source memories that contributed (canonical + duplicates). */
63
- sourceIds: readonly string[];
64
- /** IDs of the older duplicates that were marked superseded. */
65
- supersededIds: readonly string[];
66
- /**
67
- * `true` when the canonical's `reinforcement_count` actually
68
- * changed during this run. False when the job converged
69
- * idempotently (same cluster size as the previous run).
70
- */
71
- reinforcementBumped: boolean;
72
- }
73
- interface PatternReinforcementResult {
74
- /** Number of clusters that met the `minCount` threshold. */
75
- clustersFound: number;
76
- /** Number of canonical memories whose reinforcement counter changed. */
77
- canonicalsUpdated: number;
78
- /** Total duplicate memories newly marked `status: "superseded"`. */
79
- duplicatesSuperseded: number;
80
- /** Per-cluster details for tests / observability. */
81
- clusters: PatternReinforcementClusterResult[];
82
- }
83
-
84
- /**
85
- * @remnic/core — Write-time semantic dedup guard
86
- *
87
- * Complements the exact content-hash check in the orchestrator's write path
88
- * by detecting near-duplicate candidate facts via embedding cosine similarity.
89
- *
90
- * The module intentionally has no dependency on the EmbeddingFallback or QMD
91
- * classes directly — callers pass in a `lookup` function that returns the
92
- * top-K nearest neighbors with their cosine scores. This keeps the decision
93
- * logic pure and trivially testable with synthetic fixtures, and lets the
94
- * orchestrator reuse whichever backend it already has wired up.
95
- *
96
- * Related issue: joshuaswarren/remnic#373
97
- */
98
- /** A single nearest-neighbor hit from the embedding backend. */
99
- interface SemanticDedupHit {
100
- /** Memory id of the existing neighbor. */
101
- id: string;
102
- /** Cosine similarity score in [0, 1]. */
103
- score: number;
104
- /** Optional source path, purely informational. */
105
- path?: string;
106
- }
107
- /**
108
- * Lookup function passed by the caller. Must return an array of hits sorted
109
- * descending by score. Implementations should return an empty array (never
110
- * throw) when the embedding backend is unavailable — the decision function
111
- * treats that as "no near duplicate" (fail-open).
112
- */
113
- type SemanticDedupLookup = (content: string, limit: number) => Promise<SemanticDedupHit[]>;
114
- interface SemanticDedupOptions {
115
- /** Master switch. When false, `decideSemanticDedup` always returns `keep`. */
116
- enabled: boolean;
117
- /** Cosine similarity threshold (0-1). ≥ threshold ⇒ treat as duplicate. */
118
- threshold: number;
119
- /** How many nearest neighbors to compare against. */
120
- candidates: number;
121
- }
122
- type SemanticDedupDecision = {
123
- action: "keep";
124
- reason: "disabled" | "backend_unavailable" | "no_candidates" | "no_near_duplicate";
125
- topScore?: number;
126
- topId?: string;
127
- } | {
128
- action: "skip";
129
- reason: "near_duplicate";
130
- topScore: number;
131
- topId: string;
132
- topPath?: string;
133
- };
134
- /**
135
- * Pure decision function: given a lookup callback and options, decide whether
136
- * the candidate content should be written or skipped as a near-duplicate.
137
- *
138
- * Contract:
139
- * - When `options.enabled` is false → always keep, reason="disabled".
140
- * - When the lookup throws (provider down / network error) → keep,
141
- * reason="backend_unavailable". Fail-open: a lookup failure must not block
142
- * writes.
143
- * - When the lookup succeeds but returns 0 hits (empty index or no
144
- * neighbors above the score floor) → keep, reason="no_candidates".
145
- * This is distinct from backend_unavailable so telemetry dashboards can
146
- * correctly distinguish "provider is down" from "index is empty".
147
- * - When the top hit's score ≥ threshold → skip with reason="near_duplicate".
148
- * - Otherwise → keep with reason="no_near_duplicate".
149
- */
150
- declare function decideSemanticDedup(content: string, lookup: SemanticDedupLookup, options: SemanticDedupOptions): Promise<SemanticDedupDecision>;
151
-
152
- type ReplaySource = "openclaw" | "claude" | "chatgpt";
153
- type ReplayRole = "user" | "assistant";
154
- interface ReplayTurn {
155
- source: ReplaySource;
156
- sessionKey: string;
157
- role: ReplayRole;
158
- content: string;
159
- timestamp: string;
160
- externalId?: string;
161
- metadata?: Record<string, unknown>;
162
- parts?: LcmMessagePartInput[];
163
- rawContent?: unknown;
164
- sourceFormat?: MessagePartSourceFormat;
165
- }
166
- interface ReplayWarning {
167
- code: string;
168
- message: string;
169
- index?: number;
170
- }
171
-
172
- interface BulkImportSource {
173
- turns: ImportTurn[];
174
- metadata: {
175
- source: string;
176
- exportDate: string;
177
- messageCount: number;
178
- dateRange: {
179
- from: string;
180
- to: string;
181
- };
182
- };
183
- }
184
- interface ImportTurn {
185
- role: "user" | "assistant" | "other";
186
- content: string;
187
- timestamp: string;
188
- participantId?: string;
189
- participantName?: string;
190
- replyToId?: string;
191
- parts?: LcmMessagePartInput[];
192
- rawContent?: unknown;
193
- sourceFormat?: MessagePartSourceFormat;
194
- }
195
- interface BulkImportOptions {
196
- batchSize?: number;
197
- dryRun?: boolean;
198
- dedup?: boolean;
199
- trustLevel?: "import";
200
- namespace?: string;
201
- }
202
- type ImportSourceRole = ImportTurn["role"];
203
- interface BulkImportResult {
204
- memoriesCreated: number;
205
- duplicatesSkipped: number;
206
- entitiesCreated: number;
207
- turnsProcessed: number;
208
- batchesProcessed: number;
209
- errors: BulkImportError[];
210
- }
211
- interface BulkImportError {
212
- batchIndex: number;
213
- message: string;
214
- }
215
- interface BulkImportSourceAdapter {
216
- name: string;
217
- parse(input: unknown, options?: {
218
- strict?: boolean;
219
- platform?: string;
220
- }): Promise<BulkImportSource> | BulkImportSource;
221
- }
222
- interface ImportTurnValidationIssue {
223
- code: string;
224
- message: string;
225
- index?: number;
226
- }
227
- declare function isImportRole(value: unknown): value is ImportSourceRole;
228
- /**
229
- * Parse an ISO-8601 / RFC 3339 timestamp used by bulk-import adapters.
230
- *
231
- * Accepts variable-precision fractional seconds and either a `Z` suffix or a
232
- * `[+-]HH:MM` timezone offset, so adapters may preserve their source
233
- * timestamps verbatim. Returns milliseconds since epoch, or `null` if the
234
- * string is not a well-formed timestamp (including overflowed calendar dates
235
- * or out-of-range offsets).
236
- *
237
- * Delegates to the shared parser in `utils/iso-timestamp.ts` — do not
238
- * reimplement locally; extend that helper instead.
239
- */
240
- declare function parseIsoTimestamp(value: string): number | null;
241
- declare function validateImportTurn(turn: ImportTurn, index?: number): ImportTurnValidationIssue[];
242
-
243
- interface LcmStructuredRecallMatch {
244
- part_id: number;
245
- message_id: number;
246
- turn_index: number;
247
- role: string;
248
- content: string;
249
- session_id: string;
250
- kind: string;
251
- tool_name: string | null;
252
- file_path: string | null;
253
- payload: string;
254
- score: number;
255
- }
256
-
257
- type SummarizeFn = (text: string, targetTokens: number, aggressive: boolean) => Promise<string | null>;
258
-
259
- interface LcmObserveMessage {
260
- role: string;
261
- content: string;
262
- parts?: LcmMessagePartInput[];
263
- rawContent?: unknown;
264
- sourceFormat?: MessagePartSourceFormat;
265
- }
266
-
267
- declare class LcmEngine {
268
- private readonly summarizeFn;
269
- private db;
270
- private archive;
271
- private dag;
272
- private summarizer;
273
- private observeQueue;
274
- private closed;
275
- private readonly config;
276
- private readonly memoryDir;
277
- private initPromise;
278
- private readonly pendingObserveInitCounts;
279
- private readonly pendingObserveInitWaiters;
280
- private readonly pendingObserveInitIdleWaiters;
281
- constructor(pluginConfig: PluginConfig, summarizeFn: SummarizeFn);
282
- get enabled(): boolean;
283
- /** Lazy init — open database on first use. */
284
- ensureInitialized(): Promise<void>;
285
- private doInit;
286
- /**
287
- * Enqueue messages from agent_end hook.
288
- * The queue worker performs the archive append and incremental summarization.
289
- */
290
- observeMessages(sessionId: string, messages: LcmObserveMessage[]): Promise<void>;
291
- /** Enqueue an observe job without waiting for worker completion. */
292
- enqueueObserveMessages(sessionId: string, messages: LcmObserveMessage[]): void;
293
- private processObserveMessages;
294
- get observeQueueDepth(): number;
295
- get observeQueueInFlightCount(): number;
296
- waitForObserveQueueIdle(): Promise<void>;
297
- waitForSessionObserveIdle(sessionId: string): Promise<void>;
298
- private reservePendingObserveInit;
299
- private releasePendingObserveInit;
300
- private waitForPendingObserveInitIdle;
301
- /** Build the compressed history recall section for a session. */
302
- assembleRecall(sessionId: string, budgetChars: number): Promise<string>;
303
- searchStructuredParts(sessionId: string, query: string, limit?: number): Promise<LcmStructuredRecallMatch[]>;
304
- formatStructuredRecall(matches: LcmStructuredRecallMatch[], budgetChars: number): string;
305
- /** Flush pending summaries before compaction (called from before_compaction hook). */
306
- preCompactionFlush(sessionId: string): Promise<void>;
307
- /** Record a compaction event with real token counts (called from after_compaction hook). */
308
- recordCompaction(sessionId: string, tokensBefore: number, tokensAfter: number): Promise<void>;
309
- /** Verify archive coverage after compaction. */
310
- verifyPostCompaction(sessionId: string): Promise<void>;
311
- /** Search across all conversation history via FTS (snippet mode). */
312
- searchContext(query: string, limit: number, sessionId?: string): Promise<Array<{
313
- turn_index: number;
314
- role: string;
315
- snippet: string;
316
- session_id: string;
317
- }>>;
318
- /** Search via FTS returning full message content (not snippets). */
319
- searchContextFull(query: string, limit: number, sessionId?: string): Promise<Array<{
320
- id: number;
321
- turn_index: number;
322
- role: string;
323
- content: string;
324
- session_id: string;
325
- score: number;
326
- }>>;
327
- /** Get a compressed summary of a turn range. */
328
- describeContext(sessionId: string, fromTurn: number, toTurn: number): Promise<{
329
- summary: string;
330
- turn_count: number;
331
- depth: number;
332
- } | null>;
333
- /** Retrieve raw messages for a turn range (lossless expansion). */
334
- expandContext(sessionId: string, fromTurn: number, toTurn: number, maxTokens: number): Promise<Array<{
335
- turn_index: number;
336
- role: string;
337
- content: string;
338
- }>>;
339
- /** Get statistics about the LCM archive. */
340
- getStats(sessionId?: string): Promise<{
341
- totalMessages: number;
342
- totalSummaryNodes: number;
343
- maxDepth: number;
344
- maxTurnIndex?: number;
345
- }>;
346
- /** Prune old data beyond retention period. */
347
- prune(): Promise<{
348
- messagesPruned: number;
349
- nodesPruned: number;
350
- }>;
351
- /** Close the database connection. */
352
- close(): void;
353
- }
354
-
355
- interface ConversationIndexBackendInspection {
356
- backend: "qmd" | "faiss";
357
- status: "ok" | "degraded" | "disabled";
358
- available: boolean;
359
- indexPath: string;
360
- supportsIncrementalUpdate: boolean;
361
- message?: string;
362
- metadata: {
363
- chunkCount: number | null;
364
- qmdAvailable?: boolean;
365
- debugStatus?: string;
366
- hasIndex?: boolean;
367
- hasMetadata?: boolean;
368
- hasManifest?: boolean;
369
- manifest?: {
370
- version: number;
371
- modelId: string;
372
- normalizedModelId: string;
373
- dimension: number;
374
- chunkCount: number;
375
- updatedAt: string;
376
- lastSuccessfulRebuildAt: string;
377
- };
378
- };
379
- }
380
-
381
- declare const SharedFeedbackEntrySchema: z.ZodObject<{
382
- agent: z.ZodString;
383
- decision: z.ZodEnum<["approved", "approved_with_feedback", "rejected"]>;
384
- reason: z.ZodString;
385
- date: z.ZodString;
386
- learning: z.ZodOptional<z.ZodString>;
387
- outcome: z.ZodOptional<z.ZodString>;
388
- severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
389
- confidence: z.ZodOptional<z.ZodNumber>;
390
- workflow: z.ZodOptional<z.ZodString>;
391
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
392
- evidenceWindowStart: z.ZodOptional<z.ZodString>;
393
- evidenceWindowEnd: z.ZodOptional<z.ZodString>;
394
- refs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
395
- }, "strip", z.ZodTypeAny, {
396
- decision: "rejected" | "approved" | "approved_with_feedback";
397
- agent: string;
398
- date: string;
399
- reason: string;
400
- workflow?: string | undefined;
401
- tags?: string[] | undefined;
402
- confidence?: number | undefined;
403
- severity?: "low" | "medium" | "high" | undefined;
404
- outcome?: string | undefined;
405
- refs?: string[] | undefined;
406
- learning?: string | undefined;
407
- evidenceWindowStart?: string | undefined;
408
- evidenceWindowEnd?: string | undefined;
409
- }, {
410
- decision: "rejected" | "approved" | "approved_with_feedback";
411
- agent: string;
412
- date: string;
413
- reason: string;
414
- workflow?: string | undefined;
415
- tags?: string[] | undefined;
416
- confidence?: number | undefined;
417
- severity?: "low" | "medium" | "high" | undefined;
418
- outcome?: string | undefined;
419
- refs?: string[] | undefined;
420
- learning?: string | undefined;
421
- evidenceWindowStart?: string | undefined;
422
- evidenceWindowEnd?: string | undefined;
423
- }>;
424
- type SharedFeedbackEntry = z.infer<typeof SharedFeedbackEntrySchema>;
425
- interface SharedCrossSignalSource {
426
- agent: string;
427
- path: string;
428
- title: string;
429
- topics: string[];
430
- }
431
- interface SharedCrossSignalOverlap {
432
- token: string;
433
- agents: string[];
434
- sourcePaths: string[];
435
- agentCount: number;
436
- }
437
- interface SharedCrossSignalReport {
438
- date: string;
439
- generatedAt: string;
440
- sourceCount: number;
441
- feedbackCount: number;
442
- feedbackByDecision: Record<"approved" | "approved_with_feedback" | "rejected", number>;
443
- feedbackEntries: SharedFeedbackEntry[];
444
- sources: SharedCrossSignalSource[];
445
- overlaps: SharedCrossSignalOverlap[];
446
- semantic: {
447
- enabled: boolean;
448
- applied: boolean;
449
- timedOut: boolean;
450
- candidateCount: number;
451
- maxCandidates: number;
452
- addedOverlapCount: number;
453
- };
454
- }
455
- interface SharedCrossSignalSynthesisResult {
456
- date: string;
457
- crossSignalsPath: string;
458
- crossSignalsMarkdownPath: string;
459
- overlapCount: number;
460
- report: SharedCrossSignalReport;
461
- }
462
- interface SharedDailyCurationResult {
463
- date: string;
464
- roundtablePath: string;
465
- crossSignalsPath: string;
466
- crossSignalsMarkdownPath: string;
467
- overlapCount: number;
468
- }
469
- declare class SharedContextManager {
470
- private readonly config;
471
- readonly dir: string;
472
- private readonly prioritiesPath;
473
- private readonly prioritiesInboxPath;
474
- private readonly outputsDir;
475
- private readonly roundtableDir;
476
- private readonly feedbackDir;
477
- private readonly feedbackInboxPath;
478
- private readonly crossSignalsDir;
479
- constructor(config: PluginConfig);
480
- ensureStructure(): Promise<void>;
481
- private ensureFile;
482
- readPriorities(): Promise<string>;
483
- readLatestRoundtable(): Promise<string>;
484
- readLatestCrossSignals(): Promise<string>;
485
- writeAgentOutput(opts: {
486
- agentId: string;
487
- title: string;
488
- content: string;
489
- createdAt?: Date;
490
- }): Promise<string>;
491
- appendFeedback(entry: SharedFeedbackEntry): Promise<void>;
492
- appendPrioritiesInbox(opts: {
493
- agentId: string;
494
- text: string;
495
- }): Promise<void>;
496
- synthesizeCrossSignals(opts: {
497
- date?: string;
498
- maxSummaryItems?: number;
499
- }): Promise<SharedCrossSignalSynthesisResult>;
500
- curateDaily(opts: {
501
- date?: string;
502
- maxChars?: number;
503
- }): Promise<SharedDailyCurationResult>;
504
- }
505
-
506
- type MistakesFile = {
507
- version?: number;
508
- updatedAt: string;
509
- patterns: string[];
510
- registry?: MistakeRegistryEntry[];
511
- };
512
- type ActionOutcomeCounts = {
513
- applied: number;
514
- skipped: number;
515
- failed: number;
516
- };
517
- type ActionOutcomeSummary = {
518
- action: string;
519
- counts: ActionOutcomeCounts;
520
- total: number;
521
- weightedScore: number;
522
- provenance: string[];
523
- };
524
- type PromotionCandidate = {
525
- id: string;
526
- sourceType: "action-outcome" | "mistake-pattern" | "rubric" | "causal-pattern";
527
- subject: string;
528
- category: "principle" | "rule";
529
- content: string;
530
- score: number;
531
- rationale: string;
532
- outcome: ActionOutcomeCounts | null;
533
- provenance: string[];
534
- agent: string | null;
535
- workflow: string | null;
536
- };
537
- type CompoundingEntrySeverity = "low" | "medium" | "high";
538
- type EvidenceWindow = {
539
- start: string | null;
540
- end: string | null;
541
- };
542
- type MistakeRegistryEntry = {
543
- id: string;
544
- pattern: string;
545
- category: "feedback" | "action";
546
- status: "active" | "retired";
547
- agent: string | null;
548
- workflow: string | null;
549
- tags: string[];
550
- severity: CompoundingEntrySeverity | null;
551
- confidence: number | null;
552
- outcome: string | null;
553
- provenance: string[];
554
- firstSeenAt: string;
555
- lastSeenAt: string;
556
- recurrenceCount: number;
557
- lastWeekId: string;
558
- evidenceWindow: EvidenceWindow;
559
- mergedFromIds?: string[];
560
- retiredAt?: string | null;
561
- };
562
- type RubricSnapshotEntry = {
563
- id: string;
564
- kind: "agent" | "workflow";
565
- subject: string;
566
- observations: string[];
567
- tags: string[];
568
- provenance: string[];
569
- observationEntries?: Array<{
570
- note: string;
571
- provenance: string[];
572
- }>;
573
- updatedAt: string;
574
- };
575
- type RubricSnapshot = {
576
- updatedAt: string;
577
- agents: RubricSnapshotEntry[];
578
- workflows: RubricSnapshotEntry[];
579
- };
580
- type WeeklyCompoundingArtifact = {
581
- version: number;
582
- generatedAt: string;
583
- weekId: string;
584
- feedback: {
585
- count: number;
586
- byDecision: Record<"approved" | "approved_with_feedback" | "rejected", number>;
587
- entries: Array<{
588
- agent: string;
589
- workflow: string | null;
590
- decision: SharedFeedbackEntry["decision"];
591
- reason: string;
592
- learning: string | null;
593
- outcome: string | null;
594
- severity: CompoundingEntrySeverity | null;
595
- confidence: number | null;
596
- tags: string[];
597
- provenance: string;
598
- evidenceWindow: EvidenceWindow;
599
- }>;
600
- };
601
- mistakes: {
602
- count: number;
603
- patterns: string[];
604
- registry: MistakeRegistryEntry[];
605
- };
606
- rubrics: RubricSnapshot;
607
- outcomes: ActionOutcomeSummary[];
608
- promotionCandidates: PromotionCandidate[];
609
- continuity: {
610
- monthId: string;
611
- weeklyPath: string | null;
612
- monthlyPath: string | null;
613
- };
614
- };
615
- interface CompoundingPromotionReport {
616
- enabled: boolean;
617
- dryRun: boolean;
618
- weekId: string;
619
- promoted: Array<{
620
- id: string;
621
- candidateId: string;
622
- category: "principle" | "rule";
623
- content: string;
624
- confidence: number;
625
- tags: string[];
626
- lineage: string[];
627
- }>;
628
- skipped: Array<{
629
- weekId: string;
630
- candidateId?: string;
631
- reason: "disabled" | "weekly-artifact-missing" | "candidate-not-found" | "duplicate-guidance";
632
- existingMemoryId?: string;
633
- }>;
634
- }
635
- type TierMigrationCycleTrigger = "extraction" | "maintenance";
636
- interface TierMigrationCycleBudget {
637
- limit: number;
638
- scanLimit: number;
639
- minIntervalMs: number;
640
- }
641
- declare class CompoundingEngine {
642
- private readonly config;
643
- private readonly storage;
644
- private readonly weeklyDir;
645
- private readonly rubricsDir;
646
- private readonly rubricsIndexPath;
647
- private readonly rubricsAgentsDir;
648
- private readonly rubricsWorkflowsDir;
649
- private readonly rubricsPath;
650
- private readonly mistakesPath;
651
- private readonly feedbackInboxPath;
652
- private readonly identityAuditWeeklyDir;
653
- private readonly identityAuditMonthlyDir;
654
- private readonly memoryActionEventsPath;
655
- constructor(config: PluginConfig, storage?: StorageManager);
656
- ensureDirs(): Promise<void>;
657
- synthesizeWeekly(opts?: {
658
- weekId?: string;
659
- }): Promise<{
660
- weekId: string;
661
- reportPath: string;
662
- reportJsonPath: string;
663
- mistakesCount: number;
664
- rubricsPath: string;
665
- rubricsIndexPath: string;
666
- promotionCandidateCount: number;
667
- }>;
668
- promoteCandidate(opts: {
669
- weekId: string;
670
- candidateId: string;
671
- dryRun?: boolean;
672
- storage?: StorageManager;
673
- }): Promise<CompoundingPromotionReport>;
674
- synthesizeContinuityAudit(opts?: {
675
- period?: "weekly" | "monthly";
676
- key?: string;
677
- }): Promise<{
678
- period: "weekly" | "monthly";
679
- key: string;
680
- reportPath: string;
681
- }>;
682
- readMistakes(): Promise<MistakesFile | null>;
683
- readRubrics(): Promise<RubricSnapshot | null>;
684
- readWeeklyArtifact(weekId: string): Promise<WeeklyCompoundingArtifact | null>;
685
- buildRecallSection(query: string, opts?: {
686
- maxPatterns?: number;
687
- maxRubrics?: number;
688
- }): Promise<string | null>;
689
- tierMigrationCycleBudget(trigger: TierMigrationCycleTrigger): TierMigrationCycleBudget;
690
- private readFeedbackEntriesForWeek;
691
- private buildActionFailurePatterns;
692
- private readActionEventsForWeek;
693
- private buildActionOutcomeSummary;
694
- private derivePromotionCandidates;
695
- private buildMistakes;
696
- private formatWeeklyReport;
697
- private buildRubricSnapshot;
698
- private formatRubrics;
699
- private syncRubricArtifacts;
700
- private replaceRubricDirectory;
701
- private scoreRubricForQuery;
702
- private normalizeRubricEntry;
703
- private getRubricObservationEntries;
704
- private isSyntheticOutcomeRubricObservation;
705
- private addRubricObservation;
706
- private readOptionalIdentityAnchorForAudit;
707
- private readOptionalImprovementLoopsForAudit;
708
- private readContinuityIncidentsForAudit;
709
- private readOptionalIdentityAuditForReference;
710
- private readContinuityAuditReferences;
711
- }
712
-
713
- declare function dedupeEntitySynthesisEvidenceEntries(entries: EntityTimelineEntry[]): EntityTimelineEntry[];
714
- interface GraphRecallSnapshot {
715
- recordedAt: string;
716
- mode: RecallPlanMode | string;
717
- queryHash: string;
718
- queryLength: number;
719
- namespaces: string[];
720
- seedCount: number;
721
- expandedCount: number;
722
- seeds: string[];
723
- expanded: GraphRecallExpandedEntry[];
724
- status?: "completed" | "skipped" | "aborted";
725
- reason?: string;
726
- shadowMode?: boolean;
727
- queryIntent?: MemoryIntent;
728
- seedResults?: GraphRecallRankedResult[];
729
- finalResults?: GraphRecallRankedResult[];
730
- shadowComparison?: GraphRecallShadowComparison;
731
- }
732
- interface GraphRecallRankedResult {
733
- path: string;
734
- score: number;
735
- docid?: string;
736
- sourceLabels: string[];
737
- }
738
- interface GraphRecallShadowComparison {
739
- baselineCount: number;
740
- graphCount: number;
741
- overlapCount: number;
742
- overlapRatio: number;
743
- averageOverlapDelta: number;
744
- }
745
- interface IntentDebugSnapshot {
746
- recordedAt: string;
747
- promptHash: string;
748
- promptLength: number;
749
- retrievalQueryHash: string;
750
- retrievalQueryLength: number;
751
- plannerEnabled: boolean;
752
- plannedMode: RecallPlanMode;
753
- effectiveMode: RecallPlanMode;
754
- recallResultLimit: number;
755
- queryIntent: MemoryIntent;
756
- graphExpandedIntentDetected: boolean;
757
- graphDecision: {
758
- status: "not_requested" | "skipped" | "completed" | "aborted";
759
- reason?: string;
760
- shadowMode: boolean;
761
- qmdAvailable: boolean;
762
- graphRecallEnabled: boolean;
763
- multiGraphMemoryEnabled: boolean;
764
- };
765
- }
766
- interface QmdRecallSnapshot {
767
- recordedAt: string;
768
- queryHash: string;
769
- queryLength: number;
770
- collection?: string;
771
- namespaces: string[];
772
- fetchLimit: number;
773
- primaryResultCount: number;
774
- hybridResultCount: number;
775
- queryAwareSeedCount: number;
776
- resultCount: number;
777
- intentHint?: string;
778
- explainEnabled: boolean;
779
- hybridTopUpUsed: boolean;
780
- hybridTopUpSkippedReason?: string;
781
- results: QmdSearchResult[];
782
- }
783
- interface RecallModeDecision {
784
- plannedMode: RecallPlanMode;
785
- effectiveMode: RecallPlanMode;
786
- graphExpandedIntentDetected: boolean;
787
- graphReason?: string;
788
- }
789
- interface RecallInvocationOptions {
790
- namespace?: string;
791
- topK?: number;
792
- mode?: RecallPlanMode;
793
- abortSignal?: AbortSignal;
794
- /**
795
- * Capture a `RecallXraySnapshot` for this recall (issue #570). When
796
- * `true`, the orchestrator builds a snapshot from the data it has
797
- * already gathered and stashes it in memory, accessible via
798
- * `getLastXraySnapshot()`. When `false` or absent, nothing is
799
- * captured and recall behavior is unchanged (schema-only slice).
800
- */
801
- xrayCapture?: boolean;
802
- /**
803
- * Per-invocation override for `recallBudgetChars` (issue #570 PR 3/4).
804
- * Flows through `getRecallBudgetChars()` for this recall only — no
805
- * shared config mutation, so concurrent recalls on the same
806
- * orchestrator are not affected (CLAUDE.md rule 47: no shared
807
- * mutable state across async boundaries). Must be a non-negative
808
- * finite integer; non-conforming values are ignored and the
809
- * configured budget is used.
810
- */
811
- budgetCharsOverride?: number;
812
- /**
813
- * Per-invocation principal override (issue #570 PR 4). When set,
814
- * the orchestrator uses this principal for ACL / namespace checks
815
- * instead of `resolvePrincipal(sessionKey, config)`. This is the
816
- * escape hatch for access surfaces (HTTP / MCP) that have already
817
- * authenticated the caller upstream — threading an unmapped
818
- * principal through the session-key-based resolver would otherwise
819
- * collapse it to `"default"` and produce false denials in
820
- * namespace-enabled deployments (CLAUDE.md rule 42).
821
- */
822
- principalOverride?: string;
823
- /**
824
- * Historical recall point (issue #680). When set, the orchestrator
825
- * filters out memories whose `valid_at` is after this timestamp OR
826
- * whose `invalid_at` is at-or-before this timestamp, so callers see
827
- * the corpus as it existed at `asOf`. ISO 8601 string; comparisons
828
- * use `Date.parse()` so timezone-aware values round-trip correctly
829
- * (CLAUDE.md gotcha — never compare ISO strings lexicographically).
830
- * Invalid values must be rejected at input boundaries (CLAUDE.md
831
- * rule 51); the orchestrator does NOT silently fall back here.
832
- */
833
- asOf?: string;
834
- /**
835
- * Issue #681 — when `true`, bypasses `graphTraversalConfidenceFloor`
836
- * and includes edges below the floor in graph traversal. Useful for
837
- * diagnostic recall queries that need to surface results that would
838
- * normally be pruned by confidence decay. Default `false`.
839
- */
840
- includeLowConfidence?: boolean;
841
- }
842
- /** Default workspace directory when no per-agent or config workspace is available. */
843
- declare function defaultWorkspaceDir(): string;
844
- /**
845
- * Produce a collision-resistant, filesystem-safe identifier from a session key.
846
- *
847
- * Session keys follow colon-delimited forms (e.g., `agent:gpucodebot:main`).
848
- * A naive replace (`:` → `_`) is lossy: different keys like `agent:alpha` and
849
- * `agent/alpha` would collide. Instead we append a short SHA-256 hash of the
850
- * original key to the human-readable sanitized prefix, guaranteeing uniqueness
851
- * while keeping filenames debuggable.
852
- *
853
- * Format: `<sanitized>-<12-char-hex-hash>`
854
- * Example: `agent:gpucodebot:main` → `agent_gpucodebot_main-a1b2c3d4e5f6`
855
- */
856
- declare function sanitizeSessionKeyForFilename(sessionKey: string): string;
857
- declare function isArtifactMemoryPath(filePath: string): boolean;
858
- declare function deriveTopicsFromExtraction(result: ExtractionResult): string[];
859
- declare function buildCompressionGuidelinesMarkdown(events: MemoryActionEvent[], generatedAtIso?: string): string;
860
- declare function formatCompressionGuidelinesForRecall(raw: string, maxLines?: number): string | null;
861
- declare function filterRecallCandidates(candidates: QmdSearchResult[], options: {
862
- namespacesEnabled: boolean;
863
- recallNamespaces: string[];
864
- resolveNamespace: (path: string) => string;
865
- limit: number;
866
- }): QmdSearchResult[];
867
- declare function shouldFilterLifecycleRecallCandidate(frontmatter: MemoryFrontmatter, options: {
868
- lifecyclePolicyEnabled: boolean;
869
- lifecycleFilterStaleEnabled: boolean;
870
- }): boolean;
871
- declare function lifecycleRecallScoreAdjustment(frontmatter: MemoryFrontmatter, options: {
872
- lifecyclePolicyEnabled: boolean;
873
- }): number;
874
- declare function computeArtifactRecallLimit(recallMode: RecallPlanMode, recallResultLimit: number, verbatimArtifactsMaxRecall: number): number;
875
- declare function resolveEffectiveRecallMode(options: {
876
- plannerEnabled: boolean;
877
- graphRecallEnabled: boolean;
878
- multiGraphMemoryEnabled: boolean;
879
- graphExpandedIntentEnabled?: boolean;
880
- prompt: string;
881
- }): RecallPlanMode;
882
- declare function resolveRecallModeDecision(options: {
883
- plannerEnabled: boolean;
884
- graphRecallEnabled: boolean;
885
- multiGraphMemoryEnabled: boolean;
886
- graphExpandedIntentEnabled?: boolean;
887
- prompt: string;
888
- }): RecallModeDecision;
889
- declare function hasIdentityRecoveryIntent(prompt: string): boolean;
890
- declare function resolveEffectiveIdentityInjectionMode(options: {
891
- configuredMode: IdentityInjectionMode;
892
- recallMode: RecallPlanMode;
893
- prompt: string;
894
- }): {
895
- mode: IdentityInjectionMode;
896
- shouldInject: boolean;
897
- };
898
- declare function computeArtifactCandidateFetchLimit(targetCount: number): number;
899
- declare function computeQmdHybridFetchLimit(recallFetchLimit: number, artifactsEnabled: boolean, maxArtifactRecall: number): number;
900
- declare function mergeGraphExpandedResults(primary: QmdSearchResult[], expanded: QmdSearchResult[]): QmdSearchResult[];
901
- declare function graphPathRelativeToStorage(storageDir: string, candidatePath: string): string | null;
902
- declare function blendGraphExpandedRecallScore(options: {
903
- graphActivationScore: number;
904
- seedRecallScore: number;
905
- activationWeight: number;
906
- blendMin: number;
907
- blendMax: number;
908
- }): number;
909
- declare function summarizeGraphShadowComparison(baseline: QmdSearchResult[], merged: QmdSearchResult[], topN: number): {
910
- baselineCount: number;
911
- graphCount: number;
912
- overlapCount: number;
913
- overlapRatio: number;
914
- averageOverlapDelta: number;
915
- };
916
- declare function mergeArtifactRecallCandidates(candidatesByNamespace: MemoryFile[][], limit: number): MemoryFile[];
917
- declare function resolveRecentThreadMemoryPaths(options: {
918
- threadEpisodeIds: string[];
919
- currentMemoryId: string;
920
- allMemsForGraph: MemoryFile[] | null | undefined;
921
- pathById?: Map<string, string>;
922
- storageDir: string;
923
- maxRecent: number;
924
- }): string[];
925
- declare function buildMemoryPathById(allMemsForGraph: MemoryFile[] | null | undefined, storageDir: string): Map<string, string>;
926
- declare function appendMemoryToGraphContext(options: {
927
- allMemsForGraph: MemoryFile[] | null | undefined;
928
- storageDir: string;
929
- memoryRelPath: string;
930
- memoryId: string;
931
- category: MemoryFile["frontmatter"]["category"];
932
- content: string;
933
- entityRef: string | undefined;
934
- }): void;
935
- declare function resolvePersistedMemoryRelativePath(options: {
936
- memoryId: string;
937
- pathById: Map<string, string>;
938
- category: string;
939
- }): string;
940
- declare class Orchestrator {
941
- readonly storage: StorageManager;
942
- private readonly storageRouter;
943
- private readonly namespaceSearchRouter;
944
- qmd: SearchBackend;
945
- private readonly conversationQmd?;
946
- private readonly conversationFaiss?;
947
- private readonly conversationIndexBackend?;
948
- readonly sharedContext?: SharedContextManager;
949
- readonly compounding?: CompoundingEngine;
950
- readonly buffer: SmartBuffer;
951
- readonly transcript: TranscriptManager;
952
- readonly sessionObserver: SessionObserverState;
953
- readonly summarizer: HourlySummarizer;
954
- readonly localLlm: LocalLlmClient;
955
- readonly fastLlm: LocalLlmClient;
956
- private readonly judgeVerdictCache;
957
- /**
958
- * Per-orchestrator defer-counter map (issue #562, PR 2). Tracks how many
959
- * times the judge has returned `"defer"` for a given candidate content
960
- * hash so the defer cap can be enforced.
961
- */
962
- private readonly judgeDeferCounts;
963
- /**
964
- * Side-channel: number of facts deferred in the most recent
965
- * `persistExtraction` call (issue #562, PR 2). The caller reads this after
966
- * `persistExtraction` returns to decide whether to retain buffer turns for
967
- * the next extraction pass. Not part of the return signature because many
968
- * callers already destructure `persistedIds` by position.
969
- */
970
- private lastPersistExtractionDeferredCount;
971
- private readonly _fastGatewayLlm;
972
- get fastGatewayLlm(): FallbackLlmClient | null;
973
- readonly modelRegistry: ModelRegistry;
974
- readonly relevance: RelevanceStore;
975
- readonly negatives: NegativeExampleStore;
976
- readonly lastRecall: LastRecallStore;
977
- readonly tierMigrationStatus: TierMigrationStatusStore;
978
- /**
979
- * In-memory X-ray snapshot from the most recent `recall()` call that
980
- * was invoked with `xrayCapture: true` (issue #570 PR 1). Scope is
981
- * per-process; later slices add CLI/HTTP/MCP surfaces that consume
982
- * this via the shared renderer. `null` until the first capture, and
983
- * NEVER overwritten by a recall that did not request capture —
984
- * requests without the flag leave prior captures intact so the
985
- * capturing caller can still read their snapshot back.
986
- */
987
- private lastXraySnapshot;
988
- readonly embeddingFallback: EmbeddingFallback;
989
- private readonly conversationIndexDir;
990
- private readonly extraction;
991
- readonly config: PluginConfig;
992
- readonly profiler: ProfilingCollector;
993
- private readonly threading;
994
- /** v8.2: Per-namespace multi-graph memory indexes (entity/time/causal edges) */
995
- private readonly graphIndexes;
996
- /** Per-namespace BoxBuilders, keyed by the namespace root directory path. */
997
- private readonly boxBuilders;
998
- /** Temporal Memory Tree builder — builds hour/day/week/persona summary nodes. */
999
- private readonly tmtBuilder;
1000
- /** Lossless Context Management engine — proactive session archive + DAG summarization. */
1001
- readonly lcmEngine: LcmEngine | null;
1002
- private readonly rerankCache;
1003
- /**
1004
- * Short-TTL cache for Memory Worth counter lookups so interactive recall
1005
- * doesn't trigger a full `readAllMemories` scan per query. Keyed by
1006
- * namespace; the filter unions across namespaces at query time. The TTL
1007
- * is intentionally short (seconds, not minutes) because counters are
1008
- * mutated by `recordMemoryOutcome` asynchronously and we'd rather serve
1009
- * a 30-second-stale worth score than a stable-but-wrong one.
1010
- */
1011
- private readonly memoryWorthCounterCache;
1012
- private static readonly MEMORY_WORTH_CACHE_TTL_MS;
1013
- /**
1014
- * Per-session workspace selections keyed by sessionKey.
1015
- * Set by the before_agent_start hook so recall() uses the correct
1016
- * agent workspace for BOOT.md injection. Cleared after each recall.
1017
- * Using a Map prevents concurrent sessions from overwriting each other.
1018
- */
1019
- private _recallWorkspaceOverrides;
1020
- /**
1021
- * Per-session coding-agent context (issue #569). Populated by connectors at
1022
- * session-start (PRs 5/6/7) via `setCodingContextForSession`. Used by both
1023
- * the recall path and the write path so that memory routing respects the
1024
- * project/branch scope a session is operating in (rule 42 — read + write
1025
- * through the same namespace layer).
1026
- */
1027
- private readonly _codingContextBySession;
1028
- /**
1029
- * Per-session peer ID registry (issue #679 PR 3/5).
1030
- * Set by connectors / hooks via `setPeerIdForSession` so `recallInternal`
1031
- * can inject the peer's profile into recall context when
1032
- * `peerProfileRecallEnabled` is true. Cleared when the session ends.
1033
- * Keyed by sessionKey so concurrent sessions don't clobber each other
1034
- * (rule 11 — scope globals per plugin ID / session).
1035
- */
1036
- private readonly _peerIdBySession;
1037
- private routingRulesStore;
1038
- private contentHashIndex;
1039
- private readonly artifactSourceStatusCache;
1040
- private static readonly ARTIFACT_STATUS_CACHE_TTL_MS;
1041
- private accessTrackingBuffer;
1042
- private extractionQueue;
1043
- private queueProcessing;
1044
- private heartbeatObserverChains;
1045
- private recentExtractionFingerprints;
1046
- private nonZeroExtractionsSinceConsolidation;
1047
- private lastConsolidationRunAtMs;
1048
- private consolidationInFlight;
1049
- private readonly consolidationObservers;
1050
- private qmdMaintenanceTimer;
1051
- private qmdMaintenancePending;
1052
- private qmdMaintenanceInFlight;
1053
- private lastQmdEmbedAtMs;
1054
- private lastQmdReprobeAtMs;
1055
- private tierMigrationInFlight;
1056
- private lastTierMigrationRunAtMs;
1057
- private readonly conversationIndexLastUpdateAtMs;
1058
- private lastFileHygieneRunAtMs;
1059
- private lastPatternReinforcementAtByNs;
1060
- private lastRecallFailureLogAtMs;
1061
- private lastRecallFailureAtMs;
1062
- private suppressedRecallFailures;
1063
- private readonly policyRuntime;
1064
- private runtimePolicyValues;
1065
- private utilityRuntimeValues;
1066
- private evalShadowWriteChain;
1067
- private directAnswerObservationChain;
1068
- private initPromise;
1069
- private resolveInit;
1070
- /**
1071
- * Resolves when deferred initialization (QMD probe, warmup, caches, cron)
1072
- * completes. CLI and http-serve callers that need `qmd.isAvailable()` to
1073
- * reflect reality should `await orchestrator.deferredReady` after
1074
- * `initialize()`. Gateway callers can ignore it — recall() degrades
1075
- * gracefully when QMD isn't ready yet.
1076
- *
1077
- * Also resolves (without error) when `initialize()` throws before reaching
1078
- * the deferred-init phase, so callers never hang on a permanently-pending
1079
- * promise.
1080
- *
1081
- * Host adapters that need to tie deferred init to their stop() lifecycle
1082
- * should `await orchestrator.deferredReady` before proceeding with teardown
1083
- * to prevent background QMD/warmup/cron tasks from racing with shutdown.
1084
- */
1085
- deferredReady: Promise<void>;
1086
- private resolveDeferredReady;
1087
- private deferredInitAbort;
1088
- /**
1089
- * Whether the deferred init's QMD startup sync completed successfully.
1090
- * When false after deferredReady resolves, the server retry loop should
1091
- * attempt startupSearchSync() even if `qmd.isAvailable()` is true —
1092
- * availability only means probe succeeded, not that the index is current.
1093
- */
1094
- deferredSyncSucceeded: boolean;
1095
- /**
1096
- * Abort deferred initialization so background QMD sync/warmup stops
1097
- * promptly on shutdown. Safe to call multiple times or before init.
1098
- */
1099
- abortDeferredInit(): void;
1100
- private disposeSearchBackendIfNeeded;
1101
- /** Set per-session workspace for the next recall() call (compaction reset). @internal */
1102
- setRecallWorkspaceOverride(sessionKey: string, dir: string): void;
1103
- /** Remove a per-session workspace selection (cleanup on error or early return). @internal */
1104
- clearRecallWorkspaceOverride(sessionKey: string): void;
1105
- resolvePrincipal(sessionKey?: string): string;
1106
- resolveSelfNamespace(sessionKey?: string): string;
1107
- /**
1108
- * Attach a coding-agent context to a session (issue #569). Called by the
1109
- * Claude Code / Codex / Cursor connectors at session start after
1110
- * `resolveGitContext(cwd)`. The context is consulted by the recall path
1111
- * and the write path so that memories route to a project- (and optionally
1112
- * branch-) scoped namespace.
1113
- *
1114
- * Pass `null` to clear.
1115
- */
1116
- setCodingContextForSession(sessionKey: string, codingContext: CodingContext | null): void;
1117
- /**
1118
- * Read-only accessor for the coding context attached to a session. Returns
1119
- * `null` when none is set. Used by `remnic doctor` and by tests.
1120
- *
1121
- * Defensive `_codingContextBySession` lookup — legacy orchestrator-flush
1122
- * tests use `Object.create(Orchestrator.prototype)` which does not run
1123
- * class-field initializers, so the Map may be undefined on stubs.
1124
- */
1125
- getCodingContextForSession(sessionKey: string | undefined): CodingContext | null;
1126
- /**
1127
- * Shared helper used by both the recall path and the write path (rule 42).
1128
- *
1129
- * Given a base namespace computed from the principal, returns the overlaid
1130
- * coding namespace when the session has a coding context AND
1131
- * `codingMode.projectScope` is true AND `namespacesEnabled` is true.
1132
- * Otherwise returns `baseNamespace` unchanged — CLAUDE.md #30 escape hatch.
1133
- *
1134
- * Principal isolation (CLAUDE.md rule 42): the overlay is COMBINED with
1135
- * the principal-derived `baseNamespace` rather than replacing it, so two
1136
- * principals working in the same repository do not share memories through
1137
- * a common `project-*` namespace.
1138
- *
1139
- * Namespaces-disabled gate: when `namespacesEnabled` is false, the
1140
- * storage router maps every namespace to the same `memoryDir`. Returning
1141
- * `project-*` in that mode would create apparent route separation with
1142
- * no actual storage isolation — a false-isolation trap. In that mode we
1143
- * return `baseNamespace` unchanged so coding mode degrades to the existing
1144
- * unscoped behavior.
1145
- *
1146
- * @internal
1147
- */
1148
- applyCodingNamespaceOverlay(sessionKey: string | undefined, baseNamespace: string): string;
1149
- /**
1150
- * Register a peer ID for a session so recall can inject the peer's
1151
- * profile into context (issue #679 PR 3/5). Pass `null` to clear.
1152
- *
1153
- * Connectors and the `before_agent_start` hook call this when the
1154
- * session's counter-party is known. The ID is validated against
1155
- * `PEER_ID_PATTERN` before storing.
1156
- *
1157
- * Fail-closed (Codex P1 review): an invalid peerId clears any
1158
- * previously registered mapping for the session rather than silently
1159
- * keeping stale data. This prevents a malformed metadata update from
1160
- * mixing one peer's profile context into another session.
1161
- *
1162
- * Defensive init (Cursor review + rule 16): `Object.create(
1163
- * Orchestrator.prototype)` stubs in legacy tests skip class-field
1164
- * initializers, so `_peerIdBySession` may be undefined. Mirror the
1165
- * same guard used by `setCodingContextForSession`.
1166
- */
1167
- setPeerIdForSession(sessionKey: string, peerId: string | null): void;
1168
- /**
1169
- * Return the peer ID registered for a session, or `null` when none
1170
- * is set. Used by `recallInternal` to inject the peer profile section.
1171
- * Defensive `_peerIdBySession` lookup — legacy orchestrator-flush tests
1172
- * use `Object.create(Orchestrator.prototype)` which skips class-field
1173
- * initializers, so the Map may be undefined on stubs.
1174
- */
1175
- getPeerIdForSession(sessionKey: string | undefined): string | null;
1176
- /**
1177
- * Read-side overlay: returns the list of namespaces a session should read
1178
- * from, including any read fallbacks (branch → project, global root).
1179
- *
1180
- * Returns `null` when:
1181
- * - `namespacesEnabled` is false (overlay would create false isolation)
1182
- * - no context attached to the session
1183
- * - `codingMode.projectScope` is false (CLAUDE.md #30 escape hatch)
1184
- *
1185
- * The returned `namespace` / `readFallbacks` are RAW overlay fragments
1186
- * (e.g. `project-origin-ab12`). Callers MUST combine them with the
1187
- * principal-derived base through `combineNamespaces()` before passing to
1188
- * storage, so principal isolation is preserved (rule 42).
1189
- *
1190
- * @internal
1191
- */
1192
- applyCodingRecallOverlay(sessionKey: string | undefined): {
1193
- namespace: string;
1194
- readFallbacks: string[];
1195
- } | null;
1196
- getStorageForNamespace(namespace?: string): Promise<StorageManager>;
1197
- private configuredNamespaces;
1198
- private buildConfiguredQmdSearchOptions;
1199
- searchAcrossNamespaces(options: {
1200
- query: string;
1201
- namespaces?: string[];
1202
- maxResults?: number;
1203
- mode?: "search" | "hybrid" | "bm25" | "vector";
1204
- searchOptions?: SearchQueryOptions;
1205
- execution?: SearchExecutionOptions;
1206
- }): Promise<QmdSearchResult[]>;
1207
- private isSearchAvailableForNamespaceRouting;
1208
- invalidateLiveContentHashIndex(): void;
1209
- constructor(config: PluginConfig);
1210
- /** Get or create a BoxBuilder for the given namespace storage root (namespace-isolated). */
1211
- private boxBuilderFor;
1212
- private effectiveRecencyWeight;
1213
- private effectiveCronRecallInstructionHeavyTokenCap;
1214
- private currentPolicyVersion;
1215
- private effectiveLifecycleThresholds;
1216
- private routeEngineOptions;
1217
- private getRoutingRulesStore;
1218
- private loadRoutingRules;
1219
- private resolveArtifactSourceStatuses;
1220
- /**
1221
- * Execute a fast-tier LLM chat completion.
1222
- * When gateway model source is active and fastGatewayAgentId is configured,
1223
- * routes through the gateway chain. Otherwise uses the local fast LLM.
1224
- */
1225
- private fastChatCompletion;
1226
- /**
1227
- * Get a fast-tier LLM client compatible with the rerank interface.
1228
- * When gateway model source is active, routes through the gateway fast chain.
1229
- * Otherwise returns the local fast LLM directly.
1230
- */
1231
- get fastLlmForRerank(): {
1232
- chatCompletion: (messages: Array<{
1233
- role: string;
1234
- content: string;
1235
- }>, options?: {
1236
- maxTokens?: number;
1237
- temperature?: number;
1238
- timeoutMs?: number;
1239
- operation?: string;
1240
- priority?: "recall-critical" | "background";
1241
- }) => Promise<{
1242
- content: string;
1243
- } | null>;
1244
- };
1245
- initialize(): Promise<void>;
1246
- private deferredInitialize;
1247
- /**
1248
- * Namespace-aware startup search sync. Re-probes QMD, ensures collections
1249
- * (namespace-aware when namespacesEnabled), runs update, and warms up search.
1250
- * Designed for server retry paths that run after the deferred init completes
1251
- * when QMD was not available during initial startup.
1252
- *
1253
- * Accepts an optional AbortSignal so callers can interrupt the sync during
1254
- * shutdown. The signal is checked between phases and forwarded into the QMD
1255
- * update and warmup search calls so a long-running `qmd update` subprocess
1256
- * is killed promptly rather than left in flight after `httpServer.stop()`.
1257
- *
1258
- * Returns true if the sync succeeded (QMD now available), false otherwise.
1259
- */
1260
- startupSearchSync(signal?: AbortSignal): Promise<boolean>;
1261
- /**
1262
- * Auto-register the engram-day-summary cron job in OpenClaw if it doesn't exist.
1263
- * Fire-and-forget — never blocks init or crashes on failure.
1264
- */
1265
- private autoRegisterDaySummaryCron;
1266
- private autoRegisterNightlyGovernanceCron;
1267
- private autoRegisterProceduralMiningCron;
1268
- private autoRegisterContradictionScanCron;
1269
- private autoRegisterPatternReinforcementCron;
1270
- /**
1271
- * Run the pattern-reinforcement maintenance job (issue #687 PR 2/4).
1272
- *
1273
- * Cadence-gated on `patternReinforcementCadenceMs` so every caller
1274
- * (orchestrator cron path, MCP tool, CLI) shares a single floor —
1275
- * none can call this on a hot loop and burn the corpus. When the
1276
- * feature is disabled or the cadence has not elapsed, returns a
1277
- * synthetic "skipped" result rather than throwing.
1278
- *
1279
- * Cadence tracking is per-namespace so a tenant-scoped MCP run in
1280
- * one namespace does not silence a cron run in another (PR #730
1281
- * review feedback, Codex P2). Pass `force: true` for ad-hoc
1282
- * operator runs that must bypass the cadence floor — mirrors the
1283
- * pattern used by other maintenance MCP tools.
1284
- *
1285
- * `force` deliberately does NOT bypass the master
1286
- * `patternReinforcementEnabled` flag (PR #730 review feedback,
1287
- * Cursor Medium). Operators who have explicitly disabled the
1288
- * feature must not have their corpus mutated by an MCP tool call —
1289
- * the only way to run the job is to enable the feature in config.
1290
- */
1291
- runPatternReinforcement(options?: {
1292
- force?: boolean;
1293
- namespace?: string;
1294
- }): Promise<{
1295
- ran: boolean;
1296
- skippedReason?: "disabled" | "cadence";
1297
- namespace: string;
1298
- result?: PatternReinforcementResult;
1299
- }>;
1300
- private autoRegisterGraphEdgeDecayCron;
1301
- runLiveConnectors(options?: {
1302
- force?: boolean;
1303
- abortSignal?: AbortSignal;
1304
- }): Promise<LiveConnectorsRunSummary>;
1305
- applyBehaviorRuntimePolicy(state: BehaviorLoopPolicyState): Promise<{
1306
- applied: boolean;
1307
- rolledBack: boolean;
1308
- values: RuntimePolicyValues | null;
1309
- reason: string;
1310
- }>;
1311
- rollbackBehaviorRuntimePolicy(): Promise<boolean>;
1312
- maybeRunFileHygiene(): Promise<void>;
1313
- runBootstrap(options: BootstrapOptions): Promise<BootstrapResult>;
1314
- runConsolidationNow(): Promise<{
1315
- memoriesProcessed: number;
1316
- merged: number;
1317
- invalidated: number;
1318
- }>;
1319
- reindexMemoryById(id: string, options?: {
1320
- storage?: StorageManager;
1321
- }): Promise<void>;
1322
- registerConsolidationObserver(observer: (observation: ConsolidationObservation) => Promise<void> | void): () => void;
1323
- runSemanticConsolidationNow(options?: {
1324
- dryRun?: boolean;
1325
- thresholdOverride?: number;
1326
- storage?: StorageManager;
1327
- }): Promise<SemanticConsolidationResult>;
1328
- runDeepSleepGovernanceNow(options?: {
1329
- dryRun?: boolean;
1330
- storage?: StorageManager;
1331
- }): Promise<{
1332
- scannedMemories: number;
1333
- appliedActionCount: number;
1334
- notes?: string;
1335
- }>;
1336
- private runSemanticConsolidation;
1337
- waitForExtractionIdle(timeoutMs?: number): Promise<boolean>;
1338
- waitForConsolidationIdle(timeoutMs?: number): Promise<boolean>;
1339
- getStorage(namespace?: string): Promise<StorageManager>;
1340
- processEntitySynthesisQueue(namespace?: string, maxEntities?: number): Promise<number>;
1341
- generateDaySummary(memories: string | MemoryFile[]): Promise<DaySummaryResult | null>;
1342
- /**
1343
- * Auto-gather today's facts and hourly summaries from storage, then generate a day summary.
1344
- * Returns null if no facts are found for today.
1345
- */
1346
- generateDaySummaryAuto(namespace?: string): Promise<DaySummaryResult | null>;
1347
- /**
1348
- * Read today's facts and hourly summaries from storage, returning them
1349
- * as a formatted string suitable for generateDaySummary().
1350
- */
1351
- gatherTodayFacts(namespace?: string): Promise<string>;
1352
- previewMemoryActionEvent(event: Omit<MemoryActionEvent, "timestamp"> & {
1353
- timestamp?: string;
1354
- }): MemoryActionEvent;
1355
- appendMemoryActionEvent(event: Omit<MemoryActionEvent, "timestamp"> & {
1356
- timestamp?: string;
1357
- }): Promise<boolean>;
1358
- getLastGraphRecallSnapshot(namespace?: string): Promise<GraphRecallSnapshot | null>;
1359
- getLastIntentSnapshot(namespace?: string): Promise<IntentDebugSnapshot | null>;
1360
- getLastQmdRecallSnapshot(namespace?: string): Promise<QmdRecallSnapshot | null>;
1361
- explainLastGraphRecall(options?: {
1362
- namespace?: string;
1363
- maxExpanded?: number;
1364
- }): Promise<string>;
1365
- explainLastIntent(options?: {
1366
- namespace?: string;
1367
- }): Promise<string>;
1368
- explainLastQmdRecall(options?: {
1369
- namespace?: string;
1370
- maxResults?: number;
1371
- }): Promise<string>;
1372
- private searchConversationRecallResults;
1373
- private formatConversationRecallSection;
1374
- private countConversationChunkDocs;
1375
- private buildConversationIndexChunks;
1376
- getConversationIndexHealth(): Promise<{
1377
- enabled: boolean;
1378
- backend: "qmd" | "faiss";
1379
- status: "ok" | "degraded" | "disabled";
1380
- chunkDocCount: number;
1381
- lastUpdateAt: string | null;
1382
- qmdAvailable?: boolean;
1383
- faiss?: {
1384
- ok: boolean;
1385
- status: "ok" | "degraded" | "error";
1386
- indexPath: string;
1387
- message?: string;
1388
- manifest?: {
1389
- version: number;
1390
- modelId: string;
1391
- normalizedModelId: string;
1392
- dimension: number;
1393
- chunkCount: number;
1394
- updatedAt: string;
1395
- lastSuccessfulRebuildAt: string;
1396
- };
1397
- };
1398
- }>;
1399
- inspectConversationIndex(): Promise<ConversationIndexBackendInspection & {
1400
- enabled: boolean;
1401
- chunkDocCount: number;
1402
- lastUpdateAt: string | null;
1403
- }>;
1404
- getRecoverySummary(sessionKey?: string): Promise<{
1405
- generatedAt: string;
1406
- sessionKey?: string;
1407
- healthy: boolean;
1408
- issueCount: number;
1409
- incompleteTurns: number;
1410
- brokenChains: number;
1411
- checkpointHealthy: boolean;
1412
- }>;
1413
- updateConversationIndex(sessionKey: string, hours?: number, opts?: {
1414
- embed?: boolean;
1415
- enforceMinInterval?: boolean;
1416
- }): Promise<{
1417
- chunks: number;
1418
- skipped: boolean;
1419
- reason?: string;
1420
- retryAfterMs?: number;
1421
- embedded?: boolean;
1422
- }>;
1423
- rebuildConversationIndex(sessionKey?: string, hours?: number, opts?: {
1424
- embed?: boolean;
1425
- }): Promise<{
1426
- chunks: number;
1427
- skipped: boolean;
1428
- reason?: string;
1429
- embedded?: boolean;
1430
- rebuilt?: boolean;
1431
- }>;
1432
- /**
1433
- * Validate local LLM model availability and context window compatibility.
1434
- * Warns the user if there's a mismatch.
1435
- */
1436
- private validateLocalLlmModel;
1437
- recall(prompt: string, sessionKey?: string, options?: RecallInvocationOptions): Promise<string>;
1438
- /**
1439
- * Return the most recent X-ray snapshot captured during a
1440
- * `recall()` call that passed `xrayCapture: true` (issue #570 PR 1).
1441
- * Returns `null` when no such capture has occurred on this
1442
- * orchestrator instance. Returned snapshot is a deep copy so
1443
- * caller mutation cannot tear the stored value.
1444
- */
1445
- getLastXraySnapshot(): RecallXraySnapshot | null;
1446
- /** Clear the captured X-ray snapshot. Exposed for tests / explicit reset. */
1447
- clearLastXraySnapshot(): void;
1448
- /**
1449
- * Await the in-flight observation-mode direct-answer annotation chain.
1450
- * Resolves to true when settled, false on timeout.
1451
- */
1452
- waitForDirectAnswerObservationIdle(timeoutMs?: number): Promise<boolean>;
1453
- private enqueueDirectAnswerObservation;
1454
- private annotateDirectAnswerTier;
1455
- private logRecallFailure;
1456
- private artifactTypeForCategory;
1457
- private truncateArtifactForRecall;
1458
- private fetchActiveArtifactsForNamespace;
1459
- private recallArtifactsAcrossNamespaces;
1460
- private scopeQueryAwarePaths;
1461
- private buildQueryAwarePrefilter;
1462
- private searchScopedMemoryCandidates;
1463
- private fetchQmdMemoryResultsWithArtifactTopUp;
1464
- private expandResultsViaGraph;
1465
- private recordLastGraphRecallSnapshot;
1466
- private recordLastIntentSnapshot;
1467
- private recordLastQmdRecallSnapshot;
1468
- private recordLastIntentSnapshotForNamespace;
1469
- private resolveStateDirForNamespace;
1470
- private buildGraphRecallRankedResults;
1471
- private getRecallSectionEntry;
1472
- private isRecallSectionEnabled;
1473
- private getRecallSectionMaxChars;
1474
- private getRecallSectionNumber;
1475
- private appendRecallSection;
1476
- private truncateRecallSectionToBudget;
1477
- private protectedRecallSectionIds;
1478
- private protectedRecallReservationChars;
1479
- private estimateReservedRecallBudget;
1480
- private getRecallBudgetChars;
1481
- private assembleRecallSections;
1482
- private recallInternal;
1483
- processTurn(role: "user" | "assistant", content: string, sessionKey?: string, options?: {
1484
- bufferKey?: string;
1485
- logicalSessionKey?: string;
1486
- providerThreadId?: string | null;
1487
- turnFingerprint?: string;
1488
- persistProcessedFingerprint?: boolean;
1489
- }): Promise<void>;
1490
- flushSession(sessionKey: string, options: {
1491
- reason: string;
1492
- abortSignal?: AbortSignal;
1493
- bufferKey?: string;
1494
- }): Promise<void>;
1495
- ingestReplayBatch(turns: ReplayTurn[], options?: {
1496
- deadlineMs?: number;
1497
- archiveLcm?: boolean;
1498
- }): Promise<void>;
1499
- /**
1500
- * Return the namespace that `ingestBulkImportBatch` writes into (#460).
1501
- *
1502
- * Exposed so host CLIs can snapshot the same storage root that extraction
1503
- * actually writes to, avoiding the "CLI counts files at namespace A while
1504
- * writes land in namespace B" footgun that a naïve
1505
- * `config.defaultNamespace` snapshot could hit when a namespace policy
1506
- * named `"default"` also exists.
1507
- *
1508
- * Today bulk-import is pinned to `config.defaultNamespace`; future
1509
- * per-invocation namespace routing would thread an explicit target here
1510
- * and through `ingestBulkImportBatch`.
1511
- */
1512
- bulkImportWriteNamespace(): string;
1513
- /**
1514
- * Ingest a batch of bulk-import turns (#460). Like ingestReplayBatch, this
1515
- * normalizes user/assistant turns into the extraction buffer and awaits
1516
- * settlement, but it intentionally bypasses the captureMode="explicit"
1517
- * gate because bulk-import is itself an explicit user action — the user
1518
- * ran `bulk-import --source <name> --file ...` and would be surprised to
1519
- * see the command silently no-op when capture is otherwise restricted.
1520
- *
1521
- * Turns with role="other" are skipped (not supported by the extraction
1522
- * pipeline).
1523
- *
1524
- * Two design decisions worth calling out:
1525
- *
1526
- * - **sessionKey is truthy and per-batch-unique.**
1527
- * `ThreadingManager.shouldStartNewThread` only applies the session-key
1528
- * boundary check when `turn.sessionKey` is truthy (threading.ts:82);
1529
- * with an empty string, imported turns could attach to the current
1530
- * live thread or merge across unrelated import batches. A unique
1531
- * `bulk-import:batch:<timestamp>-<rand>` key forces a fresh thread per
1532
- * batch without matching common prefix/map rules in
1533
- * `principalFromSessionKeyRules`. (Catch-all regex rules could still
1534
- * remap the principal, but that only affects metadata provenance —
1535
- * see the next point for why write routing is unaffected.)
1536
- *
1537
- * - **writeNamespaceOverride pins the storage target.**
1538
- * We pass `writeNamespaceOverride: this.bulkImportWriteNamespace()` to
1539
- * `queueBufferedExtraction`, which tells `runExtraction` to skip
1540
- * `defaultNamespaceForPrincipal` and write directly into the
1541
- * orchestrator's declared bulk-import write namespace. This keeps
1542
- * writes deterministic even when namespace policies named `"default"`
1543
- * exist alongside a different `config.defaultNamespace`, and also
1544
- * guards against regex-catch-all principal rules steering bulk-import
1545
- * into an unexpected tenant.
1546
- *
1547
- * Per-invocation namespace routing (letting callers target a namespace
1548
- * other than `bulkImportWriteNamespace()`) is a separate feature tracked
1549
- * as a follow-up — the hook is the `writeNamespaceOverride` option, but
1550
- * the CLI surface does not yet expose a `--namespace` flag.
1551
- */
1552
- ingestBulkImportBatch(turns: ImportTurn[], options?: {
1553
- deadlineMs?: number;
1554
- }): Promise<void>;
1555
- observeSessionHeartbeat(sessionKey: string, options?: {
1556
- bufferKey?: string;
1557
- }): Promise<void>;
1558
- private queueBufferedExtraction;
1559
- private normalizeExtractionFingerprintTurns;
1560
- private buildExtractionFingerprint;
1561
- private shouldQueueExtraction;
1562
- /**
1563
- * Background serial queue processor.
1564
- * Processes extractions one at a time to avoid race conditions.
1565
- * Called automatically when items are queued.
1566
- */
1567
- private processQueue;
1568
- /**
1569
- * Classify + log a failure from either the per-task catch inside
1570
- * `processQueue()` or the outer `processQueue().catch(...)` in
1571
- * `queueBufferedExtraction()`. Issue #549: `throwIfRecallAborted`
1572
- * (used throughout `runExtraction`) raises an Error whose `name` is
1573
- * `"AbortError"`. That path fires when `before_reset` aborts a
1574
- * queued task to avoid duplicate extraction — it is intentional
1575
- * cancellation, not a failure. Downgrading the log to debug
1576
- * prevents spurious `error`-level lines that routinely appear
1577
- * right next to a successful `persisted: N facts, M entities` log
1578
- * and that confuse operators into thinking extraction is broken.
1579
- * Genuine extraction failures (network, parse, I/O) still log at
1580
- * `error`.
1581
- *
1582
- * Source differentiates the two call sites so the log message
1583
- * names the right layer (`task` vs `processor`).
1584
- */
1585
- private logExtractionQueueFailure;
1586
- private runExtraction;
1587
- private recordProcessedExtractionFingerprint;
1588
- private runTierMigrationCycle;
1589
- getTierMigrationStatus(): Promise<TierMigrationStatusSnapshot>;
1590
- runTierMigrationNow(options?: {
1591
- dryRun?: boolean;
1592
- limit?: number;
1593
- }): Promise<TierMigrationCycleSummary>;
1594
- private maybeScheduleConsolidation;
1595
- private requestQmdMaintenance;
1596
- /**
1597
- * Public entrypoint for tool-driven QMD maintenance requests.
1598
- * Routes through existing debounced/singleflight maintenance controls.
1599
- */
1600
- requestQmdMaintenanceForTool(reason: string): void;
1601
- private runQmdMaintenance;
1602
- private persistExtraction;
1603
- private indexPersistedMemory;
1604
- /**
1605
- * Build a graph edge for a persisted memory (v8.2).
1606
- * Shared helper used by both the chunked and non-chunked write paths to avoid duplication.
1607
- * Fail-open: caller wraps in try/catch.
1608
- */
1609
- private buildGraphEdge;
1610
- private graphIndexFor;
1611
- /**
1612
- * Batch-update temporal and tag indexes after extraction (v8.1).
1613
- * Reads each persisted memory's path + frontmatter and adds them to
1614
- * state/index_time.json and state/index_tags.json.
1615
- * Fail-open: any error is logged but does not abort extraction.
1616
- */
1617
- private updateTemporalTagIndexes;
1618
- /** IDs of facts persisted in the last extraction */
1619
- private lastPersistedIds;
1620
- private runConsolidation;
1621
- optimizeCompressionGuidelines(options?: {
1622
- dryRun?: boolean;
1623
- eventLimit?: number;
1624
- }): Promise<{
1625
- enabled: boolean;
1626
- dryRun: boolean;
1627
- eventCount: number;
1628
- previousGuidelineVersion: number | null;
1629
- nextGuidelineVersion: number;
1630
- changedRules: number;
1631
- semanticRefinementApplied: boolean;
1632
- persisted: boolean;
1633
- draftContentHash: string | null;
1634
- }>;
1635
- activateCompressionGuidelineDraft(options?: {
1636
- expectedContentHash?: string;
1637
- expectedGuidelineVersion?: number;
1638
- }): Promise<{
1639
- enabled: boolean;
1640
- activated: boolean;
1641
- guidelineVersion: number | null;
1642
- reason?: "disabled" | "missing_draft" | "expected_revision_required" | "content_hash_mismatch" | "guideline_version_mismatch" | "draft_changed";
1643
- }>;
1644
- private runCompressionGuidelineLearningPass;
1645
- private buildCompressionGuidelineRecallSection;
1646
- private parseCompressionSemanticRefinement;
1647
- private actionOutcomePriorDelta;
1648
- private buildLifecycleActionPriors;
1649
- private recordScheduledDreamsPhaseRun;
1650
- runLifecyclePolicyNow(storage?: StorageManager): Promise<{
1651
- memoriesAssessed: number;
1652
- }>;
1653
- private runLifecyclePolicyPass;
1654
- /**
1655
- * Archive old, low-importance, rarely-accessed facts (v6.0).
1656
- * Moves eligible facts from facts/ to archive/YYYY-MM-DD/.
1657
- * Returns the number of archived facts.
1658
- */
1659
- private runFactArchival;
1660
- /**
1661
- * Run memory summarization if memory count exceeds threshold (Phase 4A).
1662
- */
1663
- private runSummarization;
1664
- /**
1665
- * Run topic extraction on all memories (Phase 4B).
1666
- */
1667
- private runTopicExtraction;
1668
- /** Threshold (bytes) at which IDENTITY.md reflections get auto-consolidated */
1669
- private static readonly IDENTITY_CONSOLIDATE_THRESHOLD;
1670
- private autoConsolidateIdentity;
1671
- private formatQmdResults;
1672
- private formatObjectiveStateResults;
1673
- private formatCausalTrajectoryResults;
1674
- private formatTrustZoneResults;
1675
- private formatHarmonicRetrievalResults;
1676
- private formatWorkProductResults;
1677
- private formatVerifiedEpisodeResults;
1678
- private formatVerifiedSemanticRuleResults;
1679
- private summarizeIdentityText;
1680
- private formatOpenIncidentLine;
1681
- private trimIdentitySection;
1682
- private buildIdentityContinuitySection;
1683
- private emitTrace;
1684
- private queueEvalShadowRecall;
1685
- private publishRecallResults;
1686
- /**
1687
- * Apply MMR over the pre-truncation recall candidate pool and then slice
1688
- * the result to `limit`. This is the single place in the pipeline where
1689
- * MMR runs, and it must be called *before* callers throw away candidates
1690
- * that would otherwise sit below the final cutoff. Running MMR post-slice
1691
- * is a no-op in the cases we care about — diverse candidates just below
1692
- * the cutoff are already gone and can never be promoted.
1693
- *
1694
- * Callers must pass the full candidate pool (post-rerank, pre-slice).
1695
- */
1696
- private applyMemoryWorthRerank;
1697
- private diversifyAndLimitRecallResults;
1698
- /**
1699
- * Apply Maximal Marginal Relevance to a section's ordered candidate list.
1700
- *
1701
- * Operates per-section so one redundant cluster cannot dominate a section,
1702
- * and so one section's MMR pass cannot starve other sections. Returns the
1703
- * input unchanged when disabled, when there are fewer than 2 candidates, or
1704
- * when no budget information is available.
1705
- */
1706
- private applyMmrToQmdResults;
1707
- private buildLastRecallBudgetSummary;
1708
- private collectLastRecallSources;
1709
- /**
1710
- * Issue #373 — nearest-neighbor lookup for the write-time semantic dedup
1711
- * guard. Returns the top-K embedding hits against the currently indexed
1712
- * memories, or an empty array when the embedding backend is unavailable.
1713
- * Intentionally does NOT throw; `decideSemanticDedup` treats both "empty"
1714
- * and "error" outcomes as fail-open (keep the candidate).
1715
- *
1716
- * PR #399 P1 fix: when namespaces are enabled the lookup must be scoped
1717
- * to the SAME namespace as the fact being written. Otherwise a
1718
- * high-similarity memory from another namespace can suppress a write in
1719
- * the target namespace — cross-tenant data loss. Callers pass the target
1720
- * storage so we can translate its root directory into the correct index
1721
- * path prefix (and, for the legacy default-namespace layout at
1722
- * `memoryDir` root, an exclusion list for `namespaces/*`).
1723
- */
1724
- semanticDedupLookup(content: string, limit: number, targetStorage: StorageManager): Promise<SemanticDedupHit[]>;
1725
- /**
1726
- * Resolve the namespace-scoped filter to pass into
1727
- * `EmbeddingFallback.search()` for semantic dedup. Returns an empty
1728
- * object (no filter) when namespaces are disabled, preserving the
1729
- * pre-PR #399 behavior for single-tenant installs.
1730
- *
1731
- * Index entries are stored as paths relative to `config.memoryDir`, so:
1732
- * - A non-default namespace `ns` lives under `namespaces/<ns>/…` and
1733
- * we include exactly that prefix.
1734
- * - The default namespace may live at `memoryDir` root (legacy) or at
1735
- * `memoryDir/namespaces/<default>/…` (migrated). When it lives at
1736
- * root we include everything but EXCLUDE all `namespaces/…` entries
1737
- * so facts from non-default namespaces can't cross-match.
1738
- */
1739
- private semanticDedupScopeFor;
1740
- private searchEmbeddingFallback;
1741
- /**
1742
- * Long-term fallback retrieval.
1743
- * Searches archived memories only, and is invoked only when hot recall returns zero hits.
1744
- */
1745
- private searchLongTermArchiveFallback;
1746
- private applyColdFallbackPipeline;
1747
- /**
1748
- * Record that memories were accessed (retrieved).
1749
- * Updates are batched in memory and flushed during consolidation.
1750
- */
1751
- trackMemoryAccess(memoryIds: string[]): void;
1752
- /**
1753
- * Flush access tracking buffer to disk.
1754
- * Called during consolidation or when buffer is full.
1755
- */
1756
- flushAccessTracking(): Promise<void>;
1757
- /**
1758
- * Apply recency, access count, and importance boosting to QMD search results.
1759
- * Returns re-ranked results.
1760
- */
1761
- private boostSearchResults;
1762
- /**
1763
- * Extract memory IDs from QMD search results for access tracking.
1764
- */
1765
- private extractMemoryIdsFromResults;
1766
- recordMemoryFeedback(memoryId: string, vote: "up" | "down", note?: string): Promise<void>;
1767
- recordNotUsefulMemories(memoryIds: string[], note?: string): Promise<void>;
1768
- getLastRecall(sessionKey: string): LastRecallSnapshot | null;
1769
- /**
1770
- * Check if a new memory contradicts an existing one.
1771
- * Uses QMD to find similar memories, then LLM to verify contradiction.
1772
- */
1773
- private checkForContradiction;
1774
- /**
1775
- * Suggest links for a new memory based on similar existing memories.
1776
- */
1777
- private suggestLinksForMemory;
1778
- private namespaceFromPath;
1779
- private namespaceFromStorageDir;
1780
- private readAllMemoriesForNamespaces;
1781
- private readArchivedMemoriesForNamespaces;
1782
- }
1783
-
1784
- export { shouldFilterLifecycleRecallCandidate as $, computeArtifactCandidateFetchLimit as A, type BulkImportSource as B, type CompoundingPromotionReport as C, computeArtifactRecallLimit as D, computeQmdHybridFetchLimit as E, dedupeEntitySynthesisEvidenceEntries as F, type GraphRecallSnapshot as G, deriveTopicsFromExtraction as H, type IntentDebugSnapshot as I, filterRecallCandidates as J, formatCompressionGuidelinesForRecall as K, graphPathRelativeToStorage as L, hasIdentityRecoveryIntent as M, isArtifactMemoryPath as N, Orchestrator as O, type PatternReinforcementResult as P, type QmdRecallSnapshot as Q, type ReplaySource as R, type SemanticDedupLookup as S, lifecycleRecallScoreAdjustment as T, mergeArtifactRecallCandidates as U, mergeGraphExpandedResults as V, resolveEffectiveIdentityInjectionMode as W, resolveEffectiveRecallMode as X, resolvePersistedMemoryRelativePath as Y, resolveRecallModeDecision as Z, resolveRecentThreadMemoryPaths as _, type ReplayWarning as a, summarizeGraphShadowComparison as a0, type ImportTurn as b, type BulkImportOptions as c, type BulkImportResult as d, type ReplayTurn as e, type BulkImportSourceAdapter as f, type BulkImportError as g, type ImportSourceRole as h, type ImportTurnValidationIssue as i, type SemanticDedupDecision as j, type SemanticDedupHit as k, type SemanticDedupOptions as l, decideSemanticDedup as m, defaultWorkspaceDir as n, isImportRole as o, parseIsoTimestamp as p, type GraphRecallRankedResult as q, type GraphRecallShadowComparison as r, sanitizeSessionKeyForFilename as s, type RecallInvocationOptions as t, type RecallModeDecision as u, validateImportTurn as v, appendMemoryToGraphContext as w, blendGraphExpandedRecallScore as x, buildCompressionGuidelinesMarkdown as y, buildMemoryPathById as z };