@remnic/core 9.69.40 → 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 (657) hide show
  1. package/dist/access-admin-ops-surface.d.ts +13 -13
  2. package/dist/access-admin-ops-surface.js +69 -68
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-authorization-probe.d.ts +13 -13
  5. package/dist/access-authorization-probe.js +70 -69
  6. package/dist/access-boundary.d.ts +13 -13
  7. package/dist/access-boundary.js +69 -68
  8. package/dist/access-cli.js +157 -155
  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 +13 -13
  12. package/dist/access-extraction-force-flush.js +69 -68
  13. package/dist/access-health-types.d.ts +1 -1
  14. package/dist/access-http-briefing.d.ts +13 -13
  15. package/dist/access-http-briefing.js +70 -69
  16. package/dist/access-http-lcm-compaction.d.ts +13 -13
  17. package/dist/access-http-lifecycle-flush.d.ts +13 -13
  18. package/dist/access-http-offline-stream.d.ts +13 -13
  19. package/dist/access-http-query.d.ts +2 -2
  20. package/dist/access-http-query.js +71 -70
  21. package/dist/access-http.d.ts +14 -14
  22. package/dist/access-http.js +90 -87
  23. package/dist/access-identity-continuity-surface.d.ts +11 -11
  24. package/dist/access-identity-continuity-surface.js +69 -68
  25. package/dist/access-lcm-surface.d.ts +13 -13
  26. package/dist/access-lcm-surface.js +69 -68
  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 +13 -13
  30. package/dist/access-mcp.js +81 -78
  31. package/dist/access-memory-search-fanout.d.ts +2 -2
  32. package/dist/{access-namespace-preflight-CKBumJ8W.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 +69 -68
  35. package/dist/access-observe-transcript.d.ts +11 -11
  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 +13 -13
  39. package/dist/access-observe-write-surface.js +69 -68
  40. package/dist/access-offline-manifest.d.ts +11 -11
  41. package/dist/access-offline-manifest.js +9 -9
  42. package/dist/access-operations-batch.js +74 -72
  43. package/dist/access-operations.d.ts +13 -13
  44. package/dist/access-operations.js +79 -77
  45. package/dist/access-recall-concurrency.d.ts +13 -13
  46. package/dist/access-recall-concurrency.js +69 -68
  47. package/dist/access-recall-response.d.ts +13 -13
  48. package/dist/access-recall-response.js +69 -68
  49. package/dist/access-recall-surface.d.ts +13 -13
  50. package/dist/access-recall-surface.js +69 -68
  51. package/dist/access-schema.d.ts +1 -1
  52. package/dist/access-schema.js +3 -3
  53. package/dist/{access-service-DJ3qogNt.d.ts → access-service-Cisy5YDq.d.ts} +14 -9
  54. package/dist/access-service-helpers.d.ts +13 -13
  55. package/dist/access-service.d.ts +13 -13
  56. package/dist/access-service.js +69 -68
  57. package/dist/access-surface-catalog.d.ts +13 -13
  58. package/dist/access-surface-catalog.js +71 -70
  59. package/dist/access-surface-catalog.js.map +1 -1
  60. package/dist/access-wearables-meetings-surface.d.ts +4 -4
  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 +6 -6
  66. package/dist/activity/digest.d.ts +1 -1
  67. package/dist/ambient-provenance.d.ts +1 -1
  68. package/dist/artifact-search.d.ts +1 -1
  69. package/dist/{auto-sync-D6BAPIJV.js → auto-sync-7PGUFY7U.js} +7 -7
  70. package/dist/background-generation.d.ts +1 -1
  71. package/dist/behavior-learner.d.ts +1 -1
  72. package/dist/behavior-signals.d.ts +1 -1
  73. package/dist/bootstrap.d.ts +11 -11
  74. package/dist/briefing-window.d.ts +2 -2
  75. package/dist/briefing.d.ts +2 -2
  76. package/dist/briefing.js +17 -17
  77. package/dist/buffer-surprise-report.d.ts +1 -1
  78. package/dist/buffer-turn-helpers.d.ts +1 -1
  79. package/dist/buffer.d.ts +2 -2
  80. package/dist/buffer.js +5 -5
  81. package/dist/bulk-import/index.d.ts +3 -3
  82. package/dist/calibration.d.ts +1 -1
  83. package/dist/calibration.js +2 -2
  84. package/dist/capabilities.d.ts +1 -1
  85. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  86. package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-3MNURAQ3.js} +2 -2
  87. package/dist/{catalog-BHXkBVhg.d.ts → catalog-wcX1QhtQ.d.ts} +1 -1
  88. package/dist/causal-behavior.d.ts +1 -1
  89. package/dist/causal-consolidation.d.ts +1 -1
  90. package/dist/causal-consolidation.js +20 -20
  91. package/dist/causal-trajectory-graph.d.ts +1 -1
  92. package/dist/{chunk-M6RORUO5.js → chunk-2EYZ32LH.js} +24 -2
  93. package/dist/{chunk-M6RORUO5.js.map → chunk-2EYZ32LH.js.map} +1 -1
  94. package/dist/{chunk-VHKXRYQN.js → chunk-2HQPE2NM.js} +2 -2
  95. package/dist/{chunk-RDLPFM7I.js → chunk-2ZG2LLZT.js} +2 -2
  96. package/dist/{chunk-IMBQFHRV.js → chunk-3BLHPQHT.js} +5 -5
  97. package/dist/{chunk-6L2II3KS.js → chunk-3D75XIYO.js} +2 -2
  98. package/dist/{chunk-J272ODKJ.js → chunk-42DJ235G.js} +2 -2
  99. package/dist/{chunk-RJQAP333.js → chunk-46RII65S.js} +2 -2
  100. package/dist/{chunk-JUDT33RX.js → chunk-4AX5OYKC.js} +2 -2
  101. package/dist/{chunk-GSSDHAYH.js → chunk-4IGOLIWM.js} +2 -2
  102. package/dist/{chunk-4CMXI55L.js → chunk-54QPOE45.js} +2 -2
  103. package/dist/{chunk-LKFVVN7R.js → chunk-563X6JJX.js} +2 -2
  104. package/dist/{chunk-VQWBUPSJ.js → chunk-5EQT62HH.js} +2 -2
  105. package/dist/{chunk-BYQX4IOG.js → chunk-6MQMYXSQ.js} +2 -2
  106. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  107. package/dist/{chunk-K75A5XWU.js → chunk-7ZLC4DTZ.js} +4 -4
  108. package/dist/{chunk-7Z54NXVS.js → chunk-A4OIJYCV.js} +2 -2
  109. package/dist/{chunk-QS5Q5RBV.js → chunk-AFJHNHAM.js} +8 -8
  110. package/dist/{chunk-TZ44E732.js → chunk-AIVRD66I.js} +2 -2
  111. package/dist/{chunk-OEDW4ER7.js → chunk-AJBWVDRV.js} +2 -1
  112. package/dist/chunk-AJBWVDRV.js.map +1 -0
  113. package/dist/{chunk-IOPIGX7Y.js → chunk-AKABVXFS.js} +2 -2
  114. package/dist/{chunk-KOTG3RXE.js → chunk-AUSRUOMQ.js} +2 -2
  115. package/dist/{chunk-K4A6UVPB.js → chunk-BTPCP535.js} +8 -8
  116. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  117. package/dist/{chunk-TEMKBSV6.js → chunk-C3G6MW4W.js} +3 -3
  118. package/dist/{chunk-3QEVOQF5.js → chunk-D6PY63OM.js} +2 -2
  119. package/dist/{chunk-DFVSJFHK.js → chunk-DBB5JPSL.js} +2 -2
  120. package/dist/{chunk-HJUP3K6L.js → chunk-DIXZQTGY.js} +2 -2
  121. package/dist/{chunk-ZX3AYNNV.js → chunk-DM5CU5J7.js} +2 -2
  122. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  123. package/dist/{chunk-BGRTZOJB.js → chunk-E3I3NDUP.js} +4 -4
  124. package/dist/{chunk-ZAEPD4C2.js → chunk-E4LMQTST.js} +2 -2
  125. package/dist/{chunk-NETQXOPY.js → chunk-EH3HNCAM.js} +12 -7
  126. package/dist/{chunk-NETQXOPY.js.map → chunk-EH3HNCAM.js.map} +1 -1
  127. package/dist/{chunk-7D6SER6A.js → chunk-EMSYMYXO.js} +14 -14
  128. package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
  129. package/dist/{chunk-V2ZA4YWE.js → chunk-F5H6YG5P.js} +2 -2
  130. package/dist/{chunk-YTK5MVNF.js → chunk-FGFC2EFR.js} +14 -13
  131. package/dist/chunk-FGFC2EFR.js.map +1 -0
  132. package/dist/{chunk-ZMWSYUUL.js → chunk-GCBIXUPT.js} +2 -2
  133. package/dist/{chunk-IS2IDFJP.js → chunk-GMH5QPUU.js} +22 -22
  134. package/dist/chunk-GMH5QPUU.js.map +1 -0
  135. package/dist/{chunk-LFVZD5EC.js → chunk-GWNSKQDA.js} +3 -3
  136. package/dist/{chunk-JDX2OA4R.js → chunk-HNHIHXSD.js} +2 -2
  137. package/dist/{chunk-2SNCQHJZ.js → chunk-I33QYUAF.js} +6 -6
  138. package/dist/{chunk-UZ6JYPJ6.js → chunk-I46BYY7U.js} +193 -150
  139. package/dist/chunk-I46BYY7U.js.map +1 -0
  140. package/dist/{chunk-MVG3KXON.js → chunk-ICN37XHG.js} +15 -15
  141. package/dist/chunk-IFBSZGW3.js +42 -0
  142. package/dist/chunk-IFBSZGW3.js.map +1 -0
  143. package/dist/{chunk-ICNJ6J46.js → chunk-IYIPXAIJ.js} +2 -2
  144. package/dist/{chunk-AEOOGXMQ.js → chunk-J2MGTGKC.js} +4 -4
  145. package/dist/chunk-JATHBCAV.js +94 -0
  146. package/dist/chunk-JATHBCAV.js.map +1 -0
  147. package/dist/{chunk-5U7K4W6K.js → chunk-JDOBQPJY.js} +3 -3
  148. package/dist/{chunk-TG3FAM2S.js → chunk-JL4TQYM5.js} +48 -1
  149. package/dist/{chunk-TG3FAM2S.js.map → chunk-JL4TQYM5.js.map} +1 -1
  150. package/dist/{chunk-NVVZPBKI.js → chunk-JMWUPUE6.js} +2 -2
  151. package/dist/{chunk-QPVNK2VE.js → chunk-JSD7Q7LD.js} +2 -2
  152. package/dist/{chunk-RLU2Y5GV.js → chunk-K5D2XVNN.js} +4 -4
  153. package/dist/{chunk-YTZN2UZO.js → chunk-KJLLPG26.js} +2 -2
  154. package/dist/{chunk-2SKMZUOW.js → chunk-KLUC2GSG.js} +6 -6
  155. package/dist/{chunk-YRIFXXMI.js → chunk-KZJM7R4F.js} +3 -3
  156. package/dist/{chunk-46Z3VGWF.js → chunk-LE2KZ72G.js} +3 -3
  157. package/dist/{chunk-HIP6DKJJ.js → chunk-LQVXSRAJ.js} +2 -2
  158. package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
  159. package/dist/{chunk-5LYSEZOF.js → chunk-MCMS4VUK.js} +9 -8
  160. package/dist/chunk-MCMS4VUK.js.map +1 -0
  161. package/dist/{chunk-ROEFLU37.js → chunk-N6XTC56E.js} +13 -81
  162. package/dist/chunk-N6XTC56E.js.map +1 -0
  163. package/dist/{chunk-PKUJNICO.js → chunk-ND7MAIJC.js} +2 -2
  164. package/dist/{chunk-DAZANIYU.js → chunk-NYWCFC3K.js} +76 -77
  165. package/dist/{chunk-DAZANIYU.js.map → chunk-NYWCFC3K.js.map} +1 -1
  166. package/dist/{chunk-W23JARAQ.js → chunk-P66QH6R6.js} +2 -2
  167. package/dist/{chunk-62D2PAAM.js → chunk-PAAJWQH5.js} +4 -4
  168. package/dist/{chunk-XM46Y66S.js → chunk-PFKIOYJH.js} +2 -2
  169. package/dist/{chunk-C5R73BON.js → chunk-PGGPRF6J.js} +2 -2
  170. package/dist/{chunk-V6EGNVUT.js → chunk-PIWFNPQT.js} +4 -4
  171. package/dist/{chunk-JOP7W24J.js → chunk-PLJ2MQFT.js} +4 -4
  172. package/dist/{chunk-MJC7UKH7.js → chunk-PQ42DJNG.js} +2 -2
  173. package/dist/{chunk-37CAEC7E.js → chunk-PWPIERBM.js} +4 -4
  174. package/dist/{chunk-BXIJSPCL.js → chunk-Q62GA5U2.js} +2 -2
  175. package/dist/{chunk-CC37E3QM.js → chunk-QKCXRS5A.js} +16 -1
  176. package/dist/chunk-QKCXRS5A.js.map +1 -0
  177. package/dist/{chunk-VKWFNPBH.js → chunk-RQQO3ORQ.js} +2 -2
  178. package/dist/{chunk-SFHLQPBF.js → chunk-S4MJTIPG.js} +85 -81
  179. package/dist/chunk-S4MJTIPG.js.map +1 -0
  180. package/dist/{chunk-THTF2W7M.js → chunk-TRTLWUDD.js} +19 -18
  181. package/dist/chunk-TRTLWUDD.js.map +1 -0
  182. package/dist/{chunk-KTOXQMW3.js → chunk-UHSOPTNB.js} +14 -4
  183. package/dist/chunk-UHSOPTNB.js.map +1 -0
  184. package/dist/{chunk-ES5BUPYB.js → chunk-UZGHKD3T.js} +2 -2
  185. package/dist/{chunk-62HFZNCJ.js → chunk-V2EXYQEQ.js} +11 -10
  186. package/dist/{chunk-62HFZNCJ.js.map → chunk-V2EXYQEQ.js.map} +1 -1
  187. package/dist/{chunk-QE6YVNP5.js → chunk-V2TOGJPM.js} +49 -16
  188. package/dist/chunk-V2TOGJPM.js.map +1 -0
  189. package/dist/{chunk-J4WGTN2N.js → chunk-V62YYBBY.js} +4 -4
  190. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  191. package/dist/{chunk-Z4GUX2M6.js → chunk-VSN2DMQK.js} +2 -2
  192. package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
  193. package/dist/{chunk-KY236SP5.js → chunk-W7UV2ZCA.js} +3 -3
  194. package/dist/{chunk-TO36VPZI.js → chunk-WBQ4ONQJ.js} +2 -2
  195. package/dist/{chunk-WZYHPAG5.js → chunk-WFMQN7JE.js} +3 -3
  196. package/dist/{chunk-G2XZFGYN.js → chunk-WGZHSQDV.js} +4 -4
  197. package/dist/{chunk-MDIEES23.js → chunk-WN2OXGGH.js} +1 -1
  198. package/dist/chunk-WN2OXGGH.js.map +1 -0
  199. package/dist/{chunk-SUEOG2S4.js → chunk-WPGA4RYI.js} +2 -2
  200. package/dist/{chunk-SV4Z2S67.js → chunk-WUUGE7QC.js} +54 -21
  201. package/dist/chunk-WUUGE7QC.js.map +1 -0
  202. package/dist/{chunk-J7FVMLBR.js → chunk-WZIO3TW6.js} +2 -2
  203. package/dist/{chunk-ZZUVBZL2.js → chunk-X2QPKLPL.js} +2 -2
  204. package/dist/{chunk-JAJIMTFB.js → chunk-XRS65T4O.js} +9 -9
  205. package/dist/{chunk-GO5LOHCD.js → chunk-YFXAWGMR.js} +2 -2
  206. package/dist/{chunk-ZRMMXWYI.js → chunk-YR5QT4SR.js} +32 -9
  207. package/dist/chunk-YR5QT4SR.js.map +1 -0
  208. package/dist/{chunk-CARRTDKC.js → chunk-Z22M4JCY.js} +4 -3
  209. package/dist/chunk-Z22M4JCY.js.map +1 -0
  210. package/dist/{chunk-K4JKAXMO.js → chunk-Z535ADTC.js} +3 -3
  211. package/dist/{chunk-23HFXQ5J.js → chunk-Z7NBT6AK.js} +3 -3
  212. package/dist/{chunk-VQYWKCDR.js → chunk-ZX6NNFSY.js} +3 -3
  213. package/dist/{chunk-3XPN7AVY.js → chunk-ZYSOT6HD.js} +2 -2
  214. package/dist/{chunk-ZZCR2QYL.js → chunk-ZZEIL3MI.js} +2 -2
  215. package/dist/{cli-BWri5-am.d.ts → cli-CUlMlS2N.d.ts} +5 -5
  216. package/dist/cli.d.ts +15 -15
  217. package/dist/cli.js +116 -114
  218. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  219. package/dist/coding/export-okf-codegraph.js +16 -16
  220. package/dist/coding/pre-action-gate.d.ts +1 -1
  221. package/dist/compounding/engine.d.ts +2 -2
  222. package/dist/compounding/engine.js +19 -19
  223. package/dist/compounding/preference-consolidator.d.ts +1 -1
  224. package/dist/compression-optimizer.d.ts +1 -1
  225. package/dist/config.d.ts +1 -1
  226. package/dist/config.js +6 -6
  227. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  228. package/dist/connectors/codex-materialize-runner.js +19 -19
  229. package/dist/connectors/codex-materialize.d.ts +1 -1
  230. package/dist/connectors/codex-materialize.js +2 -2
  231. package/dist/connectors/index.d.ts +1 -1
  232. package/dist/connectors/index.js +19 -19
  233. package/dist/consolidation-provenance-check.d.ts +2 -2
  234. package/dist/consolidation-undo.d.ts +2 -2
  235. package/dist/contradiction/index.d.ts +4 -4
  236. package/dist/contradiction/index.js +4 -4
  237. package/dist/{contradiction-scan-BSGKZHYJ.js → contradiction-scan-GVD4JJ7B.js} +4 -4
  238. package/dist/converge-config.d.ts +1 -1
  239. package/dist/convergence-refresh.d.ts +2 -2
  240. package/dist/convergence-refresh.js +20 -20
  241. package/dist/conversation-index/backend.d.ts +1 -1
  242. package/dist/conversation-index/chunker.d.ts +1 -1
  243. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  244. package/dist/conversation-index/indexer.d.ts +1 -1
  245. package/dist/conversation-index/search.d.ts +1 -1
  246. package/dist/corpus-watermark.d.ts +1 -1
  247. package/dist/corpus-watermark.js +19 -19
  248. package/dist/cross-lingual-recall.d.ts +1 -1
  249. package/dist/dashboard-runtime.js +2 -2
  250. package/dist/day-summary.d.ts +1 -1
  251. package/dist/deep-recall-config.d.ts +12 -1
  252. package/dist/deep-recall-config.js +5 -3
  253. package/dist/deep-recall-http-glue.d.ts +16 -14
  254. package/dist/deep-recall-http-glue.js +7 -4
  255. package/dist/deep-recall-mcp-tools.d.ts +13 -13
  256. package/dist/deep-recall-policy-llm.d.ts +12 -2
  257. package/dist/deep-recall-policy-llm.js +3 -3
  258. package/dist/deep-recall-seeds.d.ts +4 -1
  259. package/dist/deep-recall-seeds.js +1 -1
  260. package/dist/deep-recall.d.ts +12 -1
  261. package/dist/deep-recall.js +3 -2
  262. package/dist/delinearize.d.ts +1 -1
  263. package/dist/dependency-propagation-config.d.ts +1 -1
  264. package/dist/{dependency-propagation-delivery-ueZlKTQB.d.ts → dependency-propagation-delivery-BDDjImQn.d.ts} +1 -1
  265. package/dist/direct-answer-wiring.d.ts +1 -1
  266. package/dist/direct-answer.d.ts +1 -1
  267. package/dist/embedding-fallback.d.ts +1 -1
  268. package/dist/enrichment/index.d.ts +1 -1
  269. package/dist/entity-origin-fields.d.ts +1 -1
  270. package/dist/entity-retrieval.d.ts +2 -2
  271. package/dist/entity-retrieval.js +18 -18
  272. package/dist/entity-schema.d.ts +1 -1
  273. package/dist/episodic-context.d.ts +1 -1
  274. package/dist/eval-trajectory-contracts.d.ts +1 -1
  275. package/dist/eval-trajectory-store.d.ts +1 -1
  276. package/dist/eval-trajectory.d.ts +1 -1
  277. package/dist/explicit-capture.d.ts +11 -11
  278. package/dist/explicit-capture.js +3 -3
  279. package/dist/external-wiki-access.d.ts +13 -13
  280. package/dist/external-wiki-access.js +70 -69
  281. package/dist/external-wiki-collection-registration.d.ts +1 -1
  282. package/dist/external-wiki-collection.d.ts +1 -1
  283. package/dist/external-wiki-mcp-tools.d.ts +13 -13
  284. package/dist/extraction-error-classification.d.ts +1 -1
  285. package/dist/extraction-faithfulness.d.ts +2 -2
  286. package/dist/extraction-faithfulness.js +3 -3
  287. package/dist/extraction-judge-telemetry.d.ts +2 -2
  288. package/dist/extraction-judge-training.d.ts +2 -2
  289. package/dist/extraction-judge.d.ts +2 -2
  290. package/dist/extraction-judge.js +3 -3
  291. package/dist/extraction-liveness.d.ts +1 -1
  292. package/dist/extraction-normalization.d.ts +1 -1
  293. package/dist/extraction-prompt.d.ts +1 -1
  294. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  295. package/dist/extraction-source-grounding.d.ts +1 -1
  296. package/dist/extraction-span-config.d.ts +1 -1
  297. package/dist/extraction-span-materialize.d.ts +1 -1
  298. package/dist/extraction.d.ts +2 -2
  299. package/dist/extraction.js +30 -30
  300. package/dist/fallback-llm-codex-subscription.d.ts +15 -5
  301. package/dist/fallback-llm-codex-subscription.js +3 -1
  302. package/dist/fallback-llm.d.ts +1 -1
  303. package/dist/fallback-llm.js +2 -2
  304. package/dist/{first-start-migration-ZWMV5CX4.js → first-start-migration-L3UFX5CU.js} +4 -4
  305. package/dist/{generic-recall-paths-CpyVmA88.d.ts → generic-recall-paths-CpDzNO_I.d.ts} +1 -1
  306. package/dist/graph-append-error.d.ts +1 -1
  307. package/dist/graph-dashboard-diff.d.ts +1 -1
  308. package/dist/graph-dashboard-key.d.ts +1 -1
  309. package/dist/graph-dashboard-parser.d.ts +1 -1
  310. package/dist/graph-edge-reinforcement.d.ts +1 -1
  311. package/dist/graph-jsonl.d.ts +1 -1
  312. package/dist/graph-path-reconstruction.d.ts +1 -1
  313. package/dist/graph-path-scoring.d.ts +1 -1
  314. package/dist/graph-snapshot.d.ts +1 -1
  315. package/dist/graph.d.ts +1 -1
  316. package/dist/harmonic-retrieval.js +3 -3
  317. package/dist/importance.d.ts +1 -1
  318. package/dist/importers/index.d.ts +1 -1
  319. package/dist/importers/test-utils.d.ts +1 -1
  320. package/dist/in-flight-reads.d.ts +1 -1
  321. package/dist/{index-BvUA4S7M.d.ts → index-CtmmCJoo.d.ts} +3 -3
  322. package/dist/index.d.ts +26 -26
  323. package/dist/index.js +279 -275
  324. package/dist/intent.d.ts +1 -1
  325. package/dist/lcm/engine.d.ts +1 -1
  326. package/dist/lcm/engine.js +3 -3
  327. package/dist/lcm/index.d.ts +1 -1
  328. package/dist/lcm/index.js +8 -8
  329. package/dist/lcm/tools.d.ts +1 -1
  330. package/dist/lifecycle.d.ts +1 -1
  331. package/dist/live-connectors-runner.d.ts +1 -1
  332. package/dist/{local-llm-BsJGulur.d.ts → local-llm-DpXIvm6F.d.ts} +1 -1
  333. package/dist/local-llm-helpers.d.ts +2 -2
  334. package/dist/local-llm.d.ts +2 -2
  335. package/dist/local-llm.js +2 -2
  336. package/dist/local-model-endpoint.d.ts +1 -1
  337. package/dist/location/index.d.ts +3 -3
  338. package/dist/location/index.js +19 -19
  339. package/dist/maintenance/memory-governance.d.ts +1 -1
  340. package/dist/maintenance/memory-governance.js +18 -18
  341. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  342. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +17 -17
  343. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  344. package/dist/maintenance/rebuild-memory-projection.js +19 -19
  345. package/dist/{maintenance-CYubtIRr.d.ts → maintenance-CNgoLsoM.d.ts} +7 -6
  346. package/dist/mcp-memory-inspector-app.d.ts +13 -13
  347. package/dist/memory-action-policy.d.ts +1 -1
  348. package/dist/memory-cache.d.ts +1 -1
  349. package/dist/memory-controller.d.ts +1 -1
  350. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  351. package/dist/memory-projection-store.d.ts +1 -1
  352. package/dist/memory-provenance.d.ts +1 -1
  353. package/dist/memory-snapshot.d.ts +1 -1
  354. package/dist/memory-subject-cli.d.ts +13 -13
  355. package/dist/memory-subject.d.ts +13 -13
  356. package/dist/memory-worth-outcomes.d.ts +2 -2
  357. package/dist/models-json.d.ts +1 -1
  358. package/dist/namespaces/migrate.d.ts +3 -3
  359. package/dist/namespaces/migrate.js +18 -18
  360. package/dist/namespaces/principal.d.ts +1 -1
  361. package/dist/namespaces/search.d.ts +1 -1
  362. package/dist/namespaces/search.js +3 -3
  363. package/dist/namespaces/storage.d.ts +3 -3
  364. package/dist/namespaces/storage.js +17 -17
  365. package/dist/native-knowledge.d.ts +1 -1
  366. package/dist/offline-sync-impression-drain.d.ts +1 -1
  367. package/dist/operator-doctor-corpus.d.ts +1 -1
  368. package/dist/operator-doctor-corpus.js +20 -20
  369. package/dist/operator-doctor-replica.d.ts +1 -1
  370. package/dist/operator-toolkit.d.ts +3 -3
  371. package/dist/operator-toolkit.js +35 -35
  372. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  373. package/dist/orchestration/maintenance.d.ts +4 -4
  374. package/dist/orchestration/maintenance.js +29 -29
  375. package/dist/{orchestrator-BWDRJ_0d.d.ts → orchestrator-DT7ybIFz.d.ts} +18 -10
  376. package/dist/orchestrator.d.ts +11 -11
  377. package/dist/orchestrator.js +157 -155
  378. package/dist/patterns-cli.d.ts +1 -1
  379. package/dist/{pipeline-7JMn2yMH.d.ts → pipeline-CgBEmHcz.d.ts} +1 -1
  380. package/dist/policy-runtime.d.ts +1 -1
  381. package/dist/proactive-contention.d.ts +2 -2
  382. package/dist/provenance.d.ts +1 -1
  383. package/dist/{public-http-CJWs3mo9.d.ts → public-http-C8P8fyiO.d.ts} +1 -1
  384. package/dist/{qmd-CxCH9G9m.d.ts → qmd-BkY8KpCh.d.ts} +1 -1
  385. package/dist/qmd-preflight.d.ts +2 -2
  386. package/dist/qmd-recall-cache.d.ts +1 -1
  387. package/dist/qmd.d.ts +2 -2
  388. package/dist/recall-concurrency-config.d.ts +1 -1
  389. package/dist/recall-disclosure-escalation.d.ts +1 -1
  390. package/dist/recall-explain-renderer.d.ts +1 -1
  391. package/dist/recall-explain-renderer.js +3 -3
  392. package/dist/recall-memory-map.d.ts +1 -1
  393. package/dist/recall-navigate-access.d.ts +1 -1
  394. package/dist/recall-navigate-access.js +2 -2
  395. package/dist/recall-navigate-disclosure.d.ts +1 -1
  396. package/dist/recall-navigate-disclosure.js +1 -1
  397. package/dist/recall-navigate.d.ts +1 -1
  398. package/dist/recall-navigate.js +2 -2
  399. package/dist/recall-planner-llm.d.ts +1 -1
  400. package/dist/recall-planner-llm.js +2 -2
  401. package/dist/recall-state-view-admission.d.ts +2 -2
  402. package/dist/recall-state-view-admission.js +7 -7
  403. package/dist/recall-state-view-anchors.d.ts +1 -1
  404. package/dist/recall-state-view-anchors.js +2 -2
  405. package/dist/recall-state-view-inject.js +2 -2
  406. package/dist/recall-state-view-render.js +2 -2
  407. package/dist/recall-state-view-widen.js +2 -2
  408. package/dist/recall-state-view-wire.js +3 -3
  409. package/dist/recall-state-view.d.ts +9 -1
  410. package/dist/recall-state-view.js +5 -3
  411. package/dist/recall-state.d.ts +1 -1
  412. package/dist/recall-tag-filter.d.ts +1 -1
  413. package/dist/recall-timings.d.ts +1 -1
  414. package/dist/recall-xray-cli.d.ts +1 -1
  415. package/dist/recall-xray-cli.js +4 -4
  416. package/dist/recall-xray-renderer.d.ts +1 -1
  417. package/dist/recall-xray-renderer.js +3 -3
  418. package/dist/recall-xray.d.ts +1 -1
  419. package/dist/recall-xray.js +2 -2
  420. package/dist/reconcile/cursor.d.ts +1 -1
  421. package/dist/reconcile/cursor.js +2 -2
  422. package/dist/reconcile/manifest.d.ts +1 -1
  423. package/dist/reconcile/manifest.js +4 -4
  424. package/dist/reconcile/plan.d.ts +1 -1
  425. package/dist/reconcile/plan.js +2 -2
  426. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  427. package/dist/replay/normalizers/claude.d.ts +1 -1
  428. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  429. package/dist/replay/normalizers/shared.d.ts +1 -1
  430. package/dist/replay/runner.d.ts +1 -1
  431. package/dist/replay/types.d.ts +1 -1
  432. package/dist/replica-divergence.d.ts +1 -1
  433. package/dist/replica-peers-config.d.ts +1 -1
  434. package/dist/{resolution-4GG3QZRJ.js → resolution-LXFQQ4AE.js} +5 -5
  435. package/dist/resolution-LXFQQ4AE.js.map +1 -0
  436. package/dist/resolve-auth-token.d.ts +1 -1
  437. package/dist/resume-bundles.js +8 -8
  438. package/dist/retrieval-agents.d.ts +2 -2
  439. package/dist/retrieval-tiers.d.ts +1 -1
  440. package/dist/routing/engine.d.ts +1 -1
  441. package/dist/routing/store.d.ts +1 -1
  442. package/dist/salvage-envelope.d.ts +1 -1
  443. package/dist/{scope-profiles-BGAUqhBR.d.ts → scope-profiles-BBPjZ9jb.d.ts} +1 -1
  444. package/dist/search/embed-helper.d.ts +1 -1
  445. package/dist/search/factory.d.ts +1 -1
  446. package/dist/search/factory.js +2 -2
  447. package/dist/search/index.d.ts +1 -1
  448. package/dist/search/index.js +4 -4
  449. package/dist/search/lancedb-backend.d.ts +1 -1
  450. package/dist/search/meilisearch-backend.d.ts +1 -1
  451. package/dist/search/noop-backend.d.ts +1 -1
  452. package/dist/search/orama-backend.d.ts +1 -1
  453. package/dist/search/port.d.ts +1 -1
  454. package/dist/search/remote-backend.d.ts +1 -1
  455. package/dist/{semantic-consolidation-CCeRD9pV.d.ts → semantic-consolidation-BPFFVO84.d.ts} +1 -1
  456. package/dist/semantic-consolidation.d.ts +2 -2
  457. package/dist/semantic-consolidation.js +20 -20
  458. package/dist/semantic-rule-promotion.js +17 -17
  459. package/dist/semantic-rule-verifier.d.ts +1 -1
  460. package/dist/semantic-rule-verifier.js +17 -17
  461. package/dist/{service-BwpzRduk.d.ts → service-jKcr6Jvr.d.ts} +2 -2
  462. package/dist/session-observer-bands.d.ts +1 -1
  463. package/dist/session-observer-state.d.ts +1 -1
  464. package/dist/shared-context/manager.d.ts +1 -1
  465. package/dist/shared-context/manager.js +2 -2
  466. package/dist/shared-context/write-output-controls.d.ts +34 -0
  467. package/dist/shared-context/write-output-controls.js +10 -0
  468. package/dist/shared-context/write-output-controls.js.map +1 -0
  469. package/dist/signal.d.ts +1 -1
  470. package/dist/source-agent-qualifier.d.ts +1 -1
  471. package/dist/source-agent-qualifier.js +25 -25
  472. package/dist/source-attribution.d.ts +23 -1
  473. package/dist/source-attribution.js +13 -3
  474. package/dist/standup/build.js +17 -17
  475. package/dist/{storage-BprAGBG0.d.ts → storage-C-0Ah5OY.d.ts} +1 -1
  476. package/dist/storage.d.ts +2 -2
  477. package/dist/storage.js +16 -16
  478. package/dist/subject-config.d.ts +1 -1
  479. package/dist/summarizer.d.ts +1 -1
  480. package/dist/summarizer.js +6 -6
  481. package/dist/summary-snapshot.d.ts +1 -1
  482. package/dist/support-passport/index.d.ts +16 -16
  483. package/dist/support-passport/index.js +72 -71
  484. package/dist/temporal-supersession.d.ts +2 -2
  485. package/dist/temporal-timeline-recall.d.ts +1 -1
  486. package/dist/temporal-validity.d.ts +1 -1
  487. package/dist/threading.d.ts +1 -1
  488. package/dist/tier-migration.d.ts +2 -2
  489. package/dist/tier-routing.d.ts +1 -1
  490. package/dist/tier-routing.js +3 -3
  491. package/dist/{tier-stats-LUSUUNU6.js → tier-stats-VK5PCO2L.js} +4 -4
  492. package/dist/topics.d.ts +1 -1
  493. package/dist/transcript.d.ts +1 -1
  494. package/dist/transfer/backup.js +2 -2
  495. package/dist/transfer/capsule-export.js +2 -2
  496. package/dist/transfer/capsule-import.js +3 -3
  497. package/dist/transfer/export-okf.d.ts +1 -1
  498. package/dist/transfer/export-okf.js +17 -17
  499. package/dist/trust-score-stage.d.ts +1 -1
  500. package/dist/trust-score.d.ts +1 -1
  501. package/dist/{types-nJV23pa3.d.ts → types-cK5LydjL.d.ts} +5 -0
  502. package/dist/types.d.ts +1 -1
  503. package/dist/types.js +1 -1
  504. package/dist/utility-runtime.d.ts +1 -1
  505. package/dist/verified-recall.js +17 -17
  506. package/dist/who-knows-cli.d.ts +13 -13
  507. package/dist/who-knows-cli.js +18 -18
  508. package/dist/who-knows.d.ts +13 -13
  509. package/dist/who-knows.js +17 -17
  510. package/dist/write-envelope.d.ts +1 -1
  511. package/package.json +12 -2
  512. package/src/access-http.ts +1 -1
  513. package/src/access-mcp-shared-context-tools.ts +103 -0
  514. package/src/access-mcp.ts +4 -74
  515. package/src/access-operations-batch.ts +45 -2
  516. package/src/access-service.ts +14 -7
  517. package/src/activity/timeline/regenerate.test.ts +48 -0
  518. package/src/activity/timeline/regenerate.ts +7 -5
  519. package/src/cli/deep-recall-commands.ts +22 -10
  520. package/src/config.ts +5 -0
  521. package/src/dedup/merge.test.ts +283 -0
  522. package/src/deep-recall-boundary.test.ts +66 -0
  523. package/src/deep-recall-cli.test.ts +82 -0
  524. package/src/deep-recall-config.test.ts +56 -0
  525. package/src/deep-recall-config.ts +32 -0
  526. package/src/deep-recall-http-glue.ts +10 -10
  527. package/src/deep-recall-policy-llm.test.ts +242 -0
  528. package/src/deep-recall-policy-llm.ts +37 -7
  529. package/src/deep-recall-seeds.test.ts +53 -0
  530. package/src/deep-recall-seeds.ts +7 -1
  531. package/src/deep-recall-surface.test.ts +93 -0
  532. package/src/deep-recall.test.ts +121 -0
  533. package/src/deep-recall.ts +88 -28
  534. package/src/fallback-llm-codex-subscription.ts +27 -5
  535. package/src/fallback-llm.test.ts +120 -0
  536. package/src/fallback-llm.ts +17 -16
  537. package/src/meetings/config.test.ts +58 -0
  538. package/src/orchestration/extraction-persist.ts +1 -1
  539. package/src/orchestration/recall-entry.ts +15 -1
  540. package/src/orchestration/recall-internal.ts +1 -0
  541. package/src/orchestration/recall-section-coordinator.ts +65 -28
  542. package/src/orchestration/recall-state-view-pipeline.test.ts +8 -2
  543. package/src/orchestration/semantic-merge-commit-effects.ts +45 -16
  544. package/src/orchestration/semantic-merge-persist.ts +23 -36
  545. package/src/providers/codex-subscription.test.ts +127 -0
  546. package/src/providers/codex-subscription.ts +1 -1
  547. package/src/recall-state-view-budget.test.ts +424 -0
  548. package/src/recall-state-view.ts +30 -16
  549. package/src/shared-context/envelope-io.ts +25 -0
  550. package/src/shared-context/envelope-wiring.test.ts +4 -2
  551. package/src/shared-context/manager.ts +1 -0
  552. package/src/shared-context/write-output-controls.test.ts +192 -0
  553. package/src/shared-context/write-output-controls.ts +72 -0
  554. package/src/source-attribution.test.ts +39 -0
  555. package/src/source-attribution.ts +72 -0
  556. package/src/types.ts +5 -0
  557. package/dist/chunk-5LYSEZOF.js.map +0 -1
  558. package/dist/chunk-CARRTDKC.js.map +0 -1
  559. package/dist/chunk-CC37E3QM.js.map +0 -1
  560. package/dist/chunk-IS2IDFJP.js.map +0 -1
  561. package/dist/chunk-KTOXQMW3.js.map +0 -1
  562. package/dist/chunk-MDIEES23.js.map +0 -1
  563. package/dist/chunk-OEDW4ER7.js.map +0 -1
  564. package/dist/chunk-QE6YVNP5.js.map +0 -1
  565. package/dist/chunk-ROEFLU37.js.map +0 -1
  566. package/dist/chunk-SFHLQPBF.js.map +0 -1
  567. package/dist/chunk-SV4Z2S67.js.map +0 -1
  568. package/dist/chunk-THTF2W7M.js.map +0 -1
  569. package/dist/chunk-UZ6JYPJ6.js.map +0 -1
  570. package/dist/chunk-YTK5MVNF.js.map +0 -1
  571. package/dist/chunk-ZRMMXWYI.js.map +0 -1
  572. /package/dist/{capsule-crypto-7FJQINUR.js.map → access-mcp-shared-context-tools.js.map} +0 -0
  573. /package/dist/{auto-sync-D6BAPIJV.js.map → auto-sync-7PGUFY7U.js.map} +0 -0
  574. /package/dist/{contradiction-scan-BSGKZHYJ.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  575. /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-3MNURAQ3.js.map} +0 -0
  576. /package/dist/{chunk-VHKXRYQN.js.map → chunk-2HQPE2NM.js.map} +0 -0
  577. /package/dist/{chunk-RDLPFM7I.js.map → chunk-2ZG2LLZT.js.map} +0 -0
  578. /package/dist/{chunk-IMBQFHRV.js.map → chunk-3BLHPQHT.js.map} +0 -0
  579. /package/dist/{chunk-6L2II3KS.js.map → chunk-3D75XIYO.js.map} +0 -0
  580. /package/dist/{chunk-J272ODKJ.js.map → chunk-42DJ235G.js.map} +0 -0
  581. /package/dist/{chunk-RJQAP333.js.map → chunk-46RII65S.js.map} +0 -0
  582. /package/dist/{chunk-JUDT33RX.js.map → chunk-4AX5OYKC.js.map} +0 -0
  583. /package/dist/{chunk-GSSDHAYH.js.map → chunk-4IGOLIWM.js.map} +0 -0
  584. /package/dist/{chunk-4CMXI55L.js.map → chunk-54QPOE45.js.map} +0 -0
  585. /package/dist/{chunk-LKFVVN7R.js.map → chunk-563X6JJX.js.map} +0 -0
  586. /package/dist/{chunk-VQWBUPSJ.js.map → chunk-5EQT62HH.js.map} +0 -0
  587. /package/dist/{chunk-BYQX4IOG.js.map → chunk-6MQMYXSQ.js.map} +0 -0
  588. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  589. /package/dist/{chunk-K75A5XWU.js.map → chunk-7ZLC4DTZ.js.map} +0 -0
  590. /package/dist/{chunk-7Z54NXVS.js.map → chunk-A4OIJYCV.js.map} +0 -0
  591. /package/dist/{chunk-QS5Q5RBV.js.map → chunk-AFJHNHAM.js.map} +0 -0
  592. /package/dist/{chunk-TZ44E732.js.map → chunk-AIVRD66I.js.map} +0 -0
  593. /package/dist/{chunk-IOPIGX7Y.js.map → chunk-AKABVXFS.js.map} +0 -0
  594. /package/dist/{chunk-KOTG3RXE.js.map → chunk-AUSRUOMQ.js.map} +0 -0
  595. /package/dist/{chunk-K4A6UVPB.js.map → chunk-BTPCP535.js.map} +0 -0
  596. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  597. /package/dist/{chunk-TEMKBSV6.js.map → chunk-C3G6MW4W.js.map} +0 -0
  598. /package/dist/{chunk-3QEVOQF5.js.map → chunk-D6PY63OM.js.map} +0 -0
  599. /package/dist/{chunk-DFVSJFHK.js.map → chunk-DBB5JPSL.js.map} +0 -0
  600. /package/dist/{chunk-HJUP3K6L.js.map → chunk-DIXZQTGY.js.map} +0 -0
  601. /package/dist/{chunk-ZX3AYNNV.js.map → chunk-DM5CU5J7.js.map} +0 -0
  602. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  603. /package/dist/{chunk-BGRTZOJB.js.map → chunk-E3I3NDUP.js.map} +0 -0
  604. /package/dist/{chunk-ZAEPD4C2.js.map → chunk-E4LMQTST.js.map} +0 -0
  605. /package/dist/{chunk-7D6SER6A.js.map → chunk-EMSYMYXO.js.map} +0 -0
  606. /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
  607. /package/dist/{chunk-V2ZA4YWE.js.map → chunk-F5H6YG5P.js.map} +0 -0
  608. /package/dist/{chunk-ZMWSYUUL.js.map → chunk-GCBIXUPT.js.map} +0 -0
  609. /package/dist/{chunk-LFVZD5EC.js.map → chunk-GWNSKQDA.js.map} +0 -0
  610. /package/dist/{chunk-JDX2OA4R.js.map → chunk-HNHIHXSD.js.map} +0 -0
  611. /package/dist/{chunk-2SNCQHJZ.js.map → chunk-I33QYUAF.js.map} +0 -0
  612. /package/dist/{chunk-MVG3KXON.js.map → chunk-ICN37XHG.js.map} +0 -0
  613. /package/dist/{chunk-ICNJ6J46.js.map → chunk-IYIPXAIJ.js.map} +0 -0
  614. /package/dist/{chunk-AEOOGXMQ.js.map → chunk-J2MGTGKC.js.map} +0 -0
  615. /package/dist/{chunk-5U7K4W6K.js.map → chunk-JDOBQPJY.js.map} +0 -0
  616. /package/dist/{chunk-NVVZPBKI.js.map → chunk-JMWUPUE6.js.map} +0 -0
  617. /package/dist/{chunk-QPVNK2VE.js.map → chunk-JSD7Q7LD.js.map} +0 -0
  618. /package/dist/{chunk-RLU2Y5GV.js.map → chunk-K5D2XVNN.js.map} +0 -0
  619. /package/dist/{chunk-YTZN2UZO.js.map → chunk-KJLLPG26.js.map} +0 -0
  620. /package/dist/{chunk-2SKMZUOW.js.map → chunk-KLUC2GSG.js.map} +0 -0
  621. /package/dist/{chunk-YRIFXXMI.js.map → chunk-KZJM7R4F.js.map} +0 -0
  622. /package/dist/{chunk-46Z3VGWF.js.map → chunk-LE2KZ72G.js.map} +0 -0
  623. /package/dist/{chunk-HIP6DKJJ.js.map → chunk-LQVXSRAJ.js.map} +0 -0
  624. /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
  625. /package/dist/{chunk-PKUJNICO.js.map → chunk-ND7MAIJC.js.map} +0 -0
  626. /package/dist/{chunk-W23JARAQ.js.map → chunk-P66QH6R6.js.map} +0 -0
  627. /package/dist/{chunk-62D2PAAM.js.map → chunk-PAAJWQH5.js.map} +0 -0
  628. /package/dist/{chunk-XM46Y66S.js.map → chunk-PFKIOYJH.js.map} +0 -0
  629. /package/dist/{chunk-C5R73BON.js.map → chunk-PGGPRF6J.js.map} +0 -0
  630. /package/dist/{chunk-V6EGNVUT.js.map → chunk-PIWFNPQT.js.map} +0 -0
  631. /package/dist/{chunk-JOP7W24J.js.map → chunk-PLJ2MQFT.js.map} +0 -0
  632. /package/dist/{chunk-MJC7UKH7.js.map → chunk-PQ42DJNG.js.map} +0 -0
  633. /package/dist/{chunk-37CAEC7E.js.map → chunk-PWPIERBM.js.map} +0 -0
  634. /package/dist/{chunk-BXIJSPCL.js.map → chunk-Q62GA5U2.js.map} +0 -0
  635. /package/dist/{chunk-VKWFNPBH.js.map → chunk-RQQO3ORQ.js.map} +0 -0
  636. /package/dist/{chunk-ES5BUPYB.js.map → chunk-UZGHKD3T.js.map} +0 -0
  637. /package/dist/{chunk-J4WGTN2N.js.map → chunk-V62YYBBY.js.map} +0 -0
  638. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  639. /package/dist/{chunk-Z4GUX2M6.js.map → chunk-VSN2DMQK.js.map} +0 -0
  640. /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
  641. /package/dist/{chunk-KY236SP5.js.map → chunk-W7UV2ZCA.js.map} +0 -0
  642. /package/dist/{chunk-TO36VPZI.js.map → chunk-WBQ4ONQJ.js.map} +0 -0
  643. /package/dist/{chunk-WZYHPAG5.js.map → chunk-WFMQN7JE.js.map} +0 -0
  644. /package/dist/{chunk-G2XZFGYN.js.map → chunk-WGZHSQDV.js.map} +0 -0
  645. /package/dist/{chunk-SUEOG2S4.js.map → chunk-WPGA4RYI.js.map} +0 -0
  646. /package/dist/{chunk-J7FVMLBR.js.map → chunk-WZIO3TW6.js.map} +0 -0
  647. /package/dist/{chunk-ZZUVBZL2.js.map → chunk-X2QPKLPL.js.map} +0 -0
  648. /package/dist/{chunk-JAJIMTFB.js.map → chunk-XRS65T4O.js.map} +0 -0
  649. /package/dist/{chunk-GO5LOHCD.js.map → chunk-YFXAWGMR.js.map} +0 -0
  650. /package/dist/{chunk-K4JKAXMO.js.map → chunk-Z535ADTC.js.map} +0 -0
  651. /package/dist/{chunk-23HFXQ5J.js.map → chunk-Z7NBT6AK.js.map} +0 -0
  652. /package/dist/{chunk-VQYWKCDR.js.map → chunk-ZX6NNFSY.js.map} +0 -0
  653. /package/dist/{chunk-3XPN7AVY.js.map → chunk-ZYSOT6HD.js.map} +0 -0
  654. /package/dist/{chunk-ZZCR2QYL.js.map → chunk-ZZEIL3MI.js.map} +0 -0
  655. /package/dist/{resolution-4GG3QZRJ.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
  656. /package/dist/{first-start-migration-ZWMV5CX4.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
  657. /package/dist/{tier-stats-LUSUUNU6.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
@@ -17,6 +17,7 @@ import { z } from "zod";
17
17
  import type { AbstractionNode } from "./abstraction-nodes.js";
18
18
  import type { CueAnchor } from "./cue-anchors.js";
19
19
  import { compareDeterministicStrings } from "./deterministic-order.js";
20
+ import { abortError, isAbortError, raceAbort, throwIfAborted } from "./abort-error.js";
20
21
  import { extractJsonCandidates, stripCodeFences } from "./json-extract.js";
21
22
  import { rankDeepRecallFrontier } from "./recall-deep-frontier.js";
22
23
  import { selectExpandNodeIds } from "./recall-deep-expand-select.js";
@@ -94,8 +95,19 @@ export interface DeepRecallDeps {
94
95
  loadGraph(): Promise<DeepRecallGraphSnapshot>;
95
96
  /** Namespace-scoped memory-by-id read; null when absent from the caller's namespace (§30). */
96
97
  loadMemory(memoryId: string): Promise<DeepRecallMemoryView | null>;
97
- /** Raw policy LLM output (JSON text); null when the call failed. */
98
+ /**
99
+ * Raw policy LLM output (JSON text); null when the call failed. The
100
+ * per-call timeout already spans both LLM legs (issue #2915).
101
+ */
98
102
  callPolicy(statePrompt: string, timeoutMs: number): Promise<string | null>;
103
+ /**
104
+ * Cancellation from the transport (MCP tools/call cancelled, HTTP client
105
+ * disconnected — issue #2915). Checked before every step and raced against
106
+ * every dependency call; an abort surfaces as a standard AbortError, which
107
+ * both transports already translate (silently end the dead socket / rethrow
108
+ * the cancellation) instead of a partial `ok: true` result.
109
+ */
110
+ signal?: AbortSignal;
99
111
  nowMs?(): number;
100
112
  }
101
113
 
@@ -121,28 +133,49 @@ class DeepRecallDeadlineExceeded extends Error {
121
133
  }
122
134
 
123
135
  /**
124
- * Race one dependency call against the SHARED whole-invocation deadline.
136
+ * Race one dependency call against the SHARED whole-invocation deadline AND
137
+ * the transport cancellation signal — one helper, never two nested races
138
+ * (issue #2915: an early abort return that abandons an already-started
139
+ * deadline timer leaves its eventual rejection unhandled).
125
140
  *
126
141
  * `deadlineMs` is an absolute instant computed once per invocation, so every
127
142
  * await subtracts elapsed time instead of restarting the budget, and a stalled
128
143
  * seed search, graph load, or memory read can no longer outlive the documented
129
144
  * `totalTimeoutMs` just because the deadline is only *checked* between steps.
130
- * An infinite deadline (`totalTimeoutMs: 0`, a documented disable value) passes
131
- * the work through untouched — no timer, no wrapper.
145
+ * An infinite deadline (`totalTimeoutMs: 0`, a documented disable value) races
146
+ * only the signal — no timer. The timer stays REFERENCED: it is the only thing
147
+ * keeping the loop alive when the awaited dependency never settles. Every
148
+ * arm is cleared in the `finally`, whichever wins.
132
149
  */
133
- async function withDeadline<T>(work: Promise<T>, deadlineMs: number, now: () => number): Promise<T> {
134
- if (!Number.isFinite(deadlineMs)) return await work;
150
+ async function guardCall<T>(
151
+ work: Promise<T>,
152
+ deadlineMs: number,
153
+ signal: AbortSignal | undefined,
154
+ now: () => number,
155
+ ): Promise<T> {
156
+ if (signal?.aborted) throw abortError("deep recall aborted");
157
+ if (!Number.isFinite(deadlineMs)) {
158
+ return await raceAbort(work, signal, "deep recall aborted");
159
+ }
135
160
  const remaining = deadlineMs - now();
136
161
  if (remaining <= 0) throw new DeepRecallDeadlineExceeded();
137
- // The timer stays REFERENCED: it is the only thing keeping the loop alive
138
- // when the awaited dependency never settles, which is precisely the case the
139
- // deadline exists for. It is always cleared in the `finally`.
140
162
  const expiry = Promise.withResolvers<never>();
141
163
  const timer = setTimeout(() => expiry.reject(new DeepRecallDeadlineExceeded()), remaining);
164
+ let onAbort: (() => void) | undefined;
142
165
  try {
143
- return await Promise.race([work, expiry.promise]);
166
+ const racers: Promise<T | never>[] = [work, expiry.promise];
167
+ if (signal) {
168
+ racers.push(
169
+ new Promise<never>((_resolve, reject) => {
170
+ onAbort = () => reject(abortError("deep recall aborted"));
171
+ signal.addEventListener("abort", onAbort, { once: true });
172
+ }),
173
+ );
174
+ }
175
+ return await Promise.race(racers);
144
176
  } finally {
145
177
  clearTimeout(timer);
178
+ if (signal && onAbort) signal.removeEventListener("abort", onAbort);
146
179
  }
147
180
  }
148
181
 
@@ -234,8 +267,11 @@ function nodeAddsNothing(node: AbstractionNode, workingSet: ReadonlyMap<string,
234
267
  /**
235
268
  * Frontier refresh (after every working-set change): for each working-set
236
269
  * memory, anchors whose nodeRefs include a node listing that memory make
237
- * every OTHER referenced node a frontier candidate. Ranked by the shared
238
- * pure helper (shared-anchor count desc, nodeId asc — total comparator).
270
+ * every OTHER referenced node a frontier candidate. `sharedAnchorCount`
271
+ * counts DISTINCT anchors (issue #2915): one anchor adds one no matter how
272
+ * many working-set memories or nodes reach the candidate through it. Ranked
273
+ * by the shared pure helper (shared-anchor count desc, nodeId asc — total
274
+ * comparator).
239
275
  *
240
276
  * Nodes in `expandedNodeIds` are dropped: a node EXPAND already followed is
241
277
  * not an unretrieved candidate, even when some of its source memories never
@@ -251,7 +287,10 @@ function refreshFrontier(
251
287
  const index = graph.index;
252
288
  interface Candidate {
253
289
  nodeId: string;
254
- sharedAnchorCount: number;
290
+ // Distinct shared anchors ONLY (issue #2915): one anchor counts once no
291
+ // matter how many working-set memories reach the candidate through it,
292
+ // so a candidate sharing one anchor can never outrank one sharing two.
293
+ sharedAnchorIds: Set<string>;
255
294
  parentMemoryId: string;
256
295
  parentScore: number;
257
296
  anchorValue: string;
@@ -268,22 +307,32 @@ function refreshFrontier(
268
307
  const otherNode = index.nodeIdToNode.get(otherNodeRef);
269
308
  if (!otherNode || nodeAddsNothing(otherNode, workingSet)) continue;
270
309
  const current = byNodeId.get(otherNodeRef);
271
- if (current === undefined || entry.score > current.parentScore) {
310
+ if (current === undefined) {
272
311
  byNodeId.set(otherNodeRef, {
273
312
  nodeId: otherNodeRef,
274
- sharedAnchorCount: (current?.sharedAnchorCount ?? 0) + 1,
313
+ sharedAnchorIds: new Set([anchorId]),
275
314
  parentMemoryId: memoryId,
276
315
  parentScore: entry.score,
277
316
  anchorValue: anchor.anchorValue,
278
317
  });
279
318
  } else {
280
- current.sharedAnchorCount += 1;
319
+ current.sharedAnchorIds.add(anchorId);
320
+ if (entry.score > current.parentScore) {
321
+ current.parentMemoryId = memoryId;
322
+ current.parentScore = entry.score;
323
+ current.anchorValue = anchor.anchorValue;
324
+ }
281
325
  }
282
326
  }
283
327
  }
284
328
  }
285
329
  }
286
- const ranked = rankDeepRecallFrontier([...byNodeId.values()]);
330
+ const ranked = rankDeepRecallFrontier(
331
+ [...byNodeId.values()].map((candidate) => ({
332
+ nodeId: candidate.nodeId,
333
+ sharedAnchorCount: candidate.sharedAnchorIds.size,
334
+ })),
335
+ );
287
336
  return ranked.flatMap((rankedCandidate) => {
288
337
  const candidate = byNodeId.get(rankedCandidate.nodeId);
289
338
  const node = index.nodeIdToNode.get(rankedCandidate.nodeId);
@@ -363,6 +412,14 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
363
412
  const now = deps.nowMs ?? Date.now;
364
413
  const startedMs = now();
365
414
  const deadlineMs = cfg.totalTimeoutMs > 0 ? startedMs + cfg.totalTimeoutMs : Number.POSITIVE_INFINITY;
415
+ // Every dependency await races BOTH bounds: the shared whole-invocation
416
+ // deadline and the transport cancellation signal (issue #2915). An abort
417
+ // propagates as a standard AbortError — never as ok:false backend failure
418
+ // and never as a partial result — so each transport applies its own
419
+ // cancelled-response semantics.
420
+ const guarded = <T>(work: Promise<T>): Promise<T> =>
421
+ guardCall(work, deadlineMs, deps.signal, now);
422
+
366
423
 
367
424
  const trace: DeepRecallTraceStep[] = [];
368
425
  const contentCache = new Map<string, string>();
@@ -378,7 +435,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
378
435
  * would surface content the active-set check excluded.
379
436
  */
380
437
  const hydrateOrDrop = async (memoryId: string): Promise<void> => {
381
- const memory = await withDeadline(deps.loadMemory(memoryId), deadlineMs, now);
438
+ const memory = await guarded(deps.loadMemory(memoryId));
382
439
  if (!memory || !memory.active) {
383
440
  workingSet.delete(memoryId);
384
441
  contentCache.delete(memoryId);
@@ -393,9 +450,11 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
393
450
  // working set rather than blocking the later check from ever running.
394
451
  let exhaustedDetail: string | null = null;
395
452
  try {
396
- const seedHits = await withDeadline(deps.searchSeed(query, cfg.maxResults), deadlineMs, now);
453
+ throwIfAborted(deps.signal, "deep recall aborted");
454
+ const seedHits = await guarded(deps.searchSeed(query, cfg.maxResults));
397
455
  mergeIntoWorkingSet(workingSet, seedHits, "seed", contentFor);
398
456
  } catch (err) {
457
+ if (isAbortError(err)) throw err;
399
458
  if (!(err instanceof DeepRecallDeadlineExceeded)) {
400
459
  // Seed backend failure is the only ok:false path (§22: an empty index
401
460
  // proceeds; a thrown search does not).
@@ -405,13 +464,14 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
405
464
  }
406
465
  if (exhaustedDetail === null) {
407
466
  try {
408
- graph = { index: buildFrontierIndex(await withDeadline(deps.loadGraph(), deadlineMs, now)) };
467
+ graph = { index: buildFrontierIndex(await guarded(deps.loadGraph())) };
409
468
  // Seed hydration also enforces the active set: a stale or non-active
410
469
  // QMD hit leaves the working set instead of being hydrated in place.
411
470
  for (const memoryId of [...workingSet.keys()]) {
412
471
  await hydrateOrDrop(memoryId);
413
472
  }
414
473
  } catch (err) {
474
+ if (isAbortError(err)) throw err;
415
475
  if (!(err instanceof DeepRecallDeadlineExceeded)) throw err;
416
476
  exhaustedDetail = "total timeout reached loading the graph or hydrating seeds";
417
477
  }
@@ -447,6 +507,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
447
507
  try {
448
508
  while (exhaustedDetail === null && cfg.maxSteps > 0 && step < cfg.maxSteps) {
449
509
  const stepStartMs = now();
510
+ throwIfAborted(deps.signal, "deep recall aborted");
450
511
  if (now() >= deadlineMs) {
451
512
  pushStep(step, "BUDGET_EXHAUSTED", "total timeout reached before policy call", stepStartMs);
452
513
  break;
@@ -459,13 +520,11 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
459
520
  const stepBudgetMs = cfg.stepTimeoutMs > 0 ? cfg.stepTimeoutMs : Number.POSITIVE_INFINITY;
460
521
  const effectiveBudgetMs = Math.min(stepBudgetMs, deadlineMs - now());
461
522
  const timeoutMs = Number.isFinite(effectiveBudgetMs) ? Math.max(1, effectiveBudgetMs) : 0;
462
- const raw = await withDeadline(
523
+ const raw = await guarded(
463
524
  deps.callPolicy(
464
525
  renderStatePrompt({ query: currentQuery, workingSet, frontier, stepsRemaining: cfg.maxSteps - step }),
465
526
  timeoutMs
466
- ),
467
- deadlineMs,
468
- now
527
+ )
469
528
  );
470
529
  const parsed = parsePolicyOutput(raw);
471
530
  if (parsed === null) {
@@ -489,7 +548,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
489
548
  currentQuery = rewrite.refinedQuery;
490
549
  refinesUsed += 1;
491
550
  try {
492
- const refinedHits = await withDeadline(deps.searchSeed(currentQuery, cfg.maxResults), deadlineMs, now);
551
+ const refinedHits = await guarded(deps.searchSeed(currentQuery, cfg.maxResults));
493
552
  mergeIntoWorkingSet(workingSet, refinedHits, "refine", contentFor);
494
553
  for (const hit of refinedHits) {
495
554
  if (workingSet.has(hit.memoryId) && !contentCache.has(hit.memoryId)) {
@@ -499,8 +558,9 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
499
558
  } catch (err) {
500
559
  // Re-search failure mid-loop is partial, not fatal (§22): the loop
501
560
  // keeps what it has and the policy decides the next move. Deadline
502
- // expiry is NOT a partial failure — it ends the invocation.
503
- if (err instanceof DeepRecallDeadlineExceeded) throw err;
561
+ // expiry and cancellation are NOT partial failures — they end the
562
+ // invocation.
563
+ if (err instanceof DeepRecallDeadlineExceeded || isAbortError(err)) throw err;
504
564
  }
505
565
  frontier = refreshFrontier(workingSet, graph, expandedNodeIds);
506
566
  pushStep(step, "REFINE", currentQuery, stepStartMs);
@@ -528,7 +588,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
528
588
  if (!item || !node) continue;
529
589
  for (const memoryId of (node.sourceMemoryIds ?? []).slice(0, MAX_SOURCE_MEMORY_IDS_PER_NODE)) {
530
590
  if (workingSet.has(memoryId)) continue;
531
- const memory = await withDeadline(deps.loadMemory(memoryId), deadlineMs, now);
591
+ const memory = await guarded(deps.loadMemory(memoryId));
532
592
  // Only active memories enter the working set (§41); a null read
533
593
  // (foreign namespace, §30) skips the same way.
534
594
  if (!memory || !memory.active) continue;
@@ -47,15 +47,29 @@ export function isTerminalCodexSubscriptionError(error: unknown): boolean {
47
47
  );
48
48
  }
49
49
 
50
+ /**
51
+ * Single bounded headroom shared by both sides of the Codex deadline
52
+ * (issue #2890): the provider gets it as SIGTERM lead time
53
+ * (`timeoutMs - headroom`) and the outer race as settle grace, so the hard
54
+ * outer bound stays `timeoutMs + headroom` (<= 25 ms past the deadline).
55
+ */
56
+ export function codexDeadlineHeadroomMs(timeoutMs: number): number {
57
+ return Math.min(25, Math.max(1, Math.floor(timeoutMs / 10)));
58
+ }
59
+
50
60
  /**
51
61
  * Settle a fallback-LLM chain at the caller deadline. Abort the in-flight
52
- * work, return immediately, and observe the abandoned promise so a late
53
- * rejection cannot become unhandled.
62
+ * work, then wait a bounded settle grace for the chain to surface a typed
63
+ * provider timeout (default: one event-loop turn). A chain that settles
64
+ * within the grace wins with its own result or error; one that never
65
+ * settles still cannot exceed `timeoutMs + settleGraceMs`. The abandoned
66
+ * promise is observed so a late rejection cannot become unhandled.
54
67
  */
55
68
  export async function raceFallbackLlmDeadline<T>(
56
69
  work: Promise<T>,
57
70
  timeoutMs: number,
58
71
  abortOnTimeout: () => void,
72
+ settleGraceMs = 0,
59
73
  ): Promise<{ timedOut: true } | { timedOut: false; value: T }> {
60
74
  const deadline = new AbortController();
61
75
  const timer = setTimeout(() => deadline.abort(), timeoutMs);
@@ -69,15 +83,21 @@ export async function raceFallbackLlmDeadline<T>(
69
83
  return { timedOut: false, value };
70
84
  } catch (error) {
71
85
  if (!deadline.signal.aborted) throw error;
86
+ let graceTimer: NodeJS.Timeout | undefined;
72
87
  const afterAbort = await Promise.race([
73
88
  work.then(
74
89
  (value) => ({ state: "value" as const, value }),
75
90
  (lateError) => ({ state: "error" as const, error: lateError }),
76
91
  ),
77
92
  new Promise<{ state: "pending" }>((resolve) => {
78
- setImmediate(() => resolve({ state: "pending" }));
93
+ if (settleGraceMs > 0) {
94
+ graceTimer = setTimeout(() => resolve({ state: "pending" }), settleGraceMs);
95
+ } else {
96
+ setImmediate(() => resolve({ state: "pending" }));
97
+ }
79
98
  }),
80
99
  ]);
100
+ clearTimeout(graceTimer);
81
101
  if (afterAbort.state === "value") return { timedOut: false, value: afterAbort.value };
82
102
  if (afterAbort.state === "error") throw afterAbort.error;
83
103
  void work.then(
@@ -132,11 +152,13 @@ export async function tryCodexSubscriptionProvider(
132
152
  ...(resolvedApiKey ? { apiKey: resolvedApiKey } : {}),
133
153
  };
134
154
 
135
- // Let the provider surface its typed timeout before the generic outer deadline.
155
+ // Let the provider surface its typed timeout before the generic outer
156
+ // deadline: the shared bounded headroom is SIGTERM lead time here and
157
+ // settle grace in raceFallbackLlmDeadline (issue #2890).
136
158
  const callOptions = {
137
159
  timeoutMs: options.timeoutMs === undefined
138
160
  ? undefined
139
- : Math.max(1, options.timeoutMs - Math.min(100, Math.max(5, Math.floor(options.timeoutMs / 5)))),
161
+ : Math.max(1, options.timeoutMs - codexDeadlineHeadroomMs(options.timeoutMs)),
140
162
  signal: options.signal,
141
163
  };
142
164
  // A host/benchmark runner on the process seam still wins. The core
@@ -12,6 +12,7 @@ import {
12
12
  __setGatewayResolverForTest,
13
13
  clearSecretCache,
14
14
  } from "./resolve-provider-secret.js";
15
+ import { CodexSubscriptionTimeoutError } from "./providers/codex-subscription.js";
15
16
 
16
17
  test("fallback llm sends native JSON schema to chat completions", { concurrency: false }, async () => {
17
18
  clearModelsJsonCache();
@@ -986,6 +987,125 @@ test("fallback llm timeout is a hard deadline when the provider never settles",
986
987
  }
987
988
  });
988
989
 
990
+ test("codex typed timeout wins past the outer deadline within the settle grace", { concurrency: false }, async () => {
991
+ clearModelsJsonCache();
992
+ clearSecretCache();
993
+
994
+ const restoreRunner = __codexCliFallbackTestHooks.setRunCodexCliForTest(
995
+ (request) => {
996
+ const { promise, reject } = Promise.withResolvers<never>();
997
+ const onAbort = (): void => {
998
+ // Real timer by design: the settle grace itself is wall-clock
999
+ // behavior under test. Lands inside the grace (T=250 -> 25ms).
1000
+ setTimeout(() => reject(new CodexSubscriptionTimeoutError(250)), 5);
1001
+ };
1002
+ if (request.options.signal?.aborted) {
1003
+ onAbort();
1004
+ } else {
1005
+ request.options.signal?.addEventListener("abort", onAbort, { once: true });
1006
+ }
1007
+ return promise;
1008
+ },
1009
+ );
1010
+
1011
+ const llm = new FallbackLlmClient({
1012
+ agents: {
1013
+ defaults: {
1014
+ model: {
1015
+ primary: "codex-cli/gpt-custom",
1016
+ },
1017
+ },
1018
+ },
1019
+ models: {
1020
+ providers: {
1021
+ "codex-cli": {
1022
+ baseUrl: "",
1023
+ api: "codex-cli",
1024
+ apiKey: "codex-test-key",
1025
+ models: [],
1026
+ },
1027
+ },
1028
+ },
1029
+ });
1030
+
1031
+ try {
1032
+ await assert.rejects(
1033
+ llm.chatCompletion(
1034
+ [{ role: "user", content: "Say OK" }],
1035
+ { temperature: 0, maxTokens: 16, timeoutMs: 250 },
1036
+ ),
1037
+ (error: unknown) => {
1038
+ assert.ok(error instanceof CodexSubscriptionTimeoutError, `expected typed timeout, got: ${error}`);
1039
+ assert.equal(error.name, "TimeoutError");
1040
+ return true;
1041
+ },
1042
+ );
1043
+ } finally {
1044
+ restoreRunner();
1045
+ clearModelsJsonCache();
1046
+ clearSecretCache();
1047
+ }
1048
+ });
1049
+
1050
+ test("outer deadline stays the hard bound when the runner settles after the grace", { concurrency: false }, async () => {
1051
+ clearModelsJsonCache();
1052
+ clearSecretCache();
1053
+
1054
+ const lateSettled = Promise.withResolvers<void>();
1055
+ const restoreRunner = __codexCliFallbackTestHooks.setRunCodexCliForTest(
1056
+ (request) => {
1057
+ const { promise, reject } = Promise.withResolvers<never>();
1058
+ const onAbort = (): void => {
1059
+ // Real timer by design: the hard bound must hold against a provider
1060
+ // that outlives the grace. Lands past it (T=250 -> 25ms grace).
1061
+ setTimeout(() => {
1062
+ reject(new CodexSubscriptionTimeoutError(250));
1063
+ lateSettled.resolve();
1064
+ }, 80);
1065
+ };
1066
+ if (request.options.signal?.aborted) {
1067
+ onAbort();
1068
+ } else {
1069
+ request.options.signal?.addEventListener("abort", onAbort, { once: true });
1070
+ }
1071
+ return promise;
1072
+ },
1073
+ );
1074
+
1075
+ const llm = new FallbackLlmClient({
1076
+ agents: {
1077
+ defaults: {
1078
+ model: {
1079
+ primary: "codex-cli/gpt-custom",
1080
+ },
1081
+ },
1082
+ },
1083
+ models: {
1084
+ providers: {
1085
+ "codex-cli": {
1086
+ baseUrl: "",
1087
+ api: "codex-cli",
1088
+ apiKey: "codex-test-key",
1089
+ models: [],
1090
+ },
1091
+ },
1092
+ },
1093
+ });
1094
+
1095
+ try {
1096
+ const started = Date.now();
1097
+ const response = await llm.chatCompletion(
1098
+ [{ role: "user", content: "Say OK" }],
1099
+ { temperature: 0, maxTokens: 16, timeoutMs: 250 },
1100
+ );
1101
+ // Await the runner's actual late rejection — observed, never unhandled.
1102
+ await lateSettled.promise;
1103
+ } finally {
1104
+ restoreRunner();
1105
+ clearModelsJsonCache();
1106
+ clearSecretCache();
1107
+ }
1108
+ });
989
1109
  test("fallback llm can call Ollama native chat and suppress thinking", { concurrency: false }, async () => {
990
1110
  clearModelsJsonCache();
991
1111
  clearSecretCache();
@@ -18,6 +18,7 @@ import { loadModelsJsonProviders } from "./models-json.js";
18
18
  import {
19
19
  abortReason,
20
20
  classifyThrownProviderError,
21
+ codexDeadlineHeadroomMs,
21
22
  defaultOpenClawWorkspaceDir,
22
23
  extractResponsesOutputText,
23
24
  fallbackLlmRuntimeContextFromConfig,
@@ -379,29 +380,29 @@ export class FallbackLlmClient {
379
380
  controller.abort(abortReason(options.signal));
380
381
  };
381
382
  options.signal?.addEventListener("abort", onCallerAbort, { once: true });
382
- if (options.signal?.aborted) {
383
- onCallerAbort();
384
- }
383
+ if (options.signal?.aborted) onCallerAbort();
385
384
  const timedOptions = { ...options, signal: controller.signal };
386
385
  const chain = runChain(timedOptions);
387
- const guarded = chain.then(
388
- (value) => value,
389
- (err) => {
390
- if (isTerminalCodexSubscriptionError(err)) throw err;
391
- return null;
392
- },
393
- );
386
+ const guarded = chain.catch((err) => {
387
+ if (isTerminalCodexSubscriptionError(err)) throw err;
388
+ return null;
389
+ });
394
390
  try {
395
391
  const timeoutError = Object.assign(
396
392
  new Error(`task LLM timed out after ${options.timeoutMs}ms`),
397
393
  { name: "TimeoutError" },
398
394
  );
399
- const outcome = await raceFallbackLlmDeadline(guarded, options.timeoutMs, () => {
400
- log.warn(`task LLM: timed out after ${options.timeoutMs}ms`);
401
- recordFailure({ failureReason: "timeout", errorClass: "timeout" });
402
- controller.abort(timeoutError);
403
- if (options.failureDiag) options.failureDiag.lastError = timeoutError;
404
- });
395
+ const outcome = await raceFallbackLlmDeadline(
396
+ guarded,
397
+ options.timeoutMs,
398
+ () => {
399
+ log.warn(`task LLM: timed out after ${options.timeoutMs}ms`);
400
+ recordFailure({ failureReason: "timeout", errorClass: "timeout" });
401
+ controller.abort(timeoutError);
402
+ if (options.failureDiag) options.failureDiag.lastError = timeoutError;
403
+ },
404
+ models.some((m) => m.providerConfig.api === "codex-cli") ? codexDeadlineHeadroomMs(options.timeoutMs) : 0,
405
+ );
405
406
  if (outcome.timedOut) {
406
407
  return { ok: false, failure: { failureReason: "timeout", errorClass: "timeout" } };
407
408
  }
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
2
2
  import { test } from "node:test";
3
3
 
4
4
  import { DEFAULT_MEETING_APP_PATTERNS } from "./detect.js";
5
+ import { parseConfig } from "../config.js";
5
6
  import { DEFAULT_MEETINGS_CONFIG, parseMeetingsConfig } from "./config.js";
6
7
 
7
8
  test("absent config is the disabled default with shipped app patterns", () => {
@@ -70,3 +71,60 @@ test("finding 5 — inverted trust thresholds (autoApprove < review) are rejecte
70
71
  // still caught (the override interacts with the default).
71
72
  assert.throws(() => parseMeetingsConfig({ autoApproveTrust: 0.3 }), /must be >= meetings\.reviewTrust/);
72
73
  });
74
+
75
+ test("fully-specified valid config round-trips unchanged through the canonical parser (#2936)", () => {
76
+ const full = {
77
+ enabled: true,
78
+ appPatterns: ["CustomConf App"],
79
+ minOverlapMinutes: 5,
80
+ audioOnlyMinMinutes: 30,
81
+ mergeGapMinutes: 7,
82
+ contextDwellSeconds: 60,
83
+ maxContextChars: 12_000,
84
+ summaryMode: "review",
85
+ sourceTrust: 0.9,
86
+ autoApproveTrust: 0.8,
87
+ reviewTrust: 0.6,
88
+ };
89
+ const cfg = parseMeetingsConfig(full);
90
+ // Every knob must come back exactly as supplied — no re-normalization,
91
+ // no silent defaulting of valid values.
92
+ assert.equal(cfg.enabled, true);
93
+ assert.deepEqual(cfg.appPatterns, [...DEFAULT_MEETING_APP_PATTERNS, "CustomConf App"]);
94
+ assert.equal(cfg.minOverlapMinutes, 5);
95
+ assert.equal(cfg.audioOnlyMinMinutes, 30);
96
+ assert.equal(cfg.mergeGapMinutes, 7);
97
+ assert.equal(cfg.contextDwellSeconds, 60);
98
+ assert.equal(cfg.maxContextChars, 12_000);
99
+ assert.equal(cfg.summaryMode, "review");
100
+ assert.equal(cfg.sourceTrust, 0.9);
101
+ assert.equal(cfg.autoApproveTrust, 0.8);
102
+ assert.equal(cfg.reviewTrust, 0.6);
103
+ });
104
+
105
+ test("parseConfig routes meetings through exactly one canonical path — no silent aliases (#2936)", () => {
106
+ const full = {
107
+ enabled: true,
108
+ minOverlapMinutes: 9,
109
+ summaryMode: "off",
110
+ sourceTrust: 0.5,
111
+ autoApproveTrust: 0.5,
112
+ reviewTrust: 0.5,
113
+ };
114
+
115
+ // The one canonical entrypoint: a top-level `meetings` block.
116
+ const viaRoot = parseConfig({ meetings: full }).meetings;
117
+ assert.deepEqual(viaRoot, parseMeetingsConfig(full));
118
+
119
+ // No legacy-alias shapes feed the meetings block: anything other than the
120
+ // top-level `meetings` key must leave the subsystem at its defaults. A new
121
+ // alias would be a second parsed surface for the same runtime keys and
122
+ // must not land silently (it would also need schema + docs + snapshot
123
+ // updates and would flip this assertion).
124
+ const viaAliasShapes = parseConfig({
125
+ meeting: full,
126
+ desktopCapture: { meetings: full },
127
+ captureCompanions: { meetings: full },
128
+ }).meetings;
129
+ assert.deepEqual(viaAliasShapes, parseMeetingsConfig(undefined));
130
+ });
@@ -2545,7 +2545,7 @@ export class ExtractionPersistCoordinator {
2545
2545
  const semanticMerge = await applySemanticMergeAtPersist(this.deps, {
2546
2546
  storage: targetStorage, content: fact.content, category: writeCategory, sources: fact.sources, sourceConnector: extractionSourceConnector,
2547
2547
  incomingMetadata: { tags: [...fact.tags, ...injectionScreenTags], entityRef: fact.entityRef, structuredAttributes: fact.structuredAttributes, validAt: biTemporal ? biTemporal.validFrom : sourceContext?.validAt, biTemporal: biTemporal !== undefined, importanceScore: importance.score, confidence: fact.confidence, provenanceStrength: fact.provenance, toolScoped: factToolScoped, subject: factSubject, origin, faithfulness: faithfulnessFm, memoryKind }, skip: contradictionDetected || faithfulnessEnforceStatus === "pending_review" || batchBackendUnavailable || novelty.decision === "add",
2548
- incomingLinks: links.length > 0 ? links : undefined, incomingCitedContent: citedFactContent,
2548
+ incomingLinks: links.length > 0 ? links : undefined, incomingCitedContent: citedFactContent, incomingCitationContext: citationContextBase,
2549
2549
  targetHasPromotedCopies: (targetId) => promotedCopyProbe.check(targetStorage, targetId),
2550
2550
  });
2551
2551
  if (semanticMerge.action === "created" && semanticMerge.reason === "backend_unavailable") batchBackendUnavailable = true; // arms the batch short circuit for the remaining facts
@@ -20,7 +20,9 @@ import { ProfilingCollector } from "../profiling.js";
20
20
  import { trustResultFor, type TrustStageResultItem } from "../trust-score-stage.js";
21
21
  import type { RecallResultFormatter } from "./recall-result-formatter.js";
22
22
  import type { IdentityInjectionMode, PluginConfig, QmdSearchResult } from "../types.js";
23
- import { applyRecallStateViews } from "../recall-state-view-wire.js";
23
+ import { stateViewPacketActive } from "../recall-state-view-anchors.js";
24
+ import { resultStateViewKey, stateViewPacketKeys } from "../recall-state-view.js";
25
+ import { applyRecallStateViews } from "../recall-state-view-wire.js";
24
26
 
25
27
  export interface RecallEntryDeps {
26
28
  appendRecallSection(
@@ -300,6 +302,15 @@ export class RecallEntryCoordinator {
300
302
  );
301
303
  if (injectable.length === 0) return;
302
304
 
305
+ // #2928 — packet-atomic final budgeting: under packet semantics (state
306
+ // view active, no historical asOf pin) rows of one supersession packet
307
+ // share their canonical packet root key, so the section coordinator's
308
+ // character/token cap admits or drops the packet as a unit.
309
+ const packetKeys =
310
+ stateViewPacketActive(options.stateViewActive === true, options.asOfMs)
311
+ ? stateViewPacketKeys(injectable)
312
+ : [];
313
+
303
314
  const formatted = this.deps.recallResultFormatter.formatQmdResultEntries(
304
315
  options.title,
305
316
  injectable,
@@ -324,6 +335,9 @@ export class RecallEntryCoordinator {
324
335
  ...(memoryId ? { memoryId } : {}),
325
336
  ...(result.path ? { memoryPath: result.path } : {}),
326
337
  ...(result.namespace ? { memoryNamespace: result.namespace } : {}),
338
+ ...(packetKeys[index] && resultStateViewKey(result)
339
+ ? { packetKey: packetKeys[index] }
340
+ : {}),
327
341
  },
328
342
  );
329
343
  }
@@ -5043,6 +5043,7 @@ export class RecallInternalCoordinator {
5043
5043
  // Build a path → QmdSearchResult index so we can pull per-result
5044
5044
  // explain data (e.g. reinforcementBoost) from the result that
5045
5045
  // boostSearchResults annotated before surfacing to xray.
5046
+ // #1952: label the captured branch through the same inject-seam annotator.
5046
5047
  const xrayResultByPath = indexStateViewAnnotatedResults(
5047
5048
  xrayRecalledResults, retrievalQuery, this.deps.config, stateViewActive, asOfMs,
5048
5049
  );