@remnic/core 1.1.12 → 1.1.14

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 (1324) hide show
  1. package/dist/access-cli.d.ts +2 -1
  2. package/dist/access-cli.js +263 -82
  3. package/dist/access-cli.js.map +1 -1
  4. package/dist/access-http.d.ts +26 -60
  5. package/dist/access-http.js +43 -29
  6. package/dist/access-mcp.d.ts +24 -6
  7. package/dist/access-mcp.js +35 -28
  8. package/dist/access-schema.d.ts +9 -6
  9. package/dist/access-schema.js +7 -5
  10. package/dist/access-service-DcCDmNYC.d.ts +1542 -0
  11. package/dist/access-service.d.ts +25 -7
  12. package/dist/access-service.js +33 -26
  13. package/dist/active-memory-bridge.js +2 -2
  14. package/dist/active-recall.js +11 -3
  15. package/dist/active-recall.js.map +1 -1
  16. package/dist/adapters/claude-code.d.ts +24 -0
  17. package/dist/adapters/claude-code.js +9 -0
  18. package/dist/adapters/codex.d.ts +25 -0
  19. package/dist/adapters/codex.js +9 -0
  20. package/dist/adapters/hermes.d.ts +35 -0
  21. package/dist/adapters/hermes.js +9 -0
  22. package/dist/adapters/index.d.ts +6 -0
  23. package/dist/adapters/index.js +26 -0
  24. package/dist/adapters/registry.d.ts +20 -0
  25. package/dist/adapters/registry.js +13 -0
  26. package/dist/adapters/replit.d.ts +28 -0
  27. package/dist/adapters/replit.js +9 -0
  28. package/dist/adapters/types.d.ts +43 -0
  29. package/dist/adapters/types.js +8 -0
  30. package/dist/bootstrap.d.ts +20 -5
  31. package/dist/boxes.d.ts +7 -0
  32. package/dist/boxes.js +1 -1
  33. package/dist/briefing.d.ts +5 -3
  34. package/dist/briefing.js +9 -6
  35. package/dist/buffer-surprise-report.js +1 -1
  36. package/dist/buffer.d.ts +18 -4
  37. package/dist/buffer.js +1 -1
  38. package/dist/calibration.js +4 -4
  39. package/dist/capsule-cli.d.ts +4 -4
  40. package/dist/capsule-cli.js +1 -1
  41. package/dist/capsule-crypto-5CYAGVC5.js +18 -0
  42. package/dist/capsule-merge-4MGKE7C5.js +189 -0
  43. package/dist/causal-behavior.d.ts +8 -28
  44. package/dist/causal-behavior.js +6 -3
  45. package/dist/causal-behavior.js.map +1 -1
  46. package/dist/causal-chain.js +3 -2
  47. package/dist/causal-consolidation.d.ts +1 -1
  48. package/dist/causal-consolidation.js +24 -13
  49. package/dist/causal-consolidation.js.map +1 -1
  50. package/dist/causal-retrieval.js +3 -3
  51. package/dist/causal-trajectory.js +1 -1
  52. package/dist/chunk-25MQ7IHJ.js +427 -0
  53. package/dist/chunk-25MQ7IHJ.js.map +1 -0
  54. package/dist/chunk-2F2W355T.js +256 -0
  55. package/dist/chunk-2F2W355T.js.map +1 -0
  56. package/dist/chunk-2KI4QFHU.js +228 -0
  57. package/dist/chunk-2KI4QFHU.js.map +1 -0
  58. package/dist/chunk-2PRQG7PV.js +86 -0
  59. package/dist/chunk-2PRQG7PV.js.map +1 -0
  60. package/dist/chunk-2QR3XXIC.js +2272 -0
  61. package/dist/chunk-2QR3XXIC.js.map +1 -0
  62. package/dist/chunk-2WWLHTZY.js +121 -0
  63. package/dist/chunk-326G7DJK.js +2185 -0
  64. package/dist/chunk-326G7DJK.js.map +1 -0
  65. package/dist/chunk-34DQE4KF.js +174 -0
  66. package/dist/chunk-34DQE4KF.js.map +1 -0
  67. package/dist/chunk-3APJ5EVB.js +601 -0
  68. package/dist/chunk-3APJ5EVB.js.map +1 -0
  69. package/dist/chunk-3HPAPHUK.js +51 -0
  70. package/dist/chunk-3HPAPHUK.js.map +1 -0
  71. package/dist/chunk-3JXBXXM2.js +69 -0
  72. package/dist/chunk-3JXBXXM2.js.map +1 -0
  73. package/dist/chunk-3KW65B36.js +681 -0
  74. package/dist/chunk-3KW65B36.js.map +1 -0
  75. package/dist/chunk-3UXOZBHV.js +20 -0
  76. package/dist/chunk-3UXOZBHV.js.map +1 -0
  77. package/dist/chunk-3VAL7ZL2.js +266 -0
  78. package/dist/chunk-3VAL7ZL2.js.map +1 -0
  79. package/dist/chunk-3Y4P7RXM.js +31 -0
  80. package/dist/chunk-3Y4P7RXM.js.map +1 -0
  81. package/dist/chunk-47VWKCAF.js +273 -0
  82. package/dist/chunk-47VWKCAF.js.map +1 -0
  83. package/dist/chunk-4CRG46BG.js +271 -0
  84. package/dist/chunk-5375UYTQ.js +914 -0
  85. package/dist/chunk-5375UYTQ.js.map +1 -0
  86. package/dist/chunk-56K5QLHX.js +506 -0
  87. package/dist/chunk-56K5QLHX.js.map +1 -0
  88. package/dist/chunk-5RGLBDQF.js +596 -0
  89. package/dist/chunk-5RGLBDQF.js.map +1 -0
  90. package/dist/chunk-5UZXUTVO.js +9 -0
  91. package/dist/chunk-5UZXUTVO.js.map +1 -0
  92. package/dist/chunk-65PG43EQ.js +105 -0
  93. package/dist/chunk-65PG43EQ.js.map +1 -0
  94. package/dist/chunk-66DHUKLO.js +57 -0
  95. package/dist/chunk-66DHUKLO.js.map +1 -0
  96. package/dist/chunk-6FC5EGNV.js +46 -0
  97. package/dist/chunk-6FC5EGNV.js.map +1 -0
  98. package/dist/chunk-6H2TESSP.js +62 -0
  99. package/dist/chunk-6H2TESSP.js.map +1 -0
  100. package/dist/chunk-6LVVDPJ4.js +32 -0
  101. package/dist/chunk-6LVVDPJ4.js.map +1 -0
  102. package/dist/chunk-6RVI47ZR.js +159 -0
  103. package/dist/chunk-6RVI47ZR.js.map +1 -0
  104. package/dist/chunk-7AAT6G4Q.js +5117 -0
  105. package/dist/chunk-7AAT6G4Q.js.map +1 -0
  106. package/dist/chunk-7DTASS5T.js +29 -0
  107. package/dist/chunk-7DTASS5T.js.map +1 -0
  108. package/dist/chunk-7IASACLB.js +596 -0
  109. package/dist/chunk-7MNMYOFP.js +32 -0
  110. package/dist/chunk-7MNMYOFP.js.map +1 -0
  111. package/dist/chunk-7N4KAIGN.js +133 -0
  112. package/dist/chunk-7N4KAIGN.js.map +1 -0
  113. package/dist/chunk-7OZ53EXP.js +101 -0
  114. package/dist/chunk-7OZ53EXP.js.map +1 -0
  115. package/dist/chunk-7XYTQGCC.js +134 -0
  116. package/dist/chunk-7XYTQGCC.js.map +1 -0
  117. package/dist/chunk-A2XUIMJ3.js +341 -0
  118. package/dist/chunk-A2XUIMJ3.js.map +1 -0
  119. package/dist/chunk-AGZQD76C.js +201 -0
  120. package/dist/chunk-AGZQD76C.js.map +1 -0
  121. package/dist/chunk-APO3DCMU.js +361 -0
  122. package/dist/chunk-APO3DCMU.js.map +1 -0
  123. package/dist/chunk-BFBF3XEF.js +283 -0
  124. package/dist/chunk-BFBF3XEF.js.map +1 -0
  125. package/dist/chunk-BJ3KMYTB.js +1974 -0
  126. package/dist/chunk-BJ3KMYTB.js.map +1 -0
  127. package/dist/chunk-CHEL3SKB.js +6758 -0
  128. package/dist/chunk-CHEL3SKB.js.map +1 -0
  129. package/dist/chunk-CQZRLNMV.js +1491 -0
  130. package/dist/chunk-CQZRLNMV.js.map +1 -0
  131. package/dist/chunk-D46YSIYX.js +892 -0
  132. package/dist/chunk-D46YSIYX.js.map +1 -0
  133. package/dist/chunk-DINWEURR.js +648 -0
  134. package/dist/chunk-DINWEURR.js.map +1 -0
  135. package/dist/chunk-DK5LDEQM.js +530 -0
  136. package/dist/chunk-DK5LDEQM.js.map +1 -0
  137. package/dist/chunk-DOM4GKSW.js +34 -0
  138. package/dist/chunk-DOM4GKSW.js.map +1 -0
  139. package/dist/chunk-EDTHC6UD.js +1075 -0
  140. package/dist/chunk-EFJ3MQ4V.js +721 -0
  141. package/dist/chunk-EHRTFRWW.js +89 -0
  142. package/dist/chunk-EHRTFRWW.js.map +1 -0
  143. package/dist/chunk-FAJ7FZYM.js +11 -0
  144. package/dist/chunk-FAJ7FZYM.js.map +1 -0
  145. package/dist/chunk-FBYESMQ2.js +570 -0
  146. package/dist/chunk-FDU6HUUL.js +147 -0
  147. package/dist/chunk-FF4KLI5W.js +99 -0
  148. package/dist/chunk-FF4KLI5W.js.map +1 -0
  149. package/dist/chunk-FIT6DMX6.js +310 -0
  150. package/dist/chunk-FIT6DMX6.js.map +1 -0
  151. package/dist/chunk-FJ43PRLT.js +272 -0
  152. package/dist/chunk-FJ43PRLT.js.map +1 -0
  153. package/dist/chunk-FKFMOY3N.js +32 -0
  154. package/dist/chunk-FKFMOY3N.js.map +1 -0
  155. package/dist/chunk-FLTNHQK6.js +262 -0
  156. package/dist/chunk-FLTNHQK6.js.map +1 -0
  157. package/dist/chunk-GA454ALV.js +12436 -0
  158. package/dist/chunk-GA454ALV.js.map +1 -0
  159. package/dist/chunk-GGKRUQOO.js +228 -0
  160. package/dist/chunk-GIF42EW3.js +63 -0
  161. package/dist/chunk-GIF42EW3.js.map +1 -0
  162. package/dist/chunk-GL6I6MEQ.js +647 -0
  163. package/dist/chunk-H3ME6L6D.js +709 -0
  164. package/dist/chunk-H3ME6L6D.js.map +1 -0
  165. package/dist/chunk-HHLLAQGZ.js +1 -0
  166. package/dist/chunk-HXXBL2KD.js +2040 -0
  167. package/dist/chunk-I5V2VDIW.js +219 -0
  168. package/dist/chunk-I5V2VDIW.js.map +1 -0
  169. package/dist/chunk-I6K5FBRQ.js +35 -0
  170. package/dist/chunk-I6K5FBRQ.js.map +1 -0
  171. package/dist/chunk-ICRIXAP2.js +121 -0
  172. package/dist/chunk-ICRIXAP2.js.map +1 -0
  173. package/dist/chunk-J4EB7DNW.js +11 -0
  174. package/dist/chunk-J4EB7DNW.js.map +1 -0
  175. package/dist/chunk-JLFA7DQG.js +62 -0
  176. package/dist/chunk-JLFA7DQG.js.map +1 -0
  177. package/dist/chunk-KJTKLXTH.js +9 -0
  178. package/dist/chunk-KJTKLXTH.js.map +1 -0
  179. package/dist/chunk-KLAO5DGL.js +917 -0
  180. package/dist/chunk-KLAO5DGL.js.map +1 -0
  181. package/dist/chunk-KNKUID7G.js +183 -0
  182. package/dist/chunk-KOSORCJG.js +624 -0
  183. package/dist/chunk-KOSORCJG.js.map +1 -0
  184. package/dist/chunk-KUJVMMZQ.js +1262 -0
  185. package/dist/chunk-KUJVMMZQ.js.map +1 -0
  186. package/dist/chunk-LCR46JY5.js +123 -0
  187. package/dist/chunk-LCR46JY5.js.map +1 -0
  188. package/dist/chunk-LLQ2LLWF.js +148 -0
  189. package/dist/chunk-LLQ2LLWF.js.map +1 -0
  190. package/dist/chunk-LPMVBPA3.js +236 -0
  191. package/dist/chunk-LT3NLYSI.js +50 -0
  192. package/dist/chunk-LT3NLYSI.js.map +1 -0
  193. package/dist/chunk-LUDTDZLK.js +287 -0
  194. package/dist/chunk-LUDTDZLK.js.map +1 -0
  195. package/dist/chunk-M23FSH32.js +3963 -0
  196. package/dist/chunk-M23FSH32.js.map +1 -0
  197. package/dist/chunk-MC26UJIM.js +118 -0
  198. package/dist/chunk-ME6ESPZU.js +119 -0
  199. package/dist/chunk-ME6ESPZU.js.map +1 -0
  200. package/dist/chunk-MGKYQQYF.js +272 -0
  201. package/dist/chunk-MJFNCJXV.js +66 -0
  202. package/dist/chunk-MJFNCJXV.js.map +1 -0
  203. package/dist/chunk-MSWG7JI6.js +237 -0
  204. package/dist/chunk-MSWG7JI6.js.map +1 -0
  205. package/dist/chunk-MT25YHYH.js +141 -0
  206. package/dist/chunk-MT25YHYH.js.map +1 -0
  207. package/dist/chunk-MT4HVDUZ.js +53 -0
  208. package/dist/chunk-MY6TPVXW.js +219 -0
  209. package/dist/chunk-N2D6GXBM.js +267 -0
  210. package/dist/chunk-N2D6GXBM.js.map +1 -0
  211. package/dist/chunk-NJ3MJQZX.js +46 -0
  212. package/dist/chunk-NJ3MJQZX.js.map +1 -0
  213. package/dist/chunk-NMZY542O.js +335 -0
  214. package/dist/chunk-NMZY542O.js.map +1 -0
  215. package/dist/chunk-NNVTUXEB.js +23 -0
  216. package/dist/chunk-NZL6GGQE.js +375 -0
  217. package/dist/chunk-NZL6GGQE.js.map +1 -0
  218. package/dist/chunk-P4NEIHUT.js +108 -0
  219. package/dist/chunk-P7FMDTKL.js +103 -0
  220. package/dist/chunk-P7FMDTKL.js.map +1 -0
  221. package/dist/chunk-PHK3HARR.js +32 -0
  222. package/dist/chunk-PHK3HARR.js.map +1 -0
  223. package/dist/chunk-PIRJPV5T.js +98 -0
  224. package/dist/chunk-PIRJPV5T.js.map +1 -0
  225. package/dist/chunk-PK7H5L6Y.js +159 -0
  226. package/dist/chunk-PK7H5L6Y.js.map +1 -0
  227. package/dist/chunk-PR5FBTFU.js +233 -0
  228. package/dist/chunk-PR5FBTFU.js.map +1 -0
  229. package/dist/chunk-PU63GXWS.js +174 -0
  230. package/dist/chunk-PU63GXWS.js.map +1 -0
  231. package/dist/chunk-PZIAX57I.js +124 -0
  232. package/dist/chunk-PZIAX57I.js.map +1 -0
  233. package/dist/chunk-Q7P4WJDP.js +26 -0
  234. package/dist/chunk-Q7P4WJDP.js.map +1 -0
  235. package/dist/chunk-QQUAB63I.js +63 -0
  236. package/dist/chunk-QQUAB63I.js.map +1 -0
  237. package/dist/chunk-QRNI5JBH.js +18 -0
  238. package/dist/chunk-RHY3HH7P.js +601 -0
  239. package/dist/chunk-RHY3HH7P.js.map +1 -0
  240. package/dist/chunk-RRF5UOBJ.js +91 -0
  241. package/dist/chunk-RXDLTSWT.js +124 -0
  242. package/dist/chunk-RXDLTSWT.js.map +1 -0
  243. package/dist/chunk-RYED3SPJ.js +42 -0
  244. package/dist/chunk-RYED3SPJ.js.map +1 -0
  245. package/dist/chunk-S7KDBTWT.js +106 -0
  246. package/dist/chunk-S7KDBTWT.js.map +1 -0
  247. package/dist/chunk-SEDEKFYQ.js +1 -0
  248. package/dist/chunk-TECVW3JP.js +36 -0
  249. package/dist/chunk-TECVW3JP.js.map +1 -0
  250. package/dist/chunk-TFO23QT4.js +88 -0
  251. package/dist/chunk-TFO23QT4.js.map +1 -0
  252. package/dist/chunk-TK4UEOSK.js +76 -0
  253. package/dist/chunk-TK4UEOSK.js.map +1 -0
  254. package/dist/chunk-TKWGAOLV.js +122 -0
  255. package/dist/chunk-TKWGAOLV.js.map +1 -0
  256. package/dist/chunk-TMM4S4IJ.js +597 -0
  257. package/dist/chunk-TMM4S4IJ.js.map +1 -0
  258. package/dist/chunk-TMQLARTH.js +188 -0
  259. package/dist/chunk-TMQLARTH.js.map +1 -0
  260. package/dist/chunk-TPDBFYEG.js +130 -0
  261. package/dist/chunk-TPDBFYEG.js.map +1 -0
  262. package/dist/chunk-TPMQ3G6Z.js +145 -0
  263. package/dist/chunk-TPMQ3G6Z.js.map +1 -0
  264. package/dist/chunk-TZOLIGIG.js +61 -0
  265. package/dist/chunk-TZOLIGIG.js.map +1 -0
  266. package/dist/chunk-U3PN77QT.js +113 -0
  267. package/dist/chunk-U3WSW6PZ.js +277 -0
  268. package/dist/chunk-U4SCL7B7.js +640 -0
  269. package/dist/chunk-U4SCL7B7.js.map +1 -0
  270. package/dist/chunk-UWK5OXUJ.js +156 -0
  271. package/dist/chunk-UWK5OXUJ.js.map +1 -0
  272. package/dist/chunk-UWVJF25J.js +74 -0
  273. package/dist/chunk-UXHQAFNA.js +1317 -0
  274. package/dist/chunk-UXHQAFNA.js.map +1 -0
  275. package/dist/chunk-V5OCT34X.js +1 -0
  276. package/dist/chunk-VLXA6PI2.js +304 -0
  277. package/dist/chunk-VLXA6PI2.js.map +1 -0
  278. package/dist/chunk-VNO6ZJ35.js +500 -0
  279. package/dist/chunk-VNO6ZJ35.js.map +1 -0
  280. package/dist/chunk-VW676BEI.js +827 -0
  281. package/dist/chunk-VW676BEI.js.map +1 -0
  282. package/dist/chunk-W3LR522O.js +2296 -0
  283. package/dist/chunk-W4L6CZKA.js +96 -0
  284. package/dist/chunk-W4L6CZKA.js.map +1 -0
  285. package/dist/chunk-W4RVMTHR.js +372 -0
  286. package/dist/chunk-W4RVMTHR.js.map +1 -0
  287. package/dist/chunk-WEHSQBFR.js +188 -0
  288. package/dist/chunk-WEHSQBFR.js.map +1 -0
  289. package/dist/chunk-WELDCG6C.js +380 -0
  290. package/dist/chunk-WELDCG6C.js.map +1 -0
  291. package/dist/chunk-WZYKANL3.js +2800 -0
  292. package/dist/chunk-WZYKANL3.js.map +1 -0
  293. package/dist/chunk-XIG5PDM7.js +48 -0
  294. package/dist/chunk-XJNBEDFE.js +193 -0
  295. package/dist/chunk-XJNBEDFE.js.map +1 -0
  296. package/dist/chunk-XVVIG67A.js +291 -0
  297. package/dist/chunk-XVVIG67A.js.map +1 -0
  298. package/dist/chunk-XVZ7B3HG.js +135 -0
  299. package/dist/chunk-YBPYIAA5.js +73 -0
  300. package/dist/chunk-YBPYIAA5.js.map +1 -0
  301. package/dist/chunk-Z734BLO3.js +21 -0
  302. package/dist/chunk-Z734BLO3.js.map +1 -0
  303. package/dist/chunk-ZKSK55RC.js +269 -0
  304. package/dist/chunk-ZKSK55RC.js.map +1 -0
  305. package/dist/chunk-ZTFCYYEZ.js +69 -0
  306. package/dist/chunk-ZTFCYYEZ.js.map +1 -0
  307. package/dist/chunk-ZY2MNJR6.js +329 -0
  308. package/dist/chunk-ZY2MNJR6.js.map +1 -0
  309. package/dist/cli-D3VpkVwB.d.ts +1136 -0
  310. package/dist/cli.d.ts +39 -10
  311. package/dist/cli.js +108 -49
  312. package/dist/commitment-ledger.js +1 -1
  313. package/dist/compat/checks.d.ts +5 -0
  314. package/dist/compat/checks.js +11 -0
  315. package/dist/compat/checks.js.map +1 -0
  316. package/dist/compat/types.d.ts +30 -0
  317. package/dist/compat/types.js +1 -0
  318. package/dist/compat/types.js.map +1 -0
  319. package/dist/compounding/engine.d.ts +221 -0
  320. package/dist/compounding/engine.js +32 -0
  321. package/dist/compounding/engine.js.map +1 -0
  322. package/dist/compounding/preference-consolidator.d.ts +92 -0
  323. package/dist/compounding/preference-consolidator.js +553 -0
  324. package/dist/compounding/preference-consolidator.js.map +1 -0
  325. package/dist/config.d.ts +4 -2
  326. package/dist/config.js +9 -4
  327. package/dist/conflict-policy-DyJ2wd-h.d.ts +4 -0
  328. package/dist/connectors/codex-materialize-runner.d.ts +64 -0
  329. package/dist/connectors/codex-materialize-runner.js +33 -0
  330. package/dist/connectors/codex-materialize-runner.js.map +1 -0
  331. package/dist/connectors/codex-materialize.d.ts +195 -0
  332. package/dist/connectors/codex-materialize.js +38 -0
  333. package/dist/connectors/codex-materialize.js.map +1 -0
  334. package/dist/connectors/index.d.ts +444 -0
  335. package/dist/connectors/index.js +115 -0
  336. package/dist/connectors/index.js.map +1 -0
  337. package/dist/connectors-cli-CwbyjGR7.d.ts +257 -0
  338. package/dist/connectors-cli.d.ts +1 -1
  339. package/dist/consolidation-provenance-check.d.ts +3 -1
  340. package/dist/consolidation-undo.d.ts +3 -1
  341. package/dist/contradiction/index.d.ts +258 -0
  342. package/dist/contradiction/index.js +43 -0
  343. package/dist/contradiction/index.js.map +1 -0
  344. package/dist/contradiction-review-ATP4S6IC.js +30 -0
  345. package/dist/contradiction-review-ATP4S6IC.js.map +1 -0
  346. package/dist/contradiction-scan-5A4IDZV5.js +13 -0
  347. package/dist/contradiction-scan-5A4IDZV5.js.map +1 -0
  348. package/dist/conversation-index/backend.d.ts +97 -0
  349. package/dist/conversation-index/backend.js +13 -0
  350. package/dist/conversation-index/backend.js.map +1 -0
  351. package/dist/conversation-index/chunker.d.ts +16 -0
  352. package/dist/conversation-index/chunker.js +8 -0
  353. package/dist/conversation-index/chunker.js.map +1 -0
  354. package/dist/conversation-index/cleanup.d.ts +11 -0
  355. package/dist/conversation-index/cleanup.js +9 -0
  356. package/dist/conversation-index/cleanup.js.map +1 -0
  357. package/dist/conversation-index/faiss-adapter.d.ts +6 -0
  358. package/dist/conversation-index/faiss-adapter.js +16 -0
  359. package/dist/conversation-index/faiss-adapter.js.map +1 -0
  360. package/dist/conversation-index/indexer.d.ts +23 -0
  361. package/dist/conversation-index/indexer.js +15 -0
  362. package/dist/conversation-index/indexer.js.map +1 -0
  363. package/dist/conversation-index/search.d.ts +6 -0
  364. package/dist/conversation-index/search.js +11 -0
  365. package/dist/conversation-index/search.js.map +1 -0
  366. package/dist/embedding-fallback.js +2 -2
  367. package/dist/enrichment/index.d.ts +163 -0
  368. package/dist/enrichment/index.js +18 -0
  369. package/dist/enrichment/index.js.map +1 -0
  370. package/dist/entity-retrieval.d.ts +4 -2
  371. package/dist/entity-retrieval.js +8 -5
  372. package/dist/evals.js +1 -1
  373. package/dist/explicit-capture.d.ts +20 -5
  374. package/dist/explicit-capture.js +2 -2
  375. package/dist/extraction-judge-training.js +1 -1
  376. package/dist/extraction.js +8 -8
  377. package/dist/faiss-adapter-CzPghc4C.d.ts +70 -0
  378. package/dist/fallback-llm.d.ts +2 -0
  379. package/dist/fallback-llm.js +4 -4
  380. package/dist/graph-edge-decay-5DI5GUNL.js +207 -0
  381. package/dist/index.d.ts +66 -711
  382. package/dist/index.js +556 -2680
  383. package/dist/index.js.map +1 -1
  384. package/dist/lcm/archive.d.ts +89 -0
  385. package/dist/lcm/archive.js +12 -0
  386. package/dist/lcm/archive.js.map +1 -0
  387. package/dist/lcm/dag.d.ts +48 -0
  388. package/dist/lcm/dag.js +8 -0
  389. package/dist/lcm/dag.js.map +1 -0
  390. package/dist/lcm/engine.d.ts +116 -0
  391. package/dist/lcm/engine.js +20 -0
  392. package/dist/lcm/engine.js.map +1 -0
  393. package/dist/lcm/index.d.ts +12 -0
  394. package/dist/lcm/index.js +44 -0
  395. package/dist/lcm/index.js.map +1 -0
  396. package/dist/lcm/queue.d.ts +62 -0
  397. package/dist/lcm/queue.js +8 -0
  398. package/dist/lcm/queue.js.map +1 -0
  399. package/dist/lcm/recall.d.ts +20 -0
  400. package/dist/lcm/recall.js +8 -0
  401. package/dist/lcm/recall.js.map +1 -0
  402. package/dist/lcm/schema.d.ts +16 -0
  403. package/dist/lcm/schema.js +14 -0
  404. package/dist/lcm/schema.js.map +1 -0
  405. package/dist/lcm/summarizer.d.ts +38 -0
  406. package/dist/lcm/summarizer.js +12 -0
  407. package/dist/lcm/summarizer.js.map +1 -0
  408. package/dist/lcm/tools.d.ts +29 -0
  409. package/dist/lcm/tools.js +8 -0
  410. package/dist/lcm/tools.js.map +1 -0
  411. package/dist/live-connectors-runner.js +5 -5
  412. package/dist/local-llm.js +3 -3
  413. package/dist/maintenance/archive-observations.d.ts +18 -0
  414. package/dist/maintenance/archive-observations.js +8 -0
  415. package/dist/maintenance/archive-observations.js.map +1 -0
  416. package/dist/maintenance/backup-stamp.d.ts +3 -0
  417. package/dist/maintenance/backup-stamp.js +8 -0
  418. package/dist/maintenance/backup-stamp.js.map +1 -0
  419. package/dist/maintenance/memory-governance-cron.d.ts +85 -0
  420. package/dist/maintenance/memory-governance-cron.js +22 -0
  421. package/dist/maintenance/memory-governance-cron.js.map +1 -0
  422. package/dist/maintenance/memory-governance.d.ts +137 -0
  423. package/dist/maintenance/memory-governance.js +40 -0
  424. package/dist/maintenance/memory-governance.js.map +1 -0
  425. package/dist/maintenance/migrate-observations.d.ts +18 -0
  426. package/dist/maintenance/migrate-observations.js +9 -0
  427. package/dist/maintenance/migrate-observations.js.map +1 -0
  428. package/dist/maintenance/observation-ledger-utils.d.ts +10 -0
  429. package/dist/maintenance/observation-ledger-utils.js +10 -0
  430. package/dist/maintenance/observation-ledger-utils.js.map +1 -0
  431. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +15 -0
  432. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +28 -0
  433. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js.map +1 -0
  434. package/dist/maintenance/rebuild-memory-projection.d.ts +77 -0
  435. package/dist/maintenance/rebuild-memory-projection.js +35 -0
  436. package/dist/maintenance/rebuild-memory-projection.js.map +1 -0
  437. package/dist/maintenance/rebuild-observations.d.ts +17 -0
  438. package/dist/maintenance/rebuild-observations.js +9 -0
  439. package/dist/maintenance/rebuild-observations.js.map +1 -0
  440. package/dist/mcp-memory-inspector-app.d.ts +24 -6
  441. package/dist/memory-projection-store.d.ts +108 -3
  442. package/dist/memory-projection-store.js +2 -1
  443. package/dist/memory-worth-outcomes.d.ts +4 -2
  444. package/dist/migrate/from-engram.d.ts +24 -0
  445. package/dist/migrate/from-engram.js +12 -0
  446. package/dist/migrate/from-engram.js.map +1 -0
  447. package/dist/namespaces/migrate.d.ts +50 -0
  448. package/dist/namespaces/migrate.js +50 -0
  449. package/dist/namespaces/migrate.js.map +1 -0
  450. package/dist/namespaces/principal.d.ts +17 -0
  451. package/dist/namespaces/principal.js +16 -0
  452. package/dist/namespaces/principal.js.map +1 -0
  453. package/dist/namespaces/search.d.ts +46 -0
  454. package/dist/namespaces/search.js +28 -0
  455. package/dist/namespaces/search.js.map +1 -0
  456. package/dist/namespaces/storage.d.ts +32 -0
  457. package/dist/namespaces/storage.js +28 -0
  458. package/dist/namespaces/storage.js.map +1 -0
  459. package/dist/network/tailscale.d.ts +41 -0
  460. package/dist/network/tailscale.js +9 -0
  461. package/dist/network/tailscale.js.map +1 -0
  462. package/dist/network/webdav.d.ts +39 -0
  463. package/dist/network/webdav.js +10 -0
  464. package/dist/network/webdav.js.map +1 -0
  465. package/dist/objective-state-writers.js +2 -2
  466. package/dist/operator-toolkit.d.ts +4 -2
  467. package/dist/operator-toolkit.js +32 -14
  468. package/dist/opik-exporter.js +2 -2
  469. package/dist/opik-exporter.js.map +1 -1
  470. package/dist/orchestrator-DuWl9Hwx.d.ts +1244 -0
  471. package/dist/orchestrator.d.ts +22 -7
  472. package/dist/orchestrator.js +79 -44
  473. package/dist/path-MR5JPYOP.js +9 -0
  474. package/dist/path-MR5JPYOP.js.map +1 -0
  475. package/dist/qmd-recall-cache.d.ts +1 -1
  476. package/dist/qmd.d.ts +102 -3
  477. package/dist/qmd.js +23 -5
  478. package/dist/recall-explain-renderer.js +3 -3
  479. package/dist/recall-xray-cli.js +4 -4
  480. package/dist/recall-xray-renderer.js +3 -3
  481. package/dist/recall-xray.js +2 -2
  482. package/dist/replay/normalizers/chatgpt.d.ts +6 -0
  483. package/dist/replay/normalizers/chatgpt.js +11 -0
  484. package/dist/replay/normalizers/chatgpt.js.map +1 -0
  485. package/dist/replay/normalizers/claude.d.ts +6 -0
  486. package/dist/replay/normalizers/claude.js +11 -0
  487. package/dist/replay/normalizers/claude.js.map +1 -0
  488. package/dist/replay/normalizers/openclaw.d.ts +6 -0
  489. package/dist/replay/normalizers/openclaw.js +11 -0
  490. package/dist/replay/normalizers/openclaw.js.map +1 -0
  491. package/dist/replay/normalizers/shared.d.ts +16 -0
  492. package/dist/replay/normalizers/shared.js +14 -0
  493. package/dist/replay/normalizers/shared.js.map +1 -0
  494. package/dist/replay/runner.d.ts +35 -0
  495. package/dist/replay/runner.js +16 -0
  496. package/dist/replay/runner.js.map +1 -0
  497. package/dist/replay/types.d.ts +57 -0
  498. package/dist/replay/types.js +19 -0
  499. package/dist/replay/types.js.map +1 -0
  500. package/dist/resolution-B7FNQSSP.js +12 -0
  501. package/dist/resolution-B7FNQSSP.js.map +1 -0
  502. package/dist/resolve-provider-secret.js +2 -2
  503. package/dist/resume-bundles.js +8 -6
  504. package/dist/retrieval-agents.d.ts +1 -1
  505. package/dist/routing/engine.d.ts +35 -0
  506. package/dist/routing/engine.js +16 -0
  507. package/dist/routing/engine.js.map +1 -0
  508. package/dist/routing/store.d.ts +27 -0
  509. package/dist/routing/store.js +10 -0
  510. package/dist/routing/store.js.map +1 -0
  511. package/dist/runtime/better-sqlite.d.ts +8 -0
  512. package/dist/runtime/better-sqlite.js +10 -0
  513. package/dist/runtime/better-sqlite.js.map +1 -0
  514. package/dist/runtime/child-process.d.ts +32 -0
  515. package/dist/runtime/child-process.js +10 -0
  516. package/dist/runtime/child-process.js.map +1 -0
  517. package/dist/runtime/env.d.ts +5 -0
  518. package/dist/runtime/env.js +12 -0
  519. package/dist/runtime/env.js.map +1 -0
  520. package/dist/schemas.d.ts +22 -22
  521. package/dist/sdk-compat.js +1 -1
  522. package/dist/search/document-scanner.d.ts +22 -0
  523. package/dist/search/document-scanner.js +8 -0
  524. package/dist/search/document-scanner.js.map +1 -0
  525. package/dist/search/embed-helper.d.ts +35 -0
  526. package/dist/search/embed-helper.js +9 -0
  527. package/dist/search/embed-helper.js.map +1 -0
  528. package/dist/search/factory.d.ts +32 -0
  529. package/dist/search/factory.js +29 -0
  530. package/dist/search/factory.js.map +1 -0
  531. package/dist/search/index.d.ts +15 -0
  532. package/dist/search/index.js +50 -0
  533. package/dist/search/index.js.map +1 -0
  534. package/dist/search/lancedb-backend.d.ts +51 -0
  535. package/dist/search/lancedb-backend.js +10 -0
  536. package/dist/search/lancedb-backend.js.map +1 -0
  537. package/dist/search/meilisearch-backend.d.ts +48 -0
  538. package/dist/search/meilisearch-backend.js +10 -0
  539. package/dist/search/meilisearch-backend.js.map +1 -0
  540. package/dist/search/noop-backend.d.ts +26 -0
  541. package/dist/search/noop-backend.js +8 -0
  542. package/dist/search/noop-backend.js.map +1 -0
  543. package/dist/search/orama-backend.d.ts +53 -0
  544. package/dist/search/orama-backend.js +10 -0
  545. package/dist/search/orama-backend.js.map +1 -0
  546. package/dist/search/port.d.ts +61 -0
  547. package/dist/search/port.js +1 -0
  548. package/dist/search/port.js.map +1 -0
  549. package/dist/search/remote-backend.d.ts +39 -0
  550. package/dist/search/remote-backend.js +9 -0
  551. package/dist/search/remote-backend.js.map +1 -0
  552. package/dist/secure-store/index.d.ts +890 -0
  553. package/dist/secure-store/index.js +156 -0
  554. package/dist/secure-store/index.js.map +1 -0
  555. package/dist/semantic-VwGI14Ok.d.ts +69 -0
  556. package/dist/semantic-consolidation-4HkHWgeI.d.ts +180 -0
  557. package/dist/semantic-consolidation.d.ts +2 -2
  558. package/dist/semantic-consolidation.js +13 -6
  559. package/dist/semantic-rule-promotion.js +8 -5
  560. package/dist/semantic-rule-verifier.js +8 -5
  561. package/dist/shared-context/manager.d.ts +131 -0
  562. package/dist/shared-context/manager.js +15 -0
  563. package/dist/shared-context/manager.js.map +1 -0
  564. package/dist/skills-registry.js +13 -1
  565. package/dist/skills-registry.js.map +1 -1
  566. package/dist/state-store-VZU2IA53.js +16 -0
  567. package/dist/state-store-VZU2IA53.js.map +1 -0
  568. package/dist/storage-paths.d.ts +9 -0
  569. package/dist/storage-paths.js +20 -0
  570. package/dist/storage-paths.js.map +1 -0
  571. package/dist/storage.d.ts +3 -1
  572. package/dist/storage.js +7 -4
  573. package/dist/summarizer.d.ts +5 -0
  574. package/dist/summarizer.js +9 -8
  575. package/dist/summary-snapshot.js +2 -1
  576. package/dist/surfaces/dreams.d.ts +16 -0
  577. package/dist/surfaces/dreams.js +282 -0
  578. package/dist/surfaces/dreams.js.map +1 -0
  579. package/dist/surfaces/heartbeat.d.ts +17 -0
  580. package/dist/surfaces/heartbeat.js +265 -0
  581. package/dist/surfaces/heartbeat.js.map +1 -0
  582. package/dist/temporal-supersession.d.ts +3 -1
  583. package/dist/threading.d.ts +5 -0
  584. package/dist/threading.js +2 -1
  585. package/dist/tier-migration.d.ts +4 -2
  586. package/dist/tokens.js +2 -2
  587. package/dist/transcript.d.ts +15 -1
  588. package/dist/transcript.js +2 -1
  589. package/dist/transfer/autodetect.d.ts +4 -0
  590. package/dist/transfer/autodetect.js +15 -0
  591. package/dist/transfer/autodetect.js.map +1 -0
  592. package/dist/transfer/backup.d.ts +21 -0
  593. package/dist/transfer/backup.js +17 -0
  594. package/dist/transfer/backup.js.map +1 -0
  595. package/dist/transfer/capsule-export.d.ts +113 -0
  596. package/dist/transfer/capsule-export.js +19 -0
  597. package/dist/transfer/capsule-export.js.map +1 -0
  598. package/dist/transfer/capsule-import.d.ts +124 -0
  599. package/dist/transfer/capsule-import.js +16 -0
  600. package/dist/transfer/capsule-import.js.map +1 -0
  601. package/dist/transfer/constants.d.ts +13 -0
  602. package/dist/transfer/constants.js +12 -0
  603. package/dist/transfer/constants.js.map +1 -0
  604. package/dist/transfer/export-json.d.ts +11 -0
  605. package/dist/transfer/export-json.js +11 -0
  606. package/dist/transfer/export-json.js.map +1 -0
  607. package/dist/transfer/export-md.d.ts +10 -0
  608. package/dist/transfer/export-md.js +13 -0
  609. package/dist/transfer/export-md.js.map +1 -0
  610. package/dist/transfer/export-sqlite.d.ts +9 -0
  611. package/dist/transfer/export-sqlite.js +12 -0
  612. package/dist/transfer/export-sqlite.js.map +1 -0
  613. package/dist/transfer/fs-utils.d.ts +61 -0
  614. package/dist/transfer/fs-utils.js +40 -0
  615. package/dist/transfer/fs-utils.js.map +1 -0
  616. package/dist/transfer/import-json.d.ts +16 -0
  617. package/dist/transfer/import-json.js +13 -0
  618. package/dist/transfer/import-json.js.map +1 -0
  619. package/dist/transfer/import-md.d.ts +14 -0
  620. package/dist/transfer/import-md.js +11 -0
  621. package/dist/transfer/import-md.js.map +1 -0
  622. package/dist/transfer/import-sqlite.d.ts +14 -0
  623. package/dist/transfer/import-sqlite.js +12 -0
  624. package/dist/transfer/import-sqlite.js.map +1 -0
  625. package/dist/transfer/sqlite-schema.d.ts +4 -0
  626. package/dist/transfer/sqlite-schema.js +10 -0
  627. package/dist/transfer/sqlite-schema.js.map +1 -0
  628. package/dist/transfer/types.d.ts +916 -0
  629. package/dist/transfer/types.js +30 -0
  630. package/dist/transfer/types.js.map +1 -0
  631. package/dist/types.d.ts +28 -1
  632. package/dist/types.js +1 -1
  633. package/dist/verified-recall.js +9 -6
  634. package/dist/work/board.d.ts +43 -0
  635. package/dist/work/board.js +14 -0
  636. package/dist/work/board.js.map +1 -0
  637. package/dist/work/boundary.d.ts +8 -0
  638. package/dist/work/boundary.js +14 -0
  639. package/dist/work/boundary.js.map +1 -0
  640. package/dist/work/storage.d.ts +39 -0
  641. package/dist/work/storage.js +11 -0
  642. package/dist/work/storage.js.map +1 -0
  643. package/dist/work/types.d.ts +75 -0
  644. package/dist/work/types.js +1 -0
  645. package/dist/work/types.js.map +1 -0
  646. package/package.json +2767 -6
  647. package/scripts/faiss_index.py +816 -0
  648. package/scripts/faiss_requirements.txt +3 -0
  649. package/skills/remnic-entities/SKILL.md +51 -0
  650. package/skills/remnic-memory-workflow/SKILL.md +61 -0
  651. package/skills/remnic-recall/SKILL.md +51 -0
  652. package/skills/remnic-remember/SKILL.md +56 -0
  653. package/skills/remnic-search/SKILL.md +51 -0
  654. package/skills/remnic-status/SKILL.md +51 -0
  655. package/src/abort-error.test.ts +49 -0
  656. package/src/abort-error.ts +46 -0
  657. package/src/abstraction-nodes.ts +162 -0
  658. package/src/access-audit.test.ts +178 -0
  659. package/src/access-audit.ts +125 -0
  660. package/src/access-cli.test.ts +439 -0
  661. package/src/access-cli.ts +438 -0
  662. package/src/access-http.test.ts +225 -0
  663. package/src/access-http.ts +1899 -0
  664. package/src/access-idempotency.ts +232 -0
  665. package/src/access-mcp.test.ts +568 -0
  666. package/src/access-mcp.ts +3056 -0
  667. package/src/access-schema-pi.test.ts +60 -0
  668. package/src/access-schema.ts +522 -0
  669. package/src/access-service-namespace.test.ts +123 -0
  670. package/src/access-service.ts +5629 -0
  671. package/src/action-confidence.test.ts +206 -0
  672. package/src/action-confidence.ts +466 -0
  673. package/src/active-memory-bridge.test.ts +285 -0
  674. package/src/active-memory-bridge.ts +217 -0
  675. package/src/active-recall.test.ts +484 -0
  676. package/src/active-recall.ts +459 -0
  677. package/src/adapters/claude-code.ts +56 -0
  678. package/src/adapters/codex.ts +57 -0
  679. package/src/adapters/hermes.ts +64 -0
  680. package/src/adapters/index.ts +6 -0
  681. package/src/adapters/registry.ts +41 -0
  682. package/src/adapters/replit.ts +55 -0
  683. package/src/adapters/types.ts +51 -0
  684. package/src/behavior-learner.ts +144 -0
  685. package/src/behavior-signals.ts +73 -0
  686. package/src/binary-lifecycle/backend.ts +117 -0
  687. package/src/binary-lifecycle/index.ts +35 -0
  688. package/src/binary-lifecycle/manifest.ts +79 -0
  689. package/src/binary-lifecycle/pipeline.ts +352 -0
  690. package/src/binary-lifecycle/scanner.ts +89 -0
  691. package/src/binary-lifecycle/types.ts +89 -0
  692. package/src/bootstrap.ts +178 -0
  693. package/src/boxes.ts +521 -0
  694. package/src/briefing.test.ts +1535 -0
  695. package/src/briefing.ts +1382 -0
  696. package/src/buffer-session.test.ts +443 -0
  697. package/src/buffer-surprise-report.ts +176 -0
  698. package/src/buffer-surprise-telemetry.test.ts +606 -0
  699. package/src/buffer-surprise-trigger.test.ts +766 -0
  700. package/src/buffer-surprise.test.ts +339 -0
  701. package/src/buffer-surprise.ts +203 -0
  702. package/src/buffer.ts +900 -0
  703. package/src/bulk-import/cli-command.test.ts +204 -0
  704. package/src/bulk-import/index.ts +34 -0
  705. package/src/bulk-import/pipeline.test.ts +445 -0
  706. package/src/bulk-import/pipeline.ts +178 -0
  707. package/src/bulk-import/registry.test.ts +151 -0
  708. package/src/bulk-import/registry.ts +72 -0
  709. package/src/bulk-import/types.test.ts +272 -0
  710. package/src/bulk-import/types.ts +145 -0
  711. package/src/calibration.ts +394 -0
  712. package/src/capsule-cli.test.ts +398 -0
  713. package/src/capsule-cli.ts +565 -0
  714. package/src/causal-behavior.ts +308 -0
  715. package/src/causal-chain.ts +419 -0
  716. package/src/causal-consolidation.ts +370 -0
  717. package/src/causal-retrieval.ts +286 -0
  718. package/src/causal-trajectory-graph.ts +60 -0
  719. package/src/causal-trajectory.ts +303 -0
  720. package/src/chunking.ts +220 -0
  721. package/src/citations.ts +232 -0
  722. package/src/cli.ts +9403 -0
  723. package/src/codex-cli-fallback.ts +162 -0
  724. package/src/codex-thread-key.ts +1 -0
  725. package/src/coding/access-coding-context.test.ts +197 -0
  726. package/src/coding/coding-branch-scope.test.ts +281 -0
  727. package/src/coding/coding-namespace.test.ts +360 -0
  728. package/src/coding/coding-namespace.ts +412 -0
  729. package/src/coding/coding-orchestrator.test.ts +249 -0
  730. package/src/coding/git-context.test.ts +507 -0
  731. package/src/coding/git-context.ts +336 -0
  732. package/src/coding/mcp-set-coding-context.test.ts +174 -0
  733. package/src/coding/review-context.test.ts +316 -0
  734. package/src/coding/review-context.ts +349 -0
  735. package/src/coding/wire-coding-context.test.ts +468 -0
  736. package/src/commitment-ledger.test.ts +78 -0
  737. package/src/commitment-ledger.ts +337 -0
  738. package/src/compat/checks.test.ts +206 -0
  739. package/src/compat/checks.ts +716 -0
  740. package/src/compat/types.ts +33 -0
  741. package/src/compounding/engine.ts +1686 -0
  742. package/src/compounding/preference-consolidator.ts +778 -0
  743. package/src/compression-optimizer.ts +312 -0
  744. package/src/config.test.ts +930 -0
  745. package/src/config.ts +3807 -0
  746. package/src/connectors/codex/instructions.md +160 -0
  747. package/src/connectors/codex/resources/namespace-cheatsheet.md +48 -0
  748. package/src/connectors/codex-marketplace.ts +500 -0
  749. package/src/connectors/codex-materialize-runner.ts +212 -0
  750. package/src/connectors/codex-materialize.ts +983 -0
  751. package/src/connectors/coerce.ts +62 -0
  752. package/src/connectors/index.test.ts +1570 -0
  753. package/src/connectors/index.ts +3222 -0
  754. package/src/connectors/live/framework.ts +164 -0
  755. package/src/connectors/live/github.test.ts +1218 -0
  756. package/src/connectors/live/github.ts +1068 -0
  757. package/src/connectors/live/gmail.test.ts +1706 -0
  758. package/src/connectors/live/gmail.ts +1293 -0
  759. package/src/connectors/live/google-drive.test.ts +696 -0
  760. package/src/connectors/live/google-drive.ts +724 -0
  761. package/src/connectors/live/index.ts +101 -0
  762. package/src/connectors/live/live-connectors.test.ts +689 -0
  763. package/src/connectors/live/notion.test.ts +1109 -0
  764. package/src/connectors/live/notion.ts +978 -0
  765. package/src/connectors/live/registry.ts +103 -0
  766. package/src/connectors/live/state-store.ts +399 -0
  767. package/src/connectors/live/transient-errors.ts +150 -0
  768. package/src/connectors/weclone-installer.test.ts +850 -0
  769. package/src/connectors-cli.ts +513 -0
  770. package/src/console/state.test.ts +224 -0
  771. package/src/console/state.ts +514 -0
  772. package/src/console/trace.test.ts +813 -0
  773. package/src/console/trace.ts +603 -0
  774. package/src/console/tui.test.ts +582 -0
  775. package/src/console/tui.ts +508 -0
  776. package/src/consolidation-operator.ts +182 -0
  777. package/src/consolidation-provenance-check.ts +551 -0
  778. package/src/consolidation-undo.ts +718 -0
  779. package/src/contradiction/contradiction-judge.test.ts +189 -0
  780. package/src/contradiction/contradiction-judge.ts +333 -0
  781. package/src/contradiction/contradiction-review.ts +574 -0
  782. package/src/contradiction/contradiction-scan.ts +504 -0
  783. package/src/contradiction/contradiction.test.ts +2230 -0
  784. package/src/contradiction/index.ts +37 -0
  785. package/src/contradiction/resolution.ts +383 -0
  786. package/src/conversation-index/backend.ts +323 -0
  787. package/src/conversation-index/chunker.ts +47 -0
  788. package/src/conversation-index/cleanup.ts +53 -0
  789. package/src/conversation-index/faiss-adapter.ts +384 -0
  790. package/src/conversation-index/indexer.test.ts +164 -0
  791. package/src/conversation-index/indexer.ts +192 -0
  792. package/src/conversation-index/search.ts +37 -0
  793. package/src/cross-namespace-budget.test.ts +275 -0
  794. package/src/cross-namespace-budget.ts +365 -0
  795. package/src/cue-anchors.ts +163 -0
  796. package/src/curation/index.ts +544 -0
  797. package/src/dashboard-runtime.ts +337 -0
  798. package/src/day-summary.ts +122 -0
  799. package/src/dedup/index.ts +330 -0
  800. package/src/dedup/semantic.test.ts +1577 -0
  801. package/src/dedup/semantic.ts +148 -0
  802. package/src/delinearize.ts +193 -0
  803. package/src/direct-answer-wiring.test.ts +473 -0
  804. package/src/direct-answer-wiring.ts +180 -0
  805. package/src/direct-answer.test.ts +484 -0
  806. package/src/direct-answer.ts +273 -0
  807. package/src/embedding-fallback.ts +565 -0
  808. package/src/enrichment/audit.ts +89 -0
  809. package/src/enrichment/index.ts +27 -0
  810. package/src/enrichment/pipeline.ts +197 -0
  811. package/src/enrichment/provider-registry.ts +85 -0
  812. package/src/enrichment/types.ts +100 -0
  813. package/src/enrichment/web-search-provider.ts +63 -0
  814. package/src/entity-retrieval.ts +774 -0
  815. package/src/entity-schema.ts +239 -0
  816. package/src/evals.ts +1312 -0
  817. package/src/event-order-recall.test.ts +4164 -0
  818. package/src/event-order-recall.ts +2802 -0
  819. package/src/evidence-pack.test.ts +89 -0
  820. package/src/evidence-pack.ts +388 -0
  821. package/src/explicit-capture.ts +530 -0
  822. package/src/explicit-cue-recall.test.ts +3019 -0
  823. package/src/explicit-cue-recall.ts +5545 -0
  824. package/src/extraction-judge-telemetry.ts +234 -0
  825. package/src/extraction-judge-training.ts +221 -0
  826. package/src/extraction-judge.ts +846 -0
  827. package/src/extraction-timeout.test.ts +265 -0
  828. package/src/extraction.ts +2719 -0
  829. package/src/fallback-llm.test.ts +1060 -0
  830. package/src/fallback-llm.ts +918 -0
  831. package/src/focused-list-recall.test.ts +734 -0
  832. package/src/focused-list-recall.ts +1160 -0
  833. package/src/graph-dashboard-diff.ts +35 -0
  834. package/src/graph-dashboard-key.ts +5 -0
  835. package/src/graph-dashboard-parser.ts +104 -0
  836. package/src/graph-edge-reinforcement.ts +192 -0
  837. package/src/graph-events.ts +151 -0
  838. package/src/graph-recall.test.ts +164 -0
  839. package/src/graph-recall.ts +189 -0
  840. package/src/graph-retrieval.test.ts +809 -0
  841. package/src/graph-retrieval.ts +823 -0
  842. package/src/graph-snapshot.ts +329 -0
  843. package/src/graph.ts +813 -0
  844. package/src/harmonic-retrieval.ts +223 -0
  845. package/src/himem.ts +154 -0
  846. package/src/hygiene.ts +87 -0
  847. package/src/identity-continuity.ts +333 -0
  848. package/src/importance.ts +328 -0
  849. package/src/importers/base.test.ts +294 -0
  850. package/src/importers/base.ts +436 -0
  851. package/src/importers/index.ts +21 -0
  852. package/src/index.ts +1204 -0
  853. package/src/intent.ts +154 -0
  854. package/src/json-extract.ts +85 -0
  855. package/src/json-store.ts +42 -0
  856. package/src/lcm/archive.ts +617 -0
  857. package/src/lcm/dag.ts +199 -0
  858. package/src/lcm/engine.ts +645 -0
  859. package/src/lcm/index.ts +7 -0
  860. package/src/lcm/queue.test.ts +178 -0
  861. package/src/lcm/queue.ts +200 -0
  862. package/src/lcm/recall.ts +117 -0
  863. package/src/lcm/schema.ts +154 -0
  864. package/src/lcm/summarizer.ts +235 -0
  865. package/src/lcm/tools.ts +191 -0
  866. package/src/lcm-engine.test.ts +660 -0
  867. package/src/legacy-hook-compat.test.ts +20 -0
  868. package/src/legacy-hook-compat.ts +45 -0
  869. package/src/lifecycle.ts +289 -0
  870. package/src/live-connectors-runner.ts +385 -0
  871. package/src/local-llm-qos.test.ts +303 -0
  872. package/src/local-llm-thinking.test.ts +292 -0
  873. package/src/local-llm.ts +1464 -0
  874. package/src/logger.ts +49 -0
  875. package/src/maintenance/archive-observations.ts +147 -0
  876. package/src/maintenance/backup-stamp.ts +3 -0
  877. package/src/maintenance/dreams-ledger.ts +516 -0
  878. package/src/maintenance/first-start-migration.ts +362 -0
  879. package/src/maintenance/forget.test.ts +206 -0
  880. package/src/maintenance/forget.ts +126 -0
  881. package/src/maintenance/graph-edge-decay.test.ts +409 -0
  882. package/src/maintenance/graph-edge-decay.ts +394 -0
  883. package/src/maintenance/memory-governance-cron.ts +447 -0
  884. package/src/maintenance/memory-governance.ts +1039 -0
  885. package/src/maintenance/migrate-observations.ts +216 -0
  886. package/src/maintenance/observation-ledger-utils.ts +54 -0
  887. package/src/maintenance/pattern-reinforcement.test.ts +875 -0
  888. package/src/maintenance/pattern-reinforcement.ts +369 -0
  889. package/src/maintenance/purge.ts +334 -0
  890. package/src/maintenance/rebuild-memory-lifecycle-ledger.ts +78 -0
  891. package/src/maintenance/rebuild-memory-projection.ts +1234 -0
  892. package/src/maintenance/rebuild-observations.ts +178 -0
  893. package/src/maintenance/tier-stats.test.ts +378 -0
  894. package/src/maintenance/tier-stats.ts +222 -0
  895. package/src/mcp-memory-inspector-app.ts +421 -0
  896. package/src/memory-action-policy.ts +80 -0
  897. package/src/memory-cache.ts +208 -0
  898. package/src/memory-extension/claude-code-publisher.ts +51 -0
  899. package/src/memory-extension/codex-publisher.ts +149 -0
  900. package/src/memory-extension/hermes-publisher.ts +51 -0
  901. package/src/memory-extension/index.ts +100 -0
  902. package/src/memory-extension/shared-instructions.ts +133 -0
  903. package/src/memory-extension/types.ts +86 -0
  904. package/src/memory-extension-host/host-discovery.ts +276 -0
  905. package/src/memory-extension-host/index.ts +14 -0
  906. package/src/memory-extension-host/render-extensions-block.ts +73 -0
  907. package/src/memory-extension-host/types.ts +21 -0
  908. package/src/memory-lifecycle-ledger-utils.ts +116 -0
  909. package/src/memory-projection-format.ts +11 -0
  910. package/src/memory-projection-store.ts +951 -0
  911. package/src/memory-provenance.test.ts +196 -0
  912. package/src/memory-provenance.ts +484 -0
  913. package/src/memory-worth-bench.test.ts +71 -0
  914. package/src/memory-worth-bench.ts +265 -0
  915. package/src/memory-worth-filter.test.ts +209 -0
  916. package/src/memory-worth-filter.ts +204 -0
  917. package/src/memory-worth-frontmatter.test.ts +311 -0
  918. package/src/memory-worth-outcomes.test.ts +316 -0
  919. package/src/memory-worth-outcomes.ts +286 -0
  920. package/src/memory-worth.test.ts +317 -0
  921. package/src/memory-worth.ts +215 -0
  922. package/src/message-parts/index.ts +806 -0
  923. package/src/message-parts/message-parts.test.ts +421 -0
  924. package/src/migrate/from-engram.ts +789 -0
  925. package/src/model-registry.ts +313 -0
  926. package/src/models-json.ts +76 -0
  927. package/src/namespaces/migrate.ts +187 -0
  928. package/src/namespaces/path.ts +25 -0
  929. package/src/namespaces/principal.test.ts +195 -0
  930. package/src/namespaces/principal.ts +86 -0
  931. package/src/namespaces/search.test.ts +105 -0
  932. package/src/namespaces/search.ts +233 -0
  933. package/src/namespaces/storage.ts +74 -0
  934. package/src/native-knowledge.ts +1823 -0
  935. package/src/negative.ts +72 -0
  936. package/src/network/tailscale.ts +179 -0
  937. package/src/network/webdav.ts +385 -0
  938. package/src/objective-state-writers.ts +951 -0
  939. package/src/objective-state.ts +320 -0
  940. package/src/onboarding/index.ts +529 -0
  941. package/src/openai-chat-compat.ts +56 -0
  942. package/src/operator-toolkit.ts +2132 -0
  943. package/src/opik-exporter.test.ts +72 -0
  944. package/src/opik-exporter.ts +587 -0
  945. package/src/orchestrator-extraction-queue.test.ts +197 -0
  946. package/src/orchestrator-flush.test.ts +1171 -0
  947. package/src/orchestrator-pattern-reinforcement.test.ts +128 -0
  948. package/src/orchestrator-source-attribution.test.ts +701 -0
  949. package/src/orchestrator.ts +16368 -0
  950. package/src/page-versioning.ts +450 -0
  951. package/src/patterns-cli.ts +574 -0
  952. package/src/peers/index.ts +54 -0
  953. package/src/peers/migrate-from-identity-anchor.test.ts +291 -0
  954. package/src/peers/migrate-from-identity-anchor.ts +350 -0
  955. package/src/peers/peers.test.ts +419 -0
  956. package/src/peers/profile-reasoner.ts +694 -0
  957. package/src/peers/storage.ts +1350 -0
  958. package/src/peers/types.ts +138 -0
  959. package/src/plugin-id.ts +84 -0
  960. package/src/policy-runtime.ts +209 -0
  961. package/src/procedural/procedure-miner.ts +150 -0
  962. package/src/procedural/procedure-recall.ts +93 -0
  963. package/src/procedural/procedure-stats.ts +213 -0
  964. package/src/procedural/procedure-types.ts +132 -0
  965. package/src/procedural/reinforcement-core.test.ts +132 -0
  966. package/src/procedural/reinforcement-core.ts +73 -0
  967. package/src/profiling.test.ts +263 -0
  968. package/src/profiling.ts +435 -0
  969. package/src/projection/index.ts +398 -0
  970. package/src/qmd-recall-cache.test.ts +138 -0
  971. package/src/qmd-recall-cache.ts +111 -0
  972. package/src/qmd.test.ts +258 -0
  973. package/src/qmd.ts +2614 -0
  974. package/src/reasoning-trace-recall.ts +201 -0
  975. package/src/reasoning-trace-types.ts +235 -0
  976. package/src/recall-audit-anomaly.test.ts +246 -0
  977. package/src/recall-audit-anomaly.ts +297 -0
  978. package/src/recall-audit.test.ts +51 -0
  979. package/src/recall-audit.ts +72 -0
  980. package/src/recall-budget-config.test.ts +87 -0
  981. package/src/recall-disclosure-escalation.test.ts +196 -0
  982. package/src/recall-disclosure-escalation.ts +158 -0
  983. package/src/recall-disclosure-shaping.test.ts +146 -0
  984. package/src/recall-disclosure.test.ts +214 -0
  985. package/src/recall-explain-renderer.test.ts +140 -0
  986. package/src/recall-explain-renderer.ts +356 -0
  987. package/src/recall-mmr.test.ts +808 -0
  988. package/src/recall-mmr.ts +607 -0
  989. package/src/recall-qos.test.ts +85 -0
  990. package/src/recall-qos.ts +82 -0
  991. package/src/recall-query-policy.ts +221 -0
  992. package/src/recall-state.test.ts +233 -0
  993. package/src/recall-state.ts +456 -0
  994. package/src/recall-tag-filter.ts +143 -0
  995. package/src/recall-tokenization.ts +35 -0
  996. package/src/recall-xray-cli.test.ts +118 -0
  997. package/src/recall-xray-cli.ts +100 -0
  998. package/src/recall-xray-disclosure-telemetry.test.ts +183 -0
  999. package/src/recall-xray-renderer.test.ts +539 -0
  1000. package/src/recall-xray-renderer.ts +487 -0
  1001. package/src/recall-xray.test.ts +503 -0
  1002. package/src/recall-xray.ts +621 -0
  1003. package/src/reconstruct.ts +41 -0
  1004. package/src/release-changelog.ts +35 -0
  1005. package/src/relevance.ts +67 -0
  1006. package/src/replay/normalizers/chatgpt.ts +133 -0
  1007. package/src/replay/normalizers/claude.ts +102 -0
  1008. package/src/replay/normalizers/openclaw.ts +119 -0
  1009. package/src/replay/normalizers/shared.ts +69 -0
  1010. package/src/replay/runner.ts +197 -0
  1011. package/src/replay/types.ts +143 -0
  1012. package/src/rerank.test.ts +48 -0
  1013. package/src/rerank.ts +176 -0
  1014. package/src/resolve-auth-token.test.ts +226 -0
  1015. package/src/resolve-auth-token.ts +151 -0
  1016. package/src/resolve-provider-secret.test.ts +187 -0
  1017. package/src/resolve-provider-secret.ts +410 -0
  1018. package/src/response-guidance-recall.test.ts +3952 -0
  1019. package/src/response-guidance-recall.ts +4431 -0
  1020. package/src/resume-bundles.ts +415 -0
  1021. package/src/retrieval-agents.ts +623 -0
  1022. package/src/retrieval-tiers.ts +25 -0
  1023. package/src/retrieval.ts +104 -0
  1024. package/src/review/index.test.ts +201 -0
  1025. package/src/review/index.ts +536 -0
  1026. package/src/routing/engine.ts +162 -0
  1027. package/src/routing/store.ts +321 -0
  1028. package/src/runtime/better-sqlite.test.ts +32 -0
  1029. package/src/runtime/better-sqlite.ts +76 -0
  1030. package/src/runtime/child-process.ts +67 -0
  1031. package/src/runtime/env.ts +48 -0
  1032. package/src/sanitize.ts +58 -0
  1033. package/src/schemas.ts +449 -0
  1034. package/src/sdk-compat.ts +87 -0
  1035. package/src/search/document-scanner.ts +96 -0
  1036. package/src/search/embed-helper.ts +142 -0
  1037. package/src/search/factory.ts +189 -0
  1038. package/src/search/index.ts +10 -0
  1039. package/src/search/lancedb-backend.ts +342 -0
  1040. package/src/search/meilisearch-backend.ts +232 -0
  1041. package/src/search/noop-backend.ts +57 -0
  1042. package/src/search/orama-backend.ts +358 -0
  1043. package/src/search/port.ts +86 -0
  1044. package/src/search/remote-backend.ts +124 -0
  1045. package/src/secure-store/cipher.ts +271 -0
  1046. package/src/secure-store/cli-handlers.ts +355 -0
  1047. package/src/secure-store/cli-renderer.ts +131 -0
  1048. package/src/secure-store/header.ts +373 -0
  1049. package/src/secure-store/index.ts +137 -0
  1050. package/src/secure-store/kdf.ts +263 -0
  1051. package/src/secure-store/keyring.ts +106 -0
  1052. package/src/secure-store/metadata.ts +394 -0
  1053. package/src/secure-store/passphrase-reader.ts +252 -0
  1054. package/src/secure-store/secure-fs.ts +571 -0
  1055. package/src/secure-store/secure-store.test.ts +755 -0
  1056. package/src/semantic-chunking.ts +545 -0
  1057. package/src/semantic-consolidation.test.ts +182 -0
  1058. package/src/semantic-consolidation.ts +432 -0
  1059. package/src/semantic-rule-promotion.ts +183 -0
  1060. package/src/semantic-rule-verifier.ts +160 -0
  1061. package/src/session-integrity.ts +569 -0
  1062. package/src/session-observer-bands.ts +11 -0
  1063. package/src/session-observer-state.ts +346 -0
  1064. package/src/session-toggles.test.ts +96 -0
  1065. package/src/session-toggles.ts +159 -0
  1066. package/src/shared-context/manager.ts +810 -0
  1067. package/src/signal.ts +84 -0
  1068. package/src/skills-registry.test.ts +277 -0
  1069. package/src/skills-registry.ts +120 -0
  1070. package/src/source-attribution-roundtrip.test.ts +215 -0
  1071. package/src/source-attribution.test.ts +1425 -0
  1072. package/src/source-attribution.ts +639 -0
  1073. package/src/spaces/index.ts +627 -0
  1074. package/src/storage-paths.ts +117 -0
  1075. package/src/storage.ts +6657 -0
  1076. package/src/store-contract.ts +55 -0
  1077. package/src/summarizer.ts +844 -0
  1078. package/src/summary-snapshot.test.ts +681 -0
  1079. package/src/summary-snapshot.ts +238 -0
  1080. package/src/surfaces/dreams.test.ts +394 -0
  1081. package/src/surfaces/dreams.ts +346 -0
  1082. package/src/surfaces/heartbeat.test.ts +415 -0
  1083. package/src/surfaces/heartbeat.ts +325 -0
  1084. package/src/sync/index.ts +308 -0
  1085. package/src/targeted-fact-recall.test.ts +1694 -0
  1086. package/src/targeted-fact-recall.ts +2905 -0
  1087. package/src/taxonomy/default-taxonomy.ts +87 -0
  1088. package/src/taxonomy/index.ts +26 -0
  1089. package/src/taxonomy/resolver-doc-generator.ts +57 -0
  1090. package/src/taxonomy/resolver.ts +184 -0
  1091. package/src/taxonomy/taxonomy-loader.ts +186 -0
  1092. package/src/taxonomy/types.ts +48 -0
  1093. package/src/telemetry-transcript.ts +70 -0
  1094. package/src/temporal-index.ts +890 -0
  1095. package/src/temporal-supersession.test.ts +2703 -0
  1096. package/src/temporal-supersession.ts +493 -0
  1097. package/src/temporal-validity.test.ts +448 -0
  1098. package/src/temporal-validity.ts +123 -0
  1099. package/src/threading.ts +395 -0
  1100. package/src/tier-migration.ts +124 -0
  1101. package/src/tier-routing.ts +102 -0
  1102. package/src/tmt.ts +462 -0
  1103. package/src/tokens.test.ts +178 -0
  1104. package/src/tokens.ts +279 -0
  1105. package/src/topics.ts +147 -0
  1106. package/src/training-export/cli-date-validation.test.ts +258 -0
  1107. package/src/training-export/converter.test.ts +452 -0
  1108. package/src/training-export/converter.ts +319 -0
  1109. package/src/training-export/date-parse.ts +117 -0
  1110. package/src/training-export/index.ts +26 -0
  1111. package/src/training-export/registry.test.ts +85 -0
  1112. package/src/training-export/registry.ts +57 -0
  1113. package/src/training-export/types.ts +31 -0
  1114. package/src/transcript.ts +1179 -0
  1115. package/src/transfer/autodetect.ts +30 -0
  1116. package/src/transfer/backup.ts +138 -0
  1117. package/src/transfer/capsule-crypto.ts +485 -0
  1118. package/src/transfer/capsule-encrypt.test.ts +690 -0
  1119. package/src/transfer/capsule-export.ts +543 -0
  1120. package/src/transfer/capsule-fork.ts +375 -0
  1121. package/src/transfer/capsule-import.ts +564 -0
  1122. package/src/transfer/capsule-merge.ts +433 -0
  1123. package/src/transfer/conflict-policy.ts +16 -0
  1124. package/src/transfer/constants.ts +13 -0
  1125. package/src/transfer/exclusions.ts +37 -0
  1126. package/src/transfer/export-json.ts +65 -0
  1127. package/src/transfer/export-md.ts +59 -0
  1128. package/src/transfer/export-sqlite.ts +52 -0
  1129. package/src/transfer/fs-utils.ts +269 -0
  1130. package/src/transfer/import-json.ts +108 -0
  1131. package/src/transfer/import-md.ts +84 -0
  1132. package/src/transfer/import-sqlite.ts +100 -0
  1133. package/src/transfer/integrity.ts +71 -0
  1134. package/src/transfer/sqlite-schema.ts +16 -0
  1135. package/src/transfer/types.ts +297 -0
  1136. package/src/trust-zones.ts +1186 -0
  1137. package/src/types.ts +3074 -0
  1138. package/src/user-model.test.ts +124 -0
  1139. package/src/user-model.ts +162 -0
  1140. package/src/utility-learner.ts +353 -0
  1141. package/src/utility-runtime.ts +88 -0
  1142. package/src/utility-telemetry.ts +215 -0
  1143. package/src/utils/category-dir.ts +44 -0
  1144. package/src/utils/errno.ts +6 -0
  1145. package/src/utils/iso-timestamp.test.ts +37 -0
  1146. package/src/utils/iso-timestamp.ts +164 -0
  1147. package/src/utils/path.ts +26 -0
  1148. package/src/verified-recall.ts +138 -0
  1149. package/src/version-utils.test.ts +10 -0
  1150. package/src/version-utils.ts +9 -0
  1151. package/src/whitespace.ts +10 -0
  1152. package/src/work/board.ts +359 -0
  1153. package/src/work/boundary.ts +107 -0
  1154. package/src/work/storage.ts +436 -0
  1155. package/src/work/types.ts +82 -0
  1156. package/src/work-product-ledger.ts +265 -0
  1157. package/dist/access-service-DDjzFALq.d.ts +0 -2088
  1158. package/dist/capsule-crypto-SJS5VVAP.js +0 -18
  1159. package/dist/capsule-export-7QNCBZOQ.js +0 -17
  1160. package/dist/capsule-import-EPBHD2EN.js +0 -16
  1161. package/dist/capsule-merge-DI7PNQ2H.js +0 -189
  1162. package/dist/chunk-23ZZK64Y.js +0 -26
  1163. package/dist/chunk-23ZZK64Y.js.map +0 -1
  1164. package/dist/chunk-242S3I2A.js +0 -647
  1165. package/dist/chunk-2LGMW3DJ.js +0 -111
  1166. package/dist/chunk-3B6KIRBH.js +0 -5213
  1167. package/dist/chunk-3B6KIRBH.js.map +0 -1
  1168. package/dist/chunk-457A4P3L.js +0 -119
  1169. package/dist/chunk-457A4P3L.js.map +0 -1
  1170. package/dist/chunk-4IS4SXIQ.js +0 -2040
  1171. package/dist/chunk-4YM32CRU.js +0 -721
  1172. package/dist/chunk-6TBWYBJ3.js +0 -236
  1173. package/dist/chunk-74EMIVE4.js +0 -329
  1174. package/dist/chunk-74EMIVE4.js.map +0 -1
  1175. package/dist/chunk-767ODGE6.js +0 -183
  1176. package/dist/chunk-7V22HTMD.js +0 -623
  1177. package/dist/chunk-7V22HTMD.js.map +0 -1
  1178. package/dist/chunk-7ZM3BFKK.js +0 -9705
  1179. package/dist/chunk-7ZM3BFKK.js.map +0 -1
  1180. package/dist/chunk-AQJNPMOA.js +0 -643
  1181. package/dist/chunk-AQJNPMOA.js.map +0 -1
  1182. package/dist/chunk-ASAITVLA.js +0 -64
  1183. package/dist/chunk-ASAITVLA.js.map +0 -1
  1184. package/dist/chunk-BBE34QBJ.js +0 -275
  1185. package/dist/chunk-BBE34QBJ.js.map +0 -1
  1186. package/dist/chunk-BZSQEPRW.js +0 -14710
  1187. package/dist/chunk-BZSQEPRW.js.map +0 -1
  1188. package/dist/chunk-CPKTBRS2.js +0 -891
  1189. package/dist/chunk-CPKTBRS2.js.map +0 -1
  1190. package/dist/chunk-D4GAOFF6.js +0 -562
  1191. package/dist/chunk-D4GAOFF6.js.map +0 -1
  1192. package/dist/chunk-D54LZC5L.js +0 -147
  1193. package/dist/chunk-DF3RVK3X.js +0 -119
  1194. package/dist/chunk-DF3RVK3X.js.map +0 -1
  1195. package/dist/chunk-DZZPC36E.js +0 -1451
  1196. package/dist/chunk-DZZPC36E.js.map +0 -1
  1197. package/dist/chunk-E2UCDP5S.js +0 -570
  1198. package/dist/chunk-E6K4NIEU.js +0 -747
  1199. package/dist/chunk-E6K4NIEU.js.map +0 -1
  1200. package/dist/chunk-EEQLFRUM.js +0 -89
  1201. package/dist/chunk-ETOW6ACV.js +0 -158
  1202. package/dist/chunk-ETOW6ACV.js.map +0 -1
  1203. package/dist/chunk-FMEBPEAO.js +0 -347
  1204. package/dist/chunk-FMEBPEAO.js.map +0 -1
  1205. package/dist/chunk-FQDPCE3I.js +0 -1837
  1206. package/dist/chunk-FQDPCE3I.js.map +0 -1
  1207. package/dist/chunk-FYIYMQ5N.js +0 -221
  1208. package/dist/chunk-FYIYMQ5N.js.map +0 -1
  1209. package/dist/chunk-G2WADRQ3.js +0 -219
  1210. package/dist/chunk-G4SK7DSQ.js +0 -121
  1211. package/dist/chunk-GVPWB7EY.js +0 -390
  1212. package/dist/chunk-GVPWB7EY.js.map +0 -1
  1213. package/dist/chunk-HELQZFZO.js +0 -1075
  1214. package/dist/chunk-HL5LRPNA.js +0 -1914
  1215. package/dist/chunk-HL5LRPNA.js.map +0 -1
  1216. package/dist/chunk-HQZVVSVB.js +0 -147
  1217. package/dist/chunk-HQZVVSVB.js.map +0 -1
  1218. package/dist/chunk-HY3L4WKC.js +0 -2195
  1219. package/dist/chunk-HY3L4WKC.js.map +0 -1
  1220. package/dist/chunk-IB3BFHGN.js +0 -228
  1221. package/dist/chunk-IXEJRKCZ.js +0 -18
  1222. package/dist/chunk-JBMSGZEQ.js +0 -441
  1223. package/dist/chunk-JBMSGZEQ.js.map +0 -1
  1224. package/dist/chunk-JESOB2HO.js +0 -108
  1225. package/dist/chunk-JKDVIE52.js +0 -272
  1226. package/dist/chunk-JRNQ3RNA.js +0 -284
  1227. package/dist/chunk-JRNQ3RNA.js.map +0 -1
  1228. package/dist/chunk-K6WK37A6.js +0 -865
  1229. package/dist/chunk-K6WK37A6.js.map +0 -1
  1230. package/dist/chunk-MARWOCVP.js +0 -48
  1231. package/dist/chunk-MNU6ZBWT.js +0 -4454
  1232. package/dist/chunk-MNU6ZBWT.js.map +0 -1
  1233. package/dist/chunk-N5AKDXAI.js +0 -74
  1234. package/dist/chunk-OA3L7BFR.js +0 -183
  1235. package/dist/chunk-OA3L7BFR.js.map +0 -1
  1236. package/dist/chunk-OR64ZGRZ.js +0 -23
  1237. package/dist/chunk-P77UEOU2.js +0 -1521
  1238. package/dist/chunk-P77UEOU2.js.map +0 -1
  1239. package/dist/chunk-PH4C2U43.js +0 -239
  1240. package/dist/chunk-PH4C2U43.js.map +0 -1
  1241. package/dist/chunk-RVPLBATS.js +0 -1586
  1242. package/dist/chunk-RVPLBATS.js.map +0 -1
  1243. package/dist/chunk-U5JMRGKX.js +0 -340
  1244. package/dist/chunk-U5JMRGKX.js.map +0 -1
  1245. package/dist/chunk-URB2WSKZ.js +0 -350
  1246. package/dist/chunk-URB2WSKZ.js.map +0 -1
  1247. package/dist/chunk-UVMUAWVT.js +0 -596
  1248. package/dist/chunk-WEJG4TB5.js +0 -118
  1249. package/dist/chunk-X7HPGUVG.js +0 -271
  1250. package/dist/chunk-XAMBKFQS.js +0 -2777
  1251. package/dist/chunk-XAMBKFQS.js.map +0 -1
  1252. package/dist/chunk-XJKFSSDW.js +0 -726
  1253. package/dist/chunk-XJKFSSDW.js.map +0 -1
  1254. package/dist/chunk-XMHBH5H6.js +0 -283
  1255. package/dist/chunk-XMHBH5H6.js.map +0 -1
  1256. package/dist/chunk-XMVFHBHT.js +0 -277
  1257. package/dist/chunk-Y3VMVTYX.js +0 -53
  1258. package/dist/chunk-YNB73F22.js +0 -137
  1259. package/dist/chunk-YNB73F22.js.map +0 -1
  1260. package/dist/chunk-Z2E7VW55.js +0 -335
  1261. package/dist/chunk-Z2E7VW55.js.map +0 -1
  1262. package/dist/chunk-ZG7PTKBK.js +0 -2296
  1263. package/dist/chunk-ZNQN6ZTA.js +0 -135
  1264. package/dist/chunk-ZVTKDVVM.js +0 -827
  1265. package/dist/chunk-ZVTKDVVM.js.map +0 -1
  1266. package/dist/cli-BR8KpIU0.d.ts +0 -1259
  1267. package/dist/codex-materialize-CQlLTzke.d.ts +0 -139
  1268. package/dist/connectors-cli-DFGtY2DB.d.ts +0 -257
  1269. package/dist/contradiction-review-5LTTVDQV.js +0 -22
  1270. package/dist/contradiction-scan-QTXAMBUA.js +0 -414
  1271. package/dist/contradiction-scan-QTXAMBUA.js.map +0 -1
  1272. package/dist/engine-35M5BKQ7.js +0 -28
  1273. package/dist/fs-utils-IRVUFB6G.js +0 -30
  1274. package/dist/graph-edge-decay-PWB63GRE.js +0 -207
  1275. package/dist/memory-governance-IMPQZXFC.js +0 -37
  1276. package/dist/memory-projection-store-CY8TU40w.d.ts +0 -222
  1277. package/dist/orchestrator-DDMPqU6R.d.ts +0 -1792
  1278. package/dist/path-RMTY5Y5A.js +0 -9
  1279. package/dist/port-B6VEDIkC.d.ts +0 -53
  1280. package/dist/resolution-YGIBORXI.js +0 -101
  1281. package/dist/resolution-YGIBORXI.js.map +0 -1
  1282. package/dist/secure-store-4R2GSO7S.js +0 -156
  1283. package/dist/semantic-consolidation-ByBXb-sf.d.ts +0 -180
  1284. package/dist/state-store-3EH7HYIN.js +0 -16
  1285. package/dist/types-V3FJ26TF.js +0 -30
  1286. /package/dist/{capsule-crypto-SJS5VVAP.js.map → adapters/claude-code.js.map} +0 -0
  1287. /package/dist/{capsule-export-7QNCBZOQ.js.map → adapters/codex.js.map} +0 -0
  1288. /package/dist/{capsule-import-EPBHD2EN.js.map → adapters/hermes.js.map} +0 -0
  1289. /package/dist/{contradiction-review-5LTTVDQV.js.map → adapters/index.js.map} +0 -0
  1290. /package/dist/{engine-35M5BKQ7.js.map → adapters/registry.js.map} +0 -0
  1291. /package/dist/{fs-utils-IRVUFB6G.js.map → adapters/replit.js.map} +0 -0
  1292. /package/dist/{memory-governance-IMPQZXFC.js.map → adapters/types.js.map} +0 -0
  1293. /package/dist/{path-RMTY5Y5A.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  1294. /package/dist/{capsule-merge-DI7PNQ2H.js.map → capsule-merge-4MGKE7C5.js.map} +0 -0
  1295. /package/dist/{chunk-G4SK7DSQ.js.map → chunk-2WWLHTZY.js.map} +0 -0
  1296. /package/dist/{chunk-X7HPGUVG.js.map → chunk-4CRG46BG.js.map} +0 -0
  1297. /package/dist/{chunk-UVMUAWVT.js.map → chunk-7IASACLB.js.map} +0 -0
  1298. /package/dist/{chunk-HELQZFZO.js.map → chunk-EDTHC6UD.js.map} +0 -0
  1299. /package/dist/{chunk-4YM32CRU.js.map → chunk-EFJ3MQ4V.js.map} +0 -0
  1300. /package/dist/{chunk-E2UCDP5S.js.map → chunk-FBYESMQ2.js.map} +0 -0
  1301. /package/dist/{chunk-D54LZC5L.js.map → chunk-FDU6HUUL.js.map} +0 -0
  1302. /package/dist/{chunk-IB3BFHGN.js.map → chunk-GGKRUQOO.js.map} +0 -0
  1303. /package/dist/{chunk-242S3I2A.js.map → chunk-GL6I6MEQ.js.map} +0 -0
  1304. /package/dist/{secure-store-4R2GSO7S.js.map → chunk-HHLLAQGZ.js.map} +0 -0
  1305. /package/dist/{chunk-4IS4SXIQ.js.map → chunk-HXXBL2KD.js.map} +0 -0
  1306. /package/dist/{chunk-767ODGE6.js.map → chunk-KNKUID7G.js.map} +0 -0
  1307. /package/dist/{chunk-6TBWYBJ3.js.map → chunk-LPMVBPA3.js.map} +0 -0
  1308. /package/dist/{chunk-WEJG4TB5.js.map → chunk-MC26UJIM.js.map} +0 -0
  1309. /package/dist/{chunk-JKDVIE52.js.map → chunk-MGKYQQYF.js.map} +0 -0
  1310. /package/dist/{chunk-Y3VMVTYX.js.map → chunk-MT4HVDUZ.js.map} +0 -0
  1311. /package/dist/{chunk-G2WADRQ3.js.map → chunk-MY6TPVXW.js.map} +0 -0
  1312. /package/dist/{chunk-OR64ZGRZ.js.map → chunk-NNVTUXEB.js.map} +0 -0
  1313. /package/dist/{chunk-JESOB2HO.js.map → chunk-P4NEIHUT.js.map} +0 -0
  1314. /package/dist/{chunk-IXEJRKCZ.js.map → chunk-QRNI5JBH.js.map} +0 -0
  1315. /package/dist/{chunk-EEQLFRUM.js.map → chunk-RRF5UOBJ.js.map} +0 -0
  1316. /package/dist/{state-store-3EH7HYIN.js.map → chunk-SEDEKFYQ.js.map} +0 -0
  1317. /package/dist/{chunk-2LGMW3DJ.js.map → chunk-U3PN77QT.js.map} +0 -0
  1318. /package/dist/{chunk-XMVFHBHT.js.map → chunk-U3WSW6PZ.js.map} +0 -0
  1319. /package/dist/{chunk-N5AKDXAI.js.map → chunk-UWVJF25J.js.map} +0 -0
  1320. /package/dist/{types-V3FJ26TF.js.map → chunk-V5OCT34X.js.map} +0 -0
  1321. /package/dist/{chunk-ZG7PTKBK.js.map → chunk-W3LR522O.js.map} +0 -0
  1322. /package/dist/{chunk-MARWOCVP.js.map → chunk-XIG5PDM7.js.map} +0 -0
  1323. /package/dist/{chunk-ZNQN6ZTA.js.map → chunk-XVZ7B3HG.js.map} +0 -0
  1324. /package/dist/{graph-edge-decay-PWB63GRE.js.map → graph-edge-decay-5DI5GUNL.js.map} +0 -0
@@ -0,0 +1,1542 @@
1
+ import { StorageManager } from './storage.js';
2
+ import { RecallExplainJsonPayload } from './recall-explain-renderer.js';
3
+ import { PluginConfig, DaySummaryResult, RecallPlanMode, RecallDisclosure, MemoryFile, MemoryLifecycleEvent, EntityFile, MemoryStatus, DreamsStatusResult, DreamsPhase, DreamsRunResult } from './types.js';
4
+ import { AnomalyDetectorResult } from './recall-audit-anomaly.js';
5
+ import { ExplicitCaptureInput } from './explicit-capture.js';
6
+ import { BudgetDecision } from './cross-namespace-budget.js';
7
+ import { readMemoryGovernanceRunArtifact } from './maintenance/memory-governance.js';
8
+ import { O as Orchestrator, c as IntentDebugSnapshot, G as GraphRecallSnapshot, P as PatternReinforcementResult } from './orchestrator-DuWl9Hwx.js';
9
+ import { LiveConnectorsRunSummary } from './live-connectors-runner.js';
10
+ import { LastRecallSnapshot } from './recall-state.js';
11
+ import { GraphSnapshotRequest, GraphSnapshotResponse } from './graph-snapshot.js';
12
+ import { TrustZoneStoreStatus, TrustZoneName, TrustZoneRecordKind, TrustZoneSourceClass, TrustZoneProvenanceScore, TrustZonePromotionResult, TrustZoneDemoSeedResult } from './trust-zones.js';
13
+ import { RecallXraySnapshot } from './recall-xray.js';
14
+ import { L as LcmMessagePartInput, M as MessagePartSourceFormat } from './index-DJ9QWMw-.js';
15
+ import { LocalLlmClient } from './local-llm.js';
16
+ import { FallbackLlmClient } from './fallback-llm.js';
17
+ import { a as SemanticDedupLookup } from './semantic-VwGI14Ok.js';
18
+ import { MemoryOutcomeKind, RecordMemoryOutcomeResult } from './memory-worth-outcomes.js';
19
+ import { ImportCapsuleOptions, ImportCapsuleResult } from './transfer/capsule-import.js';
20
+ import { ExportCapsuleOptions, ExportCapsuleResult } from './transfer/capsule-export.js';
21
+ import { CapsuleListEntry } from './capsule-cli.js';
22
+ import { ActionConfidenceInput, ActionConfidenceResult } from './action-confidence.js';
23
+
24
+ /**
25
+ * Peer registry types — issue #679 PR 1/5.
26
+ *
27
+ * Generalizes the singular identity-anchor model to a multi-peer registry.
28
+ * Every party Remnic interacts with — humans, agents, integrations, and
29
+ * "self" — is represented as a `Peer` with an evolving cognitive profile.
30
+ *
31
+ * This module defines pure types only. Storage primitives live in
32
+ * `./storage.ts`. Reasoner integration, recall injection, CLI/HTTP/MCP
33
+ * surfaces, and migration of existing identity-anchor data ship in later
34
+ * PRs (2/5 — 5/5).
35
+ */
36
+ /**
37
+ * Kind of peer.
38
+ *
39
+ * - `self` — the current Remnic operator (replaces singular identity-anchor).
40
+ * - `human` — another human collaborator distinct from self.
41
+ * - `agent` — another AI agent (Claude Code, Codex, Hermes, etc.).
42
+ * - `integration` — non-conversational integration (cron, webhook, importer).
43
+ */
44
+ type PeerKind = "self" | "human" | "agent" | "integration";
45
+ /**
46
+ * Stable, slow-changing facts about a peer.
47
+ *
48
+ * `id` matches `^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$`, 1-64 chars,
49
+ * with no leading/trailing/consecutive dots or dashes. Stored on disk under
50
+ * `peers/{id}/identity.md` as YAML frontmatter + markdown body.
51
+ */
52
+ interface Peer {
53
+ /** Stable, opaque identifier. See PEER_ID_PATTERN. */
54
+ readonly id: string;
55
+ /** Kind of peer. Drives default profile schema and recall posture. */
56
+ readonly kind: PeerKind;
57
+ /** Human-readable display name. Distinct from `id`; mutable. */
58
+ readonly displayName: string;
59
+ /** ISO-8601 timestamp of first registration. */
60
+ readonly createdAt: string;
61
+ /** ISO-8601 timestamp of most recent update to identity. */
62
+ readonly updatedAt: string;
63
+ /** Optional free-form markdown body for the identity kernel. */
64
+ readonly notes?: string;
65
+ }
66
+ /**
67
+ * Evolving cognitive profile for a peer.
68
+ *
69
+ * Updated by the async profile reasoner (PR 2/5) from observable session
70
+ * signals. Every field carries provenance back to its originating session
71
+ * and signal. This PR only defines the shape — population is deferred.
72
+ */
73
+ interface PeerProfile {
74
+ /** Peer this profile belongs to. */
75
+ readonly peerId: string;
76
+ /** ISO-8601 timestamp of most recent profile mutation. */
77
+ readonly updatedAt: string;
78
+ /**
79
+ * Arbitrary key/value profile fields. Values are markdown strings.
80
+ * Keys are stable section identifiers (e.g. `communication_style`,
81
+ * `recurring_concerns`). The reasoner is responsible for choosing
82
+ * keys; this PR does not constrain them beyond requiring strings.
83
+ */
84
+ readonly fields: Record<string, string>;
85
+ /**
86
+ * Per-field provenance. Maps field key → list of provenance entries.
87
+ * A field may have multiple sources (the reasoner accumulates evidence
88
+ * across sessions before promoting a field).
89
+ */
90
+ readonly provenance: Record<string, ReadonlyArray<PeerProfileFieldProvenance>>;
91
+ }
92
+ /**
93
+ * Provenance for a single profile-field mutation.
94
+ *
95
+ * Reasoner output (PR 2/5) attaches one of these every time it touches a
96
+ * field, so the user can audit exactly why a profile claim exists.
97
+ */
98
+ interface PeerProfileFieldProvenance {
99
+ /** ISO-8601 timestamp the field was set/updated by this signal. */
100
+ readonly observedAt: string;
101
+ /** Originating session id (or other source identifier). */
102
+ readonly sourceSessionId?: string;
103
+ /** Short label for the signal type (e.g. "explicit_preference"). */
104
+ readonly signal: string;
105
+ /** Optional free-form note explaining the inference. */
106
+ readonly note?: string;
107
+ }
108
+ /**
109
+ * One row of the append-only interaction log for a peer.
110
+ *
111
+ * Stored on disk under `peers/{id}/interactions.log.md` as a sequence of
112
+ * markdown bullet entries with a leading ISO-8601 timestamp. Append-only
113
+ * by contract — the reasoner reads this log to derive profile updates.
114
+ */
115
+ interface PeerInteractionLogEntry {
116
+ /** ISO-8601 timestamp the interaction occurred. */
117
+ readonly timestamp: string;
118
+ /** Originating session id, if any. */
119
+ readonly sessionId?: string;
120
+ /** Short kind label (e.g. "message", "tool_call", "preference_set"). */
121
+ readonly kind: string;
122
+ /** Free-form markdown summary of the interaction. */
123
+ readonly summary: string;
124
+ }
125
+ /**
126
+ * Regex enforced on `Peer.id`. Exported so callers can mirror validation
127
+ * before constructing a `Peer`.
128
+ *
129
+ * Rules:
130
+ * - 1-64 characters total
131
+ * - First and last character must be `[A-Za-z0-9]`
132
+ * - Interior may contain `.`, `_`, `-` in addition to alphanumerics
133
+ * - No leading or trailing dot/dash/underscore
134
+ * - No consecutive separators (`..`, `--`, `__`, `.-`, etc.)
135
+ *
136
+ * Cursor Medium: previously the regex allowed `a..b` even though the
137
+ * docs claimed otherwise — a separate JS-side check enforced the rule
138
+ * but the standalone PATTERN was wrong for any external consumer
139
+ * relying on it. Tighten the regex itself so PEER_ID_PATTERN is the
140
+ * single source of truth: an alphanumeric, optionally followed by
141
+ * groups of (one separator + one-or-more alphanumerics), with the
142
+ * final group ending on an alphanumeric. Negative lookahead-free so
143
+ * it works in any JS engine.
144
+ */
145
+ declare const PEER_ID_PATTERN: RegExp;
146
+ /** Maximum length for `Peer.id`. */
147
+ declare const PEER_ID_MAX_LENGTH = 64;
148
+
149
+ interface ConsoleBufferState {
150
+ /** Number of turns currently held in the default buffer slot. */
151
+ turnsCount: number;
152
+ /** Approximate byte size of buffered content (UTF-8). */
153
+ byteCount: number;
154
+ }
155
+ interface ConsoleExtractionVerdict {
156
+ /** ISO-8601 timestamp the verdict was recorded. */
157
+ ts: string;
158
+ /** Verdict kind — typically "accept" | "reject" | "defer". */
159
+ kind: string;
160
+ /** Optional short reason from the judge or fallback. */
161
+ reason?: string;
162
+ }
163
+ interface ConsoleExtractionQueueState {
164
+ /** Number of pending extraction tasks queued in the orchestrator. */
165
+ depth: number;
166
+ /** Most recent judge verdicts, newest last. Capped at 25 entries. */
167
+ recentVerdicts: ConsoleExtractionVerdict[];
168
+ }
169
+ interface ConsoleDedupDecision {
170
+ /** ISO-8601 timestamp the decision was recorded. */
171
+ ts: string;
172
+ /** Outcome of the dedup check — "duplicate" | "novel" | etc. */
173
+ decision: string;
174
+ /** Optional content fingerprint (first 16 chars of a hash). */
175
+ fingerprint?: string;
176
+ /** Optional similarity score that drove the decision. */
177
+ similarity?: number;
178
+ }
179
+ interface ConsoleMaintenanceLedgerEvent {
180
+ /** ISO-8601 timestamp from the ledger row. */
181
+ ts: string;
182
+ /** Event category (e.g. "EXTRACTION_JUDGE_VERDICT"). */
183
+ category: string;
184
+ /** Compact one-line summary. */
185
+ summary: string;
186
+ }
187
+ interface ConsoleQmdProbeState {
188
+ /** Whether QMD is reachable via CLI or daemon. */
189
+ available: boolean;
190
+ /** Whether the daemon transport is in use. */
191
+ daemonMode: boolean;
192
+ /** Raw debug-status string from `qmd.debugStatus()`. */
193
+ debug: string;
194
+ }
195
+ interface ConsoleDaemonInfo {
196
+ /** Process uptime in milliseconds. */
197
+ uptimeMs: number;
198
+ /** Package / daemon version (best-effort). */
199
+ version: string;
200
+ }
201
+ interface ConsoleStateSnapshot {
202
+ /** ISO-8601 capture timestamp. */
203
+ capturedAt: string;
204
+ bufferState: ConsoleBufferState;
205
+ extractionQueue: ConsoleExtractionQueueState;
206
+ dedupRecent: ConsoleDedupDecision[];
207
+ maintenanceLedgerTail: ConsoleMaintenanceLedgerEvent[];
208
+ qmdProbe: ConsoleQmdProbeState;
209
+ daemon: ConsoleDaemonInfo;
210
+ /**
211
+ * Subsystem read errors. One entry per failed reader keyed by
212
+ * subsystem name (e.g. `"bufferState: ..."`). An empty array means
213
+ * every section was read cleanly.
214
+ */
215
+ errors: string[];
216
+ }
217
+
218
+ /**
219
+ * Procedural memory stats surface (issue #567 PR 5/5).
220
+ *
221
+ * Pure helper that tallies procedure memories by status and summarizes the
222
+ * current `procedural.*` config so operators (and the dashboard) can see,
223
+ * in one call, how procedural memory is behaving in a namespace.
224
+ *
225
+ * Consumed by:
226
+ * - CLI `remnic procedural stats`
227
+ * - HTTP `GET /engram/v1/procedural/stats`
228
+ * - MCP `remnic.procedural_stats` (+ `engram.procedural_stats` alias)
229
+ */
230
+
231
+ interface ProcedureStatusCounts {
232
+ total: number;
233
+ active: number;
234
+ pending_review: number;
235
+ rejected: number;
236
+ quarantined: number;
237
+ superseded: number;
238
+ archived: number;
239
+ /** Any status the enum doesn't yet cover. */
240
+ other: number;
241
+ }
242
+ interface ProcedureStatsConfigSnapshot {
243
+ enabled: boolean;
244
+ minOccurrences: number;
245
+ successFloor: number;
246
+ autoPromoteOccurrences: number;
247
+ autoPromoteEnabled: boolean;
248
+ lookbackDays: number;
249
+ recallMaxProcedures: number;
250
+ }
251
+ interface ProcedureStatsRecent {
252
+ /** ISO 8601 timestamp of the most recent procedure write, or null. */
253
+ lastWriteAt: string | null;
254
+ /** Count of procedure files with `created` (or `updated`) in the last 7 days. */
255
+ writesLast7Days: number;
256
+ /** Count of procedures whose `source` is the procedure miner. */
257
+ minerSourced: number;
258
+ }
259
+ interface ProcedureStatsReport {
260
+ schemaVersion: 1;
261
+ generatedAt: string;
262
+ counts: ProcedureStatusCounts;
263
+ recent: ProcedureStatsRecent;
264
+ config: ProcedureStatsConfigSnapshot;
265
+ }
266
+ /**
267
+ * Read all memories from storage and tally procedures by status + recency.
268
+ * `nowMs` is injectable so tests can pin the "last 7 days" window.
269
+ */
270
+ declare function computeProcedureStats(options: {
271
+ storage: StorageManager;
272
+ config: PluginConfig;
273
+ nowMs?: number;
274
+ }): Promise<ProcedureStatsReport>;
275
+ /**
276
+ * Render `ProcedureStatsReport` as a human-friendly plain-text block for CLI
277
+ * operators. Keep it deterministic — no colors, no ANSI. Used by `--format text`.
278
+ */
279
+ declare function formatProcedureStatsText(report: ProcedureStatsReport): string;
280
+
281
+ declare class EngramAccessInputError extends Error {
282
+ }
283
+ type AccessProfilingReportRequest = {
284
+ format?: string;
285
+ limit?: number;
286
+ };
287
+ type AccessProfilingReportResponse = {
288
+ enabled: boolean;
289
+ format?: "ascii" | "json";
290
+ report?: string;
291
+ traces?: unknown[];
292
+ stats?: unknown;
293
+ bottleneck?: string | null;
294
+ reason?: string;
295
+ message?: string;
296
+ };
297
+ declare const ENGRAM_ACCESS_WRITE_SCHEMA_VERSION = 1;
298
+ interface EngramAccessHealthResponse {
299
+ ok: true;
300
+ memoryDir: string;
301
+ namespacesEnabled: boolean;
302
+ defaultNamespace: string;
303
+ searchBackend: string;
304
+ qmdEnabled: boolean;
305
+ nativeKnowledgeEnabled: boolean;
306
+ projectionAvailable: boolean;
307
+ }
308
+ interface EngramAccessRecallRequest {
309
+ query: string;
310
+ sessionKey?: string;
311
+ namespace?: string;
312
+ authenticatedPrincipal?: string;
313
+ idempotencyKey?: string;
314
+ topK?: number;
315
+ mode?: RecallPlanMode | "auto";
316
+ includeDebug?: boolean;
317
+ /**
318
+ * Recall disclosure depth (issue #677). Selects how much content each
319
+ * result returns: `"chunk"` (default), `"section"`, or `"raw"`. Omitting
320
+ * this field is equivalent to passing `"chunk"` and preserves pre-#677
321
+ * behavior. Surfaces (CLI / HTTP / MCP) and per-level token telemetry
322
+ * are wired in subsequent PRs of #677.
323
+ */
324
+ disclosure?: RecallDisclosure;
325
+ /**
326
+ * Coding-agent context (issue #569). When a connector resolves a git
327
+ * context for the session's cwd, it passes it here and the access service
328
+ * attaches it to the orchestrator before recall so project- / branch-
329
+ * scoped namespace overlays apply.
330
+ *
331
+ * Keyed by `sessionKey`; ignored when `sessionKey` is absent.
332
+ */
333
+ codingContext?: {
334
+ projectId: string;
335
+ branch: string | null;
336
+ rootPath: string;
337
+ defaultBranch: string | null;
338
+ } | null;
339
+ /**
340
+ * Working directory of the calling agent session. When provided and no
341
+ * `codingContext` is already attached to the session, the service resolves
342
+ * git context from this path and attaches it automatically. This enables
343
+ * Claude Code hooks (and any connector that knows its cwd) to get
344
+ * project-scoped memory without explicitly constructing a `codingContext`.
345
+ */
346
+ cwd?: string;
347
+ /**
348
+ * Arbitrary project tag for non-git-based project scoping. When provided,
349
+ * creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
350
+ * Useful for OpenClaw sessions where the whole workspace is one git repo
351
+ * but different conversations correspond to different client projects.
352
+ * Takes precedence over `cwd`-based git resolution but NOT over an
353
+ * explicit `codingContext`.
354
+ */
355
+ projectTag?: string;
356
+ /**
357
+ * Historical recall pin (issue #680). ISO 8601 timestamp. When set,
358
+ * the orchestrator filters out memories whose `valid_at` is after this
359
+ * instant OR whose `invalid_at` is at-or-before this instant, so the
360
+ * caller sees the corpus as it existed at `asOf`. Invalid values are
361
+ * rejected here with `EngramAccessInputError` (CLAUDE.md rule 51).
362
+ */
363
+ asOf?: string;
364
+ /**
365
+ * Free-form recall tag filter (issue #689). When non-empty, recall results
366
+ * whose frontmatter `tags` do not match are removed from the response.
367
+ * Comparison is case-sensitive exact match against tags stored on each
368
+ * memory's frontmatter (see `storage.ts` and `docs/tags.md`).
369
+ */
370
+ tags?: string[];
371
+ /**
372
+ * Match mode for `tags` (issue #689). `"any"` (default when omitted)
373
+ * admits results that carry at least one filter tag. `"all"` requires
374
+ * every filter tag to be present. Ignored when `tags` is absent or empty.
375
+ */
376
+ tagMatch?: "any" | "all";
377
+ /**
378
+ * Issue #681 — when `true`, bypasses the configured
379
+ * `graphTraversalConfidenceFloor` for this recall and includes graph edges
380
+ * below the floor in traversal. Useful for diagnostic queries that need to
381
+ * surface results pruned by confidence decay. Default `false`.
382
+ */
383
+ includeLowConfidence?: boolean;
384
+ }
385
+ /**
386
+ * Standalone request to attach / clear the coding context for a session
387
+ * without performing a recall. Used by the Claude Code / Codex connectors
388
+ * at session start, and by the `remnic.set_coding_context` MCP tool (PR 7).
389
+ */
390
+ interface EngramAccessSetCodingContextRequest {
391
+ sessionKey: string;
392
+ codingContext: {
393
+ projectId: string;
394
+ branch: string | null;
395
+ rootPath: string;
396
+ defaultBranch: string | null;
397
+ } | null;
398
+ }
399
+ interface EngramAccessRecallResponse {
400
+ query: string;
401
+ sessionKey?: string;
402
+ namespace: string;
403
+ context: string;
404
+ count: number;
405
+ memoryIds: string[];
406
+ results: EngramAccessMemorySummary[];
407
+ recordedAt?: string;
408
+ traceId?: string;
409
+ plannerMode?: RecallPlanMode;
410
+ fallbackUsed: boolean;
411
+ sourcesUsed: string[];
412
+ /**
413
+ * Disclosure depth applied to this recall (issue #677). Reflects the
414
+ * caller-requested level after defaulting; useful for surfaces that want
415
+ * to render a "served at depth X" hint without re-deriving it. PR 1 of
416
+ * #677 wires this end-to-end for plumbing only — section/raw payload
417
+ * shaping ships in later PRs.
418
+ */
419
+ disclosure: RecallDisclosure;
420
+ budgetsApplied?: LastRecallSnapshot["budgetsApplied"];
421
+ auditAnomalies?: AnomalyDetectorResult;
422
+ budgetWarning?: BudgetDecision;
423
+ latencyMs?: number;
424
+ debug?: {
425
+ snapshot?: LastRecallSnapshot;
426
+ intent?: IntentDebugSnapshot | null;
427
+ graph?: GraphRecallSnapshot | null;
428
+ };
429
+ }
430
+ interface EngramAccessRecallExplainRequest {
431
+ sessionKey?: string;
432
+ namespace?: string;
433
+ }
434
+ interface EngramAccessRecallExplainResponse {
435
+ found: boolean;
436
+ snapshot?: LastRecallSnapshot;
437
+ intent?: IntentDebugSnapshot | null;
438
+ graph?: GraphRecallSnapshot | null;
439
+ }
440
+ interface EngramAccessDaySummaryRequest {
441
+ memories?: string;
442
+ sessionKey?: string;
443
+ namespace?: string;
444
+ }
445
+ /** Inputs accepted by the `remnic_briefing` MCP tool. */
446
+ interface EngramAccessBriefingRequest {
447
+ since?: string;
448
+ focus?: string;
449
+ namespace?: string;
450
+ format?: "markdown" | "json";
451
+ maxFollowups?: number;
452
+ /** Caller principal for namespace access checks. Transport-bound — never from untrusted payloads. */
453
+ principal?: string;
454
+ }
455
+ /** Response for `remnic_briefing`. */
456
+ interface EngramAccessBriefingResponse {
457
+ format: "markdown" | "json";
458
+ window: {
459
+ from: string;
460
+ to: string;
461
+ };
462
+ namespace: string;
463
+ markdown: string;
464
+ json: Record<string, unknown>;
465
+ followupsUnavailableReason?: string;
466
+ }
467
+ interface EngramAccessMemoryRecord {
468
+ id: string;
469
+ path: string;
470
+ category: string;
471
+ status?: string;
472
+ created?: string;
473
+ updated?: string;
474
+ content: string;
475
+ frontmatter: MemoryFile["frontmatter"];
476
+ }
477
+ interface EngramAccessMemorySummary {
478
+ id: string;
479
+ path: string;
480
+ category: string;
481
+ status: string;
482
+ created?: string;
483
+ updated?: string;
484
+ tags: string[];
485
+ entityRef?: string;
486
+ preview: string;
487
+ /**
488
+ * Disclosure depth at which this result was served (issue #677). Set by
489
+ * recall paths; omitted on non-recall surfaces (e.g. memory browse) where
490
+ * the concept does not apply. PR 1 of #677 always reports the
491
+ * request-level disclosure on recall results; per-result divergence is
492
+ * reserved for the auto-escalation policy that ships in PR 4/4.
493
+ */
494
+ disclosure?: RecallDisclosure;
495
+ /**
496
+ * Full memory content (markdown body) — populated when `disclosure` is
497
+ * `"section"` or `"raw"` (issue #677 PR 2/4). At `"chunk"` depth callers
498
+ * only receive the short `preview`, preserving the cheap-by-default
499
+ * recall payload. Browse/non-recall paths leave `content` undefined.
500
+ */
501
+ content?: string;
502
+ /**
503
+ * Raw transcript excerpts surfaced from the LCM archive when `disclosure`
504
+ * is `"raw"` and the LCM engine is enabled (issue #677 PR 2/4). Each
505
+ * entry is a per-message excerpt sized by the LCM archive's
506
+ * configured excerpt window. Empty array when LCM is disabled or has
507
+ * no matching transcript content. Always omitted at chunk/section.
508
+ */
509
+ rawExcerpts?: Array<{
510
+ turnIndex: number;
511
+ role: string;
512
+ content: string;
513
+ sessionId: string;
514
+ }>;
515
+ }
516
+ interface EngramAccessMemoryBrowseRequest {
517
+ query?: string;
518
+ status?: string;
519
+ category?: string;
520
+ namespace?: string;
521
+ authenticatedPrincipal?: string;
522
+ sort?: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
523
+ limit?: number;
524
+ offset?: number;
525
+ }
526
+ interface EngramAccessMemoryBrowseResponse {
527
+ namespace: string;
528
+ sort: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
529
+ total: number;
530
+ count: number;
531
+ limit: number;
532
+ offset: number;
533
+ memories: EngramAccessMemorySummary[];
534
+ }
535
+ interface EngramAccessMemoryResponse {
536
+ found: boolean;
537
+ namespace: string;
538
+ memory?: EngramAccessMemoryRecord;
539
+ }
540
+ interface EngramAccessTimelineResponse {
541
+ found: boolean;
542
+ namespace: string;
543
+ count: number;
544
+ timeline: MemoryLifecycleEvent[];
545
+ }
546
+ interface EngramAccessEntitySummary {
547
+ name: string;
548
+ type: string;
549
+ updated: string;
550
+ summary?: string;
551
+ aliases: string[];
552
+ }
553
+ interface EngramAccessEntityListResponse {
554
+ namespace: string;
555
+ total: number;
556
+ count: number;
557
+ limit: number;
558
+ offset: number;
559
+ entities: EngramAccessEntitySummary[];
560
+ }
561
+ interface EngramAccessEntityResponse {
562
+ found: boolean;
563
+ namespace: string;
564
+ entity?: EntityFile;
565
+ }
566
+ interface EngramAccessReviewQueueResponse {
567
+ found: boolean;
568
+ namespace?: string;
569
+ runId?: string;
570
+ summary?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["summary"];
571
+ metrics?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["metrics"];
572
+ qualityScore?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["qualityScore"];
573
+ reviewQueue?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["reviewQueue"];
574
+ appliedActions?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["appliedActions"];
575
+ transitionReport?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["transitionReport"];
576
+ report?: string;
577
+ }
578
+ interface EngramAccessMaintenanceResponse {
579
+ namespace: string;
580
+ health: EngramAccessHealthResponse;
581
+ latestGovernanceRun: EngramAccessReviewQueueResponse;
582
+ }
583
+ interface EngramAccessTrustZoneStatusResponse {
584
+ namespace: string;
585
+ status: TrustZoneStoreStatus;
586
+ }
587
+ interface EngramAccessTrustZoneRecordSummary {
588
+ recordId: string;
589
+ filePath: string;
590
+ zone: TrustZoneName;
591
+ recordedAt: string;
592
+ kind: TrustZoneRecordKind;
593
+ summary: string;
594
+ sourceClass: TrustZoneSourceClass;
595
+ sessionKey?: string;
596
+ sourceId?: string;
597
+ evidenceHashPresent: boolean;
598
+ anchored: boolean;
599
+ entityRefs: string[];
600
+ tags: string[];
601
+ metadata?: Record<string, string>;
602
+ trustScore?: TrustZoneProvenanceScore;
603
+ nextPromotionTarget?: TrustZoneName;
604
+ nextPromotionAllowed: boolean;
605
+ nextPromotionReasons: string[];
606
+ corroborationCount?: number;
607
+ corroborationSourceClasses?: TrustZoneSourceClass[];
608
+ }
609
+ interface EngramAccessTrustZoneBrowseRequest {
610
+ query?: string;
611
+ zone?: TrustZoneName;
612
+ kind?: TrustZoneRecordKind;
613
+ sourceClass?: TrustZoneSourceClass;
614
+ namespace?: string;
615
+ limit?: number;
616
+ offset?: number;
617
+ }
618
+ interface EngramAccessTrustZoneBrowseResponse {
619
+ namespace: string;
620
+ total: number;
621
+ count: number;
622
+ limit: number;
623
+ offset: number;
624
+ records: EngramAccessTrustZoneRecordSummary[];
625
+ }
626
+ interface EngramAccessTrustZonePromoteRequest {
627
+ recordId: string;
628
+ targetZone: TrustZoneName;
629
+ promotionReason: string;
630
+ recordedAt?: string;
631
+ summary?: string;
632
+ dryRun?: boolean;
633
+ namespace?: string;
634
+ authenticatedPrincipal?: string;
635
+ }
636
+ interface EngramAccessTrustZonePromoteResponse extends TrustZonePromotionResult {
637
+ namespace: string;
638
+ dryRun: boolean;
639
+ }
640
+ interface EngramAccessTrustZoneDemoSeedRequest {
641
+ scenario?: string;
642
+ recordedAt?: string;
643
+ dryRun?: boolean;
644
+ namespace?: string;
645
+ authenticatedPrincipal?: string;
646
+ }
647
+ interface EngramAccessTrustZoneDemoSeedResponse extends TrustZoneDemoSeedResult {
648
+ namespace: string;
649
+ }
650
+ interface EngramAccessQualityResponse {
651
+ namespace: string;
652
+ totalMemories: number;
653
+ statusCounts: Record<string, number>;
654
+ categoryCounts: Record<string, number>;
655
+ confidenceTierCounts: Record<string, number>;
656
+ ageBucketCounts: Record<string, number>;
657
+ archivePressure: {
658
+ pendingReview: number;
659
+ quarantined: number;
660
+ archived: number;
661
+ staleActive: number;
662
+ lowConfidenceActive: number;
663
+ };
664
+ latestGovernanceRun: {
665
+ found: boolean;
666
+ runId?: string;
667
+ qualityScore?: EngramAccessReviewQueueResponse["qualityScore"];
668
+ reviewQueueCount: number;
669
+ };
670
+ }
671
+ interface EngramAccessCapsuleListResponse {
672
+ namespace: string;
673
+ capsulesDir: string;
674
+ capsules: CapsuleListEntry[];
675
+ }
676
+ type EngramAccessActionConfidenceRequest = ActionConfidenceInput;
677
+ type EngramAccessActionConfidenceResponse = ActionConfidenceResult;
678
+ interface EngramAccessReviewDispositionRequest {
679
+ memoryId: string;
680
+ status: MemoryStatus | "archived";
681
+ reasonCode: string;
682
+ namespace?: string;
683
+ /**
684
+ * Trusted transport-bound principal. This must never come from untrusted client payloads.
685
+ * When present, write authorization is evaluated against this principal instead of sessionKey.
686
+ */
687
+ authenticatedPrincipal?: string;
688
+ }
689
+ interface EngramAccessReviewDispositionResponse {
690
+ ok: boolean;
691
+ namespace: string;
692
+ memoryId: string;
693
+ status: MemoryStatus | "archived";
694
+ previousStatus: MemoryStatus;
695
+ currentPath?: string;
696
+ }
697
+ interface EngramAccessWriteEnvelope {
698
+ schemaVersion?: number;
699
+ idempotencyKey?: string;
700
+ dryRun?: boolean;
701
+ sessionKey?: string;
702
+ /**
703
+ * Trusted transport-bound principal. This must never come from untrusted client payloads.
704
+ * When present, write authorization is evaluated against this principal instead of sessionKey.
705
+ */
706
+ authenticatedPrincipal?: string;
707
+ }
708
+ interface EngramAccessMemoryStoreRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
709
+ }
710
+ interface EngramAccessSuggestionSubmitRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
711
+ }
712
+ interface EngramAccessWriteResponse {
713
+ schemaVersion: 1;
714
+ operation: "memory_store" | "suggestion_submit";
715
+ namespace: string;
716
+ dryRun: boolean;
717
+ accepted: boolean;
718
+ queued: boolean;
719
+ status: "validated" | "stored" | "duplicate" | "queued_for_review";
720
+ memoryId?: string;
721
+ duplicateOf?: string;
722
+ idempotencyKey?: string;
723
+ idempotencyReplay?: boolean;
724
+ }
725
+ interface EngramAccessObserveMessage {
726
+ role: "user" | "assistant";
727
+ content: string;
728
+ parts?: LcmMessagePartInput[];
729
+ rawContent?: unknown;
730
+ sourceFormat?: MessagePartSourceFormat;
731
+ }
732
+ interface EngramAccessObserveRequest {
733
+ sessionKey: string;
734
+ messages: EngramAccessObserveMessage[];
735
+ namespace?: string;
736
+ authenticatedPrincipal?: string;
737
+ skipExtraction?: boolean;
738
+ /**
739
+ * Working directory of the calling agent session (issue #569 wiring).
740
+ * When provided and no `codingContext` is attached for this session,
741
+ * resolves git context from the path and attaches it so writes route to
742
+ * the correct project namespace.
743
+ */
744
+ cwd?: string;
745
+ /**
746
+ * Arbitrary project tag for non-git-based project scoping (issue #569).
747
+ * Creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
748
+ */
749
+ projectTag?: string;
750
+ }
751
+ interface EngramAccessObserveResponse {
752
+ accepted: number;
753
+ sessionKey: string;
754
+ namespace: string;
755
+ lcmArchived: boolean;
756
+ extractionQueued: boolean;
757
+ }
758
+ interface EngramAccessLcmSearchRequest {
759
+ query: string;
760
+ sessionKey?: string;
761
+ namespace?: string;
762
+ limit?: number;
763
+ authenticatedPrincipal?: string;
764
+ }
765
+ interface EngramAccessLcmSearchResponse {
766
+ query: string;
767
+ namespace: string;
768
+ results: Array<{
769
+ sessionId: string;
770
+ content: string;
771
+ turnIndex?: number;
772
+ }>;
773
+ count: number;
774
+ lcmEnabled: boolean;
775
+ }
776
+ interface EngramAccessLcmStatusResponse {
777
+ enabled: boolean;
778
+ archiveAvailable: boolean;
779
+ stats?: {
780
+ totalTurns?: number;
781
+ };
782
+ }
783
+ interface EngramAccessLcmCompactionFlushRequest {
784
+ sessionKey: string;
785
+ namespace?: string;
786
+ authenticatedPrincipal?: string;
787
+ }
788
+ interface EngramAccessLcmCompactionFlushResponse {
789
+ enabled: boolean;
790
+ flushed: boolean;
791
+ sessionKey: string;
792
+ namespace: string;
793
+ reason?: string;
794
+ }
795
+ interface EngramAccessLcmCompactionRecordRequest {
796
+ sessionKey: string;
797
+ namespace?: string;
798
+ tokensBefore: number;
799
+ tokensAfter: number;
800
+ authenticatedPrincipal?: string;
801
+ }
802
+ interface EngramAccessLcmCompactionRecordResponse {
803
+ enabled: boolean;
804
+ recorded: boolean;
805
+ sessionKey: string;
806
+ namespace: string;
807
+ reason?: string;
808
+ }
809
+ type EngramAccessIdempotencyStatus = "miss" | "replay" | "conflict";
810
+ /**
811
+ * Pure helper that shapes a {@link EngramAccessMemorySummary} from a
812
+ * {@link MemoryFile} based on the requested disclosure depth (issue #677
813
+ * PR 2/4). Extracted so the shaping invariants — chunk emits preview
814
+ * only, section attaches `content`, raw also surfaces `rawExcerpts` when
815
+ * the caller passes them — can be unit-tested without booting an
816
+ * orchestrator.
817
+ *
818
+ * Browse / non-recall paths pass `disclosure === undefined` so the
819
+ * `disclosure`, `content`, and `rawExcerpts` fields are all omitted —
820
+ * preserving the cheap-by-default browse projection.
821
+ */
822
+ declare function shapeMemorySummary(memory: MemoryFile, baseDir: string, disclosure?: RecallDisclosure, rawExcerpts?: EngramAccessMemorySummary["rawExcerpts"]): EngramAccessMemorySummary;
823
+ declare class EngramAccessService {
824
+ private readonly orchestrator;
825
+ private readonly idempotency;
826
+ private readonly idempotencyLocks;
827
+ private readonly budgetLocks;
828
+ private readonly budget;
829
+ private readonly auditAdapter;
830
+ constructor(orchestrator: Orchestrator);
831
+ get briefingEnabled(): boolean;
832
+ private resolveNamespace;
833
+ private normalizeRecallMode;
834
+ private resolveRecallNamespace;
835
+ private resolveRequestPrincipal;
836
+ private resolveWritableNamespace;
837
+ private objectiveStateStoreLocationForNamespace;
838
+ private resolveReadableNamespace;
839
+ private buildRecallDebug;
840
+ private buildRecallResponseFromXraySnapshot;
841
+ private serializeRecallResults;
842
+ /**
843
+ * Fetch raw transcript excerpts from the LCM archive for `disclosure ===
844
+ * "raw"` recalls (issue #677 PR 2/4). Returns `null` for non-raw recall
845
+ * depths, an empty array when LCM is disabled / not initialized / has no
846
+ * matches, and an array of LCM-side excerpts otherwise. Errors are
847
+ * swallowed and treated as "no excerpts" so a failing LCM never breaks
848
+ * the recall response.
849
+ *
850
+ * Namespace handling: LCM archival prefixes non-default-namespace
851
+ * sessions with `${namespace}:${sessionKey}` (see `observe()` around
852
+ * line 2498), so the lookup must mirror that prefix or raw recalls in
853
+ * non-default namespaces miss their own excerpts.
854
+ */
855
+ private fetchRawExcerpts;
856
+ private handleIdempotentWrite;
857
+ private handleIdempotentRead;
858
+ private peekIdempotentWrite;
859
+ private withIdempotencyLock;
860
+ private withBudgetLock;
861
+ health(namespace?: string): Promise<EngramAccessHealthResponse>;
862
+ actionConfidence(request?: EngramAccessActionConfidenceRequest): Promise<EngramAccessActionConfidenceResponse>;
863
+ daySummary(request: EngramAccessDaySummaryRequest): Promise<DaySummaryResult | null>;
864
+ /**
865
+ * Build a daily context briefing. Gracefully degrades when the OpenAI key
866
+ * or Responses API is unavailable — never throws for LLM-related problems.
867
+ */
868
+ briefing(request: EngramAccessBriefingRequest): Promise<EngramAccessBriefingResponse>;
869
+ /**
870
+ * Attach a coding context to a session (issue #569). Used by the Claude
871
+ * Code / Codex / generic-MCP connectors at session start so that recall +
872
+ * write paths can route to a project- / branch-scoped namespace.
873
+ *
874
+ * Validates the input shape and rejects malformed payloads rather than
875
+ * silently accepting them (CLAUDE.md #51). Pass `codingContext: null` to
876
+ * clear.
877
+ */
878
+ setCodingContext(request: EngramAccessSetCodingContextRequest): void;
879
+ /**
880
+ * Auto-resolve and attach a coding context for a session when one is not
881
+ * already present. Resolves from `projectTag` (highest priority after
882
+ * explicit `codingContext`), then from `cwd` via git detection.
883
+ *
884
+ * This is a no-op when:
885
+ * - `sessionKey` is missing
886
+ * - the session already has a coding context attached
887
+ * - codingMode.projectScope is disabled (CLAUDE.md #30)
888
+ * - neither `cwd` nor `projectTag` is provided
889
+ *
890
+ * Never throws — git resolution failures are silently ignored because not
891
+ * being in a repo is a normal runtime state.
892
+ */
893
+ private maybeAttachCodingContext;
894
+ recall(request: EngramAccessRecallRequest): Promise<EngramAccessRecallResponse>;
895
+ private executeRecall;
896
+ recallExplain(request?: EngramAccessRecallExplainRequest): Promise<EngramAccessRecallExplainResponse>;
897
+ recallTierExplain(sessionKey?: string, namespace?: string, authenticatedPrincipal?: string): Promise<RecallExplainJsonPayload>;
898
+ /**
899
+ * Recall X-ray (issue #570). Runs a recall with `xrayCapture: true`
900
+ * and returns the resulting snapshot as structured JSON so every
901
+ * surface (CLI / HTTP / MCP) gets the same payload. Namespace scope
902
+ * is enforced before the recall fires (CLAUDE.md rule 42 — read and
903
+ * write paths must resolve through the same namespace layer) so an
904
+ * unauthorized principal cannot capture an x-ray for a namespace it
905
+ * cannot read.
906
+ */
907
+ recallXray(request: {
908
+ query: string;
909
+ sessionKey?: string;
910
+ namespace?: string;
911
+ budget?: number;
912
+ authenticatedPrincipal?: string;
913
+ /**
914
+ * Disclosure depth used to shape per-result payload (issue #677
915
+ * PR 3/4). When set, each X-ray result is decorated with the
916
+ * matching `disclosure` field and `estimatedTokens` computed from
917
+ * the actual rendered content at that depth, so the renderer's
918
+ * "Token spend by disclosure" summary reflects real spend rather
919
+ * than staying empty when no caller wires the depth knob through.
920
+ */
921
+ disclosure?: RecallDisclosure;
922
+ /**
923
+ * Free-form recall tag filter (issue #689). Mirrors the field on
924
+ * `EngramAccessRecallRequest`. When non-empty, the captured X-ray
925
+ * snapshot's `results` are filtered down to memories whose
926
+ * frontmatter tags satisfy `tagMatch` ("any" by default), and a
927
+ * `tag-filter` entry is appended to `filters`.
928
+ */
929
+ tags?: string[];
930
+ /** Match mode for `tags`. See `EngramAccessRecallRequest.tagMatch`. */
931
+ tagMatch?: "any" | "all";
932
+ /** Recall planner mode override. Mirrors `EngramAccessRecallRequest.mode`. */
933
+ mode?: RecallPlanMode | "auto";
934
+ /**
935
+ * User-aware context scopes active for this recall. Forwarded into
936
+ * provenance construction so boundary scopes are evaluated against
937
+ * the caller's real context instead of an empty-context default.
938
+ */
939
+ currentContextScopes?: readonly unknown[];
940
+ /**
941
+ * Internal inspector affordance: include a recall-shaped response
942
+ * derived from the same X-ray snapshot. Left off by default so the
943
+ * regular X-ray API/CLI/MCP surfaces keep their existing payload shape.
944
+ */
945
+ includeRecall?: boolean;
946
+ }): Promise<{
947
+ snapshotFound: boolean;
948
+ snapshot?: RecallXraySnapshot;
949
+ recall?: EngramAccessRecallResponse;
950
+ }>;
951
+ private xrayQueue;
952
+ memoryStore(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessWriteResponse>;
953
+ peekMemoryStoreIdempotency(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessIdempotencyStatus>;
954
+ suggestionSubmit(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessWriteResponse>;
955
+ peekSuggestionSubmitIdempotency(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessIdempotencyStatus>;
956
+ private validateWriteCandidate;
957
+ memoryGet(memoryId: string, namespace?: string, principal?: string): Promise<EngramAccessMemoryResponse>;
958
+ memoryBrowse(request?: EngramAccessMemoryBrowseRequest): Promise<EngramAccessMemoryBrowseResponse>;
959
+ memoryTimeline(memoryId: string, namespace?: string, limit?: number, principal?: string): Promise<EngramAccessTimelineResponse>;
960
+ entityList(options?: {
961
+ namespace?: string;
962
+ query?: string;
963
+ limit?: number;
964
+ offset?: number;
965
+ }): Promise<EngramAccessEntityListResponse>;
966
+ entityGet(name: string, namespace?: string): Promise<EngramAccessEntityResponse>;
967
+ reviewQueue(runId?: string, namespace?: string, principal?: string): Promise<EngramAccessReviewQueueResponse>;
968
+ maintenance(namespace?: string, principal?: string): Promise<EngramAccessMaintenanceResponse>;
969
+ quality(namespace?: string, principal?: string): Promise<EngramAccessQualityResponse>;
970
+ governanceRun(request: {
971
+ namespace?: string;
972
+ mode?: "shadow" | "apply";
973
+ recentDays?: number;
974
+ maxMemories?: number;
975
+ batchSize?: number;
976
+ authenticatedPrincipal?: string;
977
+ }, principal?: string): Promise<{
978
+ namespace: string;
979
+ runId: string;
980
+ traceId: string;
981
+ mode: "shadow" | "apply";
982
+ reviewQueueCount: number;
983
+ proposedActionCount: number;
984
+ appliedActionCount: number;
985
+ summaryPath: string;
986
+ reportPath: string;
987
+ }>;
988
+ procedureMiningRun(request: {
989
+ namespace?: string;
990
+ authenticatedPrincipal?: string;
991
+ }, principal?: string): Promise<{
992
+ namespace: string;
993
+ clustersProcessed: number;
994
+ proceduresWritten: number;
995
+ skippedReason?: string;
996
+ }>;
997
+ liveConnectorsRun(request?: {
998
+ authenticatedPrincipal?: string;
999
+ force?: boolean;
1000
+ }, principal?: string): Promise<LiveConnectorsRunSummary>;
1001
+ /**
1002
+ * Run the pattern-reinforcement maintenance job (issue #687 PR 2/4).
1003
+ *
1004
+ * Cluster duplicate non-procedural memories and reinforce the
1005
+ * canonical (most-recent) member. Gated on
1006
+ * `patternReinforcementEnabled` — when disabled, returns
1007
+ * `{ ran: false, skippedReason: "disabled" }` so the cron payload
1008
+ * surface in CI logs cleanly.
1009
+ *
1010
+ * Resolves the namespace via the same writable path used by
1011
+ * `procedureMiningRun` so cross-tenant writes are impossible
1012
+ * (CLAUDE.md rule 42).
1013
+ *
1014
+ * Delegates the run to `orchestrator.runPatternReinforcement` so
1015
+ * the cadence floor (`patternReinforcementCadenceMs`) is enforced
1016
+ * uniformly across cron + MCP paths (PR #730 review feedback,
1017
+ * Codex P2). Accepts `force: true` for ad-hoc operator runs that
1018
+ * must bypass the cadence floor — mirrors the pattern used by
1019
+ * other maintenance MCP tools.
1020
+ */
1021
+ patternReinforcementRun(request?: {
1022
+ namespace?: string;
1023
+ authenticatedPrincipal?: string;
1024
+ force?: boolean;
1025
+ }, principal?: string): Promise<{
1026
+ namespace: string;
1027
+ ran: boolean;
1028
+ skippedReason?: "disabled" | "cadence";
1029
+ clustersFound: number;
1030
+ canonicalsUpdated: number;
1031
+ duplicatesSuperseded: number;
1032
+ result?: PatternReinforcementResult;
1033
+ }>;
1034
+ /**
1035
+ * Procedural memory stats (issue #567 PR 5/5). Read-only — resolves the
1036
+ * namespace via the same path used by `recallExplain` / `trustZoneStatus`
1037
+ * so cross-tenant reads are impossible (CLAUDE.md rule 42).
1038
+ */
1039
+ procedureStats(request?: {
1040
+ namespace?: string;
1041
+ }, principal?: string): Promise<ProcedureStatsReport & {
1042
+ namespace: string;
1043
+ }>;
1044
+ memorySummarizeHourly(): Promise<{
1045
+ ok: true;
1046
+ message: string;
1047
+ }>;
1048
+ conversationIndexUpdate(request?: {
1049
+ sessionKey?: string;
1050
+ hours?: number;
1051
+ embed?: boolean;
1052
+ }): Promise<{
1053
+ enabled: boolean;
1054
+ sessionKey?: string;
1055
+ sessions: number;
1056
+ chunks: number;
1057
+ skipped: number;
1058
+ skippedSessionKeys: string[];
1059
+ embeddedRuns: number;
1060
+ reason?: string;
1061
+ retryAfterMs?: number;
1062
+ }>;
1063
+ profilingReport(request?: AccessProfilingReportRequest): Promise<AccessProfilingReportResponse>;
1064
+ trustZoneStatus(namespace?: string, principal?: string): Promise<EngramAccessTrustZoneStatusResponse>;
1065
+ trustZoneBrowse(request: EngramAccessTrustZoneBrowseRequest, principal?: string): Promise<EngramAccessTrustZoneBrowseResponse>;
1066
+ trustZonePromote(request: EngramAccessTrustZonePromoteRequest): Promise<EngramAccessTrustZonePromoteResponse>;
1067
+ trustZoneDemoSeed(request: EngramAccessTrustZoneDemoSeedRequest): Promise<EngramAccessTrustZoneDemoSeedResponse>;
1068
+ reviewDisposition(request: EngramAccessReviewDispositionRequest): Promise<EngramAccessReviewDispositionResponse>;
1069
+ private serializeMemory;
1070
+ private serializeMemorySummary;
1071
+ observe(request: EngramAccessObserveRequest): Promise<EngramAccessObserveResponse>;
1072
+ lcmSearch(request: EngramAccessLcmSearchRequest): Promise<EngramAccessLcmSearchResponse>;
1073
+ lcmCompactionFlush(request: EngramAccessLcmCompactionFlushRequest): Promise<EngramAccessLcmCompactionFlushResponse>;
1074
+ lcmCompactionRecord(request: EngramAccessLcmCompactionRecordRequest): Promise<EngramAccessLcmCompactionRecordResponse>;
1075
+ continuityAuditGenerate(request: {
1076
+ period?: "weekly" | "monthly";
1077
+ key?: string;
1078
+ }): Promise<{
1079
+ enabled: boolean;
1080
+ reason?: string;
1081
+ period?: string;
1082
+ key?: string;
1083
+ reportPath?: string;
1084
+ }>;
1085
+ continuityIncidentOpen(request: {
1086
+ symptom: string;
1087
+ namespace?: string;
1088
+ principal?: string;
1089
+ triggerWindow?: string;
1090
+ suspectedCause?: string;
1091
+ }): Promise<unknown>;
1092
+ continuityIncidentClose(request: {
1093
+ id: string;
1094
+ namespace?: string;
1095
+ principal?: string;
1096
+ fixApplied: string;
1097
+ verificationResult: string;
1098
+ preventiveRule?: string;
1099
+ }): Promise<unknown>;
1100
+ continuityIncidentList(request: {
1101
+ state?: "open" | "closed" | "all";
1102
+ namespace?: string;
1103
+ principal?: string;
1104
+ limit?: number;
1105
+ }): Promise<unknown>;
1106
+ continuityLoopAddOrUpdate(request: {
1107
+ id: string;
1108
+ cadence: "daily" | "weekly" | "monthly" | "quarterly";
1109
+ purpose: string;
1110
+ status: "active" | "paused" | "retired";
1111
+ killCondition: string;
1112
+ namespace?: string;
1113
+ principal?: string;
1114
+ lastReviewed?: string;
1115
+ notes?: string;
1116
+ }): Promise<unknown>;
1117
+ continuityLoopReview(request: {
1118
+ id: string;
1119
+ namespace?: string;
1120
+ principal?: string;
1121
+ status?: "active" | "paused" | "retired";
1122
+ notes?: string;
1123
+ reviewedAt?: string;
1124
+ }): Promise<unknown>;
1125
+ identityAnchorGet(request: {
1126
+ namespace?: string;
1127
+ principal?: string;
1128
+ }): Promise<unknown>;
1129
+ /**
1130
+ * @deprecated since issue #679 PR 5/5 — the identity-anchor model is
1131
+ * superseded by the peer registry. Use `peerSet({ id: "self", ... })` or
1132
+ * `remnic peer set self` to update the self peer's identity kernel, and
1133
+ * `remnic peer migrate` to seed `peers/self/identity.md` from existing
1134
+ * legacy anchor data. This method continues to function for backward
1135
+ * compatibility but will be removed in a future major version.
1136
+ */
1137
+ identityAnchorUpdate(request: {
1138
+ namespace?: string;
1139
+ principal?: string;
1140
+ identityTraits?: string;
1141
+ communicationPreferences?: string;
1142
+ operatingPrinciples?: string;
1143
+ continuityNotes?: string;
1144
+ }): Promise<unknown>;
1145
+ memoryIdentity(request: {
1146
+ namespace?: string;
1147
+ principal?: string;
1148
+ }): Promise<unknown>;
1149
+ workTask(request: {
1150
+ action: "create" | "get" | "list" | "update" | "transition" | "delete";
1151
+ id?: string;
1152
+ title?: string;
1153
+ description?: string;
1154
+ status?: string;
1155
+ priority?: string;
1156
+ owner?: string;
1157
+ assignee?: string;
1158
+ projectId?: string;
1159
+ tags?: string[];
1160
+ dueAt?: string;
1161
+ }): Promise<unknown>;
1162
+ workProject(request: {
1163
+ action: "create" | "get" | "list" | "update" | "delete" | "link_task";
1164
+ id?: string;
1165
+ name?: string;
1166
+ description?: string;
1167
+ status?: string;
1168
+ owner?: string;
1169
+ tags?: string[];
1170
+ taskId?: string;
1171
+ projectId?: string;
1172
+ }): Promise<unknown>;
1173
+ workBoard(request: {
1174
+ action: "export_markdown" | "export_snapshot" | "import_snapshot";
1175
+ projectId?: string;
1176
+ snapshotJson?: string;
1177
+ linkToMemory?: boolean;
1178
+ }): Promise<unknown>;
1179
+ sharedContextWriteOutput(request: {
1180
+ agentId: string;
1181
+ title: string;
1182
+ content: string;
1183
+ }): Promise<unknown>;
1184
+ sharedFeedbackRecord(request: {
1185
+ agent: string;
1186
+ decision: "approved" | "approved_with_feedback" | "rejected";
1187
+ reason: string;
1188
+ date?: string;
1189
+ learning?: string;
1190
+ outcome?: string;
1191
+ severity?: "low" | "medium" | "high";
1192
+ confidence?: number;
1193
+ workflow?: string;
1194
+ tags?: string[];
1195
+ evidenceWindowStart?: string;
1196
+ evidenceWindowEnd?: string;
1197
+ refs?: string[];
1198
+ }): Promise<unknown>;
1199
+ sharedPrioritiesAppend(request: {
1200
+ agentId: string;
1201
+ text: string;
1202
+ }): Promise<unknown>;
1203
+ sharedContextCrossSignalsRun(request: {
1204
+ date?: string;
1205
+ }): Promise<unknown>;
1206
+ sharedContextCurateDaily(request: {
1207
+ date?: string;
1208
+ }): Promise<unknown>;
1209
+ compoundingWeeklySynthesize(request: {
1210
+ weekId?: string;
1211
+ }): Promise<unknown>;
1212
+ compoundingPromoteCandidate(request: {
1213
+ weekId: string;
1214
+ candidateId: string;
1215
+ dryRun?: boolean;
1216
+ }): Promise<unknown>;
1217
+ compressionGuidelinesOptimize(request: {
1218
+ dryRun?: boolean;
1219
+ eventLimit?: number;
1220
+ }): Promise<unknown>;
1221
+ compressionGuidelinesActivate(request: {
1222
+ expectedContentHash?: string;
1223
+ expectedGuidelineVersion?: number;
1224
+ }): Promise<unknown>;
1225
+ /** Conservative identity anchor section merge (matches tools.ts mergeIdentityAnchor logic). */
1226
+ private mergeIdentityAnchorSections;
1227
+ memorySearch(request: {
1228
+ query: string;
1229
+ namespace?: string;
1230
+ maxResults?: number;
1231
+ collection?: string;
1232
+ principal?: string;
1233
+ }): Promise<{
1234
+ query: string;
1235
+ results: Array<{
1236
+ path: string;
1237
+ score: number;
1238
+ snippet: string;
1239
+ }>;
1240
+ count: number;
1241
+ }>;
1242
+ memoryProfile(namespace?: string, principal?: string): Promise<Record<string, unknown>>;
1243
+ memoryEntitiesList(namespace?: string, principal?: string): Promise<{
1244
+ entities: string[];
1245
+ count: number;
1246
+ }>;
1247
+ memoryQuestions(namespace?: string, principal?: string): Promise<{
1248
+ questions: Array<{
1249
+ id: string;
1250
+ question: string;
1251
+ resolved: boolean;
1252
+ }>;
1253
+ count: number;
1254
+ }>;
1255
+ lastRecallSnapshot(sessionKey?: string): Promise<unknown>;
1256
+ intentDebug(namespace?: string): Promise<unknown>;
1257
+ qmdDebug(namespace?: string): Promise<unknown>;
1258
+ graphExplainLastRecall(namespace?: string): Promise<unknown>;
1259
+ /**
1260
+ * Read-only graph snapshot for the admin pane (issue #691 PR 2/5).
1261
+ *
1262
+ * Reads adjacency from the JSONL edge store written by `GraphIndex` and
1263
+ * resolves node metadata via the namespaced storage manager. Namespace
1264
+ * resolution mirrors the read-side path used by `recall` /
1265
+ * `procedureStats`, so multi-principal deployments can't leak edges from
1266
+ * a peer namespace (CLAUDE.md rule 42).
1267
+ */
1268
+ graphSnapshot(request: GraphSnapshotRequest & {
1269
+ namespace?: string;
1270
+ }, authenticatedPrincipal?: string): Promise<GraphSnapshotResponse>;
1271
+ memoryFeedback(request: {
1272
+ memoryId: string;
1273
+ vote: "up" | "down";
1274
+ note?: string;
1275
+ }): Promise<{
1276
+ recorded: boolean;
1277
+ enabled?: boolean;
1278
+ reason?: string;
1279
+ }>;
1280
+ /**
1281
+ * Record a Memory Worth outcome observation (issue #560 PR 3).
1282
+ *
1283
+ * This is distinct from `memoryFeedback` — feedback is a human thumbs
1284
+ * up/down on whether a recalled memory was relevant; outcome is an
1285
+ * automated signal about whether the session that consumed the memory
1286
+ * ultimately succeeded or failed. Outcomes feed the Laplace-smoothed
1287
+ * worth score (`computeMemoryWorth`, PR 2) that PR 4 will use to
1288
+ * downweight memories correlated with bad sessions.
1289
+ *
1290
+ * The underlying writer only touches fact-category memories. Corrections,
1291
+ * procedures, and other kinds return `{ ok: false, reason:
1292
+ * "ineligible_category" }` so a ledger drainer doesn't need to pre-filter.
1293
+ */
1294
+ memoryOutcome(request: {
1295
+ memoryId: string;
1296
+ outcome: MemoryOutcomeKind;
1297
+ namespace?: string;
1298
+ principal?: string;
1299
+ sessionKey?: string;
1300
+ timestamp?: string;
1301
+ }): Promise<RecordMemoryOutcomeResult>;
1302
+ memoryPromote(request: {
1303
+ memoryId: string;
1304
+ namespace?: string;
1305
+ principal?: string;
1306
+ sessionKey?: string;
1307
+ }): Promise<unknown>;
1308
+ memoryActionApply(request: {
1309
+ action: string;
1310
+ outcome?: string;
1311
+ reason?: string;
1312
+ memoryId?: string;
1313
+ namespace?: string;
1314
+ principal?: string;
1315
+ sessionKey?: string;
1316
+ content?: string;
1317
+ category?: string;
1318
+ linkTargetId?: string;
1319
+ linkType?: string;
1320
+ linkStrength?: number;
1321
+ artifactType?: string;
1322
+ execute?: boolean;
1323
+ sourcePrompt?: string;
1324
+ dryRun?: boolean;
1325
+ }): Promise<unknown>;
1326
+ contextCheckpoint(request: {
1327
+ sessionKey: string;
1328
+ context: string;
1329
+ namespace?: string;
1330
+ principal?: string;
1331
+ }): Promise<{
1332
+ saved: boolean;
1333
+ }>;
1334
+ lcmStatus(): Promise<EngramAccessLcmStatusResponse>;
1335
+ /**
1336
+ * Record citation usage from an observed oai-mem-citation block.
1337
+ * For each citation entry, extract the memory ID from the path and
1338
+ * increment its access tracking via the orchestrator. Returns the
1339
+ * count of submitted IDs and the count of IDs that matched real memories.
1340
+ */
1341
+ recordCitationUsage(request: {
1342
+ sessionId?: string;
1343
+ namespace?: string;
1344
+ authenticatedPrincipal?: string;
1345
+ entries: Array<{
1346
+ path: string;
1347
+ lineStart: number;
1348
+ lineEnd: number;
1349
+ note: string;
1350
+ }>;
1351
+ rolloutIds: string[];
1352
+ }): Promise<{
1353
+ submitted: number;
1354
+ matched: number;
1355
+ }>;
1356
+ /**
1357
+ * Gather a point-in-time `ConsoleStateSnapshot` from the orchestrator.
1358
+ *
1359
+ * Principal-aware: `resolveReadableNamespace` enforces ACL before the
1360
+ * snapshot is gathered, so callers cannot read a namespace they don't
1361
+ * have read access to (CLAUDE.md rule 42). The resolved namespace's
1362
+ * storage directory is forwarded as `config.memoryDir` so the ledger-
1363
+ * tail reader in `gatherConsoleState` scans the correct namespace root
1364
+ * rather than the global root. Read-only — never mutates orchestrator state.
1365
+ */
1366
+ consoleState(namespace?: string, principal?: string): Promise<ConsoleStateSnapshot>;
1367
+ /**
1368
+ * List all registered peers. Returns the array of `Peer` objects in
1369
+ * deterministic alphabetical order (mirroring `listPeers` storage semantics).
1370
+ */
1371
+ peerList(): Promise<{
1372
+ peers: Peer[];
1373
+ }>;
1374
+ /**
1375
+ * Get a single peer by id. Returns `{ found: false }` when the peer does
1376
+ * not exist rather than throwing, matching the `memoryGet` / `entityGet`
1377
+ * pattern used throughout the service.
1378
+ */
1379
+ peerGet(peerId: string): Promise<{
1380
+ found: true;
1381
+ peer: Peer;
1382
+ } | {
1383
+ found: false;
1384
+ }>;
1385
+ /**
1386
+ * Upsert a peer. Writes `peers/{id}/identity.md`. On first write the
1387
+ * `createdAt` timestamp is set to now; on subsequent writes only
1388
+ * `displayName` and `notes` are mutated (kind and createdAt are immutable
1389
+ * once set, per the storage contract).
1390
+ *
1391
+ * Returns `{ created: true }` on first write, `{ created: false }` on update.
1392
+ */
1393
+ peerSet(input: {
1394
+ id: string;
1395
+ kind?: string;
1396
+ displayName?: string;
1397
+ notes?: string;
1398
+ }): Promise<{
1399
+ ok: true;
1400
+ created: boolean;
1401
+ peer: Peer;
1402
+ }>;
1403
+ /**
1404
+ * Delete a peer by removing `peers/{id}/identity.md`. If the file does not
1405
+ * exist the call is a no-op (idempotent). The peer directory itself
1406
+ * (`peers/{id}/`) is intentionally left in place — profile and interaction
1407
+ * log data are not destroyed.
1408
+ */
1409
+ peerDelete(peerId: string): Promise<{
1410
+ ok: true;
1411
+ deleted: boolean;
1412
+ }>;
1413
+ /**
1414
+ * Destructively purge the entire peer directory for a given peerId —
1415
+ * `identity.md`, `profile.md`, `interactions.log.md`, and any other
1416
+ * files in `peers/{id}/`. Requires `confirm: "yes"` to prevent
1417
+ * accidental invocation.
1418
+ *
1419
+ * This is the DESTRUCTIVE counterpart to `peerDelete`, which only
1420
+ * removes `identity.md`. All companion files are permanently removed.
1421
+ *
1422
+ * Returns `{ ok: true, purged: true }` when the directory existed and
1423
+ * was removed; `{ ok: true, purged: false }` when the directory did
1424
+ * not exist (idempotent no-op).
1425
+ */
1426
+ peerForget(peerId: string, opts: {
1427
+ confirm: string;
1428
+ }): Promise<{
1429
+ ok: true;
1430
+ purged: boolean;
1431
+ }>;
1432
+ /**
1433
+ * Get the evolving cognitive profile for a peer. Returns `{ found: false }`
1434
+ * when no profile file exists yet (profile is written by the async reasoner,
1435
+ * PR 2/5). The peer identity itself need not exist for a profile to exist,
1436
+ * but in practice the reasoner only writes profiles for registered peers.
1437
+ */
1438
+ peerProfileGet(peerId: string): Promise<{
1439
+ found: true;
1440
+ profile: PeerProfile;
1441
+ } | {
1442
+ found: false;
1443
+ }>;
1444
+ get memoryDir(): string;
1445
+ /**
1446
+ * Resolve the storage directory for a given namespace. Used by the SSE
1447
+ * graph-event handler to subscribe to the correct per-namespace bus rather
1448
+ * than the global root (CLAUDE.md rule 42 — read/write paths must resolve
1449
+ * through the same namespace layer).
1450
+ *
1451
+ * `principal` must be the transport-bound request principal (from
1452
+ * `resolveRequestPrincipal`). When namespaces are enabled, an absent
1453
+ * principal causes `resolveReadableNamespace` to throw an auth error,
1454
+ * matching the behaviour of every other authenticated read path.
1455
+ *
1456
+ * Falls back to `this.memoryDir` when namespaces are disabled or the
1457
+ * namespace is absent, matching the behaviour of every other read path.
1458
+ */
1459
+ getMemoryDirForNamespace(namespace?: string, principal?: string): Promise<string>;
1460
+ getReadableStorageForNamespace(namespace?: string, principal?: string): Promise<{
1461
+ namespace: string;
1462
+ storage: StorageManager;
1463
+ }>;
1464
+ getWritableStorageForNamespace(namespace?: string, principal?: string): Promise<{
1465
+ namespace: string;
1466
+ storage: StorageManager;
1467
+ }>;
1468
+ get storageRef(): StorageManager;
1469
+ get configRef(): PluginConfig;
1470
+ get localLlmRef(): LocalLlmClient | null;
1471
+ get fallbackLlmRef(): FallbackLlmClient | null;
1472
+ get embeddingLookupFactoryRef(): (storage: StorageManager) => SemanticDedupLookup | undefined;
1473
+ /**
1474
+ * Import a capsule archive into the orchestrator's memory directory.
1475
+ *
1476
+ * Delegates directly to the standalone {@link importCapsuleFn} function.
1477
+ * The `root` parameter defaults to the orchestrator's `memoryDir` when
1478
+ * omitted, so callers that only have access to the service do not need to
1479
+ * thread the config value through.
1480
+ *
1481
+ * `versioning` defaults to the orchestrator's page-versioning config so
1482
+ * `mode: "overwrite"` automatically snapshots prior content without the
1483
+ * caller having to construct the config object.
1484
+ */
1485
+ capsuleImport(opts: Omit<ImportCapsuleOptions, "root" | "memoryDir"> & {
1486
+ root?: string;
1487
+ memoryDir?: string;
1488
+ namespace?: string;
1489
+ principal?: string;
1490
+ }): Promise<ImportCapsuleResult>;
1491
+ private validateCapsuleImportArchivePath;
1492
+ private isCapsuleImportPathInputFsError;
1493
+ private isCapsuleImportArchiveInputError;
1494
+ /**
1495
+ * Export a capsule archive from the orchestrator's memory directory.
1496
+ *
1497
+ * HTTP and future MCP surfaces use this rather than calling the transfer
1498
+ * helper directly so namespace ACL checks stay consistent with the archive
1499
+ * write side effect. The exporter still owns archive construction and
1500
+ * validation.
1501
+ */
1502
+ capsuleExport(opts: Omit<ExportCapsuleOptions, "root" | "memoryDir"> & {
1503
+ root?: string;
1504
+ memoryDir?: string;
1505
+ namespace?: string;
1506
+ principal?: string;
1507
+ }): Promise<ExportCapsuleResult>;
1508
+ /**
1509
+ * List capsule archives in the namespace-scoped capsule store.
1510
+ *
1511
+ * MCP uses this access-layer method instead of reading arbitrary paths so
1512
+ * capsule discovery remains bound to the same namespace ACLs as export and
1513
+ * import.
1514
+ */
1515
+ capsuleList(options?: {
1516
+ namespace?: string;
1517
+ principal?: string;
1518
+ }): Promise<EngramAccessCapsuleListResponse>;
1519
+ /**
1520
+ * Return per-phase Dreams telemetry for the last N hours (default 24).
1521
+ */
1522
+ dreamsStatus(options?: {
1523
+ windowHours?: number;
1524
+ namespace?: string;
1525
+ principal?: string;
1526
+ }): Promise<DreamsStatusResult>;
1527
+ /**
1528
+ * Manually invoke a single Dreams phase pass (PR 4/4).
1529
+ *
1530
+ * Deep-sleep delegates to memory governance (shadow → dry-run, apply → live).
1531
+ * Light-sleep and REM scan the observation ledger and memory corpus
1532
+ * respectively, returning the same telemetry shape as a scheduled run.
1533
+ */
1534
+ dreamsRun(options: {
1535
+ phase: DreamsPhase;
1536
+ dryRun?: boolean;
1537
+ namespace?: string;
1538
+ authenticatedPrincipal?: string;
1539
+ }): Promise<DreamsRunResult>;
1540
+ }
1541
+
1542
+ export { type EngramAccessTimelineResponse as $, type EngramAccessLcmCompactionFlushResponse as A, type EngramAccessLcmCompactionRecordRequest as B, type EngramAccessLcmCompactionRecordResponse as C, type EngramAccessLcmSearchRequest as D, EngramAccessService as E, type EngramAccessLcmSearchResponse as F, type EngramAccessLcmStatusResponse as G, type EngramAccessMaintenanceResponse as H, type EngramAccessMemoryBrowseRequest as I, type EngramAccessMemoryBrowseResponse as J, type EngramAccessMemoryRecord as K, type EngramAccessMemoryResponse as L, type EngramAccessMemoryStoreRequest as M, type EngramAccessMemorySummary as N, type EngramAccessObserveMessage as O, type PeerInteractionLogEntry as P, type EngramAccessObserveRequest as Q, type EngramAccessObserveResponse as R, type EngramAccessQualityResponse as S, type EngramAccessRecallExplainRequest as T, type EngramAccessRecallExplainResponse as U, type EngramAccessRecallRequest as V, type EngramAccessReviewDispositionRequest as W, type EngramAccessReviewDispositionResponse as X, type EngramAccessReviewQueueResponse as Y, type EngramAccessSetCodingContextRequest as Z, type EngramAccessSuggestionSubmitRequest as _, type EngramAccessRecallResponse as a, type EngramAccessTrustZoneBrowseRequest as a0, type EngramAccessTrustZoneBrowseResponse as a1, type EngramAccessTrustZoneDemoSeedRequest as a2, type EngramAccessTrustZoneDemoSeedResponse as a3, type EngramAccessTrustZonePromoteRequest as a4, type EngramAccessTrustZonePromoteResponse as a5, type EngramAccessTrustZoneRecordSummary as a6, type EngramAccessTrustZoneStatusResponse as a7, type EngramAccessWriteEnvelope as a8, type EngramAccessWriteResponse as a9, shapeMemorySummary as aa, type Peer as b, type PeerProfile as c, EngramAccessInputError as d, PEER_ID_MAX_LENGTH as e, PEER_ID_PATTERN as f, type PeerKind as g, type PeerProfileFieldProvenance as h, type ProcedureStatsConfigSnapshot as i, type ProcedureStatsRecent as j, type ProcedureStatsReport as k, type ProcedureStatusCounts as l, computeProcedureStats as m, formatProcedureStatsText as n, ENGRAM_ACCESS_WRITE_SCHEMA_VERSION as o, type EngramAccessActionConfidenceRequest as p, type EngramAccessActionConfidenceResponse as q, type EngramAccessBriefingRequest as r, type EngramAccessBriefingResponse as s, type EngramAccessCapsuleListResponse as t, type EngramAccessDaySummaryRequest as u, type EngramAccessEntityListResponse as v, type EngramAccessEntityResponse as w, type EngramAccessEntitySummary as x, type EngramAccessHealthResponse as y, type EngramAccessLcmCompactionFlushRequest as z };