@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
@@ -49,6 +49,7 @@ import {
49
49
  import type { SemanticDedupHit } from "./semantic.js";
50
50
  import { invalidationCommitFingerprint, isSemanticFrontmatterChange, markCasCommittedRevision, nextCasRevisionIso } from "../storage/deletion-revision-store.js";
51
51
  import type { CasRevisionReadStatus } from "../storage/cas-revision-store.js";
52
+ import { attachCitation } from "../source-attribution.js";
52
53
 
53
54
  // The merge snapshot trigger must stay a literal union: a widened
54
55
  // `VersionTrigger` (e.g. annotated `readonly string[]`) would let an unknown
@@ -3147,6 +3148,288 @@ test("applySemanticMergeAtPersist: mixed default+custom citation markers hash as
3147
3148
  assert.equal(stamped, ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text));
3148
3149
  });
3149
3150
 
3151
+ // ── #2916: reapply inline attribution to the committed merged body ───────────
3152
+
3153
+ test("applySemanticMergeAtPersist: a legacy target with no liftable marker still commits an attributed body (#2916)", async () => {
3154
+ const h = await harness({ topLevelConfig: { inlineSourceAttributionEnabled: true } });
3155
+ const NOW = new Date("2026-08-23T00:00:00.000Z");
3156
+ const CONTEXT = { agent: "agent-a", session: "project/example/s-42" };
3157
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3158
+ storage: h.storage,
3159
+ content: INCOMING,
3160
+ category: "fact",
3161
+ // No cited body supplied: the target was created before attribution was
3162
+ // enabled, so without the fresh-write fallback nothing in the pipeline
3163
+ // would attribute the merged claims.
3164
+ incomingCitationContext: CONTEXT,
3165
+ now: () => NOW,
3166
+ judgeCall: (options) => acceptingJudge(options),
3167
+ } as ApplySemanticMergeOptions);
3168
+ assert.equal(outcome.action, "merged");
3169
+ // Exactly what a fresh attributed write of the merged body would persist:
3170
+ // the shared attachCitation helper, this write's context, the merge's
3171
+ // commit timestamp.
3172
+ const expected = attachCitation(MERGED, { ...CONTEXT, ts: NOW.toISOString() });
3173
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3174
+ assert.equal(committed?.content, expected);
3175
+ assert.ok(expected.includes("[Source:"), "the reapplied marker must use the configured format");
3176
+ if (outcome.action !== "merged") return;
3177
+ assert.equal(outcome.mergedContent, expected);
3178
+ // Canonical identity survives: the hash stays on the RAW pre-citation body.
3179
+ const stamped = h.calls.frontmatterPatches.at(-1)?.patch.contentHash;
3180
+ assert.equal(stamped, ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text));
3181
+ // Promotion parity: the committed attributed record still yields a payload.
3182
+ const { payload } = await buildMergedTargetPromotionPayload(h.storage, outcome);
3183
+ assert.ok(payload, "a fully patched attributed merge must still promote");
3184
+ assert.equal(payload?.sourceMemoryId, "fact-target");
3185
+ });
3186
+
3187
+ test("applySemanticMergeAtPersist: an already-attributed merged body gains no duplicate marker on retry (#2916)", async () => {
3188
+ const MARKER = "[Source: agent=agent-a, session=s-42, ts=2026-08-23T00:00:00.000Z]";
3189
+ const RETRY_BODY = `${MERGED} ${MARKER}`;
3190
+ const retryJudge = async () => ({
3191
+ decision: "merge" as const,
3192
+ targetId: "fact-target",
3193
+ mergedContent: RETRY_BODY,
3194
+ reason: "retry of an already-attributed merge",
3195
+ });
3196
+ // (a) The incoming marker already trails the judge's body — the N+7 (C)
3197
+ // retry shape, where the previous merge committed the marker into the
3198
+ // target the judge then re-merged.
3199
+ const a = await harness({ topLevelConfig: { inlineSourceAttributionEnabled: true } });
3200
+ const outcomeA = await applySemanticMergeAtPersist(a.deps, {
3201
+ storage: a.storage,
3202
+ content: INCOMING,
3203
+ category: "fact",
3204
+ incomingCitedContent: `${INCOMING} ${MARKER}`,
3205
+ judgeCall: retryJudge,
3206
+ } as ApplySemanticMergeOptions);
3207
+ assert.equal(outcomeA.action, "merged");
3208
+ // (b) No cited body; the body already carries a marker — the #2916
3209
+ // fallback must be a no-op, not a second attachment.
3210
+ const b = await harness({ topLevelConfig: { inlineSourceAttributionEnabled: true } });
3211
+ const outcomeB = await applySemanticMergeAtPersist(b.deps, {
3212
+ storage: b.storage,
3213
+ content: INCOMING,
3214
+ category: "fact",
3215
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3216
+ judgeCall: retryJudge,
3217
+ } as ApplySemanticMergeOptions);
3218
+ assert.equal(outcomeB.action, "merged");
3219
+ const cases = [
3220
+ ["lifted-marker retry", a, outcomeA],
3221
+ ["attached-marker retry", b, outcomeB],
3222
+ ] as const;
3223
+ for (const [label, h, outcome] of cases) {
3224
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3225
+ assert.equal(committed?.content, RETRY_BODY, label);
3226
+ assert.equal(
3227
+ committed?.content.split("[Source:").length - 1,
3228
+ 1,
3229
+ `${label}: exactly one marker, never a duplicate`,
3230
+ );
3231
+ if (outcome.action === "merged") {
3232
+ assert.equal(outcome.mergedContent, RETRY_BODY, label);
3233
+ }
3234
+ }
3235
+ });
3236
+
3237
+ test("applySemanticMergeAtPersist: the reapplied citation honors a custom template (#2916)", async () => {
3238
+ const CUSTOM_TEMPLATE = "[src:{agent}/{sessionId}@{ts}]";
3239
+ const h = await harness({
3240
+ topLevelConfig: {
3241
+ inlineSourceAttributionEnabled: true,
3242
+ inlineSourceAttributionFormat: CUSTOM_TEMPLATE,
3243
+ },
3244
+ });
3245
+ const NOW = new Date("2026-08-23T00:00:00.000Z");
3246
+ const CONTEXT = { agent: "agent-a", session: "project:s-42" };
3247
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3248
+ storage: h.storage,
3249
+ content: INCOMING,
3250
+ category: "fact",
3251
+ incomingCitationContext: CONTEXT,
3252
+ now: () => NOW,
3253
+ judgeCall: (options) => acceptingJudge(options),
3254
+ } as ApplySemanticMergeOptions);
3255
+ assert.equal(outcome.action, "merged");
3256
+ const expected = attachCitation(MERGED, { ...CONTEXT, ts: NOW.toISOString() }, CUSTOM_TEMPLATE);
3257
+ assert.ok(expected.includes("[src:agent-a/s-42@"), "the custom template must format the marker");
3258
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3259
+ assert.equal(committed?.content, expected);
3260
+ // Identity stays on the raw body — the custom marker strips before hashing.
3261
+ const stamped = h.calls.frontmatterPatches.at(-1)?.patch.contentHash;
3262
+ assert.equal(stamped, ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text));
3263
+ });
3264
+
3265
+ test("applySemanticMergeAtPersist: attribution disabled commits the judge's body unchanged (#2916)", async () => {
3266
+ const h = await harness();
3267
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3268
+ storage: h.storage,
3269
+ content: INCOMING,
3270
+ category: "fact",
3271
+ // The context is present but the feature flag is off — no marker.
3272
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3273
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3274
+ judgeCall: (options) => acceptingJudge(options),
3275
+ } as ApplySemanticMergeOptions);
3276
+ assert.equal(outcome.action, "merged");
3277
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3278
+ assert.equal(committed?.content, MERGED, "the committed body carries no citation marker");
3279
+ });
3280
+
3281
+ test("applySemanticMergeAtPersist: a degraded merge registers the RAW identity of a freshly attributed body (#2916)", async () => {
3282
+ // Patch fails AND rollback fails: the target holds the attributed merged
3283
+ // body with its pre-merge metadata. The degraded repair must register the
3284
+ // RAW pre-citation identity, and the degraded promotion refusal must hold.
3285
+ const h = await harness({
3286
+ frontmatterFails: true,
3287
+ rollbackFails: true,
3288
+ topLevelConfig: { inlineSourceAttributionEnabled: true },
3289
+ });
3290
+ const degraded = await applySemanticMergeAtPersist(h.deps, {
3291
+ storage: h.storage,
3292
+ content: INCOMING,
3293
+ category: "fact",
3294
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3295
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3296
+ judgeCall: (options) => acceptingJudge(options),
3297
+ } as ApplySemanticMergeOptions);
3298
+ assert.equal(degraded.action, "merged");
3299
+ if (degraded.action !== "merged") return;
3300
+ assert.equal(degraded.provenancePatched, false);
3301
+ assert.ok(
3302
+ degraded.mergedContent.includes("[Source:"),
3303
+ "the degraded body still carries the freshly attached marker",
3304
+ );
3305
+ assert.deepEqual(h.calls.hashRegistrations, [
3306
+ { id: "fact-target", hash: ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text) },
3307
+ ]);
3308
+ assert.equal(
3309
+ (await buildMergedTargetPromotionPayload(h.storage, degraded)).payload,
3310
+ null,
3311
+ "a degraded merge never yields a promotion payload",
3312
+ );
3313
+ });
3314
+
3315
+ test("applySemanticMergeAtPersist: a rolled-back merge restores the marker-free pre-merge body (#2916)", async () => {
3316
+ const h = await harness({
3317
+ frontmatterFails: true,
3318
+ topLevelConfig: { inlineSourceAttributionEnabled: true },
3319
+ });
3320
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3321
+ storage: h.storage,
3322
+ content: INCOMING,
3323
+ category: "fact",
3324
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3325
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3326
+ judgeCall: (options) => acceptingJudge(options),
3327
+ } as ApplySemanticMergeOptions);
3328
+ assert.deepEqual(outcome, { action: "created", reason: "update_failed" });
3329
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3330
+ assert.equal(committed?.content, EXISTING, "rollback restores the exact pre-merge body");
3331
+ });
3332
+
3333
+ test("applySemanticMergeAtPersist: an all-placeholder template does not attach or hash a citation", async () => {
3334
+ const TEMPLATE = "{agent}{sessionId}";
3335
+ const CONTEXT = { agent: "agent-a", session: "project:s-42" };
3336
+ const h = await harness({
3337
+ topLevelConfig: {
3338
+ inlineSourceAttributionEnabled: true,
3339
+ inlineSourceAttributionFormat: TEMPLATE,
3340
+ },
3341
+ });
3342
+ const first = await applySemanticMergeAtPersist(h.deps, {
3343
+ storage: h.storage,
3344
+ content: INCOMING,
3345
+ category: "fact",
3346
+ incomingCitationContext: CONTEXT,
3347
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3348
+ judgeCall: (options) => acceptingJudge(options),
3349
+ } as ApplySemanticMergeOptions);
3350
+ assert.equal(first.action, "merged");
3351
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3352
+ assert.equal(committed?.content, MERGED, "unmatchable templates must not attach a marker");
3353
+ assert.equal(
3354
+ h.calls.frontmatterPatches.at(-1)?.patch.contentHash,
3355
+ ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text),
3356
+ );
3357
+
3358
+ const retry = await applySemanticMergeAtPersist(h.deps, {
3359
+ storage: h.storage,
3360
+ content: INCOMING,
3361
+ category: "fact",
3362
+ incomingCitationContext: CONTEXT,
3363
+ now: () => new Date("2026-08-23T00:00:01.000Z"),
3364
+ judgeCall: (options) => acceptingJudge(options),
3365
+ } as ApplySemanticMergeOptions);
3366
+ assert.equal(retry.action, "merged");
3367
+ const retried = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3368
+ assert.equal(retried?.content, MERGED, "retry must not accumulate an unmatchable marker");
3369
+ });
3370
+
3371
+ test("applySemanticMergeAtPersist: a prior-template marker is preserved and stripped from the hash", async () => {
3372
+ const PRIOR = "[src:{agent}/{sessionId}@{date}]";
3373
+ const PRIOR_CIT = "[src:agent-a/s-old@2026-08-19]";
3374
+ const CURRENT = "[via:{agent}]";
3375
+ const MERGED_WITH_PRIOR = `${MERGED} ${PRIOR_CIT}`;
3376
+ const h = await harness({
3377
+ topLevelConfig: {
3378
+ inlineSourceAttributionEnabled: true,
3379
+ inlineSourceAttributionFormat: CURRENT,
3380
+ inlineSourceAttributionFormatHistory: [PRIOR],
3381
+ },
3382
+ });
3383
+ await h.setTargetContent(`${EXISTING} ${PRIOR_CIT}`);
3384
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3385
+ storage: h.storage,
3386
+ content: INCOMING,
3387
+ category: "fact",
3388
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3389
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3390
+ judgeCall: async () => ({
3391
+ decision: "merge" as const,
3392
+ targetId: "fact-target",
3393
+ mergedContent: MERGED_WITH_PRIOR,
3394
+ reason: "template migration keeps the prior marker",
3395
+ }),
3396
+ } as ApplySemanticMergeOptions);
3397
+ assert.equal(outcome.action, "merged");
3398
+ const committed = await h.storage.getMemoryByIdIncludingArchived("fact-target");
3399
+ assert.equal(committed?.content, MERGED_WITH_PRIOR, "the prior marker stays and is not duplicated");
3400
+ assert.equal(committed?.content.includes("[via:"), false);
3401
+ assert.equal(
3402
+ h.calls.frontmatterPatches.at(-1)?.patch.contentHash,
3403
+ ContentHashIndex.computeHash(sanitizeMemoryContent(MERGED).text),
3404
+ "the prior marker is stripped before hashing",
3405
+ );
3406
+ });
3407
+
3408
+ test("applySemanticMergeAtPersist: a lost CAS race does not hash an all-placeholder citation", async () => {
3409
+ const RACED = "Billing service deploys happen on Tuesdays, except during a freeze.";
3410
+ const h = await harness({
3411
+ mutateOnWrite: RACED,
3412
+ topLevelConfig: {
3413
+ inlineSourceAttributionEnabled: true,
3414
+ inlineSourceAttributionFormat: "{agent}{sessionId}",
3415
+ },
3416
+ });
3417
+ const outcome = await applySemanticMergeAtPersist(h.deps, {
3418
+ storage: h.storage,
3419
+ content: INCOMING,
3420
+ category: "fact",
3421
+ incomingCitationContext: { agent: "agent-a", session: "project:s-42" },
3422
+ now: () => new Date("2026-08-23T00:00:00.000Z"),
3423
+ judgeCall: (options) => acceptingJudge(options),
3424
+ } as ApplySemanticMergeOptions);
3425
+ assert.deepEqual(outcome, { action: "created", reason: "target_changed" });
3426
+ assert.deepEqual(h.calls.contentUpdates, []);
3427
+ assert.deepEqual(h.calls.hashRegistrations, []);
3428
+ const onDisk = await readFile(h.target.path, "utf8");
3429
+ assert.equal(onDisk.includes(RACED), true);
3430
+ assert.equal(onDisk.includes("agent-a"), false);
3431
+ });
3432
+
3150
3433
  /** Minimal real-dir harness for the merged-target post-effects executor. */
3151
3434
  async function postEffectsHarness(options: {
3152
3435
  graphEdgeThrows?: boolean;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Deep-recall MCP operation boundary regressions (issue #2915).
3
+ *
4
+ * `deep_recall` runs through the shared operation registry (the dispatch the
5
+ * MCP server uses). At this boundary a malformed `maxSteps` must be REJECTED
6
+ * — `"abc"` previously fell back to the configured default and `""` coerced
7
+ * to 0 (§39) — and the request's cancellation signal must reach the service.
8
+ */
9
+
10
+ import test from "node:test";
11
+ import assert from "node:assert/strict";
12
+
13
+ import { getOperation, type OperationContext } from "./access-boundary.js";
14
+ import { EngramAccessInputError, type EngramAccessService } from "./access-service.js";
15
+ import "./access-operations.js";
16
+
17
+ interface CapturedRequest {
18
+ query?: string;
19
+ maxSteps?: number;
20
+ namespace?: string;
21
+ sessionKey?: string;
22
+ authenticatedPrincipal?: string;
23
+ abortSignal?: AbortSignal;
24
+ }
25
+
26
+ function serviceCapturing(captured: CapturedRequest): EngramAccessService {
27
+ return {
28
+ async deepRecall(request: CapturedRequest) {
29
+ Object.assign(captured, request);
30
+ return { ok: true, entries: [], trace: [], rendered: "synthetic" };
31
+ },
32
+ } as unknown as EngramAccessService;
33
+ }
34
+
35
+ function ctx(service: EngramAccessService, abortSignal?: AbortSignal): OperationContext {
36
+ return { service, authenticatedPrincipal: "operator", ...(abortSignal ? { abortSignal } : {}) };
37
+ }
38
+
39
+ test("deep_recall operation rejects malformed maxSteps instead of silently defaulting (issue #2915)", async () => {
40
+ const operation = getOperation("deep_recall");
41
+ assert.ok(operation, "the deep_recall operation is registered");
42
+ for (const maxSteps of ["abc", "", "1.5", -1]) {
43
+ const captured: CapturedRequest = {};
44
+ await assert.rejects(
45
+ operation.run({ query: "payments routing", maxSteps }, ctx(serviceCapturing(captured))),
46
+ (err: unknown) => err instanceof EngramAccessInputError && /maxSteps/.test(err.message),
47
+ `must reject maxSteps ${JSON.stringify(maxSteps)}`,
48
+ );
49
+ assert.equal(captured.maxSteps, undefined, "the service is never reached with invalid input");
50
+ }
51
+ });
52
+
53
+ test("deep_recall operation forwards parsed maxSteps and the cancellation signal (issue #2915)", async () => {
54
+ const operation = getOperation("deep_recall");
55
+ assert.ok(operation);
56
+ const captured: CapturedRequest = {};
57
+ const controller = new AbortController();
58
+ await operation.run(
59
+ { query: "payments routing", maxSteps: "2", namespace: "ns_x" },
60
+ ctx(serviceCapturing(captured), controller.signal),
61
+ );
62
+ assert.equal(captured.maxSteps, 2, "a digit-string maxSteps parses to the integer it names");
63
+ assert.equal(captured.namespace, "ns_x");
64
+ assert.equal(captured.authenticatedPrincipal, "operator");
65
+ assert.equal(captured.abortSignal, controller.signal, "the transport signal reaches the service call");
66
+ });
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Deep-recall CLI identity regression (issue #2915).
3
+ *
4
+ * With namespaces enabled the read path refuses an unauthenticated caller,
5
+ * and the standalone CLI has no transport to authenticate one — so the CLI
6
+ * must carry the SAME identity options the access CLI uses
7
+ * (`--principal` / `--session-key`) into the service call. This drives the
8
+ * registered commander action against a minimal orchestrator double and
9
+ * asserts the authenticated principal reaches namespace resolution.
10
+ */
11
+
12
+ import assert from "node:assert/strict";
13
+ import test from "node:test";
14
+
15
+ import { parseConfig } from "./config.js";
16
+ import type { CliCommand } from "./cli.js";
17
+ import { registerDeepRecallCommands } from "./cli/deep-recall-commands.js";
18
+ import type { Orchestrator } from "./orchestrator.js";
19
+
20
+ interface RegisteredAction {
21
+ run: (...args: unknown[]) => Promise<void>;
22
+ }
23
+
24
+ function captureRegisteredAction(orchestrator: Orchestrator): RegisteredAction {
25
+ let action: RegisteredAction | undefined;
26
+ const chain = {
27
+ command: () => chain,
28
+ description: () => chain,
29
+ option: () => chain,
30
+ action: (fn: (...args: unknown[]) => Promise<void>) => {
31
+ action = { run: fn };
32
+ return chain;
33
+ },
34
+ };
35
+ registerDeepRecallCommands(chain as unknown as CliCommand, orchestrator);
36
+ assert.ok(action, "the deep-recall command registered an action");
37
+ return action;
38
+ }
39
+
40
+ test("deep-recall CLI passes the operator's identity into the namespaced read (issue #2915)", async () => {
41
+ const config = parseConfig({
42
+ memoryDir: "/synthetic/cli-identity",
43
+ namespacesEnabled: true,
44
+ defaultNamespace: "default",
45
+ namespacePolicies: [{ name: "ns_alice", readPrincipals: ["alice"], writePrincipals: ["alice"] }],
46
+ deepRecall: { enabled: true, maxSteps: 0 },
47
+ });
48
+ const storageNamespaces: string[] = [];
49
+ const orchestrator = {
50
+ config,
51
+ async getStorage(namespace: string) {
52
+ storageNamespaces.push(namespace);
53
+ return {
54
+ dir: "/synthetic/cli-identity",
55
+ async getMemoryById() {
56
+ return null;
57
+ },
58
+ };
59
+ },
60
+ async searchAcrossNamespaces() {
61
+ return [];
62
+ },
63
+ localLlm: null,
64
+ fastGatewayLlm: null,
65
+ } as unknown as Orchestrator;
66
+
67
+ const registered = captureRegisteredAction(orchestrator);
68
+ const exitCodeBefore = process.exitCode;
69
+ const consoleLog = console.log;
70
+ console.log = () => {};
71
+ try {
72
+ await registered.run("payments routing", { principal: "alice", namespace: "ns_alice", json: true });
73
+ assert.deepEqual(
74
+ storageNamespaces,
75
+ ["ns_alice"],
76
+ "the authenticated principal's namespace was resolved and read",
77
+ );
78
+ } finally {
79
+ console.log = consoleLog;
80
+ process.exitCode = exitCodeBefore;
81
+ }
82
+ });
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Strict `maxSteps` request parsing (issue #2915) — the one parser MCP,
3
+ * HTTP, and CLI share. Absent means absent; everything else must be a
4
+ * non-negative safe integer. Malformed (`"abc"`), empty (`""`), fractional
5
+ * (`"1.5"` / `1.5`), negative, unsafe, and non-number values throw instead of
6
+ * silently falling back to the configured default (§39).
7
+ */
8
+
9
+ import test from "node:test";
10
+ import assert from "node:assert/strict";
11
+
12
+ import { parseDeepRecallMaxSteps } from "./deep-recall-config.js";
13
+
14
+ test("parseDeepRecallMaxSteps: absence stays absent", () => {
15
+ assert.equal(parseDeepRecallMaxSteps(undefined), undefined);
16
+ assert.equal(parseDeepRecallMaxSteps(null), undefined);
17
+ });
18
+
19
+ test("parseDeepRecallMaxSteps: accepts non-negative integers in number and digit-string form", () => {
20
+ assert.equal(parseDeepRecallMaxSteps(0), 0);
21
+ assert.equal(parseDeepRecallMaxSteps(4), 4);
22
+ assert.equal(parseDeepRecallMaxSteps("0"), 0);
23
+ assert.equal(parseDeepRecallMaxSteps("3"), 3);
24
+ assert.equal(parseDeepRecallMaxSteps(" 3 "), 3);
25
+ assert.equal(parseDeepRecallMaxSteps(Number.MAX_SAFE_INTEGER), Number.MAX_SAFE_INTEGER);
26
+ assert.equal(parseDeepRecallMaxSteps(String(Number.MAX_SAFE_INTEGER)), Number.MAX_SAFE_INTEGER);
27
+ });
28
+
29
+ test("parseDeepRecallMaxSteps: rejects malformed, empty, fractional, negative, and non-number input", () => {
30
+ const invalid: unknown[] = ["abc", "", " ", "1.5", "1e2", "0x3", "-1", "-1", 1.5, -0.5, -1, true, {}, [], Number.NaN];
31
+ for (const raw of invalid) {
32
+ assert.throws(
33
+ () => parseDeepRecallMaxSteps(raw),
34
+ /maxSteps must be a non-negative integer/,
35
+ `must reject ${JSON.stringify(raw)}`,
36
+ );
37
+ }
38
+ });
39
+
40
+ test("parseDeepRecallMaxSteps: rejects unsafe integers and precision-losing digit strings", () => {
41
+ const overflowString = "9007199254740993";
42
+ const unsafe: unknown[] = [
43
+ Number.MAX_SAFE_INTEGER + 1,
44
+ String(Number.MAX_SAFE_INTEGER + 1),
45
+ overflowString,
46
+ "99999999999999999999",
47
+ ];
48
+ for (const raw of unsafe) {
49
+ assert.throws(
50
+ () => parseDeepRecallMaxSteps(raw),
51
+ /maxSteps must be a non-negative integer/,
52
+ `must reject ${String(raw)}`,
53
+ );
54
+ }
55
+ assert.notEqual(String(Number(overflowString)), overflowString, "Number() rounds this string; the parser must not");
56
+ });
@@ -81,3 +81,35 @@ export function parseDeepRecallConfig(raw: unknown): DeepRecallConfig {
81
81
  totalTimeoutMs: parseCount(src, "totalTimeoutMs", DEEP_RECALL_CONFIG_DEFAULTS.totalTimeoutMs),
82
82
  };
83
83
  }
84
+
85
+ /**
86
+ * Strict request-surface parse of an optional `maxSteps` override
87
+ * (issue #2915). Shared by MCP, HTTP, and CLI so every boundary rejects the
88
+ * same way instead of silently defaulting: absent/null is `undefined`;
89
+ * anything else must be a non-negative safe integer — a JS safe integer, or a
90
+ * string whose trimmed form is bare digits that parse without overflow.
91
+ * Malformed (`"abc"`), empty (`""`), fractional (`"1.5"` / `1.5`), negative,
92
+ * unsafe (`Number.MAX_SAFE_INTEGER + 1`), and non-number values throw instead
93
+ * of falling back to the configured default (§39).
94
+ */
95
+ export function parseDeepRecallMaxSteps(raw: unknown): number | undefined {
96
+ if (raw === undefined || raw === null) return undefined;
97
+ if (typeof raw === "number") {
98
+ if (!Number.isSafeInteger(raw) || raw < 0) {
99
+ throw new Error(`maxSteps must be a non-negative integer; got ${JSON.stringify(raw)}`);
100
+ }
101
+ return raw;
102
+ }
103
+ if (typeof raw === "string") {
104
+ const trimmed = raw.trim();
105
+ if (!/^[0-9]+$/.test(trimmed)) {
106
+ throw new Error(`maxSteps must be a non-negative integer; got ${JSON.stringify(raw)}`);
107
+ }
108
+ const parsed = Number(trimmed);
109
+ if (!Number.isSafeInteger(parsed)) {
110
+ throw new Error(`maxSteps must be a non-negative integer; got ${JSON.stringify(raw)}`);
111
+ }
112
+ return parsed;
113
+ }
114
+ throw new Error(`maxSteps must be a non-negative integer; got ${JSON.stringify(raw)}`);
115
+ }
@@ -12,19 +12,11 @@ import type { IncomingMessage, ServerResponse } from "node:http";
12
12
  import { deepRecallRequestSchema } from "./access-schema.js";
13
13
  import { EngramAccessInputError } from "./access-errors.js";
14
14
  import type { EngramAccessService } from "./access-service.js";
15
+ import { parseDeepRecallMaxSteps } from "./deep-recall-config.js";
15
16
 
16
17
  type RespondJson = (res: ServerResponse, status: number, payload: unknown) => void;
17
18
  type ReadJsonBody = (req: IncomingMessage) => Promise<unknown>;
18
19
 
19
- function coerceMaxSteps(raw: unknown): number | undefined {
20
- if (raw === undefined || raw === null) return undefined;
21
- const value = typeof raw === "string" ? Number(raw) : raw;
22
- if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
23
- throw new EngramAccessInputError("maxSteps must be a non-negative integer");
24
- }
25
- return value;
26
- }
27
-
28
20
  export async function respondDeepRecall(
29
21
  req: IncomingMessage,
30
22
  res: ServerResponse,
@@ -52,6 +44,8 @@ export async function respondDeepRecall(
52
44
  bodyNamespace?: string,
53
45
  bodySessionKey?: string,
54
46
  ) => { namespace?: string; sessionKey?: string; authenticatedPrincipal?: string },
47
+ /** Transport cancellation (issue #2915): aborts seed search, graph reads, policy calls. */
48
+ abortSignal?: AbortSignal,
55
49
  ): Promise<void> {
56
50
  const parsed = deepRecallRequestSchema.safeParse(await readJsonBody(req));
57
51
  if (!parsed.success) {
@@ -62,7 +56,12 @@ export async function respondDeepRecall(
62
56
  );
63
57
  return;
64
58
  }
65
- const maxSteps = coerceMaxSteps(parsed.data.maxSteps);
59
+ let maxSteps: number | undefined;
60
+ try {
61
+ maxSteps = parseDeepRecallMaxSteps(parsed.data.maxSteps);
62
+ } catch (err) {
63
+ throw new EngramAccessInputError(err instanceof Error ? err.message : String(err));
64
+ }
66
65
  const scope = scopeFor(parsed.data.namespace, parsed.data.sessionKey);
67
66
  const result = await service.deepRecall({
68
67
  query: parsed.data.query,
@@ -70,6 +69,7 @@ export async function respondDeepRecall(
70
69
  namespace: scope.namespace,
71
70
  sessionKey: scope.sessionKey,
72
71
  authenticatedPrincipal: scope.authenticatedPrincipal,
72
+ ...(abortSignal ? { abortSignal } : {}),
73
73
  });
74
74
  respondJson(res, 200, result);
75
75
  }