@remnic/core 9.69.39 → 9.69.41

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 (774) hide show
  1. package/dist/access-admin-ops-surface.d.ts +16 -14
  2. package/dist/access-admin-ops-surface.js +75 -74
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-authorization-probe.d.ts +16 -14
  5. package/dist/access-authorization-probe.js +76 -75
  6. package/dist/access-boundary.d.ts +16 -14
  7. package/dist/access-boundary.js +75 -74
  8. package/dist/access-cli.js +173 -170
  9. package/dist/access-cli.js.map +1 -1
  10. package/dist/access-coding-context-resolution.d.ts +1 -1
  11. package/dist/access-extraction-force-flush.d.ts +16 -14
  12. package/dist/access-extraction-force-flush.js +75 -74
  13. package/dist/access-health-types.d.ts +1 -1
  14. package/dist/access-http-briefing.d.ts +16 -14
  15. package/dist/access-http-briefing.js +76 -75
  16. package/dist/access-http-lcm-compaction.d.ts +16 -14
  17. package/dist/access-http-lifecycle-flush.d.ts +16 -14
  18. package/dist/access-http-offline-stream.d.ts +16 -14
  19. package/dist/access-http-query.d.ts +2 -2
  20. package/dist/access-http-query.js +77 -76
  21. package/dist/access-http.d.ts +17 -15
  22. package/dist/access-http.js +95 -92
  23. package/dist/access-identity-continuity-surface.d.ts +13 -12
  24. package/dist/access-identity-continuity-surface.js +75 -74
  25. package/dist/access-lcm-surface.d.ts +16 -14
  26. package/dist/access-lcm-surface.js +75 -74
  27. package/dist/access-mcp-shared-context-tools.d.ts +156 -0
  28. package/dist/access-mcp-shared-context-tools.js +8 -0
  29. package/dist/access-mcp.d.ts +16 -14
  30. package/dist/access-mcp.js +86 -83
  31. package/dist/access-memory-search-fanout.d.ts +2 -2
  32. package/dist/{access-namespace-preflight-DY4z6L5X.d.ts → access-namespace-preflight-DWsMc9Dh.d.ts} +1 -1
  33. package/dist/access-namespace-preflight.d.ts +3 -3
  34. package/dist/access-namespace-preflight.js +75 -74
  35. package/dist/access-observe-transcript.d.ts +13 -12
  36. package/dist/access-observe-write-category.d.ts +1 -1
  37. package/dist/access-observe-write-category.js +4 -4
  38. package/dist/access-observe-write-surface.d.ts +16 -14
  39. package/dist/access-observe-write-surface.js +75 -74
  40. package/dist/access-offline-manifest.d.ts +37 -13
  41. package/dist/access-offline-manifest.js +15 -11
  42. package/dist/access-operations-batch.js +79 -77
  43. package/dist/access-operations.d.ts +16 -14
  44. package/dist/access-operations.js +84 -82
  45. package/dist/access-recall-concurrency.d.ts +16 -14
  46. package/dist/access-recall-concurrency.js +75 -74
  47. package/dist/access-recall-response.d.ts +16 -14
  48. package/dist/access-recall-response.js +75 -74
  49. package/dist/access-recall-surface.d.ts +16 -14
  50. package/dist/access-recall-surface.js +75 -74
  51. package/dist/access-schema.d.ts +5 -3
  52. package/dist/access-schema.js +3 -3
  53. package/dist/{access-service-MY4bsr_Q.d.ts → access-service-Cisy5YDq.d.ts} +14 -9
  54. package/dist/access-service-helpers.d.ts +16 -14
  55. package/dist/access-service.d.ts +16 -14
  56. package/dist/access-service.js +75 -74
  57. package/dist/access-surface-catalog.d.ts +16 -14
  58. package/dist/access-surface-catalog.js +77 -76
  59. package/dist/access-surface-catalog.js.map +1 -1
  60. package/dist/access-wearables-meetings-surface.d.ts +6 -5
  61. package/dist/action-confidence.d.ts +1 -1
  62. package/dist/active-memory-bridge.d.ts +1 -1
  63. package/dist/active-memory-bridge.js +3 -3
  64. package/dist/active-recall.d.ts +1 -1
  65. package/dist/active-recall.js +10 -9
  66. package/dist/active-recall.js.map +1 -1
  67. package/dist/activity/digest.d.ts +1 -1
  68. package/dist/ambient-provenance.d.ts +1 -1
  69. package/dist/artifact-search.d.ts +1 -1
  70. package/dist/{auto-sync-RP4C6ZPF.js → auto-sync-7PGUFY7U.js} +7 -7
  71. package/dist/background-generation-config.d.ts +1 -1
  72. package/dist/background-generation-config.js +3 -1
  73. package/dist/background-generation.d.ts +1 -1
  74. package/dist/behavior-learner.d.ts +1 -1
  75. package/dist/behavior-signals.d.ts +1 -1
  76. package/dist/bootstrap.d.ts +13 -12
  77. package/dist/briefing-window.d.ts +2 -2
  78. package/dist/briefing.d.ts +2 -2
  79. package/dist/briefing.js +23 -23
  80. package/dist/buffer-surprise-report.d.ts +1 -1
  81. package/dist/buffer-turn-helpers.d.ts +1 -1
  82. package/dist/buffer.d.ts +2 -2
  83. package/dist/buffer.js +7 -7
  84. package/dist/bulk-import/index.d.ts +3 -3
  85. package/dist/calibration.d.ts +3 -2
  86. package/dist/calibration.js +2 -2
  87. package/dist/capabilities.d.ts +1 -1
  88. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  89. package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-3MNURAQ3.js} +2 -2
  90. package/dist/{catalog-CW87xGx8.d.ts → catalog-wcX1QhtQ.d.ts} +1 -1
  91. package/dist/causal-behavior.d.ts +1 -1
  92. package/dist/causal-consolidation.d.ts +1 -1
  93. package/dist/causal-consolidation.js +29 -28
  94. package/dist/causal-consolidation.js.map +1 -1
  95. package/dist/causal-trajectory-graph.d.ts +1 -1
  96. package/dist/{chunk-YFTNZMGR.js → chunk-27NO2KVB.js} +31 -8
  97. package/dist/chunk-27NO2KVB.js.map +1 -0
  98. package/dist/{chunk-M6RORUO5.js → chunk-2EYZ32LH.js} +24 -2
  99. package/dist/{chunk-M6RORUO5.js.map → chunk-2EYZ32LH.js.map} +1 -1
  100. package/dist/{chunk-XH3HGI2N.js → chunk-2HQPE2NM.js} +2 -2
  101. package/dist/{chunk-3EKVN2OP.js → chunk-2ZG2LLZT.js} +2 -2
  102. package/dist/{chunk-6EHM2AV7.js → chunk-3BLHPQHT.js} +5 -5
  103. package/dist/{chunk-YKREX63Z.js → chunk-3D75XIYO.js} +5 -3
  104. package/dist/chunk-3D75XIYO.js.map +1 -0
  105. package/dist/{chunk-J272ODKJ.js → chunk-42DJ235G.js} +2 -2
  106. package/dist/{chunk-F4EHXVP7.js → chunk-46RII65S.js} +2 -2
  107. package/dist/{chunk-YUW66UAH.js → chunk-4AX5OYKC.js} +2 -2
  108. package/dist/{chunk-AECJY3GJ.js → chunk-4IGOLIWM.js} +2 -2
  109. package/dist/{chunk-2ZTDRNCS.js → chunk-54QPOE45.js} +2 -2
  110. package/dist/{chunk-O4M4BDIJ.js → chunk-563X6JJX.js} +2 -2
  111. package/dist/{chunk-IL6ODG6M.js → chunk-5EQT62HH.js} +2 -2
  112. package/dist/{chunk-JKKII6GX.js → chunk-6MQMYXSQ.js} +2 -2
  113. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  114. package/dist/{chunk-BV4ZKIZH.js → chunk-7ZLC4DTZ.js} +5 -4
  115. package/dist/{chunk-WBM2MVBK.js → chunk-A4OIJYCV.js} +2 -2
  116. package/dist/{chunk-RLJHJQUY.js → chunk-AFJHNHAM.js} +8 -8
  117. package/dist/{chunk-6YAIN5XJ.js → chunk-AIVRD66I.js} +44 -6
  118. package/dist/chunk-AIVRD66I.js.map +1 -0
  119. package/dist/{chunk-OEDW4ER7.js → chunk-AJBWVDRV.js} +2 -1
  120. package/dist/chunk-AJBWVDRV.js.map +1 -0
  121. package/dist/{chunk-4RZLTZVM.js → chunk-AKABVXFS.js} +2 -2
  122. package/dist/{chunk-M6HBPLBA.js → chunk-AUSRUOMQ.js} +2 -2
  123. package/dist/{chunk-QHT7MOUF.js → chunk-BTPCP535.js} +25 -14
  124. package/dist/chunk-BTPCP535.js.map +1 -0
  125. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  126. package/dist/{chunk-Q7CLGFA7.js → chunk-C3G6MW4W.js} +3 -3
  127. package/dist/{chunk-O76F5QPP.js → chunk-D6PY63OM.js} +2 -2
  128. package/dist/{chunk-BD7JTBYP.js → chunk-D7MAYFQP.js} +2 -2
  129. package/dist/{chunk-LMLGBG6H.js → chunk-DBB5JPSL.js} +2 -2
  130. package/dist/{chunk-TSP5WH72.js → chunk-DIXZQTGY.js} +2 -2
  131. package/dist/{chunk-P4ZAEYKG.js → chunk-DM5CU5J7.js} +7 -4
  132. package/dist/chunk-DM5CU5J7.js.map +1 -0
  133. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  134. package/dist/{chunk-UHRZ324M.js → chunk-E3I3NDUP.js} +4 -4
  135. package/dist/{chunk-AENM6GKU.js → chunk-E4LMQTST.js} +2 -2
  136. package/dist/{chunk-YDVAM7S4.js → chunk-EH3HNCAM.js} +13 -8
  137. package/dist/chunk-EH3HNCAM.js.map +1 -0
  138. package/dist/{chunk-MUTVRKKY.js → chunk-EMSYMYXO.js} +14 -14
  139. package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
  140. package/dist/{chunk-FXHOZGSE.js → chunk-F5H6YG5P.js} +2 -2
  141. package/dist/{chunk-TRLOFIQC.js → chunk-FGFC2EFR.js} +14 -13
  142. package/dist/chunk-FGFC2EFR.js.map +1 -0
  143. package/dist/{chunk-TNSCIPBQ.js → chunk-G6NQ3L4T.js} +2 -2
  144. package/dist/{chunk-ZMWSYUUL.js → chunk-GCBIXUPT.js} +2 -2
  145. package/dist/{chunk-EYKIDK33.js → chunk-GMH5QPUU.js} +22 -22
  146. package/dist/chunk-GMH5QPUU.js.map +1 -0
  147. package/dist/{chunk-4BCHFSC7.js → chunk-GWNSKQDA.js} +3 -3
  148. package/dist/{chunk-JDX2OA4R.js → chunk-HNHIHXSD.js} +2 -2
  149. package/dist/{chunk-GG5FHZJJ.js → chunk-I33QYUAF.js} +6 -6
  150. package/dist/{chunk-LPYYY4AP.js → chunk-I46BYY7U.js} +653 -328
  151. package/dist/chunk-I46BYY7U.js.map +1 -0
  152. package/dist/{chunk-CZTPU65V.js → chunk-ICN37XHG.js} +74 -27
  153. package/dist/chunk-ICN37XHG.js.map +1 -0
  154. package/dist/chunk-IFBSZGW3.js +42 -0
  155. package/dist/chunk-IFBSZGW3.js.map +1 -0
  156. package/dist/{chunk-AAZEKXUP.js → chunk-IYIPXAIJ.js} +2 -2
  157. package/dist/{chunk-ACY4ZPF7.js → chunk-J2MGTGKC.js} +10 -5
  158. package/dist/chunk-J2MGTGKC.js.map +1 -0
  159. package/dist/chunk-JATHBCAV.js +94 -0
  160. package/dist/chunk-JATHBCAV.js.map +1 -0
  161. package/dist/{chunk-5U7K4W6K.js → chunk-JDOBQPJY.js} +3 -3
  162. package/dist/{chunk-TG3FAM2S.js → chunk-JL4TQYM5.js} +48 -1
  163. package/dist/{chunk-TG3FAM2S.js.map → chunk-JL4TQYM5.js.map} +1 -1
  164. package/dist/{chunk-UZZ7SQT3.js → chunk-JMWUPUE6.js} +2 -2
  165. package/dist/{chunk-ENBPQEVU.js → chunk-JSD7Q7LD.js} +2 -2
  166. package/dist/{chunk-QTQ6XKGT.js → chunk-K5D2XVNN.js} +4 -4
  167. package/dist/chunk-K5D2XVNN.js.map +1 -0
  168. package/dist/{chunk-3CBI2ZSA.js → chunk-KG2OOAFF.js} +20 -12
  169. package/dist/chunk-KG2OOAFF.js.map +1 -0
  170. package/dist/{chunk-Q432REND.js → chunk-KJLLPG26.js} +2 -2
  171. package/dist/{chunk-JTQR6L2N.js → chunk-KLUC2GSG.js} +6 -6
  172. package/dist/{chunk-OB3XMWX5.js → chunk-KVO2BTA4.js} +2 -2
  173. package/dist/{chunk-PCOVEDPK.js → chunk-KZJM7R4F.js} +3 -3
  174. package/dist/{chunk-X4TD4O2F.js → chunk-LE2KZ72G.js} +3 -3
  175. package/dist/{chunk-HIP6DKJJ.js → chunk-LQVXSRAJ.js} +2 -2
  176. package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
  177. package/dist/{chunk-FWWWUPOE.js → chunk-MCMS4VUK.js} +25 -15
  178. package/dist/chunk-MCMS4VUK.js.map +1 -0
  179. package/dist/{chunk-5SPCMAUC.js → chunk-N6XTC56E.js} +13 -81
  180. package/dist/chunk-N6XTC56E.js.map +1 -0
  181. package/dist/{chunk-VBSNUH4J.js → chunk-ND7MAIJC.js} +2 -2
  182. package/dist/{chunk-TNZNSMVJ.js → chunk-NYWCFC3K.js} +301 -348
  183. package/dist/chunk-NYWCFC3K.js.map +1 -0
  184. package/dist/{chunk-54NX5EG4.js → chunk-P66QH6R6.js} +2 -2
  185. package/dist/{chunk-62D2PAAM.js → chunk-PAAJWQH5.js} +4 -4
  186. package/dist/{chunk-TA4C3XB7.js → chunk-PFKIOYJH.js} +2 -2
  187. package/dist/{chunk-WIWLX65T.js → chunk-PGGPRF6J.js} +2 -2
  188. package/dist/{chunk-V6EGNVUT.js → chunk-PIWFNPQT.js} +4 -4
  189. package/dist/{chunk-BLDBT6HZ.js → chunk-PJRKLB4Z.js} +18 -2
  190. package/dist/chunk-PJRKLB4Z.js.map +1 -0
  191. package/dist/{chunk-4JVQRFZD.js → chunk-PLJ2MQFT.js} +11 -11
  192. package/dist/{chunk-4RX5O34R.js → chunk-PQ42DJNG.js} +2 -2
  193. package/dist/{chunk-37CAEC7E.js → chunk-PWPIERBM.js} +4 -4
  194. package/dist/{chunk-ZEGL7YCC.js → chunk-Q62GA5U2.js} +2 -2
  195. package/dist/{chunk-CC37E3QM.js → chunk-QKCXRS5A.js} +16 -1
  196. package/dist/chunk-QKCXRS5A.js.map +1 -0
  197. package/dist/{chunk-WKDFJXW5.js → chunk-QM2SPLKQ.js} +1 -1
  198. package/dist/chunk-QM2SPLKQ.js.map +1 -0
  199. package/dist/{chunk-GAS7KYC7.js → chunk-RQQO3ORQ.js} +2 -2
  200. package/dist/{chunk-UZEHHXYC.js → chunk-S4MJTIPG.js} +85 -81
  201. package/dist/chunk-S4MJTIPG.js.map +1 -0
  202. package/dist/chunk-SK7D34OL.js +68 -0
  203. package/dist/chunk-SK7D34OL.js.map +1 -0
  204. package/dist/{chunk-LQNRVPTV.js → chunk-TRTLWUDD.js} +164 -130
  205. package/dist/chunk-TRTLWUDD.js.map +1 -0
  206. package/dist/{chunk-JXN77SGO.js → chunk-U2VDCFXW.js} +1 -1
  207. package/dist/chunk-U2VDCFXW.js.map +1 -0
  208. package/dist/{chunk-CWTCMZGE.js → chunk-UHSOPTNB.js} +132 -6
  209. package/dist/chunk-UHSOPTNB.js.map +1 -0
  210. package/dist/{chunk-3NPNBVFR.js → chunk-UZGHKD3T.js} +2 -2
  211. package/dist/{chunk-IQEJIOEU.js → chunk-V2EXYQEQ.js} +20 -12
  212. package/dist/chunk-V2EXYQEQ.js.map +1 -0
  213. package/dist/{chunk-OPBFP4TF.js → chunk-V2TOGJPM.js} +46 -13
  214. package/dist/chunk-V2TOGJPM.js.map +1 -0
  215. package/dist/{chunk-VJIE4D2I.js → chunk-V62YYBBY.js} +4 -4
  216. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  217. package/dist/{chunk-6H2G7RFT.js → chunk-VNQRRUNS.js} +11 -10
  218. package/dist/chunk-VNQRRUNS.js.map +1 -0
  219. package/dist/{chunk-6AGWBKQU.js → chunk-VSN2DMQK.js} +2 -2
  220. package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
  221. package/dist/{chunk-GI4ZBWPQ.js → chunk-W7UV2ZCA.js} +3 -3
  222. package/dist/{chunk-GMIQV6DD.js → chunk-WBQ4ONQJ.js} +2 -2
  223. package/dist/{chunk-FNHLI2RE.js → chunk-WFMQN7JE.js} +3 -3
  224. package/dist/{chunk-MVAQ2WM3.js → chunk-WGZHSQDV.js} +9 -5
  225. package/dist/chunk-WGZHSQDV.js.map +1 -0
  226. package/dist/{chunk-IYKZJVL5.js → chunk-WN2OXGGH.js} +1 -1
  227. package/dist/chunk-WN2OXGGH.js.map +1 -0
  228. package/dist/{chunk-ZBW7A667.js → chunk-WPGA4RYI.js} +2 -2
  229. package/dist/{chunk-YQNNHLCG.js → chunk-WPGR3RW4.js} +2 -2
  230. package/dist/{chunk-SV4Z2S67.js → chunk-WUUGE7QC.js} +54 -21
  231. package/dist/chunk-WUUGE7QC.js.map +1 -0
  232. package/dist/{chunk-NXGSONWM.js → chunk-WZIO3TW6.js} +2 -2
  233. package/dist/{chunk-ZZUVBZL2.js → chunk-X2QPKLPL.js} +2 -2
  234. package/dist/{chunk-5HYUUFMQ.js → chunk-XCPNH2MG.js} +259 -10
  235. package/dist/chunk-XCPNH2MG.js.map +1 -0
  236. package/dist/{chunk-VSL63CFJ.js → chunk-XRS65T4O.js} +9 -9
  237. package/dist/{chunk-5N4MZLEH.js → chunk-YFXAWGMR.js} +2 -2
  238. package/dist/{chunk-KQW3YGEN.js → chunk-YR5QT4SR.js} +32 -9
  239. package/dist/chunk-YR5QT4SR.js.map +1 -0
  240. package/dist/{chunk-CARRTDKC.js → chunk-Z22M4JCY.js} +4 -3
  241. package/dist/chunk-Z22M4JCY.js.map +1 -0
  242. package/dist/{chunk-D545Z7UH.js → chunk-Z535ADTC.js} +3 -3
  243. package/dist/{chunk-B36GUU6T.js → chunk-Z7NBT6AK.js} +38 -5
  244. package/dist/chunk-Z7NBT6AK.js.map +1 -0
  245. package/dist/{chunk-5YCNDC3C.js → chunk-ZX6NNFSY.js} +3 -3
  246. package/dist/{chunk-3N3PBBEH.js → chunk-ZYSOT6HD.js} +2 -2
  247. package/dist/{chunk-MCRVQ5YQ.js → chunk-ZZEIL3MI.js} +2 -2
  248. package/dist/{cli-DGq0MNpO.d.ts → cli-CUlMlS2N.d.ts} +5 -5
  249. package/dist/cli.d.ts +18 -16
  250. package/dist/cli.js +129 -126
  251. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  252. package/dist/coding/export-okf-codegraph.js +22 -22
  253. package/dist/coding/pre-action-gate.d.ts +1 -1
  254. package/dist/compounding/engine.d.ts +2 -2
  255. package/dist/compounding/engine.js +25 -25
  256. package/dist/compounding/preference-consolidator.d.ts +1 -1
  257. package/dist/compression-optimizer.d.ts +1 -1
  258. package/dist/config.d.ts +1 -1
  259. package/dist/config.js +10 -9
  260. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  261. package/dist/connectors/codex-materialize-runner.js +25 -25
  262. package/dist/connectors/codex-materialize.d.ts +1 -1
  263. package/dist/connectors/codex-materialize.js +2 -2
  264. package/dist/connectors/index.d.ts +1 -1
  265. package/dist/connectors/index.js +25 -25
  266. package/dist/consolidation-provenance-check.d.ts +2 -2
  267. package/dist/consolidation-undo.d.ts +2 -2
  268. package/dist/contradiction/index.d.ts +6 -5
  269. package/dist/contradiction/index.js +4 -4
  270. package/dist/{contradiction-scan-BSGKZHYJ.js → contradiction-scan-GVD4JJ7B.js} +4 -4
  271. package/dist/converge-config.d.ts +1 -1
  272. package/dist/convergence-refresh.d.ts +2 -2
  273. package/dist/convergence-refresh.js +26 -26
  274. package/dist/conversation-index/backend.d.ts +1 -1
  275. package/dist/conversation-index/chunker.d.ts +1 -1
  276. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  277. package/dist/conversation-index/indexer.d.ts +1 -1
  278. package/dist/conversation-index/search.d.ts +1 -1
  279. package/dist/corpus-watermark.d.ts +1 -1
  280. package/dist/corpus-watermark.js +25 -25
  281. package/dist/cross-lingual-recall.d.ts +1 -1
  282. package/dist/dashboard-runtime.js +2 -2
  283. package/dist/day-summary.d.ts +1 -1
  284. package/dist/deep-recall-config.d.ts +12 -1
  285. package/dist/deep-recall-config.js +5 -3
  286. package/dist/deep-recall-http-glue.d.ts +19 -15
  287. package/dist/deep-recall-http-glue.js +7 -4
  288. package/dist/deep-recall-mcp-tools.d.ts +16 -14
  289. package/dist/deep-recall-policy-llm.d.ts +14 -3
  290. package/dist/deep-recall-policy-llm.js +3 -3
  291. package/dist/deep-recall-seeds.d.ts +4 -1
  292. package/dist/deep-recall-seeds.js +1 -1
  293. package/dist/deep-recall.d.ts +12 -1
  294. package/dist/deep-recall.js +3 -2
  295. package/dist/delinearize.d.ts +1 -1
  296. package/dist/dependency-propagation-config.d.ts +1 -1
  297. package/dist/{dependency-propagation-delivery-Cq1ekOwV.d.ts → dependency-propagation-delivery-BDDjImQn.d.ts} +1 -1
  298. package/dist/direct-answer-wiring.d.ts +1 -1
  299. package/dist/direct-answer.d.ts +1 -1
  300. package/dist/embedding-fallback.d.ts +1 -1
  301. package/dist/enrichment/index.d.ts +1 -1
  302. package/dist/entity-origin-fields.d.ts +1 -1
  303. package/dist/entity-retrieval.d.ts +2 -2
  304. package/dist/entity-retrieval.js +24 -24
  305. package/dist/entity-schema.d.ts +1 -1
  306. package/dist/episodic-context.d.ts +1 -1
  307. package/dist/eval-trajectory-contracts.d.ts +1 -1
  308. package/dist/eval-trajectory-store.d.ts +1 -1
  309. package/dist/eval-trajectory.d.ts +1 -1
  310. package/dist/explicit-capture.d.ts +13 -12
  311. package/dist/explicit-capture.js +3 -3
  312. package/dist/external-wiki-access.d.ts +16 -14
  313. package/dist/external-wiki-access.js +76 -75
  314. package/dist/external-wiki-collection-registration.d.ts +1 -1
  315. package/dist/external-wiki-collection.d.ts +1 -1
  316. package/dist/external-wiki-mcp-tools.d.ts +16 -14
  317. package/dist/extraction-error-classification.d.ts +14 -3
  318. package/dist/extraction-error-classification.js +5 -3
  319. package/dist/extraction-faithfulness.d.ts +4 -3
  320. package/dist/extraction-faithfulness.js +3 -3
  321. package/dist/extraction-judge-telemetry.d.ts +4 -3
  322. package/dist/extraction-judge-training.d.ts +4 -3
  323. package/dist/extraction-judge.d.ts +4 -3
  324. package/dist/extraction-judge.js +3 -3
  325. package/dist/extraction-liveness.d.ts +1 -1
  326. package/dist/extraction-normalization.d.ts +1 -1
  327. package/dist/extraction-prompt.d.ts +1 -1
  328. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  329. package/dist/extraction-source-grounding.d.ts +1 -1
  330. package/dist/extraction-span-config.d.ts +1 -1
  331. package/dist/extraction-span-materialize.d.ts +1 -1
  332. package/dist/extraction.d.ts +4 -4
  333. package/dist/extraction.js +40 -38
  334. package/dist/fallback-llm-codex-subscription.d.ts +65 -10
  335. package/dist/fallback-llm-codex-subscription.js +19 -1
  336. package/dist/fallback-llm.d.ts +25 -28
  337. package/dist/fallback-llm.js +4 -3
  338. package/dist/{first-start-migration-ZWMV5CX4.js → first-start-migration-L3UFX5CU.js} +4 -4
  339. package/dist/{generic-recall-paths-BcySh_f9.d.ts → generic-recall-paths-CpDzNO_I.d.ts} +1 -1
  340. package/dist/graph-append-error.d.ts +1 -1
  341. package/dist/graph-dashboard-diff.d.ts +1 -1
  342. package/dist/graph-dashboard-key.d.ts +1 -1
  343. package/dist/graph-dashboard-parser.d.ts +1 -1
  344. package/dist/graph-edge-reinforcement.d.ts +1 -1
  345. package/dist/graph-jsonl.d.ts +1 -1
  346. package/dist/graph-path-reconstruction.d.ts +1 -1
  347. package/dist/graph-path-scoring.d.ts +1 -1
  348. package/dist/graph-snapshot.d.ts +1 -1
  349. package/dist/graph.d.ts +1 -1
  350. package/dist/harmonic-retrieval.js +3 -3
  351. package/dist/importance.d.ts +1 -1
  352. package/dist/importers/index.d.ts +1 -1
  353. package/dist/importers/test-utils.d.ts +1 -1
  354. package/dist/in-flight-reads.d.ts +1 -1
  355. package/dist/{index-DWOb4wz9.d.ts → index-CtmmCJoo.d.ts} +3 -3
  356. package/dist/index.d.ts +80 -40
  357. package/dist/index.js +316 -296
  358. package/dist/intent.d.ts +1 -1
  359. package/dist/lcm/engine.d.ts +1 -1
  360. package/dist/lcm/engine.js +3 -3
  361. package/dist/lcm/index.d.ts +1 -1
  362. package/dist/lcm/index.js +11 -11
  363. package/dist/lcm/tools.d.ts +1 -1
  364. package/dist/lifecycle.d.ts +1 -1
  365. package/dist/live-connectors-runner.d.ts +1 -1
  366. package/dist/local-llm-DpXIvm6F.d.ts +247 -0
  367. package/dist/local-llm-config.d.ts +4 -1
  368. package/dist/local-llm-config.js +4 -2
  369. package/dist/local-llm-helpers.d.ts +18 -69
  370. package/dist/local-llm-helpers.js +1 -1
  371. package/dist/local-llm.d.ts +3 -170
  372. package/dist/local-llm.js +2 -2
  373. package/dist/local-model-endpoint.d.ts +1 -1
  374. package/dist/location/index.d.ts +3 -3
  375. package/dist/location/index.js +25 -25
  376. package/dist/maintenance/memory-governance.d.ts +1 -1
  377. package/dist/maintenance/memory-governance.js +24 -24
  378. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  379. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +23 -23
  380. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  381. package/dist/maintenance/rebuild-memory-projection.js +25 -25
  382. package/dist/{maintenance-CW9wCzMP.d.ts → maintenance-CNgoLsoM.d.ts} +13 -6
  383. package/dist/mcp-memory-inspector-app.d.ts +16 -14
  384. package/dist/memory-action-policy.d.ts +1 -1
  385. package/dist/memory-cache.d.ts +1 -1
  386. package/dist/memory-controller.d.ts +1 -1
  387. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  388. package/dist/memory-projection-store.d.ts +1 -1
  389. package/dist/memory-provenance.d.ts +1 -1
  390. package/dist/memory-snapshot.d.ts +1 -1
  391. package/dist/memory-subject-cli.d.ts +16 -14
  392. package/dist/memory-subject.d.ts +16 -14
  393. package/dist/memory-worth-outcomes.d.ts +2 -2
  394. package/dist/models-json.d.ts +1 -1
  395. package/dist/namespaces/migrate.d.ts +3 -3
  396. package/dist/namespaces/migrate.js +24 -24
  397. package/dist/namespaces/principal.d.ts +1 -1
  398. package/dist/namespaces/search.d.ts +12 -1
  399. package/dist/namespaces/search.js +9 -9
  400. package/dist/namespaces/storage.d.ts +3 -3
  401. package/dist/namespaces/storage.js +23 -23
  402. package/dist/native-knowledge.d.ts +1 -1
  403. package/dist/offline-sync-impression-drain.d.ts +1 -1
  404. package/dist/operator-doctor-corpus.d.ts +1 -1
  405. package/dist/operator-doctor-corpus.js +26 -26
  406. package/dist/operator-doctor-replica.d.ts +1 -1
  407. package/dist/operator-toolkit.d.ts +3 -3
  408. package/dist/operator-toolkit.js +45 -44
  409. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  410. package/dist/orchestration/maintenance.d.ts +4 -4
  411. package/dist/orchestration/maintenance.js +36 -36
  412. package/dist/{orchestrator-ComHLm49.d.ts → orchestrator-DT7ybIFz.d.ts} +32 -11
  413. package/dist/orchestrator.d.ts +13 -12
  414. package/dist/orchestrator.js +176 -171
  415. package/dist/patterns-cli.d.ts +1 -1
  416. package/dist/{pipeline-CiYcqqhl.d.ts → pipeline-CgBEmHcz.d.ts} +1 -1
  417. package/dist/policy-runtime.d.ts +1 -1
  418. package/dist/proactive-contention.d.ts +2 -2
  419. package/dist/provenance.d.ts +1 -1
  420. package/dist/{public-http-CuK4_Cb1.d.ts → public-http-C8P8fyiO.d.ts} +1 -1
  421. package/dist/{qmd-qXD4vatU.d.ts → qmd-BkY8KpCh.d.ts} +2 -2
  422. package/dist/qmd-preflight.d.ts +2 -2
  423. package/dist/qmd-recall-cache.d.ts +1 -1
  424. package/dist/qmd.d.ts +2 -2
  425. package/dist/qmd.js +2 -2
  426. package/dist/recall-concurrency-config.d.ts +1 -1
  427. package/dist/recall-disclosure-escalation.d.ts +1 -1
  428. package/dist/recall-explain-renderer.d.ts +1 -1
  429. package/dist/recall-explain-renderer.js +3 -3
  430. package/dist/recall-memory-map.d.ts +1 -1
  431. package/dist/recall-navigate-access.d.ts +1 -1
  432. package/dist/recall-navigate-access.js +2 -2
  433. package/dist/recall-navigate-disclosure.d.ts +1 -1
  434. package/dist/recall-navigate-disclosure.js +1 -1
  435. package/dist/recall-navigate.d.ts +1 -1
  436. package/dist/recall-navigate.js +2 -2
  437. package/dist/recall-planner-llm.d.ts +3 -2
  438. package/dist/recall-planner-llm.js +4 -3
  439. package/dist/recall-planner-llm.js.map +1 -1
  440. package/dist/recall-state-view-admission.d.ts +13 -3
  441. package/dist/recall-state-view-admission.js +9 -9
  442. package/dist/recall-state-view-anchors.d.ts +1 -1
  443. package/dist/recall-state-view-anchors.js +2 -2
  444. package/dist/recall-state-view-inject.js +2 -2
  445. package/dist/recall-state-view-render.js +2 -2
  446. package/dist/recall-state-view-widen.js +2 -2
  447. package/dist/recall-state-view-wire.js +3 -3
  448. package/dist/recall-state-view.d.ts +10 -1
  449. package/dist/recall-state-view.js +5 -3
  450. package/dist/recall-state.d.ts +1 -1
  451. package/dist/recall-tag-filter.d.ts +1 -1
  452. package/dist/recall-timings.d.ts +1 -1
  453. package/dist/recall-xray-cli.d.ts +1 -1
  454. package/dist/recall-xray-cli.js +4 -4
  455. package/dist/recall-xray-renderer.d.ts +1 -1
  456. package/dist/recall-xray-renderer.js +3 -3
  457. package/dist/recall-xray.d.ts +1 -1
  458. package/dist/recall-xray.js +2 -2
  459. package/dist/reconcile/cursor.d.ts +1 -1
  460. package/dist/reconcile/cursor.js +2 -2
  461. package/dist/reconcile/manifest.d.ts +1 -1
  462. package/dist/reconcile/manifest.js +4 -4
  463. package/dist/reconcile/plan.d.ts +1 -1
  464. package/dist/reconcile/plan.js +2 -2
  465. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  466. package/dist/replay/normalizers/claude.d.ts +1 -1
  467. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  468. package/dist/replay/normalizers/shared.d.ts +1 -1
  469. package/dist/replay/runner.d.ts +1 -1
  470. package/dist/replay/types.d.ts +1 -1
  471. package/dist/replica-divergence.d.ts +1 -1
  472. package/dist/replica-peers-config.d.ts +1 -1
  473. package/dist/{resolution-4GG3QZRJ.js → resolution-LXFQQ4AE.js} +5 -5
  474. package/dist/resolution-LXFQQ4AE.js.map +1 -0
  475. package/dist/resolve-auth-token.d.ts +1 -1
  476. package/dist/resume-bundles.js +12 -11
  477. package/dist/retrieval-agents.d.ts +2 -2
  478. package/dist/retrieval-tiers.d.ts +1 -1
  479. package/dist/routing/engine.d.ts +1 -1
  480. package/dist/routing/store.d.ts +1 -1
  481. package/dist/salvage-envelope.d.ts +1 -1
  482. package/dist/{scope-profiles-BT9rqC3w.d.ts → scope-profiles-BBPjZ9jb.d.ts} +1 -1
  483. package/dist/search/embed-helper.d.ts +1 -1
  484. package/dist/search/factory.d.ts +1 -1
  485. package/dist/search/factory.js +8 -8
  486. package/dist/search/index.d.ts +1 -1
  487. package/dist/search/index.js +12 -12
  488. package/dist/search/lancedb-backend.d.ts +1 -1
  489. package/dist/search/lancedb-backend.js +2 -2
  490. package/dist/search/meilisearch-backend.d.ts +1 -1
  491. package/dist/search/meilisearch-backend.js +2 -2
  492. package/dist/search/noop-backend.d.ts +1 -1
  493. package/dist/search/orama-backend.d.ts +1 -1
  494. package/dist/search/orama-backend.js +2 -2
  495. package/dist/search/port.d.ts +2 -2
  496. package/dist/search/port.js +1 -1
  497. package/dist/search/remote-backend.d.ts +1 -1
  498. package/dist/search/remote-backend.js +2 -2
  499. package/dist/{semantic-consolidation-CmZi7thY.d.ts → semantic-consolidation-BPFFVO84.d.ts} +1 -1
  500. package/dist/semantic-consolidation.d.ts +2 -2
  501. package/dist/semantic-consolidation.js +26 -26
  502. package/dist/semantic-rule-promotion.js +23 -23
  503. package/dist/semantic-rule-verifier.d.ts +1 -1
  504. package/dist/semantic-rule-verifier.js +23 -23
  505. package/dist/{service-CLkA7AQB.d.ts → service-jKcr6Jvr.d.ts} +2 -2
  506. package/dist/session-observer-bands.d.ts +1 -1
  507. package/dist/session-observer-state.d.ts +1 -1
  508. package/dist/shared-context/manager.d.ts +1 -1
  509. package/dist/shared-context/manager.js +2 -2
  510. package/dist/shared-context/write-output-controls.d.ts +34 -0
  511. package/dist/shared-context/write-output-controls.js +10 -0
  512. package/dist/shared-context/write-output-controls.js.map +1 -0
  513. package/dist/signal.d.ts +1 -1
  514. package/dist/source-agent-qualifier.d.ts +1 -1
  515. package/dist/source-agent-qualifier.js +31 -31
  516. package/dist/source-attribution.d.ts +23 -1
  517. package/dist/source-attribution.js +13 -3
  518. package/dist/standup/build.js +23 -23
  519. package/dist/{storage-wvX01lht.d.ts → storage-C-0Ah5OY.d.ts} +2 -1
  520. package/dist/storage.d.ts +2 -2
  521. package/dist/storage.js +22 -22
  522. package/dist/subject-config.d.ts +1 -1
  523. package/dist/summarizer.d.ts +1 -1
  524. package/dist/summarizer.js +6 -6
  525. package/dist/summary-snapshot.d.ts +1 -1
  526. package/dist/support-passport/index.d.ts +18 -17
  527. package/dist/support-passport/index.js +78 -77
  528. package/dist/task-llm-config.d.ts +16 -0
  529. package/dist/task-llm-config.js +12 -0
  530. package/dist/task-llm-config.js.map +1 -0
  531. package/dist/temporal-supersession.d.ts +2 -2
  532. package/dist/temporal-timeline-recall.d.ts +1 -1
  533. package/dist/temporal-validity.d.ts +1 -1
  534. package/dist/threading.d.ts +1 -1
  535. package/dist/tier-migration.d.ts +2 -2
  536. package/dist/tier-routing.d.ts +1 -1
  537. package/dist/tier-routing.js +3 -3
  538. package/dist/{tier-stats-LUSUUNU6.js → tier-stats-VK5PCO2L.js} +4 -4
  539. package/dist/topics.d.ts +1 -1
  540. package/dist/transcript.d.ts +1 -1
  541. package/dist/transfer/backup.js +2 -2
  542. package/dist/transfer/capsule-export.js +2 -2
  543. package/dist/transfer/capsule-import.js +3 -3
  544. package/dist/transfer/export-okf.d.ts +1 -1
  545. package/dist/transfer/export-okf.js +23 -23
  546. package/dist/trust-score-stage.d.ts +1 -1
  547. package/dist/trust-score.d.ts +1 -1
  548. package/dist/{types-Cyr32ABj.d.ts → types-cK5LydjL.d.ts} +6 -1
  549. package/dist/types.d.ts +1 -1
  550. package/dist/types.js +1 -1
  551. package/dist/utility-runtime.d.ts +1 -1
  552. package/dist/verified-recall.js +23 -23
  553. package/dist/who-knows-cli.d.ts +16 -14
  554. package/dist/who-knows-cli.js +24 -24
  555. package/dist/who-knows.d.ts +16 -14
  556. package/dist/who-knows.js +23 -23
  557. package/dist/write-envelope.d.ts +1 -1
  558. package/package.json +12 -2
  559. package/src/access-category-alias.test.ts +93 -0
  560. package/src/access-http.ts +1 -1
  561. package/src/access-mcp-shared-context-tools.ts +103 -0
  562. package/src/access-mcp.ts +4 -74
  563. package/src/access-offline-manifest.ts +52 -2
  564. package/src/access-operations-batch.ts +45 -2
  565. package/src/access-schema.ts +9 -4
  566. package/src/access-service.ts +14 -7
  567. package/src/activity/config.test.ts +61 -0
  568. package/src/activity/config.ts +40 -1
  569. package/src/activity/timeline/analysis-provider.ts +8 -2
  570. package/src/activity/timeline/analysis-run.test.ts +82 -0
  571. package/src/activity/timeline/publish-cli.test.ts +30 -0
  572. package/src/activity/timeline/publish-cli.ts +7 -0
  573. package/src/activity/timeline/query.ts +8 -1
  574. package/src/activity/timeline/regenerate.test.ts +130 -2
  575. package/src/activity/timeline/regenerate.ts +14 -6
  576. package/src/activity/vault-frontmatter.test.ts +99 -1
  577. package/src/activity/vault-frontmatter.ts +131 -0
  578. package/src/activity/vault-publish.ts +6 -0
  579. package/src/activity/vault-publisher.test.ts +172 -0
  580. package/src/activity/vault-publisher.ts +69 -15
  581. package/src/activity/vault-region.test.ts +7 -2
  582. package/src/activity/vault-region.ts +7 -3
  583. package/src/background-generation-config.ts +32 -6
  584. package/src/background-generation.test.ts +10 -1
  585. package/src/cli/deep-recall-commands.ts +22 -10
  586. package/src/cli/timeline-publish-commands.ts +9 -0
  587. package/src/config.test.ts +170 -43
  588. package/src/config.ts +22 -5
  589. package/src/dedup/merge.test.ts +283 -0
  590. package/src/deep-recall-boundary.test.ts +66 -0
  591. package/src/deep-recall-cli.test.ts +82 -0
  592. package/src/deep-recall-config.test.ts +56 -0
  593. package/src/deep-recall-config.ts +32 -0
  594. package/src/deep-recall-http-glue.ts +10 -10
  595. package/src/deep-recall-policy-llm.test.ts +242 -0
  596. package/src/deep-recall-policy-llm.ts +37 -7
  597. package/src/deep-recall-seeds.test.ts +53 -0
  598. package/src/deep-recall-seeds.ts +7 -1
  599. package/src/deep-recall-surface.test.ts +93 -0
  600. package/src/deep-recall.test.ts +121 -0
  601. package/src/deep-recall.ts +88 -28
  602. package/src/extraction-error-classification.ts +36 -1
  603. package/src/extraction-timeout.test.ts +110 -1
  604. package/src/extraction.test.ts +19 -1
  605. package/src/extraction.ts +23 -21
  606. package/src/fallback-llm-codex-subscription.ts +220 -12
  607. package/src/fallback-llm-parse-failure.test.ts +156 -0
  608. package/src/fallback-llm.test.ts +178 -0
  609. package/src/fallback-llm.ts +200 -198
  610. package/src/index.ts +1 -0
  611. package/src/local-llm-config.ts +11 -10
  612. package/src/local-llm-headers-timeout.test.ts +30 -0
  613. package/src/local-llm-helpers.ts +28 -0
  614. package/src/local-llm.ts +8 -19
  615. package/src/meetings/config.test.ts +58 -0
  616. package/src/namespaces/search.test.ts +51 -1
  617. package/src/namespaces/search.ts +48 -3
  618. package/src/orchestration/extraction-persist-promotion.test.ts +228 -2
  619. package/src/orchestration/extraction-persist-promotion.ts +17 -14
  620. package/src/orchestration/extraction-persist.ts +1 -1
  621. package/src/orchestration/orchestrator-helpers.test.ts +104 -0
  622. package/src/orchestration/orchestrator-init.ts +366 -106
  623. package/src/orchestration/recall-entry.ts +15 -1
  624. package/src/orchestration/recall-internal.ts +6 -11
  625. package/src/orchestration/recall-section-coordinator.ts +65 -28
  626. package/src/orchestration/recall-state-view-pipeline.test.ts +8 -2
  627. package/src/orchestration/semantic-merge-commit-effects.ts +45 -16
  628. package/src/orchestration/semantic-merge-persist.ts +23 -36
  629. package/src/orchestration/semantic-merge-promotion-payload.ts +62 -6
  630. package/src/orchestration/startup-collection-checks.ts +85 -0
  631. package/src/orchestrator-flush.test.ts +7 -0
  632. package/src/orchestrator-init.test.ts +1539 -0
  633. package/src/orchestrator.ts +7 -0
  634. package/src/providers/codex-subscription.test.ts +127 -0
  635. package/src/providers/codex-subscription.ts +1 -1
  636. package/src/qmd.ts +21 -10
  637. package/src/recall-state-view-admission.ts +11 -1
  638. package/src/recall-state-view-budget.test.ts +424 -0
  639. package/src/recall-state-view-cron-intent.test.ts +268 -0
  640. package/src/recall-state-view-widen.test.ts +14 -5
  641. package/src/recall-state-view-widen.ts +8 -1
  642. package/src/recall-state-view.ts +35 -18
  643. package/src/reconcile-identity-cache.test.ts +82 -1
  644. package/src/search/port.ts +1 -1
  645. package/src/shared-context/envelope-io.ts +25 -0
  646. package/src/shared-context/envelope-wiring.test.ts +4 -2
  647. package/src/shared-context/manager.ts +1 -0
  648. package/src/shared-context/write-output-controls.test.ts +192 -0
  649. package/src/shared-context/write-output-controls.ts +72 -0
  650. package/src/source-attribution.test.ts +39 -0
  651. package/src/source-attribution.ts +72 -0
  652. package/src/storage/cas-revision-store.test.ts +4 -0
  653. package/src/storage/cas-revision-store.ts +104 -12
  654. package/src/storage-frontmatter-cas.test.ts +19 -17
  655. package/src/summarizer.ts +5 -1
  656. package/src/task-llm-config.test.ts +124 -0
  657. package/src/task-llm-config.ts +88 -0
  658. package/src/testing/subjects/startup-discovery-lifecycle.test.ts +273 -0
  659. package/src/types.ts +6 -0
  660. package/dist/chunk-3CBI2ZSA.js.map +0 -1
  661. package/dist/chunk-5HYUUFMQ.js.map +0 -1
  662. package/dist/chunk-5SPCMAUC.js.map +0 -1
  663. package/dist/chunk-6H2G7RFT.js.map +0 -1
  664. package/dist/chunk-6YAIN5XJ.js.map +0 -1
  665. package/dist/chunk-ACY4ZPF7.js.map +0 -1
  666. package/dist/chunk-B36GUU6T.js.map +0 -1
  667. package/dist/chunk-BLDBT6HZ.js.map +0 -1
  668. package/dist/chunk-CARRTDKC.js.map +0 -1
  669. package/dist/chunk-CC37E3QM.js.map +0 -1
  670. package/dist/chunk-CWTCMZGE.js.map +0 -1
  671. package/dist/chunk-CZTPU65V.js.map +0 -1
  672. package/dist/chunk-EYKIDK33.js.map +0 -1
  673. package/dist/chunk-FWWWUPOE.js.map +0 -1
  674. package/dist/chunk-IQEJIOEU.js.map +0 -1
  675. package/dist/chunk-IYKZJVL5.js.map +0 -1
  676. package/dist/chunk-JXN77SGO.js.map +0 -1
  677. package/dist/chunk-KQW3YGEN.js.map +0 -1
  678. package/dist/chunk-LPYYY4AP.js.map +0 -1
  679. package/dist/chunk-LQNRVPTV.js.map +0 -1
  680. package/dist/chunk-MVAQ2WM3.js.map +0 -1
  681. package/dist/chunk-OEDW4ER7.js.map +0 -1
  682. package/dist/chunk-OPBFP4TF.js.map +0 -1
  683. package/dist/chunk-P4ZAEYKG.js.map +0 -1
  684. package/dist/chunk-QHT7MOUF.js.map +0 -1
  685. package/dist/chunk-QTQ6XKGT.js.map +0 -1
  686. package/dist/chunk-SV4Z2S67.js.map +0 -1
  687. package/dist/chunk-TNZNSMVJ.js.map +0 -1
  688. package/dist/chunk-TRLOFIQC.js.map +0 -1
  689. package/dist/chunk-UZEHHXYC.js.map +0 -1
  690. package/dist/chunk-WKDFJXW5.js.map +0 -1
  691. package/dist/chunk-YDVAM7S4.js.map +0 -1
  692. package/dist/chunk-YFTNZMGR.js.map +0 -1
  693. package/dist/chunk-YKREX63Z.js.map +0 -1
  694. /package/dist/{capsule-crypto-7FJQINUR.js.map → access-mcp-shared-context-tools.js.map} +0 -0
  695. /package/dist/{auto-sync-RP4C6ZPF.js.map → auto-sync-7PGUFY7U.js.map} +0 -0
  696. /package/dist/{contradiction-scan-BSGKZHYJ.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  697. /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-3MNURAQ3.js.map} +0 -0
  698. /package/dist/{chunk-XH3HGI2N.js.map → chunk-2HQPE2NM.js.map} +0 -0
  699. /package/dist/{chunk-3EKVN2OP.js.map → chunk-2ZG2LLZT.js.map} +0 -0
  700. /package/dist/{chunk-6EHM2AV7.js.map → chunk-3BLHPQHT.js.map} +0 -0
  701. /package/dist/{chunk-J272ODKJ.js.map → chunk-42DJ235G.js.map} +0 -0
  702. /package/dist/{chunk-F4EHXVP7.js.map → chunk-46RII65S.js.map} +0 -0
  703. /package/dist/{chunk-YUW66UAH.js.map → chunk-4AX5OYKC.js.map} +0 -0
  704. /package/dist/{chunk-AECJY3GJ.js.map → chunk-4IGOLIWM.js.map} +0 -0
  705. /package/dist/{chunk-2ZTDRNCS.js.map → chunk-54QPOE45.js.map} +0 -0
  706. /package/dist/{chunk-O4M4BDIJ.js.map → chunk-563X6JJX.js.map} +0 -0
  707. /package/dist/{chunk-IL6ODG6M.js.map → chunk-5EQT62HH.js.map} +0 -0
  708. /package/dist/{chunk-JKKII6GX.js.map → chunk-6MQMYXSQ.js.map} +0 -0
  709. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  710. /package/dist/{chunk-BV4ZKIZH.js.map → chunk-7ZLC4DTZ.js.map} +0 -0
  711. /package/dist/{chunk-WBM2MVBK.js.map → chunk-A4OIJYCV.js.map} +0 -0
  712. /package/dist/{chunk-RLJHJQUY.js.map → chunk-AFJHNHAM.js.map} +0 -0
  713. /package/dist/{chunk-4RZLTZVM.js.map → chunk-AKABVXFS.js.map} +0 -0
  714. /package/dist/{chunk-M6HBPLBA.js.map → chunk-AUSRUOMQ.js.map} +0 -0
  715. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  716. /package/dist/{chunk-Q7CLGFA7.js.map → chunk-C3G6MW4W.js.map} +0 -0
  717. /package/dist/{chunk-O76F5QPP.js.map → chunk-D6PY63OM.js.map} +0 -0
  718. /package/dist/{chunk-BD7JTBYP.js.map → chunk-D7MAYFQP.js.map} +0 -0
  719. /package/dist/{chunk-LMLGBG6H.js.map → chunk-DBB5JPSL.js.map} +0 -0
  720. /package/dist/{chunk-TSP5WH72.js.map → chunk-DIXZQTGY.js.map} +0 -0
  721. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  722. /package/dist/{chunk-UHRZ324M.js.map → chunk-E3I3NDUP.js.map} +0 -0
  723. /package/dist/{chunk-AENM6GKU.js.map → chunk-E4LMQTST.js.map} +0 -0
  724. /package/dist/{chunk-MUTVRKKY.js.map → chunk-EMSYMYXO.js.map} +0 -0
  725. /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
  726. /package/dist/{chunk-FXHOZGSE.js.map → chunk-F5H6YG5P.js.map} +0 -0
  727. /package/dist/{chunk-TNSCIPBQ.js.map → chunk-G6NQ3L4T.js.map} +0 -0
  728. /package/dist/{chunk-ZMWSYUUL.js.map → chunk-GCBIXUPT.js.map} +0 -0
  729. /package/dist/{chunk-4BCHFSC7.js.map → chunk-GWNSKQDA.js.map} +0 -0
  730. /package/dist/{chunk-JDX2OA4R.js.map → chunk-HNHIHXSD.js.map} +0 -0
  731. /package/dist/{chunk-GG5FHZJJ.js.map → chunk-I33QYUAF.js.map} +0 -0
  732. /package/dist/{chunk-AAZEKXUP.js.map → chunk-IYIPXAIJ.js.map} +0 -0
  733. /package/dist/{chunk-5U7K4W6K.js.map → chunk-JDOBQPJY.js.map} +0 -0
  734. /package/dist/{chunk-UZZ7SQT3.js.map → chunk-JMWUPUE6.js.map} +0 -0
  735. /package/dist/{chunk-ENBPQEVU.js.map → chunk-JSD7Q7LD.js.map} +0 -0
  736. /package/dist/{chunk-Q432REND.js.map → chunk-KJLLPG26.js.map} +0 -0
  737. /package/dist/{chunk-JTQR6L2N.js.map → chunk-KLUC2GSG.js.map} +0 -0
  738. /package/dist/{chunk-OB3XMWX5.js.map → chunk-KVO2BTA4.js.map} +0 -0
  739. /package/dist/{chunk-PCOVEDPK.js.map → chunk-KZJM7R4F.js.map} +0 -0
  740. /package/dist/{chunk-X4TD4O2F.js.map → chunk-LE2KZ72G.js.map} +0 -0
  741. /package/dist/{chunk-HIP6DKJJ.js.map → chunk-LQVXSRAJ.js.map} +0 -0
  742. /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
  743. /package/dist/{chunk-VBSNUH4J.js.map → chunk-ND7MAIJC.js.map} +0 -0
  744. /package/dist/{chunk-54NX5EG4.js.map → chunk-P66QH6R6.js.map} +0 -0
  745. /package/dist/{chunk-62D2PAAM.js.map → chunk-PAAJWQH5.js.map} +0 -0
  746. /package/dist/{chunk-TA4C3XB7.js.map → chunk-PFKIOYJH.js.map} +0 -0
  747. /package/dist/{chunk-WIWLX65T.js.map → chunk-PGGPRF6J.js.map} +0 -0
  748. /package/dist/{chunk-V6EGNVUT.js.map → chunk-PIWFNPQT.js.map} +0 -0
  749. /package/dist/{chunk-4JVQRFZD.js.map → chunk-PLJ2MQFT.js.map} +0 -0
  750. /package/dist/{chunk-4RX5O34R.js.map → chunk-PQ42DJNG.js.map} +0 -0
  751. /package/dist/{chunk-37CAEC7E.js.map → chunk-PWPIERBM.js.map} +0 -0
  752. /package/dist/{chunk-ZEGL7YCC.js.map → chunk-Q62GA5U2.js.map} +0 -0
  753. /package/dist/{chunk-GAS7KYC7.js.map → chunk-RQQO3ORQ.js.map} +0 -0
  754. /package/dist/{chunk-3NPNBVFR.js.map → chunk-UZGHKD3T.js.map} +0 -0
  755. /package/dist/{chunk-VJIE4D2I.js.map → chunk-V62YYBBY.js.map} +0 -0
  756. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  757. /package/dist/{chunk-6AGWBKQU.js.map → chunk-VSN2DMQK.js.map} +0 -0
  758. /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
  759. /package/dist/{chunk-GI4ZBWPQ.js.map → chunk-W7UV2ZCA.js.map} +0 -0
  760. /package/dist/{chunk-GMIQV6DD.js.map → chunk-WBQ4ONQJ.js.map} +0 -0
  761. /package/dist/{chunk-FNHLI2RE.js.map → chunk-WFMQN7JE.js.map} +0 -0
  762. /package/dist/{chunk-ZBW7A667.js.map → chunk-WPGA4RYI.js.map} +0 -0
  763. /package/dist/{chunk-YQNNHLCG.js.map → chunk-WPGR3RW4.js.map} +0 -0
  764. /package/dist/{chunk-NXGSONWM.js.map → chunk-WZIO3TW6.js.map} +0 -0
  765. /package/dist/{chunk-ZZUVBZL2.js.map → chunk-X2QPKLPL.js.map} +0 -0
  766. /package/dist/{chunk-VSL63CFJ.js.map → chunk-XRS65T4O.js.map} +0 -0
  767. /package/dist/{chunk-5N4MZLEH.js.map → chunk-YFXAWGMR.js.map} +0 -0
  768. /package/dist/{chunk-D545Z7UH.js.map → chunk-Z535ADTC.js.map} +0 -0
  769. /package/dist/{chunk-5YCNDC3C.js.map → chunk-ZX6NNFSY.js.map} +0 -0
  770. /package/dist/{chunk-3N3PBBEH.js.map → chunk-ZYSOT6HD.js.map} +0 -0
  771. /package/dist/{chunk-MCRVQ5YQ.js.map → chunk-ZZEIL3MI.js.map} +0 -0
  772. /package/dist/{resolution-4GG3QZRJ.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
  773. /package/dist/{first-start-migration-ZWMV5CX4.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
  774. /package/dist/{tier-stats-LUSUUNU6.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
@@ -6,14 +6,14 @@ import {
6
6
  loadSyncState,
7
7
  syncWearableSource,
8
8
  wearableSourceLabel
9
- } from "./chunk-GAS7KYC7.js";
9
+ } from "./chunk-RQQO3ORQ.js";
10
10
  import {
11
11
  CompressionGuidelineCoordinator
12
12
  } from "./chunk-UXREWVW4.js";
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-IQEJIOEU.js";
16
+ } from "./chunk-V2EXYQEQ.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -22,20 +22,20 @@ import {
22
22
  } from "./chunk-VZAKYDMJ.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-A7GQBJP5.js";
25
+ } from "./chunk-LVFI5LG7.js";
26
+ import {
27
+ chunkTranscriptEntries
28
+ } from "./chunk-TECVW3JP.js";
26
29
  import {
27
30
  cleanupConversationChunks
28
31
  } from "./chunk-C5JF6EZ7.js";
29
32
  import {
30
33
  CompoundingEngine,
31
34
  defaultTierMigrationCycleBudget
32
- } from "./chunk-X4TD4O2F.js";
35
+ } from "./chunk-LE2KZ72G.js";
33
36
  import {
34
37
  SharedContextManager
35
- } from "./chunk-CARRTDKC.js";
36
- import {
37
- chunkTranscriptEntries
38
- } from "./chunk-TECVW3JP.js";
38
+ } from "./chunk-Z22M4JCY.js";
39
39
  import {
40
40
  cleanArchivedUserMessage
41
41
  } from "./chunk-47DU4SGJ.js";
@@ -44,6 +44,9 @@ import {
44
44
  applyUtilityRankingRuntimeDelta,
45
45
  loadUtilityRuntimeValues
46
46
  } from "./chunk-SWIKABKI.js";
47
+ import {
48
+ TmtBuilder
49
+ } from "./chunk-ECZU5BJH.js";
47
50
  import {
48
51
  extractTopics
49
52
  } from "./chunk-KVDUKH5E.js";
@@ -58,10 +61,7 @@ import {
58
61
  } from "./chunk-YRFAYOFQ.js";
59
62
  import {
60
63
  decideTierTransition
61
- } from "./chunk-ZMWSYUUL.js";
62
- import {
63
- TmtBuilder
64
- } from "./chunk-ECZU5BJH.js";
64
+ } from "./chunk-GCBIXUPT.js";
65
65
  import {
66
66
  buildTargetedFactRecallSection,
67
67
  shouldRecallTargetedFactEvidence
@@ -109,17 +109,20 @@ import {
109
109
  rerankLocalOrNoop
110
110
  } from "./chunk-LUDXM7MD.js";
111
111
  import {
112
- indexStateViewAnnotatedResults
113
- } from "./chunk-QTQ6XKGT.js";
112
+ indexStateViewAnnotatedResults,
113
+ resolveRecallStateViewActive
114
+ } from "./chunk-K5D2XVNN.js";
114
115
  import {
115
116
  applyRecallStateViews
116
- } from "./chunk-LMLGBG6H.js";
117
+ } from "./chunk-DBB5JPSL.js";
117
118
  import {
118
119
  StateViewAnchorTracker,
119
120
  filterRecentScanMemories,
120
- resolveRecallStateViewFlags,
121
121
  stateViewPacketActive
122
- } from "./chunk-6AGWBKQU.js";
122
+ } from "./chunk-VSN2DMQK.js";
123
+ import {
124
+ reorderRecallResultsWithMmr
125
+ } from "./chunk-YDBIWGNI.js";
123
126
  import {
124
127
  dedupeResultsByNamespace,
125
128
  hasMemoryForResult,
@@ -128,9 +131,6 @@ import {
128
131
  memoryMapKey,
129
132
  resultHasKey
130
133
  } from "./chunk-D3V3UMET.js";
131
- import {
132
- reorderRecallResultsWithMmr
133
- } from "./chunk-YDBIWGNI.js";
134
134
  import {
135
135
  applyReasoningTraceBoost
136
136
  } from "./chunk-ZZTOURJI.js";
@@ -160,16 +160,16 @@ import {
160
160
  import {
161
161
  scoreEvidencePathDetail
162
162
  } from "./chunk-XXSOVESA.js";
163
- import {
164
- buildFocusedListRecallSection,
165
- shouldRecallFocusedListEvidence
166
- } from "./chunk-OH7QLI6W.js";
167
163
  import {
168
164
  ExtractionEngine
169
- } from "./chunk-QHT7MOUF.js";
165
+ } from "./chunk-BTPCP535.js";
170
166
  import {
171
167
  parseMemoryActionEligibilityContext
172
168
  } from "./chunk-JHU4EYDV.js";
169
+ import {
170
+ buildFocusedListRecallSection,
171
+ shouldRecallFocusedListEvidence
172
+ } from "./chunk-OH7QLI6W.js";
173
173
  import {
174
174
  recordJudgeTrainingPair
175
175
  } from "./chunk-PWFCHOB3.js";
@@ -179,7 +179,7 @@ import {
179
179
  getVerdictKind,
180
180
  judgeFactDurability,
181
181
  validateProcedureExtraction
182
- } from "./chunk-YUW66UAH.js";
182
+ } from "./chunk-4AX5OYKC.js";
183
183
  import {
184
184
  buildEventOrderRecallSection
185
185
  } from "./chunk-645WOU5I.js";
@@ -197,7 +197,7 @@ import {
197
197
  buildEntityRecallSection,
198
198
  entityRecentTranscriptLookbackHours,
199
199
  readRecentEntityTranscriptEntries
200
- } from "./chunk-RLJHJQUY.js";
200
+ } from "./chunk-AFJHNHAM.js";
201
201
  import {
202
202
  planEpisodeWindowsWithFallback
203
203
  } from "./chunk-T3GIETKV.js";
@@ -207,12 +207,12 @@ import {
207
207
  import {
208
208
  EmbeddingFallback
209
209
  } from "./chunk-V2HHAAPI.js";
210
+ import {
211
+ refreshConvergedNamespaces
212
+ } from "./chunk-54QPOE45.js";
210
213
  import {
211
214
  formatDaySummaryMemories
212
215
  } from "./chunk-LVXBC6YB.js";
213
- import {
214
- refreshConvergedNamespaces
215
- } from "./chunk-2ZTDRNCS.js";
216
216
  import {
217
217
  builtInConnectorPackageSpecifier,
218
218
  ensureBuiltInWearableConnectors,
@@ -221,7 +221,7 @@ import {
221
221
  runTimelinePublishCli,
222
222
  screenCandidateFact,
223
223
  summarizeVaultPublish
224
- } from "./chunk-TNZNSMVJ.js";
224
+ } from "./chunk-NYWCFC3K.js";
225
225
  import {
226
226
  normalizeReplaySessionKey
227
227
  } from "./chunk-AJVLDJU6.js";
@@ -231,14 +231,14 @@ import {
231
231
  import {
232
232
  compareVerifiedEpisodeResults,
233
233
  searchVerifiedEpisodes
234
- } from "./chunk-AAZEKXUP.js";
234
+ } from "./chunk-IYIPXAIJ.js";
235
235
  import {
236
236
  ThreadingManager
237
237
  } from "./chunk-OJP3N7UK.js";
238
238
  import {
239
239
  compareVerifiedSemanticRuleResults,
240
240
  searchVerifiedSemanticRules
241
- } from "./chunk-AENM6GKU.js";
241
+ } from "./chunk-E4LMQTST.js";
242
242
  import {
243
243
  searchWorkProductLedgerEntries
244
244
  } from "./chunk-G7NYVKD6.js";
@@ -251,10 +251,10 @@ import {
251
251
  import {
252
252
  runNamespaceMaintenanceFanout,
253
253
  summarizeNamespaceMaintenanceHealth
254
- } from "./chunk-MUTVRKKY.js";
254
+ } from "./chunk-EMSYMYXO.js";
255
255
  import {
256
256
  planNamespaceMaintenance
257
- } from "./chunk-FNHLI2RE.js";
257
+ } from "./chunk-WFMQN7JE.js";
258
258
  import {
259
259
  isAboveImportanceThreshold,
260
260
  scoreImportance
@@ -274,9 +274,6 @@ import {
274
274
  import {
275
275
  applyCommitmentLedgerLifecycle
276
276
  } from "./chunk-NHLLKEKK.js";
277
- import {
278
- SmartBuffer
279
- } from "./chunk-4RX5O34R.js";
280
277
  import {
281
278
  buildConsolidationPrompt,
282
279
  buildExtensionsBlockForConsolidation,
@@ -286,7 +283,19 @@ import {
286
283
  materializeAfterSemanticConsolidation,
287
284
  parseConsolidationResponse,
288
285
  parseOperatorAwareConsolidationResponse
289
- } from "./chunk-Q432REND.js";
286
+ } from "./chunk-KJLLPG26.js";
287
+ import {
288
+ semanticChunkContent
289
+ } from "./chunk-2GBFKHBZ.js";
290
+ import {
291
+ chunkContent
292
+ } from "./chunk-6TBIWIAG.js";
293
+ import {
294
+ SmartBuffer
295
+ } from "./chunk-PQ42DJNG.js";
296
+ import {
297
+ buildRecallQueryPolicy
298
+ } from "./chunk-C6WMSXCJ.js";
290
299
  import {
291
300
  buildBehaviorSignalsForMemory,
292
301
  dedupeBehaviorSignalsByMemoryAndHash
@@ -301,11 +310,8 @@ import {
301
310
  BoxBuilder
302
311
  } from "./chunk-B7RWBZXW.js";
303
312
  import {
304
- semanticChunkContent
305
- } from "./chunk-2GBFKHBZ.js";
306
- import {
307
- chunkContent
308
- } from "./chunk-6TBIWIAG.js";
313
+ evaluateMemoryActionPolicy
314
+ } from "./chunk-MI2OTWV5.js";
309
315
  import {
310
316
  REFUSED_MERGE_CATEGORIES,
311
317
  applyNoveltyGate,
@@ -314,7 +320,7 @@ import {
314
320
  detectMeetings,
315
321
  embeddingsFromCosineHits,
316
322
  normalizeConnectorScope
317
- } from "./chunk-FWWWUPOE.js";
323
+ } from "./chunk-MCMS4VUK.js";
318
324
  import {
319
325
  compileCorrectionRule,
320
326
  correctionsFilePath,
@@ -325,20 +331,14 @@ import {
325
331
  isAnalysisFailureKind,
326
332
  resolveJournalSource,
327
333
  resolveVaultNotePath
328
- } from "./chunk-5HYUUFMQ.js";
334
+ } from "./chunk-XCPNH2MG.js";
329
335
  import {
330
336
  AMBIENT_CAPTURE_PROMPT_RULE,
331
337
  isHighImpactPersonalFact
332
338
  } from "./chunk-QW27DOHG.js";
333
- import {
334
- buildRecallQueryPolicy
335
- } from "./chunk-C6WMSXCJ.js";
336
- import {
337
- evaluateMemoryActionPolicy
338
- } from "./chunk-MI2OTWV5.js";
339
339
  import {
340
340
  MeetingsInputError
341
- } from "./chunk-EYKIDK33.js";
341
+ } from "./chunk-GMH5QPUU.js";
342
342
  import {
343
343
  WearablesInputError,
344
344
  describeErrorForOperator
@@ -356,20 +356,24 @@ import {
356
356
  } from "./chunk-DGS34QSY.js";
357
357
  import {
358
358
  NamespaceCatalog
359
- } from "./chunk-54NX5EG4.js";
359
+ } from "./chunk-P66QH6R6.js";
360
360
  import {
361
361
  RecallResultFormatter,
362
362
  SessionContextCoordinator,
363
363
  capturePassiveCorrections,
364
364
  clusterByKey,
365
365
  detectPassiveCorrections
366
- } from "./chunk-UZEHHXYC.js";
366
+ } from "./chunk-S4MJTIPG.js";
367
367
  import {
368
368
  importCapsule
369
- } from "./chunk-ZHXSOMYH.js";
369
+ } from "./chunk-VVX5PZFS.js";
370
370
  import {
371
371
  isCodingGraphInstalled
372
372
  } from "./chunk-VQ7B2Q6M.js";
373
+ import {
374
+ listTrustZoneRecords,
375
+ searchTrustZoneRecords
376
+ } from "./chunk-ROBHL3GL.js";
373
377
  import {
374
378
  applyTrustScoreStage,
375
379
  buildTrustSignalsForRerank,
@@ -377,13 +381,9 @@ import {
377
381
  trustResultFor,
378
382
  trustResultKey
379
383
  } from "./chunk-GNVZQ5JN.js";
380
- import {
381
- listTrustZoneRecords,
382
- searchTrustZoneRecords
383
- } from "./chunk-ROBHL3GL.js";
384
384
  import {
385
385
  HourlySummarizer
386
- } from "./chunk-ACY4ZPF7.js";
386
+ } from "./chunk-J2MGTGKC.js";
387
387
  import {
388
388
  LastRecallStore,
389
389
  RecallHandleHistoryStore,
@@ -396,17 +396,17 @@ import {
396
396
  isTopLevelArchivePath,
397
397
  journalPath,
398
398
  writeJournalFile
399
- } from "./chunk-UZZ7SQT3.js";
399
+ } from "./chunk-JMWUPUE6.js";
400
400
  import {
401
401
  buildXraySnapshot
402
- } from "./chunk-ZEGL7YCC.js";
402
+ } from "./chunk-Q62GA5U2.js";
403
403
  import {
404
404
  objectiveStateStoreOverrideForNamespace,
405
405
  searchObjectiveStateSnapshots
406
406
  } from "./chunk-HM7RHKS4.js";
407
407
  import {
408
408
  searchHarmonicRetrieval
409
- } from "./chunk-4RZLTZVM.js";
409
+ } from "./chunk-AKABVXFS.js";
410
410
  import {
411
411
  ProfilingCollector
412
412
  } from "./chunk-NLE6TSLG.js";
@@ -415,14 +415,14 @@ import {
415
415
  } from "./chunk-WLZYGLJ4.js";
416
416
  import {
417
417
  LocalLlmClient
418
- } from "./chunk-MVAQ2WM3.js";
418
+ } from "./chunk-WGZHSQDV.js";
419
419
  import {
420
420
  contentMatchesRedactionRules,
421
421
  loadRedactionRules
422
422
  } from "./chunk-LTHVM4XN.js";
423
423
  import {
424
424
  shouldSkipImplicitExtraction
425
- } from "./chunk-HIP6DKJJ.js";
425
+ } from "./chunk-LQVXSRAJ.js";
426
426
  import {
427
427
  boundRecallContextComposition,
428
428
  composeRecallContext,
@@ -433,7 +433,7 @@ import {
433
433
  } from "./chunk-7ZNJN5WZ.js";
434
434
  import {
435
435
  NamespaceStorageRouter
436
- } from "./chunk-GG5FHZJJ.js";
436
+ } from "./chunk-I33QYUAF.js";
437
437
  import {
438
438
  pruneOrphanCueAnchors
439
439
  } from "./chunk-BMWN7B3Y.js";
@@ -447,7 +447,7 @@ import {
447
447
  ExtractionDeadlineError,
448
448
  ExtractionRunCoordinator,
449
449
  classifyExtractionOrigin
450
- } from "./chunk-6EHM2AV7.js";
450
+ } from "./chunk-3BLHPQHT.js";
451
451
  import {
452
452
  ARTIFACT_STATUS_CACHE_TTL_MS,
453
453
  BulkImportBatchPartialFailureError,
@@ -472,6 +472,7 @@ import {
472
472
  parseGraphRecallRankedResults,
473
473
  parseMemoryIntentSnapshot,
474
474
  parseQmdRecallResults,
475
+ qmdStartupCollectionCheckTimeoutMs,
475
476
  qmdStartupCollectionCheckWithTimeout,
476
477
  raceRecallAbort,
477
478
  resolvePersistedMemoryRelativePath,
@@ -486,19 +487,24 @@ import {
486
487
  throwIfRecallAborted,
487
488
  tokenizeRecallQuery,
488
489
  utcDateKeysForLocalDay
489
- } from "./chunk-BV4ZKIZH.js";
490
+ } from "./chunk-7ZLC4DTZ.js";
490
491
  import {
491
492
  inferIntentFromText,
492
493
  intentCompatibilityScore,
493
494
  isTaskInitiationIntent,
494
495
  planRecallMode
495
496
  } from "./chunk-CSAKJVXW.js";
497
+ import {
498
+ decideLifecycleTransition,
499
+ resolveLifecycleState
500
+ } from "./chunk-TBBDFYXW.js";
496
501
  import {
497
502
  buildChainFollowupGenerator
498
- } from "./chunk-5YCNDC3C.js";
503
+ } from "./chunk-ZX6NNFSY.js";
499
504
  import {
500
505
  QmdResultResolver,
501
506
  StorageManager,
507
+ canonicalSemanticFileText,
502
508
  compareEntityTimestamps,
503
509
  composeFusionDayMeta,
504
510
  composeMeetingRecord,
@@ -514,10 +520,7 @@ import {
514
520
  reconstructFusionInputs,
515
521
  selfDeps,
516
522
  serializeFusionDay
517
- } from "./chunk-CZTPU65V.js";
518
- import {
519
- buildRetiredFactTombstoneInputs
520
- } from "./chunk-46WM6JX2.js";
523
+ } from "./chunk-ICN37XHG.js";
521
524
  import {
522
525
  bodyIsEscaped,
523
526
  decodeTranscriptBody,
@@ -528,15 +531,18 @@ import {
528
531
  saveSpeakerRegistry,
529
532
  speakerRegistryKey
530
533
  } from "./chunk-UHVXE24Y.js";
534
+ import {
535
+ buildRetiredFactTombstoneInputs
536
+ } from "./chunk-46WM6JX2.js";
531
537
  import {
532
538
  NamespaceSearchRouter,
533
539
  namespaceCollectionName
534
- } from "./chunk-6YAIN5XJ.js";
540
+ } from "./chunk-AIVRD66I.js";
535
541
  import {
536
542
  createConversationIndexRuntime,
537
543
  createSearchBackend,
538
544
  isSearchBackendEnabled
539
- } from "./chunk-4JVQRFZD.js";
545
+ } from "./chunk-PLJ2MQFT.js";
540
546
  import {
541
547
  NoopSearchBackend
542
548
  } from "./chunk-CYEPCZN5.js";
@@ -550,7 +556,7 @@ import {
550
556
  } from "./chunk-S2V7RUCL.js";
551
557
  import {
552
558
  confidenceTier
553
- } from "./chunk-IYKZJVL5.js";
559
+ } from "./chunk-WN2OXGGH.js";
554
560
  import {
555
561
  lintWorkspaceFiles,
556
562
  rotateMarkdownFileToArchive
@@ -559,7 +565,7 @@ import {
559
565
  applyFaithfulnessVerdict,
560
566
  createFaithfulnessCounters,
561
567
  runFaithfulnessGateBatch
562
- } from "./chunk-3N3PBBEH.js";
568
+ } from "./chunk-ZYSOT6HD.js";
563
569
  import {
564
570
  casCommittedRevisionOf
565
571
  } from "./chunk-SHEHQBCG.js";
@@ -618,16 +624,26 @@ import {
618
624
  } from "./chunk-42JKGUFJ.js";
619
625
  import {
620
626
  FallbackLlmClient,
621
- fallbackLlmRuntimeContextFromConfig,
622
627
  gatewayTaskChainOptions
623
- } from "./chunk-LQNRVPTV.js";
628
+ } from "./chunk-TRTLWUDD.js";
629
+ import {
630
+ fallbackLlmRuntimeContextFromConfig
631
+ } from "./chunk-UHSOPTNB.js";
632
+ import {
633
+ estimateTokenCount
634
+ } from "./chunk-TOTT6S2V.js";
624
635
  import {
625
636
  capStateViewPackets,
626
- reconcileStateViewPairs
627
- } from "./chunk-YDVAM7S4.js";
637
+ reconcileStateViewPairs,
638
+ resultStateViewKey,
639
+ stateViewPacketKeys
640
+ } from "./chunk-EH3HNCAM.js";
628
641
  import {
629
642
  assertExternalWikiRootOutsideMemoryDirCanonical
630
643
  } from "./chunk-JV3C2MNQ.js";
644
+ import {
645
+ buildProcedurePersistBody
646
+ } from "./chunk-QDW3E4RD.js";
631
647
  import {
632
648
  activityDayWindow,
633
649
  assertValidTimezone,
@@ -635,9 +651,6 @@ import {
635
651
  isValidActivityDate,
636
652
  timezoneOffsetIso
637
653
  } from "./chunk-353C5UNV.js";
638
- import {
639
- buildProcedurePersistBody
640
- } from "./chunk-QDW3E4RD.js";
641
654
  import {
642
655
  searchCausalTrajectories
643
656
  } from "./chunk-L63GFNKL.js";
@@ -650,6 +663,9 @@ import {
650
663
  isUntrustedOrigin,
651
664
  parseOriginClass
652
665
  } from "./chunk-6Q3ZTEF6.js";
666
+ import {
667
+ normalizeRecallTokenSet
668
+ } from "./chunk-YCVB7X56.js";
653
669
  import {
654
670
  graphemeUnits,
655
671
  truncateGraphemeSafe
@@ -663,21 +679,21 @@ import {
663
679
  import {
664
680
  extractJsonCandidates
665
681
  } from "./chunk-RGMVMVMF.js";
666
- import {
667
- decideLifecycleTransition,
668
- resolveLifecycleState
669
- } from "./chunk-TBBDFYXW.js";
670
- import {
671
- normalizeRecallTokenSet
672
- } from "./chunk-YCVB7X56.js";
673
- import {
674
- estimateTokenCount
675
- } from "./chunk-TOTT6S2V.js";
676
682
  import {
677
683
  coerceBool,
678
684
  coerceBooleanLike,
679
685
  coerceNumber
680
686
  } from "./chunk-PQVCH2AE.js";
687
+ import {
688
+ CAPSULE_ID_PATTERN
689
+ } from "./chunk-WEHSQBFR.js";
690
+ import {
691
+ keyring_exports,
692
+ secureStoreDir
693
+ } from "./chunk-BJMBJZ2Y.js";
694
+ import {
695
+ buildRetrievedMemoryProvenance
696
+ } from "./chunk-I4WBNM3M.js";
681
697
  import {
682
698
  getConfiguredNamespaces,
683
699
  resolveNamespaceFromStorageDir,
@@ -685,17 +701,20 @@ import {
685
701
  } from "./chunk-OQQXGYMX.js";
686
702
  import {
687
703
  attachCitation,
704
+ citationTemplateIsDetectable,
705
+ citationTemplatesForMerge,
688
706
  hasCitationForTemplate,
689
- lastCitationMarkerForTemplate,
690
- stripCitationForTemplate
691
- } from "./chunk-TG3FAM2S.js";
707
+ lastRecognizedCitationMarker,
708
+ stripCitationForTemplate,
709
+ stripRecognizedCitations
710
+ } from "./chunk-JL4TQYM5.js";
692
711
  import {
693
712
  assertPathInsideRoot
694
713
  } from "./chunk-C7HJ3NEI.js";
695
714
  import {
696
715
  excludeSupportPassportPrivateMemories,
697
716
  isSupportPassportPrivateMemory
698
- } from "./chunk-37CAEC7E.js";
717
+ } from "./chunk-PWPIERBM.js";
699
718
  import {
700
719
  inferMemoryStatus,
701
720
  isActiveMemoryStatus,
@@ -720,6 +739,13 @@ import {
720
739
  resolveHandle,
721
740
  stripHandles
722
741
  } from "./chunk-JAKIDQB2.js";
742
+ import {
743
+ assertIsDirectoryNotSymlink,
744
+ assertRealpathInsideRoot
745
+ } from "./chunk-GCGJW34D.js";
746
+ import {
747
+ parseFlexibleIsoTimestamp
748
+ } from "./chunk-P7FMDTKL.js";
723
749
  import {
724
750
  canReadNamespace,
725
751
  defaultNamespaceForPrincipal,
@@ -756,23 +782,6 @@ import {
756
782
  resolveSecurityCapabilities,
757
783
  resolveUtilityLearningCapabilities
758
784
  } from "./chunk-JUOZ62Y7.js";
759
- import {
760
- CAPSULE_ID_PATTERN
761
- } from "./chunk-WEHSQBFR.js";
762
- import {
763
- keyring_exports,
764
- secureStoreDir
765
- } from "./chunk-BJMBJZ2Y.js";
766
- import {
767
- buildRetrievedMemoryProvenance
768
- } from "./chunk-I4WBNM3M.js";
769
- import {
770
- assertIsDirectoryNotSymlink,
771
- assertRealpathInsideRoot
772
- } from "./chunk-GCGJW34D.js";
773
- import {
774
- parseFlexibleIsoTimestamp
775
- } from "./chunk-P7FMDTKL.js";
776
785
  import {
777
786
  lcmSessionKeyForNamespace,
778
787
  resolveCodingNamespaceOverlay
@@ -820,7 +829,7 @@ import {
820
829
 
821
830
  // src/orchestrator.ts
822
831
  import path21 from "path";
823
- import { createHash as createHash8 } from "crypto";
832
+ import { createHash as createHash9 } from "crypto";
824
833
 
825
834
  // src/orchestration/tier-migration-coordinator.ts
826
835
  import path from "path";
@@ -2698,7 +2707,8 @@ var RecallSectionCoordinator = class {
2698
2707
  atomic: true,
2699
2708
  ...options.memoryId ? { memoryId: options.memoryId } : {},
2700
2709
  ...options.memoryPath ? { memoryPath: options.memoryPath } : {},
2701
- ...options.memoryNamespace ? { memoryNamespace: options.memoryNamespace } : {}
2710
+ ...options.memoryNamespace ? { memoryNamespace: options.memoryNamespace } : {},
2711
+ ...options.packetKey ? { packetKey: options.packetKey } : {}
2702
2712
  });
2703
2713
  } else {
2704
2714
  existing.push(finalContent);
@@ -2901,11 +2911,39 @@ var RecallSectionCoordinator = class {
2901
2911
  let includedPostAtomicContent = false;
2902
2912
  const postAtomicContents = [];
2903
2913
  let includedLeadingContent = false;
2914
+ const packetFirstIndex = /* @__PURE__ */ new Map();
2915
+ const packetMembers = /* @__PURE__ */ new Map();
2904
2916
  for (const [index, chunk] of section.chunks.entries()) {
2917
+ if (!chunk.atomic || !chunk.packetKey) continue;
2918
+ const first = packetFirstIndex.get(chunk.packetKey);
2919
+ if (first === void 0) {
2920
+ packetFirstIndex.set(chunk.packetKey, index);
2921
+ packetMembers.set(index, [index]);
2922
+ } else {
2923
+ packetMembers.get(first).push(index);
2924
+ }
2925
+ }
2926
+ const admitMemoryRefs = (memberIndexes) => {
2927
+ for (const memberIndex of memberIndexes) {
2928
+ const member = section.chunks[memberIndex];
2929
+ if (member.memoryId && member.memoryPath) {
2930
+ includedMemories.push(
2931
+ member.memoryNamespace ? { id: member.memoryId, path: member.memoryPath, namespace: member.memoryNamespace } : { id: member.memoryId, path: member.memoryPath }
2932
+ );
2933
+ }
2934
+ }
2935
+ };
2936
+ for (const [index, chunk] of section.chunks.entries()) {
2937
+ const members = chunk.atomic ? packetMembers.get(index) : void 0;
2938
+ if (chunk.atomic && chunk.packetKey && members === void 0) {
2939
+ continue;
2940
+ }
2941
+ const memberIndexes = members ?? [index];
2942
+ const content = members ? members.map((memberIndex) => section.chunks[memberIndex].content).join("\n\n") : chunk.content;
2905
2943
  if (!chunk.atomic && includedAtomicCount === 0 && index < firstAtomicIndex) {
2906
2944
  const candidate2 = rendered ? `${rendered}
2907
2945
 
2908
- ${chunk.content}` : chunk.content;
2946
+ ${content}` : content;
2909
2947
  if (candidate2.length <= allocatedSectionAvailable && estimateTokenCount(candidate2) <= allocatedTokenAvailable) {
2910
2948
  rendered = candidate2;
2911
2949
  includedLeadingContent = true;
@@ -2916,24 +2954,20 @@ ${chunk.content}` : chunk.content;
2916
2954
  }
2917
2955
  const candidate = rendered ? `${rendered}
2918
2956
 
2919
- ${chunk.content}` : chunk.content;
2957
+ ${content}` : content;
2920
2958
  if (candidate.length > allocatedSectionAvailable || estimateTokenCount(candidate) > allocatedTokenAvailable) {
2921
- if (chunk.atomic && includedAtomicCount === 0 && includedLeadingContent && chunk.content.length <= allocatedSectionAvailable && estimateTokenCount(chunk.content) <= allocatedTokenAvailable) {
2922
- rendered = chunk.content;
2959
+ if (chunk.atomic && includedAtomicCount === 0 && includedLeadingContent && content.length <= allocatedSectionAvailable && estimateTokenCount(content) <= allocatedTokenAvailable) {
2960
+ rendered = content;
2923
2961
  includedLeadingContent = false;
2924
- includedAtomicCount = 1;
2925
- if (chunk.memoryId && chunk.memoryPath) {
2926
- includedMemories.push(
2927
- chunk.memoryNamespace ? { id: chunk.memoryId, path: chunk.memoryPath, namespace: chunk.memoryNamespace } : { id: chunk.memoryId, path: chunk.memoryPath }
2928
- );
2929
- }
2962
+ includedAtomicCount += memberIndexes.length;
2963
+ admitMemoryRefs(memberIndexes);
2930
2964
  continue;
2931
2965
  }
2932
- if (!chunk.atomic && includedAtomicCount === 0 && includedLeadingContent && chunk.content.length <= allocatedSectionAvailable && estimateTokenCount(chunk.content) <= allocatedTokenAvailable) {
2933
- rendered = chunk.content;
2966
+ if (!chunk.atomic && includedAtomicCount === 0 && includedLeadingContent && content.length <= allocatedSectionAvailable && estimateTokenCount(content) <= allocatedTokenAvailable) {
2967
+ rendered = content;
2934
2968
  includedLeadingContent = false;
2935
2969
  includedPostAtomicContent = true;
2936
- postAtomicContents.push(chunk.content);
2970
+ postAtomicContents.push(content);
2937
2971
  continue;
2938
2972
  }
2939
2973
  truncated = true;
@@ -2941,15 +2975,11 @@ ${chunk.content}` : chunk.content;
2941
2975
  }
2942
2976
  rendered = candidate;
2943
2977
  if (chunk.atomic) {
2944
- includedAtomicCount += 1;
2945
- if (chunk.memoryId && chunk.memoryPath) {
2946
- includedMemories.push(
2947
- chunk.memoryNamespace ? { id: chunk.memoryId, path: chunk.memoryPath, namespace: chunk.memoryNamespace } : { id: chunk.memoryId, path: chunk.memoryPath }
2948
- );
2949
- }
2978
+ includedAtomicCount += memberIndexes.length;
2979
+ admitMemoryRefs(memberIndexes);
2950
2980
  } else {
2951
2981
  includedPostAtomicContent = true;
2952
- postAtomicContents.push(chunk.content);
2982
+ postAtomicContents.push(content);
2953
2983
  }
2954
2984
  }
2955
2985
  if (includedAtomicCount === 0) {
@@ -4948,6 +4978,8 @@ async function decideSemanticDedup(content, lookup, options) {
4948
4978
  }
4949
4979
 
4950
4980
  // src/orchestration/semantic-merge-promotion-payload.ts
4981
+ import { createHash as createHash3 } from "crypto";
4982
+ import { readFile as readFile2 } from "fs/promises";
4951
4983
  async function buildMergedTargetPromotionPayload(storage, merge) {
4952
4984
  if (!merge.provenancePatched) {
4953
4985
  log.warn(
@@ -4972,6 +5004,7 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
4972
5004
  }
4973
5005
  const fm = committed.frontmatter;
4974
5006
  const snapshotDigest = typeof storage.readDurableFileDigest === "function" ? await storage.readDurableFileDigest(committed.path).catch(() => null) : null;
5007
+ const snapshotSemanticFingerprint = await readDurableSemanticFingerprint(committed.path);
4975
5008
  const receipt = await readPromotionReceiptStatus(storage, committed.path);
4976
5009
  if (!receipt.available) {
4977
5010
  log.warn(
@@ -4979,7 +5012,13 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
4979
5012
  );
4980
5013
  return { payload: null, readFailed: true };
4981
5014
  }
4982
- if (receipt.committedDigest !== void 0 && snapshotDigest !== receipt.committedDigest) {
5015
+ if (receipt.committedSemanticFingerprint !== void 0 && snapshotSemanticFingerprint !== receipt.committedSemanticFingerprint) {
5016
+ log.warn(
5017
+ snapshotSemanticFingerprint == null ? `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 the semantic snapshot fingerprint is unavailable while the CAS receipt carries ${receipt.committedSemanticFingerprint}; promotion and reconciliation retry on the next merge` : `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 record semantic fingerprint (${snapshotSemanticFingerprint}) does not match committed receipt fingerprint (${receipt.committedSemanticFingerprint}); record metadata was mutated concurrently`
5018
+ );
5019
+ return { payload: null, readFailed: true };
5020
+ }
5021
+ if (receipt.committedSemanticFingerprint === void 0 && receipt.committedDigest !== void 0 && snapshotDigest !== receipt.committedDigest) {
4983
5022
  log.warn(
4984
5023
  snapshotDigest == null ? `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 the record snapshot digest is unavailable while the CAS receipt carries committed digest ${receipt.committedDigest}; promotion and reconciliation retry on the next merge` : `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 record snapshot digest (${snapshotDigest}) does not match committed receipt digest (${receipt.committedDigest}); record metadata was mutated concurrently`
4985
5024
  );
@@ -5011,11 +5050,19 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
5011
5050
  ...fm.toolScoped === true ? { toolScoped: true } : {},
5012
5051
  ...fm.sourceConnector !== void 0 ? { sourceConnector: fm.sourceConnector } : {},
5013
5052
  ...receipt.revision !== void 0 ? { committedRevision: receipt.revision } : {},
5014
- ...receipt.committedDigest !== void 0 ? { committedDigest: receipt.committedDigest } : snapshotDigest !== null ? { committedDigest: snapshotDigest } : {}
5053
+ ...receipt.committedDigest !== void 0 ? { committedDigest: receipt.committedDigest } : snapshotDigest !== null ? { committedDigest: snapshotDigest } : {},
5054
+ ...receipt.committedSemanticFingerprint !== void 0 ? { committedSemanticFingerprint: receipt.committedSemanticFingerprint } : snapshotSemanticFingerprint !== null ? { committedSemanticFingerprint: snapshotSemanticFingerprint } : {}
5015
5055
  },
5016
5056
  readFailed: false
5017
5057
  };
5018
5058
  }
5059
+ async function readDurableSemanticFingerprint(filePath) {
5060
+ try {
5061
+ return createHash3("sha256").update(canonicalSemanticFileText(await readFile2(filePath, "utf8"))).digest("hex");
5062
+ } catch {
5063
+ return null;
5064
+ }
5065
+ }
5019
5066
  async function readPromotionReceiptStatus(storage, filePath) {
5020
5067
  try {
5021
5068
  const status = await storage.readCasRevisionStatus(filePath);
@@ -5023,7 +5070,8 @@ async function readPromotionReceiptStatus(storage, filePath) {
5023
5070
  return {
5024
5071
  available: true,
5025
5072
  revision: status.status === "present" ? status.revision : void 0,
5026
- committedDigest: status.status === "present" ? status.committedDigest : void 0
5073
+ committedDigest: status.status === "present" ? status.committedDigest : void 0,
5074
+ committedSemanticFingerprint: status.status === "present" ? status.committedSemanticFingerprint : void 0
5027
5075
  };
5028
5076
  } catch (err) {
5029
5077
  return { available: false, reason: err instanceof Error ? err.message : String(err) };
@@ -5183,10 +5231,10 @@ async function promoteAndReconcileMergedTarget(args) {
5183
5231
  return;
5184
5232
  }
5185
5233
  const standingReceipt = await readPromotionReceiptStatus(args.sourceStorage, current.path);
5186
- const standingDigest = typeof args.sourceStorage.readDurableFileDigest === "function" ? await args.sourceStorage.readDurableFileDigest(current.path).catch(() => null) : null;
5187
- if (!standingReceipt.available || (standingReceipt.revision ?? void 0) !== (payload.committedRevision ?? void 0) || payload.committedDigest !== void 0 && standingReceipt.committedDigest !== void 0 && standingReceipt.committedDigest !== payload.committedDigest || payload.committedDigest !== void 0 && standingDigest !== null && standingDigest !== payload.committedDigest) {
5234
+ const standingSemanticFingerprint = await readDurableSemanticFingerprint(current.path);
5235
+ if (!standingReceipt.available || (standingReceipt.revision ?? void 0) !== (payload.committedRevision ?? void 0) || payload.committedDigest !== void 0 && standingReceipt.committedDigest !== void 0 && standingReceipt.committedDigest !== payload.committedDigest || payload.committedSemanticFingerprint !== void 0 && standingSemanticFingerprint !== null && standingSemanticFingerprint !== payload.committedSemanticFingerprint) {
5188
5236
  log.warn(
5189
- `persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} \u2014 the committed record's CAS receipt or digest ${standingReceipt.available ? "does not match the cached payload's" : "is unreadable"}, so the cached body is not confirmed`
5237
+ `persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} \u2014 the committed record's CAS receipt or semantic fingerprint ${standingReceipt.available ? "does not match the cached payload's" : "is unreadable"}, so the cached body is not confirmed`
5190
5238
  );
5191
5239
  return;
5192
5240
  }
@@ -5347,9 +5395,9 @@ async function persistConstructedHarmonicRecords(options) {
5347
5395
  import path5 from "path";
5348
5396
 
5349
5397
  // src/orchestration/semantic-merge-commit-effects.ts
5350
- import { readFile as readFile2 } from "fs/promises";
5398
+ import { readFile as readFile3 } from "fs/promises";
5351
5399
  async function stageMergedTargetSnapshot(target, versioning, memoryDir) {
5352
- const currentFile = await readFile2(target.path, "utf8");
5400
+ const currentFile = await readFile3(target.path, "utf8");
5353
5401
  const version = await createVersion(
5354
5402
  target.path,
5355
5403
  currentFile,
@@ -5465,12 +5513,31 @@ async function rewriteMergedTargetGraphEdges(storage, input) {
5465
5513
  throw buildErr;
5466
5514
  }
5467
5515
  }
5468
- function rawPreCitationMergedBody(deps, mergedContent) {
5516
+ function committedMergedBody(deps, mergedContent, incomingCitedContent, incomingCitationContext, nowIso) {
5469
5517
  if (resolvePipelineProcessingCapabilities(deps.config).inlineSourceAttribution !== true) {
5470
5518
  return mergedContent;
5471
5519
  }
5472
5520
  const template = deps.config.inlineSourceAttributionFormat;
5473
- return hasCitationForTemplate(mergedContent, template) ? stripCitationForTemplate(mergedContent, template) : mergedContent;
5521
+ const templates = citationTemplatesForMerge(deps.config);
5522
+ if (incomingCitedContent !== void 0) {
5523
+ const marker = lastRecognizedCitationMarker(incomingCitedContent, templates);
5524
+ if (marker) {
5525
+ return mergedContent.endsWith(marker) ? mergedContent : `${mergedContent} ${marker}`;
5526
+ }
5527
+ }
5528
+ if (!citationTemplateIsDetectable(template)) return mergedContent;
5529
+ if (lastRecognizedCitationMarker(mergedContent, templates)) return mergedContent;
5530
+ return attachCitation(
5531
+ mergedContent,
5532
+ { ...incomingCitationContext, ts: nowIso },
5533
+ template
5534
+ );
5535
+ }
5536
+ function rawPreCitationMergedBody(deps, mergedContent) {
5537
+ if (resolvePipelineProcessingCapabilities(deps.config).inlineSourceAttribution !== true) {
5538
+ return mergedContent;
5539
+ }
5540
+ return stripRecognizedCitations(mergedContent, citationTemplatesForMerge(deps.config));
5474
5541
  }
5475
5542
  function committedMergedFactHash(deps, category, committedContent) {
5476
5543
  if (category !== "fact") return void 0;
@@ -5764,17 +5831,6 @@ function createPathMergeParity(input) {
5764
5831
  ...confidenceFloor !== void 0 ? { confidenceFloor } : {}
5765
5832
  };
5766
5833
  }
5767
- function committedMergedBody(deps, mergedContent, incomingCitedContent) {
5768
- if (resolvePipelineProcessingCapabilities(deps.config).inlineSourceAttribution !== true || incomingCitedContent === void 0) {
5769
- return mergedContent;
5770
- }
5771
- const marker = lastCitationMarkerForTemplate(
5772
- incomingCitedContent,
5773
- deps.config.inlineSourceAttributionFormat
5774
- );
5775
- if (!marker || mergedContent.endsWith(marker)) return mergedContent;
5776
- return `${mergedContent} ${marker}`;
5777
- }
5778
5834
  function versioningConfigFrom(deps) {
5779
5835
  return {
5780
5836
  enabled: resolveRecallAuxiliaryCapabilities(deps.config).versioning,
@@ -5854,7 +5910,14 @@ async function applySemanticMergeAtPersist(deps, options) {
5854
5910
  if (target.content !== decision.targetContent) {
5855
5911
  return { action: "created", reason: "target_changed" };
5856
5912
  }
5857
- const committedContent = committedMergedBody(deps, decision.mergedContent, options.incomingCitedContent);
5913
+ const nowIso = (options.now ? options.now() : /* @__PURE__ */ new Date()).toISOString();
5914
+ const committedContent = committedMergedBody(
5915
+ deps,
5916
+ decision.mergedContent,
5917
+ options.incomingCitedContent,
5918
+ options.incomingCitationContext,
5919
+ nowIso
5920
+ );
5858
5921
  const parity = createPathMergeParity({
5859
5922
  target,
5860
5923
  incoming: options.incomingMetadata,
@@ -5907,7 +5970,6 @@ async function applySemanticMergeAtPersist(deps, options) {
5907
5970
  );
5908
5971
  }
5909
5972
  };
5910
- const nowIso = (options.now ? options.now() : /* @__PURE__ */ new Date()).toISOString();
5911
5973
  let casRevision;
5912
5974
  let mergePatch;
5913
5975
  try {
@@ -7674,6 +7736,7 @@ var ExtractionPersistCoordinator = class {
7674
7736
  skip: contradictionDetected || faithfulnessEnforceStatus === "pending_review" || batchBackendUnavailable || novelty.decision === "add",
7675
7737
  incomingLinks: links.length > 0 ? links : void 0,
7676
7738
  incomingCitedContent: citedFactContent,
7739
+ incomingCitationContext: citationContextBase,
7677
7740
  targetHasPromotedCopies: (targetId) => promotedCopyProbe.check(targetStorage, targetId)
7678
7741
  });
7679
7742
  if (semanticMerge.action === "created" && semanticMerge.reason === "backend_unavailable") batchBackendUnavailable = true;
@@ -8079,14 +8142,14 @@ async function drainExtractionAndShutdownDependencyPropagation(extractionQueue,
8079
8142
 
8080
8143
  // src/orchestration/dependency-propagation-delivery.ts
8081
8144
  import { randomUUID } from "crypto";
8082
- import { readFile as readFile3, unlink } from "fs/promises";
8145
+ import { readFile as readFile4, unlink } from "fs/promises";
8083
8146
  import path7 from "path";
8084
8147
 
8085
8148
  // src/orchestration/dependency-propagation-recovery-replay.ts
8086
- import { createHash as createHash3 } from "crypto";
8149
+ import { createHash as createHash4 } from "crypto";
8087
8150
  function memoryFingerprint(memory) {
8088
8151
  const { accessCount: _accessCount, lastAccessed: _lastAccessed, ...frontmatter } = memory.frontmatter;
8089
- return createHash3("sha256").update(JSON.stringify(canonicalize({ content: memory.content, frontmatter }))).digest("hex");
8152
+ return createHash4("sha256").update(JSON.stringify(canonicalize({ content: memory.content, frontmatter }))).digest("hex");
8090
8153
  }
8091
8154
  async function findRecoverySource(storage, sourceId) {
8092
8155
  const hot = await storage.getMemoryById(sourceId);
@@ -8256,7 +8319,7 @@ var DependencyPropagationDelivery = class {
8256
8319
  }, delayMs);
8257
8320
  timer.unref();
8258
8321
  });
8259
- this.readQueueFile = options.readQueueFile ?? ((filePath) => readFile3(filePath, "utf8"));
8322
+ this.readQueueFile = options.readQueueFile ?? ((filePath) => readFile4(filePath, "utf8"));
8260
8323
  this.writeQueueFile = options.writeQueueFile ?? ((filePath, content) => writeJsonFileAtomic(filePath, JSON.parse(content)));
8261
8324
  this.replayReconciliation = options.replayReconciliation;
8262
8325
  }
@@ -9103,8 +9166,8 @@ function createDependencyPropagationReplayReconciliation(host) {
9103
9166
  }
9104
9167
 
9105
9168
  // src/orchestration/recall-internal.ts
9106
- import { createHash as createHash5 } from "crypto";
9107
- import { readFile as readFile4, stat, unlink as unlink2 } from "fs/promises";
9169
+ import { createHash as createHash6 } from "crypto";
9170
+ import { readFile as readFile5, stat, unlink as unlink2 } from "fs/promises";
9108
9171
  import path11 from "path";
9109
9172
 
9110
9173
  // src/orchestration/graph-path-state-loader.ts
@@ -9352,7 +9415,7 @@ var GraphPathStateLoader = class {
9352
9415
  };
9353
9416
 
9354
9417
  // src/orchestration/graph-recall-coordinator.ts
9355
- import { createHash as createHash4 } from "crypto";
9418
+ import { createHash as createHash5 } from "crypto";
9356
9419
  import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
9357
9420
  import path9 from "path";
9358
9421
  function mergeGraphExpandedResults(primary, expanded) {
@@ -9740,7 +9803,7 @@ var GraphRecallCoordinator = class {
9740
9803
  const payload = {
9741
9804
  recordedAt: now,
9742
9805
  mode: options.recallMode,
9743
- queryHash: createHash4("sha256").update(options.prompt).digest("hex"),
9806
+ queryHash: createHash5("sha256").update(options.prompt).digest("hex"),
9744
9807
  queryLength: options.prompt.length,
9745
9808
  namespaces: options.recallNamespaces,
9746
9809
  seedCount: totalSeedCount,
@@ -10255,8 +10318,8 @@ var RecallInternalCoordinator = class {
10255
10318
  record: recordRecallSectionMetric,
10256
10319
  logger: log
10257
10320
  });
10258
- const promptHash = createHash5("sha256").update(prompt).digest("hex");
10259
- const traceId = createHash5("sha256").update(`${sessionKey ?? "default"}:${recallStart}:${promptHash}`).digest("hex").slice(0, 16);
10321
+ const promptHash = createHash6("sha256").update(prompt).digest("hex");
10322
+ const traceId = createHash6("sha256").update(`${sessionKey ?? "default"}:${recallStart}:${promptHash}`).digest("hex").slice(0, 16);
10260
10323
  const sectionBuckets = /* @__PURE__ */ new Map();
10261
10324
  const queryPolicy = buildRecallQueryPolicy(prompt, sessionKey, {
10262
10325
  cronRecallPolicyEnabled: resolveRecallAuxiliaryCapabilities(this.deps.config).cronRecallPolicy,
@@ -10265,13 +10328,9 @@ var RecallInternalCoordinator = class {
10265
10328
  cronConversationRecallMode: this.deps.config.cronConversationRecallMode
10266
10329
  });
10267
10330
  const retrievalQuery = queryPolicy.retrievalQuery || prompt;
10268
- const { stateViewActive, stateViewPacketActive: stateViewPacketActive2 } = resolveRecallStateViewFlags(
10269
- options.stateView,
10270
- this.deps.config.recallStateViews,
10271
- retrievalQuery,
10272
- asOfMs
10273
- );
10274
- const retrievalQueryHash = createHash5("sha256").update(retrievalQuery).digest("hex");
10331
+ const stateViewActive = resolveRecallStateViewActive(options, this.deps.config, prompt);
10332
+ const stateViewPacketActive2 = stateViewActive === true && !(typeof asOfMs === "number" && Number.isFinite(asOfMs));
10333
+ const retrievalQueryHash = createHash6("sha256").update(retrievalQuery).digest("hex");
10275
10334
  const policyVersion = this.deps.currentPolicyVersion();
10276
10335
  let recallSource = "none";
10277
10336
  let recalledMemoryCount = 0;
@@ -11957,7 +12016,7 @@ ${formatted}`;
11957
12016
  const signalStat = await stat(signalPath).catch(() => null);
11958
12017
  if (!signalStat) return null;
11959
12018
  const signalAge = Date.now() - signalStat.mtimeMs;
11960
- const signalData = JSON.parse(await readFile4(signalPath, "utf-8"));
12019
+ const signalData = JSON.parse(await readFile5(signalPath, "utf-8"));
11961
12020
  if (signalData.sessionKey !== effectiveSessionKey) {
11962
12021
  log.debug(
11963
12022
  `recall: compaction signal is for ${signalData.sessionKey}, not ${effectiveSessionKey} \u2014 skipping`
@@ -11977,7 +12036,7 @@ ${formatted}`;
11977
12036
 
11978
12037
  `;
11979
12038
  try {
11980
- const bootContent = await readFile4(bootPath, "utf-8");
12039
+ const bootContent = await readFile5(bootPath, "utf-8");
11981
12040
  section += "### BOOT.md (working state before compaction)\n\n";
11982
12041
  section += bootContent + "\n";
11983
12042
  } catch {
@@ -14237,7 +14296,7 @@ ${tmtNode.summary}`
14237
14296
  };
14238
14297
 
14239
14298
  // src/orchestration/recall-search-pipeline.ts
14240
- import { createHash as createHash6 } from "crypto";
14299
+ import { createHash as createHash7 } from "crypto";
14241
14300
  import path13 from "path";
14242
14301
 
14243
14302
  // src/orchestration/recall-search-prefilter.ts
@@ -14460,7 +14519,7 @@ var RecallSearchPipelineCoordinator = class {
14460
14519
  if (!options.onDebugSnapshot) return;
14461
14520
  await options.onDebugSnapshot({
14462
14521
  recordedAt: (/* @__PURE__ */ new Date()).toISOString(),
14463
- queryHash: createHash6("sha256").update(prompt).digest("hex"),
14522
+ queryHash: createHash7("sha256").update(prompt).digest("hex"),
14464
14523
  queryLength: prompt.length,
14465
14524
  collection: options.collection,
14466
14525
  namespaces: options.recallNamespaces,
@@ -15430,7 +15489,7 @@ var RecallSearchPipelineCoordinator = class {
15430
15489
  };
15431
15490
 
15432
15491
  // src/orchestration/turn-ingestion.ts
15433
- import { createHash as createHash7, randomBytes } from "crypto";
15492
+ import { createHash as createHash8, randomBytes } from "crypto";
15434
15493
  function isFlushPlanRecoveryTurn(turn) {
15435
15494
  const provenance = turn.importProvenance;
15436
15495
  if (provenance?.sourceLabel === "OpenClaw flush plan") return true;
@@ -15621,7 +15680,7 @@ var TurnIngestionCoordinator = class {
15621
15680
  const shouldUseStableBatchKey = turns.some(
15622
15681
  (turn) => turn.persistProcessedFingerprint === true || typeof turn.turnFingerprint === "string" && turn.turnFingerprint.length > 0
15623
15682
  );
15624
- const stableBatchFingerprint = shouldUseStableBatchKey ? createHash7("sha256").update(
15683
+ const stableBatchFingerprint = shouldUseStableBatchKey ? createHash8("sha256").update(
15625
15684
  turns.map(
15626
15685
  (turn) => [
15627
15686
  turn.role,
@@ -15967,7 +16026,7 @@ var TurnIngestionCoordinator = class {
15967
16026
  };
15968
16027
 
15969
16028
  // src/orchestration/recall-introspection.ts
15970
- import { mkdir as mkdir5, readFile as readFile6, writeFile as writeFile5 } from "fs/promises";
16029
+ import { mkdir as mkdir5, readFile as readFile7, writeFile as writeFile5 } from "fs/promises";
15971
16030
  import path15 from "path";
15972
16031
 
15973
16032
  // src/taxonomy/default-taxonomy.ts
@@ -16090,7 +16149,7 @@ function generateResolverDocument(taxonomy) {
16090
16149
  }
16091
16150
 
16092
16151
  // src/taxonomy/taxonomy-loader.ts
16093
- import { readFile as readFile5, mkdir as mkdir4, writeFile as writeFile4 } from "fs/promises";
16152
+ import { readFile as readFile6, mkdir as mkdir4, writeFile as writeFile4 } from "fs/promises";
16094
16153
  import path14 from "path";
16095
16154
  var TAXONOMY_DIR = ".taxonomy";
16096
16155
  var TAXONOMY_FILE = "taxonomy.json";
@@ -16192,7 +16251,7 @@ async function loadTaxonomy(memoryDir) {
16192
16251
  const taxonomyPath = path14.join(memoryDir, TAXONOMY_DIR, TAXONOMY_FILE);
16193
16252
  let raw;
16194
16253
  try {
16195
- raw = await readFile5(taxonomyPath, "utf-8");
16254
+ raw = await readFile6(taxonomyPath, "utf-8");
16196
16255
  } catch (err) {
16197
16256
  if (err instanceof Error && err.code === "ENOENT") {
16198
16257
  return structuredClone(DEFAULT_TAXONOMY);
@@ -16278,7 +16337,7 @@ var RecallIntrospectionCoordinator = class {
16278
16337
  "last_graph_recall.json"
16279
16338
  );
16280
16339
  try {
16281
- const raw = await readFile6(snapshotPath, "utf-8");
16340
+ const raw = await readFile7(snapshotPath, "utf-8");
16282
16341
  const parsed = JSON.parse(raw);
16283
16342
  if (!parsed || typeof parsed !== "object") return null;
16284
16343
  return {
@@ -16313,7 +16372,7 @@ var RecallIntrospectionCoordinator = class {
16313
16372
  const storage = await this.deps.getStorage(namespace);
16314
16373
  const snapshotPath = path15.join(storage.dir, "state", "last_intent.json");
16315
16374
  try {
16316
- const raw = await readFile6(snapshotPath, "utf-8");
16375
+ const raw = await readFile7(snapshotPath, "utf-8");
16317
16376
  const parsed = JSON.parse(raw);
16318
16377
  if (!parsed || typeof parsed !== "object") return null;
16319
16378
  const graphDecision = parsed.graphDecision && typeof parsed.graphDecision === "object" ? parsed.graphDecision : void 0;
@@ -16350,7 +16409,7 @@ var RecallIntrospectionCoordinator = class {
16350
16409
  "last_qmd_recall.json"
16351
16410
  );
16352
16411
  try {
16353
- const raw = await readFile6(snapshotPath, "utf-8");
16412
+ const raw = await readFile7(snapshotPath, "utf-8");
16354
16413
  const parsed = JSON.parse(raw);
16355
16414
  if (!parsed || typeof parsed !== "object") return null;
16356
16415
  return {
@@ -16689,15 +16748,214 @@ var RecallIntrospectionCoordinator = class {
16689
16748
  // src/orchestration/orchestrator-init.ts
16690
16749
  import { readdir as readdir2, stat as stat2, unlink as unlink3 } from "fs/promises";
16691
16750
  import path16 from "path";
16751
+
16752
+ // src/orchestration/startup-collection-checks.ts
16753
+ async function startupDiscoveryWithTimeout(discover, configuredFallback, timeoutMs = qmdStartupCollectionCheckTimeoutMs()) {
16754
+ let timer;
16755
+ const fallback = {
16756
+ value: configuredFallback,
16757
+ complete: false
16758
+ };
16759
+ const timeoutPromise = new Promise((resolve) => {
16760
+ timer = setTimeout(() => {
16761
+ log.warn(
16762
+ `startup discovery timed out after ${timeoutMs}ms; using configured fallback fail-open`
16763
+ );
16764
+ resolve(fallback);
16765
+ }, timeoutMs);
16766
+ });
16767
+ try {
16768
+ return await Promise.race([
16769
+ Promise.resolve().then(discover).then((value) => ({ value, complete: true })),
16770
+ timeoutPromise
16771
+ ]);
16772
+ } finally {
16773
+ if (timer) clearTimeout(timer);
16774
+ }
16775
+ }
16776
+ async function qmdStartupCollectionChecksWithTimeout(checks, namespaces, timeoutMs = qmdStartupCollectionCheckTimeoutMs() + 1e3) {
16777
+ if (checks.length === 0) return [];
16778
+ const settled = /* @__PURE__ */ new Map();
16779
+ const trackedChecks = checks.map((check) => check.then((result) => {
16780
+ settled.set(result.namespace, result);
16781
+ return result;
16782
+ }));
16783
+ let timer;
16784
+ const timeoutPromise = new Promise((resolve) => {
16785
+ timer = setTimeout(() => {
16786
+ log.warn(
16787
+ `QMD startup collection check batch timed out after ${timeoutMs}ms; keeping search enabled fail-open`
16788
+ );
16789
+ resolve(namespaces.map(
16790
+ (namespace) => settled.get(namespace) ?? { namespace, state: "unknown" }
16791
+ ));
16792
+ }, timeoutMs);
16793
+ });
16794
+ try {
16795
+ return await Promise.race([Promise.all(trackedChecks), timeoutPromise]);
16796
+ } finally {
16797
+ if (timer) clearTimeout(timer);
16798
+ }
16799
+ }
16800
+
16801
+ // src/orchestration/orchestrator-init.ts
16692
16802
  var OrchestratorInitCoordinator = class {
16693
16803
  constructor(deps) {
16694
16804
  this.deps = deps;
16695
16805
  }
16696
16806
  deps;
16807
+ nextStartupEpoch = 0;
16808
+ activeStartupEpoch = null;
16809
+ startupClosed = false;
16810
+ maintenanceNamespacesFlight;
16811
+ correctionCatalogFlight;
16812
+ recoveredCorrectionNamespaces = /* @__PURE__ */ new Set();
16813
+ correctionRecoveryChain = Promise.resolve();
16814
+ startupEpochAbort;
16815
+ /** Retire the current lifecycle without constructing a lazy coordinator. */
16816
+ retireStartupEpoch() {
16817
+ this.startupEpochAbort?.controller.abort();
16818
+ this.startupEpochAbort = void 0;
16819
+ this.startupClosed = true;
16820
+ this.activeStartupEpoch = null;
16821
+ }
16822
+ beginStartupEpoch() {
16823
+ this.startupEpochAbort?.controller.abort();
16824
+ this.startupEpochAbort = void 0;
16825
+ this.deps.deferredInitAbort?.abort();
16826
+ this.deps.deferredInitAbort = null;
16827
+ this.deps.deferredSyncSucceeded = false;
16828
+ const epoch = ++this.nextStartupEpoch;
16829
+ this.startupEpochAbort = { epoch, controller: new AbortController() };
16830
+ this.activeStartupEpoch = epoch;
16831
+ this.startupClosed = false;
16832
+ this.maintenanceNamespacesFlight = void 0;
16833
+ this.correctionCatalogFlight = void 0;
16834
+ this.recoveredCorrectionNamespaces = /* @__PURE__ */ new Set();
16835
+ this.correctionRecoveryChain = Promise.resolve();
16836
+ return epoch;
16837
+ }
16838
+ currentOrNewStartupEpoch() {
16839
+ if (this.startupClosed) return null;
16840
+ return this.activeStartupEpoch ?? this.beginStartupEpoch();
16841
+ }
16842
+ isCurrentStartupEpoch(epoch) {
16843
+ return !this.startupClosed && this.activeStartupEpoch === epoch;
16844
+ }
16845
+ startupEpochSignal(epoch) {
16846
+ return this.startupEpochAbort?.epoch === epoch ? this.startupEpochAbort.controller.signal : void 0;
16847
+ }
16848
+ linkedEpochAbortController(epoch, externalSignal) {
16849
+ const controller = new AbortController();
16850
+ const signals = [this.startupEpochSignal(epoch), externalSignal].filter((signal) => signal !== void 0);
16851
+ const abort = () => controller.abort();
16852
+ for (const signal of signals) {
16853
+ if (signal.aborted) abort();
16854
+ else signal.addEventListener("abort", abort, { once: true });
16855
+ }
16856
+ return {
16857
+ controller,
16858
+ dispose: () => {
16859
+ for (const signal of signals) signal.removeEventListener("abort", abort);
16860
+ }
16861
+ };
16862
+ }
16863
+ async probeForStartupEpoch(epoch, externalSignal) {
16864
+ const abort = this.linkedEpochAbortController(epoch, externalSignal);
16865
+ try {
16866
+ if (!this.isCurrentStartupEpoch(epoch) || abort.controller.signal.aborted) return false;
16867
+ return await this.deps.qmd.probe({ signal: abort.controller.signal });
16868
+ } finally {
16869
+ abort.dispose();
16870
+ }
16871
+ }
16872
+ maintenanceNamespacesFlightFor(epoch) {
16873
+ if (this.maintenanceNamespacesFlight?.epoch === epoch) {
16874
+ return this.maintenanceNamespacesFlight.promise;
16875
+ }
16876
+ const promise = Promise.resolve().then(() => {
16877
+ if (!this.isCurrentStartupEpoch(epoch)) return [];
16878
+ return this.deps.maintenanceNamespaces();
16879
+ });
16880
+ this.maintenanceNamespacesFlight = { epoch, promise };
16881
+ void promise.catch(() => {
16882
+ if (this.isCurrentStartupEpoch(epoch) && this.maintenanceNamespacesFlight?.epoch === epoch && this.maintenanceNamespacesFlight.promise === promise) {
16883
+ this.maintenanceNamespacesFlight = void 0;
16884
+ }
16885
+ });
16886
+ return promise;
16887
+ }
16888
+ correctionCatalogFlightFor(epoch) {
16889
+ if (!this.isCurrentStartupEpoch(epoch)) {
16890
+ return Promise.resolve([]);
16891
+ }
16892
+ if (this.correctionCatalogFlight?.epoch === epoch) {
16893
+ return this.correctionCatalogFlight.promise;
16894
+ }
16895
+ const promise = Promise.resolve().then(() => {
16896
+ if (!this.isCurrentStartupEpoch(epoch)) return [];
16897
+ return this.deps.namespaceCatalog.listNamespaces();
16898
+ });
16899
+ this.correctionCatalogFlight = { epoch, promise };
16900
+ return promise;
16901
+ }
16902
+ enqueueCorrectionRecovery(epoch, namespaces) {
16903
+ if (!this.isCurrentStartupEpoch(epoch)) return Promise.resolve();
16904
+ const unrecovered = [...new Set(namespaces)].filter(
16905
+ (namespace) => !this.recoveredCorrectionNamespaces.has(namespace)
16906
+ );
16907
+ if (unrecovered.length === 0) return this.correctionRecoveryChain;
16908
+ for (const namespace of unrecovered) this.recoveredCorrectionNamespaces.add(namespace);
16909
+ this.correctionRecoveryChain = this.correctionRecoveryChain.then(async () => {
16910
+ if (!this.isCurrentStartupEpoch(epoch)) return;
16911
+ try {
16912
+ const recovered = await this.deps.passiveCorrectionService().recoverStaleApplyingPlans(
16913
+ unrecovered
16914
+ );
16915
+ if (recovered > 0) {
16916
+ log.info(`correction: recovered ${recovered} stale applying plan(s) on startup`);
16917
+ }
16918
+ } catch (staleErr) {
16919
+ log.debug(`correction: stale-plan recovery skipped: ${staleErr instanceof Error ? staleErr.message : String(staleErr)}`);
16920
+ }
16921
+ });
16922
+ return this.correctionRecoveryChain;
16923
+ }
16924
+ async startupNamespaces(epoch) {
16925
+ if (!this.isCurrentStartupEpoch(epoch)) {
16926
+ return { namespaces: this.deps.configuredNamespaceList(), complete: false };
16927
+ }
16928
+ if (!resolveNamespaceCapabilities(this.deps.config).namespaces) {
16929
+ return { namespaces: [this.deps.config.defaultNamespace], complete: true };
16930
+ }
16931
+ const discovery = await startupDiscoveryWithTimeout(
16932
+ () => this.maintenanceNamespacesFlightFor(epoch),
16933
+ this.deps.configuredNamespaceList()
16934
+ );
16935
+ return { namespaces: discovery.value, complete: discovery.complete };
16936
+ }
16697
16937
  async initialize() {
16938
+ const epoch = this.beginStartupEpoch();
16939
+ let resolveDeferred;
16698
16940
  this.deps.deferredReady = new Promise((resolve) => {
16699
- this.deps.resolveDeferredReady = resolve;
16941
+ resolveDeferred = () => resolve();
16942
+ this.deps.resolveDeferredReady = resolveDeferred;
16700
16943
  });
16944
+ const settleOwnDeferredReady = () => {
16945
+ if (this.deps.resolveDeferredReady === resolveDeferred) {
16946
+ this.deps.resolveDeferredReady = null;
16947
+ }
16948
+ resolveDeferred?.();
16949
+ };
16950
+ const exitIfStale = () => {
16951
+ if (this.isCurrentStartupEpoch(epoch)) return false;
16952
+ if (this.startupClosed && this.deps.resolveInit) {
16953
+ this.deps.resolveInit();
16954
+ this.deps.resolveInit = null;
16955
+ }
16956
+ settleOwnDeferredReady();
16957
+ return true;
16958
+ };
16701
16959
  try {
16702
16960
  await migrateFromEngram({
16703
16961
  quiet: true,
@@ -16730,21 +16988,34 @@ var OrchestratorInitCoordinator = class {
16730
16988
  const correctionNamespaces = new Set(this.deps.configuredNamespaceList());
16731
16989
  if (this.deps.namespaceCatalog.enabled) {
16732
16990
  try {
16733
- for (const rec of await this.deps.namespaceCatalog.listNamespaces()) {
16991
+ const catalogFlight = this.correctionCatalogFlightFor(epoch);
16992
+ const catalogDiscovery = await startupDiscoveryWithTimeout(
16993
+ () => catalogFlight,
16994
+ []
16995
+ );
16996
+ for (const rec of catalogDiscovery.value) {
16734
16997
  correctionNamespaces.add(rec.namespace);
16735
16998
  }
16999
+ if (!catalogDiscovery.complete) {
17000
+ void catalogFlight.then(
17001
+ (records) => {
17002
+ if (!this.isCurrentStartupEpoch(epoch)) return;
17003
+ void this.enqueueCorrectionRecovery(
17004
+ epoch,
17005
+ records.map((record) => record.namespace)
17006
+ );
17007
+ },
17008
+ () => void 0
17009
+ );
17010
+ }
16736
17011
  } catch {
16737
17012
  }
16738
17013
  }
16739
- const recovered = await this.deps.passiveCorrectionService().recoverStaleApplyingPlans(
16740
- [...correctionNamespaces]
16741
- );
16742
- if (recovered > 0) {
16743
- log.info(`correction: recovered ${recovered} stale applying plan(s) on startup`);
16744
- }
17014
+ await this.enqueueCorrectionRecovery(epoch, correctionNamespaces);
16745
17015
  } catch (staleErr) {
16746
17016
  log.debug(`correction: stale-plan recovery skipped: ${staleErr instanceof Error ? staleErr.message : String(staleErr)}`);
16747
17017
  }
17018
+ if (exitIfStale()) return;
16748
17019
  await this.deps.relevance.load();
16749
17020
  await this.deps.negatives.load();
16750
17021
  await this.deps.lastRecall.load();
@@ -16805,52 +17076,68 @@ var OrchestratorInitCoordinator = class {
16805
17076
  }
16806
17077
  }
16807
17078
  try {
16808
- const available = await this.deps.qmd.probe();
17079
+ const available = await this.probeForStartupEpoch(epoch);
16809
17080
  if (available) {
16810
17081
  log.info(`Search backend: available ${this.deps.qmd.debugStatus()}`);
16811
- const namespaces = resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.maintenanceNamespaces() : [this.deps.config.defaultNamespace];
16812
- const states = await Promise.all(
16813
- namespaces.map(async (namespace) => {
16814
- const collectionCheckAbort = new AbortController();
16815
- const state = await qmdStartupCollectionCheckWithTimeout(
16816
- resolveNamespaceCapabilities(this.deps.config).namespaces ? this.deps.namespaceSearchRouter.ensureNamespaceCollection(
16817
- namespace,
16818
- { signal: collectionCheckAbort.signal }
16819
- ) : this.deps.qmd.ensureCollection(
16820
- this.deps.config.memoryDir,
16821
- this.deps.config.qmdCollection,
16822
- { signal: collectionCheckAbort.signal }
16823
- ),
16824
- collectionCheckAbort,
16825
- namespace
16826
- );
16827
- return { namespace, state };
16828
- })
16829
- );
16830
- const defaultState = states.find(
16831
- (entry) => entry.namespace === this.deps.config.defaultNamespace
16832
- )?.state ?? "unknown";
16833
- if (defaultState === "missing") {
16834
- await this.deps.disposeSearchBackendIfNeeded();
16835
- this.deps.qmd = new NoopSearchBackend();
16836
- log.warn(
16837
- "Search collection missing for Remnic memory store; disabling search retrieval for this runtime (fallback retrieval remains enabled)"
16838
- );
16839
- } else if (defaultState === "unknown") {
16840
- log.warn(
16841
- "Search collection check unavailable; keeping search retrieval enabled for fail-open behavior"
16842
- );
16843
- } else if (defaultState === "skipped") {
16844
- log.debug(
16845
- "Search collection check skipped (remote or daemon-only mode)"
16846
- );
16847
- }
16848
- for (const entry of states) {
16849
- if (entry.namespace === this.deps.config.defaultNamespace) continue;
16850
- if (entry.state === "missing") {
16851
- log.warn(
16852
- `Search collection missing for namespace '${entry.namespace}'; namespace retrieval will fail open to non-search paths`
16853
- );
17082
+ const namespaceCapabilities = resolveNamespaceCapabilities(this.deps.config).namespaces;
17083
+ const discovery = await this.startupNamespaces(epoch);
17084
+ if (!this.isCurrentStartupEpoch(epoch)) {
17085
+ log.debug("startup collection check skipped for a retired startup epoch");
17086
+ } else {
17087
+ const checks = discovery.namespaces.map(async (namespace) => {
17088
+ const epochAbort = this.linkedEpochAbortController(epoch);
17089
+ try {
17090
+ const state = await qmdStartupCollectionCheckWithTimeout(
17091
+ namespaceCapabilities ? this.deps.namespaceSearchRouter.ensureNamespaceCollection(
17092
+ namespace,
17093
+ { signal: epochAbort.controller.signal }
17094
+ ) : this.deps.qmd.ensureCollection(
17095
+ this.deps.config.memoryDir,
17096
+ this.deps.config.qmdCollection,
17097
+ { signal: epochAbort.controller.signal }
17098
+ ),
17099
+ epochAbort.controller,
17100
+ namespace
17101
+ );
17102
+ return { namespace, state };
17103
+ } finally {
17104
+ epochAbort.dispose();
17105
+ }
17106
+ });
17107
+ const states = await qmdStartupCollectionChecksWithTimeout(checks, discovery.namespaces);
17108
+ if (!this.isCurrentStartupEpoch(epoch)) {
17109
+ log.debug("startup collection-check batch completed for a retired startup epoch");
17110
+ } else {
17111
+ const defaultState = states.find(
17112
+ (entry) => entry.namespace === this.deps.config.defaultNamespace
17113
+ )?.state ?? "unknown";
17114
+ if (defaultState === "missing") {
17115
+ await this.deps.disposeSearchBackendIfNeeded();
17116
+ if (!this.isCurrentStartupEpoch(epoch)) {
17117
+ log.debug("startup collection-check disposal completed for a retired startup epoch");
17118
+ } else {
17119
+ this.deps.qmd = new NoopSearchBackend();
17120
+ log.warn(
17121
+ "Search collection missing for Remnic memory store; disabling search retrieval for this runtime (fallback retrieval remains enabled)"
17122
+ );
17123
+ }
17124
+ } else if (defaultState === "unknown") {
17125
+ log.warn(
17126
+ "Search collection check unavailable; keeping search retrieval enabled for fail-open behavior"
17127
+ );
17128
+ } else if (defaultState === "skipped") {
17129
+ log.debug(
17130
+ "Search collection check skipped (remote or daemon-only mode)"
17131
+ );
17132
+ }
17133
+ for (const entry of states) {
17134
+ if (entry.namespace === this.deps.config.defaultNamespace) continue;
17135
+ if (entry.state === "missing") {
17136
+ log.warn(
17137
+ `Search collection missing for namespace '${entry.namespace}'; namespace retrieval will fail open to non-search paths`
17138
+ );
17139
+ }
17140
+ }
16854
17141
  }
16855
17142
  }
16856
17143
  } else if (this.deps.qmd instanceof NoopSearchBackend) {
@@ -16861,46 +17148,55 @@ var OrchestratorInitCoordinator = class {
16861
17148
  } catch (err) {
16862
17149
  log.error(`QMD probe/collection check failed (non-fatal): ${err}`);
16863
17150
  }
17151
+ if (exitIfStale()) return;
16864
17152
  if (this.deps.resolveInit) {
16865
17153
  this.deps.resolveInit();
16866
17154
  this.deps.resolveInit = null;
16867
17155
  log.info("init gate opened (essential state + QMD state loaded)");
16868
17156
  }
16869
- const resolveDeferred = this.deps.resolveDeferredReady;
16870
- this.deps.resolveDeferredReady = null;
17157
+ if (this.deps.resolveDeferredReady === resolveDeferred) {
17158
+ this.deps.resolveDeferredReady = null;
17159
+ }
16871
17160
  this.deps.deferredInitAbort = new AbortController();
16872
17161
  this.deps.deferredInitialize(this.deps.deferredInitAbort.signal).catch((err) => {
16873
17162
  log.error(`deferred initialization failed (non-fatal): ${err}`);
16874
17163
  }).finally(() => {
16875
- resolveDeferred?.();
17164
+ settleOwnDeferredReady();
16876
17165
  });
16877
17166
  } catch (err) {
16878
- if (this.deps.resolveInit) {
17167
+ if ((this.isCurrentStartupEpoch(epoch) || this.startupClosed) && this.deps.resolveInit) {
16879
17168
  this.deps.resolveInit();
16880
17169
  this.deps.resolveInit = null;
16881
17170
  }
16882
- if (this.deps.resolveDeferredReady) {
16883
- this.deps.resolveDeferredReady();
16884
- this.deps.resolveDeferredReady = null;
16885
- }
17171
+ settleOwnDeferredReady();
16886
17172
  throw err;
16887
17173
  }
16888
17174
  }
16889
17175
  async deferredInitialize(signal) {
17176
+ const epoch = this.currentOrNewStartupEpoch();
17177
+ if (epoch === null) return;
16890
17178
  const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.deps.config);
16891
17179
  if (this.deps.qmd.isAvailable() && resolveQmdCapabilities(this.deps.config).qmdMaintenance) {
16892
17180
  try {
16893
17181
  log.info("QMD startup sync: updating index to match current disk state");
17182
+ const discovery = await this.startupNamespaces(epoch);
17183
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16894
17184
  if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
16895
17185
  await this.deps.namespaceSearchRouter.updateNamespaces(
16896
- await this.deps.maintenanceNamespaces(),
17186
+ discovery.namespaces,
16897
17187
  { signal }
16898
17188
  );
16899
17189
  } else {
16900
17190
  await this.deps.qmd.update({ signal });
16901
17191
  }
17192
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16902
17193
  log.info("QMD startup sync: complete");
16903
- this.deps.deferredSyncSucceeded = true;
17194
+ if (discovery.complete) {
17195
+ this.deps.deferredSyncSucceeded = true;
17196
+ } else {
17197
+ this.deps.deferredSyncSucceeded = false;
17198
+ log.warn("QMD startup sync used configured namespace fallback; retry remains armed");
17199
+ }
16904
17200
  } catch (err) {
16905
17201
  log.warn(`QMD startup sync failed (non-fatal): ${err}`);
16906
17202
  }
@@ -16908,7 +17204,7 @@ var OrchestratorInitCoordinator = class {
16908
17204
  } else {
16909
17205
  this.deps.deferredSyncSucceeded = true;
16910
17206
  }
16911
- if (signal.aborted) return;
17207
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16912
17208
  const warmupPromises = [];
16913
17209
  if (this.deps.qmd.isAvailable()) {
16914
17210
  const warmupNs = this.deps.config.defaultNamespace;
@@ -16933,7 +17229,7 @@ var OrchestratorInitCoordinator = class {
16933
17229
  );
16934
17230
  }
16935
17231
  await Promise.all(warmupPromises);
16936
- if (signal.aborted) return;
17232
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16937
17233
  const cacheWarmups = [];
16938
17234
  if (resolveRecallAuxiliaryCapabilities(this.deps.config).knowledgeIndex) {
16939
17235
  cacheWarmups.push(
@@ -16955,10 +17251,11 @@ var OrchestratorInitCoordinator = class {
16955
17251
  }).catch(() => {
16956
17252
  }));
16957
17253
  await Promise.all(cacheWarmups);
16958
- if (signal.aborted) return;
17254
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16959
17255
  if (resolveIndexingCapabilities(this.deps.config).conversationIndex && this.deps.conversationIndexBackend) {
16960
17256
  try {
16961
17257
  const init = await this.deps.conversationIndexBackend.initialize();
17258
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16962
17259
  if (!init.enabled) {
16963
17260
  this.deps.config.conversationIndexEnabled = false;
16964
17261
  }
@@ -16970,11 +17267,12 @@ var OrchestratorInitCoordinator = class {
16970
17267
  log.debug(init.message);
16971
17268
  }
16972
17269
  } catch (err) {
17270
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16973
17271
  log.error(`Conversation index initialization failed (non-fatal): ${err}`);
16974
17272
  this.deps.config.conversationIndexEnabled = false;
16975
17273
  }
16976
17274
  }
16977
- if (signal.aborted) return;
17275
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16978
17276
  if (resolveLocalLlmCapabilities(this.deps.config).localLlm) {
16979
17277
  try {
16980
17278
  await this.deps.validateLocalLlmModel();
@@ -16982,12 +17280,13 @@ var OrchestratorInitCoordinator = class {
16982
17280
  log.error(`Local LLM validation failed (non-fatal): ${err}`);
16983
17281
  }
16984
17282
  }
16985
- if (signal.aborted) return;
17283
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16986
17284
  await this.deps.maintenanceScheduler.autoRegisterCrons(signal);
16987
- if (signal.aborted) return;
17285
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16988
17286
  if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
16989
17287
  try {
16990
- const { runFirstStartMigration } = await import("./first-start-migration-ZWMV5CX4.js");
17288
+ const { runFirstStartMigration } = await import("./first-start-migration-L3UFX5CU.js");
17289
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
16991
17290
  const result = await runFirstStartMigration({
16992
17291
  storage: this.deps.storage,
16993
17292
  config: this.deps.config,
@@ -17007,11 +17306,11 @@ var OrchestratorInitCoordinator = class {
17007
17306
  log.warn(`first-start lifecycle migration failed (non-fatal): ${err}`);
17008
17307
  }
17009
17308
  }
17010
- if (signal.aborted) return;
17309
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
17011
17310
  if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
17012
17311
  try {
17013
- const { startWearablesAutoSync } = await import("./auto-sync-RP4C6ZPF.js");
17014
- if (signal.aborted) return;
17312
+ const { startWearablesAutoSync } = await import("./auto-sync-7PGUFY7U.js");
17313
+ if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
17015
17314
  this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
17016
17315
  {
17017
17316
  intervalMinutes: this.deps.config.wearables.autoSyncIntervalMinutes,
@@ -17057,33 +17356,58 @@ var OrchestratorInitCoordinator = class {
17057
17356
  */
17058
17357
  async startupSearchSync(signal) {
17059
17358
  if (signal?.aborted) return false;
17060
- const available = await this.deps.qmd.probe();
17359
+ const epoch = this.currentOrNewStartupEpoch();
17360
+ if (epoch === null) return false;
17361
+ const available = await this.probeForStartupEpoch(epoch, signal);
17061
17362
  if (!available) return false;
17062
- if (signal?.aborted) {
17063
- log.debug("startupSearchSync: aborted after probe");
17363
+ if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
17364
+ log.debug("startupSearchSync: aborted or retired after probe");
17064
17365
  return false;
17065
17366
  }
17066
17367
  log.info(`startupSearchSync: backend now available ${this.deps.qmd.debugStatus()}`);
17067
17368
  if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
17068
17369
  this.deps.namespaceSearchRouter.clearCache();
17069
17370
  }
17070
- const namespaces = resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.maintenanceNamespaces() : [this.deps.config.defaultNamespace];
17371
+ const discovery = await this.startupNamespaces(epoch);
17372
+ if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
17373
+ log.debug("startupSearchSync: aborted or retired after namespace discovery");
17374
+ return false;
17375
+ }
17376
+ const namespaces = discovery.namespaces;
17071
17377
  const states = await Promise.all(
17072
- namespaces.map(async (namespace) => ({
17073
- namespace,
17074
- state: resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.namespaceSearchRouter.ensureNamespaceCollection(namespace, { signal }) : await this.deps.qmd.ensureCollection(this.deps.config.memoryDir, this.deps.config.qmdCollection, { signal })
17075
- }))
17378
+ namespaces.map(async (namespace) => {
17379
+ const epochAbort = this.linkedEpochAbortController(epoch, signal);
17380
+ try {
17381
+ return {
17382
+ namespace,
17383
+ state: resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.namespaceSearchRouter.ensureNamespaceCollection(
17384
+ namespace,
17385
+ { signal: epochAbort.controller.signal }
17386
+ ) : await this.deps.qmd.ensureCollection(
17387
+ this.deps.config.memoryDir,
17388
+ this.deps.config.qmdCollection,
17389
+ { signal: epochAbort.controller.signal }
17390
+ )
17391
+ };
17392
+ } finally {
17393
+ epochAbort.dispose();
17394
+ }
17395
+ })
17076
17396
  );
17077
- if (signal?.aborted) {
17078
- log.debug("startupSearchSync: aborted after ensureCollection");
17397
+ if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
17398
+ log.debug("startupSearchSync: aborted or retired after ensureCollection");
17079
17399
  return false;
17080
17400
  }
17081
17401
  const defaultState = states.find((e) => e.namespace === this.deps.config.defaultNamespace)?.state ?? "unknown";
17082
17402
  if (defaultState === "missing") {
17403
+ await this.deps.disposeSearchBackendIfNeeded();
17404
+ if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
17405
+ log.debug("startupSearchSync: aborted or retired while disposing a missing backend");
17406
+ return false;
17407
+ }
17083
17408
  if ("available" in this.deps.qmd) {
17084
17409
  this.deps.qmd.available = false;
17085
17410
  }
17086
- await this.deps.disposeSearchBackendIfNeeded();
17087
17411
  this.deps.qmd = new NoopSearchBackend();
17088
17412
  log.warn("startupSearchSync: search collection missing; disabling search (fallback retrieval remains enabled)");
17089
17413
  return false;
@@ -17096,17 +17420,22 @@ var OrchestratorInitCoordinator = class {
17096
17420
  this.deps.qmd.resetUpdateThrottles();
17097
17421
  }
17098
17422
  log.info("startupSearchSync: updating index to match current disk state");
17423
+ const updateAbort = this.linkedEpochAbortController(epoch, signal);
17099
17424
  let namespacesUpdated = 0;
17100
- if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
17101
- namespacesUpdated = await this.deps.namespaceSearchRouter.updateNamespaces(
17102
- namespaces,
17103
- { signal }
17104
- );
17105
- } else {
17106
- await this.deps.qmd.update({ signal });
17425
+ try {
17426
+ if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
17427
+ namespacesUpdated = await this.deps.namespaceSearchRouter.updateNamespaces(
17428
+ namespaces,
17429
+ { signal: updateAbort.controller.signal }
17430
+ );
17431
+ } else {
17432
+ await this.deps.qmd.update({ signal: updateAbort.controller.signal });
17433
+ }
17434
+ } finally {
17435
+ updateAbort.dispose();
17107
17436
  }
17108
- if (signal?.aborted) {
17109
- log.debug("startupSearchSync: aborted after update");
17437
+ if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
17438
+ log.debug("startupSearchSync: aborted or retired after update");
17110
17439
  return false;
17111
17440
  }
17112
17441
  const failTsAfter = "lastUpdateFailedAtMs" in this.deps.qmd ? this.deps.qmd.lastUpdateFailedAtMs : null;
@@ -17131,15 +17460,24 @@ var OrchestratorInitCoordinator = class {
17131
17460
  return false;
17132
17461
  }
17133
17462
  }
17134
- if (!signal?.aborted) {
17463
+ if (!signal?.aborted && this.isCurrentStartupEpoch(epoch)) {
17464
+ const warmupAbort = this.linkedEpochAbortController(epoch, signal);
17135
17465
  try {
17136
- await this.deps.qmd.search("warmup", this.deps.config.defaultNamespace, 1, void 0, { signal });
17466
+ await this.deps.qmd.search(
17467
+ "warmup",
17468
+ this.deps.config.defaultNamespace,
17469
+ 1,
17470
+ void 0,
17471
+ { signal: warmupAbort.controller.signal }
17472
+ );
17137
17473
  log.info("startupSearchSync: warmup complete");
17138
17474
  } catch (err) {
17139
17475
  log.debug(`startupSearchSync: warmup search failed (non-fatal): ${err}`);
17476
+ } finally {
17477
+ warmupAbort.dispose();
17140
17478
  }
17141
17479
  }
17142
- return true;
17480
+ return discovery.complete;
17143
17481
  }
17144
17482
  };
17145
17483
 
@@ -17490,7 +17828,7 @@ var PersistenceIndexCoordinator = class {
17490
17828
  };
17491
17829
 
17492
17830
  // src/orchestration/workspace-ops.ts
17493
- import { lstat as lstat2, mkdir as mkdir6, readFile as readFile7, readdir as readdir3, realpath as realpath2, writeFile as writeFile6 } from "fs/promises";
17831
+ import { lstat as lstat2, mkdir as mkdir6, readFile as readFile8, readdir as readdir3, realpath as realpath2, writeFile as writeFile6 } from "fs/promises";
17494
17832
  import path18 from "path";
17495
17833
 
17496
17834
  // src/maintenance/pattern-reinforcement.ts
@@ -19492,7 +19830,7 @@ var WorkspaceOpsCoordinator = class {
19492
19830
  for (const rel of hygiene.rotatePaths) {
19493
19831
  const abs = path18.isAbsolute(rel) ? rel : path18.join(this.deps.config.workspaceDir, rel);
19494
19832
  try {
19495
- const raw = await readFile7(abs, "utf-8");
19833
+ const raw = await readFile8(abs, "utf-8");
19496
19834
  if (raw.length > hygiene.rotateMaxBytes) {
19497
19835
  const archiveDir = path18.join(
19498
19836
  this.deps.config.workspaceDir,
@@ -19533,7 +19871,7 @@ var WorkspaceOpsCoordinator = class {
19533
19871
  ` + warnings.map((w) => `- ${w.message}`).join("\n") + "\n";
19534
19872
  let existing = "";
19535
19873
  try {
19536
- existing = await readFile7(fp, "utf-8");
19874
+ existing = await readFile8(fp, "utf-8");
19537
19875
  } catch {
19538
19876
  existing = "# Engram File Hygiene Warnings\n";
19539
19877
  }
@@ -19603,7 +19941,7 @@ var WorkspaceOpsCoordinator = class {
19603
19941
  for (const date of datesToScan) {
19604
19942
  const summaryFile = path18.join(hourlyBaseDir, sk.name, `${date}.md`);
19605
19943
  try {
19606
- const raw = await readFile7(summaryFile, "utf-8");
19944
+ const raw = await readFile8(summaryFile, "utf-8");
19607
19945
  const filtered = filterHourlySummaryMarkdownForLocalDay(
19608
19946
  raw,
19609
19947
  date,
@@ -20557,6 +20895,7 @@ var RecallEntryCoordinator = class {
20557
20895
  options.asOfMs
20558
20896
  );
20559
20897
  if (injectable.length === 0) return;
20898
+ const packetKeys = stateViewPacketActive(options.stateViewActive === true, options.asOfMs) ? stateViewPacketKeys(injectable) : [];
20560
20899
  const formatted = this.deps.recallResultFormatter.formatQmdResultEntries(
20561
20900
  options.title,
20562
20901
  injectable,
@@ -20580,7 +20919,8 @@ var RecallEntryCoordinator = class {
20580
20919
  atomic: true,
20581
20920
  ...memoryId ? { memoryId } : {},
20582
20921
  ...result.path ? { memoryPath: result.path } : {},
20583
- ...result.namespace ? { memoryNamespace: result.namespace } : {}
20922
+ ...result.namespace ? { memoryNamespace: result.namespace } : {},
20923
+ ...packetKeys[index] && resultStateViewKey(result) ? { packetKey: packetKeys[index] } : {}
20584
20924
  }
20585
20925
  );
20586
20926
  }
@@ -21001,6 +21341,10 @@ var Orchestrator = class {
21001
21341
  this.deferredInitAbort = null;
21002
21342
  }
21003
21343
  }
21344
+ async disposeSearchBackendIfNeeded() {
21345
+ await this.namespaceSearchRouter.disableSearchBackends();
21346
+ await this.qmd.dispose?.();
21347
+ }
21004
21348
  /** Track a recall-side write so destroy() can wait for it before teardown. @internal */
21005
21349
  trackRecallBackgroundWrite(promise, label) {
21006
21350
  trackRecallWrite(this, promise, label);
@@ -21011,6 +21355,7 @@ var Orchestrator = class {
21011
21355
  * commands should call it before returning to let Node exit naturally.
21012
21356
  */
21013
21357
  async destroy() {
21358
+ this._orchestratorInitCoordinator?.retireStartupEpoch();
21014
21359
  this.abortDeferredInit();
21015
21360
  this.extractionQueueCoordinator.stopAccepting();
21016
21361
  if (this.wearablesAutoSyncHandle) {
@@ -21649,7 +21994,7 @@ var Orchestrator = class {
21649
21994
  utilityPromoteThresholdDelta: this.utilityRuntimeValues?.promoteThresholdDelta ?? 0,
21650
21995
  utilityDemoteThresholdDelta: this.utilityRuntimeValues?.demoteThresholdDelta ?? 0
21651
21996
  };
21652
- return createHash8("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 12);
21997
+ return createHash9("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 12);
21653
21998
  }
21654
21999
  effectiveLifecycleThresholds() {
21655
22000
  const archiveDecayThreshold = this.config.lifecycleArchiveDecayThreshold;
@@ -27403,7 +27748,12 @@ async function runTimelineCliCommand(deps, args, io) {
27403
27748
  io.stderr.write("timeline publish requires the Remnic config \u2014 run `remnic doctor`\n");
27404
27749
  return 1;
27405
27750
  }
27406
- const publishFlags = parseFlags(rest, PUBLISH_FLAGS).flags;
27751
+ const { flags: publishFlags, positional } = parseFlags(rest, PUBLISH_FLAGS);
27752
+ if (positional.length > 0) {
27753
+ throw new TypeError(
27754
+ `timeline publish takes no positional arguments (got ${JSON.stringify(positional.join(" "))})`
27755
+ );
27756
+ }
27407
27757
  return runTimelinePublishCli(
27408
27758
  deps.config,
27409
27759
  {
@@ -28481,7 +28831,7 @@ function readVerifiedDailyNote(root, filePath) {
28481
28831
  }
28482
28832
 
28483
28833
  // src/activity/journal-state.ts
28484
- import { createHash as createHash9, randomBytes as randomBytes4 } from "crypto";
28834
+ import { createHash as createHash10, randomBytes as randomBytes4 } from "crypto";
28485
28835
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "fs";
28486
28836
  import path35 from "path";
28487
28837
  var STATE_DIR_NAME = "state";
@@ -28490,7 +28840,7 @@ function timelineStatePath(memoryDir) {
28490
28840
  return path35.join(memoryDir, STATE_DIR_NAME, STATE_FILE_NAME);
28491
28841
  }
28492
28842
  function hashJournalText(text) {
28493
- return createHash9("sha256").update(text, "utf8").digest("hex");
28843
+ return createHash10("sha256").update(text, "utf8").digest("hex");
28494
28844
  }
28495
28845
  function readTimelineState(memoryDir) {
28496
28846
  const filePath = timelineStatePath(memoryDir);
@@ -29211,31 +29561,6 @@ function filterPrivacyWindow(items, options) {
29211
29561
  });
29212
29562
  }
29213
29563
 
29214
- // src/activity/vault-frontmatter.ts
29215
- function assertNoNewlineKey(key) {
29216
- if (key.includes("\n") || key.includes("\r")) {
29217
- throw new RangeError("Vault frontmatter keys must not contain newlines.");
29218
- }
29219
- }
29220
- function applyVaultFrontmatter(existingYaml, updates) {
29221
- const entries = Object.entries(updates);
29222
- if (entries.length === 0) return existingYaml;
29223
- const merged = /* @__PURE__ */ new Map();
29224
- for (const line of existingYaml.split("\n")) {
29225
- const idx = line.indexOf(":");
29226
- if (idx === -1) continue;
29227
- const key = line.slice(0, idx).trim();
29228
- if (key.length === 0) continue;
29229
- assertNoNewlineKey(key);
29230
- merged.set(key, line.slice(idx + 1).trim());
29231
- }
29232
- for (const [key, value] of entries) {
29233
- assertNoNewlineKey(key);
29234
- merged.set(key, value);
29235
- }
29236
- return [...merged.keys()].sort((a, b) => a < b ? -1 : a > b ? 1 : 0).map((key) => `${key}: ${merged.get(key)}`).join("\n");
29237
- }
29238
-
29239
29564
  // src/activity/vault-wikilink.ts
29240
29565
  import path36 from "path";
29241
29566
  function formatVaultWikilink(notePath) {
@@ -29335,8 +29660,8 @@ function planVaultDryRun(inputs) {
29335
29660
  }
29336
29661
 
29337
29662
  // src/session-summaries/index.ts
29338
- import { createHash as createHash10 } from "crypto";
29339
- import { lstat as lstat3, mkdir as mkdir7, readFile as readFile8, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
29663
+ import { createHash as createHash11 } from "crypto";
29664
+ import { lstat as lstat3, mkdir as mkdir7, readFile as readFile9, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
29340
29665
  import path38 from "path";
29341
29666
 
29342
29667
  // src/session-summaries/adapters.ts
@@ -29837,7 +30162,7 @@ var DEFAULT_MAX_FILES = 5e3;
29837
30162
  var DEFAULT_MAX_SESSIONS = 500;
29838
30163
  var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".json", ".jsonl"]);
29839
30164
  function shortHash(value, length = 16) {
29840
- return createHash10("sha256").update(value).digest("hex").slice(0, length);
30165
+ return createHash11("sha256").update(value).digest("hex").slice(0, length);
29841
30166
  }
29842
30167
  async function listTranscriptFiles(root, maxFiles) {
29843
30168
  const out = [];
@@ -30031,7 +30356,7 @@ async function collectLocalSessionSummaries(options) {
30031
30356
  });
30032
30357
  }
30033
30358
  for (const filePath of files) {
30034
- const content = await readFile8(filePath, "utf-8");
30359
+ const content = await readFile9(filePath, "utf-8");
30035
30360
  const fileHash = shortHash(content, 24);
30036
30361
  if (seenFileHashes.has(fileHash)) {
30037
30362
  warnings.push({
@@ -30102,7 +30427,7 @@ async function collectLocalSessionSummaries(options) {
30102
30427
  }
30103
30428
  async function readRedactionConfig(pathLike) {
30104
30429
  if (!pathLike) return void 0;
30105
- const raw = await readFile8(path38.resolve(expandTildePath(pathLike)), "utf-8");
30430
+ const raw = await readFile9(path38.resolve(expandTildePath(pathLike)), "utf-8");
30106
30431
  const parsed = JSON.parse(raw);
30107
30432
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
30108
30433
  throw new Error("redaction config must be a JSON object");
@@ -30175,7 +30500,7 @@ async function runLocalSessionSummaryCliCommand(options) {
30175
30500
  }
30176
30501
 
30177
30502
  // src/transfer/capsule-fork.ts
30178
- import { lstat as lstat4, mkdir as mkdir8, readFile as readFile9, realpath as realpath3, writeFile as writeFile8 } from "fs/promises";
30503
+ import { lstat as lstat4, mkdir as mkdir8, readFile as readFile10, realpath as realpath3, writeFile as writeFile8 } from "fs/promises";
30179
30504
  import path39 from "path";
30180
30505
  async function forkCapsule(opts) {
30181
30506
  validateForkId(opts.forkId);
@@ -30237,7 +30562,7 @@ async function readForkLineage(targetRoot, forkId) {
30237
30562
  if (!await isLineagePathContained(rootReal, lineagePath)) {
30238
30563
  return null;
30239
30564
  }
30240
- const raw = await readFile9(lineagePath, "utf-8").catch(() => null);
30565
+ const raw = await readFile10(lineagePath, "utf-8").catch(() => null);
30241
30566
  if (raw === null) return null;
30242
30567
  try {
30243
30568
  const parsed = JSON.parse(raw);
@@ -30431,7 +30756,6 @@ export {
30431
30756
  ACTIVITY_FEATURE_GATES,
30432
30757
  resolveActivityGates,
30433
30758
  filterPrivacyWindow,
30434
- applyVaultFrontmatter,
30435
30759
  formatVaultWikilink,
30436
30760
  stripVaultMdSuffix,
30437
30761
  joinVaultSegments,
@@ -30467,6 +30791,7 @@ export {
30467
30791
  mergeGraphExpandedResults,
30468
30792
  graphPathRelativeToStorage,
30469
30793
  blendGraphExpandedRecallScore,
30794
+ qmdStartupCollectionChecksWithTimeout,
30470
30795
  Orchestrator
30471
30796
  };
30472
- //# sourceMappingURL=chunk-LPYYY4AP.js.map
30797
+ //# sourceMappingURL=chunk-I46BYY7U.js.map