@remnic/core 1.0.2 → 1.1.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 (385) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/abort-error.d.ts +32 -0
  4. package/dist/abort-error.js +11 -0
  5. package/dist/access-cli.d.ts +13 -3
  6. package/dist/access-cli.js +96 -80
  7. package/dist/access-cli.js.map +1 -1
  8. package/dist/access-http.d.ts +12 -4
  9. package/dist/access-http.js +25 -18
  10. package/dist/access-mcp.d.ts +32 -4
  11. package/dist/access-mcp.js +16 -1
  12. package/dist/access-schema.d.ts +28 -28
  13. package/dist/access-schema.js +1 -1
  14. package/dist/access-service-HmO1Trrx.d.ts +732 -0
  15. package/dist/access-service.d.ts +15 -601
  16. package/dist/access-service.js +21 -15
  17. package/dist/active-memory-bridge.d.ts +66 -0
  18. package/dist/active-memory-bridge.js +11 -0
  19. package/dist/active-memory-bridge.js.map +1 -0
  20. package/dist/active-recall.d.ts +96 -0
  21. package/dist/active-recall.js +308 -0
  22. package/dist/active-recall.js.map +1 -0
  23. package/dist/behavior-learner.js +1 -1
  24. package/dist/bootstrap.d.ts +6 -3
  25. package/dist/bootstrap.js +2 -2
  26. package/dist/boxes.js +2 -2
  27. package/dist/briefing.d.ts +169 -0
  28. package/dist/briefing.js +52 -0
  29. package/dist/briefing.js.map +1 -0
  30. package/dist/buffer.d.ts +19 -5
  31. package/dist/buffer.js +2 -2
  32. package/dist/calibration.js +6 -6
  33. package/dist/causal-behavior.js +5 -5
  34. package/dist/causal-chain.js +3 -3
  35. package/dist/causal-consolidation.d.ts +22 -2
  36. package/dist/causal-consolidation.js +36 -9
  37. package/dist/causal-consolidation.js.map +1 -1
  38. package/dist/causal-retrieval.js +6 -6
  39. package/dist/causal-trajectory-graph.js +1 -1
  40. package/dist/causal-trajectory.d.ts +14 -1
  41. package/dist/causal-trajectory.js +5 -1
  42. package/dist/{chunk-KWBU5S5U.js → chunk-2ODBA7MQ.js} +9 -3
  43. package/dist/chunk-2ODBA7MQ.js.map +1 -0
  44. package/dist/{chunk-ZJLY4QSU.js → chunk-37UIFYWO.js} +130 -6
  45. package/dist/chunk-37UIFYWO.js.map +1 -0
  46. package/dist/chunk-3PG3H5TD.js +7 -0
  47. package/dist/chunk-3PG3H5TD.js.map +1 -0
  48. package/dist/{chunk-NTTLPF7F.js → chunk-3QFQGRHO.js} +5 -5
  49. package/dist/{chunk-QDOSNLB4.js → chunk-3QHL5ABG.js} +17 -15
  50. package/dist/chunk-3QHL5ABG.js.map +1 -0
  51. package/dist/{chunk-6UJQNRIO.js → chunk-3SV6CQHO.js} +92 -33
  52. package/dist/chunk-3SV6CQHO.js.map +1 -0
  53. package/dist/{chunk-U4PV25RD.js → chunk-3WHVNEN7.js} +1 -1
  54. package/dist/chunk-3WHVNEN7.js.map +1 -0
  55. package/dist/{chunk-XUHI52HK.js → chunk-44ICJRF3.js} +98 -10
  56. package/dist/chunk-44ICJRF3.js.map +1 -0
  57. package/dist/{chunk-HG2NKWR2.js → chunk-47UU5PU2.js} +49 -10
  58. package/dist/chunk-47UU5PU2.js.map +1 -0
  59. package/dist/chunk-4DJQYKMN.js +187 -0
  60. package/dist/chunk-4DJQYKMN.js.map +1 -0
  61. package/dist/chunk-4KAN3GZ3.js +225 -0
  62. package/dist/chunk-4KAN3GZ3.js.map +1 -0
  63. package/dist/chunk-4LACOVZX.js +813 -0
  64. package/dist/chunk-4LACOVZX.js.map +1 -0
  65. package/dist/{chunk-ORZMT74A.js → chunk-4NRAJUDS.js} +11 -1
  66. package/dist/chunk-4NRAJUDS.js.map +1 -0
  67. package/dist/{chunk-B7LOFDVE.js → chunk-4WMCPJWX.js} +8 -3
  68. package/dist/chunk-4WMCPJWX.js.map +1 -0
  69. package/dist/{chunk-G3AG3KZN.js → chunk-5IZL4DCV.js} +2 -2
  70. package/dist/{chunk-BRK4ODMI.js → chunk-5NPGSAVB.js} +2 -2
  71. package/dist/{chunk-QANCTXQF.js → chunk-6LX5ORAS.js} +3 -3
  72. package/dist/chunk-6MKAMLQL.js +16 -0
  73. package/dist/chunk-6MKAMLQL.js.map +1 -0
  74. package/dist/{chunk-ESSMF2FR.js → chunk-6PFRXT4K.js} +15 -6
  75. package/dist/chunk-6PFRXT4K.js.map +1 -0
  76. package/dist/{chunk-UIYZ5T3I.js → chunk-6UJ47TVX.js} +8 -8
  77. package/dist/chunk-6ZH4TU6I.js +245 -0
  78. package/dist/chunk-6ZH4TU6I.js.map +1 -0
  79. package/dist/{chunk-L5RPWGFK.js → chunk-7DHTMOND.js} +2 -2
  80. package/dist/{chunk-L7WO3MZ4.js → chunk-7ECD5ATE.js} +2 -2
  81. package/dist/{chunk-Q6FETXJA.js → chunk-7SEAZFFB.js} +2 -2
  82. package/dist/{chunk-V4YC4LUK.js → chunk-7WQ6SLIE.js} +175 -63
  83. package/dist/chunk-7WQ6SLIE.js.map +1 -0
  84. package/dist/chunk-ALXMCZEU.js +332 -0
  85. package/dist/chunk-ALXMCZEU.js.map +1 -0
  86. package/dist/{chunk-TVVVQQAK.js → chunk-BLKTA7MM.js} +58 -24
  87. package/dist/chunk-BLKTA7MM.js.map +1 -0
  88. package/dist/{chunk-SCHEKPYH.js → chunk-C2EFFULQ.js} +1 -1
  89. package/dist/{chunk-GJR6D6KC.js → chunk-D654IBA6.js} +2 -2
  90. package/dist/{chunk-OTFNI3OO.js → chunk-DEPL3635.js} +1828 -401
  91. package/dist/chunk-DEPL3635.js.map +1 -0
  92. package/dist/{chunk-UYSKNO6E.js → chunk-DHHP2Z4X.js} +15 -4
  93. package/dist/chunk-DHHP2Z4X.js.map +1 -0
  94. package/dist/{chunk-UV2FO7J4.js → chunk-E6K4NIEU.js} +2 -2
  95. package/dist/{chunk-T4WRIV2C.js → chunk-EABGC2TL.js} +2 -2
  96. package/dist/chunk-EJI5XIBB.js +232 -0
  97. package/dist/chunk-EJI5XIBB.js.map +1 -0
  98. package/dist/{chunk-ONRU4L2N.js → chunk-FEMOX5AD.js} +2 -2
  99. package/dist/{chunk-IFFFR3MR.js → chunk-FSFEQI74.js} +3 -3
  100. package/dist/chunk-G4SK7DSQ.js +121 -0
  101. package/dist/chunk-G4SK7DSQ.js.map +1 -0
  102. package/dist/{chunk-WWIQTB2Y.js → chunk-GGD5W7TB.js} +9 -2
  103. package/dist/chunk-GGD5W7TB.js.map +1 -0
  104. package/dist/{chunk-QWUUMMIK.js → chunk-GV6NLQ4X.js} +1355 -80
  105. package/dist/chunk-GV6NLQ4X.js.map +1 -0
  106. package/dist/{chunk-2PO5ZRKV.js → chunk-GZCUW5IC.js} +16 -3
  107. package/dist/chunk-GZCUW5IC.js.map +1 -0
  108. package/dist/{chunk-AAI7JARD.js → chunk-HMDCOMYU.js} +8 -11
  109. package/dist/chunk-HMDCOMYU.js.map +1 -0
  110. package/dist/chunk-IQT3XTKW.js +121 -0
  111. package/dist/chunk-IQT3XTKW.js.map +1 -0
  112. package/dist/{chunk-J3BT33K7.js → chunk-ITRLGI2T.js} +5 -5
  113. package/dist/{chunk-BDFZXRSO.js → chunk-J4IYOZZ5.js} +15 -2
  114. package/dist/chunk-J4IYOZZ5.js.map +1 -0
  115. package/dist/{chunk-J47FNDR7.js → chunk-JIU55F3X.js} +7 -7
  116. package/dist/{chunk-MDDAA2AO.js → chunk-JL2PU6AI.js} +17 -6
  117. package/dist/chunk-JL2PU6AI.js.map +1 -0
  118. package/dist/{chunk-ZKYI7UVO.js → chunk-JR4ZC3G4.js} +2 -2
  119. package/dist/{chunk-UCYSTFZR.js → chunk-JRNQ3RNA.js} +2 -2
  120. package/dist/{chunk-GPGBSNKM.js → chunk-K4FLSOR5.js} +2 -2
  121. package/dist/chunk-KVE7R4CG.js +320 -0
  122. package/dist/chunk-KVE7R4CG.js.map +1 -0
  123. package/dist/chunk-LAYN4LDC.js +267 -0
  124. package/dist/chunk-LAYN4LDC.js.map +1 -0
  125. package/dist/{chunk-ISY75RLM.js → chunk-MBJHSA7F.js} +344 -7
  126. package/dist/chunk-MBJHSA7F.js.map +1 -0
  127. package/dist/{chunk-PGK3VUHN.js → chunk-MTLYEMJB.js} +3 -2
  128. package/dist/chunk-MTLYEMJB.js.map +1 -0
  129. package/dist/{chunk-QY2BHY5O.js → chunk-MVTHXUBX.js} +297 -34
  130. package/dist/chunk-MVTHXUBX.js.map +1 -0
  131. package/dist/{chunk-LP47L3ZX.js → chunk-N42IWANG.js} +5 -5
  132. package/dist/{chunk-YNI4S5WT.js → chunk-N53K2EXC.js} +2 -2
  133. package/dist/{chunk-763GUIOU.js → chunk-NBNN5GOB.js} +2 -2
  134. package/dist/{chunk-CXWFUJR2.js → chunk-NQEVYWX6.js} +195 -5
  135. package/dist/chunk-NQEVYWX6.js.map +1 -0
  136. package/dist/{chunk-KL4CP4SB.js → chunk-O5ETUNBT.js} +17 -5
  137. package/dist/chunk-O5ETUNBT.js.map +1 -0
  138. package/dist/{chunk-OOSWAUYB.js → chunk-ODWDQNRE.js} +2 -2
  139. package/dist/chunk-OIT5QGG4.js +80 -0
  140. package/dist/chunk-OIT5QGG4.js.map +1 -0
  141. package/dist/{chunk-HLBYLYRD.js → chunk-PAORGQRI.js} +70 -13
  142. package/dist/chunk-PAORGQRI.js.map +1 -0
  143. package/dist/chunk-PVGDJXVK.js +21 -0
  144. package/dist/chunk-PVGDJXVK.js.map +1 -0
  145. package/dist/{chunk-OTAVQCSF.js → chunk-PYXS46O7.js} +2 -2
  146. package/dist/chunk-QDW3E4RD.js +108 -0
  147. package/dist/chunk-QDW3E4RD.js.map +1 -0
  148. package/dist/{chunk-YNCQ7E4M.js → chunk-QDYXG4CS.js} +4 -3
  149. package/dist/chunk-QDYXG4CS.js.map +1 -0
  150. package/dist/{chunk-HLXVTBF3.js → chunk-QNJMBKFK.js} +3 -2
  151. package/dist/chunk-QNJMBKFK.js.map +1 -0
  152. package/dist/{chunk-4A24LIM2.js → chunk-S75M5ZRK.js} +2 -2
  153. package/dist/chunk-SYUK3VLY.js +789 -0
  154. package/dist/chunk-SYUK3VLY.js.map +1 -0
  155. package/dist/{chunk-QCCCQT3O.js → chunk-TBBDFYXW.js} +2 -2
  156. package/dist/chunk-TBBDFYXW.js.map +1 -0
  157. package/dist/chunk-U66YHYC7.js +31 -0
  158. package/dist/chunk-U66YHYC7.js.map +1 -0
  159. package/dist/{chunk-MWGVGUIS.js → chunk-UEYA6UC7.js} +36 -4
  160. package/dist/chunk-UEYA6UC7.js.map +1 -0
  161. package/dist/{chunk-M5KEYE5E.js → chunk-URB2WSKZ.js} +2 -2
  162. package/dist/chunk-UVJFDP7P.js +202 -0
  163. package/dist/chunk-UVJFDP7P.js.map +1 -0
  164. package/dist/chunk-W6SL7OFG.js +180 -0
  165. package/dist/chunk-W6SL7OFG.js.map +1 -0
  166. package/dist/chunk-WBSAYXVI.js +7945 -0
  167. package/dist/chunk-WBSAYXVI.js.map +1 -0
  168. package/dist/{chunk-M5ZBBBJI.js → chunk-XZ2TIKGC.js} +39 -9
  169. package/dist/chunk-XZ2TIKGC.js.map +1 -0
  170. package/dist/chunk-Y4FHOFJ2.js +140 -0
  171. package/dist/chunk-Y4FHOFJ2.js.map +1 -0
  172. package/dist/chunk-YDBIWGNI.js +298 -0
  173. package/dist/chunk-YDBIWGNI.js.map +1 -0
  174. package/dist/chunk-YNB73F22.js +137 -0
  175. package/dist/chunk-YNB73F22.js.map +1 -0
  176. package/dist/{chunk-IZME7KW2.js → chunk-ZVBB3T7V.js} +31 -12
  177. package/dist/chunk-ZVBB3T7V.js.map +1 -0
  178. package/dist/chunking.js +1 -1
  179. package/dist/citations.d.ts +67 -0
  180. package/dist/citations.js +13 -0
  181. package/dist/citations.js.map +1 -0
  182. package/dist/cli-BneVIEvh.d.ts +1240 -0
  183. package/dist/cli.d.ts +32 -1147
  184. package/dist/cli.js +150 -7092
  185. package/dist/cli.js.map +1 -1
  186. package/dist/codex-materialize-CQlLTzke.d.ts +139 -0
  187. package/dist/codex-thread-key.d.ts +3 -0
  188. package/dist/codex-thread-key.js +7 -0
  189. package/dist/codex-thread-key.js.map +1 -0
  190. package/dist/config.js +3 -2
  191. package/dist/connectors/codex/instructions.md +160 -0
  192. package/dist/connectors/codex/resources/namespace-cheatsheet.md +48 -0
  193. package/dist/contradiction-review-WIUBAR52.js +21 -0
  194. package/dist/contradiction-review-WIUBAR52.js.map +1 -0
  195. package/dist/contradiction-scan-GR33PONM.js +376 -0
  196. package/dist/contradiction-scan-GR33PONM.js.map +1 -0
  197. package/dist/day-summary.d.ts +7 -2
  198. package/dist/day-summary.js +5 -2
  199. package/dist/direct-answer-wiring.d.ts +77 -0
  200. package/dist/direct-answer-wiring.js +75 -0
  201. package/dist/direct-answer-wiring.js.map +1 -0
  202. package/dist/direct-answer.d.ts +106 -0
  203. package/dist/direct-answer.js +10 -0
  204. package/dist/direct-answer.js.map +1 -0
  205. package/dist/embedding-fallback.d.ts +96 -2
  206. package/dist/embedding-fallback.js +6 -4
  207. package/dist/{engine-2A6J4XEX.js → engine-5TIQBYZR.js} +10 -7
  208. package/dist/engine-5TIQBYZR.js.map +1 -0
  209. package/dist/entity-retrieval.d.ts +3 -2
  210. package/dist/entity-retrieval.js +10 -7
  211. package/dist/entity-schema.d.ts +11 -0
  212. package/dist/entity-schema.js +19 -0
  213. package/dist/entity-schema.js.map +1 -0
  214. package/dist/explicit-capture.d.ts +6 -3
  215. package/dist/explicit-capture.js +2 -2
  216. package/dist/extraction-judge.d.ts +66 -0
  217. package/dist/extraction-judge.js +18 -0
  218. package/dist/extraction-judge.js.map +1 -0
  219. package/dist/extraction.d.ts +1 -0
  220. package/dist/extraction.js +12 -10
  221. package/dist/fallback-llm.d.ts +11 -2
  222. package/dist/fallback-llm.js +4 -4
  223. package/dist/graph.js +1 -1
  224. package/dist/harmonic-retrieval.js +2 -1
  225. package/dist/importance.d.ts +11 -1
  226. package/dist/importance.js +3 -1
  227. package/dist/index.d.ts +1027 -9
  228. package/dist/index.js +3303 -349
  229. package/dist/index.js.map +1 -1
  230. package/dist/intent.d.ts +2 -1
  231. package/dist/intent.js +3 -1
  232. package/dist/lifecycle.js +1 -1
  233. package/dist/local-llm.d.ts +10 -3
  234. package/dist/local-llm.js +2 -2
  235. package/dist/logger.d.ts +1 -1
  236. package/dist/logger.js +1 -1
  237. package/dist/memory-cache.d.ts +2 -2
  238. package/dist/memory-cache.js +1 -1
  239. package/dist/{memory-projection-store-NxMkbocT.d.ts → memory-projection-store-DeSXPh1j.d.ts} +1 -1
  240. package/dist/memory-projection-store.d.ts +1 -1
  241. package/dist/model-registry.js +2 -2
  242. package/dist/models-json.js +2 -2
  243. package/dist/native-knowledge.js +2 -2
  244. package/dist/negative.js +2 -2
  245. package/dist/operator-toolkit.js +20 -15
  246. package/dist/{orchestrator-zTa-Qo-1.d.ts → orchestrator-DRYA6_lW.d.ts} +273 -9
  247. package/dist/orchestrator.d.ts +6 -3
  248. package/dist/orchestrator.js +76 -63
  249. package/dist/page-versioning.d.ts +77 -0
  250. package/dist/page-versioning.js +15 -0
  251. package/dist/page-versioning.js.map +1 -0
  252. package/dist/plugin-id.d.ts +37 -0
  253. package/dist/plugin-id.js +11 -0
  254. package/dist/plugin-id.js.map +1 -0
  255. package/dist/policy-runtime.js +2 -2
  256. package/dist/profiling.js +2 -2
  257. package/dist/qmd.d.ts +5 -2
  258. package/dist/qmd.js +4 -3
  259. package/dist/recall-audit.d.ts +20 -0
  260. package/dist/recall-audit.js +50 -0
  261. package/dist/recall-audit.js.map +1 -0
  262. package/dist/recall-mmr.d.ts +152 -0
  263. package/dist/recall-mmr.js +17 -0
  264. package/dist/recall-mmr.js.map +1 -0
  265. package/dist/recall-qos.js +2 -2
  266. package/dist/recall-state.d.ts +28 -1
  267. package/dist/recall-state.js +2 -2
  268. package/dist/relevance.js +2 -2
  269. package/dist/resolution-QBTDHTG7.js +100 -0
  270. package/dist/resolution-QBTDHTG7.js.map +1 -0
  271. package/dist/resolve-provider-secret.d.ts +24 -1
  272. package/dist/resolve-provider-secret.js +4 -2
  273. package/dist/resume-bundles.js +6 -5
  274. package/dist/retrieval-agents.js +2 -2
  275. package/dist/retrieval.js +2 -2
  276. package/dist/schemas.d.ts +412 -54
  277. package/dist/schemas.js +3 -1
  278. package/dist/sdk-compat.d.ts +2 -0
  279. package/dist/sdk-compat.js +6 -3
  280. package/dist/sdk-compat.js.map +1 -1
  281. package/dist/semantic-chunking.d.ts +87 -0
  282. package/dist/semantic-chunking.js +20 -0
  283. package/dist/semantic-chunking.js.map +1 -0
  284. package/dist/semantic-consolidation-DrvSYRdB.d.ts +119 -0
  285. package/dist/semantic-consolidation.d.ts +4 -42
  286. package/dist/semantic-consolidation.js +23 -2
  287. package/dist/semantic-rule-promotion.js +9 -6
  288. package/dist/semantic-rule-verifier.js +10 -7
  289. package/dist/session-observer-state.js +2 -2
  290. package/dist/session-toggles.d.ts +22 -0
  291. package/dist/session-toggles.js +116 -0
  292. package/dist/session-toggles.js.map +1 -0
  293. package/dist/skills-registry.d.ts +47 -0
  294. package/dist/skills-registry.js +48 -0
  295. package/dist/skills-registry.js.map +1 -0
  296. package/dist/source-attribution.d.ts +169 -0
  297. package/dist/source-attribution.js +27 -0
  298. package/dist/source-attribution.js.map +1 -0
  299. package/dist/storage.d.ts +171 -10
  300. package/dist/storage.js +16 -5
  301. package/dist/summarizer.js +7 -7
  302. package/dist/temporal-supersession.d.ts +127 -0
  303. package/dist/temporal-supersession.js +20 -0
  304. package/dist/temporal-supersession.js.map +1 -0
  305. package/dist/threading.js +2 -2
  306. package/dist/tier-migration.d.ts +2 -1
  307. package/dist/tier-routing.js +2 -2
  308. package/dist/tokens.d.ts +21 -1
  309. package/dist/tokens.js +5 -1
  310. package/dist/transcript.js +2 -2
  311. package/dist/types-DJhqDJUV.d.ts +50 -0
  312. package/dist/types.d.ts +529 -3
  313. package/dist/types.js +1 -1
  314. package/dist/utility-learner.js +2 -2
  315. package/dist/utility-runtime.js +3 -3
  316. package/dist/verified-recall.js +11 -8
  317. package/dist/whitespace.d.ts +4 -0
  318. package/dist/whitespace.js +9 -0
  319. package/dist/whitespace.js.map +1 -0
  320. package/package.json +14 -8
  321. package/dist/chunk-2CJCWDMR.js +0 -87
  322. package/dist/chunk-2CJCWDMR.js.map +0 -1
  323. package/dist/chunk-2PO5ZRKV.js.map +0 -1
  324. package/dist/chunk-6UJQNRIO.js.map +0 -1
  325. package/dist/chunk-AAI7JARD.js.map +0 -1
  326. package/dist/chunk-B7LOFDVE.js.map +0 -1
  327. package/dist/chunk-BDFZXRSO.js.map +0 -1
  328. package/dist/chunk-CXWFUJR2.js.map +0 -1
  329. package/dist/chunk-DORBM6OB.js +0 -81
  330. package/dist/chunk-DORBM6OB.js.map +0 -1
  331. package/dist/chunk-ESSMF2FR.js.map +0 -1
  332. package/dist/chunk-HG2NKWR2.js.map +0 -1
  333. package/dist/chunk-HLBYLYRD.js.map +0 -1
  334. package/dist/chunk-HLXVTBF3.js.map +0 -1
  335. package/dist/chunk-ISY75RLM.js.map +0 -1
  336. package/dist/chunk-IZME7KW2.js.map +0 -1
  337. package/dist/chunk-KL4CP4SB.js.map +0 -1
  338. package/dist/chunk-KWBU5S5U.js.map +0 -1
  339. package/dist/chunk-M5ZBBBJI.js.map +0 -1
  340. package/dist/chunk-MDDAA2AO.js.map +0 -1
  341. package/dist/chunk-MWGVGUIS.js.map +0 -1
  342. package/dist/chunk-ORZMT74A.js.map +0 -1
  343. package/dist/chunk-OTFNI3OO.js.map +0 -1
  344. package/dist/chunk-PGK3VUHN.js.map +0 -1
  345. package/dist/chunk-QCCCQT3O.js.map +0 -1
  346. package/dist/chunk-QDOSNLB4.js.map +0 -1
  347. package/dist/chunk-QPKFPHOO.js +0 -178
  348. package/dist/chunk-QPKFPHOO.js.map +0 -1
  349. package/dist/chunk-QWUUMMIK.js.map +0 -1
  350. package/dist/chunk-QY2BHY5O.js.map +0 -1
  351. package/dist/chunk-TVVVQQAK.js.map +0 -1
  352. package/dist/chunk-U4PV25RD.js.map +0 -1
  353. package/dist/chunk-UYSKNO6E.js.map +0 -1
  354. package/dist/chunk-V4YC4LUK.js.map +0 -1
  355. package/dist/chunk-WWIQTB2Y.js.map +0 -1
  356. package/dist/chunk-XUHI52HK.js.map +0 -1
  357. package/dist/chunk-YNCQ7E4M.js.map +0 -1
  358. package/dist/chunk-ZJLY4QSU.js.map +0 -1
  359. /package/dist/{engine-2A6J4XEX.js.map → abort-error.js.map} +0 -0
  360. /package/dist/{chunk-NTTLPF7F.js.map → chunk-3QFQGRHO.js.map} +0 -0
  361. /package/dist/{chunk-G3AG3KZN.js.map → chunk-5IZL4DCV.js.map} +0 -0
  362. /package/dist/{chunk-BRK4ODMI.js.map → chunk-5NPGSAVB.js.map} +0 -0
  363. /package/dist/{chunk-QANCTXQF.js.map → chunk-6LX5ORAS.js.map} +0 -0
  364. /package/dist/{chunk-UIYZ5T3I.js.map → chunk-6UJ47TVX.js.map} +0 -0
  365. /package/dist/{chunk-L5RPWGFK.js.map → chunk-7DHTMOND.js.map} +0 -0
  366. /package/dist/{chunk-L7WO3MZ4.js.map → chunk-7ECD5ATE.js.map} +0 -0
  367. /package/dist/{chunk-Q6FETXJA.js.map → chunk-7SEAZFFB.js.map} +0 -0
  368. /package/dist/{chunk-SCHEKPYH.js.map → chunk-C2EFFULQ.js.map} +0 -0
  369. /package/dist/{chunk-GJR6D6KC.js.map → chunk-D654IBA6.js.map} +0 -0
  370. /package/dist/{chunk-UV2FO7J4.js.map → chunk-E6K4NIEU.js.map} +0 -0
  371. /package/dist/{chunk-T4WRIV2C.js.map → chunk-EABGC2TL.js.map} +0 -0
  372. /package/dist/{chunk-ONRU4L2N.js.map → chunk-FEMOX5AD.js.map} +0 -0
  373. /package/dist/{chunk-IFFFR3MR.js.map → chunk-FSFEQI74.js.map} +0 -0
  374. /package/dist/{chunk-J3BT33K7.js.map → chunk-ITRLGI2T.js.map} +0 -0
  375. /package/dist/{chunk-J47FNDR7.js.map → chunk-JIU55F3X.js.map} +0 -0
  376. /package/dist/{chunk-ZKYI7UVO.js.map → chunk-JR4ZC3G4.js.map} +0 -0
  377. /package/dist/{chunk-UCYSTFZR.js.map → chunk-JRNQ3RNA.js.map} +0 -0
  378. /package/dist/{chunk-GPGBSNKM.js.map → chunk-K4FLSOR5.js.map} +0 -0
  379. /package/dist/{chunk-LP47L3ZX.js.map → chunk-N42IWANG.js.map} +0 -0
  380. /package/dist/{chunk-YNI4S5WT.js.map → chunk-N53K2EXC.js.map} +0 -0
  381. /package/dist/{chunk-763GUIOU.js.map → chunk-NBNN5GOB.js.map} +0 -0
  382. /package/dist/{chunk-OOSWAUYB.js.map → chunk-ODWDQNRE.js.map} +0 -0
  383. /package/dist/{chunk-OTAVQCSF.js.map → chunk-PYXS46O7.js.map} +0 -0
  384. /package/dist/{chunk-4A24LIM2.js.map → chunk-S75M5ZRK.js.map} +0 -0
  385. /package/dist/{chunk-M5KEYE5E.js.map → chunk-URB2WSKZ.js.map} +0 -0
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  type ReasoningEffort = "none" | "low" | "medium" | "high";
2
2
  type TriggerMode = "smart" | "every_n" | "time_based";
3
3
  type SignalLevel = "none" | "low" | "medium" | "high";
4
- type MemoryCategory = "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule";
4
+ type MemoryCategory = "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure";
5
5
  type ConsolidationAction = "ADD" | "MERGE" | "UPDATE" | "INVALIDATE" | "SKIP";
6
6
  type ConfidenceTier = "explicit" | "implied" | "inferred" | "speculative";
7
7
  type PrincipalFromSessionKeyMode = "map" | "prefix" | "regex";
@@ -12,6 +12,42 @@ type IdentityInjectionMode = "recovery_only" | "minimal" | "full";
12
12
  type CaptureMode = "implicit" | "explicit" | "hybrid";
13
13
  type MemoryOsPresetName = "conservative" | "balanced" | "research-max" | "local-llm-heavy";
14
14
  type ExtractionPassSource = "base" | "proactive";
15
+ type SlotMismatchMode = "error" | "warn" | "silent";
16
+ type CodexCompactionFlushMode = "signal" | "heuristic" | "auto";
17
+ type DreamingNarrativePromptStyle = "reflective" | "diary" | "analytical";
18
+ type HeartbeatDetectionMode = "runtime-signal" | "heuristic" | "auto";
19
+ type ActiveRecallQueryMode = "message" | "recent" | "full";
20
+ type ActiveRecallPromptStyle = "balanced" | "strict" | "contextual" | "recall-heavy" | "precision-heavy" | "preference-only";
21
+ type ActiveRecallThinking = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "adaptive";
22
+ type ActiveRecallChatType = "direct" | "group" | "channel";
23
+ type ActiveRecallModelFallbackPolicy = "default-remote" | "resolved-only";
24
+ /**
25
+ * Retrieval tier ladder (issue #518). Identifies which tier served a recall
26
+ * result. Ordered top-to-bottom by cost, but routing is not strictly
27
+ * sequential — callers may jump straight to a lower tier when eligibility
28
+ * does not hold.
29
+ */
30
+ type RetrievalTier = "exact-cache" | "fuzzy-cache" | "direct-answer" | "hybrid" | "rerank-graph" | "agentic";
31
+ /**
32
+ * Per-recall annotation describing which retrieval tier served a result,
33
+ * why that tier was chosen, and what was filtered along the way. Added as
34
+ * part of issue #518 (direct-answer tier + `query --explain`).
35
+ *
36
+ * Not to be confused with the existing `recallExplain` operation
37
+ * (graph-path explanation) — that is a user-invoked RPC; this is a
38
+ * per-result annotation that can be attached to any recall response.
39
+ */
40
+ interface RecallTierExplain {
41
+ tier: RetrievalTier;
42
+ tierReason: string;
43
+ filteredBy: string[];
44
+ candidatesConsidered: number;
45
+ latencyMs: number;
46
+ sourceAnchors?: Array<{
47
+ path: string;
48
+ lineRange?: [number, number];
49
+ }>;
50
+ }
15
51
  interface RecallSectionConfig {
16
52
  id: string;
17
53
  enabled?: boolean;
@@ -103,9 +139,82 @@ interface AgentAccessHttpConfig {
103
139
  principal?: string;
104
140
  maxBodyBytes: number;
105
141
  }
142
+ interface DreamingConfig {
143
+ enabled: boolean;
144
+ journalPath: string;
145
+ maxEntries: number;
146
+ injectRecentCount: number;
147
+ minIntervalMinutes: number;
148
+ narrativeModel: string | null;
149
+ narrativePromptStyle: DreamingNarrativePromptStyle;
150
+ watchFile: boolean;
151
+ }
152
+ /** Procedural memory (issue #519): mining + recall gates. All sub-features default off. */
153
+ interface ProceduralConfig {
154
+ enabled: boolean;
155
+ /** Minimum cluster size before emitting a candidate; `0` disables mining (`minOccurrences_zero`). */
156
+ minOccurrences: number;
157
+ /** Minimum success rate from trajectory outcomes in [0, 1]. */
158
+ successFloor: number;
159
+ /** When auto-promotion is enabled, promote pending_review → active after this many occurrences. */
160
+ autoPromoteOccurrences: number;
161
+ autoPromoteEnabled: boolean;
162
+ lookbackDays: number;
163
+ /** When true, installer may register the nightly procedural mining cron (default off). */
164
+ proceduralMiningCronAutoRegister: boolean;
165
+ /** Max procedure memories to inject on task-initiation recall (1–10). */
166
+ recallMaxProcedures: number;
167
+ }
168
+ /** Configuration for the nightly contradiction-scan cron (issue #520). */
169
+ interface ContradictionScanConfig {
170
+ /** Master switch for the contradiction scan cron. Default true. */
171
+ enabled: boolean;
172
+ /** Embedding cosine similarity floor for candidate pair generation. Default 0.82. */
173
+ similarityFloor: number;
174
+ /** Minimum topic-token Jaccard overlap for unstructured pairs. Default 0.4. */
175
+ topicOverlapFloor: number;
176
+ /** Cap on candidate pairs evaluated per cron run. Default 500. */
177
+ maxPairsPerRun: number;
178
+ /** Cooldown in days before re-evaluating a pair judged independent/both-valid. Default 14. */
179
+ cooldownDays: number;
180
+ /** When true, pairs judged "duplicates" are auto-flagged for dedup (still need user approval). Default false. */
181
+ autoMergeDuplicates: boolean;
182
+ }
183
+ interface HeartbeatConfig {
184
+ enabled: boolean;
185
+ journalPath: string;
186
+ maxPreviousRuns: number;
187
+ watchFile: boolean;
188
+ detectionMode: HeartbeatDetectionMode;
189
+ gateExtractionDuringHeartbeat: boolean;
190
+ }
191
+ interface SlotBehaviorConfig {
192
+ requireExclusiveMemorySlot: boolean;
193
+ onSlotMismatch: SlotMismatchMode;
194
+ }
195
+ interface CodexCompatConfig {
196
+ enabled: boolean;
197
+ threadIdBufferKeying: boolean;
198
+ compactionFlushMode: CodexCompactionFlushMode;
199
+ fingerprintDedup: boolean;
200
+ }
106
201
  declare function confidenceTier(score: number): ConfidenceTier;
107
202
  /** Default TTL in days for speculative memories (auto-expire if unconfirmed) */
108
203
  declare const SPECULATIVE_TTL_DAYS = 30;
204
+ /**
205
+ * Shape for semantic chunking config overrides stored in PluginConfig.
206
+ * Mirrors SemanticChunkingConfig from semantic-chunking.ts without creating
207
+ * a circular import (types.ts is imported by everything).
208
+ */
209
+ interface SemanticChunkingConfigShape {
210
+ targetTokens: number;
211
+ minTokens: number;
212
+ maxTokens: number;
213
+ smoothingWindowSize: number;
214
+ boundaryThresholdStdDevs: number;
215
+ embeddingBatchSize: number;
216
+ fallbackToRecursive: boolean;
217
+ }
109
218
  interface PluginConfig {
110
219
  openaiApiKey: string | undefined;
111
220
  openaiBaseUrl: string | undefined;
@@ -181,10 +290,54 @@ interface PluginConfig {
181
290
  chunkingTargetTokens: number;
182
291
  chunkingMinTokens: number;
183
292
  chunkingOverlapSentences: number;
293
+ /** Enable semantic chunking with embedding-based topic boundary detection. Default: false. */
294
+ semanticChunkingEnabled: boolean;
295
+ /** Optional overrides for the semantic chunking algorithm. */
296
+ semanticChunkingConfig: Partial<SemanticChunkingConfigShape>;
184
297
  contradictionDetectionEnabled: boolean;
185
298
  contradictionSimilarityThreshold: number;
186
299
  contradictionMinConfidence: number;
187
300
  contradictionAutoResolve: boolean;
301
+ /** Nightly contradiction-scan cron config (issue #520). */
302
+ contradictionScan: ContradictionScanConfig;
303
+ /**
304
+ * When enabled, writes that carry `structuredAttributes` mark any older
305
+ * fact with the same `entityRef + attribute_name` supersession key and a
306
+ * conflicting value as `status: "superseded"`.
307
+ */
308
+ temporalSupersessionEnabled: boolean;
309
+ /**
310
+ * When enabled, superseded memories are still returned by recall (useful
311
+ * for audit/history queries). Default: false — superseded memories are
312
+ * filtered out.
313
+ */
314
+ temporalSupersessionIncludeInRecall: boolean;
315
+ /**
316
+ * When true, recall checks whether a single validated memory in a
317
+ * high-trust taxonomy bucket can answer the query before invoking QMD.
318
+ * Default false — enable explicitly after bench validation.
319
+ */
320
+ recallDirectAnswerEnabled: boolean;
321
+ /**
322
+ * Minimum token-overlap ratio (query tokens ∩ memory tokens / query tokens)
323
+ * required for direct-answer eligibility. Set to 0 to disable the gate.
324
+ */
325
+ recallDirectAnswerTokenOverlapFloor: number;
326
+ /**
327
+ * Minimum calibrated importance score required for direct-answer
328
+ * eligibility. Set to 0 to disable the gate.
329
+ */
330
+ recallDirectAnswerImportanceFloor: number;
331
+ /**
332
+ * Ambiguity margin: if the second-best candidate scores within this
333
+ * ratio of the top candidate, direct-answer defers to the hybrid tier.
334
+ */
335
+ recallDirectAnswerAmbiguityMargin: number;
336
+ /**
337
+ * Taxonomy category IDs eligible for direct-answer routing. Memories
338
+ * whose resolved taxonomy category is not in this list never qualify.
339
+ */
340
+ recallDirectAnswerEligibleTaxonomyBuckets: string[];
188
341
  memoryLinkingEnabled: boolean;
189
342
  threadingEnabled: boolean;
190
343
  threadingGapMinutes: number;
@@ -205,6 +358,53 @@ interface PluginConfig {
205
358
  checkpointEnabled: boolean;
206
359
  checkpointTurns: number;
207
360
  compactionResetEnabled: boolean;
361
+ beforeResetTimeoutMs: number;
362
+ flushOnResetEnabled: boolean;
363
+ commandsListEnabled: boolean;
364
+ openclawToolsEnabled: boolean;
365
+ openclawToolSnippetMaxChars: number;
366
+ sessionTogglesEnabled: boolean;
367
+ verboseRecallVisibility: boolean;
368
+ recallTranscriptsEnabled: boolean;
369
+ recallTranscriptRetentionDays: number;
370
+ respectBundledActiveMemoryToggle: boolean;
371
+ activeRecallEnabled: boolean;
372
+ activeRecallAgents: string[] | null;
373
+ activeRecallAllowedChatTypes: ActiveRecallChatType[];
374
+ activeRecallQueryMode: ActiveRecallQueryMode;
375
+ activeRecallPromptStyle: ActiveRecallPromptStyle;
376
+ activeRecallPromptOverride: string | null;
377
+ activeRecallPromptAppend: string | null;
378
+ activeRecallMaxSummaryChars: number;
379
+ activeRecallRecentUserTurns: number;
380
+ activeRecallRecentAssistantTurns: number;
381
+ activeRecallRecentUserChars: number;
382
+ activeRecallRecentAssistantChars: number;
383
+ activeRecallThinking: ActiveRecallThinking;
384
+ activeRecallTimeoutMs: number;
385
+ activeRecallCacheTtlMs: number;
386
+ activeRecallModel: string | null;
387
+ activeRecallModelFallbackPolicy: ActiveRecallModelFallbackPolicy;
388
+ activeRecallPersistTranscripts: boolean;
389
+ activeRecallTranscriptDir: string;
390
+ activeRecallEntityGraphDepth: number;
391
+ activeRecallIncludeCausalTrajectories: boolean;
392
+ activeRecallIncludeDaySummary: boolean;
393
+ activeRecallAttachRecallExplain: boolean;
394
+ activeRecallAllowChainedActiveMemory: boolean;
395
+ dreaming: DreamingConfig;
396
+ procedural: ProceduralConfig;
397
+ heartbeat: HeartbeatConfig;
398
+ slotBehavior: SlotBehaviorConfig;
399
+ codexCompat: CodexCompatConfig;
400
+ /** Enable the LLM-as-judge fact-worthiness gate on extracted facts. Default false (opt-in). */
401
+ extractionJudgeEnabled: boolean;
402
+ /** Model override for the judge LLM. Empty string means use the local model. */
403
+ extractionJudgeModel: string;
404
+ /** Maximum number of candidate facts per judge LLM batch call. */
405
+ extractionJudgeBatchSize: number;
406
+ /** Shadow mode: log judge verdicts but do not filter facts. Default false. */
407
+ extractionJudgeShadow: boolean;
208
408
  hourlySummariesEnabled: boolean;
209
409
  daySummaryEnabled: boolean;
210
410
  /** If true, Engram may attempt to auto-register an hourly summary cron job (default off). */
@@ -336,6 +536,29 @@ interface PluginConfig {
336
536
  extractionMaxEntitiesPerRun: number;
337
537
  extractionMaxQuestionsPerRun: number;
338
538
  extractionMaxProfileUpdatesPerRun: number;
539
+ /**
540
+ * Minimum importance level required to persist an extracted fact. Facts
541
+ * whose locally-scored level falls below this threshold are dropped before
542
+ * write and counted toward the `importance_gated` metric. Defaults to
543
+ * "low" so trivial content (greetings, single-word replies, filler) is
544
+ * silently dropped while everything else still passes.
545
+ */
546
+ extractionMinImportanceLevel: ImportanceLevel;
547
+ /**
548
+ * Inline source attribution (issue #369).
549
+ * When enabled, extracted facts carry a compact provenance tag (agent,
550
+ * session, timestamp) inlined into the fact text — not just in YAML
551
+ * frontmatter — so the citation survives prompt injection, copy/paste,
552
+ * and LLM quoting. Off by default to preserve backwards compatibility
553
+ * with existing downstream consumers that expect raw fact text.
554
+ */
555
+ inlineSourceAttributionEnabled: boolean;
556
+ /**
557
+ * Template used when injecting inline citations. Supported placeholders:
558
+ * `{agent}`, `{session}`, `{sessionId}`, `{ts}`, `{date}`. Defaults to
559
+ * `[Source: agent={agent}, session={sessionId}, ts={ts}]`.
560
+ */
561
+ inlineSourceAttributionFormat: string;
339
562
  consolidationRequireNonZeroExtraction: boolean;
340
563
  consolidationMinIntervalMs: number;
341
564
  qmdMaintenanceEnabled: boolean;
@@ -352,6 +575,21 @@ interface PluginConfig {
352
575
  localLlmFastModel: string;
353
576
  localLlmFastUrl: string;
354
577
  localLlmFastTimeoutMs: number;
578
+ /**
579
+ * Suppress chain-of-thought / thinking mode on the main local LLM
580
+ * (issue #548). When true, Remnic injects
581
+ * `chat_template_kwargs: { enable_thinking: false }` on every
582
+ * request so thinking-capable models (Qwen 3.5, Gemma 4, DeepSeek,
583
+ * etc.) skip reasoning tokens that structured-output tasks like
584
+ * extraction and consolidation cannot benefit from. Default: true
585
+ * — the dominant localLlm use case is JSON-shaped extraction where
586
+ * thinking is pure latency tax and a common cause of 60s timeouts.
587
+ * Set to false to restore thinking for narrative tasks.
588
+ *
589
+ * The fast-tier client (`fastLlm`) always disables thinking; that
590
+ * contract is baked into "fast tier" and is unaffected by this flag.
591
+ */
592
+ localLlmDisableThinking: boolean;
355
593
  gatewayConfig?: GatewayConfig;
356
594
  modelSource: "plugin" | "gateway";
357
595
  gatewayAgentId: string;
@@ -440,11 +678,18 @@ interface PluginConfig {
440
678
  entityRetrievalMaxSupportingFacts: number;
441
679
  entityRetrievalMaxRelatedEntities: number;
442
680
  entityRetrievalRecentTurns: number;
681
+ entitySchemas?: Record<string, EntitySchemaDefinition>;
443
682
  recallBudgetChars: number;
444
683
  recallOuterTimeoutMs: number;
445
684
  recallCoreDeadlineMs: number;
446
685
  recallEnrichmentDeadlineMs: number;
447
686
  recallPipeline: RecallSectionConfig[];
687
+ /** Apply Maximal Marginal Relevance to the final recall selection per-section. */
688
+ recallMmrEnabled: boolean;
689
+ /** MMR λ parameter. 1.0 = pure relevance, 0.0 = pure diversity. Default 0.7. */
690
+ recallMmrLambda: number;
691
+ /** MMR is applied over the top N candidates per section. Default 40. */
692
+ recallMmrTopN: number;
448
693
  qmdRecallCacheTtlMs: number;
449
694
  qmdRecallCacheStaleTtlMs: number;
450
695
  qmdRecallCacheMaxEntries: number;
@@ -453,8 +698,22 @@ interface PluginConfig {
453
698
  entityActivityLogMaxEntries: number;
454
699
  entityAliasesEnabled: boolean;
455
700
  entitySummaryEnabled: boolean;
701
+ entitySynthesisMaxTokens: number;
456
702
  /** Enable content-hash deduplication to prevent storing semantically identical facts. */
457
703
  factDeduplicationEnabled: boolean;
704
+ /**
705
+ * Issue #373 — Write-time semantic similarity guard. When enabled (default),
706
+ * the orchestrator embeds each candidate fact and queries the existing
707
+ * embedding index for its top-K nearest neighbors. If the best cosine
708
+ * similarity is at or above `semanticDedupThreshold`, the fact is dropped
709
+ * as a near-duplicate. Fails open (keeps the fact) if the embedding backend
710
+ * is unavailable.
711
+ */
712
+ semanticDedupEnabled: boolean;
713
+ /** Cosine similarity threshold in [0, 1] above which a candidate fact is skipped. */
714
+ semanticDedupThreshold: number;
715
+ /** Number of nearest-neighbor candidates to consider during semantic dedup. */
716
+ semanticDedupCandidates: number;
458
717
  /** Enable automatic archival of old, low-importance, rarely-accessed facts. */
459
718
  factArchivalEnabled: boolean;
460
719
  /** Minimum age in days before a fact is eligible for archival. */
@@ -627,6 +886,187 @@ interface PluginConfig {
627
886
  };
628
887
  /** Max results fetched per agent before merge. */
629
888
  parallelMaxResultsPerAgent: number;
889
+ /** Briefing configuration knobs — see BriefingConfig for field docs. */
890
+ briefing: BriefingConfig;
891
+ codex: CodexConnectorConfig;
892
+ /** Enable the MECE taxonomy knowledge directory. Default false. */
893
+ taxonomyEnabled: boolean;
894
+ /** Auto-regenerate RESOLVER.md when taxonomy changes. Default true. */
895
+ taxonomyAutoGenResolver: boolean;
896
+ /** Materialize Remnic memories into Codex's expected ~/.codex/memories/ layout. Default true. */
897
+ codexMaterializeMemories: boolean;
898
+ /** Namespace to materialize; "auto" derives from the connector context. Default "auto". */
899
+ codexMaterializeNamespace: string;
900
+ /** Max whitespace-tokenized size of memory_summary.md. Default 4500. */
901
+ codexMaterializeMaxSummaryTokens: number;
902
+ /** Max age in days for rollout_summaries/*.md before pruning. Default 30. */
903
+ codexMaterializeRolloutRetentionDays: number;
904
+ /** Run materialization after semantic/causal consolidation completes. Default true. */
905
+ codexMaterializeOnConsolidation: boolean;
906
+ /** Run materialization at Codex session-end hook. Default true. */
907
+ codexMaterializeOnSessionEnd: boolean;
908
+ /** Enable Codex marketplace integration. Default true. */
909
+ codexMarketplaceEnabled: boolean;
910
+ /** Enable page-level versioning with sidecar snapshots. Default false. */
911
+ versioningEnabled: boolean;
912
+ /** Maximum number of version snapshots to keep per page. Default 50. Set to 0 to disable pruning. */
913
+ versioningMaxPerPage: number;
914
+ /** Name of the sidecar directory inside memoryDir. Default ".versions". */
915
+ versioningSidecarDir: string;
916
+ /** Enable binary file lifecycle management (mirror, redirect, clean). Default: false. */
917
+ binaryLifecycleEnabled: boolean;
918
+ /** Grace period in days before a mirrored binary is eligible for local cleanup. Default: 7. */
919
+ binaryLifecycleGracePeriodDays: number;
920
+ /** Storage backend type: "filesystem" copies to a local dir, "none" is no-op. Default: "none". */
921
+ binaryLifecycleBackendType: "filesystem" | "s3" | "none";
922
+ /** Base path for the filesystem backend. Required when backendType is "filesystem". */
923
+ binaryLifecycleBackendPath: string;
924
+ /** Enable oai-mem-citation blocks in recall responses. Default false. */
925
+ citationsEnabled: boolean;
926
+ /** Auto-enable citations when the Codex adapter is detected. Default true. */
927
+ citationsAutoDetect: boolean;
928
+ /** Enable the external enrichment pipeline. Default false. */
929
+ enrichmentEnabled: boolean;
930
+ /** Automatically enrich new entities on creation. Default false. */
931
+ enrichmentAutoOnCreate: boolean;
932
+ /** Max candidates accepted per entity per enrichment run. Default 20. */
933
+ enrichmentMaxCandidatesPerEntity: number;
934
+ /** Whether third-party memory extensions are discovered and injected into consolidation. Default true. */
935
+ memoryExtensionsEnabled: boolean;
936
+ /**
937
+ * Root directory for memory extensions. Empty string means derive from
938
+ * memoryDir: go up to the Remnic home dir and append memory_extensions.
939
+ */
940
+ memoryExtensionsRoot: string;
941
+ }
942
+ /** Runtime configuration for the daily context briefing feature. */
943
+ interface BriefingConfig {
944
+ /** Whether `remnic briefing` CLI and MCP tool are enabled. */
945
+ enabled: boolean;
946
+ /** Default lookback window token (e.g. "yesterday", "3d", "1w", "24h"). */
947
+ defaultWindow: string;
948
+ /** Default output format for the CLI. */
949
+ defaultFormat: "markdown" | "json";
950
+ /** Maximum number of LLM-generated suggested follow-ups. */
951
+ maxFollowups: number;
952
+ /** Optional path to an ICS or JSON calendar file. null disables the section. */
953
+ calendarSource: string | null;
954
+ /** If true, CLI writes a dated briefing file by default. */
955
+ saveByDefault: boolean;
956
+ /** Override directory for saved briefings. null → $REMNIC_HOME/briefings/. */
957
+ saveDir: string | null;
958
+ /** Whether to call the Responses API for follow-up suggestions. */
959
+ llmFollowups: boolean;
960
+ }
961
+ /** Parsed representation of a briefing lookback window. */
962
+ type BriefingWindow = "yesterday" | "today" | string;
963
+ /** Filter the briefing to a single entity / project / topic. */
964
+ interface BriefingFocus {
965
+ type: "person" | "project" | "topic";
966
+ value: string;
967
+ }
968
+ /** Calendar event surfaced by a CalendarSource implementation. */
969
+ interface CalendarEvent {
970
+ /** Stable identifier for dedupe / linking. */
971
+ id: string;
972
+ /** Event title (short). */
973
+ title: string;
974
+ /** ISO 8601 start timestamp. */
975
+ start: string;
976
+ /** Optional ISO 8601 end timestamp. */
977
+ end?: string;
978
+ /** Optional freeform location. */
979
+ location?: string;
980
+ /** Optional short notes. */
981
+ notes?: string;
982
+ }
983
+ /** Abstraction over any calendar backend. Concrete implementations: `FileCalendarSource`. */
984
+ interface CalendarSource {
985
+ /** Return events that fall on the given UTC date (YYYY-MM-DD). */
986
+ eventsForDate(dateIso: string): Promise<CalendarEvent[]>;
987
+ }
988
+ /** A single "active thread" surfaced in a briefing. */
989
+ interface BriefingActiveThread {
990
+ id: string;
991
+ title: string;
992
+ updatedAt: string;
993
+ reason: string;
994
+ }
995
+ /** A single "recent entity" entry. */
996
+ interface BriefingRecentEntity {
997
+ name: string;
998
+ type: string;
999
+ updatedAt: string;
1000
+ score: number;
1001
+ summary?: string;
1002
+ }
1003
+ /** A single unresolved commitment or open question. */
1004
+ interface BriefingOpenCommitment {
1005
+ id: string;
1006
+ kind: "question" | "commitment" | "pending_memory";
1007
+ text: string;
1008
+ source?: string;
1009
+ createdAt?: string;
1010
+ }
1011
+ /** An LLM-generated short follow-up suggestion. */
1012
+ interface BriefingFollowup {
1013
+ text: string;
1014
+ rationale?: string;
1015
+ }
1016
+ /** Structured sections of a briefing result. */
1017
+ interface BriefingSections {
1018
+ activeThreads: BriefingActiveThread[];
1019
+ recentEntities: BriefingRecentEntity[];
1020
+ openCommitments: BriefingOpenCommitment[];
1021
+ suggestedFollowups: BriefingFollowup[];
1022
+ /** Only populated when a calendar source is configured and returns events. */
1023
+ todayCalendar?: CalendarEvent[];
1024
+ }
1025
+ /** A calendar source failure recorded when a CalendarSource throws during briefing generation. */
1026
+ interface BriefingCalendarSourceError {
1027
+ /** Human-readable description of the source (e.g. file path or source name). */
1028
+ source: string;
1029
+ /** Stringified error message from the failed source. */
1030
+ error: string;
1031
+ }
1032
+ /** Result returned by `buildBriefing`. */
1033
+ interface BriefingResult {
1034
+ markdown: string;
1035
+ json: Record<string, unknown>;
1036
+ sections: BriefingSections;
1037
+ /** Reason why suggested follow-ups were omitted (e.g. missing API key, LLM error). */
1038
+ followupsUnavailableReason?: string;
1039
+ /** Effective lookback window (ISO date range) used for this briefing. */
1040
+ window: {
1041
+ from: string;
1042
+ to: string;
1043
+ };
1044
+ /**
1045
+ * Calendar sources that failed during this briefing run.
1046
+ * Only present (non-empty) when at least one source threw.
1047
+ * Allows callers to distinguish "no events today" from "source unavailable".
1048
+ */
1049
+ calendarSourceErrors?: BriefingCalendarSourceError[];
1050
+ }
1051
+ /**
1052
+ * Settings for the Codex CLI connector. These are consumed by
1053
+ * `remnic connectors install codex-cli` to decide where the phase-2 memory
1054
+ * extension is dropped and whether to install it at all.
1055
+ */
1056
+ interface CodexConnectorConfig {
1057
+ /**
1058
+ * Whether to install the Remnic memory extension into
1059
+ * `<codex_home>/memories_extensions/remnic/` when the `codex-cli`
1060
+ * connector is installed. Default `true`. Set to `false` for users who
1061
+ * self-manage the Codex memory extensions folder.
1062
+ */
1063
+ installExtension: boolean;
1064
+ /**
1065
+ * Optional override for the Codex home directory. When `null`, the
1066
+ * connector reads `$CODEX_HOME` and falls back to `~/.codex`. Setting
1067
+ * this is useful for integration tests and non-default installs.
1068
+ */
1069
+ codexHome: string | null;
630
1070
  }
631
1071
  interface BootstrapOptions {
632
1072
  dryRun?: boolean;
@@ -662,11 +1102,21 @@ interface BufferTurn {
662
1102
  content: string;
663
1103
  timestamp: string;
664
1104
  sessionKey?: string;
1105
+ logicalSessionKey?: string;
1106
+ providerThreadId?: string | null;
1107
+ turnFingerprint?: string;
1108
+ persistProcessedFingerprint?: boolean;
1109
+ }
1110
+ interface BufferEntryState {
1111
+ turns: BufferTurn[];
1112
+ lastExtractionAt: string | null;
1113
+ extractionCount: number;
665
1114
  }
666
1115
  interface BufferState {
667
1116
  turns: BufferTurn[];
668
1117
  lastExtractionAt: string | null;
669
1118
  extractionCount: number;
1119
+ entries?: Record<string, BufferEntryState>;
670
1120
  }
671
1121
  interface BehaviorLoopAdjustment {
672
1122
  parameter: string;
@@ -774,9 +1224,20 @@ interface MemoryFrontmatter {
774
1224
  sourceMemoryId?: string;
775
1225
  sourceTurnId?: string;
776
1226
  /** episode = time-specific event; note = stable belief/preference/decision */
777
- memoryKind?: "episode" | "note";
1227
+ memoryKind?: "episode" | "note" | "box" | "dream" | "procedural";
778
1228
  /** Structured key-value attributes extracted from the content (e.g., product attributes, dates, quantities). */
779
1229
  structuredAttributes?: Record<string, string>;
1230
+ /**
1231
+ * SHA-256 (via ContentHashIndex.computeHash) of the raw content that was
1232
+ * used as the dedup key at write time. Persists through archive and
1233
+ * consolidation so the hash can be removed from the index even if the stored
1234
+ * content has been transformed (e.g. an inline citation was appended).
1235
+ *
1236
+ * When present, archive/consolidation paths use this directly instead of
1237
+ * calling stripCitation(memory.content), which only handles the default
1238
+ * [Source: ...] format and silently fails for custom citation templates.
1239
+ */
1240
+ contentHash?: string;
780
1241
  }
781
1242
  /** Memory link relationship types */
782
1243
  type MemoryLinkType = "follows" | "references" | "contradicts" | "supports" | "related";
@@ -822,6 +1283,17 @@ interface MemoryFile {
822
1283
  frontmatter: MemoryFrontmatter;
823
1284
  content: string;
824
1285
  }
1286
+ /** Ordered step for extracted procedure memories (issue #519). */
1287
+ interface ExtractedProcedureStep {
1288
+ order: number;
1289
+ intent: string;
1290
+ toolCall?: {
1291
+ kind: string;
1292
+ signature: string;
1293
+ };
1294
+ expectedOutcome?: string;
1295
+ optional?: boolean;
1296
+ }
825
1297
  interface ExtractedFact {
826
1298
  category: MemoryCategory;
827
1299
  content: string;
@@ -832,11 +1304,15 @@ interface ExtractedFact {
832
1304
  promptedByQuestion?: string;
833
1305
  /** Structured key-value attributes extracted from the content (e.g., product attributes, dates, quantities). */
834
1306
  structuredAttributes?: Record<string, string>;
1307
+ /** When category is `procedure`, ordered steps with intents (persisted under procedures/). */
1308
+ procedureSteps?: ExtractedProcedureStep[];
835
1309
  }
836
1310
  interface MemoryIntent {
837
1311
  goal: string;
838
1312
  actionType: string;
839
1313
  entityTypes: string[];
1314
+ /** True when the prompt reads like starting a concrete task (ship/deploy/tests/PR, etc.). */
1315
+ taskInitiation?: boolean;
840
1316
  }
841
1317
  interface ExtractedQuestion {
842
1318
  question: string;
@@ -864,6 +1340,7 @@ interface EntityMention {
864
1340
  name: string;
865
1341
  type: "person" | "project" | "tool" | "company" | "place" | "other";
866
1342
  facts: string[];
1343
+ structuredSections?: EntityStructuredSection[];
867
1344
  source?: ExtractionPassSource;
868
1345
  promptedByQuestion?: string;
869
1346
  }
@@ -875,15 +1352,51 @@ interface EntityActivityEntry {
875
1352
  date: string;
876
1353
  note: string;
877
1354
  }
1355
+ interface EntityTimelineEntry {
1356
+ timestamp: string;
1357
+ text: string;
1358
+ source?: string;
1359
+ sessionKey?: string;
1360
+ principal?: string;
1361
+ }
1362
+ interface EntityStructuredSection {
1363
+ key: string;
1364
+ title: string;
1365
+ facts: string[];
1366
+ }
1367
+ interface EntitySchemaSectionDefinition {
1368
+ key: string;
1369
+ title: string;
1370
+ description: string;
1371
+ aliases?: string[];
1372
+ }
1373
+ interface EntitySchemaDefinition {
1374
+ sections: EntitySchemaSectionDefinition[];
1375
+ }
878
1376
  interface EntityFile {
879
1377
  name: string;
880
1378
  type: string;
1379
+ created?: string;
881
1380
  updated: string;
1381
+ extraFrontmatterLines?: string[];
1382
+ preSectionLines?: string[];
882
1383
  facts: string[];
883
1384
  summary?: string;
1385
+ synthesis?: string;
1386
+ synthesisUpdatedAt?: string;
1387
+ synthesisTimelineCount?: number;
1388
+ synthesisStructuredFactCount?: number;
1389
+ synthesisStructuredFactDigest?: string;
1390
+ synthesisVersion?: number;
1391
+ timeline: EntityTimelineEntry[];
1392
+ structuredSections?: EntityStructuredSection[];
884
1393
  relationships: EntityRelationship[];
885
1394
  activity: EntityActivityEntry[];
886
1395
  aliases: string[];
1396
+ extraSections?: Array<{
1397
+ title: string;
1398
+ lines: string[];
1399
+ }>;
887
1400
  }
888
1401
  interface ScoredEntity {
889
1402
  name: string;
@@ -912,6 +1425,15 @@ interface ConsolidationResult {
912
1425
  profileUpdates: string[];
913
1426
  entityUpdates: EntityMention[];
914
1427
  }
1428
+ interface ConsolidationObservation {
1429
+ runAt: string;
1430
+ recentMemories: MemoryFile[];
1431
+ existingMemories: MemoryFile[];
1432
+ profile: string;
1433
+ result: ConsolidationResult;
1434
+ merged: number;
1435
+ invalidated: number;
1436
+ }
915
1437
  interface QmdSearchResult {
916
1438
  docid: string;
917
1439
  path: string;
@@ -933,6 +1455,10 @@ interface MetaState {
933
1455
  lastConsolidationAt: string | null;
934
1456
  totalMemories: number;
935
1457
  totalEntities: number;
1458
+ processedExtractionFingerprints?: Array<{
1459
+ fingerprint: string;
1460
+ observedAt: string;
1461
+ }>;
936
1462
  }
937
1463
  type MemoryActionType = "store_episode" | "store_note" | "update_note" | "create_artifact" | "summarize_node" | "discard" | "link_graph";
938
1464
  type MemoryActionOutcome = "applied" | "skipped" | "failed";
@@ -1240,4 +1766,4 @@ interface HourlySummary {
1240
1766
  generatedAt: string;
1241
1767
  }
1242
1768
 
1243
- export { type AccessTrackingEntry, type AgentAccessHttpConfig, type AgentDefaultsConfig, type AgentPersona, type AgentPersonaModelConfig, type BehaviorLoopAdjustment, type BehaviorLoopPolicyState, type BehaviorSignalDirection, type BehaviorSignalEvent, type BehaviorSignalType, type BootstrapOptions, type BootstrapResult, type BufferState, type BufferTurn, type CaptureMode, type Checkpoint, type CompressionGuidelineActivationState, type CompressionGuidelineOptimizerActionSummary, type CompressionGuidelineOptimizerEventCounts, type CompressionGuidelineOptimizerRuleUpdate, type CompressionGuidelineOptimizerSourceWindow, type CompressionGuidelineOptimizerState, type ConfidenceTier, type ConsolidationAction, type ConsolidationItem, type ConsolidationResult, type ContinuityImprovementLoop, type ContinuityIncidentCloseInput, type ContinuityIncidentOpenInput, type ContinuityIncidentRecord, type ContinuityIncidentState, type ContinuityLoopCadence, type ContinuityLoopReviewInput, type ContinuityLoopStatus, type ContinuityLoopUpsertInput, type ConversationThread, type CronConversationRecallMode, type CronRecallMode, type DaySummaryResult, type EngramTraceEvent, type EntityActivityEntry, type EntityFile, type EntityMention, type EntityRelationship, type ExtractedFact, type ExtractedQuestion, type ExtractedRelationship, type ExtractionPassSource, type ExtractionResult, type FileHygieneConfig, type GatewayConfig, type HourlySummary, type IdentityInjectionMode, type ImportanceLevel, type ImportanceScore, type LifecycleState, type LlmTraceCallback, type LlmTraceEvent, type MemoryActionEligibilityContext, type MemoryActionEligibilitySource, type MemoryActionEvent, type MemoryActionOutcome, type MemoryActionPolicyDecision, type MemoryActionPolicyResult, type MemoryActionStatus, type MemoryActionType, type MemoryCategory, type MemoryFile, type MemoryFrontmatter, type MemoryIntent, type MemoryLifecycleEvent, type MemoryLifecycleEventType, type MemoryLifecycleStateSummary, type MemoryLink, type MemoryLinkType, type MemoryOsPresetName, type MemoryProjectionCurrentState, type MemoryStatus, type MemorySummary, type MetaState, type ModelApi, type ModelDefinitionConfig, type ModelProviderAuthMode, type ModelProviderConfig, type NamespacePolicy, type NativeKnowledgeConfig, type NativeKnowledgeFolderRuleConfig, type NativeKnowledgeObsidianVaultConfig, type NativeKnowledgeOpenClawWorkspaceConfig, type PluginConfig, type PolicyClass, type PrincipalFromSessionKeyMode, type PrincipalRule, type QmdSearchExplain, type QmdSearchResult, type QuestionEntry, type ReasoningEffort, type RecallPipelineConfig, type RecallPlanMode, type RecallSectionConfig, type RecallTraceEvent, type RelevanceFeedback, SPECULATIVE_TTL_DAYS, type ScoredEntity, type SessionObserverBandConfig, type SignalLevel, type SignalScanResult, type TopicScore, type TranscriptEntry, type TriggerMode, type VerificationState, confidenceTier };
1769
+ export { type AccessTrackingEntry, type ActiveRecallChatType, type ActiveRecallModelFallbackPolicy, type ActiveRecallPromptStyle, type ActiveRecallQueryMode, type ActiveRecallThinking, type AgentAccessHttpConfig, type AgentDefaultsConfig, type AgentPersona, type AgentPersonaModelConfig, type BehaviorLoopAdjustment, type BehaviorLoopPolicyState, type BehaviorSignalDirection, type BehaviorSignalEvent, type BehaviorSignalType, type BootstrapOptions, type BootstrapResult, type BriefingActiveThread, type BriefingCalendarSourceError, type BriefingConfig, type BriefingFocus, type BriefingFollowup, type BriefingOpenCommitment, type BriefingRecentEntity, type BriefingResult, type BriefingSections, type BriefingWindow, type BufferEntryState, type BufferState, type BufferTurn, type CalendarEvent, type CalendarSource, type CaptureMode, type Checkpoint, type CodexCompactionFlushMode, type CodexCompatConfig, type CodexConnectorConfig, type CompressionGuidelineActivationState, type CompressionGuidelineOptimizerActionSummary, type CompressionGuidelineOptimizerEventCounts, type CompressionGuidelineOptimizerRuleUpdate, type CompressionGuidelineOptimizerSourceWindow, type CompressionGuidelineOptimizerState, type ConfidenceTier, type ConsolidationAction, type ConsolidationItem, type ConsolidationObservation, type ConsolidationResult, type ContinuityImprovementLoop, type ContinuityIncidentCloseInput, type ContinuityIncidentOpenInput, type ContinuityIncidentRecord, type ContinuityIncidentState, type ContinuityLoopCadence, type ContinuityLoopReviewInput, type ContinuityLoopStatus, type ContinuityLoopUpsertInput, type ContradictionScanConfig, type ConversationThread, type CronConversationRecallMode, type CronRecallMode, type DaySummaryResult, type DreamingConfig, type DreamingNarrativePromptStyle, type EngramTraceEvent, type EntityActivityEntry, type EntityFile, type EntityMention, type EntityRelationship, type EntitySchemaDefinition, type EntitySchemaSectionDefinition, type EntityStructuredSection, type EntityTimelineEntry, type ExtractedFact, type ExtractedProcedureStep, type ExtractedQuestion, type ExtractedRelationship, type ExtractionPassSource, type ExtractionResult, type FileHygieneConfig, type GatewayConfig, type HeartbeatConfig, type HeartbeatDetectionMode, type HourlySummary, type IdentityInjectionMode, type ImportanceLevel, type ImportanceScore, type LifecycleState, type LlmTraceCallback, type LlmTraceEvent, type MemoryActionEligibilityContext, type MemoryActionEligibilitySource, type MemoryActionEvent, type MemoryActionOutcome, type MemoryActionPolicyDecision, type MemoryActionPolicyResult, type MemoryActionStatus, type MemoryActionType, type MemoryCategory, type MemoryFile, type MemoryFrontmatter, type MemoryIntent, type MemoryLifecycleEvent, type MemoryLifecycleEventType, type MemoryLifecycleStateSummary, type MemoryLink, type MemoryLinkType, type MemoryOsPresetName, type MemoryProjectionCurrentState, type MemoryStatus, type MemorySummary, type MetaState, type ModelApi, type ModelDefinitionConfig, type ModelProviderAuthMode, type ModelProviderConfig, type NamespacePolicy, type NativeKnowledgeConfig, type NativeKnowledgeFolderRuleConfig, type NativeKnowledgeObsidianVaultConfig, type NativeKnowledgeOpenClawWorkspaceConfig, type PluginConfig, type PolicyClass, type PrincipalFromSessionKeyMode, type PrincipalRule, type ProceduralConfig, type QmdSearchExplain, type QmdSearchResult, type QuestionEntry, type ReasoningEffort, type RecallPipelineConfig, type RecallPlanMode, type RecallSectionConfig, type RecallTierExplain, type RecallTraceEvent, type RelevanceFeedback, type RetrievalTier, SPECULATIVE_TTL_DAYS, type ScoredEntity, type SemanticChunkingConfigShape, type SessionObserverBandConfig, type SignalLevel, type SignalScanResult, type SlotBehaviorConfig, type SlotMismatchMode, type TopicScore, type TranscriptEntry, type TriggerMode, type VerificationState, confidenceTier };