@remnic/core 9.69.50 → 9.69.52

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 (582) hide show
  1. package/dist/access-admin-ops-surface.d.ts +14 -14
  2. package/dist/access-admin-ops-surface.js +60 -60
  3. package/dist/access-audit.d.ts +1 -0
  4. package/dist/access-audit.js +2 -2
  5. package/dist/access-authorization-probe.d.ts +14 -14
  6. package/dist/access-authorization-probe.js +61 -61
  7. package/dist/access-boundary.d.ts +14 -14
  8. package/dist/access-boundary.js +60 -60
  9. package/dist/access-cli.js +121 -120
  10. package/dist/access-cli.js.map +1 -1
  11. package/dist/access-coding-context-resolution.d.ts +1 -1
  12. package/dist/access-extraction-force-flush.d.ts +14 -14
  13. package/dist/access-extraction-force-flush.js +60 -60
  14. package/dist/access-health-types.d.ts +1 -1
  15. package/dist/access-http-briefing.d.ts +14 -14
  16. package/dist/access-http-briefing.js +61 -61
  17. package/dist/access-http-lcm-compaction.d.ts +14 -14
  18. package/dist/access-http-lifecycle-flush.d.ts +14 -14
  19. package/dist/access-http-offline-stream.d.ts +14 -14
  20. package/dist/access-http-query.d.ts +2 -2
  21. package/dist/access-http-query.js +62 -62
  22. package/dist/access-http.d.ts +15 -15
  23. package/dist/access-http.js +80 -80
  24. package/dist/access-identity-continuity-surface.d.ts +11 -11
  25. package/dist/access-identity-continuity-surface.js +60 -60
  26. package/dist/access-lcm-surface.d.ts +14 -14
  27. package/dist/access-lcm-surface.js +60 -60
  28. package/dist/access-mcp-output-schemas.js +1 -1
  29. package/dist/access-mcp-shared-context-tools.d.ts +14 -14
  30. package/dist/access-mcp.d.ts +14 -14
  31. package/dist/access-mcp.js +71 -71
  32. package/dist/access-memory-search-fanout.d.ts +2 -2
  33. package/dist/{access-namespace-preflight-C1q3XuAc.d.ts → access-namespace-preflight-U9RAdxqZ.d.ts} +1 -1
  34. package/dist/access-namespace-preflight.d.ts +3 -3
  35. package/dist/access-namespace-preflight.js +60 -60
  36. package/dist/access-observe-transcript.d.ts +11 -11
  37. package/dist/access-observe-write-category.d.ts +3 -3
  38. package/dist/access-observe-write-category.js +7 -7
  39. package/dist/access-observe-write-surface.d.ts +14 -14
  40. package/dist/access-observe-write-surface.js +60 -60
  41. package/dist/access-offline-manifest.d.ts +11 -11
  42. package/dist/access-offline-manifest.js +5 -5
  43. package/dist/access-operations-batch.js +62 -62
  44. package/dist/access-operations.d.ts +14 -14
  45. package/dist/access-operations.js +69 -69
  46. package/dist/access-recall-concurrency.d.ts +14 -14
  47. package/dist/access-recall-concurrency.js +60 -60
  48. package/dist/access-recall-response.d.ts +14 -14
  49. package/dist/access-recall-response.js +60 -60
  50. package/dist/access-recall-surface.d.ts +15 -15
  51. package/dist/access-recall-surface.js +60 -60
  52. package/dist/access-schema.d.ts +1 -1
  53. package/dist/access-schema.js +4 -4
  54. package/dist/{access-service-BZaC-RZw.d.ts → access-service-CUNM5RfA.d.ts} +9 -9
  55. package/dist/access-service-helpers.d.ts +14 -14
  56. package/dist/access-service.d.ts +14 -14
  57. package/dist/access-service.js +60 -60
  58. package/dist/access-surface-catalog.d.ts +14 -14
  59. package/dist/access-surface-catalog.js +62 -62
  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-recall.d.ts +1 -1
  64. package/dist/active-recall.js +73 -2
  65. package/dist/active-recall.js.map +1 -1
  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-DG5KEOF5.js → auto-sync-CWSZDLLW.js} +6 -6
  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 +12 -12
  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 +4 -4
  81. package/dist/bulk-import/index.d.ts +3 -3
  82. package/dist/calibration.d.ts +1 -1
  83. package/dist/capabilities.d.ts +1 -1
  84. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  85. package/dist/{catalog-DK2eHhax.d.ts → catalog-BuMyYPUn.d.ts} +1 -1
  86. package/dist/causal-behavior.d.ts +1 -1
  87. package/dist/causal-consolidation.d.ts +1 -1
  88. package/dist/causal-consolidation.js +19 -19
  89. package/dist/causal-trajectory-graph.d.ts +1 -1
  90. package/dist/{chunk-3SI3FFTW.js → chunk-2INZSV27.js} +2 -2
  91. package/dist/{chunk-PMLFPVYJ.js → chunk-2QZJ4P27.js} +2 -2
  92. package/dist/{chunk-3RZB7TYL.js → chunk-2UDAABV6.js} +2 -2
  93. package/dist/{chunk-4PXFLDMJ.js → chunk-35EH6KW4.js} +2 -2
  94. package/dist/{chunk-KOEDSRF5.js → chunk-43IQRLEF.js} +2 -2
  95. package/dist/{chunk-LBLXEFWK.js → chunk-4MN27537.js} +1 -1
  96. package/dist/chunk-4MN27537.js.map +1 -0
  97. package/dist/{chunk-PQWICTRO.js → chunk-4UVJ6EIT.js} +1 -1
  98. package/dist/chunk-4UVJ6EIT.js.map +1 -0
  99. package/dist/{chunk-56C7OO3N.js → chunk-6KCQNFDQ.js} +18 -18
  100. package/dist/chunk-6VITOSPL.js +69 -0
  101. package/dist/chunk-6VITOSPL.js.map +1 -0
  102. package/dist/{chunk-UD6W67JM.js → chunk-72AV2H3R.js} +76 -25
  103. package/dist/chunk-72AV2H3R.js.map +1 -0
  104. package/dist/{chunk-VBRS7Z3O.js → chunk-72N2P44O.js} +5 -5
  105. package/dist/{chunk-ZUNYFDI4.js → chunk-7QVYVSEH.js} +2 -2
  106. package/dist/{chunk-SRMBMMTK.js → chunk-7RKAE6Y4.js} +3 -3
  107. package/dist/{chunk-42BV46XS.js → chunk-AH44WTLJ.js} +2 -2
  108. package/dist/{chunk-TZ44E732.js → chunk-AIVRD66I.js} +2 -2
  109. package/dist/{chunk-AYGWJ2UK.js → chunk-AQWGCHIV.js} +6 -6
  110. package/dist/{chunk-EZV43XBD.js → chunk-AYHNTYVG.js} +2 -2
  111. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  112. package/dist/{chunk-JHUODJRW.js → chunk-D2N3PMAE.js} +2 -2
  113. package/dist/{chunk-7SJCSDQ3.js → chunk-D7VT2LED.js} +2 -2
  114. package/dist/{chunk-TVVEYCNW.js → chunk-DAOMWGO2.js} +2 -2
  115. package/dist/{chunk-OQZYHCWM.js → chunk-DCRK7I5E.js} +72 -71
  116. package/dist/{chunk-OQZYHCWM.js.map → chunk-DCRK7I5E.js.map} +1 -1
  117. package/dist/{chunk-MVMNEU65.js → chunk-DI52XAKG.js} +2 -2
  118. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  119. package/dist/{chunk-EUP4AXIW.js → chunk-DZP2XMZC.js} +2 -2
  120. package/dist/{chunk-PA5EOTRR.js → chunk-EVQ33D3N.js} +4 -4
  121. package/dist/{chunk-E64HBW7M.js → chunk-EW3Y73MN.js} +5 -5
  122. package/dist/{chunk-VSN2DMQK.js → chunk-G2DF5MI7.js} +4 -4
  123. package/dist/{chunk-JIWZVOQM.js → chunk-G7S37WD4.js} +2 -2
  124. package/dist/{chunk-AL7OLBL7.js → chunk-GRX6YH4E.js} +2 -2
  125. package/dist/{chunk-XTMABIFW.js → chunk-HG42J2EX.js} +2 -2
  126. package/dist/{chunk-MQMZO23A.js → chunk-HWT6KRGS.js} +2 -2
  127. package/dist/{chunk-LR7KUQ2W.js → chunk-IEOBAOA6.js} +6 -6
  128. package/dist/{chunk-UDAUULK2.js → chunk-IGEZE6QB.js} +5 -5
  129. package/dist/{chunk-SGHGCFVV.js → chunk-JE334SIA.js} +10 -10
  130. package/dist/{chunk-IC3PM3YO.js → chunk-JE4H2QBO.js} +2 -2
  131. package/dist/{chunk-E73SVGJA.js → chunk-JMZQS6OS.js} +2 -2
  132. package/dist/{chunk-3RABJOGD.js → chunk-KH2D26LQ.js} +5 -5
  133. package/dist/{chunk-3MIZ2EKQ.js → chunk-KQQEZTH6.js} +2 -2
  134. package/dist/{chunk-F5V7KRQS.js → chunk-LIAKZGOY.js} +2 -2
  135. package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
  136. package/dist/{chunk-IST6MBYC.js → chunk-MSTKJI5T.js} +529 -376
  137. package/dist/chunk-MSTKJI5T.js.map +1 -0
  138. package/dist/{chunk-DH536WT2.js → chunk-MWVYHNSU.js} +12 -2
  139. package/dist/chunk-MWVYHNSU.js.map +1 -0
  140. package/dist/{chunk-D7QX26FF.js → chunk-O7OVWKT4.js} +2 -2
  141. package/dist/{chunk-JOP7W24J.js → chunk-PLJ2MQFT.js} +4 -4
  142. package/dist/{chunk-D2XUSZ24.js → chunk-QWQB7TOB.js} +20 -20
  143. package/dist/{chunk-HRCWDO6S.js → chunk-RSMNPYBM.js} +2 -2
  144. package/dist/{chunk-BOTSR5S3.js → chunk-RUUJXAGT.js} +2 -2
  145. package/dist/{chunk-FO6IK4IF.js → chunk-SEQ6DWXD.js} +11 -11
  146. package/dist/{chunk-ZBAQMSEY.js → chunk-SLGD36MM.js} +3 -3
  147. package/dist/{chunk-IYHHCSF6.js → chunk-SOFATSHJ.js} +61 -61
  148. package/dist/{chunk-JG4AP36X.js → chunk-SPFNGHHP.js} +2 -2
  149. package/dist/{chunk-DNO6QWCB.js → chunk-SPWNCGSM.js} +2 -2
  150. package/dist/{chunk-QSP4Y73Q.js → chunk-SVUUOLKM.js} +2 -2
  151. package/dist/{chunk-D6WX5FEF.js → chunk-SZ7IVZGD.js} +2 -2
  152. package/dist/{chunk-2IVHOQRY.js → chunk-TEQQQTQS.js} +5 -5
  153. package/dist/{chunk-UI6R2YUB.js → chunk-TQT4AOPO.js} +4 -4
  154. package/dist/{chunk-3UQIS2GC.js → chunk-TTFJQ5B5.js} +2 -2
  155. package/dist/{chunk-JTPAXDSX.js → chunk-U2SK45U3.js} +2 -2
  156. package/dist/{chunk-4FWNMN5R.js → chunk-U6CMLAP4.js} +5 -5
  157. package/dist/{chunk-6525YIYL.js → chunk-UCH2RWFX.js} +3 -3
  158. package/dist/{chunk-QZDUNK6V.js → chunk-UCY4EHAG.js} +6 -6
  159. package/dist/{chunk-OP5IBPHP.js → chunk-UDJMJNBK.js} +2 -2
  160. package/dist/{chunk-BHI5ILU5.js → chunk-ULQVG6G3.js} +2 -2
  161. package/dist/{chunk-X6B2QWXW.js → chunk-UQTXER7M.js} +2 -2
  162. package/dist/{chunk-OLJYDGGP.js → chunk-UVZBDIJX.js} +214 -4
  163. package/dist/chunk-UVZBDIJX.js.map +1 -0
  164. package/dist/{chunk-QXQCPNKA.js → chunk-V5BU5PVE.js} +7 -7
  165. package/dist/{chunk-IPLYGWQF.js → chunk-VDX2J7OX.js} +6 -6
  166. package/dist/{chunk-XUKUMBP3.js → chunk-VGO57TU7.js} +5 -5
  167. package/dist/{chunk-W6V7JN2E.js → chunk-VUV472VH.js} +12 -12
  168. package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
  169. package/dist/{chunk-ML5FW2RO.js → chunk-WBW34YCJ.js} +2 -2
  170. package/dist/{chunk-ECLY4NZA.js → chunk-WH7RINGG.js} +10 -4
  171. package/dist/chunk-WH7RINGG.js.map +1 -0
  172. package/dist/{chunk-FDDCZDBI.js → chunk-WN4HFL4K.js} +4 -4
  173. package/dist/{chunk-MECKA6G2.js → chunk-WUJD4CHZ.js} +4 -4
  174. package/dist/{chunk-HS75MCQF.js → chunk-WUUGE7QC.js} +4 -4
  175. package/dist/{chunk-UVEBBXB5.js → chunk-X7WAM3IY.js} +2 -2
  176. package/dist/{chunk-4SDO74N2.js → chunk-XPFJSUOR.js} +5 -5
  177. package/dist/{chunk-PPNFKQ6D.js → chunk-Y4G6LHJW.js} +2 -2
  178. package/dist/{chunk-C3PKRFZ4.js → chunk-Y7LZ5V7N.js} +2 -2
  179. package/dist/{chunk-WVI43D54.js → chunk-YEIKOBOW.js} +15 -2
  180. package/dist/chunk-YEIKOBOW.js.map +1 -0
  181. package/dist/{chunk-AYP2FZFA.js → chunk-YIIW2OH2.js} +2 -2
  182. package/dist/{chunk-YSBYNCCN.js → chunk-YLPCEUXP.js} +3 -3
  183. package/dist/{chunk-RFIJH2OE.js → chunk-YUHGJBQK.js} +2 -2
  184. package/dist/{cli-BHDMJqJS.d.ts → cli-CCc34xV7.d.ts} +5 -5
  185. package/dist/cli.d.ts +16 -16
  186. package/dist/cli.js +98 -98
  187. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  188. package/dist/coding/export-okf-codegraph.js +12 -12
  189. package/dist/coding/pre-action-gate.d.ts +1 -1
  190. package/dist/compounding/engine.d.ts +2 -2
  191. package/dist/compounding/engine.js +11 -11
  192. package/dist/compounding/preference-consolidator.d.ts +1 -1
  193. package/dist/compression-optimizer.d.ts +1 -1
  194. package/dist/config.d.ts +1 -1
  195. package/dist/config.js +73 -2
  196. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  197. package/dist/connectors/codex-materialize-runner.js +15 -15
  198. package/dist/connectors/codex-materialize.d.ts +1 -1
  199. package/dist/connectors/index.d.ts +1 -1
  200. package/dist/connectors/index.js +19 -19
  201. package/dist/consolidation-provenance-check.d.ts +2 -2
  202. package/dist/consolidation-undo.d.ts +2 -2
  203. package/dist/contradiction/index.d.ts +4 -4
  204. package/dist/converge-config.d.ts +1 -1
  205. package/dist/convergence-refresh.d.ts +2 -2
  206. package/dist/convergence-refresh.js +13 -13
  207. package/dist/conversation-index/backend.d.ts +1 -1
  208. package/dist/conversation-index/chunker.d.ts +1 -1
  209. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  210. package/dist/conversation-index/indexer.d.ts +1 -1
  211. package/dist/conversation-index/search.d.ts +1 -1
  212. package/dist/corpus-watermark.d.ts +1 -1
  213. package/dist/corpus-watermark.js +13 -13
  214. package/dist/cross-lingual-recall.d.ts +1 -1
  215. package/dist/day-summary.d.ts +1 -1
  216. package/dist/deep-recall-http-glue.d.ts +14 -14
  217. package/dist/deep-recall-http-glue.js +5 -5
  218. package/dist/deep-recall-mcp-tools.d.ts +14 -14
  219. package/dist/deep-recall-policy-llm.d.ts +2 -2
  220. package/dist/deep-recall-seeds.d.ts +1 -1
  221. package/dist/deep-recall.js +2 -2
  222. package/dist/delinearize.d.ts +1 -1
  223. package/dist/dependency-propagation-config.d.ts +1 -1
  224. package/dist/{dependency-propagation-delivery-BMkR4gmY.d.ts → dependency-propagation-delivery-BrhPjAHQ.d.ts} +1 -1
  225. package/dist/direct-answer-wiring.d.ts +1 -1
  226. package/dist/direct-answer.d.ts +1 -1
  227. package/dist/directory-sidecars.d.ts +28 -2
  228. package/dist/directory-sidecars.js +9 -1
  229. package/dist/embedding-fallback.d.ts +1 -1
  230. package/dist/enrichment/index.d.ts +1 -1
  231. package/dist/entity-origin-fields.d.ts +1 -1
  232. package/dist/entity-retrieval.d.ts +2 -2
  233. package/dist/entity-retrieval.js +11 -11
  234. package/dist/entity-schema.d.ts +1 -1
  235. package/dist/episodic-context.d.ts +1 -1
  236. package/dist/eval-trajectory-contracts.d.ts +1 -1
  237. package/dist/eval-trajectory-store.d.ts +1 -1
  238. package/dist/eval-trajectory.d.ts +1 -1
  239. package/dist/explicit-capture.d.ts +11 -11
  240. package/dist/external-wiki-access.d.ts +14 -14
  241. package/dist/external-wiki-access.js +61 -61
  242. package/dist/external-wiki-collection-registration.d.ts +1 -1
  243. package/dist/external-wiki-collection.d.ts +1 -1
  244. package/dist/external-wiki-mcp-tools.d.ts +14 -14
  245. package/dist/extraction-error-classification.d.ts +1 -1
  246. package/dist/extraction-evidence-class.d.ts +1 -1
  247. package/dist/extraction-faithfulness.d.ts +2 -2
  248. package/dist/extraction-judge-telemetry.d.ts +2 -2
  249. package/dist/extraction-judge-training.d.ts +2 -2
  250. package/dist/extraction-judge.d.ts +2 -2
  251. package/dist/extraction-judge.js +2 -2
  252. package/dist/extraction-liveness.d.ts +1 -1
  253. package/dist/extraction-normalization.d.ts +1 -1
  254. package/dist/extraction-prompt.d.ts +1 -1
  255. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  256. package/dist/extraction-source-grounding.d.ts +1 -1
  257. package/dist/extraction-span-config.d.ts +1 -1
  258. package/dist/extraction-span-materialize.d.ts +1 -1
  259. package/dist/extraction-span-wire.d.ts +1 -1
  260. package/dist/extraction.d.ts +2 -2
  261. package/dist/extraction.js +21 -21
  262. package/dist/fallback-llm-codex-subscription.d.ts +1 -1
  263. package/dist/fallback-llm.d.ts +1 -1
  264. package/dist/{generic-recall-paths-BCRtXU32.d.ts → generic-recall-paths-C0J1Oxb7.d.ts} +1 -1
  265. package/dist/graph-append-error.d.ts +1 -1
  266. package/dist/graph-dashboard-diff.d.ts +1 -1
  267. package/dist/graph-dashboard-key.d.ts +1 -1
  268. package/dist/graph-dashboard-parser.d.ts +1 -1
  269. package/dist/graph-edge-reinforcement.d.ts +1 -1
  270. package/dist/graph-jsonl.d.ts +1 -1
  271. package/dist/graph-path-reconstruction.d.ts +1 -1
  272. package/dist/graph-path-scoring.d.ts +1 -1
  273. package/dist/graph-snapshot.d.ts +1 -1
  274. package/dist/graph.d.ts +1 -1
  275. package/dist/harmonic-retrieval.js +2 -2
  276. package/dist/importance.d.ts +1 -1
  277. package/dist/importers/index.d.ts +1 -1
  278. package/dist/importers/test-utils.d.ts +1 -1
  279. package/dist/in-flight-reads.d.ts +1 -1
  280. package/dist/{index-DMNTW4W6.d.ts → index-B735x-tK.d.ts} +3 -3
  281. package/dist/index.d.ts +28 -26
  282. package/dist/index.js +208 -198
  283. package/dist/intent.d.ts +1 -1
  284. package/dist/lcm/engine.d.ts +1 -1
  285. package/dist/lcm/engine.js +3 -3
  286. package/dist/lcm/index.d.ts +1 -1
  287. package/dist/lcm/index.js +8 -8
  288. package/dist/lcm/tools.d.ts +1 -1
  289. package/dist/lifecycle.d.ts +1 -1
  290. package/dist/live-connectors-runner.d.ts +1 -1
  291. package/dist/{local-llm-BXYC-mbU.d.ts → local-llm-BkkEK9rn.d.ts} +1 -1
  292. package/dist/local-llm-helpers.d.ts +2 -2
  293. package/dist/local-llm.d.ts +2 -2
  294. package/dist/local-model-endpoint.d.ts +1 -1
  295. package/dist/location/index.d.ts +5 -5
  296. package/dist/location/index.js +15 -15
  297. package/dist/maintenance/memory-governance.d.ts +1 -1
  298. package/dist/maintenance/memory-governance.js +11 -11
  299. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  300. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
  301. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  302. package/dist/maintenance/rebuild-memory-projection.js +12 -12
  303. package/dist/{maintenance-zJiLsKBY.d.ts → maintenance-CLBIvVxg.d.ts} +3 -3
  304. package/dist/mcp-memory-inspector-app.d.ts +14 -14
  305. package/dist/memory-action-policy.d.ts +1 -1
  306. package/dist/memory-browse-http-glue.d.ts +14 -14
  307. package/dist/memory-browse-mcp-tools.d.ts +14 -14
  308. package/dist/memory-browse-operations.js +61 -61
  309. package/dist/memory-browse.d.ts +1 -1
  310. package/dist/memory-browse.js +5 -5
  311. package/dist/memory-cache.d.ts +1 -1
  312. package/dist/memory-controller.d.ts +1 -1
  313. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  314. package/dist/memory-projection-store.d.ts +1 -1
  315. package/dist/memory-provenance.d.ts +1 -1
  316. package/dist/memory-snapshot.d.ts +1 -1
  317. package/dist/memory-subject-cli.d.ts +14 -14
  318. package/dist/memory-subject.d.ts +14 -14
  319. package/dist/memory-worth-outcomes.d.ts +2 -2
  320. package/dist/models-json.d.ts +1 -1
  321. package/dist/namespaces/migrate.d.ts +3 -3
  322. package/dist/namespaces/migrate.js +12 -12
  323. package/dist/namespaces/principal.d.ts +1 -1
  324. package/dist/namespaces/search.d.ts +1 -1
  325. package/dist/namespaces/search.js +3 -3
  326. package/dist/namespaces/storage.d.ts +3 -3
  327. package/dist/namespaces/storage.js +11 -11
  328. package/dist/native-knowledge.d.ts +1 -1
  329. package/dist/offline-sync-impression-drain.d.ts +1 -1
  330. package/dist/offline-sync-impression-drain.js +3 -3
  331. package/dist/operator-doctor-corpus.d.ts +1 -1
  332. package/dist/operator-doctor-corpus.js +16 -16
  333. package/dist/operator-doctor-replica.d.ts +1 -1
  334. package/dist/operator-toolkit.d.ts +3 -3
  335. package/dist/operator-toolkit.js +40 -40
  336. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  337. package/dist/orchestration/maintenance.d.ts +4 -4
  338. package/dist/orchestration/maintenance.js +22 -22
  339. package/dist/{orchestrator-BTqT3F6X.d.ts → orchestrator-iexgVLow.d.ts} +13 -11
  340. package/dist/orchestrator.d.ts +11 -11
  341. package/dist/orchestrator.js +121 -120
  342. package/dist/patterns-cli.d.ts +1 -1
  343. package/dist/{pipeline-CgO2Sd4O.d.ts → pipeline-DvtDtyo9.d.ts} +1 -1
  344. package/dist/policy-runtime.d.ts +1 -1
  345. package/dist/proactive-contention.d.ts +2 -2
  346. package/dist/provenance.d.ts +1 -1
  347. package/dist/{public-http-Dk1EA9ix.d.ts → public-http-UWVcqMcb.d.ts} +1 -1
  348. package/dist/{qmd-CwxtVz64.d.ts → qmd-CBYBJ6HW.d.ts} +1 -1
  349. package/dist/qmd-preflight.d.ts +2 -2
  350. package/dist/qmd-recall-cache.d.ts +1 -1
  351. package/dist/qmd.d.ts +2 -2
  352. package/dist/recall-audit-anomaly.d.ts +1 -0
  353. package/dist/recall-audit.d.ts +4 -0
  354. package/dist/recall-audit.js +1 -1
  355. package/dist/recall-composition-decision.d.ts +41 -0
  356. package/dist/recall-composition-decision.js +17 -0
  357. package/dist/recall-composition-decision.js.map +1 -0
  358. package/dist/recall-concurrency-config.d.ts +1 -1
  359. package/dist/recall-disclosure-escalation.d.ts +1 -1
  360. package/dist/recall-explain-renderer.d.ts +2 -1
  361. package/dist/recall-explain-renderer.js +3 -3
  362. package/dist/recall-memory-map.d.ts +1 -1
  363. package/dist/recall-navigate-access.d.ts +1 -1
  364. package/dist/recall-navigate-access.js +2 -2
  365. package/dist/recall-navigate-disclosure.d.ts +1 -1
  366. package/dist/recall-navigate-disclosure.js +2 -2
  367. package/dist/recall-navigate.d.ts +1 -1
  368. package/dist/recall-navigate.js +2 -2
  369. package/dist/recall-navigation-http-glue.d.ts +14 -14
  370. package/dist/recall-navigation-mcp-tools.d.ts +14 -14
  371. package/dist/recall-navigation-operations.js +61 -61
  372. package/dist/recall-navigation-renderer.d.ts +2 -1
  373. package/dist/recall-navigation.d.ts +2 -1
  374. package/dist/recall-navigation.js +60 -60
  375. package/dist/recall-planner-llm.d.ts +1 -1
  376. package/dist/recall-state-view-admission.d.ts +2 -2
  377. package/dist/recall-state-view-admission.js +5 -5
  378. package/dist/recall-state-view-anchors.d.ts +1 -1
  379. package/dist/recall-state-view-anchors.js +2 -2
  380. package/dist/recall-state.d.ts +1 -1
  381. package/dist/recall-tag-filter.d.ts +2 -1
  382. package/dist/recall-timings.d.ts +1 -1
  383. package/dist/recall-xray-cli.d.ts +2 -1
  384. package/dist/recall-xray-cli.js +4 -4
  385. package/dist/recall-xray-renderer.d.ts +2 -1
  386. package/dist/recall-xray-renderer.js +3 -3
  387. package/dist/recall-xray.d.ts +10 -1
  388. package/dist/recall-xray.js +2 -2
  389. package/dist/reconcile/cursor.d.ts +1 -1
  390. package/dist/reconcile/manifest.d.ts +1 -1
  391. package/dist/reconcile/manifest.js +1 -1
  392. package/dist/reconcile/plan.d.ts +1 -1
  393. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  394. package/dist/replay/normalizers/claude.d.ts +1 -1
  395. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  396. package/dist/replay/normalizers/shared.d.ts +1 -1
  397. package/dist/replay/runner.d.ts +1 -1
  398. package/dist/replay/types.d.ts +1 -1
  399. package/dist/replica-divergence.d.ts +1 -1
  400. package/dist/replica-peers-config.d.ts +1 -1
  401. package/dist/resolve-auth-token.d.ts +1 -1
  402. package/dist/resume-bundles.js +73 -3
  403. package/dist/retrieval-agents.d.ts +2 -2
  404. package/dist/retrieval-tiers.d.ts +1 -1
  405. package/dist/routing/engine.d.ts +1 -1
  406. package/dist/routing/store.d.ts +1 -1
  407. package/dist/salvage-envelope.d.ts +1 -1
  408. package/dist/{scope-profiles-Bg1rB-Dp.d.ts → scope-profiles-BN1Dgfha.d.ts} +1 -1
  409. package/dist/search/embed-helper.d.ts +1 -1
  410. package/dist/search/factory.d.ts +1 -1
  411. package/dist/search/factory.js +2 -2
  412. package/dist/search/index.d.ts +1 -1
  413. package/dist/search/index.js +4 -4
  414. package/dist/search/lancedb-backend.d.ts +1 -1
  415. package/dist/search/meilisearch-backend.d.ts +1 -1
  416. package/dist/search/noop-backend.d.ts +1 -1
  417. package/dist/search/orama-backend.d.ts +1 -1
  418. package/dist/search/port.d.ts +1 -1
  419. package/dist/search/remote-backend.d.ts +1 -1
  420. package/dist/{semantic-consolidation-DEzRyeyn.d.ts → semantic-consolidation-D--qe0eE.d.ts} +1 -1
  421. package/dist/semantic-consolidation.d.ts +2 -2
  422. package/dist/semantic-consolidation.js +16 -16
  423. package/dist/semantic-rule-promotion.js +11 -11
  424. package/dist/semantic-rule-verifier.d.ts +1 -1
  425. package/dist/semantic-rule-verifier.js +11 -11
  426. package/dist/{service-DGEIDOeD.d.ts → service-VealHeqO.d.ts} +2 -2
  427. package/dist/session-observer-bands.d.ts +1 -1
  428. package/dist/session-observer-state.d.ts +1 -1
  429. package/dist/shared-context/manager.d.ts +1 -1
  430. package/dist/signal.d.ts +1 -1
  431. package/dist/source-agent-qualifier.d.ts +1 -1
  432. package/dist/source-agent-qualifier.js +20 -20
  433. package/dist/standup/build.js +12 -12
  434. package/dist/{storage-DNQWtOSM.d.ts → storage-CMm-3aD3.d.ts} +1 -1
  435. package/dist/storage.d.ts +2 -2
  436. package/dist/storage.js +10 -10
  437. package/dist/subject-config.d.ts +1 -1
  438. package/dist/summarizer.d.ts +1 -1
  439. package/dist/summarizer.js +1 -1
  440. package/dist/summary-snapshot.d.ts +1 -1
  441. package/dist/support-passport/index.d.ts +17 -17
  442. package/dist/support-passport/index.js +63 -63
  443. package/dist/{tagging-CPVwgadt.d.ts → tagging-BjsNFKWz.d.ts} +2 -2
  444. package/dist/temporal-supersession.d.ts +2 -2
  445. package/dist/temporal-timeline-recall.d.ts +1 -1
  446. package/dist/temporal-validity.d.ts +1 -1
  447. package/dist/threading.d.ts +1 -1
  448. package/dist/tier-migration.d.ts +2 -2
  449. package/dist/tier-routing.d.ts +1 -1
  450. package/dist/topics.d.ts +1 -1
  451. package/dist/transcript.d.ts +1 -1
  452. package/dist/transfer/autodetect.js +1 -1
  453. package/dist/transfer/backup.js +2 -2
  454. package/dist/transfer/capsule-export.js +3 -3
  455. package/dist/transfer/capsule-import.js +2 -2
  456. package/dist/transfer/export-okf.d.ts +1 -1
  457. package/dist/transfer/export-okf.js +11 -11
  458. package/dist/trust-score-stage.d.ts +1 -1
  459. package/dist/trust-score.d.ts +1 -1
  460. package/dist/{types-DCB90q3g.d.ts → types-Du6VdoAg.d.ts} +22 -1
  461. package/dist/types.d.ts +1 -1
  462. package/dist/types.js +1 -1
  463. package/dist/utility-runtime.d.ts +1 -1
  464. package/dist/verified-recall.js +11 -11
  465. package/dist/who-knows-cli.d.ts +14 -14
  466. package/dist/who-knows-cli.js +12 -12
  467. package/dist/who-knows.d.ts +14 -14
  468. package/dist/who-knows.js +11 -11
  469. package/dist/write-envelope.d.ts +1 -1
  470. package/package.json +2 -2
  471. package/src/access-mcp-output-schemas.ts +14 -1
  472. package/src/access-recall-response.ts +3 -0
  473. package/src/config.ts +3 -4
  474. package/src/directory-sidecars.test.ts +119 -0
  475. package/src/directory-sidecars.ts +110 -25
  476. package/src/experience/session-experience-recall.test.ts +228 -0
  477. package/src/experience/session-experience-recall.ts +60 -0
  478. package/src/index.ts +1 -0
  479. package/src/lifecycle/seed-graduation-config-types.ts +22 -0
  480. package/src/lifecycle/seed-graduation.test.ts +160 -1
  481. package/src/lifecycle/seed-graduation.ts +7 -9
  482. package/src/orchestration/lifecycle-policy-coordinator.ts +12 -0
  483. package/src/orchestration/recall-entry.ts +16 -2
  484. package/src/orchestration/recall-internal.ts +21 -18
  485. package/src/orchestration/recall-recognition-search.test.ts +290 -0
  486. package/src/orchestration/recall-recognition-search.ts +160 -0
  487. package/src/orchestrator.ts +1 -0
  488. package/src/procedural/procedure-recall.ts +14 -3
  489. package/src/recall-audit.test.ts +34 -0
  490. package/src/recall-audit.ts +4 -0
  491. package/src/recall-composition-decision.test.ts +134 -0
  492. package/src/recall-composition-decision.ts +113 -0
  493. package/src/recall-xray-renderer.test.ts +17 -0
  494. package/src/recall-xray-renderer.ts +10 -0
  495. package/src/recall-xray.test.ts +28 -0
  496. package/src/recall-xray.ts +15 -0
  497. package/src/testing/subjects/recall-recognition-tier.test.ts +106 -0
  498. package/src/types.ts +4 -6
  499. package/dist/chunk-DH536WT2.js.map +0 -1
  500. package/dist/chunk-ECLY4NZA.js.map +0 -1
  501. package/dist/chunk-IST6MBYC.js.map +0 -1
  502. package/dist/chunk-LBLXEFWK.js.map +0 -1
  503. package/dist/chunk-OLJYDGGP.js.map +0 -1
  504. package/dist/chunk-PQWICTRO.js.map +0 -1
  505. package/dist/chunk-UD6W67JM.js.map +0 -1
  506. package/dist/chunk-WVI43D54.js.map +0 -1
  507. /package/dist/{auto-sync-DG5KEOF5.js.map → auto-sync-CWSZDLLW.js.map} +0 -0
  508. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  509. /package/dist/{chunk-3SI3FFTW.js.map → chunk-2INZSV27.js.map} +0 -0
  510. /package/dist/{chunk-PMLFPVYJ.js.map → chunk-2QZJ4P27.js.map} +0 -0
  511. /package/dist/{chunk-3RZB7TYL.js.map → chunk-2UDAABV6.js.map} +0 -0
  512. /package/dist/{chunk-4PXFLDMJ.js.map → chunk-35EH6KW4.js.map} +0 -0
  513. /package/dist/{chunk-KOEDSRF5.js.map → chunk-43IQRLEF.js.map} +0 -0
  514. /package/dist/{chunk-56C7OO3N.js.map → chunk-6KCQNFDQ.js.map} +0 -0
  515. /package/dist/{chunk-VBRS7Z3O.js.map → chunk-72N2P44O.js.map} +0 -0
  516. /package/dist/{chunk-ZUNYFDI4.js.map → chunk-7QVYVSEH.js.map} +0 -0
  517. /package/dist/{chunk-SRMBMMTK.js.map → chunk-7RKAE6Y4.js.map} +0 -0
  518. /package/dist/{chunk-42BV46XS.js.map → chunk-AH44WTLJ.js.map} +0 -0
  519. /package/dist/{chunk-TZ44E732.js.map → chunk-AIVRD66I.js.map} +0 -0
  520. /package/dist/{chunk-AYGWJ2UK.js.map → chunk-AQWGCHIV.js.map} +0 -0
  521. /package/dist/{chunk-EZV43XBD.js.map → chunk-AYHNTYVG.js.map} +0 -0
  522. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  523. /package/dist/{chunk-JHUODJRW.js.map → chunk-D2N3PMAE.js.map} +0 -0
  524. /package/dist/{chunk-7SJCSDQ3.js.map → chunk-D7VT2LED.js.map} +0 -0
  525. /package/dist/{chunk-TVVEYCNW.js.map → chunk-DAOMWGO2.js.map} +0 -0
  526. /package/dist/{chunk-MVMNEU65.js.map → chunk-DI52XAKG.js.map} +0 -0
  527. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  528. /package/dist/{chunk-EUP4AXIW.js.map → chunk-DZP2XMZC.js.map} +0 -0
  529. /package/dist/{chunk-PA5EOTRR.js.map → chunk-EVQ33D3N.js.map} +0 -0
  530. /package/dist/{chunk-E64HBW7M.js.map → chunk-EW3Y73MN.js.map} +0 -0
  531. /package/dist/{chunk-VSN2DMQK.js.map → chunk-G2DF5MI7.js.map} +0 -0
  532. /package/dist/{chunk-JIWZVOQM.js.map → chunk-G7S37WD4.js.map} +0 -0
  533. /package/dist/{chunk-AL7OLBL7.js.map → chunk-GRX6YH4E.js.map} +0 -0
  534. /package/dist/{chunk-XTMABIFW.js.map → chunk-HG42J2EX.js.map} +0 -0
  535. /package/dist/{chunk-MQMZO23A.js.map → chunk-HWT6KRGS.js.map} +0 -0
  536. /package/dist/{chunk-LR7KUQ2W.js.map → chunk-IEOBAOA6.js.map} +0 -0
  537. /package/dist/{chunk-UDAUULK2.js.map → chunk-IGEZE6QB.js.map} +0 -0
  538. /package/dist/{chunk-SGHGCFVV.js.map → chunk-JE334SIA.js.map} +0 -0
  539. /package/dist/{chunk-IC3PM3YO.js.map → chunk-JE4H2QBO.js.map} +0 -0
  540. /package/dist/{chunk-E73SVGJA.js.map → chunk-JMZQS6OS.js.map} +0 -0
  541. /package/dist/{chunk-3RABJOGD.js.map → chunk-KH2D26LQ.js.map} +0 -0
  542. /package/dist/{chunk-3MIZ2EKQ.js.map → chunk-KQQEZTH6.js.map} +0 -0
  543. /package/dist/{chunk-F5V7KRQS.js.map → chunk-LIAKZGOY.js.map} +0 -0
  544. /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
  545. /package/dist/{chunk-D7QX26FF.js.map → chunk-O7OVWKT4.js.map} +0 -0
  546. /package/dist/{chunk-JOP7W24J.js.map → chunk-PLJ2MQFT.js.map} +0 -0
  547. /package/dist/{chunk-D2XUSZ24.js.map → chunk-QWQB7TOB.js.map} +0 -0
  548. /package/dist/{chunk-HRCWDO6S.js.map → chunk-RSMNPYBM.js.map} +0 -0
  549. /package/dist/{chunk-BOTSR5S3.js.map → chunk-RUUJXAGT.js.map} +0 -0
  550. /package/dist/{chunk-FO6IK4IF.js.map → chunk-SEQ6DWXD.js.map} +0 -0
  551. /package/dist/{chunk-ZBAQMSEY.js.map → chunk-SLGD36MM.js.map} +0 -0
  552. /package/dist/{chunk-IYHHCSF6.js.map → chunk-SOFATSHJ.js.map} +0 -0
  553. /package/dist/{chunk-JG4AP36X.js.map → chunk-SPFNGHHP.js.map} +0 -0
  554. /package/dist/{chunk-DNO6QWCB.js.map → chunk-SPWNCGSM.js.map} +0 -0
  555. /package/dist/{chunk-QSP4Y73Q.js.map → chunk-SVUUOLKM.js.map} +0 -0
  556. /package/dist/{chunk-D6WX5FEF.js.map → chunk-SZ7IVZGD.js.map} +0 -0
  557. /package/dist/{chunk-2IVHOQRY.js.map → chunk-TEQQQTQS.js.map} +0 -0
  558. /package/dist/{chunk-UI6R2YUB.js.map → chunk-TQT4AOPO.js.map} +0 -0
  559. /package/dist/{chunk-3UQIS2GC.js.map → chunk-TTFJQ5B5.js.map} +0 -0
  560. /package/dist/{chunk-JTPAXDSX.js.map → chunk-U2SK45U3.js.map} +0 -0
  561. /package/dist/{chunk-4FWNMN5R.js.map → chunk-U6CMLAP4.js.map} +0 -0
  562. /package/dist/{chunk-6525YIYL.js.map → chunk-UCH2RWFX.js.map} +0 -0
  563. /package/dist/{chunk-QZDUNK6V.js.map → chunk-UCY4EHAG.js.map} +0 -0
  564. /package/dist/{chunk-OP5IBPHP.js.map → chunk-UDJMJNBK.js.map} +0 -0
  565. /package/dist/{chunk-BHI5ILU5.js.map → chunk-ULQVG6G3.js.map} +0 -0
  566. /package/dist/{chunk-X6B2QWXW.js.map → chunk-UQTXER7M.js.map} +0 -0
  567. /package/dist/{chunk-QXQCPNKA.js.map → chunk-V5BU5PVE.js.map} +0 -0
  568. /package/dist/{chunk-IPLYGWQF.js.map → chunk-VDX2J7OX.js.map} +0 -0
  569. /package/dist/{chunk-XUKUMBP3.js.map → chunk-VGO57TU7.js.map} +0 -0
  570. /package/dist/{chunk-W6V7JN2E.js.map → chunk-VUV472VH.js.map} +0 -0
  571. /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
  572. /package/dist/{chunk-ML5FW2RO.js.map → chunk-WBW34YCJ.js.map} +0 -0
  573. /package/dist/{chunk-FDDCZDBI.js.map → chunk-WN4HFL4K.js.map} +0 -0
  574. /package/dist/{chunk-MECKA6G2.js.map → chunk-WUJD4CHZ.js.map} +0 -0
  575. /package/dist/{chunk-HS75MCQF.js.map → chunk-WUUGE7QC.js.map} +0 -0
  576. /package/dist/{chunk-UVEBBXB5.js.map → chunk-X7WAM3IY.js.map} +0 -0
  577. /package/dist/{chunk-4SDO74N2.js.map → chunk-XPFJSUOR.js.map} +0 -0
  578. /package/dist/{chunk-PPNFKQ6D.js.map → chunk-Y4G6LHJW.js.map} +0 -0
  579. /package/dist/{chunk-C3PKRFZ4.js.map → chunk-Y7LZ5V7N.js.map} +0 -0
  580. /package/dist/{chunk-AYP2FZFA.js.map → chunk-YIIW2OH2.js.map} +0 -0
  581. /package/dist/{chunk-YSBYNCCN.js.map → chunk-YLPCEUXP.js.map} +0 -0
  582. /package/dist/{chunk-RFIJH2OE.js.map → chunk-YUHGJBQK.js.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Intent-gated recall for active procedure memories (issue #519).
3
+ * Session-end experience episodes (issue #2979) compete here after promotion.
3
4
  */
4
5
 
5
6
  import type { MemoryFile, PluginConfig } from "../types.js";
@@ -9,6 +10,10 @@ import { isActiveMemoryStatus } from "../memory-lifecycle-ledger-utils.js";
9
10
  import { canRecallToolScopedMemory } from "../tool-scoped-memory.js";
10
11
  import { resolveSecurityCapabilities } from "../capabilities.js";
11
12
  import { renderAuthorityBoundContent } from "../recall-context-composition.js";
13
+ import {
14
+ renderSessionExperiencePreview,
15
+ scoreSessionExperienceForPrompt,
16
+ } from "../experience/session-experience-recall.js";
12
17
 
13
18
  function tokenOverlapScore(prompt: string, memoryText: string): number {
14
19
  const norm = (s: string) =>
@@ -31,12 +36,16 @@ function scoreProcedureForPrompt(
31
36
  m: MemoryFile,
32
37
  prompt: string,
33
38
  queryIntent: ReturnType<typeof inferIntentFromText>,
39
+ experienceEnabled: boolean,
34
40
  ): number {
35
41
  const memText = `${m.content}\n${(m.frontmatter.tags ?? []).join(" ")}`;
36
42
  const jaccard = tokenOverlapScore(prompt, memText);
37
43
  const memIntent = inferIntentFromText(m.content.slice(0, 2000));
38
44
  const intentScore = intentCompatibilityScore(queryIntent, memIntent);
39
- return jaccard * 0.55 + intentScore * 0.45;
45
+ const base = jaccard * 0.55 + intentScore * 0.45;
46
+ if (!experienceEnabled) return base;
47
+ const experience = scoreSessionExperienceForPrompt(m, prompt);
48
+ return experience === null ? base : Math.max(base, experience);
40
49
  }
41
50
 
42
51
  /**
@@ -83,6 +92,7 @@ export async function buildProcedureRecallSection(
83
92
  );
84
93
 
85
94
  const all = await storage.readAllMemories();
95
+ const experienceEnabled = config.sessionExperience?.enabled === true;
86
96
  const scored = all
87
97
  .filter(
88
98
  (m) =>
@@ -91,7 +101,7 @@ export async function buildProcedureRecallSection(
91
101
  (options?.partitionToolScoped !== true ||
92
102
  canRecallToolScopedMemory(m.frontmatter, options.requestingConnector)),
93
103
  )
94
- .map((m) => ({ m, score: scoreProcedureForPrompt(m, trimmed, queryIntent) }))
104
+ .map((m) => ({ m, score: scoreProcedureForPrompt(m, trimmed, queryIntent, experienceEnabled) }))
95
105
  .filter((x) => x.score > 0.04)
96
106
  .sort((a, b) => b.score - a.score)
97
107
  .slice(0, maxN);
@@ -110,7 +120,8 @@ export async function buildProcedureRecallSection(
110
120
  const security = resolveSecurityCapabilities(config);
111
121
  const blocks = scored.map(({ m, score }) => {
112
122
  const id = m.frontmatter.id;
113
- const flat = m.content.replace(/\s+/g, " ").trim();
123
+ const labeled = experienceEnabled ? renderSessionExperiencePreview(m) : null;
124
+ const flat = (labeled ?? m.content).replace(/\s+/g, " ").trim();
114
125
  const preview = flat.slice(0, 320);
115
126
  const suffix = flat.length > 320 ? "…" : "";
116
127
  const body = renderAuthorityBoundContent(`${preview}${suffix}`, m.frontmatter.origin, {
@@ -49,3 +49,37 @@ test("pruneRecallAuditEntries removes day directories older than retention", asy
49
49
  assert.equal((await stat(keepDir)).isDirectory(), true);
50
50
  await assert.rejects(stat(deleteDir));
51
51
  });
52
+
53
+ test("#2972 audit entry persists degradation when present and omits it otherwise", async () => {
54
+ const root = await mkdtemp(path.join(os.tmpdir(), "remnic-recall-audit-deg-"));
55
+ const healthy = {
56
+ ts: "2026-04-12T14:30:12.445Z",
57
+ sessionKey: "agent/main:session/healthy",
58
+ agentId: "main",
59
+ trigger: "access-surface",
60
+ queryText: "How did the CI outage resolve?",
61
+ candidateMemoryIds: ["mem_1"],
62
+ summary: "CI recovered.",
63
+ injectedChars: 12,
64
+ toggleState: "enabled" as const,
65
+ };
66
+ const degraded = {
67
+ ...healthy,
68
+ sessionKey: "agent/main:session/degraded",
69
+ degradation: {
70
+ state: "degraded" as const,
71
+ reason: "budget-compacted" as const,
72
+ budget: { contextBudget: 80, fullChars: 200, deliveredChars: 80 },
73
+ },
74
+ };
75
+
76
+ await appendRecallAuditEntry(root, healthy);
77
+ await appendRecallAuditEntry(root, degraded);
78
+
79
+ const healthyPath = buildRecallAuditPath(root, healthy.ts, healthy.sessionKey);
80
+ const degradedPath = buildRecallAuditPath(root, degraded.ts, degraded.sessionKey);
81
+ assert.deepEqual(JSON.parse((await readFile(healthyPath, "utf8")).trim()), healthy);
82
+ assert.equal("degradation" in JSON.parse((await readFile(healthyPath, "utf8")).trim()), false);
83
+ assert.deepEqual(JSON.parse((await readFile(degradedPath, "utf8")).trim()), degraded);
84
+ });
85
+
@@ -2,6 +2,8 @@ import type { Dirent } from "node:fs";
2
2
  import { appendFile, mkdir, readdir, rm } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
 
5
+ import type { RecallContextDegradation } from "./recall-context-composition.js";
6
+
5
7
  export interface RecallAuditEntry {
6
8
  ts: string;
7
9
  sessionKey: string;
@@ -16,6 +18,8 @@ export interface RecallAuditEntry {
16
18
  plannerMode?: string;
17
19
  requestedMode?: string;
18
20
  fallbackUsed?: boolean;
21
+ /** Injected-context degradation (#2972). Absent on a healthy recall. */
22
+ degradation?: RecallContextDegradation;
19
23
  }
20
24
 
21
25
  function formatIsoDate(ts: string): string {
@@ -0,0 +1,134 @@
1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+
4
+ import { abortError } from "./abort-error.js";
5
+ import {
6
+ compactRecallContextFromBuckets,
7
+ decideRecallContextComposition,
8
+ notifyContextComposition,
9
+ recallFailureComposition,
10
+ } from "./recall-composition-decision.js";
11
+
12
+ test("#2972 healthy recall composition carries no degradation marker", () => {
13
+ const { composition, truncated } = decideRecallContextComposition({
14
+ context: "A remembered deployment decision.",
15
+ maxChars: 512,
16
+ });
17
+
18
+ assert.equal("degradation" in composition, false);
19
+ assert.equal(truncated, false);
20
+ assert.ok(!JSON.stringify(composition).includes("degradation"));
21
+ });
22
+
23
+ test("#2972 empty recall stays marker-free", () => {
24
+ const { composition, context } = decideRecallContextComposition({
25
+ context: "",
26
+ maxChars: 512,
27
+ });
28
+
29
+ assert.equal(context, "");
30
+ assert.equal("degradation" in composition, false);
31
+ });
32
+
33
+ test("#2972 compact form from section buckets is preferred over clipping", () => {
34
+ const longOne = "full-form entry one with a long body ".repeat(6).trim();
35
+ const longTwo = "full-form entry two with a long body ".repeat(6).trim();
36
+ const buckets = new Map<string, Array<string | { content: string }>>([
37
+ [
38
+ "memories",
39
+ [
40
+ "## Relevant Memories",
41
+ { content: `[1] notes/one.md (score: 0.900)\n${longOne}` },
42
+ { content: `[2] notes/two.md (score: 0.800)\n${longTwo}` },
43
+ ],
44
+ ],
45
+ ]);
46
+ const compactContext = compactRecallContextFromBuckets(buckets);
47
+ assert.equal(
48
+ compactContext,
49
+ "## Relevant Memories\n[1] notes/one.md (score: 0.900)\n[2] notes/two.md (score: 0.800)",
50
+ );
51
+
52
+ const fullContext = `[1] notes/one.md (score: 0.900)\n${longOne}\n\n[2] notes/two.md (score: 0.800)\n${longTwo}`;
53
+ assert.ok(fullContext.length > compactContext.length);
54
+ assert.ok(compactContext.length <= 90);
55
+
56
+ const { composition, truncated } = decideRecallContextComposition({
57
+ context: fullContext,
58
+ compactContext,
59
+ maxChars: 90,
60
+ });
61
+
62
+ assert.equal(composition.context, compactContext);
63
+ assert.equal(composition.degradation?.state, "degraded");
64
+ assert.equal(composition.degradation?.reason, "budget-compacted");
65
+ assert.equal(truncated, true);
66
+ });
67
+
68
+ test("#2972 whitespace-only context stays marker-free", () => {
69
+ const { composition, context, truncated } = decideRecallContextComposition({
70
+ context: " ",
71
+ maxChars: 512,
72
+ });
73
+
74
+ assert.equal(context, "");
75
+ assert.equal("degradation" in composition, false);
76
+ assert.equal(truncated, false);
77
+ });
78
+
79
+ test("#2972 recall failure composition is missing, abort stays silent", () => {
80
+ const timeout = recallFailureComposition(new Error("recall timeout"));
81
+ assert.equal(timeout?.degradation?.state, "missing");
82
+ assert.equal(timeout?.degradation?.reason, "backend-unavailable");
83
+ assert.equal(timeout?.degradation?.detail, "timeout");
84
+ assert.match(timeout?.context ?? "", /memory context unavailable/i);
85
+
86
+ const failed = recallFailureComposition(new Error("qmd exploded"));
87
+ assert.equal(failed?.degradation?.detail, "recall_failed");
88
+
89
+ assert.equal(recallFailureComposition(abortError("recall aborted")), null);
90
+ });
91
+
92
+ test("#2972 composition observer is fail-open", async () => {
93
+ const seen: unknown[] = [];
94
+ notifyContextComposition(
95
+ (composition) => {
96
+ seen.push(composition.context);
97
+ },
98
+ { context: "ok" },
99
+ () => {
100
+ throw new Error("onError must not run on success");
101
+ },
102
+ );
103
+ assert.deepEqual(seen, ["ok"]);
104
+
105
+ const errors: unknown[] = [];
106
+ notifyContextComposition(
107
+ () => {
108
+ throw new Error("observer boom");
109
+ },
110
+ { context: "ok" },
111
+ (err) => {
112
+ errors.push(err);
113
+ },
114
+ );
115
+ assert.equal(errors.length, 1);
116
+
117
+ await new Promise<void>((resolve, reject) => {
118
+ notifyContextComposition(
119
+ async () => {
120
+ throw new Error("async boom");
121
+ },
122
+ { context: "ok" },
123
+ (err) => {
124
+ try {
125
+ assert.equal((err as Error).message, "async boom");
126
+ resolve();
127
+ } catch (caught) {
128
+ reject(caught);
129
+ }
130
+ },
131
+ );
132
+ });
133
+ });
134
+
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Recall composition decision (#2972 layer 2).
3
+ *
4
+ * Extracted from recall-internal so that file stays under its ratchet
5
+ * ceiling. Classifies injected memory context as complete / degraded /
6
+ * missing, builds the compact (first-line) form from section buckets,
7
+ * and turns outer-recall failures into the missing-note instead of "".
8
+ */
9
+
10
+ import { isAbortError } from "./abort-error.js";
11
+ import {
12
+ boundRecallContextComposition,
13
+ composeMissingMemoryContext,
14
+ composeRecallContext,
15
+ RECALL_CONTEXT_SEPARATOR,
16
+ type RecallContextComposition,
17
+ } from "./recall-context-composition.js";
18
+
19
+ export type RecallCompositionChunk = string | { readonly content: string };
20
+
21
+ export interface DecideRecallContextCompositionInput {
22
+ context: string;
23
+ compactContext?: string;
24
+ footer?: string;
25
+ maxChars: number;
26
+ }
27
+
28
+ export interface DecidedRecallContextComposition {
29
+ composition: RecallContextComposition;
30
+ context: string;
31
+ truncated: boolean;
32
+ }
33
+
34
+ function firstLine(content: string): string {
35
+ const trimmed = content.trim();
36
+ if (trimmed.length === 0) return "";
37
+ const newline = trimmed.indexOf("\n");
38
+ return newline === -1 ? trimmed : trimmed.slice(0, newline).trimEnd();
39
+ }
40
+
41
+ function chunkContent(chunk: RecallCompositionChunk): string {
42
+ return typeof chunk === "string" ? chunk : chunk.content;
43
+ }
44
+
45
+ /**
46
+ * Shallow form of every section chunk: the first line of each entry,
47
+ * so a budget miss prefers breadth-complete-but-shallow over a clipped
48
+ * tail. Empty chunks contribute nothing.
49
+ */
50
+ export function compactRecallContextFromBuckets(
51
+ buckets: Iterable<readonly [unknown, readonly RecallCompositionChunk[]]>,
52
+ ): string {
53
+ const sections: string[] = [];
54
+ for (const [, chunks] of buckets) {
55
+ const lines: string[] = [];
56
+ for (const chunk of chunks) {
57
+ const line = firstLine(chunkContent(chunk));
58
+ if (line.length > 0) lines.push(line);
59
+ }
60
+ if (lines.length > 0) sections.push(lines.join("\n"));
61
+ }
62
+ return sections.join(RECALL_CONTEXT_SEPARATOR);
63
+ }
64
+
65
+ export function decideRecallContextComposition(
66
+ input: DecideRecallContextCompositionInput,
67
+ ): DecidedRecallContextComposition {
68
+ const composition = boundRecallContextComposition({
69
+ context: input.context,
70
+ footer: input.footer,
71
+ maxChars: input.maxChars,
72
+ compactContext: input.compactContext,
73
+ });
74
+ return {
75
+ composition,
76
+ context: composeRecallContext(composition),
77
+ truncated:
78
+ composition.degradation?.reason === "budget-clipped" ||
79
+ composition.degradation?.reason === "budget-compacted",
80
+ };
81
+ }
82
+
83
+ export function notifyContextComposition(
84
+ onContextComposition:
85
+ | ((composition: RecallContextComposition) => void | PromiseLike<void>)
86
+ | undefined,
87
+ composition: RecallContextComposition,
88
+ onError: (err: unknown) => void,
89
+ ): void {
90
+ if (!onContextComposition) return;
91
+ try {
92
+ const result = onContextComposition(composition);
93
+ if (result && typeof result.then === "function") {
94
+ void Promise.resolve(result).catch(onError);
95
+ }
96
+ } catch (err) {
97
+ onError(err);
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Outer-recall failure: abort stays silent (empty string). Timeout and
103
+ * other errors become the missing-note so a failed query is never
104
+ * indistinguishable from "no matches".
105
+ */
106
+ export function recallFailureComposition(err: unknown): RecallContextComposition | null {
107
+ if (isAbortError(err)) return null;
108
+ const detail =
109
+ err instanceof Error && err.message === "recall timeout"
110
+ ? "timeout"
111
+ : "recall_failed";
112
+ return composeMissingMemoryContext({ detail });
113
+ }
@@ -615,3 +615,20 @@ test("renderXrayText tier-explain block matches shared helper output", async ()
615
615
  assert.ok(nullText.includes(line));
616
616
  }
617
617
  });
618
+
619
+ test("#2972 xray text and markdown surface degradation only when present", () => {
620
+ const healthy = minimalSnapshot();
621
+ const degraded = {
622
+ ...minimalSnapshot(),
623
+ degradation: {
624
+ state: "degraded" as const,
625
+ reason: "budget-clipped" as const,
626
+ },
627
+ };
628
+ const healthyText = renderXrayText(healthy);
629
+ assert.equal(healthyText.includes("degradation:"), false);
630
+ assert.match(renderXrayText(degraded), /degradation: degraded\/budget-clipped/);
631
+ assert.equal(renderXrayMarkdown(healthy).includes("| Degradation |"), false);
632
+ assert.match(renderXrayMarkdown(degraded), /\| Degradation \| degraded\/budget-clipped \|/);
633
+ });
634
+
@@ -108,6 +108,11 @@ export function renderXrayText(snapshot: RecallXraySnapshot | null): string {
108
108
  lines.push(
109
109
  `budget: ${snapshot.budget.used} / ${snapshot.budget.chars} chars`,
110
110
  );
111
+ if (snapshot.degradation) {
112
+ lines.push(
113
+ `degradation: ${snapshot.degradation.state}/${snapshot.degradation.reason}`,
114
+ );
115
+ }
111
116
 
112
117
  lines.push("");
113
118
  lines.push("--- filters ---");
@@ -247,6 +252,11 @@ export function renderXrayMarkdown(
247
252
  lines.push(
248
253
  `| Budget | ${snapshot.budget.used} / ${snapshot.budget.chars} chars |`,
249
254
  );
255
+ if (snapshot.degradation) {
256
+ lines.push(
257
+ `| Degradation | ${snapshot.degradation.state}/${snapshot.degradation.reason} |`,
258
+ );
259
+ }
250
260
 
251
261
  lines.push("");
252
262
  lines.push("## Filters");
@@ -650,3 +650,31 @@ test("RecallXrayBuilder clones the trust projection so the snapshot surfaces it
650
650
  "quarantine reason preserved so exclusion never looks like 'no result' (rule 34)",
651
651
  );
652
652
  });
653
+
654
+ test("#2972 healthy xray snapshot omits the degradation marker", () => {
655
+ const snapshot = buildXraySnapshot({
656
+ query: "q",
657
+ now: fixedNow,
658
+ snapshotIdGenerator: idGen(),
659
+ });
660
+ assert.equal("degradation" in snapshot, false);
661
+ assert.ok(!JSON.stringify(snapshot).includes("degradation"));
662
+ });
663
+
664
+ test("#2972 xray snapshot copies degradation and isolates caller mutation", () => {
665
+ const degradation = {
666
+ state: "degraded" as const,
667
+ reason: "budget-clipped" as const,
668
+ budget: { contextBudget: 20, fullChars: 100, deliveredChars: 20 },
669
+ };
670
+ const snapshot = buildXraySnapshot({
671
+ query: "q",
672
+ degradation,
673
+ now: fixedNow,
674
+ snapshotIdGenerator: idGen(),
675
+ });
676
+ assert.deepEqual(snapshot.degradation, degradation);
677
+ degradation.budget.deliveredChars = 0;
678
+ assert.equal(snapshot.degradation?.budget?.deliveredChars, 20);
679
+ });
680
+
@@ -24,6 +24,7 @@ import { estimateTokenCount } from "./token-estimate.js";
24
24
  import type { RecallDisclosure, RecallTierExplain } from "./types.js";
25
25
  import type { StateLabel } from "./recall-state-view.js";
26
26
  import { isRecallDisclosure } from "./types.js";
27
+ import type { RecallContextDegradation } from "./recall-context-composition.js";
27
28
 
28
29
  /**
29
30
  * Estimate token cost of a payload for X-ray disclosure accounting.
@@ -282,6 +283,12 @@ export interface RecallXraySnapshot {
282
283
  * absent) means no peer profile was injected.
283
284
  */
284
285
  peerProfileInjection?: RecallXrayPeerProfileInjection | null;
286
+ /**
287
+ * Injected-context degradation (#2972). Absent on a healthy recall so
288
+ * the snapshot stays byte-stable. Budget warnings ride here, never
289
+ * in the injected text.
290
+ */
291
+ degradation?: RecallContextDegradation;
285
292
  }
286
293
 
287
294
  // ─── Builder ──────────────────────────────────────────────────────────────
@@ -300,6 +307,8 @@ export interface BuildXraySnapshotInput {
300
307
  traceId?: string;
301
308
  /** Peer-profile injection metadata (issue #679 completion). */
302
309
  peerProfileInjection?: RecallXrayPeerProfileInjection | null;
310
+ /** Injected-context degradation (#2972). Omit on a healthy recall. */
311
+ degradation?: RecallContextDegradation;
303
312
  /** Optional injected timestamp for deterministic tests. */
304
313
  now?: () => number;
305
314
  /** Optional injected id generator for deterministic tests. */
@@ -375,6 +384,12 @@ export function buildXraySnapshot(
375
384
  if (peerProfileInjection !== undefined) {
376
385
  out.peerProfileInjection = peerProfileInjection;
377
386
  }
387
+ if (input.degradation && typeof input.degradation === "object") {
388
+ out.degradation = { ...input.degradation };
389
+ if (input.degradation.budget) {
390
+ out.degradation.budget = { ...input.degradation.budget };
391
+ }
392
+ }
378
393
  return out;
379
394
  }
380
395
 
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Recognition-tier swap subject for the scenario-matrix harness (issue #2975).
3
+ *
4
+ * Every canonical row runs the real fetchQmdMemoryResultsWithRecognitionSwap
5
+ * seam twice: gate off (original fetch only, zero index I/O, zero recognizer
6
+ * calls) and gate on with an under-threshold index (one recognizer call, the
7
+ * namespace never reaches vector search). The scenario dimensions are
8
+ * orthogonal to this routing decision, so the same invariant holds per row.
9
+ */
10
+ import assert from "node:assert/strict";
11
+ import os from "node:os";
12
+ import path from "node:path";
13
+ import { mkdtemp, rm } from "node:fs/promises";
14
+
15
+ import {
16
+ fetchQmdMemoryResultsWithRecognitionSwap,
17
+ type RecognitionSearchDeps,
18
+ } from "../../orchestration/recall-recognition-search.js";
19
+ import { saveRecognitionIndex } from "../../recall-recognition-tier.js";
20
+ import type { QmdSearchResult } from "../../types.js";
21
+ import { type LifecycleSubject, type MatrixRow, runLifecycleMatrix } from "../lifecycle-matrix.js";
22
+ interface SwapState {
23
+ rowId: string;
24
+ dir: string;
25
+ deps: (enabled: boolean) => RecognitionSearchDeps;
26
+ fetchCalls: number;
27
+ recognizeCalls: number;
28
+ storageForCalls: number;
29
+ }
30
+
31
+ const subject: LifecycleSubject<SwapState> = {
32
+ async setup(row: MatrixRow): Promise<SwapState> {
33
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-recognition-subject-"));
34
+ await saveRecognitionIndex(dir, {
35
+ version: 1,
36
+ entries: [
37
+ { id: `m-${row.id}-a`, description: `trigger for ${row.id}-a` },
38
+ { id: `m-${row.id}-b`, description: `trigger for ${row.id}-b` },
39
+ ],
40
+ });
41
+ const state: SwapState = { rowId: String(row.id), dir, deps: undefined as never, fetchCalls: 0, recognizeCalls: 0, storageForCalls: 0 };
42
+ state.deps = (enabled) =>
43
+ ({
44
+ config: { recallRecognitionTier: enabled, recognitionIndexMaxEntries: 500 },
45
+ storageRouter: {
46
+ storageFor: async () => {
47
+ state.storageForCalls += 1;
48
+ return {
49
+ dir,
50
+ findExistingMemoryPaths: async (ids: string[]) =>
51
+ new Map(ids.map((id) => [id, [path.join(dir, `facts/${id}.md`)]])),
52
+ };
53
+ },
54
+ },
55
+ fastLlmForRerank: {
56
+ chatCompletion: async () => {
57
+ state.recognizeCalls += 1;
58
+ return { content: JSON.stringify([`m-${row.id}-a`, `m-${row.id}-b`]) };
59
+ },
60
+ },
61
+ fetchQmdMemoryResultsWithArtifactTopUp: async (): Promise<QmdSearchResult[]> => {
62
+ state.fetchCalls += 1;
63
+ return [{ docid: `default:vector.md`, namespace: "default", path: "vector.md", score: 1, snippet: "vector" }];
64
+ },
65
+ }) as unknown as RecognitionSearchDeps;
66
+ return state;
67
+ },
68
+
69
+ async exercise(state): Promise<void> {
70
+ const options = {
71
+ namespacesEnabled: true,
72
+ recallNamespaces: ["default"],
73
+ resolveNamespace: () => "default",
74
+ };
75
+
76
+ const off = await fetchQmdMemoryResultsWithRecognitionSwap(state.deps(false), "q", 5, 7, options);
77
+ assert.equal(off.length, 1);
78
+ assert.equal(state.fetchCalls, 1);
79
+ assert.equal(state.recognizeCalls, 0);
80
+ assert.equal(state.storageForCalls, 0);
81
+
82
+ const on = await fetchQmdMemoryResultsWithRecognitionSwap(state.deps(true), "q", 5, 7, options);
83
+ assert.equal(state.recognizeCalls, 1);
84
+ assert.equal(state.fetchCalls, 1, "recognition namespace must not reach vector fetch");
85
+ assert.deepEqual(on.map((r) => r.path).sort(), [`facts/m-${state.rowId}-a.md`, `facts/m-${state.rowId}-b.md`].sort());
86
+ },
87
+
88
+ async invariants(state): Promise<void> {
89
+ // Off-path again after the on-path run: still a pure passthrough.
90
+ const before = { fetch: state.fetchCalls, recognize: state.recognizeCalls, storage: state.storageForCalls };
91
+ await fetchQmdMemoryResultsWithRecognitionSwap(state.deps(false), "q", 5, 7, {
92
+ namespacesEnabled: true,
93
+ recallNamespaces: ["default"],
94
+ resolveNamespace: () => "default",
95
+ });
96
+ assert.equal(state.fetchCalls, before.fetch + 1);
97
+ assert.equal(state.recognizeCalls, before.recognize);
98
+ assert.equal(state.storageForCalls, before.storage);
99
+ },
100
+
101
+ async teardown(state): Promise<void> {
102
+ await rm(state.dir, { recursive: true, force: true });
103
+ },
104
+ };
105
+
106
+ runLifecycleMatrix("recall-recognition-tier", subject);
package/src/types.ts CHANGED
@@ -23,6 +23,7 @@ import type {
23
23
  import type { DeepRecallSettings } from "./deep-recall-config.js";
24
24
  import type { RecallNavigationSettings } from "./recall-navigation-config.js";
25
25
  import type { RecognitionTierSettings } from "./recall-recognition-tier.js";
26
+ import type { SeedGraduationSettings } from "./lifecycle/seed-graduation-config-types.js";
26
27
  import type { ProceduralMaintenanceConfig } from "./procedural/maintenance-config.js";
27
28
  import type { SkillProjectionConfig } from "./procedural/skill-projection.js";
28
29
  import type { SessionExperienceConfig } from "./experience/session-experience-config.js";
@@ -698,6 +699,7 @@ export interface PluginConfig
698
699
  DeepRecallSettings,
699
700
  RecallNavigationSettings,
700
701
  RecognitionTierSettings,
702
+ SeedGraduationSettings,
701
703
  LocalLlmConfig {
702
704
  openaiApiKey: string | undefined;
703
705
  openaiBaseUrl: string | undefined;
@@ -3877,12 +3879,8 @@ export interface HourlySummary {
3877
3879
  generatedAt: string;
3878
3880
  }
3879
3881
 
3880
- // ============================================================================
3881
- // Dreams Pipeline Telemetry (issue #678 PR 3/4)
3882
- // ============================================================================
3883
- // Re-export from the authoritative source to avoid duplicate definitions.
3884
- // dreams-ledger.ts is the single source of truth; types.ts re-exports so
3885
- // callers that import from types.js continue to work unchanged.
3882
+ // Dreams Pipeline Telemetry (issue #678 PR 3/4). Re-export from
3883
+ // dreams-ledger.ts so callers importing types.js stay unchanged.
3886
3884
  export type {
3887
3885
  DreamsPhase,
3888
3886
  DreamsPhaseStatus,