@remnic/core 9.69.39 → 9.69.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (774) hide show
  1. package/dist/access-admin-ops-surface.d.ts +16 -14
  2. package/dist/access-admin-ops-surface.js +75 -74
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-authorization-probe.d.ts +16 -14
  5. package/dist/access-authorization-probe.js +76 -75
  6. package/dist/access-boundary.d.ts +16 -14
  7. package/dist/access-boundary.js +75 -74
  8. package/dist/access-cli.js +173 -170
  9. package/dist/access-cli.js.map +1 -1
  10. package/dist/access-coding-context-resolution.d.ts +1 -1
  11. package/dist/access-extraction-force-flush.d.ts +16 -14
  12. package/dist/access-extraction-force-flush.js +75 -74
  13. package/dist/access-health-types.d.ts +1 -1
  14. package/dist/access-http-briefing.d.ts +16 -14
  15. package/dist/access-http-briefing.js +76 -75
  16. package/dist/access-http-lcm-compaction.d.ts +16 -14
  17. package/dist/access-http-lifecycle-flush.d.ts +16 -14
  18. package/dist/access-http-offline-stream.d.ts +16 -14
  19. package/dist/access-http-query.d.ts +2 -2
  20. package/dist/access-http-query.js +77 -76
  21. package/dist/access-http.d.ts +17 -15
  22. package/dist/access-http.js +95 -92
  23. package/dist/access-identity-continuity-surface.d.ts +13 -12
  24. package/dist/access-identity-continuity-surface.js +75 -74
  25. package/dist/access-lcm-surface.d.ts +16 -14
  26. package/dist/access-lcm-surface.js +75 -74
  27. package/dist/access-mcp-shared-context-tools.d.ts +156 -0
  28. package/dist/access-mcp-shared-context-tools.js +8 -0
  29. package/dist/access-mcp.d.ts +16 -14
  30. package/dist/access-mcp.js +86 -83
  31. package/dist/access-memory-search-fanout.d.ts +2 -2
  32. package/dist/{access-namespace-preflight-DY4z6L5X.d.ts → access-namespace-preflight-DWsMc9Dh.d.ts} +1 -1
  33. package/dist/access-namespace-preflight.d.ts +3 -3
  34. package/dist/access-namespace-preflight.js +75 -74
  35. package/dist/access-observe-transcript.d.ts +13 -12
  36. package/dist/access-observe-write-category.d.ts +1 -1
  37. package/dist/access-observe-write-category.js +4 -4
  38. package/dist/access-observe-write-surface.d.ts +16 -14
  39. package/dist/access-observe-write-surface.js +75 -74
  40. package/dist/access-offline-manifest.d.ts +37 -13
  41. package/dist/access-offline-manifest.js +15 -11
  42. package/dist/access-operations-batch.js +79 -77
  43. package/dist/access-operations.d.ts +16 -14
  44. package/dist/access-operations.js +84 -82
  45. package/dist/access-recall-concurrency.d.ts +16 -14
  46. package/dist/access-recall-concurrency.js +75 -74
  47. package/dist/access-recall-response.d.ts +16 -14
  48. package/dist/access-recall-response.js +75 -74
  49. package/dist/access-recall-surface.d.ts +16 -14
  50. package/dist/access-recall-surface.js +75 -74
  51. package/dist/access-schema.d.ts +5 -3
  52. package/dist/access-schema.js +3 -3
  53. package/dist/{access-service-MY4bsr_Q.d.ts → access-service-Cisy5YDq.d.ts} +14 -9
  54. package/dist/access-service-helpers.d.ts +16 -14
  55. package/dist/access-service.d.ts +16 -14
  56. package/dist/access-service.js +75 -74
  57. package/dist/access-surface-catalog.d.ts +16 -14
  58. package/dist/access-surface-catalog.js +77 -76
  59. package/dist/access-surface-catalog.js.map +1 -1
  60. package/dist/access-wearables-meetings-surface.d.ts +6 -5
  61. package/dist/action-confidence.d.ts +1 -1
  62. package/dist/active-memory-bridge.d.ts +1 -1
  63. package/dist/active-memory-bridge.js +3 -3
  64. package/dist/active-recall.d.ts +1 -1
  65. package/dist/active-recall.js +10 -9
  66. package/dist/active-recall.js.map +1 -1
  67. package/dist/activity/digest.d.ts +1 -1
  68. package/dist/ambient-provenance.d.ts +1 -1
  69. package/dist/artifact-search.d.ts +1 -1
  70. package/dist/{auto-sync-RP4C6ZPF.js → auto-sync-7PGUFY7U.js} +7 -7
  71. package/dist/background-generation-config.d.ts +1 -1
  72. package/dist/background-generation-config.js +3 -1
  73. package/dist/background-generation.d.ts +1 -1
  74. package/dist/behavior-learner.d.ts +1 -1
  75. package/dist/behavior-signals.d.ts +1 -1
  76. package/dist/bootstrap.d.ts +13 -12
  77. package/dist/briefing-window.d.ts +2 -2
  78. package/dist/briefing.d.ts +2 -2
  79. package/dist/briefing.js +23 -23
  80. package/dist/buffer-surprise-report.d.ts +1 -1
  81. package/dist/buffer-turn-helpers.d.ts +1 -1
  82. package/dist/buffer.d.ts +2 -2
  83. package/dist/buffer.js +7 -7
  84. package/dist/bulk-import/index.d.ts +3 -3
  85. package/dist/calibration.d.ts +3 -2
  86. package/dist/calibration.js +2 -2
  87. package/dist/capabilities.d.ts +1 -1
  88. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  89. package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-3MNURAQ3.js} +2 -2
  90. package/dist/{catalog-CW87xGx8.d.ts → catalog-wcX1QhtQ.d.ts} +1 -1
  91. package/dist/causal-behavior.d.ts +1 -1
  92. package/dist/causal-consolidation.d.ts +1 -1
  93. package/dist/causal-consolidation.js +29 -28
  94. package/dist/causal-consolidation.js.map +1 -1
  95. package/dist/causal-trajectory-graph.d.ts +1 -1
  96. package/dist/{chunk-YFTNZMGR.js → chunk-27NO2KVB.js} +31 -8
  97. package/dist/chunk-27NO2KVB.js.map +1 -0
  98. package/dist/{chunk-M6RORUO5.js → chunk-2EYZ32LH.js} +24 -2
  99. package/dist/{chunk-M6RORUO5.js.map → chunk-2EYZ32LH.js.map} +1 -1
  100. package/dist/{chunk-XH3HGI2N.js → chunk-2HQPE2NM.js} +2 -2
  101. package/dist/{chunk-3EKVN2OP.js → chunk-2ZG2LLZT.js} +2 -2
  102. package/dist/{chunk-6EHM2AV7.js → chunk-3BLHPQHT.js} +5 -5
  103. package/dist/{chunk-YKREX63Z.js → chunk-3D75XIYO.js} +5 -3
  104. package/dist/chunk-3D75XIYO.js.map +1 -0
  105. package/dist/{chunk-J272ODKJ.js → chunk-42DJ235G.js} +2 -2
  106. package/dist/{chunk-F4EHXVP7.js → chunk-46RII65S.js} +2 -2
  107. package/dist/{chunk-YUW66UAH.js → chunk-4AX5OYKC.js} +2 -2
  108. package/dist/{chunk-AECJY3GJ.js → chunk-4IGOLIWM.js} +2 -2
  109. package/dist/{chunk-2ZTDRNCS.js → chunk-54QPOE45.js} +2 -2
  110. package/dist/{chunk-O4M4BDIJ.js → chunk-563X6JJX.js} +2 -2
  111. package/dist/{chunk-IL6ODG6M.js → chunk-5EQT62HH.js} +2 -2
  112. package/dist/{chunk-JKKII6GX.js → chunk-6MQMYXSQ.js} +2 -2
  113. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  114. package/dist/{chunk-BV4ZKIZH.js → chunk-7ZLC4DTZ.js} +5 -4
  115. package/dist/{chunk-WBM2MVBK.js → chunk-A4OIJYCV.js} +2 -2
  116. package/dist/{chunk-RLJHJQUY.js → chunk-AFJHNHAM.js} +8 -8
  117. package/dist/{chunk-6YAIN5XJ.js → chunk-AIVRD66I.js} +44 -6
  118. package/dist/chunk-AIVRD66I.js.map +1 -0
  119. package/dist/{chunk-OEDW4ER7.js → chunk-AJBWVDRV.js} +2 -1
  120. package/dist/chunk-AJBWVDRV.js.map +1 -0
  121. package/dist/{chunk-4RZLTZVM.js → chunk-AKABVXFS.js} +2 -2
  122. package/dist/{chunk-M6HBPLBA.js → chunk-AUSRUOMQ.js} +2 -2
  123. package/dist/{chunk-QHT7MOUF.js → chunk-BTPCP535.js} +25 -14
  124. package/dist/chunk-BTPCP535.js.map +1 -0
  125. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  126. package/dist/{chunk-Q7CLGFA7.js → chunk-C3G6MW4W.js} +3 -3
  127. package/dist/{chunk-O76F5QPP.js → chunk-D6PY63OM.js} +2 -2
  128. package/dist/{chunk-BD7JTBYP.js → chunk-D7MAYFQP.js} +2 -2
  129. package/dist/{chunk-LMLGBG6H.js → chunk-DBB5JPSL.js} +2 -2
  130. package/dist/{chunk-TSP5WH72.js → chunk-DIXZQTGY.js} +2 -2
  131. package/dist/{chunk-P4ZAEYKG.js → chunk-DM5CU5J7.js} +7 -4
  132. package/dist/chunk-DM5CU5J7.js.map +1 -0
  133. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  134. package/dist/{chunk-UHRZ324M.js → chunk-E3I3NDUP.js} +4 -4
  135. package/dist/{chunk-AENM6GKU.js → chunk-E4LMQTST.js} +2 -2
  136. package/dist/{chunk-YDVAM7S4.js → chunk-EH3HNCAM.js} +13 -8
  137. package/dist/chunk-EH3HNCAM.js.map +1 -0
  138. package/dist/{chunk-MUTVRKKY.js → chunk-EMSYMYXO.js} +14 -14
  139. package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
  140. package/dist/{chunk-FXHOZGSE.js → chunk-F5H6YG5P.js} +2 -2
  141. package/dist/{chunk-TRLOFIQC.js → chunk-FGFC2EFR.js} +14 -13
  142. package/dist/chunk-FGFC2EFR.js.map +1 -0
  143. package/dist/{chunk-TNSCIPBQ.js → chunk-G6NQ3L4T.js} +2 -2
  144. package/dist/{chunk-ZMWSYUUL.js → chunk-GCBIXUPT.js} +2 -2
  145. package/dist/{chunk-EYKIDK33.js → chunk-GMH5QPUU.js} +22 -22
  146. package/dist/chunk-GMH5QPUU.js.map +1 -0
  147. package/dist/{chunk-4BCHFSC7.js → chunk-GWNSKQDA.js} +3 -3
  148. package/dist/{chunk-JDX2OA4R.js → chunk-HNHIHXSD.js} +2 -2
  149. package/dist/{chunk-GG5FHZJJ.js → chunk-I33QYUAF.js} +6 -6
  150. package/dist/{chunk-LPYYY4AP.js → chunk-I46BYY7U.js} +653 -328
  151. package/dist/chunk-I46BYY7U.js.map +1 -0
  152. package/dist/{chunk-CZTPU65V.js → chunk-ICN37XHG.js} +74 -27
  153. package/dist/chunk-ICN37XHG.js.map +1 -0
  154. package/dist/chunk-IFBSZGW3.js +42 -0
  155. package/dist/chunk-IFBSZGW3.js.map +1 -0
  156. package/dist/{chunk-AAZEKXUP.js → chunk-IYIPXAIJ.js} +2 -2
  157. package/dist/{chunk-ACY4ZPF7.js → chunk-J2MGTGKC.js} +10 -5
  158. package/dist/chunk-J2MGTGKC.js.map +1 -0
  159. package/dist/chunk-JATHBCAV.js +94 -0
  160. package/dist/chunk-JATHBCAV.js.map +1 -0
  161. package/dist/{chunk-5U7K4W6K.js → chunk-JDOBQPJY.js} +3 -3
  162. package/dist/{chunk-TG3FAM2S.js → chunk-JL4TQYM5.js} +48 -1
  163. package/dist/{chunk-TG3FAM2S.js.map → chunk-JL4TQYM5.js.map} +1 -1
  164. package/dist/{chunk-UZZ7SQT3.js → chunk-JMWUPUE6.js} +2 -2
  165. package/dist/{chunk-ENBPQEVU.js → chunk-JSD7Q7LD.js} +2 -2
  166. package/dist/{chunk-QTQ6XKGT.js → chunk-K5D2XVNN.js} +4 -4
  167. package/dist/chunk-K5D2XVNN.js.map +1 -0
  168. package/dist/{chunk-3CBI2ZSA.js → chunk-KG2OOAFF.js} +20 -12
  169. package/dist/chunk-KG2OOAFF.js.map +1 -0
  170. package/dist/{chunk-Q432REND.js → chunk-KJLLPG26.js} +2 -2
  171. package/dist/{chunk-JTQR6L2N.js → chunk-KLUC2GSG.js} +6 -6
  172. package/dist/{chunk-OB3XMWX5.js → chunk-KVO2BTA4.js} +2 -2
  173. package/dist/{chunk-PCOVEDPK.js → chunk-KZJM7R4F.js} +3 -3
  174. package/dist/{chunk-X4TD4O2F.js → chunk-LE2KZ72G.js} +3 -3
  175. package/dist/{chunk-HIP6DKJJ.js → chunk-LQVXSRAJ.js} +2 -2
  176. package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
  177. package/dist/{chunk-FWWWUPOE.js → chunk-MCMS4VUK.js} +25 -15
  178. package/dist/chunk-MCMS4VUK.js.map +1 -0
  179. package/dist/{chunk-5SPCMAUC.js → chunk-N6XTC56E.js} +13 -81
  180. package/dist/chunk-N6XTC56E.js.map +1 -0
  181. package/dist/{chunk-VBSNUH4J.js → chunk-ND7MAIJC.js} +2 -2
  182. package/dist/{chunk-TNZNSMVJ.js → chunk-NYWCFC3K.js} +301 -348
  183. package/dist/chunk-NYWCFC3K.js.map +1 -0
  184. package/dist/{chunk-54NX5EG4.js → chunk-P66QH6R6.js} +2 -2
  185. package/dist/{chunk-62D2PAAM.js → chunk-PAAJWQH5.js} +4 -4
  186. package/dist/{chunk-TA4C3XB7.js → chunk-PFKIOYJH.js} +2 -2
  187. package/dist/{chunk-WIWLX65T.js → chunk-PGGPRF6J.js} +2 -2
  188. package/dist/{chunk-V6EGNVUT.js → chunk-PIWFNPQT.js} +4 -4
  189. package/dist/{chunk-BLDBT6HZ.js → chunk-PJRKLB4Z.js} +18 -2
  190. package/dist/chunk-PJRKLB4Z.js.map +1 -0
  191. package/dist/{chunk-4JVQRFZD.js → chunk-PLJ2MQFT.js} +11 -11
  192. package/dist/{chunk-4RX5O34R.js → chunk-PQ42DJNG.js} +2 -2
  193. package/dist/{chunk-37CAEC7E.js → chunk-PWPIERBM.js} +4 -4
  194. package/dist/{chunk-ZEGL7YCC.js → chunk-Q62GA5U2.js} +2 -2
  195. package/dist/{chunk-CC37E3QM.js → chunk-QKCXRS5A.js} +16 -1
  196. package/dist/chunk-QKCXRS5A.js.map +1 -0
  197. package/dist/{chunk-WKDFJXW5.js → chunk-QM2SPLKQ.js} +1 -1
  198. package/dist/chunk-QM2SPLKQ.js.map +1 -0
  199. package/dist/{chunk-GAS7KYC7.js → chunk-RQQO3ORQ.js} +2 -2
  200. package/dist/{chunk-UZEHHXYC.js → chunk-S4MJTIPG.js} +85 -81
  201. package/dist/chunk-S4MJTIPG.js.map +1 -0
  202. package/dist/chunk-SK7D34OL.js +68 -0
  203. package/dist/chunk-SK7D34OL.js.map +1 -0
  204. package/dist/{chunk-LQNRVPTV.js → chunk-TRTLWUDD.js} +164 -130
  205. package/dist/chunk-TRTLWUDD.js.map +1 -0
  206. package/dist/{chunk-JXN77SGO.js → chunk-U2VDCFXW.js} +1 -1
  207. package/dist/chunk-U2VDCFXW.js.map +1 -0
  208. package/dist/{chunk-CWTCMZGE.js → chunk-UHSOPTNB.js} +132 -6
  209. package/dist/chunk-UHSOPTNB.js.map +1 -0
  210. package/dist/{chunk-3NPNBVFR.js → chunk-UZGHKD3T.js} +2 -2
  211. package/dist/{chunk-IQEJIOEU.js → chunk-V2EXYQEQ.js} +20 -12
  212. package/dist/chunk-V2EXYQEQ.js.map +1 -0
  213. package/dist/{chunk-OPBFP4TF.js → chunk-V2TOGJPM.js} +46 -13
  214. package/dist/chunk-V2TOGJPM.js.map +1 -0
  215. package/dist/{chunk-VJIE4D2I.js → chunk-V62YYBBY.js} +4 -4
  216. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  217. package/dist/{chunk-6H2G7RFT.js → chunk-VNQRRUNS.js} +11 -10
  218. package/dist/chunk-VNQRRUNS.js.map +1 -0
  219. package/dist/{chunk-6AGWBKQU.js → chunk-VSN2DMQK.js} +2 -2
  220. package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
  221. package/dist/{chunk-GI4ZBWPQ.js → chunk-W7UV2ZCA.js} +3 -3
  222. package/dist/{chunk-GMIQV6DD.js → chunk-WBQ4ONQJ.js} +2 -2
  223. package/dist/{chunk-FNHLI2RE.js → chunk-WFMQN7JE.js} +3 -3
  224. package/dist/{chunk-MVAQ2WM3.js → chunk-WGZHSQDV.js} +9 -5
  225. package/dist/chunk-WGZHSQDV.js.map +1 -0
  226. package/dist/{chunk-IYKZJVL5.js → chunk-WN2OXGGH.js} +1 -1
  227. package/dist/chunk-WN2OXGGH.js.map +1 -0
  228. package/dist/{chunk-ZBW7A667.js → chunk-WPGA4RYI.js} +2 -2
  229. package/dist/{chunk-YQNNHLCG.js → chunk-WPGR3RW4.js} +2 -2
  230. package/dist/{chunk-SV4Z2S67.js → chunk-WUUGE7QC.js} +54 -21
  231. package/dist/chunk-WUUGE7QC.js.map +1 -0
  232. package/dist/{chunk-NXGSONWM.js → chunk-WZIO3TW6.js} +2 -2
  233. package/dist/{chunk-ZZUVBZL2.js → chunk-X2QPKLPL.js} +2 -2
  234. package/dist/{chunk-5HYUUFMQ.js → chunk-XCPNH2MG.js} +259 -10
  235. package/dist/chunk-XCPNH2MG.js.map +1 -0
  236. package/dist/{chunk-VSL63CFJ.js → chunk-XRS65T4O.js} +9 -9
  237. package/dist/{chunk-5N4MZLEH.js → chunk-YFXAWGMR.js} +2 -2
  238. package/dist/{chunk-KQW3YGEN.js → chunk-YR5QT4SR.js} +32 -9
  239. package/dist/chunk-YR5QT4SR.js.map +1 -0
  240. package/dist/{chunk-CARRTDKC.js → chunk-Z22M4JCY.js} +4 -3
  241. package/dist/chunk-Z22M4JCY.js.map +1 -0
  242. package/dist/{chunk-D545Z7UH.js → chunk-Z535ADTC.js} +3 -3
  243. package/dist/{chunk-B36GUU6T.js → chunk-Z7NBT6AK.js} +38 -5
  244. package/dist/chunk-Z7NBT6AK.js.map +1 -0
  245. package/dist/{chunk-5YCNDC3C.js → chunk-ZX6NNFSY.js} +3 -3
  246. package/dist/{chunk-3N3PBBEH.js → chunk-ZYSOT6HD.js} +2 -2
  247. package/dist/{chunk-MCRVQ5YQ.js → chunk-ZZEIL3MI.js} +2 -2
  248. package/dist/{cli-DGq0MNpO.d.ts → cli-CUlMlS2N.d.ts} +5 -5
  249. package/dist/cli.d.ts +18 -16
  250. package/dist/cli.js +129 -126
  251. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  252. package/dist/coding/export-okf-codegraph.js +22 -22
  253. package/dist/coding/pre-action-gate.d.ts +1 -1
  254. package/dist/compounding/engine.d.ts +2 -2
  255. package/dist/compounding/engine.js +25 -25
  256. package/dist/compounding/preference-consolidator.d.ts +1 -1
  257. package/dist/compression-optimizer.d.ts +1 -1
  258. package/dist/config.d.ts +1 -1
  259. package/dist/config.js +10 -9
  260. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  261. package/dist/connectors/codex-materialize-runner.js +25 -25
  262. package/dist/connectors/codex-materialize.d.ts +1 -1
  263. package/dist/connectors/codex-materialize.js +2 -2
  264. package/dist/connectors/index.d.ts +1 -1
  265. package/dist/connectors/index.js +25 -25
  266. package/dist/consolidation-provenance-check.d.ts +2 -2
  267. package/dist/consolidation-undo.d.ts +2 -2
  268. package/dist/contradiction/index.d.ts +6 -5
  269. package/dist/contradiction/index.js +4 -4
  270. package/dist/{contradiction-scan-BSGKZHYJ.js → contradiction-scan-GVD4JJ7B.js} +4 -4
  271. package/dist/converge-config.d.ts +1 -1
  272. package/dist/convergence-refresh.d.ts +2 -2
  273. package/dist/convergence-refresh.js +26 -26
  274. package/dist/conversation-index/backend.d.ts +1 -1
  275. package/dist/conversation-index/chunker.d.ts +1 -1
  276. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  277. package/dist/conversation-index/indexer.d.ts +1 -1
  278. package/dist/conversation-index/search.d.ts +1 -1
  279. package/dist/corpus-watermark.d.ts +1 -1
  280. package/dist/corpus-watermark.js +25 -25
  281. package/dist/cross-lingual-recall.d.ts +1 -1
  282. package/dist/dashboard-runtime.js +2 -2
  283. package/dist/day-summary.d.ts +1 -1
  284. package/dist/deep-recall-config.d.ts +12 -1
  285. package/dist/deep-recall-config.js +5 -3
  286. package/dist/deep-recall-http-glue.d.ts +19 -15
  287. package/dist/deep-recall-http-glue.js +7 -4
  288. package/dist/deep-recall-mcp-tools.d.ts +16 -14
  289. package/dist/deep-recall-policy-llm.d.ts +14 -3
  290. package/dist/deep-recall-policy-llm.js +3 -3
  291. package/dist/deep-recall-seeds.d.ts +4 -1
  292. package/dist/deep-recall-seeds.js +1 -1
  293. package/dist/deep-recall.d.ts +12 -1
  294. package/dist/deep-recall.js +3 -2
  295. package/dist/delinearize.d.ts +1 -1
  296. package/dist/dependency-propagation-config.d.ts +1 -1
  297. package/dist/{dependency-propagation-delivery-Cq1ekOwV.d.ts → dependency-propagation-delivery-BDDjImQn.d.ts} +1 -1
  298. package/dist/direct-answer-wiring.d.ts +1 -1
  299. package/dist/direct-answer.d.ts +1 -1
  300. package/dist/embedding-fallback.d.ts +1 -1
  301. package/dist/enrichment/index.d.ts +1 -1
  302. package/dist/entity-origin-fields.d.ts +1 -1
  303. package/dist/entity-retrieval.d.ts +2 -2
  304. package/dist/entity-retrieval.js +24 -24
  305. package/dist/entity-schema.d.ts +1 -1
  306. package/dist/episodic-context.d.ts +1 -1
  307. package/dist/eval-trajectory-contracts.d.ts +1 -1
  308. package/dist/eval-trajectory-store.d.ts +1 -1
  309. package/dist/eval-trajectory.d.ts +1 -1
  310. package/dist/explicit-capture.d.ts +13 -12
  311. package/dist/explicit-capture.js +3 -3
  312. package/dist/external-wiki-access.d.ts +16 -14
  313. package/dist/external-wiki-access.js +76 -75
  314. package/dist/external-wiki-collection-registration.d.ts +1 -1
  315. package/dist/external-wiki-collection.d.ts +1 -1
  316. package/dist/external-wiki-mcp-tools.d.ts +16 -14
  317. package/dist/extraction-error-classification.d.ts +14 -3
  318. package/dist/extraction-error-classification.js +5 -3
  319. package/dist/extraction-faithfulness.d.ts +4 -3
  320. package/dist/extraction-faithfulness.js +3 -3
  321. package/dist/extraction-judge-telemetry.d.ts +4 -3
  322. package/dist/extraction-judge-training.d.ts +4 -3
  323. package/dist/extraction-judge.d.ts +4 -3
  324. package/dist/extraction-judge.js +3 -3
  325. package/dist/extraction-liveness.d.ts +1 -1
  326. package/dist/extraction-normalization.d.ts +1 -1
  327. package/dist/extraction-prompt.d.ts +1 -1
  328. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  329. package/dist/extraction-source-grounding.d.ts +1 -1
  330. package/dist/extraction-span-config.d.ts +1 -1
  331. package/dist/extraction-span-materialize.d.ts +1 -1
  332. package/dist/extraction.d.ts +4 -4
  333. package/dist/extraction.js +40 -38
  334. package/dist/fallback-llm-codex-subscription.d.ts +65 -10
  335. package/dist/fallback-llm-codex-subscription.js +19 -1
  336. package/dist/fallback-llm.d.ts +25 -28
  337. package/dist/fallback-llm.js +4 -3
  338. package/dist/{first-start-migration-ZWMV5CX4.js → first-start-migration-L3UFX5CU.js} +4 -4
  339. package/dist/{generic-recall-paths-BcySh_f9.d.ts → generic-recall-paths-CpDzNO_I.d.ts} +1 -1
  340. package/dist/graph-append-error.d.ts +1 -1
  341. package/dist/graph-dashboard-diff.d.ts +1 -1
  342. package/dist/graph-dashboard-key.d.ts +1 -1
  343. package/dist/graph-dashboard-parser.d.ts +1 -1
  344. package/dist/graph-edge-reinforcement.d.ts +1 -1
  345. package/dist/graph-jsonl.d.ts +1 -1
  346. package/dist/graph-path-reconstruction.d.ts +1 -1
  347. package/dist/graph-path-scoring.d.ts +1 -1
  348. package/dist/graph-snapshot.d.ts +1 -1
  349. package/dist/graph.d.ts +1 -1
  350. package/dist/harmonic-retrieval.js +3 -3
  351. package/dist/importance.d.ts +1 -1
  352. package/dist/importers/index.d.ts +1 -1
  353. package/dist/importers/test-utils.d.ts +1 -1
  354. package/dist/in-flight-reads.d.ts +1 -1
  355. package/dist/{index-DWOb4wz9.d.ts → index-CtmmCJoo.d.ts} +3 -3
  356. package/dist/index.d.ts +80 -40
  357. package/dist/index.js +316 -296
  358. package/dist/intent.d.ts +1 -1
  359. package/dist/lcm/engine.d.ts +1 -1
  360. package/dist/lcm/engine.js +3 -3
  361. package/dist/lcm/index.d.ts +1 -1
  362. package/dist/lcm/index.js +11 -11
  363. package/dist/lcm/tools.d.ts +1 -1
  364. package/dist/lifecycle.d.ts +1 -1
  365. package/dist/live-connectors-runner.d.ts +1 -1
  366. package/dist/local-llm-DpXIvm6F.d.ts +247 -0
  367. package/dist/local-llm-config.d.ts +4 -1
  368. package/dist/local-llm-config.js +4 -2
  369. package/dist/local-llm-helpers.d.ts +18 -69
  370. package/dist/local-llm-helpers.js +1 -1
  371. package/dist/local-llm.d.ts +3 -170
  372. package/dist/local-llm.js +2 -2
  373. package/dist/local-model-endpoint.d.ts +1 -1
  374. package/dist/location/index.d.ts +3 -3
  375. package/dist/location/index.js +25 -25
  376. package/dist/maintenance/memory-governance.d.ts +1 -1
  377. package/dist/maintenance/memory-governance.js +24 -24
  378. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  379. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +23 -23
  380. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  381. package/dist/maintenance/rebuild-memory-projection.js +25 -25
  382. package/dist/{maintenance-CW9wCzMP.d.ts → maintenance-CNgoLsoM.d.ts} +13 -6
  383. package/dist/mcp-memory-inspector-app.d.ts +16 -14
  384. package/dist/memory-action-policy.d.ts +1 -1
  385. package/dist/memory-cache.d.ts +1 -1
  386. package/dist/memory-controller.d.ts +1 -1
  387. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  388. package/dist/memory-projection-store.d.ts +1 -1
  389. package/dist/memory-provenance.d.ts +1 -1
  390. package/dist/memory-snapshot.d.ts +1 -1
  391. package/dist/memory-subject-cli.d.ts +16 -14
  392. package/dist/memory-subject.d.ts +16 -14
  393. package/dist/memory-worth-outcomes.d.ts +2 -2
  394. package/dist/models-json.d.ts +1 -1
  395. package/dist/namespaces/migrate.d.ts +3 -3
  396. package/dist/namespaces/migrate.js +24 -24
  397. package/dist/namespaces/principal.d.ts +1 -1
  398. package/dist/namespaces/search.d.ts +12 -1
  399. package/dist/namespaces/search.js +9 -9
  400. package/dist/namespaces/storage.d.ts +3 -3
  401. package/dist/namespaces/storage.js +23 -23
  402. package/dist/native-knowledge.d.ts +1 -1
  403. package/dist/offline-sync-impression-drain.d.ts +1 -1
  404. package/dist/operator-doctor-corpus.d.ts +1 -1
  405. package/dist/operator-doctor-corpus.js +26 -26
  406. package/dist/operator-doctor-replica.d.ts +1 -1
  407. package/dist/operator-toolkit.d.ts +3 -3
  408. package/dist/operator-toolkit.js +45 -44
  409. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  410. package/dist/orchestration/maintenance.d.ts +4 -4
  411. package/dist/orchestration/maintenance.js +36 -36
  412. package/dist/{orchestrator-ComHLm49.d.ts → orchestrator-DT7ybIFz.d.ts} +32 -11
  413. package/dist/orchestrator.d.ts +13 -12
  414. package/dist/orchestrator.js +176 -171
  415. package/dist/patterns-cli.d.ts +1 -1
  416. package/dist/{pipeline-CiYcqqhl.d.ts → pipeline-CgBEmHcz.d.ts} +1 -1
  417. package/dist/policy-runtime.d.ts +1 -1
  418. package/dist/proactive-contention.d.ts +2 -2
  419. package/dist/provenance.d.ts +1 -1
  420. package/dist/{public-http-CuK4_Cb1.d.ts → public-http-C8P8fyiO.d.ts} +1 -1
  421. package/dist/{qmd-qXD4vatU.d.ts → qmd-BkY8KpCh.d.ts} +2 -2
  422. package/dist/qmd-preflight.d.ts +2 -2
  423. package/dist/qmd-recall-cache.d.ts +1 -1
  424. package/dist/qmd.d.ts +2 -2
  425. package/dist/qmd.js +2 -2
  426. package/dist/recall-concurrency-config.d.ts +1 -1
  427. package/dist/recall-disclosure-escalation.d.ts +1 -1
  428. package/dist/recall-explain-renderer.d.ts +1 -1
  429. package/dist/recall-explain-renderer.js +3 -3
  430. package/dist/recall-memory-map.d.ts +1 -1
  431. package/dist/recall-navigate-access.d.ts +1 -1
  432. package/dist/recall-navigate-access.js +2 -2
  433. package/dist/recall-navigate-disclosure.d.ts +1 -1
  434. package/dist/recall-navigate-disclosure.js +1 -1
  435. package/dist/recall-navigate.d.ts +1 -1
  436. package/dist/recall-navigate.js +2 -2
  437. package/dist/recall-planner-llm.d.ts +3 -2
  438. package/dist/recall-planner-llm.js +4 -3
  439. package/dist/recall-planner-llm.js.map +1 -1
  440. package/dist/recall-state-view-admission.d.ts +13 -3
  441. package/dist/recall-state-view-admission.js +9 -9
  442. package/dist/recall-state-view-anchors.d.ts +1 -1
  443. package/dist/recall-state-view-anchors.js +2 -2
  444. package/dist/recall-state-view-inject.js +2 -2
  445. package/dist/recall-state-view-render.js +2 -2
  446. package/dist/recall-state-view-widen.js +2 -2
  447. package/dist/recall-state-view-wire.js +3 -3
  448. package/dist/recall-state-view.d.ts +10 -1
  449. package/dist/recall-state-view.js +5 -3
  450. package/dist/recall-state.d.ts +1 -1
  451. package/dist/recall-tag-filter.d.ts +1 -1
  452. package/dist/recall-timings.d.ts +1 -1
  453. package/dist/recall-xray-cli.d.ts +1 -1
  454. package/dist/recall-xray-cli.js +4 -4
  455. package/dist/recall-xray-renderer.d.ts +1 -1
  456. package/dist/recall-xray-renderer.js +3 -3
  457. package/dist/recall-xray.d.ts +1 -1
  458. package/dist/recall-xray.js +2 -2
  459. package/dist/reconcile/cursor.d.ts +1 -1
  460. package/dist/reconcile/cursor.js +2 -2
  461. package/dist/reconcile/manifest.d.ts +1 -1
  462. package/dist/reconcile/manifest.js +4 -4
  463. package/dist/reconcile/plan.d.ts +1 -1
  464. package/dist/reconcile/plan.js +2 -2
  465. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  466. package/dist/replay/normalizers/claude.d.ts +1 -1
  467. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  468. package/dist/replay/normalizers/shared.d.ts +1 -1
  469. package/dist/replay/runner.d.ts +1 -1
  470. package/dist/replay/types.d.ts +1 -1
  471. package/dist/replica-divergence.d.ts +1 -1
  472. package/dist/replica-peers-config.d.ts +1 -1
  473. package/dist/{resolution-4GG3QZRJ.js → resolution-LXFQQ4AE.js} +5 -5
  474. package/dist/resolution-LXFQQ4AE.js.map +1 -0
  475. package/dist/resolve-auth-token.d.ts +1 -1
  476. package/dist/resume-bundles.js +12 -11
  477. package/dist/retrieval-agents.d.ts +2 -2
  478. package/dist/retrieval-tiers.d.ts +1 -1
  479. package/dist/routing/engine.d.ts +1 -1
  480. package/dist/routing/store.d.ts +1 -1
  481. package/dist/salvage-envelope.d.ts +1 -1
  482. package/dist/{scope-profiles-BT9rqC3w.d.ts → scope-profiles-BBPjZ9jb.d.ts} +1 -1
  483. package/dist/search/embed-helper.d.ts +1 -1
  484. package/dist/search/factory.d.ts +1 -1
  485. package/dist/search/factory.js +8 -8
  486. package/dist/search/index.d.ts +1 -1
  487. package/dist/search/index.js +12 -12
  488. package/dist/search/lancedb-backend.d.ts +1 -1
  489. package/dist/search/lancedb-backend.js +2 -2
  490. package/dist/search/meilisearch-backend.d.ts +1 -1
  491. package/dist/search/meilisearch-backend.js +2 -2
  492. package/dist/search/noop-backend.d.ts +1 -1
  493. package/dist/search/orama-backend.d.ts +1 -1
  494. package/dist/search/orama-backend.js +2 -2
  495. package/dist/search/port.d.ts +2 -2
  496. package/dist/search/port.js +1 -1
  497. package/dist/search/remote-backend.d.ts +1 -1
  498. package/dist/search/remote-backend.js +2 -2
  499. package/dist/{semantic-consolidation-CmZi7thY.d.ts → semantic-consolidation-BPFFVO84.d.ts} +1 -1
  500. package/dist/semantic-consolidation.d.ts +2 -2
  501. package/dist/semantic-consolidation.js +26 -26
  502. package/dist/semantic-rule-promotion.js +23 -23
  503. package/dist/semantic-rule-verifier.d.ts +1 -1
  504. package/dist/semantic-rule-verifier.js +23 -23
  505. package/dist/{service-CLkA7AQB.d.ts → service-jKcr6Jvr.d.ts} +2 -2
  506. package/dist/session-observer-bands.d.ts +1 -1
  507. package/dist/session-observer-state.d.ts +1 -1
  508. package/dist/shared-context/manager.d.ts +1 -1
  509. package/dist/shared-context/manager.js +2 -2
  510. package/dist/shared-context/write-output-controls.d.ts +34 -0
  511. package/dist/shared-context/write-output-controls.js +10 -0
  512. package/dist/shared-context/write-output-controls.js.map +1 -0
  513. package/dist/signal.d.ts +1 -1
  514. package/dist/source-agent-qualifier.d.ts +1 -1
  515. package/dist/source-agent-qualifier.js +31 -31
  516. package/dist/source-attribution.d.ts +23 -1
  517. package/dist/source-attribution.js +13 -3
  518. package/dist/standup/build.js +23 -23
  519. package/dist/{storage-wvX01lht.d.ts → storage-C-0Ah5OY.d.ts} +2 -1
  520. package/dist/storage.d.ts +2 -2
  521. package/dist/storage.js +22 -22
  522. package/dist/subject-config.d.ts +1 -1
  523. package/dist/summarizer.d.ts +1 -1
  524. package/dist/summarizer.js +6 -6
  525. package/dist/summary-snapshot.d.ts +1 -1
  526. package/dist/support-passport/index.d.ts +18 -17
  527. package/dist/support-passport/index.js +78 -77
  528. package/dist/task-llm-config.d.ts +16 -0
  529. package/dist/task-llm-config.js +12 -0
  530. package/dist/task-llm-config.js.map +1 -0
  531. package/dist/temporal-supersession.d.ts +2 -2
  532. package/dist/temporal-timeline-recall.d.ts +1 -1
  533. package/dist/temporal-validity.d.ts +1 -1
  534. package/dist/threading.d.ts +1 -1
  535. package/dist/tier-migration.d.ts +2 -2
  536. package/dist/tier-routing.d.ts +1 -1
  537. package/dist/tier-routing.js +3 -3
  538. package/dist/{tier-stats-LUSUUNU6.js → tier-stats-VK5PCO2L.js} +4 -4
  539. package/dist/topics.d.ts +1 -1
  540. package/dist/transcript.d.ts +1 -1
  541. package/dist/transfer/backup.js +2 -2
  542. package/dist/transfer/capsule-export.js +2 -2
  543. package/dist/transfer/capsule-import.js +3 -3
  544. package/dist/transfer/export-okf.d.ts +1 -1
  545. package/dist/transfer/export-okf.js +23 -23
  546. package/dist/trust-score-stage.d.ts +1 -1
  547. package/dist/trust-score.d.ts +1 -1
  548. package/dist/{types-Cyr32ABj.d.ts → types-cK5LydjL.d.ts} +6 -1
  549. package/dist/types.d.ts +1 -1
  550. package/dist/types.js +1 -1
  551. package/dist/utility-runtime.d.ts +1 -1
  552. package/dist/verified-recall.js +23 -23
  553. package/dist/who-knows-cli.d.ts +16 -14
  554. package/dist/who-knows-cli.js +24 -24
  555. package/dist/who-knows.d.ts +16 -14
  556. package/dist/who-knows.js +23 -23
  557. package/dist/write-envelope.d.ts +1 -1
  558. package/package.json +12 -2
  559. package/src/access-category-alias.test.ts +93 -0
  560. package/src/access-http.ts +1 -1
  561. package/src/access-mcp-shared-context-tools.ts +103 -0
  562. package/src/access-mcp.ts +4 -74
  563. package/src/access-offline-manifest.ts +52 -2
  564. package/src/access-operations-batch.ts +45 -2
  565. package/src/access-schema.ts +9 -4
  566. package/src/access-service.ts +14 -7
  567. package/src/activity/config.test.ts +61 -0
  568. package/src/activity/config.ts +40 -1
  569. package/src/activity/timeline/analysis-provider.ts +8 -2
  570. package/src/activity/timeline/analysis-run.test.ts +82 -0
  571. package/src/activity/timeline/publish-cli.test.ts +30 -0
  572. package/src/activity/timeline/publish-cli.ts +7 -0
  573. package/src/activity/timeline/query.ts +8 -1
  574. package/src/activity/timeline/regenerate.test.ts +130 -2
  575. package/src/activity/timeline/regenerate.ts +14 -6
  576. package/src/activity/vault-frontmatter.test.ts +99 -1
  577. package/src/activity/vault-frontmatter.ts +131 -0
  578. package/src/activity/vault-publish.ts +6 -0
  579. package/src/activity/vault-publisher.test.ts +172 -0
  580. package/src/activity/vault-publisher.ts +69 -15
  581. package/src/activity/vault-region.test.ts +7 -2
  582. package/src/activity/vault-region.ts +7 -3
  583. package/src/background-generation-config.ts +32 -6
  584. package/src/background-generation.test.ts +10 -1
  585. package/src/cli/deep-recall-commands.ts +22 -10
  586. package/src/cli/timeline-publish-commands.ts +9 -0
  587. package/src/config.test.ts +170 -43
  588. package/src/config.ts +22 -5
  589. package/src/dedup/merge.test.ts +283 -0
  590. package/src/deep-recall-boundary.test.ts +66 -0
  591. package/src/deep-recall-cli.test.ts +82 -0
  592. package/src/deep-recall-config.test.ts +56 -0
  593. package/src/deep-recall-config.ts +32 -0
  594. package/src/deep-recall-http-glue.ts +10 -10
  595. package/src/deep-recall-policy-llm.test.ts +242 -0
  596. package/src/deep-recall-policy-llm.ts +37 -7
  597. package/src/deep-recall-seeds.test.ts +53 -0
  598. package/src/deep-recall-seeds.ts +7 -1
  599. package/src/deep-recall-surface.test.ts +93 -0
  600. package/src/deep-recall.test.ts +121 -0
  601. package/src/deep-recall.ts +88 -28
  602. package/src/extraction-error-classification.ts +36 -1
  603. package/src/extraction-timeout.test.ts +110 -1
  604. package/src/extraction.test.ts +19 -1
  605. package/src/extraction.ts +23 -21
  606. package/src/fallback-llm-codex-subscription.ts +220 -12
  607. package/src/fallback-llm-parse-failure.test.ts +156 -0
  608. package/src/fallback-llm.test.ts +178 -0
  609. package/src/fallback-llm.ts +200 -198
  610. package/src/index.ts +1 -0
  611. package/src/local-llm-config.ts +11 -10
  612. package/src/local-llm-headers-timeout.test.ts +30 -0
  613. package/src/local-llm-helpers.ts +28 -0
  614. package/src/local-llm.ts +8 -19
  615. package/src/meetings/config.test.ts +58 -0
  616. package/src/namespaces/search.test.ts +51 -1
  617. package/src/namespaces/search.ts +48 -3
  618. package/src/orchestration/extraction-persist-promotion.test.ts +228 -2
  619. package/src/orchestration/extraction-persist-promotion.ts +17 -14
  620. package/src/orchestration/extraction-persist.ts +1 -1
  621. package/src/orchestration/orchestrator-helpers.test.ts +104 -0
  622. package/src/orchestration/orchestrator-init.ts +366 -106
  623. package/src/orchestration/recall-entry.ts +15 -1
  624. package/src/orchestration/recall-internal.ts +6 -11
  625. package/src/orchestration/recall-section-coordinator.ts +65 -28
  626. package/src/orchestration/recall-state-view-pipeline.test.ts +8 -2
  627. package/src/orchestration/semantic-merge-commit-effects.ts +45 -16
  628. package/src/orchestration/semantic-merge-persist.ts +23 -36
  629. package/src/orchestration/semantic-merge-promotion-payload.ts +62 -6
  630. package/src/orchestration/startup-collection-checks.ts +85 -0
  631. package/src/orchestrator-flush.test.ts +7 -0
  632. package/src/orchestrator-init.test.ts +1539 -0
  633. package/src/orchestrator.ts +7 -0
  634. package/src/providers/codex-subscription.test.ts +127 -0
  635. package/src/providers/codex-subscription.ts +1 -1
  636. package/src/qmd.ts +21 -10
  637. package/src/recall-state-view-admission.ts +11 -1
  638. package/src/recall-state-view-budget.test.ts +424 -0
  639. package/src/recall-state-view-cron-intent.test.ts +268 -0
  640. package/src/recall-state-view-widen.test.ts +14 -5
  641. package/src/recall-state-view-widen.ts +8 -1
  642. package/src/recall-state-view.ts +35 -18
  643. package/src/reconcile-identity-cache.test.ts +82 -1
  644. package/src/search/port.ts +1 -1
  645. package/src/shared-context/envelope-io.ts +25 -0
  646. package/src/shared-context/envelope-wiring.test.ts +4 -2
  647. package/src/shared-context/manager.ts +1 -0
  648. package/src/shared-context/write-output-controls.test.ts +192 -0
  649. package/src/shared-context/write-output-controls.ts +72 -0
  650. package/src/source-attribution.test.ts +39 -0
  651. package/src/source-attribution.ts +72 -0
  652. package/src/storage/cas-revision-store.test.ts +4 -0
  653. package/src/storage/cas-revision-store.ts +104 -12
  654. package/src/storage-frontmatter-cas.test.ts +19 -17
  655. package/src/summarizer.ts +5 -1
  656. package/src/task-llm-config.test.ts +124 -0
  657. package/src/task-llm-config.ts +88 -0
  658. package/src/testing/subjects/startup-discovery-lifecycle.test.ts +273 -0
  659. package/src/types.ts +6 -0
  660. package/dist/chunk-3CBI2ZSA.js.map +0 -1
  661. package/dist/chunk-5HYUUFMQ.js.map +0 -1
  662. package/dist/chunk-5SPCMAUC.js.map +0 -1
  663. package/dist/chunk-6H2G7RFT.js.map +0 -1
  664. package/dist/chunk-6YAIN5XJ.js.map +0 -1
  665. package/dist/chunk-ACY4ZPF7.js.map +0 -1
  666. package/dist/chunk-B36GUU6T.js.map +0 -1
  667. package/dist/chunk-BLDBT6HZ.js.map +0 -1
  668. package/dist/chunk-CARRTDKC.js.map +0 -1
  669. package/dist/chunk-CC37E3QM.js.map +0 -1
  670. package/dist/chunk-CWTCMZGE.js.map +0 -1
  671. package/dist/chunk-CZTPU65V.js.map +0 -1
  672. package/dist/chunk-EYKIDK33.js.map +0 -1
  673. package/dist/chunk-FWWWUPOE.js.map +0 -1
  674. package/dist/chunk-IQEJIOEU.js.map +0 -1
  675. package/dist/chunk-IYKZJVL5.js.map +0 -1
  676. package/dist/chunk-JXN77SGO.js.map +0 -1
  677. package/dist/chunk-KQW3YGEN.js.map +0 -1
  678. package/dist/chunk-LPYYY4AP.js.map +0 -1
  679. package/dist/chunk-LQNRVPTV.js.map +0 -1
  680. package/dist/chunk-MVAQ2WM3.js.map +0 -1
  681. package/dist/chunk-OEDW4ER7.js.map +0 -1
  682. package/dist/chunk-OPBFP4TF.js.map +0 -1
  683. package/dist/chunk-P4ZAEYKG.js.map +0 -1
  684. package/dist/chunk-QHT7MOUF.js.map +0 -1
  685. package/dist/chunk-QTQ6XKGT.js.map +0 -1
  686. package/dist/chunk-SV4Z2S67.js.map +0 -1
  687. package/dist/chunk-TNZNSMVJ.js.map +0 -1
  688. package/dist/chunk-TRLOFIQC.js.map +0 -1
  689. package/dist/chunk-UZEHHXYC.js.map +0 -1
  690. package/dist/chunk-WKDFJXW5.js.map +0 -1
  691. package/dist/chunk-YDVAM7S4.js.map +0 -1
  692. package/dist/chunk-YFTNZMGR.js.map +0 -1
  693. package/dist/chunk-YKREX63Z.js.map +0 -1
  694. /package/dist/{capsule-crypto-7FJQINUR.js.map → access-mcp-shared-context-tools.js.map} +0 -0
  695. /package/dist/{auto-sync-RP4C6ZPF.js.map → auto-sync-7PGUFY7U.js.map} +0 -0
  696. /package/dist/{contradiction-scan-BSGKZHYJ.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  697. /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-3MNURAQ3.js.map} +0 -0
  698. /package/dist/{chunk-XH3HGI2N.js.map → chunk-2HQPE2NM.js.map} +0 -0
  699. /package/dist/{chunk-3EKVN2OP.js.map → chunk-2ZG2LLZT.js.map} +0 -0
  700. /package/dist/{chunk-6EHM2AV7.js.map → chunk-3BLHPQHT.js.map} +0 -0
  701. /package/dist/{chunk-J272ODKJ.js.map → chunk-42DJ235G.js.map} +0 -0
  702. /package/dist/{chunk-F4EHXVP7.js.map → chunk-46RII65S.js.map} +0 -0
  703. /package/dist/{chunk-YUW66UAH.js.map → chunk-4AX5OYKC.js.map} +0 -0
  704. /package/dist/{chunk-AECJY3GJ.js.map → chunk-4IGOLIWM.js.map} +0 -0
  705. /package/dist/{chunk-2ZTDRNCS.js.map → chunk-54QPOE45.js.map} +0 -0
  706. /package/dist/{chunk-O4M4BDIJ.js.map → chunk-563X6JJX.js.map} +0 -0
  707. /package/dist/{chunk-IL6ODG6M.js.map → chunk-5EQT62HH.js.map} +0 -0
  708. /package/dist/{chunk-JKKII6GX.js.map → chunk-6MQMYXSQ.js.map} +0 -0
  709. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  710. /package/dist/{chunk-BV4ZKIZH.js.map → chunk-7ZLC4DTZ.js.map} +0 -0
  711. /package/dist/{chunk-WBM2MVBK.js.map → chunk-A4OIJYCV.js.map} +0 -0
  712. /package/dist/{chunk-RLJHJQUY.js.map → chunk-AFJHNHAM.js.map} +0 -0
  713. /package/dist/{chunk-4RZLTZVM.js.map → chunk-AKABVXFS.js.map} +0 -0
  714. /package/dist/{chunk-M6HBPLBA.js.map → chunk-AUSRUOMQ.js.map} +0 -0
  715. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  716. /package/dist/{chunk-Q7CLGFA7.js.map → chunk-C3G6MW4W.js.map} +0 -0
  717. /package/dist/{chunk-O76F5QPP.js.map → chunk-D6PY63OM.js.map} +0 -0
  718. /package/dist/{chunk-BD7JTBYP.js.map → chunk-D7MAYFQP.js.map} +0 -0
  719. /package/dist/{chunk-LMLGBG6H.js.map → chunk-DBB5JPSL.js.map} +0 -0
  720. /package/dist/{chunk-TSP5WH72.js.map → chunk-DIXZQTGY.js.map} +0 -0
  721. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  722. /package/dist/{chunk-UHRZ324M.js.map → chunk-E3I3NDUP.js.map} +0 -0
  723. /package/dist/{chunk-AENM6GKU.js.map → chunk-E4LMQTST.js.map} +0 -0
  724. /package/dist/{chunk-MUTVRKKY.js.map → chunk-EMSYMYXO.js.map} +0 -0
  725. /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
  726. /package/dist/{chunk-FXHOZGSE.js.map → chunk-F5H6YG5P.js.map} +0 -0
  727. /package/dist/{chunk-TNSCIPBQ.js.map → chunk-G6NQ3L4T.js.map} +0 -0
  728. /package/dist/{chunk-ZMWSYUUL.js.map → chunk-GCBIXUPT.js.map} +0 -0
  729. /package/dist/{chunk-4BCHFSC7.js.map → chunk-GWNSKQDA.js.map} +0 -0
  730. /package/dist/{chunk-JDX2OA4R.js.map → chunk-HNHIHXSD.js.map} +0 -0
  731. /package/dist/{chunk-GG5FHZJJ.js.map → chunk-I33QYUAF.js.map} +0 -0
  732. /package/dist/{chunk-AAZEKXUP.js.map → chunk-IYIPXAIJ.js.map} +0 -0
  733. /package/dist/{chunk-5U7K4W6K.js.map → chunk-JDOBQPJY.js.map} +0 -0
  734. /package/dist/{chunk-UZZ7SQT3.js.map → chunk-JMWUPUE6.js.map} +0 -0
  735. /package/dist/{chunk-ENBPQEVU.js.map → chunk-JSD7Q7LD.js.map} +0 -0
  736. /package/dist/{chunk-Q432REND.js.map → chunk-KJLLPG26.js.map} +0 -0
  737. /package/dist/{chunk-JTQR6L2N.js.map → chunk-KLUC2GSG.js.map} +0 -0
  738. /package/dist/{chunk-OB3XMWX5.js.map → chunk-KVO2BTA4.js.map} +0 -0
  739. /package/dist/{chunk-PCOVEDPK.js.map → chunk-KZJM7R4F.js.map} +0 -0
  740. /package/dist/{chunk-X4TD4O2F.js.map → chunk-LE2KZ72G.js.map} +0 -0
  741. /package/dist/{chunk-HIP6DKJJ.js.map → chunk-LQVXSRAJ.js.map} +0 -0
  742. /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
  743. /package/dist/{chunk-VBSNUH4J.js.map → chunk-ND7MAIJC.js.map} +0 -0
  744. /package/dist/{chunk-54NX5EG4.js.map → chunk-P66QH6R6.js.map} +0 -0
  745. /package/dist/{chunk-62D2PAAM.js.map → chunk-PAAJWQH5.js.map} +0 -0
  746. /package/dist/{chunk-TA4C3XB7.js.map → chunk-PFKIOYJH.js.map} +0 -0
  747. /package/dist/{chunk-WIWLX65T.js.map → chunk-PGGPRF6J.js.map} +0 -0
  748. /package/dist/{chunk-V6EGNVUT.js.map → chunk-PIWFNPQT.js.map} +0 -0
  749. /package/dist/{chunk-4JVQRFZD.js.map → chunk-PLJ2MQFT.js.map} +0 -0
  750. /package/dist/{chunk-4RX5O34R.js.map → chunk-PQ42DJNG.js.map} +0 -0
  751. /package/dist/{chunk-37CAEC7E.js.map → chunk-PWPIERBM.js.map} +0 -0
  752. /package/dist/{chunk-ZEGL7YCC.js.map → chunk-Q62GA5U2.js.map} +0 -0
  753. /package/dist/{chunk-GAS7KYC7.js.map → chunk-RQQO3ORQ.js.map} +0 -0
  754. /package/dist/{chunk-3NPNBVFR.js.map → chunk-UZGHKD3T.js.map} +0 -0
  755. /package/dist/{chunk-VJIE4D2I.js.map → chunk-V62YYBBY.js.map} +0 -0
  756. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  757. /package/dist/{chunk-6AGWBKQU.js.map → chunk-VSN2DMQK.js.map} +0 -0
  758. /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
  759. /package/dist/{chunk-GI4ZBWPQ.js.map → chunk-W7UV2ZCA.js.map} +0 -0
  760. /package/dist/{chunk-GMIQV6DD.js.map → chunk-WBQ4ONQJ.js.map} +0 -0
  761. /package/dist/{chunk-FNHLI2RE.js.map → chunk-WFMQN7JE.js.map} +0 -0
  762. /package/dist/{chunk-ZBW7A667.js.map → chunk-WPGA4RYI.js.map} +0 -0
  763. /package/dist/{chunk-YQNNHLCG.js.map → chunk-WPGR3RW4.js.map} +0 -0
  764. /package/dist/{chunk-NXGSONWM.js.map → chunk-WZIO3TW6.js.map} +0 -0
  765. /package/dist/{chunk-ZZUVBZL2.js.map → chunk-X2QPKLPL.js.map} +0 -0
  766. /package/dist/{chunk-VSL63CFJ.js.map → chunk-XRS65T4O.js.map} +0 -0
  767. /package/dist/{chunk-5N4MZLEH.js.map → chunk-YFXAWGMR.js.map} +0 -0
  768. /package/dist/{chunk-D545Z7UH.js.map → chunk-Z535ADTC.js.map} +0 -0
  769. /package/dist/{chunk-5YCNDC3C.js.map → chunk-ZX6NNFSY.js.map} +0 -0
  770. /package/dist/{chunk-3N3PBBEH.js.map → chunk-ZYSOT6HD.js.map} +0 -0
  771. /package/dist/{chunk-MCRVQ5YQ.js.map → chunk-ZZEIL3MI.js.map} +0 -0
  772. /package/dist/{resolution-4GG3QZRJ.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
  773. /package/dist/{first-start-migration-ZWMV5CX4.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
  774. /package/dist/{tier-stats-LUSUUNU6.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { u as MemoryCategory, N as MemorySubject } from './types-Cyr32ABj.js';
1
+ import { u as MemoryCategory, N as MemorySubject } from './types-cK5LydjL.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.69.39",
3
+ "version": "9.69.41",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2680,6 +2680,16 @@
2680
2680
  "remnic-source": "./src/shared-context/manager.ts",
2681
2681
  "import": "./dist/shared-context/manager.js"
2682
2682
  },
2683
+ "./shared-context/write-output-controls": {
2684
+ "types": "./dist/shared-context/write-output-controls.d.ts",
2685
+ "remnic-source": "./src/shared-context/write-output-controls.ts",
2686
+ "import": "./dist/shared-context/write-output-controls.js"
2687
+ },
2688
+ "./shared-context/write-output-controls.js": {
2689
+ "types": "./dist/shared-context/write-output-controls.d.ts",
2690
+ "remnic-source": "./src/shared-context/write-output-controls.ts",
2691
+ "import": "./dist/shared-context/write-output-controls.js"
2692
+ },
2683
2693
  "./signal": {
2684
2694
  "types": "./dist/signal.d.ts",
2685
2695
  "remnic-source": "./src/signal.ts",
@@ -3297,7 +3307,7 @@
3297
3307
  "core"
3298
3308
  ],
3299
3309
  "peerDependencies": {
3300
- "@remnic/coding-graph": "^9.69.39"
3310
+ "@remnic/coding-graph": "^9.69.41"
3301
3311
  },
3302
3312
  "peerDependenciesMeta": {
3303
3313
  "@remnic/coding-graph": {
@@ -151,6 +151,18 @@ test("#2829 retainedCategoryAlias reads the transform-minted spelling from a raw
151
151
  assert.equal(categoryAliasCoercion(undefined), undefined);
152
152
  });
153
153
 
154
+ test("#2889 retainedCategoryAlias recovers the spelling from a single-parse envelope's category", () => {
155
+ // Single-parse callers (CLI store command, direct op.run) hand the op the
156
+ // raw envelope: the alias sits on `category`, no `rawCategory` exists yet.
157
+ assert.equal(retainedCategoryAlias({ content: "x", category: "project_state" }), "project_state");
158
+ assert.equal(retainedCategoryAlias({ content: "x", category: "project-state" }), "project-state");
159
+ // Canonical and near-miss categories never mint a retained spelling.
160
+ assert.equal(retainedCategoryAlias({ content: "x", category: "fact" }), undefined);
161
+ assert.equal(retainedCategoryAlias({ content: "x", category: "projection" }), undefined);
162
+ assert.equal(retainedCategoryAlias({ content: "x" }), undefined);
163
+ // A transform-minted rawCategory outranks the raw category spelling.
164
+ assert.equal(retainedCategoryAlias({ category: "project_update", rawCategory: "project" }), "project");
165
+ });
154
166
  // ---------------------------------------------------------------------------
155
167
  // Type-level regressions (enforced by tsc via check-types)
156
168
  // ---------------------------------------------------------------------------
@@ -303,6 +315,10 @@ function makePersistService(memoryDir: string): PersistProbe {
303
315
  writes.push({ category, content });
304
316
  return { id: `mem-${writes.length}`, duplicateOf: undefined };
305
317
  },
318
+ // The suggestion review-queue path re-reads and re-stamps the queued
319
+ // memory (explicit-capture.ts queueExplicitCaptureForReview).
320
+ getMemoryById: async (id: string) => ({ id, status: "active" }),
321
+ writeMemoryFrontmatter: async () => {},
306
322
  });
307
323
  return { service: new EngramAccessService(orch), writes };
308
324
  }
@@ -410,6 +426,83 @@ test("#2829 peek idempotency ignores the retained spelling", async () => {
410
426
  });
411
427
  });
412
428
 
429
+ test("#2889 single-pass op.run retains the alias through canonical validation and replay", async () => {
430
+ // The CLI store command's path (PR #2866 review): the raw envelope carries
431
+ // the alias on `category` and op.run performs the ONLY schema parse. The
432
+ // boundary must still retain the spelling, and a same-key replay with a
433
+ // different accepted spelling must report THIS caller's alias while the
434
+ // stored result stays canonical and untouched.
435
+ await withPersistService(async ({ service, writes }) => {
436
+ const base = {
437
+ content: "single-pass aliased idempotent write",
438
+ confidence: 0.9,
439
+ tags: [] as string[],
440
+ idempotencyKey: "k-2889",
441
+ };
442
+ const first = await memoryStoreOperation.run(
443
+ { ...base, category: "project_state" },
444
+ { service },
445
+ );
446
+ assert.equal(first.result.status, "stored");
447
+ assert.deepEqual(first.result.categoryCoercion, { from: "project_state", to: "fact" });
448
+ assert.equal(writes.length, 1);
449
+ assert.equal(writes[0]?.category, "fact", "the persisted memory stays canonical");
450
+
451
+ const second = await memoryStoreOperation.run(
452
+ { ...base, category: "project-state" },
453
+ { service },
454
+ );
455
+ assert.equal(second.result.idempotencyReplay, true, "alias spellings share the canonical fingerprint");
456
+ assert.deepEqual(second.result.categoryCoercion, { from: "project-state", to: "fact" });
457
+ assert.equal(first.result.categoryCoercion?.from, "project_state", "the replay never mutates the stored note");
458
+ assert.equal(writes.length, 1, "the replay persists nothing");
459
+
460
+ const third = await memoryStoreOperation.run(
461
+ { ...base, category: "fact" },
462
+ { service },
463
+ );
464
+ assert.equal(third.result.idempotencyReplay, true);
465
+ assert.equal("categoryCoercion" in third.result, false, "a canonical replay reports no coercion");
466
+ assert.equal(writes.length, 1);
467
+ });
468
+ });
469
+
470
+ test("#2889 a single-pass dry run reports the coercion note and persists nothing", async () => {
471
+ await withPersistService(async ({ service, writes }) => {
472
+ const output = await memoryStoreOperation.run(
473
+ { content: "single-pass dry-run alias", category: "project_update", confidence: 0.9, tags: [], dryRun: true },
474
+ { service },
475
+ );
476
+ assert.equal(output.result.status, "validated");
477
+ assert.deepEqual(output.result.categoryCoercion, { from: "project_update", to: "fact" });
478
+ assert.equal(writes.length, 0);
479
+ });
480
+ });
481
+
482
+ test("#2889 suggestion_submit reports the coercion and queues the canonical category", async () => {
483
+ await withPersistService(async ({ service, writes }) => {
484
+ const aliased = await service.suggestionSubmit({
485
+ content: "suggested aliased fact",
486
+ category: "fact",
487
+ confidence: 0.9,
488
+ tags: [],
489
+ rawCategory: "project_update",
490
+ });
491
+ assert.equal(aliased.status, "queued_for_review");
492
+ assert.deepEqual(aliased.categoryCoercion, { from: "project_update", to: "fact" });
493
+ assert.equal(writes.length, 1);
494
+ assert.equal(writes[0]?.category, "fact", "the queued review memory stays canonical");
495
+
496
+ const canonical = await service.suggestionSubmit({
497
+ content: "suggested canonical fact",
498
+ category: "preference",
499
+ confidence: 0.9,
500
+ tags: [],
501
+ });
502
+ assert.equal(canonical.status, "queued_for_review");
503
+ assert.equal("categoryCoercion" in canonical, false, "a no-alias submit reports no coercion");
504
+ });
505
+ });
413
506
  // ---------------------------------------------------------------------------
414
507
  // Quarantine — the parked payload keeps the raw spelling for replay
415
508
  // ---------------------------------------------------------------------------
@@ -1753,7 +1753,7 @@ export class EngramAccessHttpServer extends ReviewDeckAccessHttpBase {
1753
1753
  if (req.method === "GET" && meetingGetEngram) { this.enforceTokenOp("meetings_get"); await respondMeetingsGet(res, this.respondJson.bind(this), this.service, meetingGetEngram[1] ?? "", this.wearablesScope(req, parsed.searchParams.get("namespace") ?? undefined, parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1754
1754
  const meetingGetRemnic = /^\/remnic\/v1\/meetings\/([^/]+)$/.exec(pathname); if (req.method === "GET" && meetingGetRemnic) { this.enforceTokenOp("meetings_get"); await respondMeetingsGet(res, this.respondJson.bind(this), this.service, meetingGetRemnic[1] ?? "", this.wearablesScope(req, parsed.searchParams.get("namespace") ?? undefined, parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1755
1755
  if (req.method === "POST" && (pathname === "/engram/v1/recall/deep" || pathname === "/remnic/v1/recall/deep")) {
1756
- this.enforceTokenOp("deep_recall"); await respondDeepRecall(req, res, this.respondJson.bind(this), this.readJsonBody.bind(this), this.service, (ns, sk) => this.wearablesScope(req, ns ?? parsed.searchParams.get("namespace") ?? undefined, sk ?? parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1756
+ this.enforceTokenOp("deep_recall"); await respondDeepRecall(req, res, this.respondJson.bind(this), this.readJsonBody.bind(this), this.service, (ns, sk) => this.wearablesScope(req, ns ?? parsed.searchParams.get("namespace") ?? undefined, sk ?? parsed.searchParams.get("sessionKey") ?? undefined), abortSignal); return; }
1757
1757
  // Location sync surfaces (issue #2047): thin branches; bodies + boundary dispatch live in location/http-glue.ts.
1758
1758
  if (req.method === "GET" && (pathname === "/engram/v1/location/status" || pathname === "/remnic/v1/location/status")) {
1759
1759
  this.enforceTokenOp("location_status"); await respondLocationStatus(res, this.respondJson.bind(this), this.service); return; }
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Shared-context MCP tool descriptors (issue #2920).
3
+ *
4
+ * Extracted from access-mcp.ts (at its fileSizeGrandfather ceiling) so the
5
+ * write-output tool could gain the governed envelope controls without
6
+ * growing the god file. Content is identical to the previously inline
7
+ * entries except for the new `authority`/`expiresAt`/`supersedes` properties
8
+ * on `engram.shared_context_write_output`, which mirror the canonical
9
+ * validation in shared-context/write-output-controls.ts and
10
+ * composeWriteEnvelope.
11
+ */
12
+ import type { McpTool } from "./access-mcp.js";
13
+
14
+ export const sharedContextMcpTools: McpTool[] = [
15
+ {
16
+ name: "engram.shared_context_write_output",
17
+ description: "Write agent work product into shared-context directory for cross-agent coordination.",
18
+ inputSchema: {
19
+ type: "object",
20
+ properties: {
21
+ agentId: { type: "string", description: "Agent ID producing this output." },
22
+ title: { type: "string", description: "Short title for the output." },
23
+ content: { type: "string", description: "Markdown content to write." },
24
+ authority: {
25
+ type: "string",
26
+ enum: ["informational", "advisory", "binding"],
27
+ description:
28
+ "Envelope authority class. `binding` additionally requires the operator config `sharedContextAllowBindingAuthority: true`.",
29
+ },
30
+ expiresAt: {
31
+ type: "string",
32
+ description:
33
+ "ISO-8601 instant strictly after the write time and at most 10 years out. Past, invalid, or over-bound values are rejected.",
34
+ },
35
+ supersedes: {
36
+ type: "string",
37
+ description: "Id of the shared item this output supersedes (non-empty, single line).",
38
+ },
39
+ },
40
+ required: ["agentId", "title", "content"],
41
+ additionalProperties: false,
42
+ },
43
+ },
44
+ {
45
+ name: "engram.shared_feedback_record",
46
+ description: "Append approval/rejection decision into shared-context feedback inbox for compounding learning.",
47
+ inputSchema: {
48
+ type: "object",
49
+ properties: {
50
+ agent: { type: "string", description: "Agent name that produced the output." },
51
+ decision: { type: "string", enum: ["approved", "approved_with_feedback", "rejected"] },
52
+ reason: { type: "string" },
53
+ date: { type: "string", description: "ISO timestamp. Defaults to now." },
54
+ learning: { type: "string" },
55
+ outcome: { type: "string" },
56
+ severity: { type: "string", enum: ["low", "medium", "high"] },
57
+ confidence: { type: "number", description: "Confidence 0-1." },
58
+ workflow: { type: "string" },
59
+ tags: { type: "array", items: { type: "string" } },
60
+ evidenceWindowStart: { type: "string" },
61
+ evidenceWindowEnd: { type: "string" },
62
+ refs: { type: "array", items: { type: "string" } },
63
+ },
64
+ required: ["agent", "decision", "reason"],
65
+ additionalProperties: false,
66
+ },
67
+ },
68
+ {
69
+ name: "engram.shared_priorities_append",
70
+ description: "Append priorities text into shared-context inbox for curator merge.",
71
+ inputSchema: {
72
+ type: "object",
73
+ properties: {
74
+ agentId: { type: "string" },
75
+ text: { type: "string", description: "Priority notes (markdown)." },
76
+ },
77
+ required: ["agentId", "text"],
78
+ additionalProperties: false,
79
+ },
80
+ },
81
+ {
82
+ name: "engram.shared_context_cross_signals_run",
83
+ description: "Generate cross-signal markdown + JSON artifacts from agent outputs and feedback.",
84
+ inputSchema: {
85
+ type: "object",
86
+ properties: {
87
+ date: { type: "string", description: "YYYY-MM-DD. Defaults to today." },
88
+ },
89
+ additionalProperties: false,
90
+ },
91
+ },
92
+ {
93
+ name: "engram.shared_context_curate_daily",
94
+ description: "Generate daily roundtable summary (deterministic baseline aggregation).",
95
+ inputSchema: {
96
+ type: "object",
97
+ properties: {
98
+ date: { type: "string", description: "YYYY-MM-DD. Defaults to today." },
99
+ },
100
+ additionalProperties: false,
101
+ },
102
+ },
103
+ ];
package/src/access-mcp.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { sharedContextMcpTools } from "./access-mcp-shared-context-tools.js";
1
2
  import { randomUUID } from "node:crypto";
2
3
  import {
3
4
  MCP_ADMIN_OPS_MIGRATED_OPERATIONS, MCP_ADMIN_OPS_TOOLS,
@@ -1301,80 +1302,9 @@ export class EngramMcpServer {
1301
1302
  additionalProperties: false,
1302
1303
  },
1303
1304
  },
1304
- // ── Shared Context / Compounding tools ────────────────────────────
1305
- {
1306
- name: "engram.shared_context_write_output",
1307
- description: "Write agent work product into shared-context directory for cross-agent coordination.",
1308
- inputSchema: {
1309
- type: "object",
1310
- properties: {
1311
- agentId: { type: "string", description: "Agent ID producing this output." },
1312
- title: { type: "string", description: "Short title for the output." },
1313
- content: { type: "string", description: "Markdown content to write." },
1314
- },
1315
- required: ["agentId", "title", "content"],
1316
- additionalProperties: false,
1317
- },
1318
- },
1319
- {
1320
- name: "engram.shared_feedback_record",
1321
- description: "Append approval/rejection decision into shared-context feedback inbox for compounding learning.",
1322
- inputSchema: {
1323
- type: "object",
1324
- properties: {
1325
- agent: { type: "string", description: "Agent name that produced the output." },
1326
- decision: { type: "string", enum: ["approved", "approved_with_feedback", "rejected"] },
1327
- reason: { type: "string" },
1328
- date: { type: "string", description: "ISO timestamp. Defaults to now." },
1329
- learning: { type: "string" },
1330
- outcome: { type: "string" },
1331
- severity: { type: "string", enum: ["low", "medium", "high"] },
1332
- confidence: { type: "number", description: "Confidence 0-1." },
1333
- workflow: { type: "string" },
1334
- tags: { type: "array", items: { type: "string" } },
1335
- evidenceWindowStart: { type: "string" },
1336
- evidenceWindowEnd: { type: "string" },
1337
- refs: { type: "array", items: { type: "string" } },
1338
- },
1339
- required: ["agent", "decision", "reason"],
1340
- additionalProperties: false,
1341
- },
1342
- },
1343
- {
1344
- name: "engram.shared_priorities_append",
1345
- description: "Append priorities text into shared-context inbox for curator merge.",
1346
- inputSchema: {
1347
- type: "object",
1348
- properties: {
1349
- agentId: { type: "string" },
1350
- text: { type: "string", description: "Priority notes (markdown)." },
1351
- },
1352
- required: ["agentId", "text"],
1353
- additionalProperties: false,
1354
- },
1355
- },
1356
- {
1357
- name: "engram.shared_context_cross_signals_run",
1358
- description: "Generate cross-signal markdown + JSON artifacts from agent outputs and feedback.",
1359
- inputSchema: {
1360
- type: "object",
1361
- properties: {
1362
- date: { type: "string", description: "YYYY-MM-DD. Defaults to today." },
1363
- },
1364
- additionalProperties: false,
1365
- },
1366
- },
1367
- {
1368
- name: "engram.shared_context_curate_daily",
1369
- description: "Generate daily roundtable summary (deterministic baseline aggregation).",
1370
- inputSchema: {
1371
- type: "object",
1372
- properties: {
1373
- date: { type: "string", description: "YYYY-MM-DD. Defaults to today." },
1374
- },
1375
- additionalProperties: false,
1376
- },
1377
- },
1305
+ // ── Shared Context tools (extracted; access-mcp.ts is at its ratchet
1306
+ // ceiling — issue #2920) ─────────────────────────────────────────
1307
+ ...sharedContextMcpTools,
1378
1308
  {
1379
1309
  name: "engram.compounding_weekly_synthesize",
1380
1310
  description:
@@ -57,11 +57,17 @@ export interface ServerIdentityCacheEntry {
57
57
  export function planServerIdentityCacheWrite(input: {
58
58
  persisted: ReadonlyMap<string, ServerIdentityCacheEntry>;
59
59
  yieldedPaths: ReadonlySet<string>;
60
+ /** Paths the walk saw but never yielded (removed by the exclusion
61
+ * callback). Not deleted — pruning them would drop their persisted
62
+ * classification and force a re-classify on every later cycle. */
63
+ retainedPaths?: ReadonlySet<string>;
60
64
  streamCompleted: boolean;
61
65
  cacheDirty: boolean;
62
66
  }): { shouldWrite: boolean; entries: ServerIdentityCacheEntry[] } {
63
67
  const entries = input.streamCompleted
64
- ? [...input.persisted.values()].filter((entry) => input.yieldedPaths.has(entry.path))
68
+ ? [...input.persisted.values()].filter(
69
+ (entry) => input.yieldedPaths.has(entry.path) || input.retainedPaths?.has(entry.path)
70
+ )
65
71
  : [...input.persisted.values()];
66
72
  return { shouldWrite: input.cacheDirty || entries.length !== input.persisted.size, entries };
67
73
  }
@@ -147,7 +153,7 @@ async function withServerIdentityCacheWriteLock(cachePath: string, write: () =>
147
153
 
148
154
  /** Union of the entries being written and the current on-disk set; on conflict
149
155
  * the write wins (it reflects the newer run). Callers hold the write lock. */
150
- async function mergeServerIdentityCacheEntries(
156
+ export async function mergeServerIdentityCacheEntries(
151
157
  fs: typeof import("node:fs/promises"),
152
158
  cachePath: string,
153
159
  entries: readonly ServerIdentityCacheEntry[],
@@ -178,6 +184,9 @@ async function mergeServerIdentityCacheEntries(
178
184
  ? { identityResolutionVersion: entry.identityResolutionVersion }
179
185
  : {}),
180
186
  }),
187
+ ...(entry.statIdentity !== undefined && entry.excluded !== undefined
188
+ ? { statIdentity: entry.statIdentity, excluded: entry.excluded }
189
+ : {}),
181
190
  });
182
191
  }
183
192
  }
@@ -187,6 +196,34 @@ async function mergeServerIdentityCacheEntries(
187
196
  return [...merged.values()];
188
197
  }
189
198
 
199
+ /** Record classifications for files the walk excluded (the exclusion callback
200
+ * returned true, so they were never yielded): they were seen this walk, so
201
+ * their entries must persist and must not be pruned as deleted. Mirrors the
202
+ * per-yield classification application for never-yielded paths. */
203
+ export function retainExcludedClassifications(input: {
204
+ persisted: Map<string, ServerIdentityCacheEntry>;
205
+ classifications: ReadonlyMap<string, { statIdentity: string; excluded: boolean }>;
206
+ yieldedPaths: ReadonlySet<string>;
207
+ }): { retained: Set<string>; changed: boolean } {
208
+ const retained = new Set<string>();
209
+ let changed = false;
210
+ for (const [pathName, classification] of input.classifications) {
211
+ if (input.yieldedPaths.has(pathName)) continue;
212
+ retained.add(pathName);
213
+ const entry = input.persisted.get(pathName) ?? { path: pathName, sha256: "" };
214
+ if (entry.statIdentity === classification.statIdentity && entry.excluded === classification.excluded) {
215
+ continue;
216
+ }
217
+ input.persisted.set(pathName, {
218
+ ...entry,
219
+ statIdentity: classification.statIdentity,
220
+ excluded: classification.excluded,
221
+ });
222
+ changed = true;
223
+ }
224
+ return { retained, changed };
225
+ }
226
+
190
227
  export async function createOfflineSyncManifestStream(
191
228
  orchestrator: Orchestrator,
192
229
  namespace: string,
@@ -227,10 +264,12 @@ export async function createOfflineSyncManifestStream(
227
264
  // near-cold rebuild on the next request.
228
265
  const persistedEntries = new Map(identityCache);
229
266
  const yieldedPaths = new Set<string>();
267
+ const retainedPaths = new Set<string>();
230
268
  const flush = async (): Promise<void> => {
231
269
  const { shouldWrite, entries } = planServerIdentityCacheWrite({
232
270
  persisted: persistedEntries,
233
271
  yieldedPaths,
272
+ retainedPaths,
234
273
  streamCompleted,
235
274
  cacheDirty,
236
275
  });
@@ -334,6 +373,17 @@ export async function createOfflineSyncManifestStream(
334
373
  }
335
374
  streamCompleted = true;
336
375
  } finally {
376
+ // Files the exclusion callback removed from the snapshot were seen
377
+ // this walk but never yielded: persist their classifications so the
378
+ // next cycle skips the read+parse, and keep them out of the
379
+ // deleted-path prune.
380
+ const retained = retainExcludedClassifications({
381
+ persisted: persistedEntries,
382
+ classifications: classificationUpdates,
383
+ yieldedPaths,
384
+ });
385
+ for (const pathName of retained.retained) retainedPaths.add(pathName);
386
+ if (retained.changed) cacheDirty = true;
337
387
  await flush();
338
388
  }
339
389
  })(),
@@ -33,7 +33,12 @@ import {
33
33
  } from "./access-namespace-preflight.js";
34
34
  import { expandTildePath } from "./utils/path.js";
35
35
  import { resolvePrincipal } from "./namespaces/principal.js";
36
+ import {
37
+ parseSharedWriteOutputControls,
38
+ type SharedWriteOutputControls,
39
+ } from "./shared-context/write-output-controls.js";
36
40
  import { getRecallTimingStatus, isRecallTimingsOperator } from "./recall-timings.js";
41
+ import { parseDeepRecallMaxSteps } from "./deep-recall-config.js";
37
42
  import { validateBriefingFormat } from "./briefing.js";
38
43
  import {
39
44
  buildChatGptMemoryInspectorActionRequest,
@@ -195,7 +200,19 @@ defineOperation({ name: "meetings_list", description: "List stored meeting recor
195
200
  defineOperation({ name: "meetings_get", description: "Get a stored meeting record by id.", schema: strictSchema({ id: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.meetingsGet(reqStr(input.id, "id"), { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
196
201
  defineOperation({ name: "meetings_build", description: "Detect + fuse + store a day's meetings.", schema: strictSchema({ date: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.meetingsBuild(reqStr(input.date, "date"), { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
197
202
  // === DEEP RECALL (issue #2332) — budgeted REFINE/EXPAND/STOP retrieval ===
198
- defineOperation({ name: "deep_recall", description: "Budgeted multi-hop deep recall over the anchor graph.", schema: strictSchema({ query: S.str, maxSteps: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const q = defStr(input.query, ""); if (q.trim().length === 0) throw new EngramAccessInputError("deep_recall: query is required"); return { result: await ctx.service.deepRecall({ query: q, maxSteps: typeof input.maxSteps === "number" ? input.maxSteps : typeof input.maxSteps === "string" && Number.isFinite(Number(input.maxSteps)) ? Number(input.maxSteps) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
203
+ defineOperation({ name: "deep_recall", description: "Budgeted multi-hop deep recall over the anchor graph.", schema: strictSchema({ query: S.str, maxSteps: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => {
204
+ const q = defStr(input.query, "");
205
+ if (q.trim().length === 0) throw new EngramAccessInputError("deep_recall: query is required");
206
+ // Strict boundary parse (issue #2915): `"abc"` must NOT silently become the
207
+ // configured default and `""` must NOT become 0 — both are rejected.
208
+ let maxSteps: number | undefined;
209
+ try {
210
+ maxSteps = parseDeepRecallMaxSteps(input.maxSteps);
211
+ } catch (err) {
212
+ throw new EngramAccessInputError(`deep_recall: ${err instanceof Error ? err.message : String(err)}`);
213
+ }
214
+ return { result: await ctx.service.deepRecall({ query: q, maxSteps, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey), ...(ctx.abortSignal ? { abortSignal: ctx.abortSignal } : {}) }) };
215
+ } });
199
216
 
200
217
  // === ACTION CONFIDENCE + INSPECTOR + CAPSULE ===
201
218
  defineOperation({ name: "action_confidence", description: "Action confidence.", schema: strictSchema({ intendedAction: S.str, confidence: S.num, risk: S.str, contextReadiness: S.str, currentContextScopes: S.strArr, userRules: z.array(z.unknown()).optional(), retrievedMemories: z.array(z.unknown()).optional() }), handler: async (input, ctx) => { const req: Record<string, unknown> = {}; if (input.intendedAction !== undefined) req.intendedAction = optStr(input.intendedAction); if (input.confidence !== undefined) req.confidence = optNum(input.confidence); if (input.risk !== undefined) req.risk = optStr(input.risk) as "low" | "medium" | "high" | "irreversible" | "restricted" | undefined; if (input.contextReadiness !== undefined) req.contextReadiness = optStr(input.contextReadiness) as "none" | "partial" | "sufficient" | undefined; if (input.currentContextScopes !== undefined) req.currentContextScopes = optStrArr(input.currentContextScopes); if (input.userRules !== undefined) req.userRules = input.userRules; if (input.retrievedMemories !== undefined) req.retrievedMemories = input.retrievedMemories; return { result: await ctx.service.actionConfidence(req) }; } });
@@ -306,7 +323,33 @@ defineOperation({ name: "memory_identity", description: "Memory identity.", sche
306
323
  defineOperation({ name: "work_task", description: "Manage work task.", schema: strictSchema({ action: S.str, id: S.str, title: S.str, description: S.str, status: S.str, priority: S.str, owner: S.str, assignee: S.str, projectId: S.str, tags: S.strArr, dueAt: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.workTask({ action: (optStr(input.action) as "update" | "list" | "get" | "create" | "delete" | "transition") ?? "list", id: optStr(input.id), title: optStr(input.title), description: optStr(input.description), status: optStr(input.status), priority: optStr(input.priority), owner: optStr(input.owner), assignee: optStr(input.assignee), projectId: optStr(input.projectId), tags: optStrArr(input.tags), dueAt: optStr(input.dueAt) }) }) });
307
324
  defineOperation({ name: "work_project", description: "Manage work project.", schema: strictSchema({ action: S.str, id: S.str, name: S.str, description: S.str, status: S.str, owner: S.str, tags: S.strArr, taskId: S.str, projectId: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.workProject({ action: (optStr(input.action) as "update" | "list" | "get" | "create" | "delete" | "link_task") ?? "list", id: optStr(input.id), name: optStr(input.name), description: optStr(input.description), status: optStr(input.status), owner: optStr(input.owner), tags: optStrArr(input.tags), taskId: optStr(input.taskId), projectId: optStr(input.projectId) }) }) });
308
325
  defineOperation({ name: "work_board", description: "Manage work board.", schema: strictSchema({ action: S.str, projectId: S.str, snapshotJson: S.str, linkToMemory: S.bool }), handler: async (input, ctx) => ({ result: await ctx.service.workBoard({ action: (optStr(input.action) as "export_markdown" | "export_snapshot" | "import_snapshot") ?? "export_markdown", projectId: optStr(input.projectId) ?? "", snapshotJson: optStr(input.snapshotJson) ?? "", linkToMemory: input.linkToMemory === true }) }) });
309
- defineOperation({ name: "shared_context_write_output", description: "Write shared output.", schema: strictSchema({ agentId: S.str, title: S.str, content: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedContextWriteOutput({ agentId: optStr(input.agentId) ?? "", title: optStr(input.title) ?? "", content: optStr(input.content) ?? "", principal: ctx.authenticatedPrincipal }) }) });
326
+ // Issue #2920: the envelope controls (authority/expiresAt/supersedes) are
327
+ // parsed by the ONE canonical surface module shared with the OpenClaw tool
328
+ // (write-output-controls.ts); semantics stay in composeWriteEnvelope. A
329
+ // client-supplied principal/namespace is rejected here — identity and
330
+ // scoping are server-resolved (ctx.authenticatedPrincipal).
331
+ defineOperation({
332
+ name: "shared_context_write_output",
333
+ description: "Write shared output.",
334
+ schema: strictSchema({ agentId: S.str, title: S.str, content: S.str, authority: S.str, expiresAt: S.str, supersedes: S.str }),
335
+ handler: async (input, ctx) => {
336
+ let controls: SharedWriteOutputControls;
337
+ try {
338
+ controls = parseSharedWriteOutputControls(input);
339
+ } catch (error) {
340
+ throw new EngramAccessInputError(error instanceof Error ? error.message : String(error));
341
+ }
342
+ return {
343
+ result: await ctx.service.sharedContextWriteOutput({
344
+ agentId: optStr(input.agentId) ?? "",
345
+ title: optStr(input.title) ?? "",
346
+ content: optStr(input.content) ?? "",
347
+ ...controls,
348
+ principal: ctx.authenticatedPrincipal,
349
+ }),
350
+ };
351
+ },
352
+ });
310
353
  defineOperation({ name: "shared_feedback_record", description: "Record shared feedback.", schema: strictSchema({ agent: S.str, decision: S.str, reason: S.str, date: S.str, learning: S.str, outcome: S.str, severity: S.str, confidence: S.num, workflow: S.str, tags: S.strArr, evidenceWindowStart: S.str, evidenceWindowEnd: S.str, refs: S.strArr }), handler: async (input, ctx) => { const sv = optStr(input.severity); return { result: await ctx.service.sharedFeedbackRecord({ agent: optStr(input.agent) ?? "", decision: (optStr(input.decision) as "rejected" | "approved" | "approved_with_feedback") ?? "approved", reason: optStr(input.reason) ?? "", date: optStr(input.date), learning: optStr(input.learning), outcome: optStr(input.outcome), severity: sv === "low" || sv === "medium" || sv === "high" ? sv as "low" | "medium" | "high" : undefined, confidence: optNum(input.confidence), workflow: optStr(input.workflow), tags: optStrArr(input.tags), evidenceWindowStart: optStr(input.evidenceWindowStart), evidenceWindowEnd: optStr(input.evidenceWindowEnd), refs: optStrArr(input.refs) }) }; } });
311
354
  defineOperation({ name: "shared_priorities_append", description: "Append priorities.", schema: strictSchema({ agentId: S.str, text: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedPrioritiesAppend({ agentId: optStr(input.agentId) ?? "", text: optStr(input.text) ?? "" }) }) });
312
355
  defineOperation({ name: "shared_context_cross_signals_run", description: "Run cross signals.", fleetWide: true, schema: strictSchema({ date: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedContextCrossSignalsRun({ date: optStr(input.date) }) }) });
@@ -323,13 +323,18 @@ export function categoryAliasCoercion(rawCategory: string | undefined): Category
323
323
  /**
324
324
  * Recover the retained alias spelling from a pre-parse raw envelope: the
325
325
  * `rawCategory` minted by a previous parse of the same schema (the HTTP/MCP
326
- * validate-then-dispatch double pass) or an as-yet-untransformed alias
327
- * `category` (single-parse callers like the CLI store command).
326
+ * validate-then-dispatch double pass), or — for single-parse callers like the
327
+ * CLI store command — the as-yet-untransformed alias still sitting on
328
+ * `category` (issue #2889). A minted `rawCategory` always wins: it names the
329
+ * spelling the transform actually canonicalized.
328
330
  */
329
331
  export function retainedCategoryAlias(rawInput: unknown): MemoryCategoryAlias | undefined {
330
332
  if (!rawInput || typeof rawInput !== "object") return undefined;
331
- const spelling = (rawInput as Record<string, unknown>).rawCategory;
332
- return typeof spelling === "string" && isMemoryCategoryAlias(spelling) ? spelling : undefined;
333
+ const envelope = rawInput as Record<string, unknown>;
334
+ const minted = envelope.rawCategory;
335
+ if (typeof minted === "string" && isMemoryCategoryAlias(minted)) return minted;
336
+ const category = envelope.category;
337
+ return typeof category === "string" && isMemoryCategoryAlias(category) ? category : undefined;
333
338
  }
334
339
 
335
340
  /**
@@ -35,6 +35,7 @@ import { ReplicaDivergenceMonitor } from "./replica-divergence.js";
35
35
  import type { ResolveSecretRefFn } from "./resolve-auth-token.js";
36
36
  import { buildAccessWriteRequestFingerprint, buildObserveRequestFingerprint } from "./write-envelope.js";
37
37
  import { UNATTRIBUTED_ACCESS_WRITE_ORIGIN } from "./shared-context/envelope-io.js";
38
+ import { isSharedContextWriteInputError } from "./shared-context/write-output-controls.js";
38
39
  export type { EngramAccessHealthResponse, EngramAccessQmdCollectionState, EngramAccessQmdHealthResponse };
39
40
  import { AccessAuditAdapter, type AccessAuditConfig, type AccessAuditResult } from "./access-audit.js";
40
41
  import {
@@ -2726,6 +2727,8 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
2726
2727
  sessionKey?: string;
2727
2728
  authenticatedPrincipal?: string;
2728
2729
  maxSteps?: number;
2730
+ /** Transport cancellation (issue #2915): MCP tools/call cancelled, HTTP disconnect. */
2731
+ abortSignal?: AbortSignal;
2729
2732
  }): Promise<DeepRecallResult & { rendered: string }> {
2730
2733
  const cfg = this.orchestrator.config.deepRecall;
2731
2734
  if (!cfg.enabled) {
@@ -2787,14 +2790,18 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
2787
2790
  // (which also decodes the raw collection-qualified path forms the
2788
2791
  // namespaces-disabled fanout returns), so no invocation pre-scans the
2789
2792
  // namespace corpus.
2793
+ // The transport cancellation signal reaches the seed router, the graph
2794
+ // read, and the policy legs (issue #2915).
2790
2795
  const result = await runBudgetedDeepRecall(
2791
2796
  {
2792
2797
  config: effective,
2798
+ ...(request.abortSignal ? { signal: request.abortSignal } : {}),
2793
2799
  searchSeed: createDeepRecallSeedSearch({
2794
2800
  namespace: resolvedNamespace,
2795
2801
  storage,
2796
2802
  router: this.orchestrator,
2797
2803
  resolver: this.orchestrator.qmdResultResolver,
2804
+ ...(request.abortSignal ? { signal: request.abortSignal } : {}),
2798
2805
  }),
2799
2806
  // Nodes and anchors are projected against the namespace's CURRENT
2800
2807
  // active memories through the SAME helper searchHarmonicRetrieval
@@ -2807,6 +2814,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
2807
2814
  memoryDir: storage.dir,
2808
2815
  abstractionNodeStoreDir: graphStoreDir,
2809
2816
  anchorsEnabled: true,
2817
+ ...(request.abortSignal ? { abortSignal: request.abortSignal } : {}),
2810
2818
  }),
2811
2819
  loadMemory: async (memoryId) => {
2812
2820
  const memory = await storage.getMemoryById(memoryId);
@@ -2829,6 +2837,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
2829
2837
  localLlm: this.orchestrator.localLlm ?? null,
2830
2838
  fallbackLlm: this.orchestrator.fastGatewayLlm ?? null,
2831
2839
  timeoutMs,
2840
+ ...(request.abortSignal ? { signal: request.abortSignal } : {}),
2832
2841
  }),
2833
2842
  },
2834
2843
  query
@@ -4595,6 +4604,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
4595
4604
  agentId: string;
4596
4605
  title: string;
4597
4606
  content: string;
4607
+ authority?: string; expiresAt?: string; supersedes?: string;
4598
4608
  /** Authenticated principal resolved by the surface, never client-supplied. */
4599
4609
  principal?: string;
4600
4610
  }): Promise<unknown> {
@@ -4607,19 +4617,16 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
4607
4617
  agentId: request.agentId,
4608
4618
  title: request.title,
4609
4619
  content: request.content,
4610
- // The origin is server-owned in BOTH cases (issue #1957 review
4611
- // round 4): the authenticated principal when one resolved, and a
4612
- // reserved unattributed token otherwise — a principal-less
4613
- // authenticated request must never stamp the client's `agentId`
4614
- // as audit metadata. The client label survives only as the
4615
- // producer, which feeds grouping and display, never authority.
4620
+ authority: request.authority,
4621
+ expiresAt: request.expiresAt,
4622
+ supersedes: request.supersedes,
4616
4623
  ...(request.principal
4617
4624
  ? { authenticatedIdentity: request.principal }
4618
4625
  : { unattributedOrigin: UNATTRIBUTED_ACCESS_WRITE_ORIGIN }),
4619
4626
  });
4620
4627
  } catch (error) {
4621
4628
  const message = error instanceof Error ? error.message : String(error);
4622
- if (message.startsWith("shared-context write origin mismatch")) {
4629
+ if (isSharedContextWriteInputError(message)) {
4623
4630
  throw new EngramAccessInputError(message);
4624
4631
  }
4625
4632
  throw error;