@remnic/core 9.54.7 → 9.55.0

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 (600) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -11
  2. package/dist/access-admin-ops-surface.js +64 -62
  3. package/dist/access-authorization-probe.d.ts +11 -11
  4. package/dist/access-authorization-probe.js +65 -63
  5. package/dist/access-boundary.d.ts +11 -11
  6. package/dist/access-boundary.js +64 -62
  7. package/dist/access-cli.js +141 -138
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +1 -1
  10. package/dist/access-extraction-force-flush.d.ts +11 -11
  11. package/dist/access-extraction-force-flush.js +64 -62
  12. package/dist/access-health-types.d.ts +1 -1
  13. package/dist/access-http-lcm-compaction.d.ts +11 -11
  14. package/dist/access-http-lifecycle-flush.d.ts +11 -11
  15. package/dist/access-http-offline-stream.d.ts +11 -11
  16. package/dist/access-http-query.js +64 -62
  17. package/dist/access-http.d.ts +12 -12
  18. package/dist/access-http.js +80 -78
  19. package/dist/access-identity-continuity-surface.d.ts +9 -9
  20. package/dist/access-identity-continuity-surface.js +64 -62
  21. package/dist/access-lcm-surface.d.ts +11 -11
  22. package/dist/access-lcm-surface.js +64 -62
  23. package/dist/access-mcp.d.ts +11 -11
  24. package/dist/access-mcp.js +73 -71
  25. package/dist/access-memory-search-fanout.d.ts +2 -2
  26. package/dist/access-memory-search-fanout.js +3 -3
  27. package/dist/{access-namespace-preflight-CCNn_6NE.d.ts → access-namespace-preflight-Bpt-SYP0.d.ts} +1 -1
  28. package/dist/access-namespace-preflight.d.ts +3 -3
  29. package/dist/access-namespace-preflight.js +64 -62
  30. package/dist/access-observe-write-surface.d.ts +11 -11
  31. package/dist/access-observe-write-surface.js +64 -62
  32. package/dist/access-offline-manifest.d.ts +9 -9
  33. package/dist/access-offline-manifest.js +9 -9
  34. package/dist/access-operations-batch.js +68 -66
  35. package/dist/access-operations.d.ts +14 -14
  36. package/dist/access-operations.js +72 -70
  37. package/dist/access-recall-concurrency.d.ts +11 -11
  38. package/dist/access-recall-concurrency.js +64 -62
  39. package/dist/access-recall-response.d.ts +11 -11
  40. package/dist/access-recall-response.js +64 -62
  41. package/dist/access-recall-surface.d.ts +11 -11
  42. package/dist/access-recall-surface.js +64 -62
  43. package/dist/access-schema.d.ts +88 -88
  44. package/dist/access-schema.js +4 -4
  45. package/dist/{access-service-DK82xdNi.d.ts → access-service-4DO8XMq6.d.ts} +71 -71
  46. package/dist/access-service-helpers.d.ts +11 -11
  47. package/dist/access-service.d.ts +11 -11
  48. package/dist/access-service.js +64 -62
  49. package/dist/access-surface-catalog.d.ts +11 -11
  50. package/dist/access-surface-catalog.js +66 -64
  51. package/dist/access-surface-catalog.js.map +1 -1
  52. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  53. package/dist/action-confidence.d.ts +1 -1
  54. package/dist/active-memory-bridge.d.ts +1 -1
  55. package/dist/active-memory-bridge.js +3 -3
  56. package/dist/active-recall.d.ts +1 -1
  57. package/dist/active-recall.js +4 -2
  58. package/dist/active-recall.js.map +1 -1
  59. package/dist/adapters/index.js +4 -4
  60. package/dist/adapters/registry.js +2 -2
  61. package/dist/ambient-provenance.d.ts +1 -1
  62. package/dist/artifact-search.d.ts +1 -1
  63. package/dist/{auto-sync-NR3GPCOA.js → auto-sync-5HVRCMGZ.js} +3 -3
  64. package/dist/behavior-learner.d.ts +1 -1
  65. package/dist/behavior-learner.js +1 -1
  66. package/dist/behavior-signals.d.ts +1 -1
  67. package/dist/bootstrap.d.ts +9 -9
  68. package/dist/briefing-window.d.ts +36 -0
  69. package/dist/briefing-window.js +9 -0
  70. package/dist/briefing.d.ts +2 -2
  71. package/dist/briefing.js +24 -22
  72. package/dist/buffer-surprise-report.d.ts +1 -1
  73. package/dist/buffer-turn-helpers.d.ts +1 -1
  74. package/dist/buffer.d.ts +2 -2
  75. package/dist/buffer.js +8 -7
  76. package/dist/bulk-import/index.d.ts +3 -3
  77. package/dist/calibration.d.ts +1 -1
  78. package/dist/capabilities.d.ts +8 -8
  79. package/dist/capabilities.js +1 -1
  80. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  81. package/dist/{catalog-DGFf8mD9.d.ts → catalog-BasnO3Bw.d.ts} +1 -1
  82. package/dist/causal-behavior.d.ts +1 -1
  83. package/dist/causal-behavior.js +2 -2
  84. package/dist/causal-chain.js +2 -2
  85. package/dist/causal-consolidation.d.ts +1 -1
  86. package/dist/causal-consolidation.js +26 -25
  87. package/dist/causal-consolidation.js.map +1 -1
  88. package/dist/causal-retrieval.js +2 -2
  89. package/dist/causal-trajectory-graph.d.ts +1 -1
  90. package/dist/causal-trajectory-graph.js +2 -2
  91. package/dist/causal-trajectory.js +1 -1
  92. package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
  93. package/dist/{chunk-I6WYQSX4.js → chunk-2NKY7OC6.js} +14 -2
  94. package/dist/chunk-2NKY7OC6.js.map +1 -0
  95. package/dist/{chunk-FTPONF6B.js → chunk-2YREVL4T.js} +2 -2
  96. package/dist/{chunk-PG4QBPVG.js → chunk-3VFVQDZO.js} +8 -4
  97. package/dist/chunk-3VFVQDZO.js.map +1 -0
  98. package/dist/{chunk-KM55SMLG.js → chunk-4KM3V6VS.js} +2 -2
  99. package/dist/{chunk-HAEU3ZW7.js → chunk-4OW2T32G.js} +2 -2
  100. package/dist/{chunk-43SEBY2M.js → chunk-4QFCAKNM.js} +1 -1
  101. package/dist/{chunk-RZQ6W2W4.js → chunk-4THNU7OF.js} +427 -52
  102. package/dist/chunk-4THNU7OF.js.map +1 -0
  103. package/dist/{chunk-76JJSXK7.js → chunk-5QHDXMXP.js} +1 -1
  104. package/dist/chunk-5QHDXMXP.js.map +1 -0
  105. package/dist/{chunk-KFBOPMF6.js → chunk-5ZIWRMZM.js} +5 -5
  106. package/dist/{chunk-GWFSVJ4P.js → chunk-6KTXE6A3.js} +2 -2
  107. package/dist/{chunk-FPLM2TKD.js → chunk-6P2NUVM5.js} +26 -24
  108. package/dist/chunk-6P2NUVM5.js.map +1 -0
  109. package/dist/chunk-6Q3ZTEF6.js +54 -0
  110. package/dist/chunk-6Q3ZTEF6.js.map +1 -0
  111. package/dist/{chunk-GJ776BC2.js → chunk-7NSC4IVA.js} +4 -3
  112. package/dist/{chunk-GJ776BC2.js.map → chunk-7NSC4IVA.js.map} +1 -1
  113. package/dist/{chunk-GN3WRFJY.js → chunk-7PKNOXYB.js} +14 -14
  114. package/dist/{chunk-AHVEHR6K.js → chunk-7ZNJN5WZ.js} +13 -1
  115. package/dist/chunk-7ZNJN5WZ.js.map +1 -0
  116. package/dist/{chunk-RZRUV6N2.js → chunk-ANMIOQPU.js} +2 -2
  117. package/dist/{chunk-RPSYDM6C.js → chunk-BPWZDHFM.js} +2 -2
  118. package/dist/{chunk-CIAI24TQ.js → chunk-BVRREV3N.js} +2 -2
  119. package/dist/{chunk-M4YHAODQ.js → chunk-BWJMBJCY.js} +306 -244
  120. package/dist/chunk-BWJMBJCY.js.map +1 -0
  121. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  122. package/dist/{chunk-I3MSGFGD.js → chunk-CKSEJD7K.js} +2 -2
  123. package/dist/{chunk-46SZBVDS.js → chunk-CME347TM.js} +2 -2
  124. package/dist/{chunk-BGLY7EEM.js → chunk-CMRUIKVA.js} +3 -3
  125. package/dist/{chunk-HGJ6NJ4E.js → chunk-D4LVHPOA.js} +2 -2
  126. package/dist/{chunk-YK6BDDHP.js → chunk-DFEODULB.js} +2 -2
  127. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  128. package/dist/{chunk-W6FNX2LP.js → chunk-E57E5SCS.js} +2 -2
  129. package/dist/{chunk-M23RF3LJ.js → chunk-ER4BLWI6.js} +2 -2
  130. package/dist/{chunk-QZLDRQ4I.js → chunk-F7M36OG2.js} +5 -5
  131. package/dist/{chunk-D3LBIUWV.js → chunk-FK7T55BA.js} +80 -61
  132. package/dist/{chunk-D3LBIUWV.js.map → chunk-FK7T55BA.js.map} +1 -1
  133. package/dist/{chunk-5FD7JMTX.js → chunk-FONW766A.js} +2 -2
  134. package/dist/{chunk-3TIZPSJC.js → chunk-FR3FNPCJ.js} +3 -3
  135. package/dist/{chunk-G6DFSS6A.js → chunk-GUNIXT36.js} +2 -2
  136. package/dist/{chunk-K2UGPTYY.js → chunk-H6ZXNH5I.js} +2 -2
  137. package/dist/{chunk-BRR5EUTF.js → chunk-HC55YCNK.js} +2 -2
  138. package/dist/{chunk-PT54WISF.js → chunk-HQ2VGCGP.js} +14 -14
  139. package/dist/{chunk-AHZOMHWN.js → chunk-HXXGZ4KV.js} +1 -1
  140. package/dist/{chunk-ZRZVLB7O.js → chunk-HYVBJLEK.js} +5 -5
  141. package/dist/{chunk-W5ZKPI34.js → chunk-IFFW25NG.js} +330 -202
  142. package/dist/chunk-IFFW25NG.js.map +1 -0
  143. package/dist/{chunk-3GD2HFR6.js → chunk-IGWVMA4Y.js} +2 -2
  144. package/dist/{chunk-FONWBCVY.js → chunk-IKT6ZVO7.js} +3 -3
  145. package/dist/{chunk-TO7ZTWJW.js → chunk-ION47U3Z.js} +3 -3
  146. package/dist/{chunk-OCIP6YMD.js → chunk-IXGQP4RZ.js} +3 -3
  147. package/dist/{chunk-UPLZNJKN.js → chunk-JFPZEWY3.js} +3 -3
  148. package/dist/{chunk-SMNYAMJD.js → chunk-JKL53MOY.js} +4 -4
  149. package/dist/{chunk-2FKEIPIT.js → chunk-JOA4Q765.js} +3 -3
  150. package/dist/{chunk-2XRE6FLM.js → chunk-JUOZ62Y7.js} +3 -1
  151. package/dist/chunk-JUOZ62Y7.js.map +1 -0
  152. package/dist/{chunk-MLPTFODV.js → chunk-KHQ57QLJ.js} +4 -4
  153. package/dist/{chunk-NSVDUN76.js → chunk-LCU5R6TQ.js} +8 -3
  154. package/dist/chunk-LCU5R6TQ.js.map +1 -0
  155. package/dist/{chunk-IQ4NVWEF.js → chunk-LYPG7GOO.js} +4 -4
  156. package/dist/{chunk-IQ4NVWEF.js.map → chunk-LYPG7GOO.js.map} +1 -1
  157. package/dist/{chunk-KRTY3ENI.js → chunk-MDVBCPOS.js} +2 -2
  158. package/dist/{chunk-UCTS3DDH.js → chunk-N655QIA2.js} +4 -4
  159. package/dist/{chunk-5NB726GV.js → chunk-NFQB6RJT.js} +3 -3
  160. package/dist/{chunk-UYYW2KPU.js → chunk-NP7FLVZW.js} +2 -2
  161. package/dist/{chunk-CX5SW2EW.js → chunk-NRFU5MVH.js} +4 -4
  162. package/dist/{chunk-NISZQW72.js → chunk-O4TTIMOP.js} +2 -2
  163. package/dist/{chunk-7BD6O7ZV.js → chunk-O54B5YNM.js} +3 -3
  164. package/dist/{chunk-UKYS3NU5.js → chunk-ONCWJBWV.js} +3 -3
  165. package/dist/{chunk-OUKBMQ2O.js → chunk-PD66CVSD.js} +2 -2
  166. package/dist/{chunk-QYN5PXDZ.js → chunk-PPUTUOC3.js} +2 -2
  167. package/dist/{chunk-MIH3CJPN.js → chunk-PSH3VFZ7.js} +4 -4
  168. package/dist/{chunk-MK5VEWCR.js → chunk-QKPDN325.js} +2 -2
  169. package/dist/{chunk-EVWWT3KE.js → chunk-QP2IZTUR.js} +2 -2
  170. package/dist/{chunk-K26NWEOC.js → chunk-QSDPVZPD.js} +5 -5
  171. package/dist/{chunk-S354QO4R.js → chunk-QV7OEHFN.js} +2 -2
  172. package/dist/{chunk-HBUFQRIM.js → chunk-QZR3WT3L.js} +2 -2
  173. package/dist/{chunk-EEAMSNSG.js → chunk-R7TZ2HCS.js} +2 -2
  174. package/dist/{chunk-YXQEKCZM.js → chunk-R7UHWPYI.js} +2 -2
  175. package/dist/{chunk-2QSZNTDO.js → chunk-RKNJBZ55.js} +4 -4
  176. package/dist/{chunk-L6Z5OAS4.js → chunk-RL3EGL7A.js} +2 -2
  177. package/dist/{chunk-QCECHYZL.js → chunk-RVO6TCTU.js} +6 -6
  178. package/dist/{chunk-JYG4OLWH.js → chunk-S6AH7WSF.js} +3 -3
  179. package/dist/{chunk-6CYHUWCO.js → chunk-SFCJCMZQ.js} +5 -5
  180. package/dist/{chunk-V6ERBR7U.js → chunk-T3HC7RJ7.js} +2 -2
  181. package/dist/chunk-T3JQTCCO.js +94 -0
  182. package/dist/chunk-T3JQTCCO.js.map +1 -0
  183. package/dist/{chunk-FFRTNF3L.js → chunk-T6EQPZ6E.js} +4 -4
  184. package/dist/{chunk-FWX7W5PM.js → chunk-TAMY4NKO.js} +2 -2
  185. package/dist/{chunk-7TBXNYLO.js → chunk-TAPFJ3ET.js} +2 -2
  186. package/dist/{chunk-RUNORG2P.js → chunk-TF3LMM5E.js} +6 -11
  187. package/dist/chunk-TF3LMM5E.js.map +1 -0
  188. package/dist/{chunk-ZUKIUXHQ.js → chunk-TFXYQNBH.js} +12 -12
  189. package/dist/{chunk-26ZXBTYN.js → chunk-THACANBI.js} +4 -4
  190. package/dist/{chunk-37DZZFFM.js → chunk-TLVLJSWS.js} +2 -2
  191. package/dist/{chunk-6QPI2ITJ.js → chunk-TVKWT2CY.js} +4 -4
  192. package/dist/{chunk-H7NAZ3UB.js → chunk-U7BMN33M.js} +2 -2
  193. package/dist/chunk-UBCBDJOB.js +22 -0
  194. package/dist/chunk-UBCBDJOB.js.map +1 -0
  195. package/dist/{chunk-XZHE2DEN.js → chunk-UTDMY476.js} +50 -6
  196. package/dist/chunk-UTDMY476.js.map +1 -0
  197. package/dist/{chunk-6LKEUCEM.js → chunk-UXREWVW4.js} +2 -2
  198. package/dist/{chunk-SUPEYLH2.js → chunk-UYCIS6V5.js} +2 -2
  199. package/dist/{chunk-EKTP7MNS.js → chunk-V3IT3XNG.js} +7 -7
  200. package/dist/{chunk-IPLYGWQF.js → chunk-VDX2J7OX.js} +6 -6
  201. package/dist/{chunk-IKP5OYQQ.js → chunk-VWP5DEHU.js} +2 -2
  202. package/dist/{chunk-NQMSEB5D.js → chunk-X5OIPQME.js} +2 -2
  203. package/dist/{chunk-RBII7637.js → chunk-XRPPHIRI.js} +2 -2
  204. package/dist/{chunk-BIJAWZYW.js → chunk-YMOPYG3K.js} +6 -6
  205. package/dist/{cli-BPDUXnAl.d.ts → cli-CQdYilcx.d.ts} +61 -11
  206. package/dist/cli.d.ts +18 -18
  207. package/dist/cli.js +107 -102
  208. package/dist/coding/pre-action-gate.d.ts +1 -1
  209. package/dist/coding/pre-action-gate.js +2 -2
  210. package/dist/compounding/engine.d.ts +2 -2
  211. package/dist/compounding/engine.js +25 -24
  212. package/dist/compounding/preference-consolidator.d.ts +1 -1
  213. package/dist/compression-optimizer.d.ts +1 -1
  214. package/dist/config-security.d.ts +7 -0
  215. package/dist/config-security.js +12 -0
  216. package/dist/config.d.ts +1 -1
  217. package/dist/config.js +4 -2
  218. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  219. package/dist/connectors/codex-materialize-runner.js +23 -22
  220. package/dist/connectors/codex-materialize.d.ts +1 -1
  221. package/dist/connectors/index.d.ts +1 -1
  222. package/dist/connectors/index.js +24 -23
  223. package/dist/consolidation-provenance-check.d.ts +2 -2
  224. package/dist/consolidation-undo.d.ts +2 -2
  225. package/dist/contradiction/index.d.ts +2 -2
  226. package/dist/contradiction/index.js +4 -4
  227. package/dist/{contradiction-scan-JDTBXRGW.js → contradiction-scan-522AYLQC.js} +3 -3
  228. package/dist/converge-config.d.ts +1 -1
  229. package/dist/convergence-refresh.d.ts +2 -2
  230. package/dist/convergence-refresh.js +25 -24
  231. package/dist/conversation-index/backend.d.ts +1 -1
  232. package/dist/conversation-index/backend.js +2 -2
  233. package/dist/conversation-index/chunker.d.ts +1 -1
  234. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  235. package/dist/conversation-index/indexer.d.ts +1 -1
  236. package/dist/conversation-index/search.d.ts +1 -1
  237. package/dist/corpus-watermark.d.ts +1 -1
  238. package/dist/corpus-watermark.js +25 -24
  239. package/dist/day-summary.d.ts +1 -1
  240. package/dist/day-summary.js +2 -2
  241. package/dist/delinearize.d.ts +1 -1
  242. package/dist/dependency-propagation-config.d.ts +1 -1
  243. package/dist/{dependency-propagation-delivery-CzEfB31P.d.ts → dependency-propagation-delivery-C_K_AHcv.d.ts} +1 -1
  244. package/dist/direct-answer-wiring.d.ts +1 -1
  245. package/dist/direct-answer.d.ts +1 -1
  246. package/dist/embedding-fallback.d.ts +1 -1
  247. package/dist/embedding-fallback.js +2 -2
  248. package/dist/enrichment/index.d.ts +1 -1
  249. package/dist/entity-retrieval.d.ts +4 -2
  250. package/dist/entity-retrieval.js +24 -22
  251. package/dist/entity-schema.d.ts +1 -1
  252. package/dist/explicit-capture.d.ts +9 -9
  253. package/dist/explicit-capture.js +6 -6
  254. package/dist/external-wiki-access.d.ts +11 -11
  255. package/dist/external-wiki-access.js +65 -63
  256. package/dist/external-wiki-collection-registration.d.ts +1 -1
  257. package/dist/external-wiki-collection.d.ts +1 -1
  258. package/dist/external-wiki-mcp-tools.d.ts +11 -11
  259. package/dist/extraction-error-classification.d.ts +1 -1
  260. package/dist/extraction-faithfulness.d.ts +1 -1
  261. package/dist/extraction-judge-telemetry.d.ts +1 -1
  262. package/dist/extraction-judge-training.d.ts +1 -1
  263. package/dist/extraction-judge.d.ts +1 -1
  264. package/dist/extraction-liveness.d.ts +1 -1
  265. package/dist/extraction-normalization.d.ts +1 -1
  266. package/dist/extraction-normalization.js +3 -3
  267. package/dist/extraction-prompt.d.ts +1 -1
  268. package/dist/extraction-prompt.js +2 -2
  269. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  270. package/dist/extraction-source-grounding.d.ts +1 -1
  271. package/dist/extraction.d.ts +1 -1
  272. package/dist/extraction.js +38 -37
  273. package/dist/fallback-llm.d.ts +1 -1
  274. package/dist/{first-start-migration-CRZCZAJN.js → first-start-migration-HZ4VPRFQ.js} +2 -2
  275. package/dist/{forget-EHGGJZLX.js → forget-5TWK7CZT.js} +3 -3
  276. package/dist/graph-dashboard-diff.d.ts +1 -1
  277. package/dist/graph-dashboard-key.d.ts +1 -1
  278. package/dist/graph-dashboard-parser.d.ts +1 -1
  279. package/dist/{graph-edge-decay-65KMOJWY.js → graph-edge-decay-ZXGBXNPW.js} +4 -4
  280. package/dist/graph-edge-decay-ZXGBXNPW.js.map +1 -0
  281. package/dist/graph-edge-reinforcement.d.ts +1 -1
  282. package/dist/graph-path-reconstruction.d.ts +1 -1
  283. package/dist/graph-path-scoring.d.ts +1 -1
  284. package/dist/graph-snapshot.d.ts +1 -1
  285. package/dist/graph-snapshot.js +3 -3
  286. package/dist/graph.d.ts +1 -1
  287. package/dist/graph.js +3 -3
  288. package/dist/harmonic-retrieval.js +1 -1
  289. package/dist/importance.d.ts +1 -1
  290. package/dist/importers/index.d.ts +1 -1
  291. package/dist/in-flight-reads.d.ts +1 -1
  292. package/dist/index.d.ts +755 -706
  293. package/dist/index.js +214 -188
  294. package/dist/intent.d.ts +1 -1
  295. package/dist/lcm/engine.d.ts +1 -1
  296. package/dist/lcm/index.d.ts +1 -1
  297. package/dist/lcm/index.js +3 -3
  298. package/dist/lcm/tools.d.ts +1 -1
  299. package/dist/lifecycle.d.ts +1 -1
  300. package/dist/live-connectors-runner.d.ts +1 -1
  301. package/dist/local-llm.d.ts +1 -1
  302. package/dist/local-llm.js +3 -3
  303. package/dist/local-model-endpoint.d.ts +1 -1
  304. package/dist/maintenance/memory-governance.d.ts +1 -1
  305. package/dist/maintenance/memory-governance.js +23 -22
  306. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  307. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +23 -22
  308. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  309. package/dist/maintenance/rebuild-memory-projection.js +24 -23
  310. package/dist/{maintenance-C8aRWfhq.d.ts → maintenance-DdP931i9.d.ts} +3 -3
  311. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  312. package/dist/memory-action-policy.d.ts +1 -1
  313. package/dist/memory-cache.d.ts +1 -1
  314. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  315. package/dist/memory-projection-store.d.ts +1 -1
  316. package/dist/memory-provenance.d.ts +1 -1
  317. package/dist/memory-snapshot.d.ts +1 -1
  318. package/dist/memory-worth-outcomes.d.ts +2 -2
  319. package/dist/models-json.d.ts +1 -1
  320. package/dist/namespaces/migrate.d.ts +3 -3
  321. package/dist/namespaces/migrate.js +24 -23
  322. package/dist/namespaces/principal.d.ts +1 -1
  323. package/dist/namespaces/principal.js +2 -2
  324. package/dist/namespaces/search.d.ts +1 -1
  325. package/dist/namespaces/search.js +8 -8
  326. package/dist/namespaces/storage.d.ts +3 -3
  327. package/dist/namespaces/storage.js +23 -22
  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 +5 -5
  331. package/dist/operator-doctor-corpus.d.ts +1 -1
  332. package/dist/operator-doctor-corpus.js +26 -25
  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 +38 -36
  336. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  337. package/dist/orchestration/compression-guideline-coordinator.js +2 -2
  338. package/dist/orchestration/maintenance.d.ts +4 -4
  339. package/dist/orchestration/maintenance.js +31 -30
  340. package/dist/{orchestrator-D85CzDDY.d.ts → orchestrator-DxUWX7gs.d.ts} +26 -20
  341. package/dist/orchestrator.d.ts +9 -9
  342. package/dist/orchestrator.js +171 -168
  343. package/dist/patterns-cli.d.ts +1 -1
  344. package/dist/{pipeline-DPcUifCO.d.ts → pipeline-BKUMU1vU.d.ts} +1 -1
  345. package/dist/policy-runtime.d.ts +1 -1
  346. package/dist/policy-runtime.js +1 -1
  347. package/dist/proactive-contention.d.ts +1 -1
  348. package/dist/provenance.d.ts +1 -1
  349. package/dist/{public-http-D3GBeII4.d.ts → public-http-Dw0bJhcC.d.ts} +1 -1
  350. package/dist/{qmd-dFCHp1r0.d.ts → qmd-DJP-GLFe.d.ts} +1 -1
  351. package/dist/qmd-preflight.d.ts +2 -2
  352. package/dist/qmd-recall-cache.d.ts +1 -1
  353. package/dist/qmd.d.ts +2 -2
  354. package/dist/qmd.js +4 -4
  355. package/dist/recall-concurrency-config.d.ts +1 -1
  356. package/dist/recall-context-composition.d.ts +11 -1
  357. package/dist/recall-context-composition.js +4 -1
  358. package/dist/recall-disclosure-escalation.d.ts +1 -1
  359. package/dist/recall-explain-renderer.d.ts +1 -1
  360. package/dist/recall-explain-renderer.js +3 -3
  361. package/dist/recall-memory-map.d.ts +1 -1
  362. package/dist/recall-planner-llm.d.ts +1 -1
  363. package/dist/recall-planner-llm.js +3 -3
  364. package/dist/recall-state.d.ts +1 -1
  365. package/dist/recall-tag-filter.d.ts +1 -1
  366. package/dist/recall-timings.d.ts +1 -1
  367. package/dist/recall-xray-cli.d.ts +1 -1
  368. package/dist/recall-xray-cli.js +4 -4
  369. package/dist/recall-xray-renderer.d.ts +1 -1
  370. package/dist/recall-xray-renderer.js +3 -3
  371. package/dist/recall-xray.d.ts +1 -1
  372. package/dist/recall-xray.js +2 -2
  373. package/dist/reconcile/cursor.d.ts +1 -1
  374. package/dist/reconcile/manifest.d.ts +1 -1
  375. package/dist/reconcile/manifest.js +3 -3
  376. package/dist/reconcile/plan.d.ts +1 -1
  377. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  378. package/dist/replay/normalizers/claude.d.ts +1 -1
  379. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  380. package/dist/replay/normalizers/shared.d.ts +1 -1
  381. package/dist/replay/runner.d.ts +1 -1
  382. package/dist/replay/types.d.ts +1 -1
  383. package/dist/replica-divergence.d.ts +1 -1
  384. package/dist/replica-peers-config.d.ts +1 -1
  385. package/dist/{resolution-MMOD5WC4.js → resolution-DKMBPXHI.js} +3 -3
  386. package/dist/resolution-DKMBPXHI.js.map +1 -0
  387. package/dist/resolve-auth-token.d.ts +1 -1
  388. package/dist/resume-bundles.js +5 -3
  389. package/dist/retrieval-agents.d.ts +2 -2
  390. package/dist/retrieval-tiers.d.ts +1 -1
  391. package/dist/routing/engine.d.ts +1 -1
  392. package/dist/routing/store.d.ts +1 -1
  393. package/dist/salvage-envelope.d.ts +1 -1
  394. package/dist/salvage-envelope.js +2 -2
  395. package/dist/schemas.d.ts +138 -138
  396. package/dist/{scope-profiles-DICK7GtN.d.ts → scope-profiles-CaKcnB-6.d.ts} +1 -1
  397. package/dist/search/embed-helper.d.ts +1 -1
  398. package/dist/search/embed-helper.js +2 -2
  399. package/dist/search/factory.d.ts +1 -1
  400. package/dist/search/factory.js +7 -7
  401. package/dist/search/index.d.ts +1 -1
  402. package/dist/search/index.js +7 -7
  403. package/dist/search/lancedb-backend.d.ts +1 -1
  404. package/dist/search/meilisearch-backend.d.ts +1 -1
  405. package/dist/search/noop-backend.d.ts +1 -1
  406. package/dist/search/orama-backend.d.ts +1 -1
  407. package/dist/search/port.d.ts +1 -1
  408. package/dist/search/remote-backend.d.ts +1 -1
  409. package/dist/{semantic-consolidation-BP7NAX0N.d.ts → semantic-consolidation-P0eMWqh-.d.ts} +1 -1
  410. package/dist/semantic-consolidation.d.ts +2 -2
  411. package/dist/semantic-consolidation.js +24 -23
  412. package/dist/semantic-rule-promotion.js +23 -22
  413. package/dist/semantic-rule-verifier.d.ts +1 -1
  414. package/dist/semantic-rule-verifier.js +23 -22
  415. package/dist/{service-DT-pJyda.d.ts → service-D5GQLxq_.d.ts} +2 -2
  416. package/dist/session-observer-bands.d.ts +1 -1
  417. package/dist/session-observer-state.d.ts +1 -1
  418. package/dist/shared-context/manager.d.ts +9 -9
  419. package/dist/shared-context/manager.js +2 -2
  420. package/dist/signal.d.ts +1 -1
  421. package/dist/source-agent-qualifier.d.ts +1 -1
  422. package/dist/source-agent-qualifier.js +31 -30
  423. package/dist/{storage-qOnaJ1Lw.d.ts → storage-DIyil2ll.d.ts} +18 -10
  424. package/dist/storage.d.ts +2 -2
  425. package/dist/storage.js +22 -21
  426. package/dist/summarizer.d.ts +1 -1
  427. package/dist/summarizer.js +4 -4
  428. package/dist/summary-snapshot.d.ts +1 -1
  429. package/dist/support-passport/index.d.ts +14 -14
  430. package/dist/support-passport/index.js +67 -65
  431. package/dist/temporal-supersession.d.ts +2 -2
  432. package/dist/temporal-timeline-recall.d.ts +3 -1
  433. package/dist/temporal-timeline-recall.js +3 -1
  434. package/dist/temporal-validity.d.ts +1 -1
  435. package/dist/threading.d.ts +1 -1
  436. package/dist/tier-migration.d.ts +2 -2
  437. package/dist/tier-routing.d.ts +1 -1
  438. package/dist/{tier-stats-EXYSKSVN.js → tier-stats-7E6OBUSD.js} +2 -2
  439. package/dist/topics.d.ts +1 -1
  440. package/dist/transcript.d.ts +1 -1
  441. package/dist/transfer/autodetect.js +1 -1
  442. package/dist/transfer/backup.js +2 -2
  443. package/dist/transfer/capsule-export.js +3 -3
  444. package/dist/transfer/capsule-import.js +2 -2
  445. package/dist/transfer/types.d.ts +66 -66
  446. package/dist/trust-score-stage.d.ts +1 -1
  447. package/dist/trust-score.d.ts +1 -1
  448. package/dist/{types-ed-SvS2t.d.ts → types-CbXieHKr.d.ts} +15 -3
  449. package/dist/types.d.ts +1 -1
  450. package/dist/types.js +1 -1
  451. package/dist/utility-runtime.d.ts +1 -1
  452. package/dist/verified-recall.js +23 -22
  453. package/dist/write-envelope.d.ts +5 -2
  454. package/dist/write-envelope.js +1 -1
  455. package/package.json +2 -2
  456. package/src/bitemporal-frontmatter.test.ts +20 -1
  457. package/src/briefing-window.ts +27 -0
  458. package/src/briefing.test.ts +29 -0
  459. package/src/briefing.ts +2 -9
  460. package/src/capabilities.test.ts +2 -0
  461. package/src/capabilities.ts +17 -17
  462. package/src/cli.ts +14 -0
  463. package/src/config-security.ts +131 -0
  464. package/src/config.test.ts +61 -0
  465. package/src/config.ts +2 -1
  466. package/src/entity-retrieval.ts +31 -24
  467. package/src/index.ts +4 -6
  468. package/src/maintenance/memory-governance.ts +1 -0
  469. package/src/orchestration/conversation-index-coordinator.ts +13 -2
  470. package/src/orchestration/extraction-injection-gate.ts +154 -0
  471. package/src/orchestration/extraction-origin-context.ts +90 -0
  472. package/src/orchestration/extraction-persist.ts +66 -64
  473. package/src/orchestration/extraction-run.ts +4 -2
  474. package/src/orchestration/extraction-security.test.ts +271 -0
  475. package/src/orchestration/graph-recall-coordinator.ts +2 -0
  476. package/src/orchestration/namespace-read-fanout.ts +1 -0
  477. package/src/orchestration/qmd-result-resolver.ts +1 -0
  478. package/src/orchestration/recall-internal.ts +17 -11
  479. package/src/orchestration/recall-result-formatter.ts +35 -6
  480. package/src/orchestration/recall-search-pipeline.ts +3 -5
  481. package/src/orchestration/recall-search-prefilter.ts +1 -0
  482. package/src/orchestrator.ts +2 -1
  483. package/src/procedural/procedure-recall.ts +11 -1
  484. package/src/recall-authority-fence.test.ts +180 -0
  485. package/src/recall-context-composition.ts +28 -0
  486. package/src/security/audit-memory-cli.ts +42 -0
  487. package/src/security/audit-memory.test.ts +252 -0
  488. package/src/security/audit-memory.ts +318 -0
  489. package/src/security/injection-screen.test.ts +77 -0
  490. package/src/security/injection-screen.ts +158 -0
  491. package/src/security/origin-authority.test.ts +61 -0
  492. package/src/security/origin-authority.ts +88 -0
  493. package/src/security/types.ts +14 -0
  494. package/src/semantic-rule-promotion.ts +1 -1
  495. package/src/storage/memory-read-store.ts +1 -0
  496. package/src/storage/windowed-memory-read.ts +109 -0
  497. package/src/storage.ts +17 -15
  498. package/src/temporal-timeline-recall.test.ts +18 -0
  499. package/src/temporal-timeline-recall.ts +12 -1
  500. package/src/testing/subjects/windowed-memory-read.test.ts +146 -0
  501. package/src/types.ts +4 -4
  502. package/src/write-envelope.test.ts +1 -0
  503. package/src/write-envelope.ts +9 -0
  504. package/dist/chunk-2XRE6FLM.js.map +0 -1
  505. package/dist/chunk-76JJSXK7.js.map +0 -1
  506. package/dist/chunk-AHVEHR6K.js.map +0 -1
  507. package/dist/chunk-FPLM2TKD.js.map +0 -1
  508. package/dist/chunk-I6WYQSX4.js.map +0 -1
  509. package/dist/chunk-M4YHAODQ.js.map +0 -1
  510. package/dist/chunk-NSVDUN76.js.map +0 -1
  511. package/dist/chunk-PG4QBPVG.js.map +0 -1
  512. package/dist/chunk-RUNORG2P.js.map +0 -1
  513. package/dist/chunk-RZQ6W2W4.js.map +0 -1
  514. package/dist/chunk-W5ZKPI34.js.map +0 -1
  515. package/dist/chunk-XZHE2DEN.js.map +0 -1
  516. /package/dist/{auto-sync-NR3GPCOA.js.map → auto-sync-5HVRCMGZ.js.map} +0 -0
  517. /package/dist/{capsule-crypto-7FJQINUR.js.map → briefing-window.js.map} +0 -0
  518. /package/dist/{contradiction-scan-JDTBXRGW.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  519. /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
  520. /package/dist/{chunk-FTPONF6B.js.map → chunk-2YREVL4T.js.map} +0 -0
  521. /package/dist/{chunk-KM55SMLG.js.map → chunk-4KM3V6VS.js.map} +0 -0
  522. /package/dist/{chunk-HAEU3ZW7.js.map → chunk-4OW2T32G.js.map} +0 -0
  523. /package/dist/{chunk-43SEBY2M.js.map → chunk-4QFCAKNM.js.map} +0 -0
  524. /package/dist/{chunk-KFBOPMF6.js.map → chunk-5ZIWRMZM.js.map} +0 -0
  525. /package/dist/{chunk-GWFSVJ4P.js.map → chunk-6KTXE6A3.js.map} +0 -0
  526. /package/dist/{chunk-GN3WRFJY.js.map → chunk-7PKNOXYB.js.map} +0 -0
  527. /package/dist/{chunk-RZRUV6N2.js.map → chunk-ANMIOQPU.js.map} +0 -0
  528. /package/dist/{chunk-RPSYDM6C.js.map → chunk-BPWZDHFM.js.map} +0 -0
  529. /package/dist/{chunk-CIAI24TQ.js.map → chunk-BVRREV3N.js.map} +0 -0
  530. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  531. /package/dist/{chunk-I3MSGFGD.js.map → chunk-CKSEJD7K.js.map} +0 -0
  532. /package/dist/{chunk-46SZBVDS.js.map → chunk-CME347TM.js.map} +0 -0
  533. /package/dist/{chunk-BGLY7EEM.js.map → chunk-CMRUIKVA.js.map} +0 -0
  534. /package/dist/{chunk-HGJ6NJ4E.js.map → chunk-D4LVHPOA.js.map} +0 -0
  535. /package/dist/{chunk-YK6BDDHP.js.map → chunk-DFEODULB.js.map} +0 -0
  536. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  537. /package/dist/{chunk-W6FNX2LP.js.map → chunk-E57E5SCS.js.map} +0 -0
  538. /package/dist/{chunk-M23RF3LJ.js.map → chunk-ER4BLWI6.js.map} +0 -0
  539. /package/dist/{chunk-QZLDRQ4I.js.map → chunk-F7M36OG2.js.map} +0 -0
  540. /package/dist/{chunk-5FD7JMTX.js.map → chunk-FONW766A.js.map} +0 -0
  541. /package/dist/{chunk-3TIZPSJC.js.map → chunk-FR3FNPCJ.js.map} +0 -0
  542. /package/dist/{chunk-G6DFSS6A.js.map → chunk-GUNIXT36.js.map} +0 -0
  543. /package/dist/{chunk-K2UGPTYY.js.map → chunk-H6ZXNH5I.js.map} +0 -0
  544. /package/dist/{chunk-BRR5EUTF.js.map → chunk-HC55YCNK.js.map} +0 -0
  545. /package/dist/{chunk-PT54WISF.js.map → chunk-HQ2VGCGP.js.map} +0 -0
  546. /package/dist/{chunk-AHZOMHWN.js.map → chunk-HXXGZ4KV.js.map} +0 -0
  547. /package/dist/{chunk-ZRZVLB7O.js.map → chunk-HYVBJLEK.js.map} +0 -0
  548. /package/dist/{chunk-3GD2HFR6.js.map → chunk-IGWVMA4Y.js.map} +0 -0
  549. /package/dist/{chunk-FONWBCVY.js.map → chunk-IKT6ZVO7.js.map} +0 -0
  550. /package/dist/{chunk-TO7ZTWJW.js.map → chunk-ION47U3Z.js.map} +0 -0
  551. /package/dist/{chunk-OCIP6YMD.js.map → chunk-IXGQP4RZ.js.map} +0 -0
  552. /package/dist/{chunk-UPLZNJKN.js.map → chunk-JFPZEWY3.js.map} +0 -0
  553. /package/dist/{chunk-SMNYAMJD.js.map → chunk-JKL53MOY.js.map} +0 -0
  554. /package/dist/{chunk-2FKEIPIT.js.map → chunk-JOA4Q765.js.map} +0 -0
  555. /package/dist/{chunk-MLPTFODV.js.map → chunk-KHQ57QLJ.js.map} +0 -0
  556. /package/dist/{chunk-KRTY3ENI.js.map → chunk-MDVBCPOS.js.map} +0 -0
  557. /package/dist/{chunk-UCTS3DDH.js.map → chunk-N655QIA2.js.map} +0 -0
  558. /package/dist/{chunk-5NB726GV.js.map → chunk-NFQB6RJT.js.map} +0 -0
  559. /package/dist/{chunk-UYYW2KPU.js.map → chunk-NP7FLVZW.js.map} +0 -0
  560. /package/dist/{chunk-CX5SW2EW.js.map → chunk-NRFU5MVH.js.map} +0 -0
  561. /package/dist/{chunk-NISZQW72.js.map → chunk-O4TTIMOP.js.map} +0 -0
  562. /package/dist/{chunk-7BD6O7ZV.js.map → chunk-O54B5YNM.js.map} +0 -0
  563. /package/dist/{chunk-UKYS3NU5.js.map → chunk-ONCWJBWV.js.map} +0 -0
  564. /package/dist/{chunk-OUKBMQ2O.js.map → chunk-PD66CVSD.js.map} +0 -0
  565. /package/dist/{chunk-QYN5PXDZ.js.map → chunk-PPUTUOC3.js.map} +0 -0
  566. /package/dist/{chunk-MIH3CJPN.js.map → chunk-PSH3VFZ7.js.map} +0 -0
  567. /package/dist/{chunk-MK5VEWCR.js.map → chunk-QKPDN325.js.map} +0 -0
  568. /package/dist/{chunk-EVWWT3KE.js.map → chunk-QP2IZTUR.js.map} +0 -0
  569. /package/dist/{chunk-K26NWEOC.js.map → chunk-QSDPVZPD.js.map} +0 -0
  570. /package/dist/{chunk-S354QO4R.js.map → chunk-QV7OEHFN.js.map} +0 -0
  571. /package/dist/{chunk-HBUFQRIM.js.map → chunk-QZR3WT3L.js.map} +0 -0
  572. /package/dist/{chunk-EEAMSNSG.js.map → chunk-R7TZ2HCS.js.map} +0 -0
  573. /package/dist/{chunk-YXQEKCZM.js.map → chunk-R7UHWPYI.js.map} +0 -0
  574. /package/dist/{chunk-2QSZNTDO.js.map → chunk-RKNJBZ55.js.map} +0 -0
  575. /package/dist/{chunk-L6Z5OAS4.js.map → chunk-RL3EGL7A.js.map} +0 -0
  576. /package/dist/{chunk-QCECHYZL.js.map → chunk-RVO6TCTU.js.map} +0 -0
  577. /package/dist/{chunk-JYG4OLWH.js.map → chunk-S6AH7WSF.js.map} +0 -0
  578. /package/dist/{chunk-6CYHUWCO.js.map → chunk-SFCJCMZQ.js.map} +0 -0
  579. /package/dist/{chunk-V6ERBR7U.js.map → chunk-T3HC7RJ7.js.map} +0 -0
  580. /package/dist/{chunk-FFRTNF3L.js.map → chunk-T6EQPZ6E.js.map} +0 -0
  581. /package/dist/{chunk-FWX7W5PM.js.map → chunk-TAMY4NKO.js.map} +0 -0
  582. /package/dist/{chunk-7TBXNYLO.js.map → chunk-TAPFJ3ET.js.map} +0 -0
  583. /package/dist/{chunk-ZUKIUXHQ.js.map → chunk-TFXYQNBH.js.map} +0 -0
  584. /package/dist/{chunk-26ZXBTYN.js.map → chunk-THACANBI.js.map} +0 -0
  585. /package/dist/{chunk-37DZZFFM.js.map → chunk-TLVLJSWS.js.map} +0 -0
  586. /package/dist/{chunk-6QPI2ITJ.js.map → chunk-TVKWT2CY.js.map} +0 -0
  587. /package/dist/{chunk-H7NAZ3UB.js.map → chunk-U7BMN33M.js.map} +0 -0
  588. /package/dist/{chunk-6LKEUCEM.js.map → chunk-UXREWVW4.js.map} +0 -0
  589. /package/dist/{chunk-SUPEYLH2.js.map → chunk-UYCIS6V5.js.map} +0 -0
  590. /package/dist/{chunk-EKTP7MNS.js.map → chunk-V3IT3XNG.js.map} +0 -0
  591. /package/dist/{chunk-IPLYGWQF.js.map → chunk-VDX2J7OX.js.map} +0 -0
  592. /package/dist/{chunk-IKP5OYQQ.js.map → chunk-VWP5DEHU.js.map} +0 -0
  593. /package/dist/{chunk-NQMSEB5D.js.map → chunk-X5OIPQME.js.map} +0 -0
  594. /package/dist/{chunk-RBII7637.js.map → chunk-XRPPHIRI.js.map} +0 -0
  595. /package/dist/{chunk-BIJAWZYW.js.map → chunk-YMOPYG3K.js.map} +0 -0
  596. /package/dist/{graph-edge-decay-65KMOJWY.js.map → config-security.js.map} +0 -0
  597. /package/dist/{resolution-MMOD5WC4.js.map → contradiction-scan-522AYLQC.js.map} +0 -0
  598. /package/dist/{first-start-migration-CRZCZAJN.js.map → first-start-migration-HZ4VPRFQ.js.map} +0 -0
  599. /package/dist/{forget-EHGGJZLX.js.map → forget-5TWK7CZT.js.map} +0 -0
  600. /package/dist/{tier-stats-EXYSKSVN.js.map → tier-stats-7E6OBUSD.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-U3PN77QT.js";
4
4
  import {
5
5
  resolveNamespaceCapabilities
6
- } from "./chunk-2XRE6FLM.js";
6
+ } from "./chunk-JUOZ62Y7.js";
7
7
 
8
8
  // src/namespaces/principal.ts
9
9
  var MAX_REGEX_SESSION_KEY_LENGTH = 512;
@@ -111,4 +111,4 @@ export {
111
111
  recallNamespacesForPrincipal,
112
112
  citationAuthorizedNamespaces
113
113
  };
114
- //# sourceMappingURL=chunk-3GD2HFR6.js.map
114
+ //# sourceMappingURL=chunk-IGWVMA4Y.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  parseXrayFormat
3
- } from "./chunk-H7NAZ3UB.js";
3
+ } from "./chunk-U7BMN33M.js";
4
4
  import {
5
5
  RECALL_DISCLOSURE_LEVELS,
6
6
  isRecallDisclosure
7
- } from "./chunk-76JJSXK7.js";
7
+ } from "./chunk-5QHDXMXP.js";
8
8
 
9
9
  // src/recall-xray-cli.ts
10
10
  function parseXrayDisclosureFlag(value) {
@@ -50,4 +50,4 @@ export {
50
50
  parseXrayBudgetFlag,
51
51
  parseXrayCliOptions
52
52
  };
53
- //# sourceMappingURL=chunk-FONWBCVY.js.map
53
+ //# sourceMappingURL=chunk-IKT6ZVO7.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-QZLDRQ4I.js";
3
+ } from "./chunk-F7M36OG2.js";
4
4
  import {
5
5
  namespaceIdentityToken,
6
6
  normalizeNamespaceIdentity
7
7
  } from "./chunk-EGGE52UU.js";
8
8
  import {
9
9
  resolveNamespaceCapabilities
10
- } from "./chunk-2XRE6FLM.js";
10
+ } from "./chunk-JUOZ62Y7.js";
11
11
  import {
12
12
  ALL_CATEGORY_DIRS
13
13
  } from "./chunk-VS2IYZRU.js";
@@ -470,4 +470,4 @@ export {
470
470
  NamespaceSearchRouter,
471
471
  normalizeQmdResultPath
472
472
  };
473
- //# sourceMappingURL=chunk-TO7ZTWJW.js.map
473
+ //# sourceMappingURL=chunk-ION47U3Z.js.map
@@ -2,10 +2,10 @@ import {
2
2
  RECONCILE_MANIFEST_FORMAT,
3
3
  RECONCILE_MANIFEST_SCHEMA_VERSION,
4
4
  buildReconcileManifestFile
5
- } from "./chunk-RBII7637.js";
5
+ } from "./chunk-XRPPHIRI.js";
6
6
  import {
7
7
  offlineSyncStorageForSnapshot
8
- } from "./chunk-NQMSEB5D.js";
8
+ } from "./chunk-X5OIPQME.js";
9
9
  import {
10
10
  isSupportPassportPrivateMemory
11
11
  } from "./chunk-XX4HPFFM.js";
@@ -49,4 +49,4 @@ async function createOfflineSyncManifestStream(orchestrator, namespace, userExcl
49
49
  export {
50
50
  createOfflineSyncManifestStream
51
51
  };
52
- //# sourceMappingURL=chunk-OCIP6YMD.js.map
52
+ //# sourceMappingURL=chunk-IXGQP4RZ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-M4YHAODQ.js";
3
+ } from "./chunk-BWJMBJCY.js";
4
4
  import {
5
5
  keyring_exports,
6
6
  secureStoreDir
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  resolveNamespaceCapabilities,
20
20
  resolveRecallAuxiliaryCapabilities
21
- } from "./chunk-2XRE6FLM.js";
21
+ } from "./chunk-JUOZ62Y7.js";
22
22
  import {
23
23
  ALL_CATEGORY_DIRS
24
24
  } from "./chunk-VS2IYZRU.js";
@@ -388,4 +388,4 @@ export {
388
388
  resolveNamespaceStorageRoot,
389
389
  NamespaceStorageRouter
390
390
  };
391
- //# sourceMappingURL=chunk-UPLZNJKN.js.map
391
+ //# sourceMappingURL=chunk-JFPZEWY3.js.map
@@ -2,11 +2,11 @@ import {
2
2
  buildExplicitCaptureDedupKey,
3
3
  isTombstoneBlockedCaptureWriteLockBusy,
4
4
  normalizeExplicitCaptureContent
5
- } from "./chunk-K2UGPTYY.js";
5
+ } from "./chunk-H6ZXNH5I.js";
6
6
  import {
7
7
  TAG_LIMITS,
8
8
  composeMemoryEnvelope
9
- } from "./chunk-NSVDUN76.js";
9
+ } from "./chunk-LCU5R6TQ.js";
10
10
  import {
11
11
  isSupportPassportPrivateMemory
12
12
  } from "./chunk-XX4HPFFM.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-U3PN77QT.js";
19
19
  import {
20
20
  resolveNamespaceCapabilities
21
- } from "./chunk-2XRE6FLM.js";
21
+ } from "./chunk-JUOZ62Y7.js";
22
22
  import {
23
23
  log
24
24
  } from "./chunk-3WCASNQZ.js";
@@ -787,4 +787,4 @@ export {
787
787
  shouldProcessInlineExplicitCapture,
788
788
  InlineExplicitCaptureProcessor
789
789
  };
790
- //# sourceMappingURL=chunk-SMNYAMJD.js.map
790
+ //# sourceMappingURL=chunk-JKL53MOY.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-S4DDLTPX.js";
12
12
  import {
13
13
  LocalLlmClient
14
- } from "./chunk-KFBOPMF6.js";
14
+ } from "./chunk-5ZIWRMZM.js";
15
15
  import {
16
16
  FallbackLlmClient,
17
17
  fallbackLlmRuntimeContextFromConfig,
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  resolveLocalLlmCapabilities,
25
25
  resolvePipelineProcessingCapabilities
26
- } from "./chunk-2XRE6FLM.js";
26
+ } from "./chunk-JUOZ62Y7.js";
27
27
  import {
28
28
  encodeStoragePathSegment,
29
29
  resolveSafeStoragePath
@@ -690,4 +690,4 @@ ${truncatedConversation}`;
690
690
  export {
691
691
  HourlySummarizer
692
692
  };
693
- //# sourceMappingURL=chunk-2FKEIPIT.js.map
693
+ //# sourceMappingURL=chunk-JOA4Q765.js.map
@@ -109,6 +109,8 @@ function resolveSecurityCapabilities(config) {
109
109
  trustZones: config.trustZonesEnabled,
110
110
  quarantinePromotion: config.quarantinePromotionEnabled,
111
111
  memoryPoisoningDefense: config.memoryPoisoningDefenseEnabled,
112
+ originAuthority: config.originAuthorityEnabled,
113
+ injectionScreen: config.injectionScreenEnabled,
112
114
  trustZoneRecall: config.trustZoneRecallEnabled
113
115
  });
114
116
  }
@@ -274,4 +276,4 @@ export {
274
276
  resolvePipelineProcessingCapabilities,
275
277
  resolveConversationContextCapabilities
276
278
  };
277
- //# sourceMappingURL=chunk-2XRE6FLM.js.map
279
+ //# sourceMappingURL=chunk-JUOZ62Y7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/capabilities.ts"],"sourcesContent":["/**\n * CapabilitySet — recall-operation feature gates resolved once, then threaded.\n *\n * Issue #1523 (Phase 1 of epic #1520). Root cause this addresses: 161+\n * scattered `config.<flag>Enabled` reads mean each gate is re-derived at every\n * call site, and reviews keep finding parallel code paths where one branch\n * checks a gate the other forgot (CLAUDE.md rule 39 — the \"gate divergence\"\n * defect class). The fix is to resolve a frozen capability projection ONCE at\n * the top of the recall operation and pass it down explicitly.\n *\n * Scope of THIS module (first migration PR): only the recall-operation-scoped\n * flags below. Flags that are also read in graph construction, writes, CLI, or\n * the summarizer are deliberately deferred to a follow-up so we never leave a\n * single flag half-migrated (some sites on `caps.`, some on `config.`).\n *\n * Field naming: each field is the config flag name with the trailing `Enabled`\n * removed (`recallMmrEnabled` → `recallMmr`).\n *\n * This is plumbing, not a feature — there is deliberately NO `enabled` gate for\n * the CapabilitySet itself (rule 30 governs behavior changes; resolving and\n * threading a capability projection must stay behavior-preserving).\n *\n * Flag-retirement audit (#1780, 2026-07-08): all projected fields across 18\n * capability sets were verified for live consumers. Two dead projections found\n * and removed: recallGraph (RecallEnhancementCapabilitySet — production reads\n * recallGraphEnabled directly via graph-recall.ts) and behaviorLoopAutoTune\n * (ConversationContextCapabilitySet — production reads behaviorLoopAutoTuneEnabled\n * directly via cli.ts). The flags themselves remain alive.\n */\n\nimport type { PluginConfig } from \"./types.js\";\n\n/**\n * Frozen projection of recall-operation feature gates.\n *\n * Every field is `readonly boolean`. The composition that maps a config flag to\n * a capability (including default-when-undefined semantics for optional flags)\n * lives ONLY in {@link resolveCapabilities} — call sites must read the\n * capability, never re-derive it from raw config.\n */\nexport interface CapabilitySet {\n /** `rerankCacheEnabled` — cache reranker scores across recall passes. */\n readonly rerankCache: boolean;\n /** `recallDirectAnswerEnabled` — observation-mode direct-answer tier. */\n readonly recallDirectAnswer: boolean;\n /** `recallMemoryWorthFilterEnabled` — Memory-Worth score reweighting. */\n readonly recallMemoryWorthFilter: boolean;\n /** `trustScoreEnabled` — unified TrustScore recall stage (issue #1577). */\n readonly recallTrustScore: boolean;\n /** `recallMmrEnabled` — maximal-marginal-relevance diversification. */\n readonly recallMmr: boolean;\n /** `recallReasoningTraceBoostEnabled` — boost reasoning-trace memories. */\n readonly recallReasoningTraceBoost: boolean;\n /** `recallPlannerLlmEnabled` — LLM-backed recall-mode planner. */\n readonly recallPlannerLlm: boolean;\n /** `recallPlannerEnabled` — recall-mode planner (heuristic + optional LLM). */\n readonly recallPlanner: boolean;\n /** `recallConfidenceGateEnabled` — Synapse-style confidence gate. */\n readonly recallConfidenceGate: boolean;\n /** `graphRecallEnabled` — graph-mode recall tier (gates planner graph mode). */\n readonly graphRecall: boolean;\n /** `graphAssistInFullModeEnabled` — graph-assist overlay in full mode. */\n readonly graphAssistInFullMode: boolean;\n /** `graphExpandedIntentEnabled` — promote broad-intent asks to graph mode. */\n readonly graphExpandedIntent: boolean;\n // --- Issue #1566 Cluster C: mixed-operation flags (recall + summarizer/CLI/writes) ---\n /** `rerankEnabled` — optional LLM reranking of recall candidates. */\n readonly rerank: boolean;\n /** `harmonicRetrievalEnabled` — abstraction-node harmonic retrieval tier. */\n readonly harmonicRetrieval: boolean;\n /** `parallelRetrievalEnabled` — three-agent parallel retrieval (DirectFact + Contextual + Temporal). */\n readonly parallelRetrieval: boolean;\n}\n\n/**\n * Resolve the recall-operation {@link CapabilitySet} from parsed config.\n *\n * Call this ONCE per recall operation (at the `recall()` / `recallInternal`\n * entry) and thread the result down. Composition lives here and only here.\n *\n * Session toggles are intentionally not a parameter yet: `session-toggles.ts`\n * is agent-scoped (per session/agent enable-disable of the whole plugin), not\n * flag-scoped — none of the flags projected here have a per-session override,\n * so there is nothing for a toggle argument to compose at this layer.\n */\nexport function resolveCapabilities(config: PluginConfig): CapabilitySet {\n return Object.freeze({\n rerankCache: config.rerankCacheEnabled,\n recallDirectAnswer: config.recallDirectAnswerEnabled,\n recallMemoryWorthFilter: config.recallMemoryWorthFilterEnabled,\n // Issue #1577: TrustScore subsumes the Memory Worth multiplier when on;\n // the orchestrator runs exactly one of the two (mutual exclusion, rule 39).\n recallTrustScore: config.trustScoreEnabled === true,\n recallMmr: config.recallMmrEnabled,\n recallReasoningTraceBoost: config.recallReasoningTraceBoostEnabled,\n recallPlannerLlm: config.recallPlannerLlmEnabled,\n recallPlanner: config.recallPlannerEnabled,\n recallConfidenceGate: config.recallConfidenceGateEnabled,\n graphRecall: config.graphRecallEnabled,\n // Optional flags: preserve the exact default-when-undefined semantics the\n // migrated call sites used (`!== false` = default-on, `=== true` = default-off).\n graphAssistInFullMode: config.graphAssistInFullModeEnabled !== false,\n graphExpandedIntent: config.graphExpandedIntentEnabled === true,\n // Issue #1566 Cluster C: mixed-operation flags resolved once per recall op.\n rerank: config.rerankEnabled,\n harmonicRetrieval: config.harmonicRetrievalEnabled,\n parallelRetrieval: config.parallelRetrievalEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Graph-construction capability set (issue #1566 Cluster A).\n//\n// The recall CapabilitySet above covers flags whose EVERY read site lives on\n// the recall call chain. The five flags below are read on graph-construction,\n// write/extraction, AND recall paths — so they cannot join the recall set\n// without leaving some sites on `caps.` and others on `config.` (the exact\n// divergence #1523 forbade). They get their own projection, resolved at graph\n// build/write entry (and alongside `caps` when recall reads them).\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of graph-construction feature gates.\n *\n * Every field is `readonly boolean`. Composition (including default-when-\n * undefined semantics for the optional `graphWriteSessionAdjacencyEnabled`)\n * lives ONLY in {@link resolveGraphConstructionCapabilities}.\n */\nexport interface GraphConstructionCapabilitySet {\n /** `entityGraphEnabled` — maintain entity co-reference graph edges. */\n readonly entityGraph: boolean;\n /** `timeGraphEnabled` — maintain thread-adjacency graph edges. */\n readonly timeGraph: boolean;\n /** `causalGraphEnabled` — maintain causal-language graph edges. */\n readonly causalGraph: boolean;\n /** `multiGraphMemoryEnabled` — master switch for multi-graph writes/traversal. */\n readonly multiGraphMemory: boolean;\n /** `graphWriteSessionAdjacencyEnabled` — session-adjacency fallback for time edges (default-on). */\n readonly graphWriteSessionAdjacency: boolean;\n}\n\n/**\n * Resolve the {@link GraphConstructionCapabilitySet} from parsed config.\n *\n * Call this ONCE at graph build/write entry (extraction, recall graph\n * expansion, graph-health/repair) and thread the result down — exactly the\n * pattern {@link resolveCapabilities} established for recall.\n */\nexport type GraphConstructionConfigProjection = Pick<\n PluginConfig,\n | \"entityGraphEnabled\"\n | \"timeGraphEnabled\"\n | \"causalGraphEnabled\"\n | \"multiGraphMemoryEnabled\"\n | \"graphWriteSessionAdjacencyEnabled\"\n>;\n\nexport function resolveGraphConstructionCapabilities(\n config: GraphConstructionConfigProjection,\n): GraphConstructionCapabilitySet {\n return Object.freeze({\n entityGraph: config.entityGraphEnabled,\n timeGraph: config.timeGraphEnabled,\n causalGraph: config.causalGraphEnabled,\n multiGraphMemory: config.multiGraphMemoryEnabled,\n // Optional flag: preserve the exact default-when-undefined semantics the\n // migrated call site used (`!== false` = default-on).\n graphWriteSessionAdjacency: config.graphWriteSessionAdjacencyEnabled !== false,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Access-setup capability set (issue #1566 Cluster B).\n//\n// These two flags gate cross-namespace recall budgeting and anomaly-detection\n// auditing. Resolved once at access-service handler entry (and the operator\n// doctor check) rather than re-derived from raw config at each site.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of access-setup feature gates (issue #1566 Cluster B).\n *\n * Every field is `readonly boolean`. Composition (including the default-off\n * semantics for the optional `recallAuditAnomalyDetectionEnabled`) lives ONLY\n * in {@link resolveAccessSetupCapabilities}.\n */\nexport interface AccessSetupCapabilitySet {\n /** `recallCrossNamespaceBudgetEnabled` — rolling cross-namespace recall budget. */\n readonly recallCrossNamespaceBudget: boolean;\n /** `recallAuditAnomalyDetectionEnabled` — access-audit anomaly detection (default-off). */\n readonly recallAuditAnomalyDetection: boolean;\n readonly recallSingleFlight: boolean;\n}\n\n/** Resolve the {@link AccessSetupCapabilitySet} from parsed config. Call ONCE at\n * access-service handler entry and thread the result down. */\nexport type AccessSetupConfigProjection = Pick<\n PluginConfig,\n \"recallCrossNamespaceBudgetEnabled\" | \"recallAuditAnomalyDetectionEnabled\" | \"recallSingleFlightEnabled\"\n>;\n\nexport function resolveAccessSetupCapabilities(\n config: AccessSetupConfigProjection,\n): AccessSetupCapabilitySet {\n return Object.freeze({\n recallCrossNamespaceBudget: config.recallCrossNamespaceBudgetEnabled,\n // Optional/default-off flag: preserve `=== true` semantics.\n recallAuditAnomalyDetection: config.recallAuditAnomalyDetectionEnabled === true,\n recallSingleFlight: config.recallSingleFlightEnabled === true,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Memory-lifecycle capability set (issue #1523 batch 3).\n//\n// The flags below gate memory WRITE/EXTRACTION (extraction judge, scope\n// classification, dedupe, telemetry prefilter), temporal supersession of\n// stored facts, and the lifecycle policy pass (promotion / decay / stale\n// filtering). They are read on the persistExtraction write path, the recall\n// candidate-filter path, and the maintenance / lifecycle-pass path — so, like\n// the graph-construction set above, they get their own projection resolved\n// ONCE at each operation entry that reads them (never re-derived from raw\n// config mid-operation — the gate-divergence defect class #1523 targets).\n//\n// Every field projects from an already-resolved PluginConfig boolean (defaults\n// are applied at the config-parse boundary, rule 36), so the resolver is a\n// pure projection — no `!== false` / `=== true` re-coercion here.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of memory-lifecycle feature gates (issue #1523 batch 3).\n *\n * Resolved once per write / recall-filter / maintenance operation and threaded\n * down. Composition lives ONLY in {@link resolveMemoryLifecycleCapabilities}.\n */\nexport interface MemoryLifecycleCapabilitySet {\n /** `temporalSupersessionEnabled` — supersede stale structured facts on write, filter on recall. */\n readonly temporalSupersession: boolean;\n /** `temporalMemoryTreeEnabled` — temporal-memory-tree build + recall tier. */\n readonly temporalMemoryTree: boolean;\n /** `lifecyclePolicyEnabled` — lifecycle promotion / decay metadata pass. */\n readonly lifecyclePolicy: boolean;\n /** `lifecycleFilterStaleEnabled` — filter stale-lifecycle memories from recall. */\n readonly lifecycleFilterStale: boolean;\n /** `lifecycleMetricsEnabled` — emit lifecycle-pass metrics. */\n readonly lifecycleMetrics: boolean;\n /** `extractionScopeClassificationEnabled` — LLM classifies each fact's scope. */\n readonly extractionScopeClassification: boolean;\n /** `extractionJudgeEnabled` — LLM-as-judge fact-worthiness gate. */\n readonly extractionJudge: boolean;\n /** `extractionDedupeEnabled` — dedupe against recent extractions. */\n readonly extractionDedupe: boolean;\n /** `extractionTelemetryPrefilterEnabled` — skip mechanical-telemetry transcripts. */\n readonly extractionTelemetryPrefilter: boolean;\n /** `extractionJudgeTelemetryEnabled` — collect judge verdict telemetry. */\n readonly extractionJudgeTelemetry: boolean;\n /** `embeddingFallbackEnabled` — semantic-dedup / archive-search embedding fallback. */\n readonly embeddingFallback: boolean;\n /** `extractionRetryEnabled` — per-fingerprint backoff + provider circuit breaker on the extraction retry path. */\n readonly extractionRetry: boolean; /** `projectionRebuildEnabled` — scheduled memory-projection rebuild (#2119). */\n readonly projectionRebuild: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveMemoryLifecycleCapabilities}.\n */\nexport type MemoryLifecycleConfigProjection = Pick<\n PluginConfig,\n | \"temporalSupersessionEnabled\"\n | \"temporalMemoryTreeEnabled\"\n | \"lifecyclePolicyEnabled\"\n | \"lifecycleFilterStaleEnabled\"\n | \"lifecycleMetricsEnabled\"\n | \"extractionScopeClassificationEnabled\"\n | \"extractionJudgeEnabled\"\n | \"extractionDedupeEnabled\"\n | \"extractionTelemetryPrefilterEnabled\"\n | \"extractionJudgeTelemetryEnabled\"\n | \"embeddingFallbackEnabled\"\n | \"extractionRetryEnabled\"\n | \"projectionRebuildEnabled\"\n>;\n\n/**\n * Resolve the {@link MemoryLifecycleCapabilitySet} from parsed config.\n *\n * Call this ONCE per write / recall-filter / maintenance operation entry and\n * thread the result down — exactly the pattern {@link resolveCapabilities}\n * established for recall.\n */\nexport function resolveMemoryLifecycleCapabilities(\n config: MemoryLifecycleConfigProjection,\n): MemoryLifecycleCapabilitySet {\n return Object.freeze({\n temporalSupersession: config.temporalSupersessionEnabled,\n temporalMemoryTree: config.temporalMemoryTreeEnabled,\n lifecyclePolicy: config.lifecyclePolicyEnabled,\n lifecycleFilterStale: config.lifecycleFilterStaleEnabled,\n lifecycleMetrics: config.lifecycleMetricsEnabled,\n extractionScopeClassification: config.extractionScopeClassificationEnabled,\n extractionJudge: config.extractionJudgeEnabled,\n extractionDedupe: config.extractionDedupeEnabled,\n extractionTelemetryPrefilter: config.extractionTelemetryPrefilterEnabled,\n extractionJudgeTelemetry: config.extractionJudgeTelemetryEnabled,\n embeddingFallback: config.embeddingFallbackEnabled,\n extractionRetry: config.extractionRetryEnabled,\n projectionRebuild: config.projectionRebuildEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Indexing capability set (issue #1523 batch 4).\n//\n// The flags below gate query-aware indexing (temporal/tag index build +\n// prefilter) and the conversation index (QMD/FAISS backend selection). They\n// are read on the recall path, the extraction/persist path, and the\n// maintenance/invalidation path — so they get their own projection resolved\n// ONCE at each operation entry that reads them.\n//\n// Every field projects from an already-resolved PluginConfig boolean (defaults\n// applied at the parse boundary), so the resolver is a pure projection.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of indexing feature gates (issue #1523 batch 4).\n *\n * Resolved once per recall / extraction / maintenance operation and threaded\n * down. Composition lives ONLY in {@link resolveIndexingCapabilities}.\n */\nexport interface IndexingCapabilitySet {\n /** `queryAwareIndexingEnabled` — build + use temporal/tag index for recall prefilter. */\n readonly queryAwareIndexing: boolean;\n /** `conversationIndexEnabled` — conversation-index backend (QMD / FAISS). */\n readonly conversationIndex: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveIndexingCapabilities}.\n */\nexport type IndexingConfigProjection = Pick<\n PluginConfig,\n \"queryAwareIndexingEnabled\" | \"conversationIndexEnabled\"\n>;\n\n/**\n * Resolve the {@link IndexingCapabilitySet} from parsed config.\n *\n * Call this ONCE per recall / extraction / maintenance operation entry and\n * thread the result down — exactly the pattern {@link resolveCapabilities}\n * established for recall.\n */\nexport function resolveIndexingCapabilities(\n config: IndexingConfigProjection,\n): IndexingCapabilitySet {\n return Object.freeze({\n queryAwareIndexing: config.queryAwareIndexingEnabled,\n conversationIndex: config.conversationIndexEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Creation-memory capability set (issue #1523 batch 4).\n//\n// The flags below gate the creation-memory subsystem: resume-bundle handoff,\n// commitment ledger, commitment lifecycle, and the master creation-memory\n// switch. They are read on the extraction/persist path, the recall\n// enrichment path, and the CLI command surface — so they get their own\n// projection resolved ONCE at each operation entry that reads them.\n//\n// Every field projects from an already-resolved PluginConfig boolean (defaults\n// applied at the parse boundary), so the resolver is a pure projection.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of creation-memory feature gates (issue #1523 batch 4).\n *\n * Resolved once per creation-memory operation (CLI command, extraction,\n * recall enrichment) and threaded down. Composition lives ONLY in\n * {@link resolveCreationMemoryCapabilities}.\n */\nexport interface CreationMemoryCapabilitySet {\n /** `creationMemoryEnabled` — master switch for creation-memory subsystem. */\n readonly creationMemory: boolean;\n /** `commitmentLedgerEnabled` — commitment-ledger read/write. */\n readonly commitmentLedger: boolean;\n /** `resumeBundlesEnabled` — resume-bundle handoff bundles. */\n readonly resumeBundles: boolean;\n /** `commitmentLifecycleEnabled` — commitment lifecycle (promotion / decay). */\n readonly commitmentLifecycle: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveCreationMemoryCapabilities}.\n */\nexport type CreationMemoryConfigProjection = Pick<\n PluginConfig,\n | \"creationMemoryEnabled\"\n | \"commitmentLedgerEnabled\"\n | \"resumeBundlesEnabled\"\n | \"commitmentLifecycleEnabled\"\n>;\n\n/**\n * Resolve the {@link CreationMemoryCapabilitySet} from parsed config.\n *\n * Call this ONCE per creation-memory operation entry and thread the result\n * down — exactly the pattern {@link resolveCapabilities} established for\n * recall.\n */\nexport function resolveCreationMemoryCapabilities(\n config: CreationMemoryConfigProjection,\n): CreationMemoryCapabilitySet {\n return Object.freeze({\n creationMemory: config.creationMemoryEnabled,\n commitmentLedger: config.commitmentLedgerEnabled,\n resumeBundles: config.resumeBundlesEnabled,\n commitmentLifecycle: config.commitmentLifecycleEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Namespace capability set (issue #1523 batch 5).\n//\n// `namespacesEnabled` is the single most-scattered config flag in the codebase\n// (101 read sites outside config.ts across 18 files — orchestrator, access-service,\n// namespace modules, maintenance, CLI, admin). It gates whether the multi-namespace\n// system is active at all: every namespace resolution, storage path, recall budget,\n// and maintenance fanout checks it. Like the other projections above it gets its own\n// resolver invoked ONCE per operation entry rather than re-derived at each site.\n//\n// The field is a non-optional boolean in PluginConfig, so no coercion is needed.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of namespace feature gates (issue #1523 batch 5).\n *\n * Every field is `readonly boolean`. Composition lives ONLY in\n * {@link resolveNamespaceCapabilities}.\n */\nexport interface NamespaceCapabilitySet {\n /** `namespacesEnabled` — multi-namespace system master switch. */\n readonly namespaces: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveNamespaceCapabilities}.\n */\nexport type NamespaceConfigProjection = Pick<PluginConfig, \"namespacesEnabled\">;\n\n/**\n * Resolve the {@link NamespaceCapabilitySet} from parsed config.\n *\n * Call this ONCE at operation entry and thread the result down. The flag is a\n * non-optional boolean so the projection is a pure pass-through.\n */\nexport function resolveNamespaceCapabilities(\n config: NamespaceConfigProjection,\n): NamespaceCapabilitySet {\n return Object.freeze({\n namespaces: config.namespacesEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// QMD capability set (issue #1523 batch 6).\n//\n// The twelve QMD (query-managed database) flags are the largest remaining\n// scattered cluster after batch 5. They gate every aspect of the tiered\n// memory system: master switch, tier migration, cold tier, daemon, auto-embed,\n// maintenance, query rerank, intent hints, explain, auto-upgrade, and parity\n// graph. Read sites span orchestrator, operator-toolkit, access-service, and\n// search/factory. All flags are non-optional booleans on PluginConfig (defaults\n// resolved at the parse boundary), so the projection is pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of QMD feature gates (issue #1523 batch 6).\n *\n * Every field is `readonly boolean`. Composition lives ONLY in\n * {@link resolveQmdCapabilities}.\n */\nexport interface QmdCapabilitySet {\n /** `qmdEnabled` — QMD tiered-memory master switch. */\n readonly qmd: boolean;\n /** `qmdTierMigrationEnabled` — automatic tier promotion/demotion. */\n readonly qmdTierMigration: boolean;\n /** `qmdTierAutoBackfillEnabled` — backfill stale tier entries. */\n readonly qmdTierAutoBackfill: boolean;\n /** `qmdAutoEmbedEnabled` — auto-embed documents on write. */\n readonly qmdAutoEmbed: boolean;\n /** `qmdMaintenanceEnabled` — QMD maintenance pass runner. */\n readonly qmdMaintenance: boolean;\n /** `qmdColdTierEnabled` — cold-tier storage. */\n readonly qmdColdTier: boolean;\n /** `qmdDaemonEnabled` — background QMD daemon. */\n readonly qmdDaemon: boolean;\n /** `qmdTierParityGraphEnabled` — tier parity graph. */\n readonly qmdTierParityGraph: boolean;\n /** `qmdQueryRerankEnabled` — QMD query reranking. */\n readonly qmdQueryRerank: boolean;\n /** `qmdIntentHintsEnabled` — QMD intent hint extraction. */\n readonly qmdIntentHints: boolean;\n /** `qmdExplainEnabled` — QMD explain output. */\n readonly qmdExplain: boolean;\n /** `qmdAutoUpgradeEnabled` — QMD auto-upgrade tiers. */\n readonly qmdAutoUpgrade: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveQmdCapabilities}.\n */\nexport type QmdConfigProjection = Pick<\n PluginConfig,\n | \"qmdEnabled\"\n | \"qmdTierMigrationEnabled\"\n | \"qmdTierAutoBackfillEnabled\"\n | \"qmdAutoEmbedEnabled\"\n | \"qmdMaintenanceEnabled\"\n | \"qmdColdTierEnabled\"\n | \"qmdDaemonEnabled\"\n | \"qmdTierParityGraphEnabled\"\n | \"qmdQueryRerankEnabled\"\n | \"qmdIntentHintsEnabled\"\n | \"qmdExplainEnabled\"\n | \"qmdAutoUpgradeEnabled\"\n>;\n\n/**\n * Resolve the {@link QmdCapabilitySet} from parsed config.\n *\n * Call this ONCE at operation entry and thread the result down. Eleven flags\n * are non-optional booleans (pure pass-through); `qmdColdTierEnabled` is\n * optional and coerced with `=== true` (matching the pre-migration call sites).\n */\nexport function resolveQmdCapabilities(config: QmdConfigProjection): QmdCapabilitySet {\n return Object.freeze({\n qmd: config.qmdEnabled,\n qmdTierMigration: config.qmdTierMigrationEnabled,\n qmdTierAutoBackfill: config.qmdTierAutoBackfillEnabled,\n qmdAutoEmbed: config.qmdAutoEmbedEnabled,\n qmdMaintenance: config.qmdMaintenanceEnabled,\n qmdColdTier: config.qmdColdTierEnabled === true,\n qmdDaemon: config.qmdDaemonEnabled,\n qmdTierParityGraph: config.qmdTierParityGraphEnabled,\n qmdQueryRerank: config.qmdQueryRerankEnabled,\n qmdIntentHints: config.qmdIntentHintsEnabled,\n qmdExplain: config.qmdExplainEnabled,\n qmdAutoUpgrade: config.qmdAutoUpgradeEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Identity-continuity capability set (issue #1523 batch 6).\n//\n// `identityContinuityEnabled` gates the identity/continuity system (agent\n// identity tracking, continuity incident logging). Its 13 read sites span\n// orchestrator, access-service, and CLI. The flag is a non-optional boolean\n// on PluginConfig, so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of identity-continuity feature gates (issue #1523 batch 6).\n */\nexport interface IdentityContinuityCapabilitySet {\n /** `identityContinuityEnabled` — identity-continuity master switch. */\n readonly identityContinuity: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveIdentityContinuityCapabilities}.\n */\nexport type IdentityContinuityConfigProjection = Pick<PluginConfig, \"identityContinuityEnabled\">;\n\n/**\n * Resolve the {@link IdentityContinuityCapabilitySet} from parsed config.\n */\nexport function resolveIdentityContinuityCapabilities(\n config: IdentityContinuityConfigProjection,\n): IdentityContinuityCapabilitySet {\n return Object.freeze({\n identityContinuity: config.identityContinuityEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Local-LLM capability set (issue #1523 batch 6).\n//\n// `localLlmEnabled` gates whether a local (on-device) LLM is used for\n// summarization, embedding fallback, extraction, and search. Its 11 read\n// sites span orchestrator, extraction, embedding-fallback, local-llm,\n// search/embed-helper, and summarizer. The flag is a non-optional boolean.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of local-LLM feature gates (issue #1523 batch 6).\n */\nexport interface LocalLlmCapabilitySet {\n /** `localLlmEnabled` — local (on-device) LLM master switch. */\n readonly localLlm: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveLocalLlmCapabilities}.\n */\nexport type LocalLlmConfigProjection = Pick<PluginConfig, \"localLlmEnabled\">;\n\n/**\n * Resolve the {@link LocalLlmCapabilitySet} from parsed config.\n */\nexport function resolveLocalLlmCapabilities(\n config: LocalLlmConfigProjection,\n): LocalLlmCapabilitySet {\n return Object.freeze({\n localLlm: config.localLlmEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Security capability set (issue #1523 batch 7). The six security/trust-zone\n// flags gate quarantine promotion, poisoning defense, origin authority,\n// injection screening, and trust-zone recall. Read sites span orchestrator,\n// access-service, CLI, and research-status commands. All flags are\n// non-optional booleans on PluginConfig (defaults resolved at the parse\n// boundary), so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of security/trust-zone feature gates (issue #1523 batch 7).\n */\nexport interface SecurityCapabilitySet {\n /** `trustZonesEnabled` — master switch for trust-zone enforcement. */\n readonly trustZones: boolean;\n /** `quarantinePromotionEnabled` — promote quarantined memories after review. */\n readonly quarantinePromotion: boolean;\n /** `memoryPoisoningDefenseEnabled` — detect and defend against memory poisoning. */\n readonly memoryPoisoningDefense: boolean;\n /** `originAuthorityEnabled` — preserve origin-bound write authority. */\n readonly originAuthority: boolean;\n /** `injectionScreenEnabled` — quarantine deterministic injection findings. */\n readonly injectionScreen: boolean;\n /** `trustZoneRecallEnabled` — restrict recall to trusted zones. */\n readonly trustZoneRecall: boolean;\n}\n\n/** Config projection consumed by {@link resolveSecurityCapabilities}. */\nexport type SecurityConfigProjection = Pick<PluginConfig,\n | \"trustZonesEnabled\" | \"quarantinePromotionEnabled\" | \"memoryPoisoningDefenseEnabled\"\n | \"originAuthorityEnabled\" | \"injectionScreenEnabled\" | \"trustZoneRecallEnabled\">;\n\n/** Resolve the {@link SecurityCapabilitySet} from parsed config. */\nexport function resolveSecurityCapabilities(config: SecurityConfigProjection): SecurityCapabilitySet {\n return Object.freeze({\n trustZones: config.trustZonesEnabled,\n quarantinePromotion: config.quarantinePromotionEnabled,\n memoryPoisoningDefense: config.memoryPoisoningDefenseEnabled,\n originAuthority: config.originAuthorityEnabled,\n injectionScreen: config.injectionScreenEnabled,\n trustZoneRecall: config.trustZoneRecallEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Eval/benchmark capability set (issue #1523 batch 7).\n//\n// The five eval/benchmark flags gate the evaluation harness, shadow mode,\n// baseline snapshot management, delta reporting, and red-team benchmarking.\n// Read sites span orchestrator, CLI, and operator-toolkit. All flags are\n// non-optional booleans on PluginConfig.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of eval/benchmark feature gates (issue #1523 batch 7).\n */\nexport interface EvalCapabilitySet {\n /** `evalHarnessEnabled` — master switch for the eval harness. */\n readonly evalHarness: boolean;\n /** `evalShadowModeEnabled` — run evaluations in shadow mode. */\n readonly evalShadowMode: boolean;\n /** `benchmarkBaselineSnapshotsEnabled` — manage baseline snapshots. */\n readonly benchmarkBaselineSnapshots: boolean;\n /** `benchmarkDeltaReporterEnabled` — report benchmark deltas. */\n readonly benchmarkDeltaReporter: boolean;\n /** `memoryRedTeamBenchEnabled` — red-team benchmarking of memory. */\n readonly memoryRedTeamBench: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveEvalCapabilities}.\n */\nexport type EvalConfigProjection = Pick<\n PluginConfig,\n \"evalHarnessEnabled\" | \"evalShadowModeEnabled\" | \"benchmarkBaselineSnapshotsEnabled\" | \"benchmarkDeltaReporterEnabled\" | \"memoryRedTeamBenchEnabled\"\n>;\n\n/**\n * Resolve the {@link EvalCapabilitySet} from parsed config.\n */\nexport function resolveEvalCapabilities(config: EvalConfigProjection): EvalCapabilitySet {\n return Object.freeze({\n evalHarness: config.evalHarnessEnabled,\n evalShadowMode: config.evalShadowModeEnabled,\n benchmarkBaselineSnapshots: config.benchmarkBaselineSnapshotsEnabled,\n benchmarkDeltaReporter: config.benchmarkDeltaReporterEnabled,\n memoryRedTeamBench: config.memoryRedTeamBenchEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Utility-learning capability set (issue #1523 batch 7).\n//\n// The two utility-learning flags gate memory utility learning and\n// promotion-by-outcome. Read sites span orchestrator, CLI research-status\n// commands, and maintenance files. Both flags are non-optional booleans.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of utility-learning feature gates (issue #1523 batch 7).\n */\nexport interface UtilityLearningCapabilitySet {\n /** `memoryUtilityLearningEnabled` — learn memory utility weights from outcomes. */\n readonly memoryUtilityLearning: boolean;\n /** `promotionByOutcomeEnabled` — promote memories by outcome tracking. */\n readonly promotionByOutcome: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveUtilityLearningCapabilities}.\n */\nexport type UtilityLearningConfigProjection = Pick<\n PluginConfig,\n \"memoryUtilityLearningEnabled\" | \"promotionByOutcomeEnabled\"\n>;\n\n/**\n * Resolve the {@link UtilityLearningCapabilitySet} from parsed config.\n */\nexport function resolveUtilityLearningCapabilities(config: UtilityLearningConfigProjection): UtilityLearningCapabilitySet {\n return Object.freeze({\n memoryUtilityLearning: config.memoryUtilityLearningEnabled,\n promotionByOutcome: config.promotionByOutcomeEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Objective-state capability set (issue #1523 batch 7).\n//\n// The three objective-state flags gate objective-state memory, snapshot\n// writes, and recall. Read sites span orchestrator, access-service, CLI\n// creation-ledger commands, and research-status commands. All flags are\n// non-optional booleans.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of objective-state feature gates (issue #1523 batch 7).\n */\nexport interface ObjectiveStateCapabilitySet {\n /** `objectiveStateMemoryEnabled` — store objective-state memories. */\n readonly objectiveStateMemory: boolean;\n /** `objectiveStateSnapshotWritesEnabled` — write objective-state snapshots. */\n readonly objectiveStateSnapshotWrites: boolean;\n /** `objectiveStateRecallEnabled` — recall objective-state memories. */\n readonly objectiveStateRecall: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveObjectiveStateCapabilities}.\n */\nexport type ObjectiveStateConfigProjection = Pick<\n PluginConfig,\n \"objectiveStateMemoryEnabled\" | \"objectiveStateSnapshotWritesEnabled\" | \"objectiveStateRecallEnabled\"\n>;\n\n/**\n * Resolve the {@link ObjectiveStateCapabilitySet} from parsed config.\n */\nexport function resolveObjectiveStateCapabilities(config: ObjectiveStateConfigProjection): ObjectiveStateCapabilitySet {\n return Object.freeze({\n objectiveStateMemory: config.objectiveStateMemoryEnabled,\n objectiveStateSnapshotWrites: config.objectiveStateSnapshotWritesEnabled,\n objectiveStateRecall: config.objectiveStateRecallEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Compression capability set (issue #1523 batch 7).\n//\n// The three compression flags gate guideline learning, semantic refinement,\n// and context-compression actions. Read sites span orchestrator,\n// access-service, and the compression-guideline coordinator. All flags are\n// non-optional booleans.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of compression feature gates (issue #1523 batch 7).\n */\nexport interface CompressionCapabilitySet {\n /** `compressionGuidelineLearningEnabled` — learn compression guidelines. */\n readonly compressionGuidelineLearning: boolean;\n /** `compressionGuidelineSemanticRefinementEnabled` — semantically refine guidelines. */\n readonly compressionGuidelineSemanticRefinement: boolean;\n /** `contextCompressionActionsEnabled` — apply context-compression actions. */\n readonly contextCompressionActions: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveCompressionCapabilities}.\n */\nexport type CompressionConfigProjection = Pick<\n PluginConfig,\n \"compressionGuidelineLearningEnabled\" | \"compressionGuidelineSemanticRefinementEnabled\" | \"contextCompressionActionsEnabled\"\n>;\n\n/**\n * Resolve the {@link CompressionCapabilitySet} from parsed config.\n */\nexport function resolveCompressionCapabilities(config: CompressionConfigProjection): CompressionCapabilitySet {\n return Object.freeze({\n compressionGuidelineLearning: config.compressionGuidelineLearningEnabled,\n compressionGuidelineSemanticRefinement: config.compressionGuidelineSemanticRefinementEnabled,\n contextCompressionActions: config.contextCompressionActionsEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Presentation capability set (issue #1523 batch 8).\n//\n// These flags gate output formatting and presentation across the orchestrator, extraction\n// pipeline, consolidation engine, and related modules. Resolved ONCE per\n// operation entry rather than re-derived from raw config at each read site.\n// All flags are non-optional booleans on PluginConfig (defaults applied at\n// the parse boundary), so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of output formatting and presentation feature gates (issue #1523 batch 8).\n */\nexport interface PresentationCapabilitySet {\n /** `verbatimArtifactsEnabled` — verbatim-artifact rendering in recall output. */\n readonly verbatimArtifacts: boolean;\n /** `memoryBoxesEnabled` — memory-box rendering in recall output. */\n readonly memoryBoxes: boolean;\n /** `bufferSurpriseTriggerEnabled` — buffer surprise-detection trigger. */\n readonly bufferSurpriseTrigger: boolean;\n /** `threadingEnabled` — conversation threading in output. */\n readonly threading: boolean;\n /** `episodeNoteModeEnabled` — episode note-mode formatting. */\n readonly episodeNoteMode: boolean;\n /** `transcriptEnabled` — transcript-mode output. */\n readonly transcript: boolean;\n /** `entitySummaryEnabled` — entity summary generation. */\n readonly entitySummary: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolvePresentationCapabilities}.\n */\nexport type PresentationConfigProjection = Pick<\n PluginConfig,\n \"verbatimArtifactsEnabled\" |\n \"memoryBoxesEnabled\" |\n \"bufferSurpriseTriggerEnabled\" |\n \"threadingEnabled\" |\n \"episodeNoteModeEnabled\" |\n \"transcriptEnabled\" |\n \"entitySummaryEnabled\"\n>;\n\n/**\n * Resolve the {@link PresentationCapabilitySet} from parsed config.\n */\nexport function resolvePresentationCapabilities(config: PresentationConfigProjection): PresentationCapabilitySet {\n return Object.freeze({\n verbatimArtifacts: config.verbatimArtifactsEnabled,\n memoryBoxes: config.memoryBoxesEnabled,\n bufferSurpriseTrigger: config.bufferSurpriseTriggerEnabled,\n threading: config.threadingEnabled,\n episodeNoteMode: config.episodeNoteModeEnabled,\n transcript: config.transcriptEnabled,\n entitySummary: config.entitySummaryEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Consolidation capability set (issue #1523 batch 8).\n//\n// These flags gate memory consolidation, compounding, and abstraction across the orchestrator, extraction\n// pipeline, consolidation engine, and related modules. Resolved ONCE per\n// operation entry rather than re-derived from raw config at each read site.\n// All flags are non-optional booleans on PluginConfig (defaults applied at\n// the parse boundary), so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of memory consolidation, compounding, and abstraction feature gates (issue #1523 batch 8).\n */\nexport interface ConsolidationCapabilitySet {\n /** `compoundingSemanticEnabled` — semantic compounding of memories. */\n readonly compoundingSemantic: boolean;\n /** `abstractionAnchorsEnabled` — abstraction-anchor extraction. */\n readonly abstractionAnchors: boolean;\n /** `compoundingEnabled` — master compounding switch. */\n readonly compounding: boolean;\n /** `calibrationEnabled` — memory calibration pass. */\n readonly calibration: boolean;\n /** `semanticConsolidationEnabled` — semantic consolidation pass. */\n readonly semanticConsolidation: boolean;\n /** `patternReinforcementEnabled` — pattern reinforcement in consolidation. */\n readonly patternReinforcement: boolean;\n /** `continuityAuditEnabled` — continuity audit during consolidation. */\n readonly continuityAudit: boolean;\n /** `graphEdgeDecayEnabled` — graph edge decay in maintenance. */\n readonly graphEdgeDecay: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveConsolidationCapabilities}.\n */\nexport type ConsolidationConfigProjection = Pick<\n PluginConfig,\n \"compoundingSemanticEnabled\" |\n \"abstractionAnchorsEnabled\" |\n \"compoundingEnabled\" |\n \"calibrationEnabled\" |\n \"semanticConsolidationEnabled\" |\n \"patternReinforcementEnabled\" |\n \"continuityAuditEnabled\" |\n \"graphEdgeDecayEnabled\"\n>;\n\n/**\n * Resolve the {@link ConsolidationCapabilitySet} from parsed config.\n */\nexport function resolveConsolidationCapabilities(config: ConsolidationConfigProjection): ConsolidationCapabilitySet {\n return Object.freeze({\n compoundingSemantic: config.compoundingSemanticEnabled,\n abstractionAnchors: config.abstractionAnchorsEnabled,\n compounding: config.compoundingEnabled,\n calibration: config.calibrationEnabled,\n semanticConsolidation: config.semanticConsolidationEnabled,\n patternReinforcement: config.patternReinforcementEnabled,\n continuityAudit: config.continuityAuditEnabled,\n graphEdgeDecay: config.graphEdgeDecayEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// RecallAuxiliary capability set (issue #1523 batch 8).\n//\n// These flags gate extraction pipeline details and auxiliary recall enrichment across the orchestrator, extraction\n// pipeline, consolidation engine, and related modules. Resolved ONCE per\n// operation entry rather than re-derived from raw config at each read site.\n// All flags are non-optional booleans on PluginConfig (defaults applied at\n// the parse boundary), so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of extraction pipeline details and auxiliary recall enrichment feature gates (issue #1523 batch 8).\n */\nexport interface RecallAuxiliaryCapabilitySet {\n /** `causalRuleExtractionEnabled` — causal-rule extraction in pipeline. */\n readonly causalRuleExtraction: boolean;\n /** `correctionEnabled` — memory correction subsystem. */\n readonly correction: boolean;\n /** `continuityIncidentLoggingEnabled` — continuity incident logging. */\n readonly continuityIncidentLogging: boolean;\n /** `daySummaryEnabled` — day-summary generation. */\n readonly daySummary: boolean;\n /** `versioningEnabled` — memory versioning. */\n readonly versioning: boolean;\n /** `verifiedRecallEnabled` — verified-recall tier. */\n readonly verifiedRecall: boolean;\n /** `semanticRuleVerificationEnabled` — semantic-rule verification. */\n readonly semanticRuleVerification: boolean;\n /** `workProductRecallEnabled` — work-product recall tier. */\n readonly workProductRecall: boolean;\n /** `secureStoreEnabled` — secure storage mode. */\n readonly secureStore: boolean;\n /** `knowledgeIndexEnabled` — knowledge index in recall. */\n readonly knowledgeIndex: boolean;\n /** `factDeduplicationEnabled` — fact deduplication in recall. */\n readonly factDeduplication: boolean;\n /** `compactionResetEnabled` — compaction reset on re-ingest. */\n readonly compactionReset: boolean;\n /** `entityRetrievalEnabled` — entity retrieval tier. */\n readonly entityRetrieval: boolean;\n /** `cronRecallPolicyEnabled` — cron-based recall policy. */\n readonly cronRecallPolicy: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveRecallAuxiliaryCapabilities}.\n */\nexport type RecallAuxiliaryConfigProjection = Pick<\n PluginConfig,\n \"causalRuleExtractionEnabled\" |\n \"correctionEnabled\" |\n \"continuityIncidentLoggingEnabled\" |\n \"daySummaryEnabled\" |\n \"versioningEnabled\" |\n \"verifiedRecallEnabled\" |\n \"semanticRuleVerificationEnabled\" |\n \"workProductRecallEnabled\" |\n \"secureStoreEnabled\" |\n \"knowledgeIndexEnabled\" |\n \"factDeduplicationEnabled\" |\n \"compactionResetEnabled\" |\n \"entityRetrievalEnabled\" |\n \"cronRecallPolicyEnabled\"\n>;\n\n/**\n * Resolve the {@link RecallAuxiliaryCapabilitySet} from parsed config.\n */\nexport function resolveRecallAuxiliaryCapabilities(config: RecallAuxiliaryConfigProjection): RecallAuxiliaryCapabilitySet {\n return Object.freeze({\n causalRuleExtraction: config.causalRuleExtractionEnabled,\n correction: config.correctionEnabled,\n continuityIncidentLogging: config.continuityIncidentLoggingEnabled,\n daySummary: config.daySummaryEnabled,\n versioning: config.versioningEnabled,\n verifiedRecall: config.verifiedRecallEnabled,\n semanticRuleVerification: config.semanticRuleVerificationEnabled,\n workProductRecall: config.workProductRecallEnabled,\n secureStore: config.secureStoreEnabled,\n knowledgeIndex: config.knowledgeIndexEnabled,\n factDeduplication: config.factDeduplicationEnabled,\n compactionReset: config.compactionResetEnabled,\n entityRetrieval: config.entityRetrievalEnabled,\n cronRecallPolicy: config.cronRecallPolicyEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// RecallEnhancement capability set (issue #1523 batch 9).\n//\n// These 24 flags gate recall enrichment, memory reconstruction, entity\n// relationships, causal trajectory recall, CMC retrieval, and related\n// enhancement paths. Read sites span orchestrator, access-service, graph-recall,\n// and CLI research-status commands. All flags are non-optional booleans on\n// PluginConfig (defaults resolved at the parse boundary), so the projection\n// is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of recall-enhancement feature gates (issue #1523 batch 9).\n */\nexport interface RecallEnhancementCapabilitySet {\n readonly explicitCueRecall: boolean;\n readonly targetedFactRecall: boolean;\n readonly focusedListRecall: boolean;\n readonly responseGuidanceRecall: boolean;\n readonly eventOrderRecall: boolean;\n readonly reinforcementRecallBoost: boolean;\n readonly recallPlannerTelemetry: boolean;\n readonly peerProfileRecall: boolean;\n readonly graphAssistShadowEval: boolean;\n readonly memoryReconstruction: boolean;\n readonly memoryLinking: boolean;\n readonly causalTrajectoryRecall: boolean;\n readonly causalTrajectoryMemory: boolean;\n readonly cmcRetrieval: boolean;\n readonly contradictionDetection: boolean;\n readonly factArchival: boolean;\n readonly entityRelationships: boolean;\n readonly entityActivityLog: boolean;\n readonly compoundingInject: boolean;\n readonly accessTracking: boolean;\n readonly autoPromoteToShared: boolean;\n readonly feedback: boolean;\n readonly identity: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveRecallEnhancementCapabilities}.\n */\nexport type RecallEnhancementConfigProjection = Pick<\n PluginConfig,\n | \"explicitCueRecallEnabled\"\n | \"targetedFactRecallEnabled\"\n | \"focusedListRecallEnabled\"\n | \"responseGuidanceRecallEnabled\"\n | \"eventOrderRecallEnabled\"\n | \"reinforcementRecallBoostEnabled\"\n | \"recallPlannerTelemetryEnabled\"\n | \"peerProfileRecallEnabled\"\n | \"graphAssistShadowEvalEnabled\"\n | \"memoryReconstructionEnabled\"\n | \"memoryLinkingEnabled\"\n | \"causalTrajectoryRecallEnabled\"\n | \"causalTrajectoryMemoryEnabled\"\n | \"cmcRetrievalEnabled\"\n | \"contradictionDetectionEnabled\"\n | \"factArchivalEnabled\"\n | \"entityRelationshipsEnabled\"\n | \"entityActivityLogEnabled\"\n | \"compoundingInjectEnabled\"\n | \"accessTrackingEnabled\"\n | \"autoPromoteToSharedEnabled\"\n | \"feedbackEnabled\"\n | \"identityEnabled\"\n>;\n\n/**\n * Resolve the {@link RecallEnhancementCapabilitySet} from parsed config.\n */\nexport function resolveRecallEnhancementCapabilities(config: RecallEnhancementConfigProjection): RecallEnhancementCapabilitySet {\n return Object.freeze({\n explicitCueRecall: config.explicitCueRecallEnabled,\n targetedFactRecall: config.targetedFactRecallEnabled,\n focusedListRecall: config.focusedListRecallEnabled,\n responseGuidanceRecall: config.responseGuidanceRecallEnabled,\n eventOrderRecall: config.eventOrderRecallEnabled,\n reinforcementRecallBoost: config.reinforcementRecallBoostEnabled,\n recallPlannerTelemetry: config.recallPlannerTelemetryEnabled,\n peerProfileRecall: config.peerProfileRecallEnabled,\n graphAssistShadowEval: config.graphAssistShadowEvalEnabled === true,\n memoryReconstruction: config.memoryReconstructionEnabled,\n memoryLinking: config.memoryLinkingEnabled,\n causalTrajectoryRecall: config.causalTrajectoryRecallEnabled,\n causalTrajectoryMemory: config.causalTrajectoryMemoryEnabled,\n cmcRetrieval: config.cmcRetrievalEnabled,\n contradictionDetection: config.contradictionDetectionEnabled,\n factArchival: config.factArchivalEnabled,\n entityRelationships: config.entityRelationshipsEnabled,\n entityActivityLog: config.entityActivityLogEnabled,\n compoundingInject: config.compoundingInjectEnabled,\n accessTracking: config.accessTrackingEnabled,\n autoPromoteToShared: config.autoPromoteToSharedEnabled,\n feedback: config.feedbackEnabled,\n identity: config.identityEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// PipelineProcessing capability set (issue #1523 batch 9). These 23 flags gate\n// extraction/chunking/summarization and LLM infrastructure across orchestrator,\n// extraction, summarizer, embedding-fallback, local-llm, search, day-summary, and\n// semantic-consolidation. Defaults resolve at parse boundary, so pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of pipeline-processing feature gates (issue #1523 batch 9).\n */\nexport interface PipelineProcessingCapabilitySet {\n readonly chunking: boolean;\n readonly semanticChunking: boolean;\n readonly semanticDedup: boolean;\n readonly summarization: boolean;\n readonly topicExtraction: boolean;\n readonly sessionObserver: boolean;\n readonly profiling: boolean;\n readonly checkpoint: boolean;\n readonly traceWeaver: boolean;\n readonly routingRules: boolean;\n readonly inlineSourceAttribution: boolean;\n readonly negativeExamples: boolean;\n readonly hourlySummaries: boolean;\n readonly lcm: boolean;\n readonly localLlmFast: boolean;\n readonly proactiveExtraction: boolean;\n readonly sourceGrounding: boolean;\n readonly delinearize: boolean;\n readonly slowLog: boolean;\n readonly hostEmbeddingProvider: boolean;\n readonly memoryExtensions: boolean;\n readonly hourlySummariesExtended: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolvePipelineProcessingCapabilities}.\n */\nexport type PipelineProcessingConfigProjection = Pick<\n PluginConfig,\n | \"chunkingEnabled\"\n | \"semanticChunkingEnabled\"\n | \"semanticDedupEnabled\"\n | \"summarizationEnabled\"\n | \"topicExtractionEnabled\"\n | \"sessionObserverEnabled\"\n | \"profilingEnabled\"\n | \"checkpointEnabled\"\n | \"traceWeaverEnabled\"\n | \"routingRulesEnabled\"\n | \"inlineSourceAttributionEnabled\"\n | \"negativeExamplesEnabled\"\n | \"hourlySummariesEnabled\"\n | \"lcmEnabled\"\n | \"localLlmFastEnabled\"\n | \"proactiveExtractionEnabled\"\n | \"extractionSourceGroundingEnabled\"\n | \"delinearizeEnabled\"\n | \"slowLogEnabled\"\n | \"hostEmbeddingProviderEnabled\"\n | \"memoryExtensionsEnabled\"\n | \"hourlySummariesExtendedEnabled\"\n>;\n\n/**\n * Resolve the {@link PipelineProcessingCapabilitySet} from parsed config.\n */\nexport function resolvePipelineProcessingCapabilities(config: PipelineProcessingConfigProjection): PipelineProcessingCapabilitySet {\n return Object.freeze({\n chunking: config.chunkingEnabled,\n semanticChunking: config.semanticChunkingEnabled,\n semanticDedup: config.semanticDedupEnabled,\n summarization: config.summarizationEnabled,\n topicExtraction: config.topicExtractionEnabled,\n sessionObserver: config.sessionObserverEnabled === true,\n profiling: config.profilingEnabled,\n checkpoint: config.checkpointEnabled,\n traceWeaver: config.traceWeaverEnabled,\n routingRules: config.routingRulesEnabled,\n inlineSourceAttribution: config.inlineSourceAttributionEnabled,\n negativeExamples: config.negativeExamplesEnabled,\n hourlySummaries: config.hourlySummariesEnabled,\n lcm: config.lcmEnabled,\n localLlmFast: config.localLlmFastEnabled,\n proactiveExtraction: config.proactiveExtractionEnabled,\n sourceGrounding: config.extractionSourceGroundingEnabled,\n delinearize: config.delinearizeEnabled,\n slowLog: config.slowLogEnabled,\n hostEmbeddingProvider: config.hostEmbeddingProviderEnabled,\n memoryExtensions: config.memoryExtensionsEnabled,\n hourlySummariesExtended: config.hourlySummariesExtendedEnabled,\n });\n}\n\n// ---------------------------------------------------------------------------\n// ConversationContext capability set (issue #1523 batch 9).\n//\n// These 12 flags gate conversation context, shared signals, intent routing,\n// operator-aware consolidation, CMC consolidation, maintenance fanout, CLI\n// presentation, and code connectors. Read sites span orchestrator, CLI,\n// shared-context/manager, semantic-consolidation-coordinator, compounding/engine,\n// maintenance modules, procedural stats, connectors, and wearables. All flags\n// are non-optional booleans on PluginConfig (defaults resolved at the parse\n// boundary), so the projection is a pure pass-through.\n// ---------------------------------------------------------------------------\n\n/**\n * Frozen projection of conversation/context feature gates (issue #1523 batch 9).\n */\nexport interface ConversationContextCapabilitySet {\n readonly sharedContext: boolean;\n readonly intentRouting: boolean;\n readonly crossSignalsSemantic: boolean;\n readonly sharedCrossSignalSemantic: boolean;\n readonly operatorAwareConsolidation: boolean;\n readonly peerProfileReasoner: boolean;\n readonly cmcConsolidation: boolean;\n readonly maintenanceNamespaceFanout: boolean;\n readonly citations: boolean;\n readonly semanticRulePromotion: boolean;\n readonly codexMarketplace: boolean;\n}\n\n/**\n * Config projection consumed by {@link resolveConversationContextCapabilities}.\n */\nexport type ConversationContextConfigProjection = Pick<\n PluginConfig,\n | \"sharedContextEnabled\"\n | \"intentRoutingEnabled\"\n | \"crossSignalsSemanticEnabled\"\n | \"sharedCrossSignalSemanticEnabled\"\n | \"operatorAwareConsolidationEnabled\"\n | \"peerProfileReasonerEnabled\"\n | \"cmcConsolidationEnabled\"\n | \"maintenanceNamespaceFanoutEnabled\"\n | \"citationsEnabled\"\n | \"semanticRulePromotionEnabled\"\n | \"codexMarketplaceEnabled\"\n>;\n\n/**\n * Resolve the {@link ConversationContextCapabilitySet} from parsed config.\n */\nexport function resolveConversationContextCapabilities(config: ConversationContextConfigProjection): ConversationContextCapabilitySet {\n return Object.freeze({\n sharedContext: config.sharedContextEnabled,\n intentRouting: config.intentRoutingEnabled,\n crossSignalsSemantic: config.crossSignalsSemanticEnabled,\n sharedCrossSignalSemantic: config.sharedCrossSignalSemanticEnabled === true,\n operatorAwareConsolidation: config.operatorAwareConsolidationEnabled,\n peerProfileReasoner: config.peerProfileReasonerEnabled,\n cmcConsolidation: config.cmcConsolidationEnabled,\n maintenanceNamespaceFanout: config.maintenanceNamespaceFanoutEnabled,\n citations: config.citationsEnabled,\n semanticRulePromotion: config.semanticRulePromotionEnabled,\n codexMarketplace: config.codexMarketplaceEnabled,\n });\n}\n"],"mappings":";AAqFO,SAAS,oBAAoB,QAAqC;AACvE,SAAO,OAAO,OAAO;AAAA,IACnB,aAAa,OAAO;AAAA,IACpB,oBAAoB,OAAO;AAAA,IAC3B,yBAAyB,OAAO;AAAA;AAAA;AAAA,IAGhC,kBAAkB,OAAO,sBAAsB;AAAA,IAC/C,WAAW,OAAO;AAAA,IAClB,2BAA2B,OAAO;AAAA,IAClC,kBAAkB,OAAO;AAAA,IACzB,eAAe,OAAO;AAAA,IACtB,sBAAsB,OAAO;AAAA,IAC7B,aAAa,OAAO;AAAA;AAAA;AAAA,IAGpB,uBAAuB,OAAO,iCAAiC;AAAA,IAC/D,qBAAqB,OAAO,+BAA+B;AAAA;AAAA,IAE3D,QAAQ,OAAO;AAAA,IACf,mBAAmB,OAAO;AAAA,IAC1B,mBAAmB,OAAO;AAAA,EAC5B,CAAC;AACH;AAiDO,SAAS,qCACd,QACgC;AAChC,SAAO,OAAO,OAAO;AAAA,IACnB,aAAa,OAAO;AAAA,IACpB,WAAW,OAAO;AAAA,IAClB,aAAa,OAAO;AAAA,IACpB,kBAAkB,OAAO;AAAA;AAAA;AAAA,IAGzB,4BAA4B,OAAO,sCAAsC;AAAA,EAC3E,CAAC;AACH;AAgCO,SAAS,+BACd,QAC0B;AAC1B,SAAO,OAAO,OAAO;AAAA,IACnB,4BAA4B,OAAO;AAAA;AAAA,IAEnC,6BAA6B,OAAO,uC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B,kBAAkB,OAAO;AAAA,IACzB,4BAA4B,OAAO;AAAA,IACnC,WAAW,OAAO;AAAA,IAClB,uBAAuB,OAAO;AAAA,IAC9B,kBAAkB,OAAO;AAAA,EAC3B,CAAC;AACH;","names":[]}
@@ -1,10 +1,10 @@
1
+ import {
2
+ computeLegacyContentHash
3
+ } from "./chunk-5FVVY2EB.js";
1
4
  import {
2
5
  serializeMutations,
3
6
  withHeldFileLock
4
7
  } from "./chunk-FFAZ2XFU.js";
5
- import {
6
- computeLegacyContentHash
7
- } from "./chunk-5FVVY2EB.js";
8
8
 
9
9
  // src/lifecycle/tombstones.ts
10
10
  var TOMBSTONE_NORMALIZER_VERSION = 2;
@@ -659,4 +659,4 @@ export {
659
659
  applyTombstoneResurrectionGate,
660
660
  buildRetiredFactTombstoneInputs
661
661
  };
662
- //# sourceMappingURL=chunk-MLPTFODV.js.map
662
+ //# sourceMappingURL=chunk-KHQ57QLJ.js.map
@@ -216,6 +216,7 @@ function composeMemoryEnvelope(input, ctx, opts = {}) {
216
216
  ttl: normalizeOptionalString("ttl", input.ttl, hygiene),
217
217
  validAt,
218
218
  sourceConnector: normalizeOptionalString("sourceConnector", input.sourceConnector, hygiene),
219
+ origin: normalizeOptionalString("origin", input.origin, hygiene),
219
220
  sourceReason: normalizeOptionalString("sourceReason", input.sourceReason, hygiene),
220
221
  source: ctx.source.trim(),
221
222
  composedAt: now.toISOString(),
@@ -271,6 +272,7 @@ function isSealedMemoryEnvelope(value) {
271
272
  ...v.ttl !== void 0 ? { ttl: v.ttl } : {},
272
273
  ...v.validAt !== void 0 ? { validAt: v.validAt } : {},
273
274
  ...v.sourceConnector !== void 0 ? { sourceConnector: v.sourceConnector } : {},
275
+ ...v.origin !== void 0 ? { origin: v.origin } : {},
274
276
  ...v.sourceReason !== void 0 ? { sourceReason: v.sourceReason } : {}
275
277
  },
276
278
  { source: v.source, now: () => new Date(v.composedAt) }
@@ -285,7 +287,7 @@ function isSealedMemoryEnvelope(value) {
285
287
  const bk = Object.keys(b);
286
288
  return ak.length === bk.length && ak.every((k) => Object.hasOwn(b, k) && a[k] === b[k]);
287
289
  };
288
- return rebuilt.content === v.content && rebuilt.persistedBody === v.persistedBody && rebuilt.category === v.category && rebuilt.source === v.source && rebuilt.composedAt === v.composedAt && rebuilt.confidence === v.confidence && rebuilt.entityRef === v.entityRef && rebuilt.ttl === v.ttl && rebuilt.validAt === v.validAt && rebuilt.sourceConnector === v.sourceConnector && rebuilt.sourceReason === v.sourceReason && sameArray(rebuilt.tags, v.tags) && sameArray(rebuilt.sanitizeViolations, v.sanitizeViolations) && sameMap(rebuilt.structuredAttributes, v.structuredAttributes) && sameMap(rebuilt.rawStructuredAttributes, attrs);
290
+ return rebuilt.content === v.content && rebuilt.persistedBody === v.persistedBody && rebuilt.category === v.category && rebuilt.source === v.source && rebuilt.composedAt === v.composedAt && rebuilt.confidence === v.confidence && rebuilt.entityRef === v.entityRef && rebuilt.ttl === v.ttl && rebuilt.validAt === v.validAt && rebuilt.sourceConnector === v.sourceConnector && rebuilt.origin === v.origin && rebuilt.sourceReason === v.sourceReason && sameArray(rebuilt.tags, v.tags) && sameArray(rebuilt.sanitizeViolations, v.sanitizeViolations) && sameMap(rebuilt.structuredAttributes, v.structuredAttributes) && sameMap(rebuilt.rawStructuredAttributes, attrs);
289
291
  }
290
292
  function sealedWriteToLegacyArgs(envelope, extras = {}) {
291
293
  return {
@@ -306,7 +308,8 @@ function sealedWriteToLegacyArgs(envelope, extras = {}) {
306
308
  // extras — a conditional spread let extras.sourceConnector smuggle
307
309
  // unvalidated connector provenance past the sealed envelope when the
308
310
  // envelope had none.
309
- sourceConnector: envelope.sourceConnector
311
+ sourceConnector: envelope.sourceConnector,
312
+ origin: envelope.origin
310
313
  }
311
314
  };
312
315
  }
@@ -325,6 +328,8 @@ var FINGERPRINT_EXEMPT_FIELDS = [
325
328
  // slightly different confidence are the same write for dedup purposes.
326
329
  "confidence",
327
330
  // Free-text provenance note; carries no identity.
331
+ // Origin is provenance metadata, not write identity (#1955).
332
+ "origin",
328
333
  "sourceReason"
329
334
  ];
330
335
  var FINGERPRINT_SCOPE_FIELDS = [
@@ -418,4 +423,4 @@ export {
418
423
  buildAccessWriteRequestFingerprint,
419
424
  buildObserveRequestFingerprint
420
425
  };
421
- //# sourceMappingURL=chunk-NSVDUN76.js.map
426
+ //# sourceMappingURL=chunk-LCU5R6TQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/write-envelope.ts"],"sourcesContent":["/**\n * Sealed memory-write envelope (issue #1989, umbrella #1988).\n *\n * THE single stamping point for cross-cutting memory-creation fields.\n *\n * Why this exists: PR #1852 needed 27 rework commits because adding one\n * cross-cutting field (`sourceConnector`) required hand-editing every\n * write call site and every idempotency payload, and reviewers discovered\n * missed sites one round at a time. This module removes the fan-out:\n *\n * 1. `composeMemoryEnvelope()` is the only way to mint a\n * `SealedMemoryEnvelope` — the brand is a non-exported `unique symbol`,\n * so a hand-built object literal fails `tsc` (`npm run check-types`\n * is already a required repo-wide gate; the type system IS the fence).\n * 2. `buildWriteIdempotencyPayload()` derives every access-surface\n * idempotency payload from ONE ordered field registry\n * (`WRITE_FINGERPRINT_FIELDS`). Adding a fingerprint-relevant field is\n * a one-line registry change picked up by every surface; forgetting to\n * classify a new `MemoryWriteInput` field is a compile error (see the\n * exhaustiveness guards at the bottom of this file).\n *\n * PR1 scope (no call-site changes): the composer, the registry, and the\n * payload builder, fully tested. PR2–PR4 migrate storage entry points and\n * the write call sites onto this module (see #1989 for the slicing).\n */\n\nimport type { MemoryCategory } from \"./types.js\";\nimport { normalizeTags } from \"./recall-tag-filter.js\";\nimport { parseFlexibleIsoTimestamp } from \"./utils/iso-timestamp.js\";\nimport { assemblePersistedBody } from \"./structured-attributes.js\";\n\n// ---------------------------------------------------------------------------\n// Input surface\n// ---------------------------------------------------------------------------\n\n/**\n * Every cross-cutting memory-creation field lives HERE and only here.\n *\n * When you add a field you MUST also add it to either\n * `WRITE_FINGERPRINT_FIELDS` or `FINGERPRINT_EXEMPT_FIELDS` — the\n * exhaustiveness guard below makes forgetting a compile error.\n */\nexport interface MemoryWriteInput {\n /** Raw memory content. Must be non-empty after trimming. */\n content: string;\n /** Memory category — validated against the canonical category set. */\n category: MemoryCategory;\n /** Free-form labels; normalized (trim/dedupe) and capped, see TAG_LIMITS. */\n tags?: string[];\n /** String→string structured attributes; non-string values are rejected. */\n structuredAttributes?: Record<string, string>;\n /** Entity file reference (e.g. `person-jane-doe`). */\n entityRef?: string;\n /** Extraction confidence in [0, 1]. */\n confidence?: number;\n /** Opaque TTL expression (e.g. `90d` or an ISO date) — validated non-empty. */\n ttl?: string;\n /** Event-time validity start (ISO 8601). */\n validAt?: string;\n /** Connector identity that produced this write (issue #1852). */\n sourceConnector?: string;\n /** Origin class stamped at creation time (issue #1955). */\n origin?: string;\n /** Human-readable provenance note. */\n sourceReason?: string;\n}\n\n/** Context supplied by the write path, not by the payload author. */\nexport interface WriteContext {\n /** Frontmatter `source` string (e.g. `extraction`, `wearable:bee`). */\n source: string;\n /** Clock override for tests. */\n now?: () => Date;\n}\n\n/** Scope facts that participate in idempotency but never in frontmatter. */\nexport interface FingerprintScope {\n /** Access surface performing the write (e.g. `memory_store`, `observe`). */\n surface: string;\n namespace?: string;\n principal?: string;\n codingContext?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Normalization limits (single source of truth — docs/tags.md contract)\n// ---------------------------------------------------------------------------\n\nexport const TAG_LIMITS = Object.freeze({\n /** Maximum number of tags persisted per memory. */\n maxTags: 50,\n /** Maximum length of a single tag. */\n maxTagLength: 256,\n});\n\nexport const STRUCTURED_ATTRIBUTE_LIMITS = Object.freeze({\n /** Maximum number of structured attributes per memory. */\n maxEntries: 64,\n /** Maximum length of one attribute key. */\n maxKeyLength: 128,\n /** Maximum length of one attribute value. */\n maxValueLength: 1024,\n});\n\nconst MEMORY_CATEGORY_TABLE: Record<MemoryCategory, true> = {\n fact: true,\n preference: true,\n correction: true,\n entity: true,\n decision: true,\n relationship: true,\n principle: true,\n commitment: true,\n moment: true,\n skill: true,\n rule: true,\n procedure: true,\n reasoning_trace: true,\n};\n\nconst MEMORY_CATEGORY_NAMES = Object.keys(MEMORY_CATEGORY_TABLE).sort();\n\nexport function isMemoryCategory(value: string): value is MemoryCategory {\n return Object.prototype.hasOwnProperty.call(MEMORY_CATEGORY_TABLE, value);\n}\n\n// ---------------------------------------------------------------------------\n// Sealed envelope\n// ---------------------------------------------------------------------------\n\ndeclare const sealed: unique symbol;\n\n/**\n * A normalized, validated memory-write envelope.\n *\n * Opaque: only `composeMemoryEnvelope()` can mint one. Storage creation\n * entry points accept this type (PR2), so every write path is forced\n * through the composer at compile time.\n */\nexport interface SealedMemoryEnvelope {\n readonly [sealed]: true;\n /**\n * Caller-supplied content VERBATIM (validated non-empty-after-trim).\n * `StorageManager.writeMemory` persists content byte-for-byte (callers\n * that trim, e.g. explicit capture, do so before composing), so the\n * envelope must not transform it — the earlier compose-time trim/sanitize\n * broke byte-parity with extraction writes and was removed in PR2.\n */\n readonly content: string;\n /**\n * The exact body persistence will write: attribute-suffix enrichment then\n * combined sanitization, produced by the SAME `assemblePersistedBody`\n * helper `writeMemory` uses (issue #1989 PR2; AGENTS.md §13). This is the\n * form write-idempotency fingerprints hash.\n */\n readonly persistedBody: string;\n /** Injection patterns matched during body assembly (empty = clean). */\n readonly sanitizeViolations: readonly string[];\n /**\n * Salvage-mode hygiene notes (empty in strict mode): each dropped/clamped\n * invalid optional field is recorded here — visible, never silent\n * (repo rule 34). Callers persisting machine-generated input log these.\n */\n readonly salvageNotes: readonly string[];\n readonly category: MemoryCategory;\n readonly tags: readonly string[];\n /**\n * CANONICAL attributes (keys trim+lowercase, values trim) — the form\n * fingerprints and downstream consumers use; stable across caller casing.\n */\n readonly structuredAttributes: Readonly<Record<string, string>> | undefined;\n /**\n * The validated ORIGINAL attribute map, byte-preserved. `writeMemory`\n * persists frontmatter attributes raw (canonicalizing only the body\n * suffix via normalizeAttributePairs) — a pre-existing raw/canonical\n * inconsistency (supersession keys read the raw form). The sealed path\n * preserves those bytes; canonicalizing the frontmatter at the storage\n * boundary is a follow-up once the legacy path retires (#1989 PR4).\n */\n readonly rawStructuredAttributes: Readonly<Record<string, string>> | undefined;\n readonly entityRef: string | undefined;\n readonly confidence: number | undefined;\n readonly ttl: string | undefined;\n readonly validAt: string | undefined;\n readonly sourceConnector: string | undefined;\n readonly origin: string | undefined;\n readonly sourceReason: string | undefined;\n readonly source: string;\n /** ISO timestamp the envelope was composed (from ctx.now). */\n readonly composedAt: string;\n}\n\nfunction fail(field: string, message: string): never {\n throw new Error(`composeMemoryEnvelope: ${field} ${message}`);\n}\n\n/**\n * Compose-time input hygiene mode (issue #1989 PR2, review round on #2014).\n *\n * - `strict` (default): every invalid field throws — correct for OPERATOR\n * and API input (explicit capture, memory_store), where a bad value is a\n * caller bug that must surface.\n * - `salvage`: for MACHINE-GENERATED input (LLM extraction, wearable\n * ingestion). One malformed fact from an extractor must not abort a whole\n * persistence batch that legacy `writeMemory` would have accepted.\n * Invalid tags/attributes/optional fields are DROPPED with a note pushed\n * to `envelope.salvageNotes` — visible, never silent (repo rule 34);\n * callers log the notes. Content, category, ctx.source, and validAt stay\n * FATAL in both modes (legacy writeMemory also throws on bad validAt, and\n * a write without valid content/category cannot proceed).\n */\nexport interface ComposeEnvelopeOptions {\n salvage?: boolean;\n}\n\n/** Internal reporter: throws in strict mode, records a note in salvage. */\ninterface Hygiene {\n salvage: boolean;\n notes: string[];\n flag(field: string, message: string): void;\n}\n\nfunction makeHygiene(salvage: boolean): Hygiene {\n const notes: string[] = [];\n return {\n salvage,\n notes,\n flag(field: string, message: string): void {\n if (!salvage) fail(field, message);\n notes.push(`${field} ${message}`);\n },\n };\n}\n\n/**\n * Validate and CANONICALIZE `validAt` via the repo's shared flexible ISO\n * parser (`utils/iso-timestamp.ts`) — the same family durable writes use, so\n * the envelope can never accept a value storage would reject or reinterpret\n * (review findings on #1998: no second validation convention; reduced\n * precision like `2026-07-17T09:30Z` is valid; offsets are bounded ±14:00;\n * `Date.parse` alone is not an ISO validator).\n *\n * Canonical form is the epoch round-trip (`Date.toISOString()`), so\n * fingerprints are identical for `...T09:30Z`, `...T09:30:00.000Z`, and the\n * same instant expressed with an offset (§13 hash-consistency).\n */\nfunction validateIsoTimestamp(field: string, value: string): string {\n const trimmed = value.trim();\n if (trimmed.length === 0) fail(field, \"must be a non-empty ISO 8601 timestamp\");\n const epochMs = parseFlexibleIsoTimestamp(trimmed);\n if (epochMs === null) {\n fail(\n field,\n `is not a valid ISO 8601 date/timestamp: ${JSON.stringify(value)} (date-only, reduced precision, Z, and ±HH:MM offsets up to ±14:00 are accepted; calendar overflow is not)`,\n );\n }\n return new Date(epochMs).toISOString();\n}\n\nfunction normalizeEnvelopeTags(raw: string[] | undefined, hygiene: Hygiene): readonly string[] {\n if (raw === undefined) return Object.freeze([]);\n if (!Array.isArray(raw)) {\n hygiene.flag(\"tags\", \"must be an array of strings — dropped\");\n return Object.freeze([]);\n }\n const usable: string[] = [];\n for (const tag of raw) {\n if (typeof tag !== \"string\") {\n hygiene.flag(\"tags\", `entries must be strings (got ${typeof tag})`);\n continue;\n }\n if (tag.trim().length > TAG_LIMITS.maxTagLength) {\n hygiene.flag(\"tags\", `entry exceeds ${TAG_LIMITS.maxTagLength} characters: ${JSON.stringify(tag.slice(0, 40))}…`);\n continue;\n }\n usable.push(tag);\n }\n let normalized = normalizeTags(usable) ?? [];\n if (normalized.length > TAG_LIMITS.maxTags) {\n hygiene.flag(\"tags\", `exceed the ${TAG_LIMITS.maxTags}-tag limit (got ${normalized.length}) — keeping the first ${TAG_LIMITS.maxTags}`);\n normalized = normalized.slice(0, TAG_LIMITS.maxTags);\n }\n return Object.freeze(normalized);\n}\n\nfunction normalizeStructuredAttributes(\n raw: Record<string, string> | undefined,\n hygiene: Hygiene,\n): { canonical: Readonly<Record<string, string>>; raw: Readonly<Record<string, string>> } | undefined {\n if (raw === undefined) return undefined;\n if (\n raw === null ||\n typeof raw !== \"object\" ||\n Array.isArray(raw) ||\n (Object.getPrototypeOf(raw) !== Object.prototype && Object.getPrototypeOf(raw) !== null)\n ) {\n // Map/Date/class instances have empty Object.entries() and would\n // silently normalize to \"no attributes\" (review finding on #1998\n // round 5) — never a plain pass-through.\n hygiene.flag(\"structuredAttributes\", \"must be a plain object of string values (Map, Date, and class instances are rejected) — dropped\");\n return undefined;\n }\n let entries = Object.entries(raw);\n if (entries.length === 0) return undefined;\n if (entries.length > STRUCTURED_ATTRIBUTE_LIMITS.maxEntries) {\n hygiene.flag(\n \"structuredAttributes\",\n `exceed the ${STRUCTURED_ATTRIBUTE_LIMITS.maxEntries}-entry limit (got ${entries.length}) — keeping the first ${STRUCTURED_ATTRIBUTE_LIMITS.maxEntries} in insertion order`,\n );\n entries = entries.slice(0, STRUCTURED_ATTRIBUTE_LIMITS.maxEntries);\n }\n // Keys that collide with Object.prototype machinery are REJECTED outright:\n // `hashAccessIdempotencyPayload`'s stableStringify rebuilds objects with\n // plain assignment, where a \"__proto__\" own property silently vanishes —\n // so such a key can never round-trip through the fingerprint faithfully\n // (review finding on #1998 round 3). Rejection beats smuggling (§1/§39).\n const FORBIDDEN_ATTRIBUTE_KEYS = [\"__proto__\", \"constructor\", \"prototype\"];\n const out: Record<string, string> = Object.create(null);\n const survivingOriginal: Array<[string, string]> = [];\n for (const [key, value] of entries) {\n // Canonicalize exactly like storage's normalizeAttributePairs\n // (storage.ts:1277): keys trim+lowercase, values trim — so the\n // fingerprint and the persisted searchable form can never diverge\n // (review finding on #1998; AGENTS.md §13 hash-consistency).\n const cleanKey = key.trim().toLowerCase();\n if (cleanKey.length === 0) {\n hygiene.flag(\"structuredAttributes\", \"contain an empty key\");\n continue;\n }\n if (cleanKey.length > STRUCTURED_ATTRIBUTE_LIMITS.maxKeyLength) {\n hygiene.flag(\"structuredAttributes\", `key exceeds ${STRUCTURED_ATTRIBUTE_LIMITS.maxKeyLength} characters: ${JSON.stringify(cleanKey.slice(0, 40))}…`);\n continue;\n }\n if (typeof value !== \"string\") {\n hygiene.flag(\"structuredAttributes\", `value for ${JSON.stringify(cleanKey)} must be a string (got ${typeof value}) — stringify numbers/booleans at the call site`);\n continue;\n }\n const cleanValue = value.trim();\n if (FORBIDDEN_ATTRIBUTE_KEYS.includes(cleanKey)) {\n hygiene.flag(\n \"structuredAttributes\",\n `contain the reserved key ${JSON.stringify(cleanKey)} — prototype-machinery names cannot round-trip through fingerprint serialization`,\n );\n continue;\n }\n if (cleanValue.length > STRUCTURED_ATTRIBUTE_LIMITS.maxValueLength) {\n hygiene.flag(\"structuredAttributes\", `value for ${JSON.stringify(cleanKey)} exceeds ${STRUCTURED_ATTRIBUTE_LIMITS.maxValueLength} characters`);\n continue;\n }\n if (Object.hasOwn(out, cleanKey)) {\n hygiene.flag(\"structuredAttributes\", `contain duplicate key after canonicalization (trim + lowercase): ${JSON.stringify(cleanKey)}`);\n continue;\n }\n out[cleanKey] = cleanValue;\n survivingOriginal.push([key, value]);\n }\n if (Object.keys(out).length === 0) return undefined;\n // Copy onto a normal object so downstream JSON/stableStringify behavior is\n // unchanged; keys are already validated. The RAW map carries only the\n // SURVIVING original pairs — dropped entries must not reach frontmatter.\n return {\n canonical: Object.freeze({ ...out }),\n raw: Object.freeze(Object.fromEntries(survivingOriginal)),\n };\n}\n\nfunction normalizeOptionalString(\n field: string,\n value: string | undefined,\n hygiene: Hygiene,\n): string | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"string\") {\n hygiene.flag(field, `must be a string (got ${typeof value}) — dropped`);\n return undefined;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n hygiene.flag(field, \"must be non-empty when provided — dropped\");\n return undefined;\n }\n return trimmed;\n}\n\n/**\n * Compose (normalize + validate + seal) a memory-write envelope.\n *\n * Strict mode (default) throws on any invalid input — never silently\n * defaults (AGENTS.md §1/§39). Salvage mode (`{ salvage: true }`, for\n * machine-generated input like LLM extraction) drops invalid OPTIONAL\n * fields with notes on `envelope.salvageNotes` instead of aborting the\n * batch; content/category/source/validAt stay fatal in both modes.\n */\nexport function composeMemoryEnvelope(\n input: MemoryWriteInput,\n ctx: WriteContext,\n opts: ComposeEnvelopeOptions = {},\n): SealedMemoryEnvelope {\n if (input === null || typeof input !== \"object\") fail(\"input\", \"must be an object\");\n if (ctx === null || typeof ctx !== \"object\") fail(\"ctx\", \"must be an object\");\n const hygiene = makeHygiene(opts.salvage === true);\n\n if (typeof input.content !== \"string\" || input.content.trim().length === 0) {\n fail(\"content\", \"must be a non-empty string\");\n }\n if (typeof input.category !== \"string\" || !isMemoryCategory(input.category)) {\n fail(\n \"category\",\n `must be one of: ${MEMORY_CATEGORY_NAMES.join(\", \")} (got ${JSON.stringify(input.category)})`,\n );\n }\n if (typeof ctx.source !== \"string\" || ctx.source.trim().length === 0) {\n fail(\"ctx.source\", \"must be a non-empty string\");\n }\n\n let confidence: number | undefined;\n if (input.confidence !== undefined) {\n if (\n typeof input.confidence !== \"number\" ||\n !Number.isFinite(input.confidence) ||\n input.confidence < 0 ||\n input.confidence > 1\n ) {\n hygiene.flag(\n \"confidence\",\n `must be a finite number within [0, 1] (got ${String(input.confidence)}) — dropped (storage defaults apply)`,\n );\n } else {\n confidence = input.confidence;\n }\n }\n\n // validAt stays FATAL in salvage too: legacy writeMemory throws on an\n // invalid validAt (normalizeMemoryWriteTimestamp), so salvage-dropping it\n // would CHANGE behavior rather than preserve it.\n const validAt =\n input.validAt === undefined ? undefined : validateIsoTimestamp(\"validAt\", input.validAt);\n\n const now = ctx.now ? ctx.now() : new Date();\n if (!(now instanceof Date) || Number.isNaN(now.getTime())) {\n fail(\"ctx.now\", \"must return a valid Date\");\n }\n\n const attributes = normalizeStructuredAttributes(input.structuredAttributes, hygiene);\n // Assemble the EXACT persisted form (attribute suffix + combined sanitize)\n // with the same helper writeMemory uses — fingerprints hash this form, so\n // envelope and storage cannot diverge (§13; #1998 round-8 thread resolved\n // here in PR2 as promised). writeMemory assembles from the RAW map;\n // normalizeAttributePairs canonicalizes internally, so raw and canonical\n // maps yield the same suffix — asserted by the parity suite.\n const assembled = assemblePersistedBody(\n input.content,\n attributes ? { ...attributes.raw } : undefined,\n );\n if (assembled.text.trim().length === 0) {\n fail(\"content\", \"is empty after sanitization\");\n }\n\n const body = {\n content: input.content,\n persistedBody: assembled.text,\n sanitizeViolations: Object.freeze([...assembled.violations]),\n category: input.category,\n tags: normalizeEnvelopeTags(input.tags, hygiene),\n structuredAttributes: attributes?.canonical,\n rawStructuredAttributes: attributes?.raw,\n entityRef: normalizeOptionalString(\"entityRef\", input.entityRef, hygiene),\n confidence,\n ttl: normalizeOptionalString(\"ttl\", input.ttl, hygiene),\n validAt,\n sourceConnector: normalizeOptionalString(\"sourceConnector\", input.sourceConnector, hygiene),\n origin: normalizeOptionalString(\"origin\", input.origin, hygiene),\n sourceReason: normalizeOptionalString(\"sourceReason\", input.sourceReason, hygiene),\n source: ctx.source.trim(),\n composedAt: now.toISOString(),\n salvageNotes: Object.freeze([...hygiene.notes]),\n };\n const envelope = Object.freeze(body) as unknown as SealedMemoryEnvelope;\n SEALED_ENVELOPES.add(envelope);\n return envelope;\n}\n\n// The runtime seal registry. The declared `sealed` unique symbol exists only\n// at the type level (compile-time fence); this WeakSet is the runtime fence.\nconst SEALED_ENVELOPES = new WeakSet<object>();\n\n/**\n * TOCTOU guard for the structural arm (#2014 round 4): a frozen object may\n * still carry ACCESSOR properties whose getters return different values on\n * each read — valid data during re-composition, forged data when the write\n * path reads the field again. Frozen DATA properties are immutable, so\n * requiring data-only descriptors (on the envelope and its array/map\n * fields) makes every later read provably identical to the validated one.\n */\nfunction hasOnlyFrozenDataProperties(value: object): boolean {\n if (!Object.isFrozen(value)) return false;\n // Inherited accessors are as dangerous as own ones (round 5): a frozen\n // object can inherit a `tags` getter from a custom prototype. Composer\n // envelopes are plain object literals and plain arrays — require exactly\n // those prototypes so prototype-supplied getters cannot serve fields.\n const proto = Object.getPrototypeOf(value);\n if (Array.isArray(value)) {\n if (proto !== Array.prototype) return false;\n } else if (proto !== Object.prototype && proto !== null) {\n return false;\n }\n for (const key of Reflect.ownKeys(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (!descriptor || descriptor.get !== undefined || descriptor.set !== undefined) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Runtime check (belt) — the compile-time brand is the real fence.\n *\n * Fast path: WeakSet membership (same module graph). Fallback: RE-COMPOSITION\n * EQUIVALENCE — Node resolves `@remnic/core` through `dist/` for built\n * consumers and `src/` for tsx-loaded tests, and each graph gets its OWN\n * WeakSet, so identity alone would reject genuinely-sealed envelopes that\n * crossed a build boundary. The structural arm requires frozen DATA-only\n * properties (no accessors — TOCTOU guard, round 4), then re-runs the\n * STRICT composer on the candidate's own inputs and demands every envelope\n * field reproduce exactly (#2014 round 2: shape-only validation admitted\n * lookalikes with 51 tags or out-of-range confidence). A value that\n * survives has, by construction, passed every composer invariant, and its\n * fields cannot change between validation and the write that follows.\n *\n * `salvageNotes` is deliberately NOT compared: a legitimately salvage-minted\n * envelope carries notes while the strict re-composition of its (already\n * clean) surviving fields yields none. Notes are advisory provenance, not\n * identity — every load-bearing field is still verified.\n */\n\nexport function isSealedMemoryEnvelope(value: unknown): value is SealedMemoryEnvelope {\n if (typeof value !== \"object\" || value === null) return false;\n if (SEALED_ENVELOPES.has(value)) return true;\n if (!hasOnlyFrozenDataProperties(value)) return false;\n const v = value as Partial<SealedMemoryEnvelope>;\n if (\n typeof v.content !== \"string\" ||\n typeof v.persistedBody !== \"string\" ||\n typeof v.source !== \"string\" ||\n typeof v.composedAt !== \"string\" ||\n typeof v.category !== \"string\" ||\n !isMemoryCategory(v.category) ||\n !Array.isArray(v.tags) ||\n !hasOnlyFrozenDataProperties(v.tags) ||\n !Array.isArray(v.sanitizeViolations) ||\n !hasOnlyFrozenDataProperties(v.sanitizeViolations) ||\n !Array.isArray(v.salvageNotes) ||\n !hasOnlyFrozenDataProperties(v.salvageNotes)\n ) {\n return false;\n }\n const attrs = v.rawStructuredAttributes;\n if (\n attrs !== undefined &&\n (attrs === null || typeof attrs !== \"object\" || Array.isArray(attrs) || !hasOnlyFrozenDataProperties(attrs))\n ) {\n return false;\n }\n const canonicalAttrs = v.structuredAttributes;\n if (\n canonicalAttrs !== undefined &&\n (canonicalAttrs === null ||\n typeof canonicalAttrs !== \"object\" ||\n Array.isArray(canonicalAttrs) ||\n !hasOnlyFrozenDataProperties(canonicalAttrs))\n ) {\n return false;\n }\n let rebuilt: SealedMemoryEnvelope;\n try {\n rebuilt = composeMemoryEnvelope(\n {\n content: v.content,\n category: v.category,\n ...(v.tags.length > 0 ? { tags: [...(v.tags as string[])] } : {}),\n ...(attrs !== undefined ? { structuredAttributes: { ...attrs } } : {}),\n ...(v.entityRef !== undefined ? { entityRef: v.entityRef } : {}),\n ...(v.confidence !== undefined ? { confidence: v.confidence } : {}),\n ...(v.ttl !== undefined ? { ttl: v.ttl } : {}),\n ...(v.validAt !== undefined ? { validAt: v.validAt } : {}),\n ...(v.sourceConnector !== undefined ? { sourceConnector: v.sourceConnector } : {}),\n ...(v.origin !== undefined ? { origin: v.origin } : {}),\n ...(v.sourceReason !== undefined ? { sourceReason: v.sourceReason } : {}),\n },\n { source: v.source, now: () => new Date(v.composedAt as string) },\n );\n } catch {\n // Strict re-composition rejected an input — the candidate carries a\n // value the composer would never have minted.\n return false;\n }\n const sameArray = (a: readonly string[], b: readonly string[]): boolean =>\n a.length === b.length && a.every((entry, i) => entry === b[i]);\n const sameMap = (\n a: Readonly<Record<string, string>> | undefined,\n b: Readonly<Record<string, string>> | undefined,\n ): boolean => {\n if (a === undefined || b === undefined) return a === b;\n const ak = Object.keys(a);\n const bk = Object.keys(b);\n return ak.length === bk.length && ak.every((k) => Object.hasOwn(b, k) && a[k] === b[k]);\n };\n return (\n rebuilt.content === v.content &&\n rebuilt.persistedBody === v.persistedBody &&\n rebuilt.category === v.category &&\n rebuilt.source === v.source &&\n rebuilt.composedAt === v.composedAt &&\n rebuilt.confidence === v.confidence &&\n rebuilt.entityRef === v.entityRef &&\n rebuilt.ttl === v.ttl &&\n rebuilt.validAt === v.validAt &&\n rebuilt.sourceConnector === v.sourceConnector &&\n rebuilt.origin === v.origin &&\n rebuilt.sourceReason === v.sourceReason &&\n sameArray(rebuilt.tags, v.tags as string[]) &&\n sameArray(rebuilt.sanitizeViolations, v.sanitizeViolations as string[]) &&\n sameMap(rebuilt.structuredAttributes, v.structuredAttributes) &&\n sameMap(rebuilt.rawStructuredAttributes, attrs)\n );\n}\n\n/**\n * The ONE mapping from a sealed envelope (+ extras) to the legacy\n * `writeMemory(category, content, options)` argument shape. Used by\n * `StorageManager.writeSealedMemory` AND by test doubles that stub storage —\n * so mock fidelity (AGENTS.md §21) cannot drift from production.\n */\nexport function sealedWriteToLegacyArgs(\n envelope: SealedMemoryEnvelope,\n extras: Record<string, unknown> = {},\n): { category: MemoryCategory; content: string; options: Record<string, unknown> } {\n return {\n category: envelope.category,\n content: envelope.content,\n options: {\n ...extras,\n confidence: envelope.confidence,\n tags: envelope.tags.length > 0 ? [...envelope.tags] : undefined,\n entityRef: envelope.entityRef,\n source: envelope.source,\n expiresAt: envelope.ttl,\n validAt: envelope.validAt,\n // RAW map for frontmatter byte-parity with the legacy path; the body\n // suffix canonicalizes identically from either form.\n structuredAttributes: envelope.rawStructuredAttributes\n ? { ...envelope.rawStructuredAttributes }\n : undefined,\n // Unconditional (round 3): envelope-owned fields must ALWAYS overwrite\n // extras — a conditional spread let extras.sourceConnector smuggle\n // unvalidated connector provenance past the sealed envelope when the\n // envelope had none.\n sourceConnector: envelope.sourceConnector,\n origin: envelope.origin,\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Idempotency field registry\n// ---------------------------------------------------------------------------\n\n/**\n * Ordered registry of envelope fields that participate in write-idempotency\n * fingerprints. Adding a fingerprint-relevant field = one entry here; every\n * surface that builds its payload via `buildWriteIdempotencyPayload()` picks\n * it up automatically.\n */\nexport const WRITE_FINGERPRINT_FIELDS = [\n \"content\",\n \"category\",\n \"tags\",\n \"structuredAttributes\",\n \"entityRef\",\n \"ttl\",\n \"validAt\",\n \"sourceConnector\",\n] as const satisfies readonly (keyof MemoryWriteInput)[];\n\n/**\n * Envelope fields deliberately EXCLUDED from fingerprints. Exempting a field\n * is a visible, reviewable decision — this list exists so the exhaustiveness\n * guard can force every new `MemoryWriteInput` field to be classified.\n */\nexport const FINGERPRINT_EXEMPT_FIELDS = [\n // Confidence is a scoring detail: two extractions of the same fact with\n // slightly different confidence are the same write for dedup purposes.\n \"confidence\",\n // Free-text provenance note; carries no identity.\n // Origin is provenance metadata, not write identity (#1955).\n \"origin\",\n \"sourceReason\",\n] as const satisfies readonly (keyof MemoryWriteInput)[];\n\n/** Scope keys always folded into the fingerprint payload. */\nexport const FINGERPRINT_SCOPE_FIELDS = [\n \"surface\",\n \"namespace\",\n \"principal\",\n \"codingContext\",\n] as const satisfies readonly (keyof FingerprintScope)[];\n\n// --- compile-time exhaustiveness guards ------------------------------------\n// A new MemoryWriteInput field that is in NEITHER list is a compile error;\n// a registry entry that names a non-existent field is a compile error; a\n// field in BOTH lists is a compile error.\n\ntype RegistryField = (typeof WRITE_FINGERPRINT_FIELDS)[number];\ntype ExemptField = (typeof FINGERPRINT_EXEMPT_FIELDS)[number];\ntype UnclassifiedField = Exclude<keyof MemoryWriteInput, RegistryField | ExemptField>;\ntype DoublyClassifiedField = RegistryField & ExemptField;\n\nconst assertEveryFieldClassified: UnclassifiedField extends never ? true : never = true;\nconst assertNoDoubleClassification: DoublyClassifiedField extends never ? true : never = true;\nvoid assertEveryFieldClassified;\nvoid assertNoDoubleClassification;\n\n// ---------------------------------------------------------------------------\n// Payload builder\n// ---------------------------------------------------------------------------\n\n/**\n * Build the canonical write-idempotency payload for a sealed envelope.\n *\n * Determinism guarantees (AGENTS.md §26):\n * - tags are SORTED in the payload (tag order never changes identity);\n * - structured attributes are serialized key-sorted by the existing\n * `stableStringify` inside `hashAccessIdempotencyPayload`;\n * - the payload shape is versioned (`v: 1`) so a future field-semantics\n * change can migrate stored idempotency state explicitly instead of\n * silently colliding.\n *\n * Feed the result to `hashAccessIdempotencyPayload()` — this module does\n * not hash so surfaces keep a single hashing implementation.\n */\nexport function buildWriteIdempotencyPayload(\n envelope: SealedMemoryEnvelope,\n scope: FingerprintScope,\n): Record<string, unknown> {\n if (!isSealedMemoryEnvelope(envelope)) {\n throw new Error(\n \"buildWriteIdempotencyPayload: envelope must be minted by composeMemoryEnvelope\",\n );\n }\n if (scope === null || typeof scope !== \"object\") {\n throw new Error(\"buildWriteIdempotencyPayload: scope must be an object\");\n }\n if (typeof scope.surface !== \"string\" || scope.surface.trim().length === 0) {\n throw new Error(\"buildWriteIdempotencyPayload: scope.surface must be a non-empty string\");\n }\n\n const fields: Record<string, unknown> = {};\n for (const field of WRITE_FINGERPRINT_FIELDS) {\n const value = envelope[field];\n if (value === undefined) continue;\n if (field === \"tags\") {\n const tags = value as readonly string[];\n if (tags.length === 0) continue;\n fields.tags = [...tags].sort();\n continue;\n }\n if (field === \"content\") {\n // Fingerprints hash the PERSISTED form (attribute suffix + combined\n // sanitize), not the raw input — one instant of stored state, one\n // fingerprint (§13; issue #1989 PR2).\n fields.content = envelope.persistedBody;\n continue;\n }\n fields[field] = value;\n }\n // The write source (extraction vs wearable:bee vs observe replay, ...) is\n // identity: the same content arriving from two different sources must not\n // dedupe into one write (review finding on #1998). Not a MemoryWriteInput\n // key, so it rides beside the registry fields explicitly.\n fields.source = envelope.source;\n\n const scopeOut: Record<string, string> = {};\n for (const key of FINGERPRINT_SCOPE_FIELDS) {\n const value = scope[key];\n if (value === undefined) continue;\n if (typeof value !== \"string\") {\n throw new Error(`buildWriteIdempotencyPayload: scope.${key} must be a string`);\n }\n // Trimmed: \"ns\" and \"ns \" must not mint distinct fingerprints (review\n // finding on #1998). Empty-after-trim optional scope values are dropped.\n const cleanValue = value.trim();\n if (key === \"surface\" || cleanValue.length > 0) {\n scopeOut[key] = cleanValue;\n }\n }\n\n return { v: 1, kind: \"memory-write\", fields, scope: scopeOut };\n}\n\n// ---------------------------------------------------------------------------\n// Access-surface request fingerprints (issue #1989 PR3)\n// ---------------------------------------------------------------------------\n//\n// The access surfaces (memory_store / suggestion_submit writes, their peek\n// twins, and observe) key their idempotency dedup on a hash of the RAW\n// request — computed BEFORE validation, and persisted indefinitely in\n// `AccessIdempotencyStore` (last-512 LRU, no time TTL). Those stored hashes\n// are load-bearing state: changing the payload shape would silently break\n// replay/conflict detection for every in-flight key. So these builders\n// REPRODUCE each surface's historical shape byte-for-byte (asserted by the\n// parity suite) instead of adopting the versioned envelope payload above —\n// a versioned migration of stored state is the explicit prerequisite for\n// unifying them (#1989 PR3 scope note).\n//\n// What centralizing buys even under byte-parity: one module now owns every\n// fingerprint shape, and the compile-time assertion below ties the write\n// shape to WRITE_FINGERPRINT_FIELDS — adding a fingerprint-relevant field\n// to MemoryWriteInput fails compilation here until the author decides how\n// the access surfaces represent it.\n\n/** The raw request fields the write surfaces fingerprint (legacy shape). */\nexport interface AccessWriteFingerprintParts {\n schemaVersion: number;\n namespace: string;\n content: string;\n category?: string;\n confidence?: number;\n tags?: string[];\n entityRef?: string;\n ttl?: string;\n sourceReason?: string;\n sourceConnector?: string;\n}\n\n// Registry coupling: every fingerprint-relevant MemoryWriteInput field must\n// either appear in AccessWriteFingerprintParts or be named in this explicit\n// exemption list. `structuredAttributes` and `validAt` are exempt because\n// the access write requests cannot express them today (ExplicitCaptureInput\n// has no such fields) — the moment they become representable, this type\n// stops compiling and forces a fingerprint decision (+ versioned state\n// migration) instead of a silent dedup gap.\ntype AccessSurfaceUnrepresentable = \"structuredAttributes\" | \"validAt\";\ntype UncoveredAccessFingerprintField = Exclude<\n Extract<RegistryField, keyof MemoryWriteInput>,\n keyof AccessWriteFingerprintParts | AccessSurfaceUnrepresentable\n>;\nconst assertAccessFingerprintCoversRegistry: UncoveredAccessFingerprintField extends never\n ? true\n : never = true;\nvoid assertAccessFingerprintCoversRegistry;\n\n/**\n * Fingerprint payload for `memory_store` / `suggestion_submit` (write AND\n * peek paths — both MUST call this so peek can never diverge from the\n * write it predicts). Key set and values reproduce the historical inline\n * literals exactly; `hashAccessIdempotencyPayload`'s stableStringify sorts\n * keys and drops `undefined`, so optional absent fields hash identically\n * to the old shape.\n */\nexport function buildAccessWriteRequestFingerprint(\n parts: AccessWriteFingerprintParts,\n): Record<string, unknown> {\n return {\n schemaVersion: parts.schemaVersion,\n content: parts.content,\n category: parts.category,\n confidence: parts.confidence,\n namespace: parts.namespace,\n tags: parts.tags,\n entityRef: parts.entityRef,\n ttl: parts.ttl,\n sourceReason: parts.sourceReason,\n sourceConnector: parts.sourceConnector,\n };\n}\n\n/** The raw request fields the observe surface fingerprints (legacy shape). */\nexport interface ObserveFingerprintParts {\n sessionKey: string;\n messages: unknown;\n namespace?: string;\n skipExtraction?: boolean;\n authenticatedPrincipal?: string;\n cwd?: string;\n projectTag?: string;\n /** Resolved coding context — `null` (not undefined) when absent, matching the historical literal. */\n effectiveCodingContext: unknown;\n sourceConnector?: string;\n}\n\n/**\n * Fingerprint payload for `observe` — turn ingestion, not a memory write,\n * so it fingerprints session/message identity rather than MemoryWriteInput\n * fields. Shape reproduces the historical inline literal exactly.\n */\nexport function buildObserveRequestFingerprint(\n parts: ObserveFingerprintParts,\n): Record<string, unknown> {\n return {\n sessionKey: parts.sessionKey,\n messages: parts.messages,\n namespace: parts.namespace,\n skipExtraction: parts.skipExtraction,\n authenticatedPrincipal: parts.authenticatedPrincipal,\n cwd: parts.cwd,\n projectTag: parts.projectTag,\n effectiveCodingContext: parts.effectiveCodingContext,\n sourceConnector: parts.sourceConnector,\n };\n}\n"],"mappings":";;;;;;;;;;;AAwFO,IAAM,aAAa,OAAO,OAAO;AAAA;AAAA,EAEtC,SAAS;AAAA;AAAA,EAET,cAAc;AAChB,CAAC;AAEM,IAAM,8BAA8B,OAAO,OAAO;AAAA;AAAA,EAEvD,YAAY;AAAA;AAAA,EAEZ,cAAc;AAAA;AAAA,EAEd,g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;AAAA,IAC/E;AAGA,UAAM,aAAa,MAAM,KAAK;AAC9B,QAAI,QAAQ,aAAa,WAAW,SAAS,GAAG;AAC9C,eAAS,GAAG,IAAI;AAAA,IAClB;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,GAAG,MAAM,gBAAgB,QAAQ,OAAO,SAAS;AAC/D;AA8DO,SAAS,mCACd,OACyB;AACzB,SAAO;AAAA,IACL,eAAe,MAAM;AAAA,IACrB,SAAS,MAAM;AAAA,IACf,UAAU,MAAM;AAAA,IAChB,YAAY,MAAM;AAAA,IAClB,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA,IACZ,WAAW,MAAM;AAAA,IACjB,KAAK,MAAM;AAAA,IACX,cAAc,MAAM;AAAA,IACpB,iBAAiB,MAAM;AAAA,EACzB;AACF;AAqBO,SAAS,+BACd,OACyB;AACzB,SAAO;AAAA,IACL,YAAY,MAAM;AAAA,IAClB,UAAU,MAAM;AAAA,IAChB,WAAW,MAAM;AAAA,IACjB,gBAAgB,MAAM;AAAA,IACtB,wBAAwB,MAAM;AAAA,IAC9B,KAAK,MAAM;AAAA,IACX,YAAY,MAAM;AAAA,IAClB,wBAAwB,MAAM;AAAA,IAC9B,iBAAiB,MAAM;AAAA,EACzB;AACF;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-M4YHAODQ.js";
3
+ } from "./chunk-BWJMBJCY.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
- } from "./chunk-NSVDUN76.js";
6
+ } from "./chunk-LCU5R6TQ.js";
7
7
  import {
8
8
  log
9
9
  } from "./chunk-3WCASNQZ.js";
@@ -521,7 +521,7 @@ async function promoteSemanticRuleFromMemory(options) {
521
521
  }
522
522
  await lock.beforePromotedRuleWrite();
523
523
  const ruleEnvelope = composeMemoryEnvelope(
524
- { content, category: "rule", confidence, tags: candidateBase.tags },
524
+ { content, category: "rule", confidence, tags: candidateBase.tags, origin: sourceMemory.frontmatter.origin },
525
525
  { source: "semantic-rule-promotion" },
526
526
  { salvage: true }
527
527
  );
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-IQ4NVWEF.js.map
549
+ //# sourceMappingURL=chunk-LYPG7GOO.js.map