@remnic/core 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +257 -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
@@ -1,2088 +0,0 @@
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 { r as readMemoryGovernanceRunArtifact } from './memory-projection-store-CY8TU40w.js';
8
- import { O as Orchestrator, I as IntentDebugSnapshot, G as GraphRecallSnapshot, P as PatternReinforcementResult, S as SemanticDedupLookup } from './orchestrator-DDMPqU6R.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 { MemoryOutcomeKind, RecordMemoryOutcomeResult } from './memory-worth-outcomes.js';
18
- import { VersioningConfig, VersioningLogger } from './page-versioning.js';
19
- import { z } from 'zod';
20
- import { CapsuleListEntry } from './capsule-cli.js';
21
- import { ActionConfidenceInput, ActionConfidenceResult } from './action-confidence.js';
22
-
23
- /**
24
- * Peer registry types — issue #679 PR 1/5.
25
- *
26
- * Generalizes the singular identity-anchor model to a multi-peer registry.
27
- * Every party Remnic interacts with — humans, agents, integrations, and
28
- * "self" — is represented as a `Peer` with an evolving cognitive profile.
29
- *
30
- * This module defines pure types only. Storage primitives live in
31
- * `./storage.ts`. Reasoner integration, recall injection, CLI/HTTP/MCP
32
- * surfaces, and migration of existing identity-anchor data ship in later
33
- * PRs (2/5 — 5/5).
34
- */
35
- /**
36
- * Kind of peer.
37
- *
38
- * - `self` — the current Remnic operator (replaces singular identity-anchor).
39
- * - `human` — another human collaborator distinct from self.
40
- * - `agent` — another AI agent (Claude Code, Codex, Hermes, etc.).
41
- * - `integration` — non-conversational integration (cron, webhook, importer).
42
- */
43
- type PeerKind = "self" | "human" | "agent" | "integration";
44
- /**
45
- * Stable, slow-changing facts about a peer.
46
- *
47
- * `id` matches `^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$`, 1-64 chars,
48
- * with no leading/trailing/consecutive dots or dashes. Stored on disk under
49
- * `peers/{id}/identity.md` as YAML frontmatter + markdown body.
50
- */
51
- interface Peer {
52
- /** Stable, opaque identifier. See PEER_ID_PATTERN. */
53
- readonly id: string;
54
- /** Kind of peer. Drives default profile schema and recall posture. */
55
- readonly kind: PeerKind;
56
- /** Human-readable display name. Distinct from `id`; mutable. */
57
- readonly displayName: string;
58
- /** ISO-8601 timestamp of first registration. */
59
- readonly createdAt: string;
60
- /** ISO-8601 timestamp of most recent update to identity. */
61
- readonly updatedAt: string;
62
- /** Optional free-form markdown body for the identity kernel. */
63
- readonly notes?: string;
64
- }
65
- /**
66
- * Evolving cognitive profile for a peer.
67
- *
68
- * Updated by the async profile reasoner (PR 2/5) from observable session
69
- * signals. Every field carries provenance back to its originating session
70
- * and signal. This PR only defines the shape — population is deferred.
71
- */
72
- interface PeerProfile {
73
- /** Peer this profile belongs to. */
74
- readonly peerId: string;
75
- /** ISO-8601 timestamp of most recent profile mutation. */
76
- readonly updatedAt: string;
77
- /**
78
- * Arbitrary key/value profile fields. Values are markdown strings.
79
- * Keys are stable section identifiers (e.g. `communication_style`,
80
- * `recurring_concerns`). The reasoner is responsible for choosing
81
- * keys; this PR does not constrain them beyond requiring strings.
82
- */
83
- readonly fields: Record<string, string>;
84
- /**
85
- * Per-field provenance. Maps field key → list of provenance entries.
86
- * A field may have multiple sources (the reasoner accumulates evidence
87
- * across sessions before promoting a field).
88
- */
89
- readonly provenance: Record<string, ReadonlyArray<PeerProfileFieldProvenance>>;
90
- }
91
- /**
92
- * Provenance for a single profile-field mutation.
93
- *
94
- * Reasoner output (PR 2/5) attaches one of these every time it touches a
95
- * field, so the user can audit exactly why a profile claim exists.
96
- */
97
- interface PeerProfileFieldProvenance {
98
- /** ISO-8601 timestamp the field was set/updated by this signal. */
99
- readonly observedAt: string;
100
- /** Originating session id (or other source identifier). */
101
- readonly sourceSessionId?: string;
102
- /** Short label for the signal type (e.g. "explicit_preference"). */
103
- readonly signal: string;
104
- /** Optional free-form note explaining the inference. */
105
- readonly note?: string;
106
- }
107
- /**
108
- * One row of the append-only interaction log for a peer.
109
- *
110
- * Stored on disk under `peers/{id}/interactions.log.md` as a sequence of
111
- * markdown bullet entries with a leading ISO-8601 timestamp. Append-only
112
- * by contract — the reasoner reads this log to derive profile updates.
113
- */
114
- interface PeerInteractionLogEntry {
115
- /** ISO-8601 timestamp the interaction occurred. */
116
- readonly timestamp: string;
117
- /** Originating session id, if any. */
118
- readonly sessionId?: string;
119
- /** Short kind label (e.g. "message", "tool_call", "preference_set"). */
120
- readonly kind: string;
121
- /** Free-form markdown summary of the interaction. */
122
- readonly summary: string;
123
- }
124
- /**
125
- * Regex enforced on `Peer.id`. Exported so callers can mirror validation
126
- * before constructing a `Peer`.
127
- *
128
- * Rules:
129
- * - 1-64 characters total
130
- * - First and last character must be `[A-Za-z0-9]`
131
- * - Interior may contain `.`, `_`, `-` in addition to alphanumerics
132
- * - No leading or trailing dot/dash/underscore
133
- * - No consecutive separators (`..`, `--`, `__`, `.-`, etc.)
134
- *
135
- * Cursor Medium: previously the regex allowed `a..b` even though the
136
- * docs claimed otherwise — a separate JS-side check enforced the rule
137
- * but the standalone PATTERN was wrong for any external consumer
138
- * relying on it. Tighten the regex itself so PEER_ID_PATTERN is the
139
- * single source of truth: an alphanumeric, optionally followed by
140
- * groups of (one separator + one-or-more alphanumerics), with the
141
- * final group ending on an alphanumeric. Negative lookahead-free so
142
- * it works in any JS engine.
143
- */
144
- declare const PEER_ID_PATTERN: RegExp;
145
- /** Maximum length for `Peer.id`. */
146
- declare const PEER_ID_MAX_LENGTH = 64;
147
-
148
- interface ConsoleBufferState {
149
- /** Number of turns currently held in the default buffer slot. */
150
- turnsCount: number;
151
- /** Approximate byte size of buffered content (UTF-8). */
152
- byteCount: number;
153
- }
154
- interface ConsoleExtractionVerdict {
155
- /** ISO-8601 timestamp the verdict was recorded. */
156
- ts: string;
157
- /** Verdict kind — typically "accept" | "reject" | "defer". */
158
- kind: string;
159
- /** Optional short reason from the judge or fallback. */
160
- reason?: string;
161
- }
162
- interface ConsoleExtractionQueueState {
163
- /** Number of pending extraction tasks queued in the orchestrator. */
164
- depth: number;
165
- /** Most recent judge verdicts, newest last. Capped at 25 entries. */
166
- recentVerdicts: ConsoleExtractionVerdict[];
167
- }
168
- interface ConsoleDedupDecision {
169
- /** ISO-8601 timestamp the decision was recorded. */
170
- ts: string;
171
- /** Outcome of the dedup check — "duplicate" | "novel" | etc. */
172
- decision: string;
173
- /** Optional content fingerprint (first 16 chars of a hash). */
174
- fingerprint?: string;
175
- /** Optional similarity score that drove the decision. */
176
- similarity?: number;
177
- }
178
- interface ConsoleMaintenanceLedgerEvent {
179
- /** ISO-8601 timestamp from the ledger row. */
180
- ts: string;
181
- /** Event category (e.g. "EXTRACTION_JUDGE_VERDICT"). */
182
- category: string;
183
- /** Compact one-line summary. */
184
- summary: string;
185
- }
186
- interface ConsoleQmdProbeState {
187
- /** Whether QMD is reachable via CLI or daemon. */
188
- available: boolean;
189
- /** Whether the daemon transport is in use. */
190
- daemonMode: boolean;
191
- /** Raw debug-status string from `qmd.debugStatus()`. */
192
- debug: string;
193
- }
194
- interface ConsoleDaemonInfo {
195
- /** Process uptime in milliseconds. */
196
- uptimeMs: number;
197
- /** Package / daemon version (best-effort). */
198
- version: string;
199
- }
200
- interface ConsoleStateSnapshot {
201
- /** ISO-8601 capture timestamp. */
202
- capturedAt: string;
203
- bufferState: ConsoleBufferState;
204
- extractionQueue: ConsoleExtractionQueueState;
205
- dedupRecent: ConsoleDedupDecision[];
206
- maintenanceLedgerTail: ConsoleMaintenanceLedgerEvent[];
207
- qmdProbe: ConsoleQmdProbeState;
208
- daemon: ConsoleDaemonInfo;
209
- /**
210
- * Subsystem read errors. One entry per failed reader keyed by
211
- * subsystem name (e.g. `"bufferState: ..."`). An empty array means
212
- * every section was read cleanly.
213
- */
214
- errors: string[];
215
- }
216
-
217
- /**
218
- * Procedural memory stats surface (issue #567 PR 5/5).
219
- *
220
- * Pure helper that tallies procedure memories by status and summarizes the
221
- * current `procedural.*` config so operators (and the dashboard) can see,
222
- * in one call, how procedural memory is behaving in a namespace.
223
- *
224
- * Consumed by:
225
- * - CLI `remnic procedural stats`
226
- * - HTTP `GET /engram/v1/procedural/stats`
227
- * - MCP `remnic.procedural_stats` (+ `engram.procedural_stats` alias)
228
- */
229
-
230
- interface ProcedureStatusCounts {
231
- total: number;
232
- active: number;
233
- pending_review: number;
234
- rejected: number;
235
- quarantined: number;
236
- superseded: number;
237
- archived: number;
238
- /** Any status the enum doesn't yet cover. */
239
- other: number;
240
- }
241
- interface ProcedureStatsConfigSnapshot {
242
- enabled: boolean;
243
- minOccurrences: number;
244
- successFloor: number;
245
- autoPromoteOccurrences: number;
246
- autoPromoteEnabled: boolean;
247
- lookbackDays: number;
248
- recallMaxProcedures: number;
249
- }
250
- interface ProcedureStatsRecent {
251
- /** ISO 8601 timestamp of the most recent procedure write, or null. */
252
- lastWriteAt: string | null;
253
- /** Count of procedure files with `created` (or `updated`) in the last 7 days. */
254
- writesLast7Days: number;
255
- /** Count of procedures whose `source` is the procedure miner. */
256
- minerSourced: number;
257
- }
258
- interface ProcedureStatsReport {
259
- schemaVersion: 1;
260
- generatedAt: string;
261
- counts: ProcedureStatusCounts;
262
- recent: ProcedureStatsRecent;
263
- config: ProcedureStatsConfigSnapshot;
264
- }
265
- /**
266
- * Read all memories from storage and tally procedures by status + recency.
267
- * `nowMs` is injectable so tests can pin the "last 7 days" window.
268
- */
269
- declare function computeProcedureStats(options: {
270
- storage: StorageManager;
271
- config: PluginConfig;
272
- nowMs?: number;
273
- }): Promise<ProcedureStatsReport>;
274
- /**
275
- * Render `ProcedureStatsReport` as a human-friendly plain-text block for CLI
276
- * operators. Keep it deterministic — no colors, no ANSI. Used by `--format text`.
277
- */
278
- declare function formatProcedureStatsText(report: ProcedureStatsReport): string;
279
-
280
- /**
281
- * Structured linkage to the capsule that was forked to produce this one.
282
- *
283
- * - `capsuleId` — the `id` field from the parent capsule's manifest block.
284
- * - `version` — the `version` field from the parent capsule's manifest block
285
- * at the time the fork was taken.
286
- * - `forkRoot` — the posix-relative directory prefix under which the parent's
287
- * records were planted inside the fork's memory root, e.g.
288
- * `forks/parent-id`. Stored here so downstream tooling can
289
- * locate the imported parent tree without re-parsing paths.
290
- */
291
- declare const CapsuleParentSchema: z.ZodObject<{
292
- capsuleId: z.ZodString;
293
- version: z.ZodString;
294
- /**
295
- * Posix-relative path prefix under the fork's memory root where the parent
296
- * capsule's records were placed. Typically `forks/<parent-capsule-id>`.
297
- * Must be a non-empty string with no leading slash.
298
- */
299
- forkRoot: z.ZodEffects<z.ZodString, string, string>;
300
- }, "strip", z.ZodTypeAny, {
301
- version: string;
302
- capsuleId: string;
303
- forkRoot: string;
304
- }, {
305
- version: string;
306
- capsuleId: string;
307
- forkRoot: string;
308
- }>;
309
- type CapsuleParent = z.infer<typeof CapsuleParentSchema>;
310
- declare const CapsuleBlockSchema: z.ZodObject<{
311
- id: z.ZodString;
312
- version: z.ZodString;
313
- /**
314
- * Taxonomy schema version the capsule was authored against. Free-form for
315
- * now; later PRs may tighten this to a known taxonomy registry.
316
- */
317
- schemaVersion: z.ZodString;
318
- /**
319
- * Optional reference to the parent capsule this one was forked or derived
320
- * from. `null` (not `undefined`) is the explicit "no parent" sentinel so
321
- * that round-trips through JSON do not silently drop the field.
322
- *
323
- * @deprecated Prefer {@link parent} (structured). This field is preserved
324
- * for backward compatibility with V2 manifests written before PR 4/6.
325
- */
326
- parentCapsule: z.ZodNullable<z.ZodString>;
327
- /**
328
- * Structured fork-lineage pointer added in PR 4/6. When present, this
329
- * capsule is a fork of the described parent. `null` is the explicit
330
- * "not a fork" sentinel — round-trips through JSON cleanly without
331
- * silently dropping the field.
332
- *
333
- * Defaults to `null` so that V2 manifests written before PR 4/6 (which
334
- * omit this field) still parse without error. This preserves backward
335
- * compatibility with the existing `makeV2Manifest()` test fixtures and
336
- * any in-the-wild V2 archives produced by PR 2/6 and PR 3/6.
337
- *
338
- * Invariant: when `parent` is non-null, `parentCapsule` SHOULD equal
339
- * `parent.capsuleId` for backward compatibility with readers that only
340
- * understand the legacy field. `forkCapsule()` sets both.
341
- */
342
- parent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
343
- capsuleId: z.ZodString;
344
- version: z.ZodString;
345
- /**
346
- * Posix-relative path prefix under the fork's memory root where the parent
347
- * capsule's records were placed. Typically `forks/<parent-capsule-id>`.
348
- * Must be a non-empty string with no leading slash.
349
- */
350
- forkRoot: z.ZodEffects<z.ZodString, string, string>;
351
- }, "strip", z.ZodTypeAny, {
352
- version: string;
353
- capsuleId: string;
354
- forkRoot: string;
355
- }, {
356
- version: string;
357
- capsuleId: string;
358
- forkRoot: string;
359
- }>>>;
360
- description: z.ZodString;
361
- retrievalPolicy: z.ZodObject<{
362
- /**
363
- * Per-tier weight overrides applied during recall when the capsule is the
364
- * active scope. Keys are tier names (e.g. `bm25`, `vector`, `graph`); values
365
- * are non-negative finite multipliers. The set of valid keys is left open
366
- * for now so future tiers do not break older manifests.
367
- */
368
- tierWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
369
- /**
370
- * Whether the direct-answer fast path is allowed when this capsule is
371
- * active. Operators may disable it for capsules whose contents should
372
- * always flow through the full retrieval pipeline.
373
- */
374
- directAnswerEnabled: z.ZodBoolean;
375
- }, "strip", z.ZodTypeAny, {
376
- tierWeights: Record<string, number>;
377
- directAnswerEnabled: boolean;
378
- }, {
379
- tierWeights: Record<string, number>;
380
- directAnswerEnabled: boolean;
381
- }>;
382
- includes: z.ZodObject<{
383
- taxonomy: z.ZodBoolean;
384
- identityAnchors: z.ZodBoolean;
385
- peerProfiles: z.ZodBoolean;
386
- procedural: z.ZodBoolean;
387
- }, "strip", z.ZodTypeAny, {
388
- procedural: boolean;
389
- taxonomy: boolean;
390
- identityAnchors: boolean;
391
- peerProfiles: boolean;
392
- }, {
393
- procedural: boolean;
394
- taxonomy: boolean;
395
- identityAnchors: boolean;
396
- peerProfiles: boolean;
397
- }>;
398
- }, "strip", z.ZodTypeAny, {
399
- includes: {
400
- procedural: boolean;
401
- taxonomy: boolean;
402
- identityAnchors: boolean;
403
- peerProfiles: boolean;
404
- };
405
- schemaVersion: string;
406
- id: string;
407
- description: string;
408
- version: string;
409
- parentCapsule: string | null;
410
- parent: {
411
- version: string;
412
- capsuleId: string;
413
- forkRoot: string;
414
- } | null;
415
- retrievalPolicy: {
416
- tierWeights: Record<string, number>;
417
- directAnswerEnabled: boolean;
418
- };
419
- }, {
420
- includes: {
421
- procedural: boolean;
422
- taxonomy: boolean;
423
- identityAnchors: boolean;
424
- peerProfiles: boolean;
425
- };
426
- schemaVersion: string;
427
- id: string;
428
- description: string;
429
- version: string;
430
- parentCapsule: string | null;
431
- retrievalPolicy: {
432
- tierWeights: Record<string, number>;
433
- directAnswerEnabled: boolean;
434
- };
435
- parent?: {
436
- version: string;
437
- capsuleId: string;
438
- forkRoot: string;
439
- } | null | undefined;
440
- }>;
441
- type CapsuleBlock = z.infer<typeof CapsuleBlockSchema>;
442
- declare const ExportManifestV2Schema: z.ZodObject<{
443
- format: z.ZodLiteral<"openclaw-engram-export">;
444
- schemaVersion: z.ZodLiteral<2>;
445
- createdAt: z.ZodString;
446
- pluginVersion: z.ZodString;
447
- includesTranscripts: z.ZodBoolean;
448
- files: z.ZodArray<z.ZodObject<{
449
- path: z.ZodString;
450
- sha256: z.ZodString;
451
- bytes: z.ZodNumber;
452
- }, "strip", z.ZodTypeAny, {
453
- path: string;
454
- sha256: string;
455
- bytes: number;
456
- }, {
457
- path: string;
458
- sha256: string;
459
- bytes: number;
460
- }>, "many">;
461
- capsule: z.ZodObject<{
462
- id: z.ZodString;
463
- version: z.ZodString;
464
- /**
465
- * Taxonomy schema version the capsule was authored against. Free-form for
466
- * now; later PRs may tighten this to a known taxonomy registry.
467
- */
468
- schemaVersion: z.ZodString;
469
- /**
470
- * Optional reference to the parent capsule this one was forked or derived
471
- * from. `null` (not `undefined`) is the explicit "no parent" sentinel so
472
- * that round-trips through JSON do not silently drop the field.
473
- *
474
- * @deprecated Prefer {@link parent} (structured). This field is preserved
475
- * for backward compatibility with V2 manifests written before PR 4/6.
476
- */
477
- parentCapsule: z.ZodNullable<z.ZodString>;
478
- /**
479
- * Structured fork-lineage pointer added in PR 4/6. When present, this
480
- * capsule is a fork of the described parent. `null` is the explicit
481
- * "not a fork" sentinel — round-trips through JSON cleanly without
482
- * silently dropping the field.
483
- *
484
- * Defaults to `null` so that V2 manifests written before PR 4/6 (which
485
- * omit this field) still parse without error. This preserves backward
486
- * compatibility with the existing `makeV2Manifest()` test fixtures and
487
- * any in-the-wild V2 archives produced by PR 2/6 and PR 3/6.
488
- *
489
- * Invariant: when `parent` is non-null, `parentCapsule` SHOULD equal
490
- * `parent.capsuleId` for backward compatibility with readers that only
491
- * understand the legacy field. `forkCapsule()` sets both.
492
- */
493
- parent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
494
- capsuleId: z.ZodString;
495
- version: z.ZodString;
496
- /**
497
- * Posix-relative path prefix under the fork's memory root where the parent
498
- * capsule's records were placed. Typically `forks/<parent-capsule-id>`.
499
- * Must be a non-empty string with no leading slash.
500
- */
501
- forkRoot: z.ZodEffects<z.ZodString, string, string>;
502
- }, "strip", z.ZodTypeAny, {
503
- version: string;
504
- capsuleId: string;
505
- forkRoot: string;
506
- }, {
507
- version: string;
508
- capsuleId: string;
509
- forkRoot: string;
510
- }>>>;
511
- description: z.ZodString;
512
- retrievalPolicy: z.ZodObject<{
513
- /**
514
- * Per-tier weight overrides applied during recall when the capsule is the
515
- * active scope. Keys are tier names (e.g. `bm25`, `vector`, `graph`); values
516
- * are non-negative finite multipliers. The set of valid keys is left open
517
- * for now so future tiers do not break older manifests.
518
- */
519
- tierWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
520
- /**
521
- * Whether the direct-answer fast path is allowed when this capsule is
522
- * active. Operators may disable it for capsules whose contents should
523
- * always flow through the full retrieval pipeline.
524
- */
525
- directAnswerEnabled: z.ZodBoolean;
526
- }, "strip", z.ZodTypeAny, {
527
- tierWeights: Record<string, number>;
528
- directAnswerEnabled: boolean;
529
- }, {
530
- tierWeights: Record<string, number>;
531
- directAnswerEnabled: boolean;
532
- }>;
533
- includes: z.ZodObject<{
534
- taxonomy: z.ZodBoolean;
535
- identityAnchors: z.ZodBoolean;
536
- peerProfiles: z.ZodBoolean;
537
- procedural: z.ZodBoolean;
538
- }, "strip", z.ZodTypeAny, {
539
- procedural: boolean;
540
- taxonomy: boolean;
541
- identityAnchors: boolean;
542
- peerProfiles: boolean;
543
- }, {
544
- procedural: boolean;
545
- taxonomy: boolean;
546
- identityAnchors: boolean;
547
- peerProfiles: boolean;
548
- }>;
549
- }, "strip", z.ZodTypeAny, {
550
- includes: {
551
- procedural: boolean;
552
- taxonomy: boolean;
553
- identityAnchors: boolean;
554
- peerProfiles: boolean;
555
- };
556
- schemaVersion: string;
557
- id: string;
558
- description: string;
559
- version: string;
560
- parentCapsule: string | null;
561
- parent: {
562
- version: string;
563
- capsuleId: string;
564
- forkRoot: string;
565
- } | null;
566
- retrievalPolicy: {
567
- tierWeights: Record<string, number>;
568
- directAnswerEnabled: boolean;
569
- };
570
- }, {
571
- includes: {
572
- procedural: boolean;
573
- taxonomy: boolean;
574
- identityAnchors: boolean;
575
- peerProfiles: boolean;
576
- };
577
- schemaVersion: string;
578
- id: string;
579
- description: string;
580
- version: string;
581
- parentCapsule: string | null;
582
- retrievalPolicy: {
583
- tierWeights: Record<string, number>;
584
- directAnswerEnabled: boolean;
585
- };
586
- parent?: {
587
- version: string;
588
- capsuleId: string;
589
- forkRoot: string;
590
- } | null | undefined;
591
- }>;
592
- }, "strip", z.ZodTypeAny, {
593
- schemaVersion: 2;
594
- createdAt: string;
595
- files: {
596
- path: string;
597
- sha256: string;
598
- bytes: number;
599
- }[];
600
- format: "openclaw-engram-export";
601
- pluginVersion: string;
602
- includesTranscripts: boolean;
603
- capsule: {
604
- includes: {
605
- procedural: boolean;
606
- taxonomy: boolean;
607
- identityAnchors: boolean;
608
- peerProfiles: boolean;
609
- };
610
- schemaVersion: string;
611
- id: string;
612
- description: string;
613
- version: string;
614
- parentCapsule: string | null;
615
- parent: {
616
- version: string;
617
- capsuleId: string;
618
- forkRoot: string;
619
- } | null;
620
- retrievalPolicy: {
621
- tierWeights: Record<string, number>;
622
- directAnswerEnabled: boolean;
623
- };
624
- };
625
- }, {
626
- schemaVersion: 2;
627
- createdAt: string;
628
- files: {
629
- path: string;
630
- sha256: string;
631
- bytes: number;
632
- }[];
633
- format: "openclaw-engram-export";
634
- pluginVersion: string;
635
- includesTranscripts: boolean;
636
- capsule: {
637
- includes: {
638
- procedural: boolean;
639
- taxonomy: boolean;
640
- identityAnchors: boolean;
641
- peerProfiles: boolean;
642
- };
643
- schemaVersion: string;
644
- id: string;
645
- description: string;
646
- version: string;
647
- parentCapsule: string | null;
648
- retrievalPolicy: {
649
- tierWeights: Record<string, number>;
650
- directAnswerEnabled: boolean;
651
- };
652
- parent?: {
653
- version: string;
654
- capsuleId: string;
655
- forkRoot: string;
656
- } | null | undefined;
657
- };
658
- }>;
659
- type ExportManifestV2 = z.infer<typeof ExportManifestV2Schema>;
660
-
661
- /**
662
- * Conflict-resolution mode for {@link importCapsule}. Inverse of the
663
- * `mode` selector in PR 4/6's CLI surface.
664
- *
665
- * - `"skip"` (default) — when a target file already exists at the same
666
- * relative path, leave it untouched. The corresponding record is reported
667
- * via {@link ImportCapsuleResult.skipped}.
668
- * - `"overwrite"` — when a target file exists, snapshot the prior content
669
- * via {@link createVersion} (gotcha #54: write-before-delete; gotcha #25:
670
- * don't destroy old state until new state is confirmed), then write the
671
- * incoming content. The snapshot's `note` includes the source capsule id.
672
- * - `"fork"` — never overwrite. Every record is rebased under
673
- * `forks/<capsule-id>/<original-path>` and any YAML-frontmatter `id:`
674
- * field is rewritten to a new fork-scoped value. The original tree is
675
- * not touched.
676
- *
677
- * The mode is selected once per call and applied uniformly to every record
678
- * in the bundle. Mixed-mode imports are not supported by design — that
679
- * would let a single corrupted manifest silently land partial state.
680
- */
681
- type ImportCapsuleMode = "skip" | "overwrite" | "fork";
682
- /**
683
- * Options accepted by {@link importCapsule}.
684
- *
685
- * `archivePath` — absolute or cwd-relative path to a `.capsule.json.gz`
686
- * archive produced by `exportCapsule`. The archive must contain a V2
687
- * bundle (`schemaVersion: 2`); V1 archives are rejected.
688
- *
689
- * `root` — absolute or cwd-relative path to the memory directory that
690
- * will receive the records. Must be an existing directory.
691
- *
692
- * `mode` — see {@link ImportCapsuleMode}. Defaults to `"skip"`.
693
- *
694
- * `versioning` — optional page-versioning config used by `mode: "overwrite"`
695
- * to snapshot prior content before replacing it. Snapshots are skipped when
696
- * not provided or when `enabled === false`. Tests pass an enabled config
697
- * to assert snapshot creation; production callers thread the
698
- * orchestrator's resolved versioning config.
699
- *
700
- * `log` — optional logger forwarded to {@link createVersion}.
701
- *
702
- * `now` — optional clock override (ms epoch) used to derive deterministic
703
- * fork ids in tests. Production callers omit this.
704
- */
705
- interface ImportCapsuleOptions {
706
- archivePath: string;
707
- root: string;
708
- mode?: ImportCapsuleMode;
709
- versioning?: VersioningConfig;
710
- log?: VersioningLogger;
711
- now?: number;
712
- /**
713
- * Memory directory whose secure-store keyring is used when the archive is
714
- * encrypted. Required when `archivePath` ends with `.enc` or when the file
715
- * starts with the REMNIC-ENC magic header. If `memoryDir` is omitted and the
716
- * archive turns out to be encrypted, `importCapsule` throws a clear error
717
- * rather than silently failing.
718
- *
719
- * When provided and the archive is NOT encrypted, the value is ignored.
720
- */
721
- memoryDir?: string;
722
- }
723
- interface ImportCapsuleSkippedRecord {
724
- /** Original record path (capsule-relative, posix). */
725
- path: string;
726
- /**
727
- * Why this record was not written.
728
- *
729
- * `"exists"` — the target path already existed and the mode was `"skip"`,
730
- * OR the computed fork path already existed in fork mode.
731
- *
732
- * `"checksum_mismatch"` is intentionally absent: a checksum failure aborts
733
- * the import entirely (fail-closed) rather than skipping the offending
734
- * record, so no `ImportCapsuleSkippedRecord` is ever produced for it.
735
- */
736
- reason: "exists";
737
- }
738
- interface ImportCapsuleImportedRecord {
739
- /** Capsule-relative posix path the record carried. */
740
- sourcePath: string;
741
- /** Memory-dir-relative posix path the file was written to. */
742
- targetPath: string;
743
- /** Whether a prior version snapshot was taken (overwrite-mode only). */
744
- snapshotted: boolean;
745
- /** Whether the frontmatter `id:` field was rewritten (fork-mode only). */
746
- rewroteId: boolean;
747
- }
748
- interface ImportCapsuleResult {
749
- /** Records that landed on disk. */
750
- imported: ImportCapsuleImportedRecord[];
751
- /** Records that were not written. */
752
- skipped: ImportCapsuleSkippedRecord[];
753
- /** The manifest decoded from the archive. */
754
- manifest: ExportManifestV2;
755
- }
756
-
757
- /**
758
- * Options accepted by {@link exportCapsule}.
759
- *
760
- * `name` — capsule id, validated against {@link CAPSULE_ID_PATTERN}. The id
761
- * also forms the manifest's `capsule.id` and the archive filename.
762
- *
763
- * `root` — absolute or cwd-relative path to the memory directory to export.
764
- *
765
- * `since` — optional ISO-8601 timestamp; only files with `mtime >= since`
766
- * are included.
767
- *
768
- * `includeKinds` — optional allow-list of top-level subdirectory names
769
- * (e.g. `facts`, `entities`, `corrections`, `transcripts`). When set, files
770
- * directly under {@link root} are excluded and only files whose first path
771
- * segment is in the allow-list are kept. Pass `transcripts` here explicitly
772
- * to opt-in transcripts (they are excluded by default).
773
- *
774
- * `peerIds` — optional allow-list restricting the `peers/` tree to files
775
- * under `peers/<peerId>/...`. When omitted the entire `peers/` tree is
776
- * included (subject to {@link includeKinds}). When set to an empty array
777
- * the `peers/` tree is excluded entirely.
778
- *
779
- * `outDir` — optional output directory. Defaults to `<root>/.capsules`.
780
- *
781
- * `pluginVersion` — recorded in the manifest. Defaults to `"0.0.0"` so
782
- * tests do not need to thread a version through; production callers SHOULD
783
- * pass the running plugin version.
784
- *
785
- * `capsule` — optional overrides for the manifest's `capsule` block. The
786
- * caller may pass any subset; remaining fields are filled with conservative
787
- * defaults documented inline below.
788
- *
789
- * `now` — optional clock override (ms epoch) used for `manifest.createdAt`.
790
- * Tests pass a fixed value for deterministic output.
791
- *
792
- * `encrypt` — when `true`, encrypt the output archive using the secure-store
793
- * master key for `memoryDir`. The keyring must be unlocked before calling
794
- * (`remnic secure-store unlock`). The plaintext `.capsule.json.gz` is written
795
- * first, then encrypted to `<name>.capsule.json.gz.enc`; the plaintext is
796
- * removed after successful encryption. Requires `memoryDir` to be provided.
797
- *
798
- * `memoryDir` — required when `encrypt` is `true`. The memory directory whose
799
- * secure-store keyring holds the master key.
800
- */
801
- interface ExportCapsuleOptions {
802
- name: string;
803
- root: string;
804
- since?: string;
805
- includeKinds?: readonly string[];
806
- peerIds?: readonly string[];
807
- outDir?: string;
808
- pluginVersion?: string;
809
- capsule?: Partial<Omit<CapsuleBlock, "id">>;
810
- now?: number;
811
- /**
812
- * When `true`, encrypt the output archive. Requires the secure-store to be
813
- * unlocked and `memoryDir` to be set. The plaintext `.capsule.json.gz` is
814
- * replaced by `<name>.capsule.json.gz.enc` on success.
815
- */
816
- encrypt?: boolean;
817
- /**
818
- * Memory directory whose secure-store keyring holds the master key. Required
819
- * when `encrypt` is `true`; ignored otherwise.
820
- */
821
- memoryDir?: string;
822
- /**
823
- * When `true`, include the `transcripts/` directory in the export even
824
- * though it is excluded by default. Using this flag avoids hard-coding an
825
- * explicit `includeKinds` allow-list that would inadvertently drop other
826
- * valid memory directories (`peers/`, `forks/`, etc.). (Cursor / #747)
827
- *
828
- * Ignored when `includeKinds` is provided and already contains
829
- * `"transcripts"`.
830
- */
831
- includeTranscripts?: boolean;
832
- }
833
- interface ExportCapsuleResult {
834
- archivePath: string;
835
- manifestPath: string;
836
- manifest: ExportManifestV2;
837
- /** When the export was encrypted, the `.enc` path. `null` when unencrypted. */
838
- encryptedArchivePath: string | null;
839
- }
840
-
841
- declare class EngramAccessInputError extends Error {
842
- }
843
- type AccessProfilingReportRequest = {
844
- format?: string;
845
- limit?: number;
846
- };
847
- type AccessProfilingReportResponse = {
848
- enabled: boolean;
849
- format?: "ascii" | "json";
850
- report?: string;
851
- traces?: unknown[];
852
- stats?: unknown;
853
- bottleneck?: string | null;
854
- reason?: string;
855
- message?: string;
856
- };
857
- declare const ENGRAM_ACCESS_WRITE_SCHEMA_VERSION = 1;
858
- interface EngramAccessHealthResponse {
859
- ok: true;
860
- memoryDir: string;
861
- namespacesEnabled: boolean;
862
- defaultNamespace: string;
863
- searchBackend: string;
864
- qmdEnabled: boolean;
865
- nativeKnowledgeEnabled: boolean;
866
- projectionAvailable: boolean;
867
- }
868
- interface EngramAccessRecallRequest {
869
- query: string;
870
- sessionKey?: string;
871
- namespace?: string;
872
- authenticatedPrincipal?: string;
873
- topK?: number;
874
- mode?: RecallPlanMode | "auto";
875
- includeDebug?: boolean;
876
- /**
877
- * Recall disclosure depth (issue #677). Selects how much content each
878
- * result returns: `"chunk"` (default), `"section"`, or `"raw"`. Omitting
879
- * this field is equivalent to passing `"chunk"` and preserves pre-#677
880
- * behavior. Surfaces (CLI / HTTP / MCP) and per-level token telemetry
881
- * are wired in subsequent PRs of #677.
882
- */
883
- disclosure?: RecallDisclosure;
884
- /**
885
- * Coding-agent context (issue #569). When a connector resolves a git
886
- * context for the session's cwd, it passes it here and the access service
887
- * attaches it to the orchestrator before recall so project- / branch-
888
- * scoped namespace overlays apply.
889
- *
890
- * Keyed by `sessionKey`; ignored when `sessionKey` is absent.
891
- */
892
- codingContext?: {
893
- projectId: string;
894
- branch: string | null;
895
- rootPath: string;
896
- defaultBranch: string | null;
897
- } | null;
898
- /**
899
- * Working directory of the calling agent session. When provided and no
900
- * `codingContext` is already attached to the session, the service resolves
901
- * git context from this path and attaches it automatically. This enables
902
- * Claude Code hooks (and any connector that knows its cwd) to get
903
- * project-scoped memory without explicitly constructing a `codingContext`.
904
- */
905
- cwd?: string;
906
- /**
907
- * Arbitrary project tag for non-git-based project scoping. When provided,
908
- * creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
909
- * Useful for OpenClaw sessions where the whole workspace is one git repo
910
- * but different conversations correspond to different client projects.
911
- * Takes precedence over `cwd`-based git resolution but NOT over an
912
- * explicit `codingContext`.
913
- */
914
- projectTag?: string;
915
- /**
916
- * Historical recall pin (issue #680). ISO 8601 timestamp. When set,
917
- * the orchestrator filters out memories whose `valid_at` is after this
918
- * instant OR whose `invalid_at` is at-or-before this instant, so the
919
- * caller sees the corpus as it existed at `asOf`. Invalid values are
920
- * rejected here with `EngramAccessInputError` (CLAUDE.md rule 51).
921
- */
922
- asOf?: string;
923
- /**
924
- * Free-form recall tag filter (issue #689). When non-empty, recall results
925
- * whose frontmatter `tags` do not match are removed from the response.
926
- * Comparison is case-sensitive exact match against tags stored on each
927
- * memory's frontmatter (see `storage.ts` and `docs/tags.md`).
928
- */
929
- tags?: string[];
930
- /**
931
- * Match mode for `tags` (issue #689). `"any"` (default when omitted)
932
- * admits results that carry at least one filter tag. `"all"` requires
933
- * every filter tag to be present. Ignored when `tags` is absent or empty.
934
- */
935
- tagMatch?: "any" | "all";
936
- /**
937
- * Issue #681 — when `true`, bypasses the configured
938
- * `graphTraversalConfidenceFloor` for this recall and includes graph edges
939
- * below the floor in traversal. Useful for diagnostic queries that need to
940
- * surface results pruned by confidence decay. Default `false`.
941
- */
942
- includeLowConfidence?: boolean;
943
- }
944
- /**
945
- * Standalone request to attach / clear the coding context for a session
946
- * without performing a recall. Used by the Claude Code / Codex connectors
947
- * at session start, and by the `remnic.set_coding_context` MCP tool (PR 7).
948
- */
949
- interface EngramAccessSetCodingContextRequest {
950
- sessionKey: string;
951
- codingContext: {
952
- projectId: string;
953
- branch: string | null;
954
- rootPath: string;
955
- defaultBranch: string | null;
956
- } | null;
957
- }
958
- interface EngramAccessRecallResponse {
959
- query: string;
960
- sessionKey?: string;
961
- namespace: string;
962
- context: string;
963
- count: number;
964
- memoryIds: string[];
965
- results: EngramAccessMemorySummary[];
966
- recordedAt?: string;
967
- traceId?: string;
968
- plannerMode?: RecallPlanMode;
969
- fallbackUsed: boolean;
970
- sourcesUsed: string[];
971
- /**
972
- * Disclosure depth applied to this recall (issue #677). Reflects the
973
- * caller-requested level after defaulting; useful for surfaces that want
974
- * to render a "served at depth X" hint without re-deriving it. PR 1 of
975
- * #677 wires this end-to-end for plumbing only — section/raw payload
976
- * shaping ships in later PRs.
977
- */
978
- disclosure: RecallDisclosure;
979
- budgetsApplied?: LastRecallSnapshot["budgetsApplied"];
980
- auditAnomalies?: AnomalyDetectorResult;
981
- budgetWarning?: BudgetDecision;
982
- latencyMs?: number;
983
- debug?: {
984
- snapshot?: LastRecallSnapshot;
985
- intent?: IntentDebugSnapshot | null;
986
- graph?: GraphRecallSnapshot | null;
987
- };
988
- }
989
- interface EngramAccessRecallExplainRequest {
990
- sessionKey?: string;
991
- namespace?: string;
992
- }
993
- interface EngramAccessRecallExplainResponse {
994
- found: boolean;
995
- snapshot?: LastRecallSnapshot;
996
- intent?: IntentDebugSnapshot | null;
997
- graph?: GraphRecallSnapshot | null;
998
- }
999
- interface EngramAccessDaySummaryRequest {
1000
- memories?: string;
1001
- sessionKey?: string;
1002
- namespace?: string;
1003
- }
1004
- /** Inputs accepted by the `remnic_briefing` MCP tool. */
1005
- interface EngramAccessBriefingRequest {
1006
- since?: string;
1007
- focus?: string;
1008
- namespace?: string;
1009
- format?: "markdown" | "json";
1010
- maxFollowups?: number;
1011
- /** Caller principal for namespace access checks. Transport-bound — never from untrusted payloads. */
1012
- principal?: string;
1013
- }
1014
- /** Response for `remnic_briefing`. */
1015
- interface EngramAccessBriefingResponse {
1016
- format: "markdown" | "json";
1017
- window: {
1018
- from: string;
1019
- to: string;
1020
- };
1021
- namespace: string;
1022
- markdown: string;
1023
- json: Record<string, unknown>;
1024
- followupsUnavailableReason?: string;
1025
- }
1026
- interface EngramAccessMemoryRecord {
1027
- id: string;
1028
- path: string;
1029
- category: string;
1030
- status?: string;
1031
- created?: string;
1032
- updated?: string;
1033
- content: string;
1034
- frontmatter: MemoryFile["frontmatter"];
1035
- }
1036
- interface EngramAccessMemorySummary {
1037
- id: string;
1038
- path: string;
1039
- category: string;
1040
- status: string;
1041
- created?: string;
1042
- updated?: string;
1043
- tags: string[];
1044
- entityRef?: string;
1045
- preview: string;
1046
- /**
1047
- * Disclosure depth at which this result was served (issue #677). Set by
1048
- * recall paths; omitted on non-recall surfaces (e.g. memory browse) where
1049
- * the concept does not apply. PR 1 of #677 always reports the
1050
- * request-level disclosure on recall results; per-result divergence is
1051
- * reserved for the auto-escalation policy that ships in PR 4/4.
1052
- */
1053
- disclosure?: RecallDisclosure;
1054
- /**
1055
- * Full memory content (markdown body) — populated when `disclosure` is
1056
- * `"section"` or `"raw"` (issue #677 PR 2/4). At `"chunk"` depth callers
1057
- * only receive the short `preview`, preserving the cheap-by-default
1058
- * recall payload. Browse/non-recall paths leave `content` undefined.
1059
- */
1060
- content?: string;
1061
- /**
1062
- * Raw transcript excerpts surfaced from the LCM archive when `disclosure`
1063
- * is `"raw"` and the LCM engine is enabled (issue #677 PR 2/4). Each
1064
- * entry is a per-message excerpt sized by the LCM archive's
1065
- * configured excerpt window. Empty array when LCM is disabled or has
1066
- * no matching transcript content. Always omitted at chunk/section.
1067
- */
1068
- rawExcerpts?: Array<{
1069
- turnIndex: number;
1070
- role: string;
1071
- content: string;
1072
- sessionId: string;
1073
- }>;
1074
- }
1075
- interface EngramAccessMemoryBrowseRequest {
1076
- query?: string;
1077
- status?: string;
1078
- category?: string;
1079
- namespace?: string;
1080
- sort?: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
1081
- limit?: number;
1082
- offset?: number;
1083
- }
1084
- interface EngramAccessMemoryBrowseResponse {
1085
- namespace: string;
1086
- sort: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
1087
- total: number;
1088
- count: number;
1089
- limit: number;
1090
- offset: number;
1091
- memories: EngramAccessMemorySummary[];
1092
- }
1093
- interface EngramAccessMemoryResponse {
1094
- found: boolean;
1095
- namespace: string;
1096
- memory?: EngramAccessMemoryRecord;
1097
- }
1098
- interface EngramAccessTimelineResponse {
1099
- found: boolean;
1100
- namespace: string;
1101
- count: number;
1102
- timeline: MemoryLifecycleEvent[];
1103
- }
1104
- interface EngramAccessEntitySummary {
1105
- name: string;
1106
- type: string;
1107
- updated: string;
1108
- summary?: string;
1109
- aliases: string[];
1110
- }
1111
- interface EngramAccessEntityListResponse {
1112
- namespace: string;
1113
- total: number;
1114
- count: number;
1115
- limit: number;
1116
- offset: number;
1117
- entities: EngramAccessEntitySummary[];
1118
- }
1119
- interface EngramAccessEntityResponse {
1120
- found: boolean;
1121
- namespace: string;
1122
- entity?: EntityFile;
1123
- }
1124
- interface EngramAccessReviewQueueResponse {
1125
- found: boolean;
1126
- namespace?: string;
1127
- runId?: string;
1128
- summary?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["summary"];
1129
- metrics?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["metrics"];
1130
- qualityScore?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["qualityScore"];
1131
- reviewQueue?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["reviewQueue"];
1132
- appliedActions?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["appliedActions"];
1133
- transitionReport?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["transitionReport"];
1134
- report?: string;
1135
- }
1136
- interface EngramAccessMaintenanceResponse {
1137
- namespace: string;
1138
- health: EngramAccessHealthResponse;
1139
- latestGovernanceRun: EngramAccessReviewQueueResponse;
1140
- }
1141
- interface EngramAccessTrustZoneStatusResponse {
1142
- namespace: string;
1143
- status: TrustZoneStoreStatus;
1144
- }
1145
- interface EngramAccessTrustZoneRecordSummary {
1146
- recordId: string;
1147
- filePath: string;
1148
- zone: TrustZoneName;
1149
- recordedAt: string;
1150
- kind: TrustZoneRecordKind;
1151
- summary: string;
1152
- sourceClass: TrustZoneSourceClass;
1153
- sessionKey?: string;
1154
- sourceId?: string;
1155
- evidenceHashPresent: boolean;
1156
- anchored: boolean;
1157
- entityRefs: string[];
1158
- tags: string[];
1159
- metadata?: Record<string, string>;
1160
- trustScore?: TrustZoneProvenanceScore;
1161
- nextPromotionTarget?: TrustZoneName;
1162
- nextPromotionAllowed: boolean;
1163
- nextPromotionReasons: string[];
1164
- corroborationCount?: number;
1165
- corroborationSourceClasses?: TrustZoneSourceClass[];
1166
- }
1167
- interface EngramAccessTrustZoneBrowseRequest {
1168
- query?: string;
1169
- zone?: TrustZoneName;
1170
- kind?: TrustZoneRecordKind;
1171
- sourceClass?: TrustZoneSourceClass;
1172
- namespace?: string;
1173
- limit?: number;
1174
- offset?: number;
1175
- }
1176
- interface EngramAccessTrustZoneBrowseResponse {
1177
- namespace: string;
1178
- total: number;
1179
- count: number;
1180
- limit: number;
1181
- offset: number;
1182
- records: EngramAccessTrustZoneRecordSummary[];
1183
- }
1184
- interface EngramAccessTrustZonePromoteRequest {
1185
- recordId: string;
1186
- targetZone: TrustZoneName;
1187
- promotionReason: string;
1188
- recordedAt?: string;
1189
- summary?: string;
1190
- dryRun?: boolean;
1191
- namespace?: string;
1192
- authenticatedPrincipal?: string;
1193
- }
1194
- interface EngramAccessTrustZonePromoteResponse extends TrustZonePromotionResult {
1195
- namespace: string;
1196
- dryRun: boolean;
1197
- }
1198
- interface EngramAccessTrustZoneDemoSeedRequest {
1199
- scenario?: string;
1200
- recordedAt?: string;
1201
- dryRun?: boolean;
1202
- namespace?: string;
1203
- authenticatedPrincipal?: string;
1204
- }
1205
- interface EngramAccessTrustZoneDemoSeedResponse extends TrustZoneDemoSeedResult {
1206
- namespace: string;
1207
- }
1208
- interface EngramAccessQualityResponse {
1209
- namespace: string;
1210
- totalMemories: number;
1211
- statusCounts: Record<string, number>;
1212
- categoryCounts: Record<string, number>;
1213
- confidenceTierCounts: Record<string, number>;
1214
- ageBucketCounts: Record<string, number>;
1215
- archivePressure: {
1216
- pendingReview: number;
1217
- quarantined: number;
1218
- archived: number;
1219
- staleActive: number;
1220
- lowConfidenceActive: number;
1221
- };
1222
- latestGovernanceRun: {
1223
- found: boolean;
1224
- runId?: string;
1225
- qualityScore?: EngramAccessReviewQueueResponse["qualityScore"];
1226
- reviewQueueCount: number;
1227
- };
1228
- }
1229
- interface EngramAccessCapsuleListResponse {
1230
- namespace: string;
1231
- capsulesDir: string;
1232
- capsules: CapsuleListEntry[];
1233
- }
1234
- type EngramAccessActionConfidenceRequest = ActionConfidenceInput;
1235
- type EngramAccessActionConfidenceResponse = ActionConfidenceResult;
1236
- interface EngramAccessReviewDispositionRequest {
1237
- memoryId: string;
1238
- status: MemoryStatus | "archived";
1239
- reasonCode: string;
1240
- namespace?: string;
1241
- /**
1242
- * Trusted transport-bound principal. This must never come from untrusted client payloads.
1243
- * When present, write authorization is evaluated against this principal instead of sessionKey.
1244
- */
1245
- authenticatedPrincipal?: string;
1246
- }
1247
- interface EngramAccessReviewDispositionResponse {
1248
- ok: boolean;
1249
- namespace: string;
1250
- memoryId: string;
1251
- status: MemoryStatus | "archived";
1252
- previousStatus: MemoryStatus;
1253
- currentPath?: string;
1254
- }
1255
- interface EngramAccessWriteEnvelope {
1256
- schemaVersion?: number;
1257
- idempotencyKey?: string;
1258
- dryRun?: boolean;
1259
- sessionKey?: string;
1260
- /**
1261
- * Trusted transport-bound principal. This must never come from untrusted client payloads.
1262
- * When present, write authorization is evaluated against this principal instead of sessionKey.
1263
- */
1264
- authenticatedPrincipal?: string;
1265
- }
1266
- interface EngramAccessMemoryStoreRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
1267
- }
1268
- interface EngramAccessSuggestionSubmitRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
1269
- }
1270
- interface EngramAccessWriteResponse {
1271
- schemaVersion: 1;
1272
- operation: "memory_store" | "suggestion_submit";
1273
- namespace: string;
1274
- dryRun: boolean;
1275
- accepted: boolean;
1276
- queued: boolean;
1277
- status: "validated" | "stored" | "duplicate" | "queued_for_review";
1278
- memoryId?: string;
1279
- duplicateOf?: string;
1280
- idempotencyKey?: string;
1281
- idempotencyReplay?: boolean;
1282
- }
1283
- interface EngramAccessObserveMessage {
1284
- role: "user" | "assistant";
1285
- content: string;
1286
- parts?: LcmMessagePartInput[];
1287
- rawContent?: unknown;
1288
- sourceFormat?: MessagePartSourceFormat;
1289
- }
1290
- interface EngramAccessObserveRequest {
1291
- sessionKey: string;
1292
- messages: EngramAccessObserveMessage[];
1293
- namespace?: string;
1294
- authenticatedPrincipal?: string;
1295
- skipExtraction?: boolean;
1296
- /**
1297
- * Working directory of the calling agent session (issue #569 wiring).
1298
- * When provided and no `codingContext` is attached for this session,
1299
- * resolves git context from the path and attaches it so writes route to
1300
- * the correct project namespace.
1301
- */
1302
- cwd?: string;
1303
- /**
1304
- * Arbitrary project tag for non-git-based project scoping (issue #569).
1305
- * Creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
1306
- */
1307
- projectTag?: string;
1308
- }
1309
- interface EngramAccessObserveResponse {
1310
- accepted: number;
1311
- sessionKey: string;
1312
- namespace: string;
1313
- lcmArchived: boolean;
1314
- extractionQueued: boolean;
1315
- }
1316
- interface EngramAccessLcmSearchRequest {
1317
- query: string;
1318
- sessionKey?: string;
1319
- namespace?: string;
1320
- limit?: number;
1321
- authenticatedPrincipal?: string;
1322
- }
1323
- interface EngramAccessLcmSearchResponse {
1324
- query: string;
1325
- namespace: string;
1326
- results: Array<{
1327
- sessionId: string;
1328
- content: string;
1329
- turnIndex?: number;
1330
- }>;
1331
- count: number;
1332
- lcmEnabled: boolean;
1333
- }
1334
- interface EngramAccessLcmStatusResponse {
1335
- enabled: boolean;
1336
- archiveAvailable: boolean;
1337
- stats?: {
1338
- totalTurns?: number;
1339
- };
1340
- }
1341
- interface EngramAccessLcmCompactionFlushRequest {
1342
- sessionKey: string;
1343
- namespace?: string;
1344
- authenticatedPrincipal?: string;
1345
- }
1346
- interface EngramAccessLcmCompactionFlushResponse {
1347
- enabled: boolean;
1348
- flushed: boolean;
1349
- sessionKey: string;
1350
- namespace: string;
1351
- reason?: string;
1352
- }
1353
- interface EngramAccessLcmCompactionRecordRequest {
1354
- sessionKey: string;
1355
- namespace?: string;
1356
- tokensBefore: number;
1357
- tokensAfter: number;
1358
- authenticatedPrincipal?: string;
1359
- }
1360
- interface EngramAccessLcmCompactionRecordResponse {
1361
- enabled: boolean;
1362
- recorded: boolean;
1363
- sessionKey: string;
1364
- namespace: string;
1365
- reason?: string;
1366
- }
1367
- type EngramAccessIdempotencyStatus = "miss" | "replay" | "conflict";
1368
- /**
1369
- * Pure helper that shapes a {@link EngramAccessMemorySummary} from a
1370
- * {@link MemoryFile} based on the requested disclosure depth (issue #677
1371
- * PR 2/4). Extracted so the shaping invariants — chunk emits preview
1372
- * only, section attaches `content`, raw also surfaces `rawExcerpts` when
1373
- * the caller passes them — can be unit-tested without booting an
1374
- * orchestrator.
1375
- *
1376
- * Browse / non-recall paths pass `disclosure === undefined` so the
1377
- * `disclosure`, `content`, and `rawExcerpts` fields are all omitted —
1378
- * preserving the cheap-by-default browse projection.
1379
- */
1380
- declare function shapeMemorySummary(memory: MemoryFile, baseDir: string, disclosure?: RecallDisclosure, rawExcerpts?: EngramAccessMemorySummary["rawExcerpts"]): EngramAccessMemorySummary;
1381
- declare class EngramAccessService {
1382
- private readonly orchestrator;
1383
- private readonly idempotency;
1384
- private readonly idempotencyLocks;
1385
- private readonly budget;
1386
- private readonly auditAdapter;
1387
- constructor(orchestrator: Orchestrator);
1388
- get briefingEnabled(): boolean;
1389
- private resolveNamespace;
1390
- private normalizeRecallMode;
1391
- private resolveRecallNamespace;
1392
- private resolveRequestPrincipal;
1393
- private resolveWritableNamespace;
1394
- private objectiveStateStoreLocationForNamespace;
1395
- private resolveReadableNamespace;
1396
- private buildRecallDebug;
1397
- private buildRecallResponseFromXraySnapshot;
1398
- private serializeRecallResults;
1399
- /**
1400
- * Fetch raw transcript excerpts from the LCM archive for `disclosure ===
1401
- * "raw"` recalls (issue #677 PR 2/4). Returns `null` for non-raw recall
1402
- * depths, an empty array when LCM is disabled / not initialized / has no
1403
- * matches, and an array of LCM-side excerpts otherwise. Errors are
1404
- * swallowed and treated as "no excerpts" so a failing LCM never breaks
1405
- * the recall response.
1406
- *
1407
- * Namespace handling: LCM archival prefixes non-default-namespace
1408
- * sessions with `${namespace}:${sessionKey}` (see `observe()` around
1409
- * line 2498), so the lookup must mirror that prefix or raw recalls in
1410
- * non-default namespaces miss their own excerpts.
1411
- */
1412
- private fetchRawExcerpts;
1413
- private handleIdempotentWrite;
1414
- private peekIdempotentWrite;
1415
- private withIdempotencyLock;
1416
- health(namespace?: string): Promise<EngramAccessHealthResponse>;
1417
- actionConfidence(request?: EngramAccessActionConfidenceRequest): Promise<EngramAccessActionConfidenceResponse>;
1418
- daySummary(request: EngramAccessDaySummaryRequest): Promise<DaySummaryResult | null>;
1419
- /**
1420
- * Build a daily context briefing. Gracefully degrades when the OpenAI key
1421
- * or Responses API is unavailable — never throws for LLM-related problems.
1422
- */
1423
- briefing(request: EngramAccessBriefingRequest): Promise<EngramAccessBriefingResponse>;
1424
- /**
1425
- * Attach a coding context to a session (issue #569). Used by the Claude
1426
- * Code / Codex / generic-MCP connectors at session start so that recall +
1427
- * write paths can route to a project- / branch-scoped namespace.
1428
- *
1429
- * Validates the input shape and rejects malformed payloads rather than
1430
- * silently accepting them (CLAUDE.md #51). Pass `codingContext: null` to
1431
- * clear.
1432
- */
1433
- setCodingContext(request: EngramAccessSetCodingContextRequest): void;
1434
- /**
1435
- * Auto-resolve and attach a coding context for a session when one is not
1436
- * already present. Resolves from `projectTag` (highest priority after
1437
- * explicit `codingContext`), then from `cwd` via git detection.
1438
- *
1439
- * This is a no-op when:
1440
- * - `sessionKey` is missing
1441
- * - the session already has a coding context attached
1442
- * - codingMode.projectScope is disabled (CLAUDE.md #30)
1443
- * - neither `cwd` nor `projectTag` is provided
1444
- *
1445
- * Never throws — git resolution failures are silently ignored because not
1446
- * being in a repo is a normal runtime state.
1447
- */
1448
- private maybeAttachCodingContext;
1449
- recall(request: EngramAccessRecallRequest): Promise<EngramAccessRecallResponse>;
1450
- recallExplain(request?: EngramAccessRecallExplainRequest): Promise<EngramAccessRecallExplainResponse>;
1451
- recallTierExplain(sessionKey?: string, namespace?: string, authenticatedPrincipal?: string): Promise<RecallExplainJsonPayload>;
1452
- /**
1453
- * Recall X-ray (issue #570). Runs a recall with `xrayCapture: true`
1454
- * and returns the resulting snapshot as structured JSON so every
1455
- * surface (CLI / HTTP / MCP) gets the same payload. Namespace scope
1456
- * is enforced before the recall fires (CLAUDE.md rule 42 — read and
1457
- * write paths must resolve through the same namespace layer) so an
1458
- * unauthorized principal cannot capture an x-ray for a namespace it
1459
- * cannot read.
1460
- */
1461
- recallXray(request: {
1462
- query: string;
1463
- sessionKey?: string;
1464
- namespace?: string;
1465
- budget?: number;
1466
- authenticatedPrincipal?: string;
1467
- /**
1468
- * Disclosure depth used to shape per-result payload (issue #677
1469
- * PR 3/4). When set, each X-ray result is decorated with the
1470
- * matching `disclosure` field and `estimatedTokens` computed from
1471
- * the actual rendered content at that depth, so the renderer's
1472
- * "Token spend by disclosure" summary reflects real spend rather
1473
- * than staying empty when no caller wires the depth knob through.
1474
- */
1475
- disclosure?: RecallDisclosure;
1476
- /**
1477
- * Free-form recall tag filter (issue #689). Mirrors the field on
1478
- * `EngramAccessRecallRequest`. When non-empty, the captured X-ray
1479
- * snapshot's `results` are filtered down to memories whose
1480
- * frontmatter tags satisfy `tagMatch` ("any" by default), and a
1481
- * `tag-filter` entry is appended to `filters`.
1482
- */
1483
- tags?: string[];
1484
- /** Match mode for `tags`. See `EngramAccessRecallRequest.tagMatch`. */
1485
- tagMatch?: "any" | "all";
1486
- /** Recall planner mode override. Mirrors `EngramAccessRecallRequest.mode`. */
1487
- mode?: RecallPlanMode | "auto";
1488
- /**
1489
- * User-aware context scopes active for this recall. Forwarded into
1490
- * provenance construction so boundary scopes are evaluated against
1491
- * the caller's real context instead of an empty-context default.
1492
- */
1493
- currentContextScopes?: readonly unknown[];
1494
- /**
1495
- * Internal inspector affordance: include a recall-shaped response
1496
- * derived from the same X-ray snapshot. Left off by default so the
1497
- * regular X-ray API/CLI/MCP surfaces keep their existing payload shape.
1498
- */
1499
- includeRecall?: boolean;
1500
- }): Promise<{
1501
- snapshotFound: boolean;
1502
- snapshot?: RecallXraySnapshot;
1503
- recall?: EngramAccessRecallResponse;
1504
- }>;
1505
- private xrayQueue;
1506
- memoryStore(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessWriteResponse>;
1507
- peekMemoryStoreIdempotency(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessIdempotencyStatus>;
1508
- suggestionSubmit(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessWriteResponse>;
1509
- peekSuggestionSubmitIdempotency(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessIdempotencyStatus>;
1510
- private validateWriteCandidate;
1511
- memoryGet(memoryId: string, namespace?: string, principal?: string): Promise<EngramAccessMemoryResponse>;
1512
- memoryBrowse(request?: EngramAccessMemoryBrowseRequest): Promise<EngramAccessMemoryBrowseResponse>;
1513
- memoryTimeline(memoryId: string, namespace?: string, limit?: number, principal?: string): Promise<EngramAccessTimelineResponse>;
1514
- entityList(options?: {
1515
- namespace?: string;
1516
- query?: string;
1517
- limit?: number;
1518
- offset?: number;
1519
- }): Promise<EngramAccessEntityListResponse>;
1520
- entityGet(name: string, namespace?: string): Promise<EngramAccessEntityResponse>;
1521
- reviewQueue(runId?: string, namespace?: string, principal?: string): Promise<EngramAccessReviewQueueResponse>;
1522
- maintenance(namespace?: string, principal?: string): Promise<EngramAccessMaintenanceResponse>;
1523
- quality(namespace?: string, principal?: string): Promise<EngramAccessQualityResponse>;
1524
- governanceRun(request: {
1525
- namespace?: string;
1526
- mode?: "shadow" | "apply";
1527
- recentDays?: number;
1528
- maxMemories?: number;
1529
- batchSize?: number;
1530
- authenticatedPrincipal?: string;
1531
- }, principal?: string): Promise<{
1532
- namespace: string;
1533
- runId: string;
1534
- traceId: string;
1535
- mode: "shadow" | "apply";
1536
- reviewQueueCount: number;
1537
- proposedActionCount: number;
1538
- appliedActionCount: number;
1539
- summaryPath: string;
1540
- reportPath: string;
1541
- }>;
1542
- procedureMiningRun(request: {
1543
- namespace?: string;
1544
- authenticatedPrincipal?: string;
1545
- }, principal?: string): Promise<{
1546
- namespace: string;
1547
- clustersProcessed: number;
1548
- proceduresWritten: number;
1549
- skippedReason?: string;
1550
- }>;
1551
- liveConnectorsRun(request?: {
1552
- authenticatedPrincipal?: string;
1553
- force?: boolean;
1554
- }, principal?: string): Promise<LiveConnectorsRunSummary>;
1555
- /**
1556
- * Run the pattern-reinforcement maintenance job (issue #687 PR 2/4).
1557
- *
1558
- * Cluster duplicate non-procedural memories and reinforce the
1559
- * canonical (most-recent) member. Gated on
1560
- * `patternReinforcementEnabled` — when disabled, returns
1561
- * `{ ran: false, skippedReason: "disabled" }` so the cron payload
1562
- * surface in CI logs cleanly.
1563
- *
1564
- * Resolves the namespace via the same writable path used by
1565
- * `procedureMiningRun` so cross-tenant writes are impossible
1566
- * (CLAUDE.md rule 42).
1567
- *
1568
- * Delegates the run to `orchestrator.runPatternReinforcement` so
1569
- * the cadence floor (`patternReinforcementCadenceMs`) is enforced
1570
- * uniformly across cron + MCP paths (PR #730 review feedback,
1571
- * Codex P2). Accepts `force: true` for ad-hoc operator runs that
1572
- * must bypass the cadence floor — mirrors the pattern used by
1573
- * other maintenance MCP tools.
1574
- */
1575
- patternReinforcementRun(request?: {
1576
- namespace?: string;
1577
- authenticatedPrincipal?: string;
1578
- force?: boolean;
1579
- }, principal?: string): Promise<{
1580
- namespace: string;
1581
- ran: boolean;
1582
- skippedReason?: "disabled" | "cadence";
1583
- clustersFound: number;
1584
- canonicalsUpdated: number;
1585
- duplicatesSuperseded: number;
1586
- result?: PatternReinforcementResult;
1587
- }>;
1588
- /**
1589
- * Procedural memory stats (issue #567 PR 5/5). Read-only — resolves the
1590
- * namespace via the same path used by `recallExplain` / `trustZoneStatus`
1591
- * so cross-tenant reads are impossible (CLAUDE.md rule 42).
1592
- */
1593
- procedureStats(request?: {
1594
- namespace?: string;
1595
- }, principal?: string): Promise<ProcedureStatsReport & {
1596
- namespace: string;
1597
- }>;
1598
- memorySummarizeHourly(): Promise<{
1599
- ok: true;
1600
- message: string;
1601
- }>;
1602
- conversationIndexUpdate(request?: {
1603
- sessionKey?: string;
1604
- hours?: number;
1605
- embed?: boolean;
1606
- }): Promise<{
1607
- enabled: boolean;
1608
- sessionKey?: string;
1609
- sessions: number;
1610
- chunks: number;
1611
- skipped: number;
1612
- skippedSessionKeys: string[];
1613
- embeddedRuns: number;
1614
- reason?: string;
1615
- retryAfterMs?: number;
1616
- }>;
1617
- profilingReport(request?: AccessProfilingReportRequest): Promise<AccessProfilingReportResponse>;
1618
- trustZoneStatus(namespace?: string, principal?: string): Promise<EngramAccessTrustZoneStatusResponse>;
1619
- trustZoneBrowse(request: EngramAccessTrustZoneBrowseRequest, principal?: string): Promise<EngramAccessTrustZoneBrowseResponse>;
1620
- trustZonePromote(request: EngramAccessTrustZonePromoteRequest): Promise<EngramAccessTrustZonePromoteResponse>;
1621
- trustZoneDemoSeed(request: EngramAccessTrustZoneDemoSeedRequest): Promise<EngramAccessTrustZoneDemoSeedResponse>;
1622
- reviewDisposition(request: EngramAccessReviewDispositionRequest): Promise<EngramAccessReviewDispositionResponse>;
1623
- private serializeMemory;
1624
- private serializeMemorySummary;
1625
- observe(request: EngramAccessObserveRequest): Promise<EngramAccessObserveResponse>;
1626
- lcmSearch(request: EngramAccessLcmSearchRequest): Promise<EngramAccessLcmSearchResponse>;
1627
- lcmCompactionFlush(request: EngramAccessLcmCompactionFlushRequest): Promise<EngramAccessLcmCompactionFlushResponse>;
1628
- lcmCompactionRecord(request: EngramAccessLcmCompactionRecordRequest): Promise<EngramAccessLcmCompactionRecordResponse>;
1629
- continuityAuditGenerate(request: {
1630
- period?: "weekly" | "monthly";
1631
- key?: string;
1632
- }): Promise<{
1633
- enabled: boolean;
1634
- reason?: string;
1635
- period?: string;
1636
- key?: string;
1637
- reportPath?: string;
1638
- }>;
1639
- continuityIncidentOpen(request: {
1640
- symptom: string;
1641
- namespace?: string;
1642
- principal?: string;
1643
- triggerWindow?: string;
1644
- suspectedCause?: string;
1645
- }): Promise<unknown>;
1646
- continuityIncidentClose(request: {
1647
- id: string;
1648
- namespace?: string;
1649
- principal?: string;
1650
- fixApplied: string;
1651
- verificationResult: string;
1652
- preventiveRule?: string;
1653
- }): Promise<unknown>;
1654
- continuityIncidentList(request: {
1655
- state?: "open" | "closed" | "all";
1656
- namespace?: string;
1657
- principal?: string;
1658
- limit?: number;
1659
- }): Promise<unknown>;
1660
- continuityLoopAddOrUpdate(request: {
1661
- id: string;
1662
- cadence: "daily" | "weekly" | "monthly" | "quarterly";
1663
- purpose: string;
1664
- status: "active" | "paused" | "retired";
1665
- killCondition: string;
1666
- namespace?: string;
1667
- principal?: string;
1668
- lastReviewed?: string;
1669
- notes?: string;
1670
- }): Promise<unknown>;
1671
- continuityLoopReview(request: {
1672
- id: string;
1673
- namespace?: string;
1674
- principal?: string;
1675
- status?: "active" | "paused" | "retired";
1676
- notes?: string;
1677
- reviewedAt?: string;
1678
- }): Promise<unknown>;
1679
- identityAnchorGet(request: {
1680
- namespace?: string;
1681
- principal?: string;
1682
- }): Promise<unknown>;
1683
- /**
1684
- * @deprecated since issue #679 PR 5/5 — the identity-anchor model is
1685
- * superseded by the peer registry. Use `peerSet({ id: "self", ... })` or
1686
- * `remnic peer set self` to update the self peer's identity kernel, and
1687
- * `remnic peer migrate` to seed `peers/self/identity.md` from existing
1688
- * legacy anchor data. This method continues to function for backward
1689
- * compatibility but will be removed in a future major version.
1690
- */
1691
- identityAnchorUpdate(request: {
1692
- namespace?: string;
1693
- principal?: string;
1694
- identityTraits?: string;
1695
- communicationPreferences?: string;
1696
- operatingPrinciples?: string;
1697
- continuityNotes?: string;
1698
- }): Promise<unknown>;
1699
- memoryIdentity(request: {
1700
- namespace?: string;
1701
- principal?: string;
1702
- }): Promise<unknown>;
1703
- workTask(request: {
1704
- action: "create" | "get" | "list" | "update" | "transition" | "delete";
1705
- id?: string;
1706
- title?: string;
1707
- description?: string;
1708
- status?: string;
1709
- priority?: string;
1710
- owner?: string;
1711
- assignee?: string;
1712
- projectId?: string;
1713
- tags?: string[];
1714
- dueAt?: string;
1715
- }): Promise<unknown>;
1716
- workProject(request: {
1717
- action: "create" | "get" | "list" | "update" | "delete" | "link_task";
1718
- id?: string;
1719
- name?: string;
1720
- description?: string;
1721
- status?: string;
1722
- owner?: string;
1723
- tags?: string[];
1724
- taskId?: string;
1725
- projectId?: string;
1726
- }): Promise<unknown>;
1727
- workBoard(request: {
1728
- action: "export_markdown" | "export_snapshot" | "import_snapshot";
1729
- projectId?: string;
1730
- snapshotJson?: string;
1731
- linkToMemory?: boolean;
1732
- }): Promise<unknown>;
1733
- sharedContextWriteOutput(request: {
1734
- agentId: string;
1735
- title: string;
1736
- content: string;
1737
- }): Promise<unknown>;
1738
- sharedFeedbackRecord(request: {
1739
- agent: string;
1740
- decision: "approved" | "approved_with_feedback" | "rejected";
1741
- reason: string;
1742
- date?: string;
1743
- learning?: string;
1744
- outcome?: string;
1745
- severity?: "low" | "medium" | "high";
1746
- confidence?: number;
1747
- workflow?: string;
1748
- tags?: string[];
1749
- evidenceWindowStart?: string;
1750
- evidenceWindowEnd?: string;
1751
- refs?: string[];
1752
- }): Promise<unknown>;
1753
- sharedPrioritiesAppend(request: {
1754
- agentId: string;
1755
- text: string;
1756
- }): Promise<unknown>;
1757
- sharedContextCrossSignalsRun(request: {
1758
- date?: string;
1759
- }): Promise<unknown>;
1760
- sharedContextCurateDaily(request: {
1761
- date?: string;
1762
- }): Promise<unknown>;
1763
- compoundingWeeklySynthesize(request: {
1764
- weekId?: string;
1765
- }): Promise<unknown>;
1766
- compoundingPromoteCandidate(request: {
1767
- weekId: string;
1768
- candidateId: string;
1769
- dryRun?: boolean;
1770
- }): Promise<unknown>;
1771
- compressionGuidelinesOptimize(request: {
1772
- dryRun?: boolean;
1773
- eventLimit?: number;
1774
- }): Promise<unknown>;
1775
- compressionGuidelinesActivate(request: {
1776
- expectedContentHash?: string;
1777
- expectedGuidelineVersion?: number;
1778
- }): Promise<unknown>;
1779
- /** Conservative identity anchor section merge (matches tools.ts mergeIdentityAnchor logic). */
1780
- private mergeIdentityAnchorSections;
1781
- memorySearch(request: {
1782
- query: string;
1783
- namespace?: string;
1784
- maxResults?: number;
1785
- collection?: string;
1786
- principal?: string;
1787
- }): Promise<{
1788
- query: string;
1789
- results: Array<{
1790
- path: string;
1791
- score: number;
1792
- snippet: string;
1793
- }>;
1794
- count: number;
1795
- }>;
1796
- memoryProfile(namespace?: string, principal?: string): Promise<Record<string, unknown>>;
1797
- memoryEntitiesList(namespace?: string, principal?: string): Promise<{
1798
- entities: string[];
1799
- count: number;
1800
- }>;
1801
- memoryQuestions(namespace?: string, principal?: string): Promise<{
1802
- questions: Array<{
1803
- id: string;
1804
- question: string;
1805
- resolved: boolean;
1806
- }>;
1807
- count: number;
1808
- }>;
1809
- lastRecallSnapshot(sessionKey?: string): Promise<unknown>;
1810
- intentDebug(namespace?: string): Promise<unknown>;
1811
- qmdDebug(namespace?: string): Promise<unknown>;
1812
- graphExplainLastRecall(namespace?: string): Promise<unknown>;
1813
- /**
1814
- * Read-only graph snapshot for the admin pane (issue #691 PR 2/5).
1815
- *
1816
- * Reads adjacency from the JSONL edge store written by `GraphIndex` and
1817
- * resolves node metadata via the namespaced storage manager. Namespace
1818
- * resolution mirrors the read-side path used by `recall` /
1819
- * `procedureStats`, so multi-principal deployments can't leak edges from
1820
- * a peer namespace (CLAUDE.md rule 42).
1821
- */
1822
- graphSnapshot(request: GraphSnapshotRequest & {
1823
- namespace?: string;
1824
- }, authenticatedPrincipal?: string): Promise<GraphSnapshotResponse>;
1825
- memoryFeedback(request: {
1826
- memoryId: string;
1827
- vote: "up" | "down";
1828
- note?: string;
1829
- }): Promise<{
1830
- recorded: boolean;
1831
- enabled?: boolean;
1832
- reason?: string;
1833
- }>;
1834
- /**
1835
- * Record a Memory Worth outcome observation (issue #560 PR 3).
1836
- *
1837
- * This is distinct from `memoryFeedback` — feedback is a human thumbs
1838
- * up/down on whether a recalled memory was relevant; outcome is an
1839
- * automated signal about whether the session that consumed the memory
1840
- * ultimately succeeded or failed. Outcomes feed the Laplace-smoothed
1841
- * worth score (`computeMemoryWorth`, PR 2) that PR 4 will use to
1842
- * downweight memories correlated with bad sessions.
1843
- *
1844
- * The underlying writer only touches fact-category memories. Corrections,
1845
- * procedures, and other kinds return `{ ok: false, reason:
1846
- * "ineligible_category" }` so a ledger drainer doesn't need to pre-filter.
1847
- */
1848
- memoryOutcome(request: {
1849
- memoryId: string;
1850
- outcome: MemoryOutcomeKind;
1851
- namespace?: string;
1852
- principal?: string;
1853
- sessionKey?: string;
1854
- timestamp?: string;
1855
- }): Promise<RecordMemoryOutcomeResult>;
1856
- memoryPromote(request: {
1857
- memoryId: string;
1858
- namespace?: string;
1859
- principal?: string;
1860
- sessionKey?: string;
1861
- }): Promise<unknown>;
1862
- memoryActionApply(request: {
1863
- action: string;
1864
- outcome?: string;
1865
- reason?: string;
1866
- memoryId?: string;
1867
- namespace?: string;
1868
- principal?: string;
1869
- sessionKey?: string;
1870
- content?: string;
1871
- category?: string;
1872
- linkTargetId?: string;
1873
- linkType?: string;
1874
- linkStrength?: number;
1875
- artifactType?: string;
1876
- execute?: boolean;
1877
- sourcePrompt?: string;
1878
- dryRun?: boolean;
1879
- }): Promise<unknown>;
1880
- contextCheckpoint(request: {
1881
- sessionKey: string;
1882
- context: string;
1883
- namespace?: string;
1884
- principal?: string;
1885
- }): Promise<{
1886
- saved: boolean;
1887
- }>;
1888
- lcmStatus(): Promise<EngramAccessLcmStatusResponse>;
1889
- /**
1890
- * Record citation usage from an observed oai-mem-citation block.
1891
- * For each citation entry, extract the memory ID from the path and
1892
- * increment its access tracking via the orchestrator. Returns the
1893
- * count of submitted IDs and the count of IDs that matched real memories.
1894
- */
1895
- recordCitationUsage(request: {
1896
- sessionId?: string;
1897
- namespace?: string;
1898
- authenticatedPrincipal?: string;
1899
- entries: Array<{
1900
- path: string;
1901
- lineStart: number;
1902
- lineEnd: number;
1903
- note: string;
1904
- }>;
1905
- rolloutIds: string[];
1906
- }): Promise<{
1907
- submitted: number;
1908
- matched: number;
1909
- }>;
1910
- /**
1911
- * Gather a point-in-time `ConsoleStateSnapshot` from the orchestrator.
1912
- *
1913
- * Principal-aware: `resolveReadableNamespace` enforces ACL before the
1914
- * snapshot is gathered, so callers cannot read a namespace they don't
1915
- * have read access to (CLAUDE.md rule 42). The resolved namespace's
1916
- * storage directory is forwarded as `config.memoryDir` so the ledger-
1917
- * tail reader in `gatherConsoleState` scans the correct namespace root
1918
- * rather than the global root. Read-only — never mutates orchestrator state.
1919
- */
1920
- consoleState(namespace?: string, principal?: string): Promise<ConsoleStateSnapshot>;
1921
- /**
1922
- * List all registered peers. Returns the array of `Peer` objects in
1923
- * deterministic alphabetical order (mirroring `listPeers` storage semantics).
1924
- */
1925
- peerList(): Promise<{
1926
- peers: Peer[];
1927
- }>;
1928
- /**
1929
- * Get a single peer by id. Returns `{ found: false }` when the peer does
1930
- * not exist rather than throwing, matching the `memoryGet` / `entityGet`
1931
- * pattern used throughout the service.
1932
- */
1933
- peerGet(peerId: string): Promise<{
1934
- found: true;
1935
- peer: Peer;
1936
- } | {
1937
- found: false;
1938
- }>;
1939
- /**
1940
- * Upsert a peer. Writes `peers/{id}/identity.md`. On first write the
1941
- * `createdAt` timestamp is set to now; on subsequent writes only
1942
- * `displayName` and `notes` are mutated (kind and createdAt are immutable
1943
- * once set, per the storage contract).
1944
- *
1945
- * Returns `{ created: true }` on first write, `{ created: false }` on update.
1946
- */
1947
- peerSet(input: {
1948
- id: string;
1949
- kind?: string;
1950
- displayName?: string;
1951
- notes?: string;
1952
- }): Promise<{
1953
- ok: true;
1954
- created: boolean;
1955
- peer: Peer;
1956
- }>;
1957
- /**
1958
- * Delete a peer by removing `peers/{id}/identity.md`. If the file does not
1959
- * exist the call is a no-op (idempotent). The peer directory itself
1960
- * (`peers/{id}/`) is intentionally left in place — profile and interaction
1961
- * log data are not destroyed.
1962
- */
1963
- peerDelete(peerId: string): Promise<{
1964
- ok: true;
1965
- deleted: boolean;
1966
- }>;
1967
- /**
1968
- * Destructively purge the entire peer directory for a given peerId —
1969
- * `identity.md`, `profile.md`, `interactions.log.md`, and any other
1970
- * files in `peers/{id}/`. Requires `confirm: "yes"` to prevent
1971
- * accidental invocation.
1972
- *
1973
- * This is the DESTRUCTIVE counterpart to `peerDelete`, which only
1974
- * removes `identity.md`. All companion files are permanently removed.
1975
- *
1976
- * Returns `{ ok: true, purged: true }` when the directory existed and
1977
- * was removed; `{ ok: true, purged: false }` when the directory did
1978
- * not exist (idempotent no-op).
1979
- */
1980
- peerForget(peerId: string, opts: {
1981
- confirm: string;
1982
- }): Promise<{
1983
- ok: true;
1984
- purged: boolean;
1985
- }>;
1986
- /**
1987
- * Get the evolving cognitive profile for a peer. Returns `{ found: false }`
1988
- * when no profile file exists yet (profile is written by the async reasoner,
1989
- * PR 2/5). The peer identity itself need not exist for a profile to exist,
1990
- * but in practice the reasoner only writes profiles for registered peers.
1991
- */
1992
- peerProfileGet(peerId: string): Promise<{
1993
- found: true;
1994
- profile: PeerProfile;
1995
- } | {
1996
- found: false;
1997
- }>;
1998
- get memoryDir(): string;
1999
- /**
2000
- * Resolve the storage directory for a given namespace. Used by the SSE
2001
- * graph-event handler to subscribe to the correct per-namespace bus rather
2002
- * than the global root (CLAUDE.md rule 42 — read/write paths must resolve
2003
- * through the same namespace layer).
2004
- *
2005
- * `principal` must be the transport-bound request principal (from
2006
- * `resolveRequestPrincipal`). When namespaces are enabled, an absent
2007
- * principal causes `resolveReadableNamespace` to throw an auth error,
2008
- * matching the behaviour of every other authenticated read path.
2009
- *
2010
- * Falls back to `this.memoryDir` when namespaces are disabled or the
2011
- * namespace is absent, matching the behaviour of every other read path.
2012
- */
2013
- getMemoryDirForNamespace(namespace?: string, principal?: string): Promise<string>;
2014
- get storageRef(): StorageManager;
2015
- get configRef(): PluginConfig;
2016
- get localLlmRef(): LocalLlmClient | null;
2017
- get fallbackLlmRef(): FallbackLlmClient | null;
2018
- get embeddingLookupFactoryRef(): (storage: StorageManager) => SemanticDedupLookup | undefined;
2019
- /**
2020
- * Import a capsule archive into the orchestrator's memory directory.
2021
- *
2022
- * Delegates directly to the standalone {@link importCapsuleFn} function.
2023
- * The `root` parameter defaults to the orchestrator's `memoryDir` when
2024
- * omitted, so callers that only have access to the service do not need to
2025
- * thread the config value through.
2026
- *
2027
- * `versioning` defaults to the orchestrator's page-versioning config so
2028
- * `mode: "overwrite"` automatically snapshots prior content without the
2029
- * caller having to construct the config object.
2030
- */
2031
- capsuleImport(opts: Omit<ImportCapsuleOptions, "root" | "memoryDir"> & {
2032
- root?: string;
2033
- memoryDir?: string;
2034
- namespace?: string;
2035
- principal?: string;
2036
- }): Promise<ImportCapsuleResult>;
2037
- private validateCapsuleImportArchivePath;
2038
- private isCapsuleImportPathInputFsError;
2039
- private isCapsuleImportArchiveInputError;
2040
- /**
2041
- * Export a capsule archive from the orchestrator's memory directory.
2042
- *
2043
- * HTTP and future MCP surfaces use this rather than calling the transfer
2044
- * helper directly so namespace ACL checks stay consistent with the archive
2045
- * write side effect. The exporter still owns archive construction and
2046
- * validation.
2047
- */
2048
- capsuleExport(opts: Omit<ExportCapsuleOptions, "root" | "memoryDir"> & {
2049
- root?: string;
2050
- memoryDir?: string;
2051
- namespace?: string;
2052
- principal?: string;
2053
- }): Promise<ExportCapsuleResult>;
2054
- /**
2055
- * List capsule archives in the namespace-scoped capsule store.
2056
- *
2057
- * MCP uses this access-layer method instead of reading arbitrary paths so
2058
- * capsule discovery remains bound to the same namespace ACLs as export and
2059
- * import.
2060
- */
2061
- capsuleList(options?: {
2062
- namespace?: string;
2063
- principal?: string;
2064
- }): Promise<EngramAccessCapsuleListResponse>;
2065
- /**
2066
- * Return per-phase Dreams telemetry for the last N hours (default 24).
2067
- */
2068
- dreamsStatus(options?: {
2069
- windowHours?: number;
2070
- namespace?: string;
2071
- principal?: string;
2072
- }): Promise<DreamsStatusResult>;
2073
- /**
2074
- * Manually invoke a single Dreams phase pass (PR 4/4).
2075
- *
2076
- * Deep-sleep delegates to memory governance (shadow → dry-run, apply → live).
2077
- * Light-sleep and REM scan the observation ledger and memory corpus
2078
- * respectively, returning the same telemetry shape as a scheduled run.
2079
- */
2080
- dreamsRun(options: {
2081
- phase: DreamsPhase;
2082
- dryRun?: boolean;
2083
- namespace?: string;
2084
- authenticatedPrincipal?: string;
2085
- }): Promise<DreamsRunResult>;
2086
- }
2087
-
2088
- export { type EngramAccessReviewQueueResponse as $, type EngramAccessLcmCompactionFlushRequest as A, type EngramAccessLcmCompactionFlushResponse as B, type CapsuleParent as C, type EngramAccessLcmCompactionRecordRequest as D, EngramAccessService as E, type EngramAccessLcmCompactionRecordResponse as F, type EngramAccessLcmSearchRequest as G, type EngramAccessLcmSearchResponse as H, type ImportCapsuleResult as I, type EngramAccessLcmStatusResponse as J, type EngramAccessMaintenanceResponse as K, type EngramAccessMemoryBrowseRequest as L, type EngramAccessMemoryBrowseResponse as M, type EngramAccessMemoryRecord as N, type EngramAccessMemoryResponse as O, type PeerInteractionLogEntry as P, type EngramAccessMemoryStoreRequest as Q, type EngramAccessMemorySummary as R, type EngramAccessObserveMessage as S, type EngramAccessObserveRequest as T, type EngramAccessObserveResponse as U, type EngramAccessQualityResponse as V, type EngramAccessRecallExplainRequest as W, type EngramAccessRecallExplainResponse as X, type EngramAccessRecallRequest as Y, type EngramAccessReviewDispositionRequest as Z, type EngramAccessReviewDispositionResponse as _, type Peer as a, type EngramAccessSetCodingContextRequest as a0, type EngramAccessSuggestionSubmitRequest as a1, type EngramAccessTimelineResponse as a2, type EngramAccessTrustZoneBrowseRequest as a3, type EngramAccessTrustZoneBrowseResponse as a4, type EngramAccessTrustZoneDemoSeedRequest as a5, type EngramAccessTrustZoneDemoSeedResponse as a6, type EngramAccessTrustZonePromoteRequest as a7, type EngramAccessTrustZonePromoteResponse as a8, type EngramAccessTrustZoneRecordSummary as a9, type EngramAccessTrustZoneStatusResponse as aa, type EngramAccessWriteEnvelope as ab, type EngramAccessWriteResponse as ac, shapeMemorySummary as ad, type PeerProfile as b, type ExportManifestV2 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, type EngramAccessRecallResponse as o, ENGRAM_ACCESS_WRITE_SCHEMA_VERSION as p, type EngramAccessActionConfidenceRequest as q, type EngramAccessActionConfidenceResponse as r, type EngramAccessBriefingRequest as s, type EngramAccessBriefingResponse as t, type EngramAccessCapsuleListResponse as u, type EngramAccessDaySummaryRequest as v, type EngramAccessEntityListResponse as w, type EngramAccessEntityResponse as x, type EngramAccessEntitySummary as y, type EngramAccessHealthResponse as z };