@remnic/core 1.0.0

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 (551) hide show
  1. package/dist/abstraction-nodes.d.ts +52 -0
  2. package/dist/abstraction-nodes.js +15 -0
  3. package/dist/abstraction-nodes.js.map +1 -0
  4. package/dist/access-cli.d.ts +5 -0
  5. package/dist/access-cli.js +308 -0
  6. package/dist/access-cli.js.map +1 -0
  7. package/dist/access-http.d.ts +158 -0
  8. package/dist/access-http.js +32 -0
  9. package/dist/access-http.js.map +1 -0
  10. package/dist/access-idempotency.d.ts +31 -0
  11. package/dist/access-idempotency.js +11 -0
  12. package/dist/access-idempotency.js.map +1 -0
  13. package/dist/access-mcp.d.ts +76 -0
  14. package/dist/access-mcp.js +8 -0
  15. package/dist/access-mcp.js.map +1 -0
  16. package/dist/access-schema.d.ts +266 -0
  17. package/dist/access-schema.js +29 -0
  18. package/dist/access-schema.js.map +1 -0
  19. package/dist/access-service.d.ts +614 -0
  20. package/dist/access-service.js +32 -0
  21. package/dist/access-service.js.map +1 -0
  22. package/dist/behavior-learner.d.ts +16 -0
  23. package/dist/behavior-learner.js +124 -0
  24. package/dist/behavior-learner.js.map +1 -0
  25. package/dist/behavior-signals.d.ts +15 -0
  26. package/dist/behavior-signals.js +11 -0
  27. package/dist/behavior-signals.js.map +1 -0
  28. package/dist/bootstrap.d.ts +46 -0
  29. package/dist/bootstrap.js +9 -0
  30. package/dist/bootstrap.js.map +1 -0
  31. package/dist/boxes.d.ts +93 -0
  32. package/dist/boxes.js +14 -0
  33. package/dist/boxes.js.map +1 -0
  34. package/dist/buffer.d.ts +22 -0
  35. package/dist/buffer.js +9 -0
  36. package/dist/buffer.js.map +1 -0
  37. package/dist/calibration.d.ts +81 -0
  38. package/dist/calibration.js +239 -0
  39. package/dist/calibration.js.map +1 -0
  40. package/dist/causal-behavior.d.ts +79 -0
  41. package/dist/causal-behavior.js +190 -0
  42. package/dist/causal-behavior.js.map +1 -0
  43. package/dist/causal-chain.d.ts +61 -0
  44. package/dist/causal-chain.js +24 -0
  45. package/dist/causal-chain.js.map +1 -0
  46. package/dist/causal-consolidation.d.ts +71 -0
  47. package/dist/causal-consolidation.js +211 -0
  48. package/dist/causal-consolidation.js.map +1 -0
  49. package/dist/causal-retrieval.d.ts +44 -0
  50. package/dist/causal-retrieval.js +184 -0
  51. package/dist/causal-retrieval.js.map +1 -0
  52. package/dist/causal-trajectory-graph.d.ts +13 -0
  53. package/dist/causal-trajectory-graph.js +59 -0
  54. package/dist/causal-trajectory-graph.js.map +1 -0
  55. package/dist/causal-trajectory.d.ts +68 -0
  56. package/dist/causal-trajectory.js +18 -0
  57. package/dist/causal-trajectory.js.map +1 -0
  58. package/dist/chunk-2CJCWDMR.js +87 -0
  59. package/dist/chunk-2CJCWDMR.js.map +1 -0
  60. package/dist/chunk-2NMMFZ5T.js +216 -0
  61. package/dist/chunk-2NMMFZ5T.js.map +1 -0
  62. package/dist/chunk-2PO5ZRKV.js +103 -0
  63. package/dist/chunk-2PO5ZRKV.js.map +1 -0
  64. package/dist/chunk-3QKK7QOS.js +154 -0
  65. package/dist/chunk-3QKK7QOS.js.map +1 -0
  66. package/dist/chunk-3SLRNYNG.js +26 -0
  67. package/dist/chunk-3SLRNYNG.js.map +1 -0
  68. package/dist/chunk-4A24LIM2.js +68 -0
  69. package/dist/chunk-4A24LIM2.js.map +1 -0
  70. package/dist/chunk-6HZ6AO2P.js +164 -0
  71. package/dist/chunk-6HZ6AO2P.js.map +1 -0
  72. package/dist/chunk-763GUIOU.js +302 -0
  73. package/dist/chunk-763GUIOU.js.map +1 -0
  74. package/dist/chunk-AAI7JARD.js +173 -0
  75. package/dist/chunk-AAI7JARD.js.map +1 -0
  76. package/dist/chunk-B7LOFDVE.js +112 -0
  77. package/dist/chunk-B7LOFDVE.js.map +1 -0
  78. package/dist/chunk-BDFZXRSO.js +318 -0
  79. package/dist/chunk-BDFZXRSO.js.map +1 -0
  80. package/dist/chunk-BOUYNNYD.js +707 -0
  81. package/dist/chunk-BOUYNNYD.js.map +1 -0
  82. package/dist/chunk-BRK4ODMI.js +60 -0
  83. package/dist/chunk-BRK4ODMI.js.map +1 -0
  84. package/dist/chunk-C6QPK5GG.js +111 -0
  85. package/dist/chunk-C6QPK5GG.js.map +1 -0
  86. package/dist/chunk-C7VW7C3F.js +117 -0
  87. package/dist/chunk-C7VW7C3F.js.map +1 -0
  88. package/dist/chunk-CDW777AI.js +621 -0
  89. package/dist/chunk-CDW777AI.js.map +1 -0
  90. package/dist/chunk-CULXMQJH.js +185 -0
  91. package/dist/chunk-CULXMQJH.js.map +1 -0
  92. package/dist/chunk-CXWFUJR2.js +1203 -0
  93. package/dist/chunk-CXWFUJR2.js.map +1 -0
  94. package/dist/chunk-DGXUHMOV.js +61 -0
  95. package/dist/chunk-DGXUHMOV.js.map +1 -0
  96. package/dist/chunk-DM2T26WE.js +61 -0
  97. package/dist/chunk-DM2T26WE.js.map +1 -0
  98. package/dist/chunk-DORBM6OB.js +81 -0
  99. package/dist/chunk-DORBM6OB.js.map +1 -0
  100. package/dist/chunk-DT5TVLJE.js +32 -0
  101. package/dist/chunk-DT5TVLJE.js.map +1 -0
  102. package/dist/chunk-EEQLFRUM.js +89 -0
  103. package/dist/chunk-EEQLFRUM.js.map +1 -0
  104. package/dist/chunk-EQINRHYR.js +672 -0
  105. package/dist/chunk-EQINRHYR.js.map +1 -0
  106. package/dist/chunk-ESSMF2FR.js +146 -0
  107. package/dist/chunk-ESSMF2FR.js.map +1 -0
  108. package/dist/chunk-ETOW6ACV.js +158 -0
  109. package/dist/chunk-ETOW6ACV.js.map +1 -0
  110. package/dist/chunk-FYIYMQ5N.js +221 -0
  111. package/dist/chunk-FYIYMQ5N.js.map +1 -0
  112. package/dist/chunk-G3AG3KZN.js +78 -0
  113. package/dist/chunk-G3AG3KZN.js.map +1 -0
  114. package/dist/chunk-GJR6D6KC.js +61 -0
  115. package/dist/chunk-GJR6D6KC.js.map +1 -0
  116. package/dist/chunk-GPGBSNKM.js +380 -0
  117. package/dist/chunk-GPGBSNKM.js.map +1 -0
  118. package/dist/chunk-H63EDPFJ.js +57 -0
  119. package/dist/chunk-H63EDPFJ.js.map +1 -0
  120. package/dist/chunk-HG2NKWR2.js +185 -0
  121. package/dist/chunk-HG2NKWR2.js.map +1 -0
  122. package/dist/chunk-HL4DB7TO.js +13 -0
  123. package/dist/chunk-HL4DB7TO.js.map +1 -0
  124. package/dist/chunk-HLBYLYRD.js +346 -0
  125. package/dist/chunk-HLBYLYRD.js.map +1 -0
  126. package/dist/chunk-HLXVTBF3.js +109 -0
  127. package/dist/chunk-HLXVTBF3.js.map +1 -0
  128. package/dist/chunk-IFFFR3MR.js +68 -0
  129. package/dist/chunk-IFFFR3MR.js.map +1 -0
  130. package/dist/chunk-ISY75RLM.js +1027 -0
  131. package/dist/chunk-ISY75RLM.js.map +1 -0
  132. package/dist/chunk-IZME7KW2.js +1886 -0
  133. package/dist/chunk-IZME7KW2.js.map +1 -0
  134. package/dist/chunk-J3BT33K7.js +720 -0
  135. package/dist/chunk-J3BT33K7.js.map +1 -0
  136. package/dist/chunk-J47FNDR7.js +113 -0
  137. package/dist/chunk-J47FNDR7.js.map +1 -0
  138. package/dist/chunk-JWPLJLDU.js +63 -0
  139. package/dist/chunk-JWPLJLDU.js.map +1 -0
  140. package/dist/chunk-K6WK37A6.js +865 -0
  141. package/dist/chunk-K6WK37A6.js.map +1 -0
  142. package/dist/chunk-KL4CP4SB.js +130 -0
  143. package/dist/chunk-KL4CP4SB.js.map +1 -0
  144. package/dist/chunk-KT4NEUNF.js +315 -0
  145. package/dist/chunk-KT4NEUNF.js.map +1 -0
  146. package/dist/chunk-KWBU5S5U.js +42 -0
  147. package/dist/chunk-KWBU5S5U.js.map +1 -0
  148. package/dist/chunk-L5RPWGFK.js +59 -0
  149. package/dist/chunk-L5RPWGFK.js.map +1 -0
  150. package/dist/chunk-L7WO3MZ4.js +128 -0
  151. package/dist/chunk-L7WO3MZ4.js.map +1 -0
  152. package/dist/chunk-LIRZNNUP.js +74 -0
  153. package/dist/chunk-LIRZNNUP.js.map +1 -0
  154. package/dist/chunk-LK6SGL53.js +22 -0
  155. package/dist/chunk-LK6SGL53.js.map +1 -0
  156. package/dist/chunk-LOBRX7VD.js +200 -0
  157. package/dist/chunk-LOBRX7VD.js.map +1 -0
  158. package/dist/chunk-LPSF4OQH.js +47 -0
  159. package/dist/chunk-LPSF4OQH.js.map +1 -0
  160. package/dist/chunk-LU3GQNDQ.js +152 -0
  161. package/dist/chunk-LU3GQNDQ.js.map +1 -0
  162. package/dist/chunk-M5KEYE5E.js +350 -0
  163. package/dist/chunk-M5KEYE5E.js.map +1 -0
  164. package/dist/chunk-M62O4P4T.js +41 -0
  165. package/dist/chunk-M62O4P4T.js.map +1 -0
  166. package/dist/chunk-MARWOCVP.js +48 -0
  167. package/dist/chunk-MARWOCVP.js.map +1 -0
  168. package/dist/chunk-MDDAA2AO.js +925 -0
  169. package/dist/chunk-MDDAA2AO.js.map +1 -0
  170. package/dist/chunk-MWGVGUIS.js +198 -0
  171. package/dist/chunk-MWGVGUIS.js.map +1 -0
  172. package/dist/chunk-N5AKDXAI.js +74 -0
  173. package/dist/chunk-N5AKDXAI.js.map +1 -0
  174. package/dist/chunk-NGAVDO7E.js +115 -0
  175. package/dist/chunk-NGAVDO7E.js.map +1 -0
  176. package/dist/chunk-NTTLPF7F.js +283 -0
  177. package/dist/chunk-NTTLPF7F.js.map +1 -0
  178. package/dist/chunk-ONRU4L2N.js +240 -0
  179. package/dist/chunk-ONRU4L2N.js.map +1 -0
  180. package/dist/chunk-ORZMT74A.js +209 -0
  181. package/dist/chunk-ORZMT74A.js.map +1 -0
  182. package/dist/chunk-OTAVQCSF.js +268 -0
  183. package/dist/chunk-OTAVQCSF.js.map +1 -0
  184. package/dist/chunk-PGK3VUHN.js +160 -0
  185. package/dist/chunk-PGK3VUHN.js.map +1 -0
  186. package/dist/chunk-Q6FETXJA.js +1362 -0
  187. package/dist/chunk-Q6FETXJA.js.map +1 -0
  188. package/dist/chunk-QANCTXQF.js +271 -0
  189. package/dist/chunk-QANCTXQF.js.map +1 -0
  190. package/dist/chunk-QCCCQT3O.js +189 -0
  191. package/dist/chunk-QCCCQT3O.js.map +1 -0
  192. package/dist/chunk-QDOSNLB4.js +1048 -0
  193. package/dist/chunk-QDOSNLB4.js.map +1 -0
  194. package/dist/chunk-QFQVZOGA.js +2168 -0
  195. package/dist/chunk-QFQVZOGA.js.map +1 -0
  196. package/dist/chunk-QPKFPHOO.js +178 -0
  197. package/dist/chunk-QPKFPHOO.js.map +1 -0
  198. package/dist/chunk-QSVPYQPG.js +268 -0
  199. package/dist/chunk-QSVPYQPG.js.map +1 -0
  200. package/dist/chunk-QWUUMMIK.js +3045 -0
  201. package/dist/chunk-QWUUMMIK.js.map +1 -0
  202. package/dist/chunk-QY2BHY5O.js +2378 -0
  203. package/dist/chunk-QY2BHY5O.js.map +1 -0
  204. package/dist/chunk-SCHEKPYH.js +349 -0
  205. package/dist/chunk-SCHEKPYH.js.map +1 -0
  206. package/dist/chunk-SCU65EZI.js +15 -0
  207. package/dist/chunk-SCU65EZI.js.map +1 -0
  208. package/dist/chunk-T4WRIV2C.js +170 -0
  209. package/dist/chunk-T4WRIV2C.js.map +1 -0
  210. package/dist/chunk-TKO4HZCK.js +1852 -0
  211. package/dist/chunk-TKO4HZCK.js.map +1 -0
  212. package/dist/chunk-TP4FZJIZ.js +93 -0
  213. package/dist/chunk-TP4FZJIZ.js.map +1 -0
  214. package/dist/chunk-TPB3I2AC.js +403 -0
  215. package/dist/chunk-TPB3I2AC.js.map +1 -0
  216. package/dist/chunk-TVVVQQAK.js +1431 -0
  217. package/dist/chunk-TVVVQQAK.js.map +1 -0
  218. package/dist/chunk-U4PV25RD.js +14 -0
  219. package/dist/chunk-U4PV25RD.js.map +1 -0
  220. package/dist/chunk-UCYSTFZR.js +284 -0
  221. package/dist/chunk-UCYSTFZR.js.map +1 -0
  222. package/dist/chunk-UHGBNIOS.js +205 -0
  223. package/dist/chunk-UHGBNIOS.js.map +1 -0
  224. package/dist/chunk-UIYZ5T3I.js +108 -0
  225. package/dist/chunk-UIYZ5T3I.js.map +1 -0
  226. package/dist/chunk-UV2FO7J4.js +747 -0
  227. package/dist/chunk-UV2FO7J4.js.map +1 -0
  228. package/dist/chunk-UZB5KHKX.js +63 -0
  229. package/dist/chunk-UZB5KHKX.js.map +1 -0
  230. package/dist/chunk-V3RXWQIE.js +626 -0
  231. package/dist/chunk-V3RXWQIE.js.map +1 -0
  232. package/dist/chunk-V4YC4LUK.js +444 -0
  233. package/dist/chunk-V4YC4LUK.js.map +1 -0
  234. package/dist/chunk-VEWZZM3H.js +133 -0
  235. package/dist/chunk-VEWZZM3H.js.map +1 -0
  236. package/dist/chunk-WWIQTB2Y.js +98 -0
  237. package/dist/chunk-WWIQTB2Y.js.map +1 -0
  238. package/dist/chunk-X7XN6YU4.js +24 -0
  239. package/dist/chunk-X7XN6YU4.js.map +1 -0
  240. package/dist/chunk-XKECPATV.js +202 -0
  241. package/dist/chunk-XKECPATV.js.map +1 -0
  242. package/dist/chunk-XYIK4LF6.js +75 -0
  243. package/dist/chunk-XYIK4LF6.js.map +1 -0
  244. package/dist/chunk-Y27UJK6V.js +39 -0
  245. package/dist/chunk-Y27UJK6V.js.map +1 -0
  246. package/dist/chunk-Y4Z4I6WK.js +9 -0
  247. package/dist/chunk-Y4Z4I6WK.js.map +1 -0
  248. package/dist/chunk-YAPUAHAY.js +10761 -0
  249. package/dist/chunk-YAPUAHAY.js.map +1 -0
  250. package/dist/chunk-YAZNBMNF.js +92 -0
  251. package/dist/chunk-YAZNBMNF.js.map +1 -0
  252. package/dist/chunk-YCN4BVDK.js +66 -0
  253. package/dist/chunk-YCN4BVDK.js.map +1 -0
  254. package/dist/chunk-YNCQ7E4M.js +388 -0
  255. package/dist/chunk-YNCQ7E4M.js.map +1 -0
  256. package/dist/chunk-YNI4S5WT.js +143 -0
  257. package/dist/chunk-YNI4S5WT.js.map +1 -0
  258. package/dist/chunk-YRMVARQP.js +406 -0
  259. package/dist/chunk-YRMVARQP.js.map +1 -0
  260. package/dist/chunk-Z5AAYHUC.js +79 -0
  261. package/dist/chunk-Z5AAYHUC.js.map +1 -0
  262. package/dist/chunk-Z5LAYHGJ.js +15 -0
  263. package/dist/chunk-Z5LAYHGJ.js.map +1 -0
  264. package/dist/chunk-ZJLY4QSU.js +823 -0
  265. package/dist/chunk-ZJLY4QSU.js.map +1 -0
  266. package/dist/chunk-ZKYI7UVO.js +276 -0
  267. package/dist/chunk-ZKYI7UVO.js.map +1 -0
  268. package/dist/chunk-ZPKBYX2F.js +297 -0
  269. package/dist/chunk-ZPKBYX2F.js.map +1 -0
  270. package/dist/chunking.d.ts +48 -0
  271. package/dist/chunking.js +11 -0
  272. package/dist/chunking.js.map +1 -0
  273. package/dist/cli.d.ts +1162 -0
  274. package/dist/cli.js +7187 -0
  275. package/dist/cli.js.map +1 -0
  276. package/dist/commitment-ledger.d.ts +83 -0
  277. package/dist/commitment-ledger.js +19 -0
  278. package/dist/commitment-ledger.js.map +1 -0
  279. package/dist/compression-optimizer.d.ts +37 -0
  280. package/dist/compression-optimizer.js +13 -0
  281. package/dist/compression-optimizer.js.map +1 -0
  282. package/dist/config.d.ts +6 -0
  283. package/dist/config.js +12 -0
  284. package/dist/config.js.map +1 -0
  285. package/dist/cue-anchors.d.ts +50 -0
  286. package/dist/cue-anchors.js +15 -0
  287. package/dist/cue-anchors.js.map +1 -0
  288. package/dist/dashboard-runtime.d.ts +46 -0
  289. package/dist/dashboard-runtime.js +10 -0
  290. package/dist/dashboard-runtime.js.map +1 -0
  291. package/dist/day-summary.d.ts +6 -0
  292. package/dist/day-summary.js +10 -0
  293. package/dist/day-summary.js.map +1 -0
  294. package/dist/delinearize.d.ts +34 -0
  295. package/dist/delinearize.js +11 -0
  296. package/dist/delinearize.js.map +1 -0
  297. package/dist/embedding-fallback.d.ts +22 -0
  298. package/dist/embedding-fallback.js +8 -0
  299. package/dist/embedding-fallback.js.map +1 -0
  300. package/dist/engine-P26JFSVY.js +19 -0
  301. package/dist/engine-P26JFSVY.js.map +1 -0
  302. package/dist/entity-retrieval.d.ts +23 -0
  303. package/dist/entity-retrieval.js +24 -0
  304. package/dist/entity-retrieval.js.map +1 -0
  305. package/dist/evals.d.ts +282 -0
  306. package/dist/evals.js +32 -0
  307. package/dist/evals.js.map +1 -0
  308. package/dist/explicit-capture.d.ts +60 -0
  309. package/dist/explicit-capture.js +23 -0
  310. package/dist/explicit-capture.js.map +1 -0
  311. package/dist/extraction.d.ts +141 -0
  312. package/dist/extraction.js +22 -0
  313. package/dist/extraction.js.map +1 -0
  314. package/dist/fallback-llm.d.ts +95 -0
  315. package/dist/fallback-llm.js +12 -0
  316. package/dist/fallback-llm.js.map +1 -0
  317. package/dist/graph-dashboard-diff.d.ts +12 -0
  318. package/dist/graph-dashboard-diff.js +8 -0
  319. package/dist/graph-dashboard-diff.js.map +1 -0
  320. package/dist/graph-dashboard-key.d.ts +5 -0
  321. package/dist/graph-dashboard-key.js +7 -0
  322. package/dist/graph-dashboard-key.js.map +1 -0
  323. package/dist/graph-dashboard-parser.d.ts +20 -0
  324. package/dist/graph-dashboard-parser.js +8 -0
  325. package/dist/graph-dashboard-parser.js.map +1 -0
  326. package/dist/graph.d.ts +157 -0
  327. package/dist/graph.js +27 -0
  328. package/dist/graph.js.map +1 -0
  329. package/dist/harmonic-retrieval.d.ts +27 -0
  330. package/dist/harmonic-retrieval.js +12 -0
  331. package/dist/harmonic-retrieval.js.map +1 -0
  332. package/dist/himem.d.ts +23 -0
  333. package/dist/himem.js +7 -0
  334. package/dist/himem.js.map +1 -0
  335. package/dist/hygiene.d.ts +24 -0
  336. package/dist/hygiene.js +9 -0
  337. package/dist/hygiene.js.map +1 -0
  338. package/dist/identity-continuity.d.ts +17 -0
  339. package/dist/identity-continuity.js +19 -0
  340. package/dist/identity-continuity.js.map +1 -0
  341. package/dist/importance.d.ts +25 -0
  342. package/dist/importance.js +11 -0
  343. package/dist/importance.js.map +1 -0
  344. package/dist/index.d.ts +923 -0
  345. package/dist/index.js +2512 -0
  346. package/dist/index.js.map +1 -0
  347. package/dist/intent.d.ts +8 -0
  348. package/dist/intent.js +13 -0
  349. package/dist/intent.js.map +1 -0
  350. package/dist/json-extract.d.ts +14 -0
  351. package/dist/json-extract.js +9 -0
  352. package/dist/json-extract.js.map +1 -0
  353. package/dist/json-store.d.ts +5 -0
  354. package/dist/json-store.js +11 -0
  355. package/dist/json-store.js.map +1 -0
  356. package/dist/legacy-hook-compat.d.ts +3 -0
  357. package/dist/legacy-hook-compat.js +35 -0
  358. package/dist/legacy-hook-compat.js.map +1 -0
  359. package/dist/lifecycle.d.ts +52 -0
  360. package/dist/lifecycle.js +21 -0
  361. package/dist/lifecycle.js.map +1 -0
  362. package/dist/local-llm.d.ts +154 -0
  363. package/dist/local-llm.js +10 -0
  364. package/dist/local-llm.js.map +1 -0
  365. package/dist/logger.d.ts +15 -0
  366. package/dist/logger.js +9 -0
  367. package/dist/logger.js.map +1 -0
  368. package/dist/memory-action-policy.d.ts +13 -0
  369. package/dist/memory-action-policy.js +7 -0
  370. package/dist/memory-action-policy.js.map +1 -0
  371. package/dist/memory-cache.d.ts +35 -0
  372. package/dist/memory-cache.js +37 -0
  373. package/dist/memory-cache.js.map +1 -0
  374. package/dist/memory-lifecycle-ledger-utils.d.ts +13 -0
  375. package/dist/memory-lifecycle-ledger-utils.js +23 -0
  376. package/dist/memory-lifecycle-ledger-utils.js.map +1 -0
  377. package/dist/memory-projection-format.d.ts +4 -0
  378. package/dist/memory-projection-format.js +9 -0
  379. package/dist/memory-projection-format.js.map +1 -0
  380. package/dist/memory-projection-store-NxMkbocT.d.ts +221 -0
  381. package/dist/memory-projection-store.d.ts +3 -0
  382. package/dist/memory-projection-store.js +31 -0
  383. package/dist/memory-projection-store.js.map +1 -0
  384. package/dist/model-registry.d.ts +60 -0
  385. package/dist/model-registry.js +8 -0
  386. package/dist/model-registry.js.map +1 -0
  387. package/dist/native-knowledge.d.ts +94 -0
  388. package/dist/native-knowledge.js +26 -0
  389. package/dist/native-knowledge.js.map +1 -0
  390. package/dist/negative.d.ts +26 -0
  391. package/dist/negative.js +8 -0
  392. package/dist/negative.js.map +1 -0
  393. package/dist/objective-state-writers.d.ts +22 -0
  394. package/dist/objective-state-writers.js +313 -0
  395. package/dist/objective-state-writers.js.map +1 -0
  396. package/dist/objective-state.d.ts +75 -0
  397. package/dist/objective-state.js +17 -0
  398. package/dist/objective-state.js.map +1 -0
  399. package/dist/openai-chat-compat.d.ts +13 -0
  400. package/dist/openai-chat-compat.js +11 -0
  401. package/dist/openai-chat-compat.js.map +1 -0
  402. package/dist/operator-toolkit.d.ts +304 -0
  403. package/dist/operator-toolkit.js +41 -0
  404. package/dist/operator-toolkit.js.map +1 -0
  405. package/dist/opik-exporter.d.ts +72 -0
  406. package/dist/opik-exporter.js +361 -0
  407. package/dist/opik-exporter.js.map +1 -0
  408. package/dist/orchestrator-zTa-Qo-1.d.ts +1104 -0
  409. package/dist/orchestrator.d.ts +21 -0
  410. package/dist/orchestrator.js +145 -0
  411. package/dist/orchestrator.js.map +1 -0
  412. package/dist/policy-runtime.d.ts +37 -0
  413. package/dist/policy-runtime.js +13 -0
  414. package/dist/policy-runtime.js.map +1 -0
  415. package/dist/port-C1GZFv8h.d.ts +41 -0
  416. package/dist/profiling.d.ts +80 -0
  417. package/dist/profiling.js +10 -0
  418. package/dist/profiling.js.map +1 -0
  419. package/dist/qmd-recall-cache.d.ts +29 -0
  420. package/dist/qmd-recall-cache.js +13 -0
  421. package/dist/qmd-recall-cache.js.map +1 -0
  422. package/dist/qmd.d.ts +105 -0
  423. package/dist/qmd.js +13 -0
  424. package/dist/qmd.js.map +1 -0
  425. package/dist/recall-qos.d.ts +33 -0
  426. package/dist/recall-qos.js +10 -0
  427. package/dist/recall-qos.js.map +1 -0
  428. package/dist/recall-query-policy.d.ts +20 -0
  429. package/dist/recall-query-policy.js +11 -0
  430. package/dist/recall-query-policy.js.map +1 -0
  431. package/dist/recall-state.d.ts +113 -0
  432. package/dist/recall-state.js +12 -0
  433. package/dist/recall-state.js.map +1 -0
  434. package/dist/recall-tokenization.d.ts +4 -0
  435. package/dist/recall-tokenization.js +9 -0
  436. package/dist/recall-tokenization.js.map +1 -0
  437. package/dist/reconstruct.d.ts +16 -0
  438. package/dist/reconstruct.js +7 -0
  439. package/dist/reconstruct.js.map +1 -0
  440. package/dist/release-changelog.d.ts +7 -0
  441. package/dist/release-changelog.js +30 -0
  442. package/dist/release-changelog.js.map +1 -0
  443. package/dist/relevance.d.ts +18 -0
  444. package/dist/relevance.js +8 -0
  445. package/dist/relevance.js.map +1 -0
  446. package/dist/rerank.d.ts +57 -0
  447. package/dist/rerank.js +11 -0
  448. package/dist/rerank.js.map +1 -0
  449. package/dist/resolve-provider-secret.d.ts +16 -0
  450. package/dist/resolve-provider-secret.js +11 -0
  451. package/dist/resolve-provider-secret.js.map +1 -0
  452. package/dist/resume-bundles.d.ts +66 -0
  453. package/dist/resume-bundles.js +27 -0
  454. package/dist/resume-bundles.js.map +1 -0
  455. package/dist/retrieval-agents.d.ts +129 -0
  456. package/dist/retrieval-agents.js +23 -0
  457. package/dist/retrieval-agents.js.map +1 -0
  458. package/dist/retrieval.d.ts +19 -0
  459. package/dist/retrieval.js +10 -0
  460. package/dist/retrieval.js.map +1 -0
  461. package/dist/sanitize.d.ts +9 -0
  462. package/dist/sanitize.js +9 -0
  463. package/dist/sanitize.js.map +1 -0
  464. package/dist/schemas.d.ts +688 -0
  465. package/dist/schemas.js +51 -0
  466. package/dist/schemas.js.map +1 -0
  467. package/dist/sdk-compat.d.ts +21 -0
  468. package/dist/sdk-compat.js +28 -0
  469. package/dist/sdk-compat.js.map +1 -0
  470. package/dist/semantic-consolidation.d.ts +42 -0
  471. package/dist/semantic-consolidation.js +12 -0
  472. package/dist/semantic-consolidation.js.map +1 -0
  473. package/dist/semantic-rule-promotion.d.ts +28 -0
  474. package/dist/semantic-rule-promotion.js +17 -0
  475. package/dist/semantic-rule-promotion.js.map +1 -0
  476. package/dist/semantic-rule-verifier.d.ts +19 -0
  477. package/dist/semantic-rule-verifier.js +18 -0
  478. package/dist/semantic-rule-verifier.js.map +1 -0
  479. package/dist/session-integrity.d.ts +67 -0
  480. package/dist/session-integrity.js +11 -0
  481. package/dist/session-integrity.js.map +1 -0
  482. package/dist/session-observer-bands.d.ts +6 -0
  483. package/dist/session-observer-bands.js +9 -0
  484. package/dist/session-observer-bands.js.map +1 -0
  485. package/dist/session-observer-state.d.ts +40 -0
  486. package/dist/session-observer-state.js +11 -0
  487. package/dist/session-observer-state.js.map +1 -0
  488. package/dist/signal.d.ts +6 -0
  489. package/dist/signal.js +9 -0
  490. package/dist/signal.js.map +1 -0
  491. package/dist/storage.d.ts +453 -0
  492. package/dist/storage.js +24 -0
  493. package/dist/storage.js.map +1 -0
  494. package/dist/store-contract.d.ts +10 -0
  495. package/dist/store-contract.js +21 -0
  496. package/dist/store-contract.js.map +1 -0
  497. package/dist/summarizer.d.ts +35 -0
  498. package/dist/summarizer.js +17 -0
  499. package/dist/summarizer.js.map +1 -0
  500. package/dist/summary-snapshot.d.ts +8 -0
  501. package/dist/summary-snapshot.js +13 -0
  502. package/dist/summary-snapshot.js.map +1 -0
  503. package/dist/temporal-index.d.ts +139 -0
  504. package/dist/temporal-index.js +29 -0
  505. package/dist/temporal-index.js.map +1 -0
  506. package/dist/threading.d.ts +62 -0
  507. package/dist/threading.js +8 -0
  508. package/dist/threading.js.map +1 -0
  509. package/dist/tier-migration.d.ts +44 -0
  510. package/dist/tier-migration.js +7 -0
  511. package/dist/tier-migration.js.map +1 -0
  512. package/dist/tier-routing.d.ts +21 -0
  513. package/dist/tier-routing.js +10 -0
  514. package/dist/tier-routing.js.map +1 -0
  515. package/dist/tmt.d.ts +79 -0
  516. package/dist/tmt.js +29 -0
  517. package/dist/tmt.js.map +1 -0
  518. package/dist/tokens.d.ts +24 -0
  519. package/dist/tokens.js +21 -0
  520. package/dist/tokens.js.map +1 -0
  521. package/dist/topics.d.ts +29 -0
  522. package/dist/topics.js +9 -0
  523. package/dist/topics.js.map +1 -0
  524. package/dist/transcript.d.ts +171 -0
  525. package/dist/transcript.js +9 -0
  526. package/dist/transcript.js.map +1 -0
  527. package/dist/trust-zones.d.ts +170 -0
  528. package/dist/trust-zones.js +32 -0
  529. package/dist/trust-zones.js.map +1 -0
  530. package/dist/types.d.ts +1243 -0
  531. package/dist/types.js +9 -0
  532. package/dist/types.js.map +1 -0
  533. package/dist/utility-learner.d.ts +59 -0
  534. package/dist/utility-learner.js +17 -0
  535. package/dist/utility-learner.js.map +1 -0
  536. package/dist/utility-runtime.d.ts +21 -0
  537. package/dist/utility-runtime.js +16 -0
  538. package/dist/utility-runtime.js.map +1 -0
  539. package/dist/utility-telemetry.d.ts +68 -0
  540. package/dist/utility-telemetry.js +17 -0
  541. package/dist/utility-telemetry.js.map +1 -0
  542. package/dist/verified-recall.d.ts +17 -0
  543. package/dist/verified-recall.js +19 -0
  544. package/dist/verified-recall.js.map +1 -0
  545. package/dist/version-utils.d.ts +4 -0
  546. package/dist/version-utils.js +7 -0
  547. package/dist/version-utils.js.map +1 -0
  548. package/dist/work-product-ledger.d.ts +65 -0
  549. package/dist/work-product-ledger.js +18 -0
  550. package/dist/work-product-ledger.js.map +1 -0
  551. package/package.json +58 -0
@@ -0,0 +1,1104 @@
1
+ import { SmartBuffer } from './buffer.js';
2
+ import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions } from './port-C1GZFv8h.js';
3
+ import { StorageManager } from './storage.js';
4
+ import { TranscriptManager } from './transcript.js';
5
+ import { HourlySummarizer } from './summarizer.js';
6
+ import { LocalLlmClient } from './local-llm.js';
7
+ import { ModelRegistry } from './model-registry.js';
8
+ import { RelevanceStore } from './relevance.js';
9
+ import { NegativeExampleStore } from './negative.js';
10
+ import { LastRecallStore, TierMigrationStatusStore, GraphRecallExpandedEntry, TierMigrationStatusSnapshot, TierMigrationCycleSummary, LastRecallSnapshot } from './recall-state.js';
11
+ import { SessionObserverState } from './session-observer-state.js';
12
+ import { EmbeddingFallback } from './embedding-fallback.js';
13
+ import { PluginConfig, QmdSearchResult, BehaviorLoopPolicyState, BootstrapOptions, BootstrapResult, MemoryFile, DaySummaryResult, MemoryActionEvent, RecallPlanMode, MemoryIntent, ExtractionResult, MemoryFrontmatter, IdentityInjectionMode } from './types.js';
14
+ import { SemanticConsolidationResult } from './semantic-consolidation.js';
15
+ import { z } from 'zod';
16
+ import { RuntimePolicyValues } from './policy-runtime.js';
17
+ import { ProfilingCollector } from './profiling.js';
18
+
19
+ type ReplaySource = "openclaw" | "claude" | "chatgpt";
20
+ type ReplayRole = "user" | "assistant";
21
+ interface ReplayTurn {
22
+ source: ReplaySource;
23
+ sessionKey: string;
24
+ role: ReplayRole;
25
+ content: string;
26
+ timestamp: string;
27
+ externalId?: string;
28
+ metadata?: Record<string, unknown>;
29
+ }
30
+ interface ReplayWarning {
31
+ code: string;
32
+ message: string;
33
+ index?: number;
34
+ }
35
+
36
+ type SummarizeFn = (text: string, targetTokens: number, aggressive: boolean) => Promise<string | null>;
37
+
38
+ declare class LcmEngine {
39
+ private readonly summarizeFn;
40
+ private db;
41
+ private archive;
42
+ private dag;
43
+ private summarizer;
44
+ private observeQueue;
45
+ private closed;
46
+ private readonly config;
47
+ private readonly memoryDir;
48
+ private initPromise;
49
+ private readonly pendingObserveInitCounts;
50
+ private readonly pendingObserveInitWaiters;
51
+ private readonly pendingObserveInitIdleWaiters;
52
+ constructor(pluginConfig: PluginConfig, summarizeFn: SummarizeFn);
53
+ get enabled(): boolean;
54
+ /** Lazy init — open database on first use. */
55
+ ensureInitialized(): Promise<void>;
56
+ private doInit;
57
+ /**
58
+ * Enqueue messages from agent_end hook.
59
+ * The queue worker performs the archive append and incremental summarization.
60
+ */
61
+ observeMessages(sessionId: string, messages: Array<{
62
+ role: string;
63
+ content: string;
64
+ }>): Promise<void>;
65
+ /** Enqueue an observe job without waiting for worker completion. */
66
+ enqueueObserveMessages(sessionId: string, messages: Array<{
67
+ role: string;
68
+ content: string;
69
+ }>): void;
70
+ private processObserveMessages;
71
+ get observeQueueDepth(): number;
72
+ get observeQueueInFlightCount(): number;
73
+ waitForObserveQueueIdle(): Promise<void>;
74
+ waitForSessionObserveIdle(sessionId: string): Promise<void>;
75
+ private reservePendingObserveInit;
76
+ private releasePendingObserveInit;
77
+ private waitForPendingObserveInitIdle;
78
+ /** Build the compressed history recall section for a session. */
79
+ assembleRecall(sessionId: string, budgetChars: number): Promise<string>;
80
+ /** Flush pending summaries before compaction (called from before_compaction hook). */
81
+ preCompactionFlush(sessionId: string): Promise<void>;
82
+ /** Record a compaction event with real token counts (called from after_compaction hook). */
83
+ recordCompaction(sessionId: string, tokensBefore: number, tokensAfter: number): Promise<void>;
84
+ /** Verify archive coverage after compaction. */
85
+ verifyPostCompaction(sessionId: string): Promise<void>;
86
+ /** Search across all conversation history via FTS (snippet mode). */
87
+ searchContext(query: string, limit: number, sessionId?: string): Promise<Array<{
88
+ turn_index: number;
89
+ role: string;
90
+ snippet: string;
91
+ session_id: string;
92
+ }>>;
93
+ /** Search via FTS returning full message content (not snippets). */
94
+ searchContextFull(query: string, limit: number, sessionId?: string): Promise<Array<{
95
+ id: number;
96
+ turn_index: number;
97
+ role: string;
98
+ content: string;
99
+ session_id: string;
100
+ score: number;
101
+ }>>;
102
+ /** Get a compressed summary of a turn range. */
103
+ describeContext(sessionId: string, fromTurn: number, toTurn: number): Promise<{
104
+ summary: string;
105
+ turn_count: number;
106
+ depth: number;
107
+ } | null>;
108
+ /** Retrieve raw messages for a turn range (lossless expansion). */
109
+ expandContext(sessionId: string, fromTurn: number, toTurn: number, maxTokens: number): Promise<Array<{
110
+ turn_index: number;
111
+ role: string;
112
+ content: string;
113
+ }>>;
114
+ /** Get statistics about the LCM archive. */
115
+ getStats(sessionId?: string): Promise<{
116
+ totalMessages: number;
117
+ totalSummaryNodes: number;
118
+ maxDepth: number;
119
+ }>;
120
+ /** Prune old data beyond retention period. */
121
+ prune(): Promise<{
122
+ messagesPruned: number;
123
+ nodesPruned: number;
124
+ }>;
125
+ /** Close the database connection. */
126
+ close(): void;
127
+ }
128
+
129
+ interface ConversationIndexBackendInspection {
130
+ backend: "qmd" | "faiss";
131
+ status: "ok" | "degraded" | "disabled";
132
+ available: boolean;
133
+ indexPath: string;
134
+ supportsIncrementalUpdate: boolean;
135
+ message?: string;
136
+ metadata: {
137
+ chunkCount: number | null;
138
+ qmdAvailable?: boolean;
139
+ debugStatus?: string;
140
+ hasIndex?: boolean;
141
+ hasMetadata?: boolean;
142
+ hasManifest?: boolean;
143
+ manifest?: {
144
+ version: number;
145
+ modelId: string;
146
+ normalizedModelId: string;
147
+ dimension: number;
148
+ chunkCount: number;
149
+ updatedAt: string;
150
+ lastSuccessfulRebuildAt: string;
151
+ };
152
+ };
153
+ }
154
+
155
+ declare const SharedFeedbackEntrySchema: z.ZodObject<{
156
+ agent: z.ZodString;
157
+ decision: z.ZodEnum<["approved", "approved_with_feedback", "rejected"]>;
158
+ reason: z.ZodString;
159
+ date: z.ZodString;
160
+ learning: z.ZodOptional<z.ZodString>;
161
+ outcome: z.ZodOptional<z.ZodString>;
162
+ severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
163
+ confidence: z.ZodOptional<z.ZodNumber>;
164
+ workflow: z.ZodOptional<z.ZodString>;
165
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
166
+ evidenceWindowStart: z.ZodOptional<z.ZodString>;
167
+ evidenceWindowEnd: z.ZodOptional<z.ZodString>;
168
+ refs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ decision: "rejected" | "approved" | "approved_with_feedback";
171
+ reason: string;
172
+ agent: string;
173
+ date: string;
174
+ confidence?: number | undefined;
175
+ tags?: string[] | undefined;
176
+ severity?: "low" | "medium" | "high" | undefined;
177
+ outcome?: string | undefined;
178
+ refs?: string[] | undefined;
179
+ workflow?: string | undefined;
180
+ learning?: string | undefined;
181
+ evidenceWindowStart?: string | undefined;
182
+ evidenceWindowEnd?: string | undefined;
183
+ }, {
184
+ decision: "rejected" | "approved" | "approved_with_feedback";
185
+ reason: string;
186
+ agent: string;
187
+ date: string;
188
+ confidence?: number | undefined;
189
+ tags?: string[] | undefined;
190
+ severity?: "low" | "medium" | "high" | undefined;
191
+ outcome?: string | undefined;
192
+ refs?: string[] | undefined;
193
+ workflow?: string | undefined;
194
+ learning?: string | undefined;
195
+ evidenceWindowStart?: string | undefined;
196
+ evidenceWindowEnd?: string | undefined;
197
+ }>;
198
+ type SharedFeedbackEntry = z.infer<typeof SharedFeedbackEntrySchema>;
199
+ interface SharedCrossSignalSource {
200
+ agent: string;
201
+ path: string;
202
+ title: string;
203
+ topics: string[];
204
+ }
205
+ interface SharedCrossSignalOverlap {
206
+ token: string;
207
+ agents: string[];
208
+ sourcePaths: string[];
209
+ agentCount: number;
210
+ }
211
+ interface SharedCrossSignalReport {
212
+ date: string;
213
+ generatedAt: string;
214
+ sourceCount: number;
215
+ feedbackCount: number;
216
+ feedbackByDecision: Record<"approved" | "approved_with_feedback" | "rejected", number>;
217
+ feedbackEntries: SharedFeedbackEntry[];
218
+ sources: SharedCrossSignalSource[];
219
+ overlaps: SharedCrossSignalOverlap[];
220
+ semantic: {
221
+ enabled: boolean;
222
+ applied: boolean;
223
+ timedOut: boolean;
224
+ candidateCount: number;
225
+ maxCandidates: number;
226
+ addedOverlapCount: number;
227
+ };
228
+ }
229
+ interface SharedCrossSignalSynthesisResult {
230
+ date: string;
231
+ crossSignalsPath: string;
232
+ crossSignalsMarkdownPath: string;
233
+ overlapCount: number;
234
+ report: SharedCrossSignalReport;
235
+ }
236
+ interface SharedDailyCurationResult {
237
+ date: string;
238
+ roundtablePath: string;
239
+ crossSignalsPath: string;
240
+ crossSignalsMarkdownPath: string;
241
+ overlapCount: number;
242
+ }
243
+ declare class SharedContextManager {
244
+ private readonly config;
245
+ readonly dir: string;
246
+ private readonly prioritiesPath;
247
+ private readonly prioritiesInboxPath;
248
+ private readonly outputsDir;
249
+ private readonly roundtableDir;
250
+ private readonly feedbackDir;
251
+ private readonly feedbackInboxPath;
252
+ private readonly crossSignalsDir;
253
+ constructor(config: PluginConfig);
254
+ ensureStructure(): Promise<void>;
255
+ private ensureFile;
256
+ readPriorities(): Promise<string>;
257
+ readLatestRoundtable(): Promise<string>;
258
+ readLatestCrossSignals(): Promise<string>;
259
+ writeAgentOutput(opts: {
260
+ agentId: string;
261
+ title: string;
262
+ content: string;
263
+ createdAt?: Date;
264
+ }): Promise<string>;
265
+ appendFeedback(entry: SharedFeedbackEntry): Promise<void>;
266
+ appendPrioritiesInbox(opts: {
267
+ agentId: string;
268
+ text: string;
269
+ }): Promise<void>;
270
+ synthesizeCrossSignals(opts: {
271
+ date?: string;
272
+ maxSummaryItems?: number;
273
+ }): Promise<SharedCrossSignalSynthesisResult>;
274
+ curateDaily(opts: {
275
+ date?: string;
276
+ maxChars?: number;
277
+ }): Promise<SharedDailyCurationResult>;
278
+ }
279
+
280
+ type MistakesFile = {
281
+ version?: number;
282
+ updatedAt: string;
283
+ patterns: string[];
284
+ registry?: MistakeRegistryEntry[];
285
+ };
286
+ type ActionOutcomeCounts = {
287
+ applied: number;
288
+ skipped: number;
289
+ failed: number;
290
+ unknown: number;
291
+ };
292
+ type ActionOutcomeSummary = {
293
+ action: string;
294
+ counts: ActionOutcomeCounts;
295
+ total: number;
296
+ weightedScore: number;
297
+ provenance: string[];
298
+ };
299
+ type PromotionCandidate = {
300
+ id: string;
301
+ sourceType: "action-outcome" | "mistake-pattern" | "rubric" | "causal-pattern";
302
+ subject: string;
303
+ category: "principle" | "rule";
304
+ content: string;
305
+ score: number;
306
+ rationale: string;
307
+ outcome: ActionOutcomeCounts | null;
308
+ provenance: string[];
309
+ agent: string | null;
310
+ workflow: string | null;
311
+ };
312
+ type CompoundingEntrySeverity = "low" | "medium" | "high";
313
+ type EvidenceWindow = {
314
+ start: string | null;
315
+ end: string | null;
316
+ };
317
+ type MistakeRegistryEntry = {
318
+ id: string;
319
+ pattern: string;
320
+ category: "feedback" | "action";
321
+ status: "active" | "retired";
322
+ agent: string | null;
323
+ workflow: string | null;
324
+ tags: string[];
325
+ severity: CompoundingEntrySeverity | null;
326
+ confidence: number | null;
327
+ outcome: string | null;
328
+ provenance: string[];
329
+ firstSeenAt: string;
330
+ lastSeenAt: string;
331
+ recurrenceCount: number;
332
+ lastWeekId: string;
333
+ evidenceWindow: EvidenceWindow;
334
+ mergedFromIds?: string[];
335
+ retiredAt?: string | null;
336
+ };
337
+ type RubricSnapshotEntry = {
338
+ id: string;
339
+ kind: "agent" | "workflow";
340
+ subject: string;
341
+ observations: string[];
342
+ tags: string[];
343
+ provenance: string[];
344
+ observationEntries?: Array<{
345
+ note: string;
346
+ provenance: string[];
347
+ }>;
348
+ updatedAt: string;
349
+ };
350
+ type RubricSnapshot = {
351
+ updatedAt: string;
352
+ agents: RubricSnapshotEntry[];
353
+ workflows: RubricSnapshotEntry[];
354
+ };
355
+ type WeeklyCompoundingArtifact = {
356
+ version: number;
357
+ generatedAt: string;
358
+ weekId: string;
359
+ feedback: {
360
+ count: number;
361
+ byDecision: Record<"approved" | "approved_with_feedback" | "rejected", number>;
362
+ entries: Array<{
363
+ agent: string;
364
+ workflow: string | null;
365
+ decision: SharedFeedbackEntry["decision"];
366
+ reason: string;
367
+ learning: string | null;
368
+ outcome: string | null;
369
+ severity: CompoundingEntrySeverity | null;
370
+ confidence: number | null;
371
+ tags: string[];
372
+ provenance: string;
373
+ evidenceWindow: EvidenceWindow;
374
+ }>;
375
+ };
376
+ mistakes: {
377
+ count: number;
378
+ patterns: string[];
379
+ registry: MistakeRegistryEntry[];
380
+ };
381
+ rubrics: RubricSnapshot;
382
+ outcomes: ActionOutcomeSummary[];
383
+ promotionCandidates: PromotionCandidate[];
384
+ continuity: {
385
+ monthId: string;
386
+ weeklyPath: string | null;
387
+ monthlyPath: string | null;
388
+ };
389
+ };
390
+ interface CompoundingPromotionReport {
391
+ enabled: boolean;
392
+ dryRun: boolean;
393
+ weekId: string;
394
+ promoted: Array<{
395
+ id: string;
396
+ candidateId: string;
397
+ category: "principle" | "rule";
398
+ content: string;
399
+ confidence: number;
400
+ tags: string[];
401
+ lineage: string[];
402
+ }>;
403
+ skipped: Array<{
404
+ weekId: string;
405
+ candidateId?: string;
406
+ reason: "disabled" | "weekly-artifact-missing" | "candidate-not-found" | "duplicate-guidance";
407
+ existingMemoryId?: string;
408
+ }>;
409
+ }
410
+ type TierMigrationCycleTrigger = "extraction" | "maintenance";
411
+ interface TierMigrationCycleBudget {
412
+ limit: number;
413
+ scanLimit: number;
414
+ minIntervalMs: number;
415
+ }
416
+ declare class CompoundingEngine {
417
+ private readonly config;
418
+ private readonly weeklyDir;
419
+ private readonly rubricsDir;
420
+ private readonly rubricsIndexPath;
421
+ private readonly rubricsAgentsDir;
422
+ private readonly rubricsWorkflowsDir;
423
+ private readonly rubricsPath;
424
+ private readonly mistakesPath;
425
+ private readonly feedbackInboxPath;
426
+ private readonly identityAnchorPath;
427
+ private readonly identityIncidentsDir;
428
+ private readonly identityAuditWeeklyDir;
429
+ private readonly identityAuditMonthlyDir;
430
+ private readonly identityImprovementLoopsPath;
431
+ private readonly memoryActionEventsPath;
432
+ constructor(config: PluginConfig);
433
+ ensureDirs(): Promise<void>;
434
+ synthesizeWeekly(opts?: {
435
+ weekId?: string;
436
+ }): Promise<{
437
+ weekId: string;
438
+ reportPath: string;
439
+ reportJsonPath: string;
440
+ mistakesCount: number;
441
+ rubricsPath: string;
442
+ rubricsIndexPath: string;
443
+ promotionCandidateCount: number;
444
+ }>;
445
+ promoteCandidate(opts: {
446
+ weekId: string;
447
+ candidateId: string;
448
+ dryRun?: boolean;
449
+ storage?: StorageManager;
450
+ }): Promise<CompoundingPromotionReport>;
451
+ synthesizeContinuityAudit(opts?: {
452
+ period?: "weekly" | "monthly";
453
+ key?: string;
454
+ }): Promise<{
455
+ period: "weekly" | "monthly";
456
+ key: string;
457
+ reportPath: string;
458
+ }>;
459
+ readMistakes(): Promise<MistakesFile | null>;
460
+ readRubrics(): Promise<RubricSnapshot | null>;
461
+ readWeeklyArtifact(weekId: string): Promise<WeeklyCompoundingArtifact | null>;
462
+ buildRecallSection(query: string, opts?: {
463
+ maxPatterns?: number;
464
+ maxRubrics?: number;
465
+ }): Promise<string | null>;
466
+ tierMigrationCycleBudget(trigger: TierMigrationCycleTrigger): TierMigrationCycleBudget;
467
+ private readFeedbackEntriesForWeek;
468
+ private buildActionFailurePatterns;
469
+ private readActionEventsForWeek;
470
+ private buildActionOutcomeSummary;
471
+ private derivePromotionCandidates;
472
+ private buildMistakes;
473
+ private formatWeeklyReport;
474
+ private buildRubricSnapshot;
475
+ private formatRubrics;
476
+ private syncRubricArtifacts;
477
+ private replaceRubricDirectory;
478
+ private scoreRubricForQuery;
479
+ private normalizeRubricEntry;
480
+ private getRubricObservationEntries;
481
+ private isSyntheticOutcomeRubricObservation;
482
+ private addRubricObservation;
483
+ private readNonEmptyFile;
484
+ private readOptionalFile;
485
+ private readContinuityIncidents;
486
+ private readContinuityAuditReferences;
487
+ }
488
+
489
+ interface GraphRecallSnapshot {
490
+ recordedAt: string;
491
+ mode: RecallPlanMode | string;
492
+ queryHash: string;
493
+ queryLength: number;
494
+ namespaces: string[];
495
+ seedCount: number;
496
+ expandedCount: number;
497
+ seeds: string[];
498
+ expanded: GraphRecallExpandedEntry[];
499
+ status?: "completed" | "skipped" | "aborted";
500
+ reason?: string;
501
+ shadowMode?: boolean;
502
+ queryIntent?: MemoryIntent;
503
+ seedResults?: GraphRecallRankedResult[];
504
+ finalResults?: GraphRecallRankedResult[];
505
+ shadowComparison?: GraphRecallShadowComparison;
506
+ }
507
+ interface GraphRecallRankedResult {
508
+ path: string;
509
+ score: number;
510
+ docid?: string;
511
+ sourceLabels: string[];
512
+ }
513
+ interface GraphRecallShadowComparison {
514
+ baselineCount: number;
515
+ graphCount: number;
516
+ overlapCount: number;
517
+ overlapRatio: number;
518
+ averageOverlapDelta: number;
519
+ }
520
+ interface IntentDebugSnapshot {
521
+ recordedAt: string;
522
+ promptHash: string;
523
+ promptLength: number;
524
+ retrievalQueryHash: string;
525
+ retrievalQueryLength: number;
526
+ plannerEnabled: boolean;
527
+ plannedMode: RecallPlanMode;
528
+ effectiveMode: RecallPlanMode;
529
+ recallResultLimit: number;
530
+ queryIntent: MemoryIntent;
531
+ graphExpandedIntentDetected: boolean;
532
+ graphDecision: {
533
+ status: "not_requested" | "skipped" | "completed" | "aborted";
534
+ reason?: string;
535
+ shadowMode: boolean;
536
+ qmdAvailable: boolean;
537
+ graphRecallEnabled: boolean;
538
+ multiGraphMemoryEnabled: boolean;
539
+ };
540
+ }
541
+ interface QmdRecallSnapshot {
542
+ recordedAt: string;
543
+ queryHash: string;
544
+ queryLength: number;
545
+ collection?: string;
546
+ namespaces: string[];
547
+ fetchLimit: number;
548
+ primaryResultCount: number;
549
+ hybridResultCount: number;
550
+ queryAwareSeedCount: number;
551
+ resultCount: number;
552
+ intentHint?: string;
553
+ explainEnabled: boolean;
554
+ hybridTopUpUsed: boolean;
555
+ hybridTopUpSkippedReason?: string;
556
+ results: QmdSearchResult[];
557
+ }
558
+ interface RecallModeDecision {
559
+ plannedMode: RecallPlanMode;
560
+ effectiveMode: RecallPlanMode;
561
+ graphExpandedIntentDetected: boolean;
562
+ graphReason?: string;
563
+ }
564
+ interface RecallInvocationOptions {
565
+ namespace?: string;
566
+ topK?: number;
567
+ mode?: RecallPlanMode;
568
+ abortSignal?: AbortSignal;
569
+ }
570
+ /** Default workspace directory when no per-agent or config workspace is available. */
571
+ declare function defaultWorkspaceDir(): string;
572
+ /**
573
+ * Produce a collision-resistant, filesystem-safe identifier from a session key.
574
+ *
575
+ * Session keys follow colon-delimited forms (e.g., `agent:gpucodebot:main`).
576
+ * A naive replace (`:` → `_`) is lossy: different keys like `agent:alpha` and
577
+ * `agent/alpha` would collide. Instead we append a short SHA-256 hash of the
578
+ * original key to the human-readable sanitized prefix, guaranteeing uniqueness
579
+ * while keeping filenames debuggable.
580
+ *
581
+ * Format: `<sanitized>-<12-char-hex-hash>`
582
+ * Example: `agent:gpucodebot:main` → `agent_gpucodebot_main-a1b2c3d4e5f6`
583
+ */
584
+ declare function sanitizeSessionKeyForFilename(sessionKey: string): string;
585
+ declare function isArtifactMemoryPath(filePath: string): boolean;
586
+ declare function deriveTopicsFromExtraction(result: ExtractionResult): string[];
587
+ declare function buildCompressionGuidelinesMarkdown(events: MemoryActionEvent[], generatedAtIso?: string): string;
588
+ declare function formatCompressionGuidelinesForRecall(raw: string, maxLines?: number): string | null;
589
+ declare function filterRecallCandidates(candidates: QmdSearchResult[], options: {
590
+ namespacesEnabled: boolean;
591
+ recallNamespaces: string[];
592
+ resolveNamespace: (path: string) => string;
593
+ limit: number;
594
+ }): QmdSearchResult[];
595
+ declare function shouldFilterLifecycleRecallCandidate(frontmatter: MemoryFrontmatter, options: {
596
+ lifecyclePolicyEnabled: boolean;
597
+ lifecycleFilterStaleEnabled: boolean;
598
+ }): boolean;
599
+ declare function lifecycleRecallScoreAdjustment(frontmatter: MemoryFrontmatter, options: {
600
+ lifecyclePolicyEnabled: boolean;
601
+ }): number;
602
+ declare function computeArtifactRecallLimit(recallMode: RecallPlanMode, recallResultLimit: number, verbatimArtifactsMaxRecall: number): number;
603
+ declare function resolveEffectiveRecallMode(options: {
604
+ plannerEnabled: boolean;
605
+ graphRecallEnabled: boolean;
606
+ multiGraphMemoryEnabled: boolean;
607
+ graphExpandedIntentEnabled?: boolean;
608
+ prompt: string;
609
+ }): RecallPlanMode;
610
+ declare function resolveRecallModeDecision(options: {
611
+ plannerEnabled: boolean;
612
+ graphRecallEnabled: boolean;
613
+ multiGraphMemoryEnabled: boolean;
614
+ graphExpandedIntentEnabled?: boolean;
615
+ prompt: string;
616
+ }): RecallModeDecision;
617
+ declare function hasIdentityRecoveryIntent(prompt: string): boolean;
618
+ declare function resolveEffectiveIdentityInjectionMode(options: {
619
+ configuredMode: IdentityInjectionMode;
620
+ recallMode: RecallPlanMode;
621
+ prompt: string;
622
+ }): {
623
+ mode: IdentityInjectionMode;
624
+ shouldInject: boolean;
625
+ };
626
+ declare function computeArtifactCandidateFetchLimit(targetCount: number): number;
627
+ declare function computeQmdHybridFetchLimit(recallFetchLimit: number, artifactsEnabled: boolean, maxArtifactRecall: number): number;
628
+ declare function mergeGraphExpandedResults(primary: QmdSearchResult[], expanded: QmdSearchResult[]): QmdSearchResult[];
629
+ declare function graphPathRelativeToStorage(storageDir: string, candidatePath: string): string | null;
630
+ declare function blendGraphExpandedRecallScore(options: {
631
+ graphActivationScore: number;
632
+ seedRecallScore: number;
633
+ activationWeight: number;
634
+ blendMin: number;
635
+ blendMax: number;
636
+ }): number;
637
+ declare function summarizeGraphShadowComparison(baseline: QmdSearchResult[], merged: QmdSearchResult[], topN: number): {
638
+ baselineCount: number;
639
+ graphCount: number;
640
+ overlapCount: number;
641
+ overlapRatio: number;
642
+ averageOverlapDelta: number;
643
+ };
644
+ declare function mergeArtifactRecallCandidates(candidatesByNamespace: MemoryFile[][], limit: number): MemoryFile[];
645
+ declare function resolveRecentThreadMemoryPaths(options: {
646
+ threadEpisodeIds: string[];
647
+ currentMemoryId: string;
648
+ allMemsForGraph: MemoryFile[] | null | undefined;
649
+ pathById?: Map<string, string>;
650
+ storageDir: string;
651
+ maxRecent: number;
652
+ }): string[];
653
+ declare function buildMemoryPathById(allMemsForGraph: MemoryFile[] | null | undefined, storageDir: string): Map<string, string>;
654
+ declare function appendMemoryToGraphContext(options: {
655
+ allMemsForGraph: MemoryFile[] | null | undefined;
656
+ storageDir: string;
657
+ memoryRelPath: string;
658
+ memoryId: string;
659
+ category: MemoryFile["frontmatter"]["category"];
660
+ content: string;
661
+ entityRef: string | undefined;
662
+ }): void;
663
+ declare function resolvePersistedMemoryRelativePath(options: {
664
+ memoryId: string;
665
+ pathById: Map<string, string>;
666
+ category: string;
667
+ }): string;
668
+ declare class Orchestrator {
669
+ readonly storage: StorageManager;
670
+ private readonly storageRouter;
671
+ private readonly namespaceSearchRouter;
672
+ qmd: SearchBackend;
673
+ private readonly conversationQmd?;
674
+ private readonly conversationFaiss?;
675
+ private readonly conversationIndexBackend?;
676
+ readonly sharedContext?: SharedContextManager;
677
+ readonly compounding?: CompoundingEngine;
678
+ readonly buffer: SmartBuffer;
679
+ readonly transcript: TranscriptManager;
680
+ readonly sessionObserver: SessionObserverState;
681
+ readonly summarizer: HourlySummarizer;
682
+ readonly localLlm: LocalLlmClient;
683
+ readonly fastLlm: LocalLlmClient;
684
+ private readonly fastGatewayLlm;
685
+ readonly modelRegistry: ModelRegistry;
686
+ readonly relevance: RelevanceStore;
687
+ readonly negatives: NegativeExampleStore;
688
+ readonly lastRecall: LastRecallStore;
689
+ readonly tierMigrationStatus: TierMigrationStatusStore;
690
+ readonly embeddingFallback: EmbeddingFallback;
691
+ private readonly conversationIndexDir;
692
+ private readonly extraction;
693
+ readonly config: PluginConfig;
694
+ readonly profiler: ProfilingCollector;
695
+ private readonly threading;
696
+ /** v8.2: Per-namespace multi-graph memory indexes (entity/time/causal edges) */
697
+ private readonly graphIndexes;
698
+ /** Per-namespace BoxBuilders, keyed by the namespace root directory path. */
699
+ private readonly boxBuilders;
700
+ /** Temporal Memory Tree builder — builds hour/day/week/persona summary nodes. */
701
+ private readonly tmtBuilder;
702
+ /** Lossless Context Management engine — proactive session archive + DAG summarization. */
703
+ readonly lcmEngine: LcmEngine | null;
704
+ private readonly rerankCache;
705
+ /**
706
+ * Per-session workspace overrides keyed by sessionKey.
707
+ * Set by the before_agent_start hook so recall() uses the correct
708
+ * agent workspace for BOOT.md injection. Cleared after each recall.
709
+ * Using a Map prevents concurrent sessions from overwriting each other.
710
+ */
711
+ private _recallWorkspaceOverrides;
712
+ private routingRulesStore;
713
+ private contentHashIndex;
714
+ private readonly artifactSourceStatusCache;
715
+ private static readonly ARTIFACT_STATUS_CACHE_TTL_MS;
716
+ private accessTrackingBuffer;
717
+ private extractionQueue;
718
+ private queueProcessing;
719
+ private heartbeatObserverChains;
720
+ private recentExtractionFingerprints;
721
+ private nonZeroExtractionsSinceConsolidation;
722
+ private lastConsolidationRunAtMs;
723
+ private consolidationInFlight;
724
+ private qmdMaintenanceTimer;
725
+ private qmdMaintenancePending;
726
+ private qmdMaintenanceInFlight;
727
+ private lastQmdEmbedAtMs;
728
+ private lastQmdReprobeAtMs;
729
+ private tierMigrationInFlight;
730
+ private lastTierMigrationRunAtMs;
731
+ private readonly conversationIndexLastUpdateAtMs;
732
+ private lastFileHygieneRunAtMs;
733
+ private lastRecallFailureLogAtMs;
734
+ private lastRecallFailureAtMs;
735
+ private suppressedRecallFailures;
736
+ private readonly policyRuntime;
737
+ private runtimePolicyValues;
738
+ private utilityRuntimeValues;
739
+ private evalShadowWriteChain;
740
+ private initPromise;
741
+ private resolveInit;
742
+ /** Set per-session workspace for the next recall() call (compaction reset). @internal */
743
+ setRecallWorkspaceOverride(sessionKey: string, dir: string): void;
744
+ /** Remove a per-session workspace override (cleanup on error or early return). @internal */
745
+ clearRecallWorkspaceOverride(sessionKey: string): void;
746
+ resolvePrincipal(sessionKey?: string): string;
747
+ resolveSelfNamespace(sessionKey?: string): string;
748
+ getStorageForNamespace(namespace?: string): Promise<StorageManager>;
749
+ private configuredNamespaces;
750
+ private buildConfiguredQmdSearchOptions;
751
+ searchAcrossNamespaces(options: {
752
+ query: string;
753
+ namespaces?: string[];
754
+ maxResults?: number;
755
+ mode?: "search" | "hybrid" | "bm25" | "vector";
756
+ searchOptions?: SearchQueryOptions;
757
+ execution?: SearchExecutionOptions;
758
+ }): Promise<QmdSearchResult[]>;
759
+ private isSearchAvailableForNamespaceRouting;
760
+ constructor(config: PluginConfig);
761
+ /** Get or create a BoxBuilder for the given namespace storage root (namespace-isolated). */
762
+ private boxBuilderFor;
763
+ private effectiveRecencyWeight;
764
+ private effectiveCronRecallInstructionHeavyTokenCap;
765
+ private currentPolicyVersion;
766
+ private effectiveLifecycleThresholds;
767
+ private routeEngineOptions;
768
+ private getRoutingRulesStore;
769
+ private loadRoutingRules;
770
+ private resolveArtifactSourceStatuses;
771
+ /**
772
+ * Execute a fast-tier LLM chat completion.
773
+ * When gateway model source is active and fastGatewayAgentId is configured,
774
+ * routes through the gateway chain. Otherwise uses the local fast LLM.
775
+ */
776
+ private fastChatCompletion;
777
+ /**
778
+ * Get a fast-tier LLM client compatible with the rerank interface.
779
+ * When gateway model source is active, routes through the gateway fast chain.
780
+ * Otherwise returns the local fast LLM directly.
781
+ */
782
+ get fastLlmForRerank(): {
783
+ chatCompletion: (messages: Array<{
784
+ role: string;
785
+ content: string;
786
+ }>, options?: {
787
+ maxTokens?: number;
788
+ temperature?: number;
789
+ timeoutMs?: number;
790
+ operation?: string;
791
+ priority?: "recall-critical" | "background";
792
+ }) => Promise<{
793
+ content: string;
794
+ } | null>;
795
+ };
796
+ initialize(): Promise<void>;
797
+ /**
798
+ * Auto-register the engram-day-summary cron job in OpenClaw if it doesn't exist.
799
+ * Fire-and-forget — never blocks init or crashes on failure.
800
+ */
801
+ private autoRegisterDaySummaryCron;
802
+ private autoRegisterNightlyGovernanceCron;
803
+ applyBehaviorRuntimePolicy(state: BehaviorLoopPolicyState): Promise<{
804
+ applied: boolean;
805
+ rolledBack: boolean;
806
+ values: RuntimePolicyValues | null;
807
+ reason: string;
808
+ }>;
809
+ rollbackBehaviorRuntimePolicy(): Promise<boolean>;
810
+ maybeRunFileHygiene(): Promise<void>;
811
+ runBootstrap(options: BootstrapOptions): Promise<BootstrapResult>;
812
+ runConsolidationNow(): Promise<{
813
+ memoriesProcessed: number;
814
+ merged: number;
815
+ invalidated: number;
816
+ }>;
817
+ runSemanticConsolidationNow(options?: {
818
+ dryRun?: boolean;
819
+ thresholdOverride?: number;
820
+ }): Promise<SemanticConsolidationResult>;
821
+ private runSemanticConsolidation;
822
+ waitForExtractionIdle(timeoutMs?: number): Promise<boolean>;
823
+ waitForConsolidationIdle(timeoutMs?: number): Promise<boolean>;
824
+ getStorage(namespace?: string): Promise<StorageManager>;
825
+ generateDaySummary(memories: string | MemoryFile[]): Promise<DaySummaryResult | null>;
826
+ /**
827
+ * Auto-gather today's facts and hourly summaries from storage, then generate a day summary.
828
+ * Returns null if no facts are found for today.
829
+ */
830
+ generateDaySummaryAuto(namespace?: string): Promise<DaySummaryResult | null>;
831
+ /**
832
+ * Read today's facts and hourly summaries from storage, returning them
833
+ * as a formatted string suitable for generateDaySummary().
834
+ */
835
+ gatherTodayFacts(namespace?: string): Promise<string>;
836
+ previewMemoryActionEvent(event: Omit<MemoryActionEvent, "timestamp"> & {
837
+ timestamp?: string;
838
+ }): MemoryActionEvent;
839
+ appendMemoryActionEvent(event: Omit<MemoryActionEvent, "timestamp"> & {
840
+ timestamp?: string;
841
+ }): Promise<boolean>;
842
+ getLastGraphRecallSnapshot(namespace?: string): Promise<GraphRecallSnapshot | null>;
843
+ getLastIntentSnapshot(namespace?: string): Promise<IntentDebugSnapshot | null>;
844
+ getLastQmdRecallSnapshot(namespace?: string): Promise<QmdRecallSnapshot | null>;
845
+ explainLastGraphRecall(options?: {
846
+ namespace?: string;
847
+ maxExpanded?: number;
848
+ }): Promise<string>;
849
+ explainLastIntent(options?: {
850
+ namespace?: string;
851
+ }): Promise<string>;
852
+ explainLastQmdRecall(options?: {
853
+ namespace?: string;
854
+ maxResults?: number;
855
+ }): Promise<string>;
856
+ private searchConversationRecallResults;
857
+ private formatConversationRecallSection;
858
+ private countConversationChunkDocs;
859
+ private buildConversationIndexChunks;
860
+ getConversationIndexHealth(): Promise<{
861
+ enabled: boolean;
862
+ backend: "qmd" | "faiss";
863
+ status: "ok" | "degraded" | "disabled";
864
+ chunkDocCount: number;
865
+ lastUpdateAt: string | null;
866
+ qmdAvailable?: boolean;
867
+ faiss?: {
868
+ ok: boolean;
869
+ status: "ok" | "degraded" | "error";
870
+ indexPath: string;
871
+ message?: string;
872
+ manifest?: {
873
+ version: number;
874
+ modelId: string;
875
+ normalizedModelId: string;
876
+ dimension: number;
877
+ chunkCount: number;
878
+ updatedAt: string;
879
+ lastSuccessfulRebuildAt: string;
880
+ };
881
+ };
882
+ }>;
883
+ inspectConversationIndex(): Promise<ConversationIndexBackendInspection & {
884
+ enabled: boolean;
885
+ chunkDocCount: number;
886
+ lastUpdateAt: string | null;
887
+ }>;
888
+ getRecoverySummary(sessionKey?: string): Promise<{
889
+ generatedAt: string;
890
+ sessionKey?: string;
891
+ healthy: boolean;
892
+ issueCount: number;
893
+ incompleteTurns: number;
894
+ brokenChains: number;
895
+ checkpointHealthy: boolean;
896
+ }>;
897
+ updateConversationIndex(sessionKey: string, hours?: number, opts?: {
898
+ embed?: boolean;
899
+ enforceMinInterval?: boolean;
900
+ }): Promise<{
901
+ chunks: number;
902
+ skipped: boolean;
903
+ reason?: string;
904
+ retryAfterMs?: number;
905
+ embedded?: boolean;
906
+ }>;
907
+ rebuildConversationIndex(sessionKey?: string, hours?: number, opts?: {
908
+ embed?: boolean;
909
+ }): Promise<{
910
+ chunks: number;
911
+ skipped: boolean;
912
+ reason?: string;
913
+ embedded?: boolean;
914
+ rebuilt?: boolean;
915
+ }>;
916
+ /**
917
+ * Validate local LLM model availability and context window compatibility.
918
+ * Warns the user if there's a mismatch.
919
+ */
920
+ private validateLocalLlmModel;
921
+ recall(prompt: string, sessionKey?: string, options?: RecallInvocationOptions): Promise<string>;
922
+ private logRecallFailure;
923
+ private artifactTypeForCategory;
924
+ private truncateArtifactForRecall;
925
+ private fetchActiveArtifactsForNamespace;
926
+ private recallArtifactsAcrossNamespaces;
927
+ private scopeQueryAwarePaths;
928
+ private buildQueryAwarePrefilter;
929
+ private searchScopedMemoryCandidates;
930
+ private fetchQmdMemoryResultsWithArtifactTopUp;
931
+ private expandResultsViaGraph;
932
+ private recordLastGraphRecallSnapshot;
933
+ private recordLastIntentSnapshot;
934
+ private recordLastQmdRecallSnapshot;
935
+ private recordLastIntentSnapshotForNamespace;
936
+ private resolveStateDirForNamespace;
937
+ private buildGraphRecallRankedResults;
938
+ private getRecallSectionEntry;
939
+ private isRecallSectionEnabled;
940
+ private getRecallSectionMaxChars;
941
+ private getRecallSectionNumber;
942
+ private appendRecallSection;
943
+ private truncateRecallSectionToBudget;
944
+ private protectedRecallSectionIds;
945
+ private protectedRecallReservationChars;
946
+ private estimateReservedRecallBudget;
947
+ private getRecallBudgetChars;
948
+ private assembleRecallSections;
949
+ private recallInternal;
950
+ processTurn(role: "user" | "assistant", content: string, sessionKey?: string): Promise<void>;
951
+ ingestReplayBatch(turns: ReplayTurn[], options?: {
952
+ deadlineMs?: number;
953
+ }): Promise<void>;
954
+ observeSessionHeartbeat(sessionKey: string): Promise<void>;
955
+ private queueBufferedExtraction;
956
+ private shouldQueueExtraction;
957
+ /**
958
+ * Background serial queue processor.
959
+ * Processes extractions one at a time to avoid race conditions.
960
+ * Called automatically when items are queued.
961
+ */
962
+ private processQueue;
963
+ private runExtraction;
964
+ private runTierMigrationCycle;
965
+ getTierMigrationStatus(): Promise<TierMigrationStatusSnapshot>;
966
+ runTierMigrationNow(options?: {
967
+ dryRun?: boolean;
968
+ limit?: number;
969
+ }): Promise<TierMigrationCycleSummary>;
970
+ private maybeScheduleConsolidation;
971
+ private requestQmdMaintenance;
972
+ /**
973
+ * Public entrypoint for tool-driven QMD maintenance requests.
974
+ * Routes through existing debounced/singleflight maintenance controls.
975
+ */
976
+ requestQmdMaintenanceForTool(reason: string): void;
977
+ private runQmdMaintenance;
978
+ private persistExtraction;
979
+ private indexPersistedMemory;
980
+ /**
981
+ * Build a graph edge for a persisted memory (v8.2).
982
+ * Shared helper used by both the chunked and non-chunked write paths to avoid duplication.
983
+ * Fail-open: caller wraps in try/catch.
984
+ */
985
+ private buildGraphEdge;
986
+ private graphIndexFor;
987
+ /**
988
+ * Batch-update temporal and tag indexes after extraction (v8.1).
989
+ * Reads each persisted memory's path + frontmatter and adds them to
990
+ * state/index_time.json and state/index_tags.json.
991
+ * Fail-open: any error is logged but does not abort extraction.
992
+ */
993
+ private updateTemporalTagIndexes;
994
+ /** IDs of facts persisted in the last extraction */
995
+ private lastPersistedIds;
996
+ private runConsolidation;
997
+ optimizeCompressionGuidelines(options?: {
998
+ dryRun?: boolean;
999
+ eventLimit?: number;
1000
+ }): Promise<{
1001
+ enabled: boolean;
1002
+ dryRun: boolean;
1003
+ eventCount: number;
1004
+ previousGuidelineVersion: number | null;
1005
+ nextGuidelineVersion: number;
1006
+ changedRules: number;
1007
+ semanticRefinementApplied: boolean;
1008
+ persisted: boolean;
1009
+ draftContentHash: string | null;
1010
+ }>;
1011
+ activateCompressionGuidelineDraft(options?: {
1012
+ expectedContentHash?: string;
1013
+ expectedGuidelineVersion?: number;
1014
+ }): Promise<{
1015
+ enabled: boolean;
1016
+ activated: boolean;
1017
+ guidelineVersion: number | null;
1018
+ reason?: "disabled" | "missing_draft" | "expected_revision_required" | "content_hash_mismatch" | "guideline_version_mismatch" | "draft_changed";
1019
+ }>;
1020
+ private runCompressionGuidelineLearningPass;
1021
+ private buildCompressionGuidelineRecallSection;
1022
+ private parseCompressionSemanticRefinement;
1023
+ private actionOutcomePriorDelta;
1024
+ private buildLifecycleActionPriors;
1025
+ private runLifecyclePolicyPass;
1026
+ /**
1027
+ * Archive old, low-importance, rarely-accessed facts (v6.0).
1028
+ * Moves eligible facts from facts/ to archive/YYYY-MM-DD/.
1029
+ * Returns the number of archived facts.
1030
+ */
1031
+ private runFactArchival;
1032
+ /**
1033
+ * Run memory summarization if memory count exceeds threshold (Phase 4A).
1034
+ */
1035
+ private runSummarization;
1036
+ /**
1037
+ * Run topic extraction on all memories (Phase 4B).
1038
+ */
1039
+ private runTopicExtraction;
1040
+ /** Threshold (bytes) at which IDENTITY.md reflections get auto-consolidated */
1041
+ private static readonly IDENTITY_CONSOLIDATE_THRESHOLD;
1042
+ private autoConsolidateIdentity;
1043
+ private formatQmdResults;
1044
+ private formatObjectiveStateResults;
1045
+ private formatCausalTrajectoryResults;
1046
+ private formatTrustZoneResults;
1047
+ private formatHarmonicRetrievalResults;
1048
+ private formatWorkProductResults;
1049
+ private formatVerifiedEpisodeResults;
1050
+ private formatVerifiedSemanticRuleResults;
1051
+ private summarizeIdentityText;
1052
+ private formatOpenIncidentLine;
1053
+ private trimIdentitySection;
1054
+ private buildIdentityContinuitySection;
1055
+ private emitTrace;
1056
+ private queueEvalShadowRecall;
1057
+ private publishRecallResults;
1058
+ private buildLastRecallBudgetSummary;
1059
+ private collectLastRecallSources;
1060
+ private searchEmbeddingFallback;
1061
+ /**
1062
+ * Long-term fallback retrieval.
1063
+ * Searches archived memories only, and is invoked only when hot recall returns zero hits.
1064
+ */
1065
+ private searchLongTermArchiveFallback;
1066
+ private applyColdFallbackPipeline;
1067
+ /**
1068
+ * Record that memories were accessed (retrieved).
1069
+ * Updates are batched in memory and flushed during consolidation.
1070
+ */
1071
+ trackMemoryAccess(memoryIds: string[]): void;
1072
+ /**
1073
+ * Flush access tracking buffer to disk.
1074
+ * Called during consolidation or when buffer is full.
1075
+ */
1076
+ flushAccessTracking(): Promise<void>;
1077
+ /**
1078
+ * Apply recency, access count, and importance boosting to QMD search results.
1079
+ * Returns re-ranked results.
1080
+ */
1081
+ private boostSearchResults;
1082
+ /**
1083
+ * Extract memory IDs from QMD search results for access tracking.
1084
+ */
1085
+ private extractMemoryIdsFromResults;
1086
+ recordMemoryFeedback(memoryId: string, vote: "up" | "down", note?: string): Promise<void>;
1087
+ recordNotUsefulMemories(memoryIds: string[], note?: string): Promise<void>;
1088
+ getLastRecall(sessionKey: string): LastRecallSnapshot | null;
1089
+ /**
1090
+ * Check if a new memory contradicts an existing one.
1091
+ * Uses QMD to find similar memories, then LLM to verify contradiction.
1092
+ */
1093
+ private checkForContradiction;
1094
+ /**
1095
+ * Suggest links for a new memory based on similar existing memories.
1096
+ */
1097
+ private suggestLinksForMemory;
1098
+ private namespaceFromPath;
1099
+ private namespaceFromStorageDir;
1100
+ private readAllMemoriesForNamespaces;
1101
+ private readArchivedMemoriesForNamespaces;
1102
+ }
1103
+
1104
+ export { resolvePersistedMemoryRelativePath as A, resolveRecallModeDecision as B, type CompoundingPromotionReport as C, resolveRecentThreadMemoryPaths as D, shouldFilterLifecycleRecallCandidate as E, summarizeGraphShadowComparison as F, type GraphRecallSnapshot as G, type IntentDebugSnapshot as I, Orchestrator as O, type QmdRecallSnapshot as Q, type ReplaySource as R, type ReplayWarning as a, type ReplayTurn as b, type GraphRecallRankedResult as c, defaultWorkspaceDir as d, type GraphRecallShadowComparison as e, type RecallInvocationOptions as f, type RecallModeDecision as g, appendMemoryToGraphContext as h, blendGraphExpandedRecallScore as i, buildCompressionGuidelinesMarkdown as j, buildMemoryPathById as k, computeArtifactCandidateFetchLimit as l, computeArtifactRecallLimit as m, computeQmdHybridFetchLimit as n, deriveTopicsFromExtraction as o, filterRecallCandidates as p, formatCompressionGuidelinesForRecall as q, graphPathRelativeToStorage as r, sanitizeSessionKeyForFilename as s, hasIdentityRecoveryIntent as t, isArtifactMemoryPath as u, lifecycleRecallScoreAdjustment as v, mergeArtifactRecallCandidates as w, mergeGraphExpandedResults as x, resolveEffectiveIdentityInjectionMode as y, resolveEffectiveRecallMode as z };