@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/intent.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { MemoryIntent, RecallPlanMode } from './types.js';
2
2
 
3
3
  declare function inferIntentFromText(text: string): MemoryIntent;
4
+ declare function isTaskInitiationIntent(intent: MemoryIntent): boolean;
4
5
  declare function intentCompatibilityScore(queryIntent: MemoryIntent, memoryIntent: MemoryIntent): number;
5
6
  declare function planRecallMode(prompt: string): RecallPlanMode;
6
7
  declare function hasBroadGraphIntent(prompt: string): boolean;
7
8
 
8
- export { hasBroadGraphIntent, inferIntentFromText, intentCompatibilityScore, planRecallMode };
9
+ export { hasBroadGraphIntent, inferIntentFromText, intentCompatibilityScore, isTaskInitiationIntent, planRecallMode };
package/dist/intent.js CHANGED
@@ -2,12 +2,14 @@ import {
2
2
  hasBroadGraphIntent,
3
3
  inferIntentFromText,
4
4
  intentCompatibilityScore,
5
+ isTaskInitiationIntent,
5
6
  planRecallMode
6
- } from "./chunk-WWIQTB2Y.js";
7
+ } from "./chunk-GGD5W7TB.js";
7
8
  export {
8
9
  hasBroadGraphIntent,
9
10
  inferIntentFromText,
10
11
  intentCompatibilityScore,
12
+ isTaskInitiationIntent,
11
13
  planRecallMode
12
14
  };
13
15
  //# sourceMappingURL=intent.js.map
package/dist/lifecycle.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  daysSince,
8
8
  decideLifecycleTransition,
9
9
  resolveLifecycleState
10
- } from "./chunk-QCCCQT3O.js";
10
+ } from "./chunk-TBBDFYXW.js";
11
11
  export {
12
12
  clamp01,
13
13
  clampLifecycleThreshold,
@@ -52,9 +52,16 @@ declare class LocalLlmClient {
52
52
  private static readonly LMS_CACHE_INTERVAL_MS;
53
53
  constructor(config: PluginConfig, modelRegistry?: ModelRegistry);
54
54
  /**
55
- * Disable thinking/reasoning mode for models that support it (e.g. Qwen 3.5).
56
- * When enabled, adds chat_template_kwargs to suppress chain-of-thought,
57
- * reducing latency for fast-tier operations.
55
+ * Request thinking/reasoning suppression on the next chat completion.
56
+ *
57
+ * When `true`, the client will inject
58
+ * `chat_template_kwargs: { enable_thinking: false }` into the request
59
+ * body — **but only when the detected backend is known to support it**
60
+ * (LM Studio, vLLM; see `THINKING_COMPATIBLE_BACKENDS`). Strict
61
+ * OpenAI-compat backends reject unknown fields with 400; on those the
62
+ * client fails open (thinking runs normally). This is the safe
63
+ * default for Remnic extraction / consolidation: measurable latency
64
+ * win on thinking-capable backends, zero risk on others. Issue #548.
58
65
  */
59
66
  set disableThinking(value: boolean);
60
67
  private resolveHomeDir;
package/dist/local-llm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  LocalLlmClient
3
- } from "./chunk-MDDAA2AO.js";
3
+ } from "./chunk-JL2PU6AI.js";
4
4
  import "./chunk-LK6SGL53.js";
5
5
  import "./chunk-MARWOCVP.js";
6
- import "./chunk-KWBU5S5U.js";
6
+ import "./chunk-2ODBA7MQ.js";
7
7
  export {
8
8
  LocalLlmClient
9
9
  };
package/dist/logger.d.ts CHANGED
@@ -4,7 +4,7 @@ interface LoggerBackend {
4
4
  error(msg: string, ...args: unknown[]): void;
5
5
  debug?(msg: string, ...args: unknown[]): void;
6
6
  }
7
- declare function initLogger(backend: LoggerBackend, debug: boolean): void;
7
+ declare function initLogger(backend?: LoggerBackend, debug?: boolean): void;
8
8
  declare const log: {
9
9
  info(msg: string, ...args: unknown[]): void;
10
10
  warn(msg: string, ...args: unknown[]): void;
package/dist/logger.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  initLogger,
3
3
  log
4
- } from "./chunk-KWBU5S5U.js";
4
+ } from "./chunk-2ODBA7MQ.js";
5
5
  export {
6
6
  initLogger,
7
7
  log
@@ -6,8 +6,8 @@ declare function updateCacheOnWrite(baseDir: string, memory: MemoryFile): void;
6
6
  declare function updateCacheOnDelete(baseDir: string, filePath: string): void;
7
7
  declare function getCachedArchivedMemories(baseDir: string, currentVersion: number): MemoryFile[] | null;
8
8
  declare function setCachedArchivedMemories(baseDir: string, memories: MemoryFile[], version: number): void;
9
- declare function getCachedEntities(baseDir: string, currentVersion: number): EntityFile[] | null;
10
- declare function setCachedEntities(baseDir: string, entities: EntityFile[], version: number): void;
9
+ declare function getCachedEntities(baseDir: string, currentVersion: number, schemaKey?: string): EntityFile[] | null;
10
+ declare function setCachedEntities(baseDir: string, entities: EntityFile[], version: number, schemaKey?: string): void;
11
11
  /** Get a pre-filtered Map of episode memories (keyed by ID). Derived from hot cache. */
12
12
  declare function getCachedEpisodeMap(baseDir: string, currentVersion: number): Map<string, MemoryFile> | null;
13
13
  /** Build and cache the episode memory map from the full memory list. */
@@ -15,7 +15,7 @@ import {
15
15
  setCachedRuleMemories,
16
16
  updateCacheOnDelete,
17
17
  updateCacheOnWrite
18
- } from "./chunk-ESSMF2FR.js";
18
+ } from "./chunk-6PFRXT4K.js";
19
19
  export {
20
20
  clearMemoryCache,
21
21
  getCachedArchivedMemories,
@@ -218,4 +218,4 @@ declare function readProjectedGovernanceRecord(memoryDir: string): {
218
218
  report: string;
219
219
  } | null;
220
220
 
221
- export { readProjectedMemoryState as A, readProjectedMemoryTimeline as B, readProjectedNativeKnowledgeChunks as C, type MemoryGovernanceRunResult as M, type ProjectedMemoryBrowseOptions as P, type RestoreMemoryGovernanceRunResult as R, type MemoryGovernanceSummary as a, type MemoryGovernanceMetrics as b, type MemoryGovernanceQualityScore as c, type MemoryGovernanceReviewQueueEntry as d, type MemoryGovernanceAppliedAction as e, type MemoryGovernanceTransitionReport as f, type MemoryGovernanceManifest as g, type MemoryGovernanceRestoreManifest as h, type ProjectedMemoryBrowsePage as i, readProjectedGovernanceRecord as j, MEMORY_PROJECTION_SCHEMA_VERSION as k, type MemoryProjectionGovernanceAppliedActionRow as l, type MemoryProjectionGovernanceReviewQueueRow as m, type ProjectedEntityMentionRow as n, type ProjectedMemoryBrowseRow as o, type ProjectedNativeKnowledgeChunkRow as p, type ProjectedReviewQueueSnapshot as q, readMemoryGovernanceRunArtifact as r, getMemoryProjectionPath as s, initializeMemoryProjectionDb as t, memoryCurrentSelectExpressions as u, parseCurrentRow as v, parseTimelineRows as w, readProjectedEntityMentions as x, readProjectedLatestReviewQueue as y, readProjectedMemoryBrowse as z };
221
+ export { readProjectedMemoryState as A, readProjectedMemoryTimeline as B, readProjectedNativeKnowledgeChunks as C, type MemoryGovernanceRunResult as M, type ProjectedMemoryBrowseOptions as P, type RestoreMemoryGovernanceRunResult as R, type ProjectedMemoryBrowsePage as a, readProjectedGovernanceRecord as b, type MemoryGovernanceSummary as c, type MemoryGovernanceMetrics as d, type MemoryGovernanceQualityScore as e, type MemoryGovernanceReviewQueueEntry as f, type MemoryGovernanceAppliedAction as g, type MemoryGovernanceTransitionReport as h, type MemoryGovernanceManifest as i, type MemoryGovernanceRestoreManifest as j, MEMORY_PROJECTION_SCHEMA_VERSION as k, type MemoryProjectionGovernanceAppliedActionRow as l, type MemoryProjectionGovernanceReviewQueueRow as m, type ProjectedEntityMentionRow as n, type ProjectedMemoryBrowseRow as o, type ProjectedNativeKnowledgeChunkRow as p, type ProjectedReviewQueueSnapshot as q, readMemoryGovernanceRunArtifact as r, getMemoryProjectionPath as s, initializeMemoryProjectionDb as t, memoryCurrentSelectExpressions as u, parseCurrentRow as v, parseTimelineRows as w, readProjectedEntityMentions as x, readProjectedLatestReviewQueue as y, readProjectedMemoryBrowse as z };
@@ -1,3 +1,3 @@
1
- export { k as MEMORY_PROJECTION_SCHEMA_VERSION, l as MemoryProjectionGovernanceAppliedActionRow, m as MemoryProjectionGovernanceReviewQueueRow, n as ProjectedEntityMentionRow, P as ProjectedMemoryBrowseOptions, i as ProjectedMemoryBrowsePage, o as ProjectedMemoryBrowseRow, p as ProjectedNativeKnowledgeChunkRow, q as ProjectedReviewQueueSnapshot, s as getMemoryProjectionPath, t as initializeMemoryProjectionDb, u as memoryCurrentSelectExpressions, v as parseCurrentRow, w as parseTimelineRows, x as readProjectedEntityMentions, j as readProjectedGovernanceRecord, y as readProjectedLatestReviewQueue, z as readProjectedMemoryBrowse, A as readProjectedMemoryState, B as readProjectedMemoryTimeline, C as readProjectedNativeKnowledgeChunks } from './memory-projection-store-NxMkbocT.js';
1
+ export { k as MEMORY_PROJECTION_SCHEMA_VERSION, l as MemoryProjectionGovernanceAppliedActionRow, m as MemoryProjectionGovernanceReviewQueueRow, n as ProjectedEntityMentionRow, P as ProjectedMemoryBrowseOptions, a as ProjectedMemoryBrowsePage, o as ProjectedMemoryBrowseRow, p as ProjectedNativeKnowledgeChunkRow, q as ProjectedReviewQueueSnapshot, s as getMemoryProjectionPath, t as initializeMemoryProjectionDb, u as memoryCurrentSelectExpressions, v as parseCurrentRow, w as parseTimelineRows, x as readProjectedEntityMentions, b as readProjectedGovernanceRecord, y as readProjectedLatestReviewQueue, z as readProjectedMemoryBrowse, A as readProjectedMemoryState, B as readProjectedMemoryTimeline, C as readProjectedNativeKnowledgeChunks } from './memory-projection-store-DeSXPh1j.js';
2
2
  import './types.js';
3
3
  import 'better-sqlite3';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ModelRegistry
3
- } from "./chunk-ONRU4L2N.js";
4
- import "./chunk-KWBU5S5U.js";
3
+ } from "./chunk-FEMOX5AD.js";
4
+ import "./chunk-2ODBA7MQ.js";
5
5
  export {
6
6
  ModelRegistry
7
7
  };
@@ -2,8 +2,8 @@ import {
2
2
  __setModelsJsonForTest,
3
3
  clearModelsJsonCache,
4
4
  loadModelsJsonProviders
5
- } from "./chunk-OOSWAUYB.js";
6
- import "./chunk-KWBU5S5U.js";
5
+ } from "./chunk-ODWDQNRE.js";
6
+ import "./chunk-2ODBA7MQ.js";
7
7
  export {
8
8
  __setModelsJsonForTest,
9
9
  clearModelsJsonCache,
@@ -9,8 +9,8 @@ import {
9
9
  syncCuratedIncludeFiles,
10
10
  syncObsidianVaults,
11
11
  syncOpenClawWorkspaceArtifacts
12
- } from "./chunk-Q6FETXJA.js";
13
- import "./chunk-KWBU5S5U.js";
12
+ } from "./chunk-7SEAZFFB.js";
13
+ import "./chunk-2ODBA7MQ.js";
14
14
  export {
15
15
  collectNativeKnowledgeChunks,
16
16
  formatNativeKnowledgeSection,
package/dist/negative.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NegativeExampleStore
3
- } from "./chunk-GJR6D6KC.js";
4
- import "./chunk-KWBU5S5U.js";
3
+ } from "./chunk-D654IBA6.js";
4
+ import "./chunk-2ODBA7MQ.js";
5
5
  export {
6
6
  NegativeExampleStore
7
7
  };
@@ -5,31 +5,36 @@ import {
5
5
  runOperatorInventory,
6
6
  runOperatorRepair,
7
7
  runOperatorSetup
8
- } from "./chunk-QDOSNLB4.js";
9
- import "./chunk-IZME7KW2.js";
8
+ } from "./chunk-3QHL5ABG.js";
9
+ import "./chunk-ZVBB3T7V.js";
10
10
  import "./chunk-YRMVARQP.js";
11
- import "./chunk-TVVVQQAK.js";
11
+ import "./chunk-BLKTA7MM.js";
12
+ import "./chunk-U66YHYC7.js";
12
13
  import "./chunk-LK6SGL53.js";
13
- import "./chunk-Q6FETXJA.js";
14
+ import "./chunk-7SEAZFFB.js";
14
15
  import "./chunk-K6WK37A6.js";
15
- import "./chunk-SCHEKPYH.js";
16
- import "./chunk-ISY75RLM.js";
16
+ import "./chunk-MBJHSA7F.js";
17
17
  import "./chunk-Z5LAYHGJ.js";
18
+ import "./chunk-C2EFFULQ.js";
19
+ import "./chunk-PVGDJXVK.js";
18
20
  import "./chunk-MARWOCVP.js";
19
- import "./chunk-J3BT33K7.js";
20
- import "./chunk-QWUUMMIK.js";
21
- import "./chunk-U4PV25RD.js";
22
- import "./chunk-ESSMF2FR.js";
23
- import "./chunk-TP4FZJIZ.js";
21
+ import "./chunk-ITRLGI2T.js";
22
+ import "./chunk-QNJMBKFK.js";
23
+ import "./chunk-TBBDFYXW.js";
24
+ import "./chunk-LPSF4OQH.js";
25
+ import "./chunk-GV6NLQ4X.js";
26
+ import "./chunk-3WHVNEN7.js";
27
+ import "./chunk-4KAN3GZ3.js";
28
+ import "./chunk-6ZH4TU6I.js";
24
29
  import "./chunk-SCU65EZI.js";
25
30
  import "./chunk-BOUYNNYD.js";
31
+ import "./chunk-6PFRXT4K.js";
32
+ import "./chunk-TP4FZJIZ.js";
26
33
  import "./chunk-DM2T26WE.js";
27
34
  import "./chunk-QSVPYQPG.js";
28
- import "./chunk-HLXVTBF3.js";
29
35
  import "./chunk-M62O4P4T.js";
30
- import "./chunk-KWBU5S5U.js";
31
- import "./chunk-LPSF4OQH.js";
32
- import "./chunk-QCCCQT3O.js";
36
+ import "./chunk-4DJQYKMN.js";
37
+ import "./chunk-2ODBA7MQ.js";
33
38
  export {
34
39
  runBenchmarkRecall,
35
40
  runOperatorConfigReview,
@@ -10,8 +10,8 @@ import { NegativeExampleStore } from './negative.js';
10
10
  import { LastRecallStore, TierMigrationStatusStore, GraphRecallExpandedEntry, TierMigrationStatusSnapshot, TierMigrationCycleSummary, LastRecallSnapshot } from './recall-state.js';
11
11
  import { SessionObserverState } from './session-observer-state.js';
12
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';
13
+ import { PluginConfig, QmdSearchResult, BehaviorLoopPolicyState, BootstrapOptions, BootstrapResult, ConsolidationObservation, MemoryFile, DaySummaryResult, MemoryActionEvent, RecallPlanMode, MemoryIntent, EntityTimelineEntry, ExtractionResult, MemoryFrontmatter, IdentityInjectionMode } from './types.js';
14
+ import { S as SemanticConsolidationResult } from './semantic-consolidation-DrvSYRdB.js';
15
15
  import { z } from 'zod';
16
16
  import { RuntimePolicyValues } from './policy-runtime.js';
17
17
  import { ProfilingCollector } from './profiling.js';
@@ -33,6 +33,74 @@ interface ReplayWarning {
33
33
  index?: number;
34
34
  }
35
35
 
36
+ interface BulkImportSource {
37
+ turns: ImportTurn[];
38
+ metadata: {
39
+ source: string;
40
+ exportDate: string;
41
+ messageCount: number;
42
+ dateRange: {
43
+ from: string;
44
+ to: string;
45
+ };
46
+ };
47
+ }
48
+ interface ImportTurn {
49
+ role: "user" | "assistant" | "other";
50
+ content: string;
51
+ timestamp: string;
52
+ participantId?: string;
53
+ participantName?: string;
54
+ replyToId?: string;
55
+ }
56
+ interface BulkImportOptions {
57
+ batchSize?: number;
58
+ dryRun?: boolean;
59
+ dedup?: boolean;
60
+ trustLevel?: "import";
61
+ namespace?: string;
62
+ }
63
+ type ImportSourceRole = ImportTurn["role"];
64
+ interface BulkImportResult {
65
+ memoriesCreated: number;
66
+ duplicatesSkipped: number;
67
+ entitiesCreated: number;
68
+ turnsProcessed: number;
69
+ batchesProcessed: number;
70
+ errors: BulkImportError[];
71
+ }
72
+ interface BulkImportError {
73
+ batchIndex: number;
74
+ message: string;
75
+ }
76
+ interface BulkImportSourceAdapter {
77
+ name: string;
78
+ parse(input: unknown, options?: {
79
+ strict?: boolean;
80
+ platform?: string;
81
+ }): Promise<BulkImportSource> | BulkImportSource;
82
+ }
83
+ interface ImportTurnValidationIssue {
84
+ code: string;
85
+ message: string;
86
+ index?: number;
87
+ }
88
+ declare function isImportRole(value: unknown): value is ImportSourceRole;
89
+ /**
90
+ * Parse an ISO-8601 / RFC 3339 timestamp used by bulk-import adapters.
91
+ *
92
+ * Accepts variable-precision fractional seconds and either a `Z` suffix or a
93
+ * `[+-]HH:MM` timezone offset, so adapters may preserve their source
94
+ * timestamps verbatim. Returns milliseconds since epoch, or `null` if the
95
+ * string is not a well-formed timestamp (including overflowed calendar dates
96
+ * or out-of-range offsets).
97
+ *
98
+ * Delegates to the shared parser in `utils/iso-timestamp.ts` — do not
99
+ * reimplement locally; extend that helper instead.
100
+ */
101
+ declare function parseIsoTimestamp(value: string): number | null;
102
+ declare function validateImportTurn(turn: ImportTurn, index?: number): ImportTurnValidationIssue[];
103
+
36
104
  type SummarizeFn = (text: string, targetTokens: number, aggressive: boolean) => Promise<string | null>;
37
105
 
38
106
  declare class LcmEngine {
@@ -168,29 +236,29 @@ declare const SharedFeedbackEntrySchema: z.ZodObject<{
168
236
  refs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
169
237
  }, "strip", z.ZodTypeAny, {
170
238
  decision: "rejected" | "approved" | "approved_with_feedback";
171
- reason: string;
172
239
  agent: string;
173
240
  date: string;
241
+ reason: string;
174
242
  confidence?: number | undefined;
243
+ workflow?: string | undefined;
175
244
  tags?: string[] | undefined;
176
245
  severity?: "low" | "medium" | "high" | undefined;
177
246
  outcome?: string | undefined;
178
247
  refs?: string[] | undefined;
179
- workflow?: string | undefined;
180
248
  learning?: string | undefined;
181
249
  evidenceWindowStart?: string | undefined;
182
250
  evidenceWindowEnd?: string | undefined;
183
251
  }, {
184
252
  decision: "rejected" | "approved" | "approved_with_feedback";
185
- reason: string;
186
253
  agent: string;
187
254
  date: string;
255
+ reason: string;
188
256
  confidence?: number | undefined;
257
+ workflow?: string | undefined;
189
258
  tags?: string[] | undefined;
190
259
  severity?: "low" | "medium" | "high" | undefined;
191
260
  outcome?: string | undefined;
192
261
  refs?: string[] | undefined;
193
- workflow?: string | undefined;
194
262
  learning?: string | undefined;
195
263
  evidenceWindowStart?: string | undefined;
196
264
  evidenceWindowEnd?: string | undefined;
@@ -486,6 +554,7 @@ declare class CompoundingEngine {
486
554
  private readContinuityAuditReferences;
487
555
  }
488
556
 
557
+ declare function dedupeEntitySynthesisEvidenceEntries(entries: EntityTimelineEntry[]): EntityTimelineEntry[];
489
558
  interface GraphRecallSnapshot {
490
559
  recordedAt: string;
491
560
  mode: RecallPlanMode | string;
@@ -681,6 +750,7 @@ declare class Orchestrator {
681
750
  readonly summarizer: HourlySummarizer;
682
751
  readonly localLlm: LocalLlmClient;
683
752
  readonly fastLlm: LocalLlmClient;
753
+ private readonly judgeVerdictCache;
684
754
  private readonly fastGatewayLlm;
685
755
  readonly modelRegistry: ModelRegistry;
686
756
  readonly relevance: RelevanceStore;
@@ -721,6 +791,7 @@ declare class Orchestrator {
721
791
  private nonZeroExtractionsSinceConsolidation;
722
792
  private lastConsolidationRunAtMs;
723
793
  private consolidationInFlight;
794
+ private readonly consolidationObservers;
724
795
  private qmdMaintenanceTimer;
725
796
  private qmdMaintenancePending;
726
797
  private qmdMaintenanceInFlight;
@@ -739,6 +810,36 @@ declare class Orchestrator {
739
810
  private evalShadowWriteChain;
740
811
  private initPromise;
741
812
  private resolveInit;
813
+ /**
814
+ * Resolves when deferred initialization (QMD probe, warmup, caches, cron)
815
+ * completes. CLI and http-serve callers that need `qmd.isAvailable()` to
816
+ * reflect reality should `await orchestrator.deferredReady` after
817
+ * `initialize()`. Gateway callers can ignore it — recall() degrades
818
+ * gracefully when QMD isn't ready yet.
819
+ *
820
+ * Also resolves (without error) when `initialize()` throws before reaching
821
+ * the deferred-init phase, so callers never hang on a permanently-pending
822
+ * promise.
823
+ *
824
+ * Host adapters that need to tie deferred init to their stop() lifecycle
825
+ * should `await orchestrator.deferredReady` before proceeding with teardown
826
+ * to prevent background QMD/warmup/cron tasks from racing with shutdown.
827
+ */
828
+ deferredReady: Promise<void>;
829
+ private resolveDeferredReady;
830
+ private deferredInitAbort;
831
+ /**
832
+ * Whether the deferred init's QMD startup sync completed successfully.
833
+ * When false after deferredReady resolves, the server retry loop should
834
+ * attempt startupSearchSync() even if `qmd.isAvailable()` is true —
835
+ * availability only means probe succeeded, not that the index is current.
836
+ */
837
+ deferredSyncSucceeded: boolean;
838
+ /**
839
+ * Abort deferred initialization so background QMD sync/warmup stops
840
+ * promptly on shutdown. Safe to call multiple times or before init.
841
+ */
842
+ abortDeferredInit(): void;
742
843
  /** Set per-session workspace for the next recall() call (compaction reset). @internal */
743
844
  setRecallWorkspaceOverride(sessionKey: string, dir: string): void;
744
845
  /** Remove a per-session workspace override (cleanup on error or early return). @internal */
@@ -794,12 +895,29 @@ declare class Orchestrator {
794
895
  } | null>;
795
896
  };
796
897
  initialize(): Promise<void>;
898
+ private deferredInitialize;
899
+ /**
900
+ * Namespace-aware startup search sync. Re-probes QMD, ensures collections
901
+ * (namespace-aware when namespacesEnabled), runs update, and warms up search.
902
+ * Designed for server retry paths that run after the deferred init completes
903
+ * when QMD was not available during initial startup.
904
+ *
905
+ * Accepts an optional AbortSignal so callers can interrupt the sync during
906
+ * shutdown. The signal is checked between phases and forwarded into the QMD
907
+ * update and warmup search calls so a long-running `qmd update` subprocess
908
+ * is killed promptly rather than left in flight after `httpServer.stop()`.
909
+ *
910
+ * Returns true if the sync succeeded (QMD now available), false otherwise.
911
+ */
912
+ startupSearchSync(signal?: AbortSignal): Promise<boolean>;
797
913
  /**
798
914
  * Auto-register the engram-day-summary cron job in OpenClaw if it doesn't exist.
799
915
  * Fire-and-forget — never blocks init or crashes on failure.
800
916
  */
801
917
  private autoRegisterDaySummaryCron;
802
918
  private autoRegisterNightlyGovernanceCron;
919
+ private autoRegisterProceduralMiningCron;
920
+ private autoRegisterContradictionScanCron;
803
921
  applyBehaviorRuntimePolicy(state: BehaviorLoopPolicyState): Promise<{
804
922
  applied: boolean;
805
923
  rolledBack: boolean;
@@ -814,6 +932,10 @@ declare class Orchestrator {
814
932
  merged: number;
815
933
  invalidated: number;
816
934
  }>;
935
+ reindexMemoryById(id: string, options?: {
936
+ storage?: StorageManager;
937
+ }): Promise<void>;
938
+ registerConsolidationObserver(observer: (observation: ConsolidationObservation) => Promise<void> | void): () => void;
817
939
  runSemanticConsolidationNow(options?: {
818
940
  dryRun?: boolean;
819
941
  thresholdOverride?: number;
@@ -822,6 +944,7 @@ declare class Orchestrator {
822
944
  waitForExtractionIdle(timeoutMs?: number): Promise<boolean>;
823
945
  waitForConsolidationIdle(timeoutMs?: number): Promise<boolean>;
824
946
  getStorage(namespace?: string): Promise<StorageManager>;
947
+ processEntitySynthesisQueue(namespace?: string, maxEntities?: number): Promise<number>;
825
948
  generateDaySummary(memories: string | MemoryFile[]): Promise<DaySummaryResult | null>;
826
949
  /**
827
950
  * Auto-gather today's facts and hourly summaries from storage, then generate a day summary.
@@ -947,12 +1070,83 @@ declare class Orchestrator {
947
1070
  private getRecallBudgetChars;
948
1071
  private assembleRecallSections;
949
1072
  private recallInternal;
950
- processTurn(role: "user" | "assistant", content: string, sessionKey?: string): Promise<void>;
1073
+ processTurn(role: "user" | "assistant", content: string, sessionKey?: string, options?: {
1074
+ bufferKey?: string;
1075
+ logicalSessionKey?: string;
1076
+ providerThreadId?: string | null;
1077
+ turnFingerprint?: string;
1078
+ persistProcessedFingerprint?: boolean;
1079
+ }): Promise<void>;
1080
+ flushSession(sessionKey: string, options: {
1081
+ reason: string;
1082
+ abortSignal?: AbortSignal;
1083
+ bufferKey?: string;
1084
+ }): Promise<void>;
951
1085
  ingestReplayBatch(turns: ReplayTurn[], options?: {
952
1086
  deadlineMs?: number;
953
1087
  }): Promise<void>;
954
- observeSessionHeartbeat(sessionKey: string): Promise<void>;
1088
+ /**
1089
+ * Return the namespace that `ingestBulkImportBatch` writes into (#460).
1090
+ *
1091
+ * Exposed so host CLIs can snapshot the same storage root that extraction
1092
+ * actually writes to, avoiding the "CLI counts files at namespace A while
1093
+ * writes land in namespace B" footgun that a naïve
1094
+ * `config.defaultNamespace` snapshot could hit when a namespace policy
1095
+ * named `"default"` also exists.
1096
+ *
1097
+ * Today bulk-import is pinned to `config.defaultNamespace`; future
1098
+ * per-invocation namespace routing would thread an explicit target here
1099
+ * and through `ingestBulkImportBatch`.
1100
+ */
1101
+ bulkImportWriteNamespace(): string;
1102
+ /**
1103
+ * Ingest a batch of bulk-import turns (#460). Like ingestReplayBatch, this
1104
+ * normalizes user/assistant turns into the extraction buffer and awaits
1105
+ * settlement, but it intentionally bypasses the captureMode="explicit"
1106
+ * gate because bulk-import is itself an explicit user action — the user
1107
+ * ran `bulk-import --source <name> --file ...` and would be surprised to
1108
+ * see the command silently no-op when capture is otherwise restricted.
1109
+ *
1110
+ * Turns with role="other" are skipped (not supported by the extraction
1111
+ * pipeline).
1112
+ *
1113
+ * Two design decisions worth calling out:
1114
+ *
1115
+ * - **sessionKey is truthy and per-batch-unique.**
1116
+ * `ThreadingManager.shouldStartNewThread` only applies the session-key
1117
+ * boundary check when `turn.sessionKey` is truthy (threading.ts:82);
1118
+ * with an empty string, imported turns could attach to the current
1119
+ * live thread or merge across unrelated import batches. A unique
1120
+ * `bulk-import:batch:<timestamp>-<rand>` key forces a fresh thread per
1121
+ * batch without matching common prefix/map rules in
1122
+ * `principalFromSessionKeyRules`. (Catch-all regex rules could still
1123
+ * remap the principal, but that only affects metadata provenance —
1124
+ * see the next point for why write routing is unaffected.)
1125
+ *
1126
+ * - **writeNamespaceOverride pins the storage target.**
1127
+ * We pass `writeNamespaceOverride: this.bulkImportWriteNamespace()` to
1128
+ * `queueBufferedExtraction`, which tells `runExtraction` to skip
1129
+ * `defaultNamespaceForPrincipal` and write directly into the
1130
+ * orchestrator's declared bulk-import write namespace. This keeps
1131
+ * writes deterministic even when namespace policies named `"default"`
1132
+ * exist alongside a different `config.defaultNamespace`, and also
1133
+ * guards against regex-catch-all principal rules steering bulk-import
1134
+ * into an unexpected tenant.
1135
+ *
1136
+ * Per-invocation namespace routing (letting callers target a namespace
1137
+ * other than `bulkImportWriteNamespace()`) is a separate feature tracked
1138
+ * as a follow-up — the hook is the `writeNamespaceOverride` option, but
1139
+ * the CLI surface does not yet expose a `--namespace` flag.
1140
+ */
1141
+ ingestBulkImportBatch(turns: ImportTurn[], options?: {
1142
+ deadlineMs?: number;
1143
+ }): Promise<void>;
1144
+ observeSessionHeartbeat(sessionKey: string, options?: {
1145
+ bufferKey?: string;
1146
+ }): Promise<void>;
955
1147
  private queueBufferedExtraction;
1148
+ private normalizeExtractionFingerprintTurns;
1149
+ private buildExtractionFingerprint;
956
1150
  private shouldQueueExtraction;
957
1151
  /**
958
1152
  * Background serial queue processor.
@@ -960,7 +1154,26 @@ declare class Orchestrator {
960
1154
  * Called automatically when items are queued.
961
1155
  */
962
1156
  private processQueue;
1157
+ /**
1158
+ * Classify + log a failure from either the per-task catch inside
1159
+ * `processQueue()` or the outer `processQueue().catch(...)` in
1160
+ * `queueBufferedExtraction()`. Issue #549: `throwIfRecallAborted`
1161
+ * (used throughout `runExtraction`) raises an Error whose `name` is
1162
+ * `"AbortError"`. That path fires when `before_reset` aborts a
1163
+ * queued task to avoid duplicate extraction — it is intentional
1164
+ * cancellation, not a failure. Downgrading the log to debug
1165
+ * prevents spurious `error`-level lines that routinely appear
1166
+ * right next to a successful `persisted: N facts, M entities` log
1167
+ * and that confuse operators into thinking extraction is broken.
1168
+ * Genuine extraction failures (network, parse, I/O) still log at
1169
+ * `error`.
1170
+ *
1171
+ * Source differentiates the two call sites so the log message
1172
+ * names the right layer (`task` vs `processor`).
1173
+ */
1174
+ private logExtractionQueueFailure;
963
1175
  private runExtraction;
1176
+ private recordProcessedExtractionFingerprint;
964
1177
  private runTierMigrationCycle;
965
1178
  getTierMigrationStatus(): Promise<TierMigrationStatusSnapshot>;
966
1179
  runTierMigrationNow(options?: {
@@ -1055,8 +1268,59 @@ declare class Orchestrator {
1055
1268
  private emitTrace;
1056
1269
  private queueEvalShadowRecall;
1057
1270
  private publishRecallResults;
1271
+ /**
1272
+ * Apply MMR over the pre-truncation recall candidate pool and then slice
1273
+ * the result to `limit`. This is the single place in the pipeline where
1274
+ * MMR runs, and it must be called *before* callers throw away candidates
1275
+ * that would otherwise sit below the final cutoff. Running MMR post-slice
1276
+ * is a no-op in the cases we care about — diverse candidates just below
1277
+ * the cutoff are already gone and can never be promoted.
1278
+ *
1279
+ * Callers must pass the full candidate pool (post-rerank, pre-slice).
1280
+ */
1281
+ private diversifyAndLimitRecallResults;
1282
+ /**
1283
+ * Apply Maximal Marginal Relevance to a section's ordered candidate list.
1284
+ *
1285
+ * Operates per-section so one redundant cluster cannot dominate a section,
1286
+ * and so one section's MMR pass cannot starve other sections. Returns the
1287
+ * input unchanged when disabled, when there are fewer than 2 candidates, or
1288
+ * when no budget information is available.
1289
+ */
1290
+ private applyMmrToQmdResults;
1058
1291
  private buildLastRecallBudgetSummary;
1059
1292
  private collectLastRecallSources;
1293
+ /**
1294
+ * Issue #373 — nearest-neighbor lookup for the write-time semantic dedup
1295
+ * guard. Returns the top-K embedding hits against the currently indexed
1296
+ * memories, or an empty array when the embedding backend is unavailable.
1297
+ * Intentionally does NOT throw; `decideSemanticDedup` treats both "empty"
1298
+ * and "error" outcomes as fail-open (keep the candidate).
1299
+ *
1300
+ * PR #399 P1 fix: when namespaces are enabled the lookup must be scoped
1301
+ * to the SAME namespace as the fact being written. Otherwise a
1302
+ * high-similarity memory from another namespace can suppress a write in
1303
+ * the target namespace — cross-tenant data loss. Callers pass the target
1304
+ * storage so we can translate its root directory into the correct index
1305
+ * path prefix (and, for the legacy default-namespace layout at
1306
+ * `memoryDir` root, an exclusion list for `namespaces/*`).
1307
+ */
1308
+ private semanticDedupLookup;
1309
+ /**
1310
+ * Resolve the namespace-scoped filter to pass into
1311
+ * `EmbeddingFallback.search()` for semantic dedup. Returns an empty
1312
+ * object (no filter) when namespaces are disabled, preserving the
1313
+ * pre-PR #399 behavior for single-tenant installs.
1314
+ *
1315
+ * Index entries are stored as paths relative to `config.memoryDir`, so:
1316
+ * - A non-default namespace `ns` lives under `namespaces/<ns>/…` and
1317
+ * we include exactly that prefix.
1318
+ * - The default namespace may live at `memoryDir` root (legacy) or at
1319
+ * `memoryDir/namespaces/<default>/…` (migrated). When it lives at
1320
+ * root we include everything but EXCLUDE all `namespaces/…` entries
1321
+ * so facts from non-default namespaces can't cross-match.
1322
+ */
1323
+ private semanticDedupScopeFor;
1060
1324
  private searchEmbeddingFallback;
1061
1325
  /**
1062
1326
  * Long-term fallback retrieval.
@@ -1101,4 +1365,4 @@ declare class Orchestrator {
1101
1365
  private readArchivedMemoriesForNamespaces;
1102
1366
  }
1103
1367
 
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 };
1368
+ export { deriveTopicsFromExtraction as A, type BulkImportSource as B, type CompoundingPromotionReport as C, filterRecallCandidates as D, formatCompressionGuidelinesForRecall as E, graphPathRelativeToStorage as F, type GraphRecallSnapshot as G, hasIdentityRecoveryIntent as H, type IntentDebugSnapshot as I, isArtifactMemoryPath as J, lifecycleRecallScoreAdjustment as K, mergeArtifactRecallCandidates as L, mergeGraphExpandedResults as M, resolveEffectiveIdentityInjectionMode as N, Orchestrator as O, resolveEffectiveRecallMode as P, type QmdRecallSnapshot as Q, type ReplaySource as R, resolvePersistedMemoryRelativePath as S, resolveRecallModeDecision as T, resolveRecentThreadMemoryPaths as U, shouldFilterLifecycleRecallCandidate as V, summarizeGraphShadowComparison as W, type ReplayWarning as a, type ImportTurn as b, type BulkImportOptions as c, type BulkImportResult as d, type ReplayTurn as e, type BulkImportSourceAdapter as f, type BulkImportError as g, type ImportSourceRole as h, type ImportTurnValidationIssue as i, defaultWorkspaceDir as j, isImportRole as k, type GraphRecallRankedResult as l, type GraphRecallShadowComparison as m, type RecallInvocationOptions as n, type RecallModeDecision as o, parseIsoTimestamp as p, appendMemoryToGraphContext as q, blendGraphExpandedRecallScore as r, sanitizeSessionKeyForFilename as s, buildCompressionGuidelinesMarkdown as t, buildMemoryPathById as u, validateImportTurn as v, computeArtifactCandidateFetchLimit as w, computeArtifactRecallLimit as x, computeQmdHybridFetchLimit as y, dedupeEntitySynthesisEvidenceEntries as z };