@remnic/core 9.54.8 → 9.56.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 (571) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -11
  2. package/dist/access-admin-ops-surface.js +44 -43
  3. package/dist/access-authorization-probe.d.ts +11 -11
  4. package/dist/access-authorization-probe.js +45 -44
  5. package/dist/access-boundary.d.ts +11 -11
  6. package/dist/access-boundary.js +44 -43
  7. package/dist/access-cli.js +114 -112
  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 +44 -43
  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 +44 -43
  17. package/dist/access-http.d.ts +12 -12
  18. package/dist/access-http.js +58 -57
  19. package/dist/access-identity-continuity-surface.d.ts +9 -9
  20. package/dist/access-identity-continuity-surface.js +44 -43
  21. package/dist/access-lcm-surface.d.ts +11 -11
  22. package/dist/access-lcm-surface.js +44 -43
  23. package/dist/access-mcp.d.ts +11 -11
  24. package/dist/access-mcp.js +53 -52
  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 +44 -43
  30. package/dist/access-observe-write-surface.d.ts +11 -11
  31. package/dist/access-observe-write-surface.js +44 -43
  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 +48 -47
  35. package/dist/access-operations.d.ts +11 -11
  36. package/dist/access-operations.js +52 -51
  37. package/dist/access-recall-concurrency.d.ts +11 -11
  38. package/dist/access-recall-concurrency.js +44 -43
  39. package/dist/access-recall-response.d.ts +11 -11
  40. package/dist/access-recall-response.js +44 -43
  41. package/dist/access-recall-surface.d.ts +11 -11
  42. package/dist/access-recall-surface.js +44 -43
  43. package/dist/access-schema.js +3 -3
  44. package/dist/{access-service-PEduVt8q.d.ts → access-service-D9xXmKvd.d.ts} +7 -7
  45. package/dist/access-service-helpers.d.ts +11 -11
  46. package/dist/access-service.d.ts +11 -11
  47. package/dist/access-service.js +44 -43
  48. package/dist/access-surface-catalog.d.ts +11 -11
  49. package/dist/access-surface-catalog.js +46 -45
  50. package/dist/access-surface-catalog.js.map +1 -1
  51. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  52. package/dist/action-confidence.d.ts +1 -1
  53. package/dist/active-memory-bridge.d.ts +1 -1
  54. package/dist/active-memory-bridge.js +3 -3
  55. package/dist/active-recall.d.ts +1 -1
  56. package/dist/active-recall.js +4 -2
  57. package/dist/active-recall.js.map +1 -1
  58. package/dist/ambient-provenance.d.ts +1 -1
  59. package/dist/artifact-search.d.ts +1 -1
  60. package/dist/{auto-sync-NR3GPCOA.js → auto-sync-5HVRCMGZ.js} +3 -3
  61. package/dist/behavior-learner.d.ts +1 -1
  62. package/dist/behavior-signals.d.ts +1 -1
  63. package/dist/bootstrap.d.ts +9 -9
  64. package/dist/briefing-window.d.ts +2 -2
  65. package/dist/briefing.d.ts +2 -2
  66. package/dist/briefing.js +14 -13
  67. package/dist/buffer-surprise-report.d.ts +1 -1
  68. package/dist/buffer-turn-helpers.d.ts +1 -1
  69. package/dist/buffer.d.ts +2 -2
  70. package/dist/buffer.js +6 -5
  71. package/dist/bulk-import/index.d.ts +3 -3
  72. package/dist/calibration.d.ts +1 -1
  73. package/dist/capabilities.d.ts +8 -8
  74. package/dist/capabilities.js +1 -1
  75. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  76. package/dist/{catalog-DGFf8mD9.d.ts → catalog-BasnO3Bw.d.ts} +1 -1
  77. package/dist/causal-behavior.d.ts +1 -1
  78. package/dist/causal-behavior.js +2 -2
  79. package/dist/causal-chain.js +2 -2
  80. package/dist/causal-consolidation.d.ts +1 -1
  81. package/dist/causal-consolidation.js +17 -16
  82. package/dist/causal-consolidation.js.map +1 -1
  83. package/dist/causal-retrieval.js +2 -2
  84. package/dist/causal-trajectory-graph.d.ts +1 -1
  85. package/dist/causal-trajectory-graph.js +2 -2
  86. package/dist/causal-trajectory.js +1 -1
  87. package/dist/{chunk-I6WYQSX4.js → chunk-2NKY7OC6.js} +14 -2
  88. package/dist/chunk-2NKY7OC6.js.map +1 -0
  89. package/dist/{chunk-E2GZSFR5.js → chunk-2YREVL4T.js} +2 -2
  90. package/dist/{chunk-PG4QBPVG.js → chunk-3VFVQDZO.js} +8 -4
  91. package/dist/chunk-3VFVQDZO.js.map +1 -0
  92. package/dist/{chunk-KM55SMLG.js → chunk-4KM3V6VS.js} +2 -2
  93. package/dist/{chunk-HAEU3ZW7.js → chunk-4OW2T32G.js} +2 -2
  94. package/dist/{chunk-PCRHFB75.js → chunk-4QFCAKNM.js} +1 -1
  95. package/dist/{chunk-OS5DYALF.js → chunk-4THNU7OF.js} +422 -47
  96. package/dist/chunk-4THNU7OF.js.map +1 -0
  97. package/dist/{chunk-76JJSXK7.js → chunk-5QHDXMXP.js} +1 -1
  98. package/dist/chunk-5QHDXMXP.js.map +1 -0
  99. package/dist/{chunk-OWC42MDT.js → chunk-5ZIWRMZM.js} +2 -2
  100. package/dist/{chunk-GWFSVJ4P.js → chunk-6KTXE6A3.js} +2 -2
  101. package/dist/{chunk-5V64M56S.js → chunk-6P2NUVM5.js} +26 -24
  102. package/dist/chunk-6P2NUVM5.js.map +1 -0
  103. package/dist/chunk-6Q3ZTEF6.js +54 -0
  104. package/dist/chunk-6Q3ZTEF6.js.map +1 -0
  105. package/dist/{chunk-P2FA65P2.js → chunk-7NSC4IVA.js} +2 -2
  106. package/dist/{chunk-QC6BILS7.js → chunk-7PKNOXYB.js} +11 -11
  107. package/dist/{chunk-AHVEHR6K.js → chunk-7ZNJN5WZ.js} +13 -1
  108. package/dist/chunk-7ZNJN5WZ.js.map +1 -0
  109. package/dist/{chunk-RZRUV6N2.js → chunk-ANMIOQPU.js} +2 -2
  110. package/dist/{chunk-RPSYDM6C.js → chunk-BPWZDHFM.js} +2 -2
  111. package/dist/{chunk-JKW663ZN.js → chunk-BVRREV3N.js} +2 -2
  112. package/dist/{chunk-XXRRHING.js → chunk-BWJMBJCY.js} +24 -15
  113. package/dist/chunk-BWJMBJCY.js.map +1 -0
  114. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  115. package/dist/{chunk-ELXP665P.js → chunk-CKSEJD7K.js} +2 -2
  116. package/dist/{chunk-4GE3NA5I.js → chunk-CME347TM.js} +2 -2
  117. package/dist/{chunk-BGLY7EEM.js → chunk-CMRUIKVA.js} +3 -3
  118. package/dist/{chunk-HGJ6NJ4E.js → chunk-D4LVHPOA.js} +2 -2
  119. package/dist/{chunk-YK6BDDHP.js → chunk-DFEODULB.js} +2 -2
  120. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  121. package/dist/{chunk-XWZ6KOL6.js → chunk-E57E5SCS.js} +2 -2
  122. package/dist/{chunk-M23RF3LJ.js → chunk-ER4BLWI6.js} +2 -2
  123. package/dist/{chunk-47J4EDGR.js → chunk-F7M36OG2.js} +3 -3
  124. package/dist/{chunk-MTF5EFFF.js → chunk-FK7T55BA.js} +60 -41
  125. package/dist/{chunk-MTF5EFFF.js.map → chunk-FK7T55BA.js.map} +1 -1
  126. package/dist/{chunk-ZUJW327U.js → chunk-FONW766A.js} +2 -2
  127. package/dist/{chunk-FEBHRT2I.js → chunk-FR3FNPCJ.js} +3 -3
  128. package/dist/{chunk-G6DFSS6A.js → chunk-GUNIXT36.js} +2 -2
  129. package/dist/{chunk-K2UGPTYY.js → chunk-H6ZXNH5I.js} +2 -2
  130. package/dist/{chunk-Z463UYI6.js → chunk-HC55YCNK.js} +2 -2
  131. package/dist/{chunk-IEQCHXUS.js → chunk-HQ2VGCGP.js} +14 -14
  132. package/dist/{chunk-ZXGKQQ3L.js → chunk-HXXGZ4KV.js} +1 -1
  133. package/dist/{chunk-YZFPEHXF.js → chunk-HYVBJLEK.js} +5 -5
  134. package/dist/{chunk-FPKKFDO4.js → chunk-IFFW25NG.js} +246 -118
  135. package/dist/chunk-IFFW25NG.js.map +1 -0
  136. package/dist/{chunk-3GD2HFR6.js → chunk-IGWVMA4Y.js} +2 -2
  137. package/dist/{chunk-FONWBCVY.js → chunk-IKT6ZVO7.js} +3 -3
  138. package/dist/{chunk-KMWYZTIE.js → chunk-ION47U3Z.js} +3 -3
  139. package/dist/{chunk-OCIP6YMD.js → chunk-IXGQP4RZ.js} +3 -3
  140. package/dist/{chunk-FYZKFLKY.js → chunk-JFPZEWY3.js} +3 -3
  141. package/dist/{chunk-SMNYAMJD.js → chunk-JKL53MOY.js} +4 -4
  142. package/dist/{chunk-2T5AWWMF.js → chunk-JOA4Q765.js} +3 -3
  143. package/dist/{chunk-2XRE6FLM.js → chunk-JUOZ62Y7.js} +3 -1
  144. package/dist/chunk-JUOZ62Y7.js.map +1 -0
  145. package/dist/{chunk-MLPTFODV.js → chunk-KHQ57QLJ.js} +4 -4
  146. package/dist/{chunk-NSVDUN76.js → chunk-LCU5R6TQ.js} +8 -3
  147. package/dist/chunk-LCU5R6TQ.js.map +1 -0
  148. package/dist/{chunk-OTUFRUV3.js → chunk-LYPG7GOO.js} +4 -4
  149. package/dist/{chunk-OTUFRUV3.js.map → chunk-LYPG7GOO.js.map} +1 -1
  150. package/dist/{chunk-KRTY3ENI.js → chunk-MDVBCPOS.js} +2 -2
  151. package/dist/{chunk-M3UYE6PS.js → chunk-N655QIA2.js} +4 -4
  152. package/dist/{chunk-5NB726GV.js → chunk-NFQB6RJT.js} +3 -3
  153. package/dist/{chunk-OIOV4RJE.js → chunk-NP7FLVZW.js} +2 -2
  154. package/dist/{chunk-CX5SW2EW.js → chunk-NRFU5MVH.js} +4 -4
  155. package/dist/{chunk-QDWDVNWU.js → chunk-O4TTIMOP.js} +2 -2
  156. package/dist/{chunk-XCO2NXPZ.js → chunk-O54B5YNM.js} +3 -3
  157. package/dist/{chunk-UQWUDD7E.js → chunk-ONCWJBWV.js} +3 -3
  158. package/dist/{chunk-Z3SQEEB6.js → chunk-PD66CVSD.js} +2 -2
  159. package/dist/{chunk-QYN5PXDZ.js → chunk-PPUTUOC3.js} +2 -2
  160. package/dist/{chunk-TPWBUKS3.js → chunk-PSH3VFZ7.js} +4 -4
  161. package/dist/{chunk-MK5VEWCR.js → chunk-QKPDN325.js} +2 -2
  162. package/dist/{chunk-EVWWT3KE.js → chunk-QP2IZTUR.js} +2 -2
  163. package/dist/{chunk-4ESX4WX2.js → chunk-QSDPVZPD.js} +5 -5
  164. package/dist/{chunk-LHIBA4G7.js → chunk-QV7OEHFN.js} +2 -2
  165. package/dist/{chunk-3DVG3GRQ.js → chunk-QZR3WT3L.js} +2 -2
  166. package/dist/{chunk-EEAMSNSG.js → chunk-R7TZ2HCS.js} +2 -2
  167. package/dist/{chunk-IOYXIY7W.js → chunk-R7UHWPYI.js} +2 -2
  168. package/dist/{chunk-L6Z5OAS4.js → chunk-RL3EGL7A.js} +2 -2
  169. package/dist/{chunk-7SF5BAWF.js → chunk-S6AH7WSF.js} +3 -3
  170. package/dist/{chunk-QGKCM7C4.js → chunk-SFCJCMZQ.js} +5 -5
  171. package/dist/{chunk-K44N3CFW.js → chunk-T3HC7RJ7.js} +2 -2
  172. package/dist/chunk-T3JQTCCO.js +94 -0
  173. package/dist/chunk-T3JQTCCO.js.map +1 -0
  174. package/dist/{chunk-6PCND4O2.js → chunk-T6EQPZ6E.js} +4 -4
  175. package/dist/{chunk-G7YUH4WT.js → chunk-TAMY4NKO.js} +2 -2
  176. package/dist/{chunk-XDBFSUHX.js → chunk-TAPFJ3ET.js} +2 -2
  177. package/dist/{chunk-MANCJV6J.js → chunk-TF3LMM5E.js} +2 -2
  178. package/dist/{chunk-2GD6MLXD.js → chunk-TFXYQNBH.js} +12 -12
  179. package/dist/{chunk-7DISPKXT.js → chunk-THACANBI.js} +4 -4
  180. package/dist/{chunk-6G4D222J.js → chunk-TLVLJSWS.js} +2 -2
  181. package/dist/{chunk-6QPI2ITJ.js → chunk-TVKWT2CY.js} +4 -4
  182. package/dist/{chunk-H7NAZ3UB.js → chunk-U7BMN33M.js} +2 -2
  183. package/dist/{chunk-BXIMH7MC.js → chunk-UTDMY476.js} +49 -5
  184. package/dist/chunk-UTDMY476.js.map +1 -0
  185. package/dist/{chunk-6LKEUCEM.js → chunk-UXREWVW4.js} +2 -2
  186. package/dist/{chunk-SUPEYLH2.js → chunk-UYCIS6V5.js} +2 -2
  187. package/dist/{chunk-F2BOUJUS.js → chunk-V3IT3XNG.js} +9 -9
  188. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  189. package/dist/{chunk-NUA4VM46.js → chunk-VWP5DEHU.js} +2 -2
  190. package/dist/{chunk-NQMSEB5D.js → chunk-X5OIPQME.js} +2 -2
  191. package/dist/{chunk-RBII7637.js → chunk-XRPPHIRI.js} +2 -2
  192. package/dist/{chunk-OLT3YTDH.js → chunk-YMOPYG3K.js} +4 -4
  193. package/dist/{cli-DNvGlD4i.d.ts → cli-DTOkYhKI.d.ts} +61 -11
  194. package/dist/cli.d.ts +18 -18
  195. package/dist/cli.js +84 -80
  196. package/dist/coding/pre-action-gate.d.ts +1 -1
  197. package/dist/coding/pre-action-gate.js +2 -2
  198. package/dist/compounding/engine.d.ts +2 -2
  199. package/dist/compounding/engine.js +16 -15
  200. package/dist/compounding/preference-consolidator.d.ts +1 -1
  201. package/dist/compression-optimizer.d.ts +1 -1
  202. package/dist/config-security.d.ts +7 -0
  203. package/dist/config-security.js +12 -0
  204. package/dist/config.d.ts +1 -1
  205. package/dist/config.js +4 -2
  206. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  207. package/dist/connectors/codex-materialize-runner.js +14 -13
  208. package/dist/connectors/codex-materialize.d.ts +1 -1
  209. package/dist/connectors/index.d.ts +1 -1
  210. package/dist/connectors/index.js +15 -14
  211. package/dist/consolidation-provenance-check.d.ts +2 -2
  212. package/dist/consolidation-undo.d.ts +2 -2
  213. package/dist/contradiction/index.d.ts +2 -2
  214. package/dist/contradiction/index.js +4 -4
  215. package/dist/{contradiction-scan-JDTBXRGW.js → contradiction-scan-522AYLQC.js} +3 -3
  216. package/dist/converge-config.d.ts +1 -1
  217. package/dist/convergence-refresh.d.ts +2 -2
  218. package/dist/convergence-refresh.js +16 -15
  219. package/dist/conversation-index/backend.d.ts +1 -1
  220. package/dist/conversation-index/chunker.d.ts +1 -1
  221. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  222. package/dist/conversation-index/indexer.d.ts +1 -1
  223. package/dist/conversation-index/search.d.ts +1 -1
  224. package/dist/corpus-watermark.d.ts +1 -1
  225. package/dist/corpus-watermark.js +16 -15
  226. package/dist/day-summary.d.ts +1 -1
  227. package/dist/day-summary.js +2 -2
  228. package/dist/delinearize.d.ts +1 -1
  229. package/dist/dependency-propagation-config.d.ts +1 -1
  230. package/dist/{dependency-propagation-delivery-CzEfB31P.d.ts → dependency-propagation-delivery-C_K_AHcv.d.ts} +1 -1
  231. package/dist/direct-answer-wiring.d.ts +1 -1
  232. package/dist/direct-answer.d.ts +1 -1
  233. package/dist/embedding-fallback.d.ts +1 -1
  234. package/dist/embedding-fallback.js +2 -2
  235. package/dist/enrichment/index.d.ts +1 -1
  236. package/dist/entity-retrieval.d.ts +4 -2
  237. package/dist/entity-retrieval.js +15 -13
  238. package/dist/entity-schema.d.ts +1 -1
  239. package/dist/explicit-capture.d.ts +9 -9
  240. package/dist/explicit-capture.js +6 -6
  241. package/dist/external-wiki-access.d.ts +11 -11
  242. package/dist/external-wiki-access.js +45 -44
  243. package/dist/external-wiki-collection-registration.d.ts +1 -1
  244. package/dist/external-wiki-collection.d.ts +1 -1
  245. package/dist/external-wiki-mcp-tools.d.ts +11 -11
  246. package/dist/extraction-error-classification.d.ts +1 -1
  247. package/dist/extraction-faithfulness.d.ts +1 -1
  248. package/dist/extraction-judge-telemetry.d.ts +1 -1
  249. package/dist/extraction-judge-training.d.ts +1 -1
  250. package/dist/extraction-judge.d.ts +1 -1
  251. package/dist/extraction-liveness.d.ts +1 -1
  252. package/dist/extraction-normalization.d.ts +1 -1
  253. package/dist/extraction-normalization.js +3 -3
  254. package/dist/extraction-prompt.d.ts +1 -1
  255. package/dist/extraction-prompt.js +2 -2
  256. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  257. package/dist/extraction-source-grounding.d.ts +1 -1
  258. package/dist/extraction.d.ts +1 -1
  259. package/dist/extraction.js +25 -24
  260. package/dist/fallback-llm.d.ts +1 -1
  261. package/dist/{first-start-migration-CRZCZAJN.js → first-start-migration-HZ4VPRFQ.js} +2 -2
  262. package/dist/{forget-EHGGJZLX.js → forget-5TWK7CZT.js} +3 -3
  263. package/dist/graph-dashboard-diff.d.ts +1 -1
  264. package/dist/graph-dashboard-key.d.ts +1 -1
  265. package/dist/graph-dashboard-parser.d.ts +1 -1
  266. package/dist/{graph-edge-decay-JI2XDCTY.js → graph-edge-decay-ZXGBXNPW.js} +4 -4
  267. package/dist/graph-edge-reinforcement.d.ts +1 -1
  268. package/dist/graph-path-reconstruction.d.ts +1 -1
  269. package/dist/graph-path-scoring.d.ts +1 -1
  270. package/dist/graph-snapshot.d.ts +1 -1
  271. package/dist/graph-snapshot.js +3 -3
  272. package/dist/graph.d.ts +1 -1
  273. package/dist/graph.js +2 -2
  274. package/dist/harmonic-retrieval.js +1 -1
  275. package/dist/importance.d.ts +1 -1
  276. package/dist/importers/index.d.ts +1 -1
  277. package/dist/in-flight-reads.d.ts +1 -1
  278. package/dist/index.d.ts +79 -30
  279. package/dist/index.js +158 -133
  280. package/dist/intent.d.ts +1 -1
  281. package/dist/lcm/engine.d.ts +1 -1
  282. package/dist/lcm/index.d.ts +1 -1
  283. package/dist/lcm/index.js +3 -3
  284. package/dist/lcm/tools.d.ts +1 -1
  285. package/dist/lifecycle.d.ts +1 -1
  286. package/dist/live-connectors-runner.d.ts +1 -1
  287. package/dist/local-llm.d.ts +1 -1
  288. package/dist/local-llm.js +2 -2
  289. package/dist/local-model-endpoint.d.ts +1 -1
  290. package/dist/maintenance/memory-governance.d.ts +1 -1
  291. package/dist/maintenance/memory-governance.js +14 -13
  292. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  293. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -13
  294. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  295. package/dist/maintenance/rebuild-memory-projection.js +15 -14
  296. package/dist/{maintenance-laHYTo0s.d.ts → maintenance-DdP931i9.d.ts} +3 -3
  297. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  298. package/dist/memory-action-policy.d.ts +1 -1
  299. package/dist/memory-cache.d.ts +1 -1
  300. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  301. package/dist/memory-projection-store.d.ts +1 -1
  302. package/dist/memory-provenance.d.ts +1 -1
  303. package/dist/memory-snapshot.d.ts +1 -1
  304. package/dist/memory-worth-outcomes.d.ts +2 -2
  305. package/dist/models-json.d.ts +1 -1
  306. package/dist/namespaces/migrate.d.ts +3 -3
  307. package/dist/namespaces/migrate.js +15 -14
  308. package/dist/namespaces/principal.d.ts +1 -1
  309. package/dist/namespaces/principal.js +2 -2
  310. package/dist/namespaces/search.d.ts +1 -1
  311. package/dist/namespaces/search.js +4 -4
  312. package/dist/namespaces/storage.d.ts +3 -3
  313. package/dist/namespaces/storage.js +14 -13
  314. package/dist/native-knowledge.d.ts +1 -1
  315. package/dist/offline-sync-impression-drain.d.ts +1 -1
  316. package/dist/offline-sync-impression-drain.js +5 -5
  317. package/dist/operator-doctor-corpus.d.ts +1 -1
  318. package/dist/operator-doctor-corpus.js +17 -16
  319. package/dist/operator-doctor-replica.d.ts +1 -1
  320. package/dist/operator-toolkit.d.ts +3 -3
  321. package/dist/operator-toolkit.js +29 -27
  322. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  323. package/dist/orchestration/compression-guideline-coordinator.js +2 -2
  324. package/dist/orchestration/maintenance.d.ts +4 -4
  325. package/dist/orchestration/maintenance.js +22 -21
  326. package/dist/{orchestrator-Cz2QmqsN.d.ts → orchestrator-DxUWX7gs.d.ts} +26 -20
  327. package/dist/orchestrator.d.ts +9 -9
  328. package/dist/orchestrator.js +114 -112
  329. package/dist/patterns-cli.d.ts +1 -1
  330. package/dist/{pipeline-DPcUifCO.d.ts → pipeline-BKUMU1vU.d.ts} +1 -1
  331. package/dist/policy-runtime.d.ts +1 -1
  332. package/dist/proactive-contention.d.ts +1 -1
  333. package/dist/provenance.d.ts +1 -1
  334. package/dist/{public-http-Dq2iqtcI.d.ts → public-http-C01DLhAp.d.ts} +1 -1
  335. package/dist/{qmd-dFCHp1r0.d.ts → qmd-DJP-GLFe.d.ts} +1 -1
  336. package/dist/qmd-preflight.d.ts +2 -2
  337. package/dist/qmd-recall-cache.d.ts +1 -1
  338. package/dist/qmd.d.ts +2 -2
  339. package/dist/recall-concurrency-config.d.ts +1 -1
  340. package/dist/recall-context-composition.d.ts +11 -1
  341. package/dist/recall-context-composition.js +4 -1
  342. package/dist/recall-disclosure-escalation.d.ts +1 -1
  343. package/dist/recall-explain-renderer.d.ts +1 -1
  344. package/dist/recall-explain-renderer.js +3 -3
  345. package/dist/recall-memory-map.d.ts +1 -1
  346. package/dist/recall-planner-llm.d.ts +1 -1
  347. package/dist/recall-state.d.ts +1 -1
  348. package/dist/recall-tag-filter.d.ts +1 -1
  349. package/dist/recall-timings.d.ts +1 -1
  350. package/dist/recall-xray-cli.d.ts +1 -1
  351. package/dist/recall-xray-cli.js +4 -4
  352. package/dist/recall-xray-renderer.d.ts +1 -1
  353. package/dist/recall-xray-renderer.js +3 -3
  354. package/dist/recall-xray.d.ts +1 -1
  355. package/dist/recall-xray.js +2 -2
  356. package/dist/reconcile/cursor.d.ts +1 -1
  357. package/dist/reconcile/manifest.d.ts +1 -1
  358. package/dist/reconcile/manifest.js +3 -3
  359. package/dist/reconcile/plan.d.ts +1 -1
  360. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  361. package/dist/replay/normalizers/claude.d.ts +1 -1
  362. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  363. package/dist/replay/normalizers/shared.d.ts +1 -1
  364. package/dist/replay/runner.d.ts +1 -1
  365. package/dist/replay/types.d.ts +1 -1
  366. package/dist/replica-divergence.d.ts +1 -1
  367. package/dist/replica-peers-config.d.ts +1 -1
  368. package/dist/{resolution-MMOD5WC4.js → resolution-DKMBPXHI.js} +3 -3
  369. package/dist/resolution-DKMBPXHI.js.map +1 -0
  370. package/dist/resolve-auth-token.d.ts +1 -1
  371. package/dist/resume-bundles.js +5 -3
  372. package/dist/retrieval-agents.d.ts +2 -2
  373. package/dist/retrieval-tiers.d.ts +1 -1
  374. package/dist/routing/engine.d.ts +1 -1
  375. package/dist/routing/store.d.ts +1 -1
  376. package/dist/salvage-envelope.d.ts +1 -1
  377. package/dist/salvage-envelope.js +2 -2
  378. package/dist/{scope-profiles-DICK7GtN.d.ts → scope-profiles-CaKcnB-6.d.ts} +1 -1
  379. package/dist/search/embed-helper.d.ts +1 -1
  380. package/dist/search/embed-helper.js +2 -2
  381. package/dist/search/factory.d.ts +1 -1
  382. package/dist/search/factory.js +3 -3
  383. package/dist/search/index.d.ts +1 -1
  384. package/dist/search/index.js +3 -3
  385. package/dist/search/lancedb-backend.d.ts +1 -1
  386. package/dist/search/meilisearch-backend.d.ts +1 -1
  387. package/dist/search/noop-backend.d.ts +1 -1
  388. package/dist/search/orama-backend.d.ts +1 -1
  389. package/dist/search/port.d.ts +1 -1
  390. package/dist/search/remote-backend.d.ts +1 -1
  391. package/dist/{semantic-consolidation-BP7NAX0N.d.ts → semantic-consolidation-P0eMWqh-.d.ts} +1 -1
  392. package/dist/semantic-consolidation.d.ts +2 -2
  393. package/dist/semantic-consolidation.js +15 -14
  394. package/dist/semantic-rule-promotion.js +14 -13
  395. package/dist/semantic-rule-verifier.d.ts +1 -1
  396. package/dist/semantic-rule-verifier.js +14 -13
  397. package/dist/{service-D_ddZmpI.d.ts → service-D5GQLxq_.d.ts} +2 -2
  398. package/dist/session-observer-bands.d.ts +1 -1
  399. package/dist/session-observer-state.d.ts +1 -1
  400. package/dist/shared-context/manager.d.ts +1 -1
  401. package/dist/shared-context/manager.js +2 -2
  402. package/dist/signal.d.ts +1 -1
  403. package/dist/source-agent-qualifier.d.ts +1 -1
  404. package/dist/source-agent-qualifier.js +20 -19
  405. package/dist/{storage-Cdz7jb9t.d.ts → storage-DIyil2ll.d.ts} +5 -2
  406. package/dist/storage.d.ts +2 -2
  407. package/dist/storage.js +13 -12
  408. package/dist/summarizer.d.ts +1 -1
  409. package/dist/summarizer.js +3 -3
  410. package/dist/summary-snapshot.d.ts +1 -1
  411. package/dist/support-passport/index.d.ts +14 -14
  412. package/dist/support-passport/index.js +47 -46
  413. package/dist/temporal-supersession.d.ts +2 -2
  414. package/dist/temporal-timeline-recall.d.ts +3 -1
  415. package/dist/temporal-timeline-recall.js +3 -1
  416. package/dist/temporal-validity.d.ts +1 -1
  417. package/dist/threading.d.ts +1 -1
  418. package/dist/tier-migration.d.ts +2 -2
  419. package/dist/tier-routing.d.ts +1 -1
  420. package/dist/{tier-stats-EXYSKSVN.js → tier-stats-7E6OBUSD.js} +2 -2
  421. package/dist/topics.d.ts +1 -1
  422. package/dist/transcript.d.ts +1 -1
  423. package/dist/transfer/backup.js +2 -2
  424. package/dist/transfer/capsule-export.js +2 -2
  425. package/dist/transfer/capsule-import.js +2 -2
  426. package/dist/trust-score-stage.d.ts +1 -1
  427. package/dist/trust-score.d.ts +1 -1
  428. package/dist/{types-ed-SvS2t.d.ts → types-CbXieHKr.d.ts} +15 -3
  429. package/dist/types.d.ts +1 -1
  430. package/dist/types.js +1 -1
  431. package/dist/utility-runtime.d.ts +1 -1
  432. package/dist/verified-recall.js +14 -13
  433. package/dist/write-envelope.d.ts +5 -2
  434. package/dist/write-envelope.js +1 -1
  435. package/package.json +2 -2
  436. package/src/bitemporal-frontmatter.test.ts +20 -1
  437. package/src/capabilities.test.ts +2 -0
  438. package/src/capabilities.ts +17 -17
  439. package/src/cli.ts +14 -0
  440. package/src/config-security.ts +131 -0
  441. package/src/config.test.ts +61 -0
  442. package/src/config.ts +2 -1
  443. package/src/entity-retrieval.ts +31 -24
  444. package/src/index.ts +4 -6
  445. package/src/orchestration/conversation-index-coordinator.ts +13 -2
  446. package/src/orchestration/extraction-injection-gate.ts +154 -0
  447. package/src/orchestration/extraction-origin-context.ts +90 -0
  448. package/src/orchestration/extraction-persist.ts +66 -64
  449. package/src/orchestration/extraction-run.ts +4 -2
  450. package/src/orchestration/extraction-security.test.ts +271 -0
  451. package/src/orchestration/graph-recall-coordinator.ts +2 -0
  452. package/src/orchestration/namespace-read-fanout.ts +1 -0
  453. package/src/orchestration/qmd-result-resolver.ts +1 -0
  454. package/src/orchestration/recall-internal.ts +17 -11
  455. package/src/orchestration/recall-result-formatter.ts +35 -6
  456. package/src/orchestration/recall-search-pipeline.ts +3 -5
  457. package/src/orchestration/recall-search-prefilter.ts +1 -0
  458. package/src/orchestrator.ts +2 -1
  459. package/src/procedural/procedure-recall.ts +11 -1
  460. package/src/recall-authority-fence.test.ts +180 -0
  461. package/src/recall-context-composition.ts +28 -0
  462. package/src/security/audit-memory-cli.ts +42 -0
  463. package/src/security/audit-memory.test.ts +252 -0
  464. package/src/security/audit-memory.ts +318 -0
  465. package/src/security/injection-screen.test.ts +77 -0
  466. package/src/security/injection-screen.ts +158 -0
  467. package/src/security/origin-authority.test.ts +61 -0
  468. package/src/security/origin-authority.ts +88 -0
  469. package/src/security/types.ts +14 -0
  470. package/src/semantic-rule-promotion.ts +1 -1
  471. package/src/storage.ts +10 -2
  472. package/src/temporal-timeline-recall.test.ts +18 -0
  473. package/src/temporal-timeline-recall.ts +12 -1
  474. package/src/types.ts +4 -4
  475. package/src/write-envelope.test.ts +1 -0
  476. package/src/write-envelope.ts +9 -0
  477. package/dist/chunk-2XRE6FLM.js.map +0 -1
  478. package/dist/chunk-5V64M56S.js.map +0 -1
  479. package/dist/chunk-76JJSXK7.js.map +0 -1
  480. package/dist/chunk-AHVEHR6K.js.map +0 -1
  481. package/dist/chunk-BXIMH7MC.js.map +0 -1
  482. package/dist/chunk-FPKKFDO4.js.map +0 -1
  483. package/dist/chunk-I6WYQSX4.js.map +0 -1
  484. package/dist/chunk-NSVDUN76.js.map +0 -1
  485. package/dist/chunk-OS5DYALF.js.map +0 -1
  486. package/dist/chunk-PG4QBPVG.js.map +0 -1
  487. package/dist/chunk-XXRRHING.js.map +0 -1
  488. /package/dist/{auto-sync-NR3GPCOA.js.map → auto-sync-5HVRCMGZ.js.map} +0 -0
  489. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  490. /package/dist/{chunk-E2GZSFR5.js.map → chunk-2YREVL4T.js.map} +0 -0
  491. /package/dist/{chunk-KM55SMLG.js.map → chunk-4KM3V6VS.js.map} +0 -0
  492. /package/dist/{chunk-HAEU3ZW7.js.map → chunk-4OW2T32G.js.map} +0 -0
  493. /package/dist/{chunk-PCRHFB75.js.map → chunk-4QFCAKNM.js.map} +0 -0
  494. /package/dist/{chunk-OWC42MDT.js.map → chunk-5ZIWRMZM.js.map} +0 -0
  495. /package/dist/{chunk-GWFSVJ4P.js.map → chunk-6KTXE6A3.js.map} +0 -0
  496. /package/dist/{chunk-P2FA65P2.js.map → chunk-7NSC4IVA.js.map} +0 -0
  497. /package/dist/{chunk-QC6BILS7.js.map → chunk-7PKNOXYB.js.map} +0 -0
  498. /package/dist/{chunk-RZRUV6N2.js.map → chunk-ANMIOQPU.js.map} +0 -0
  499. /package/dist/{chunk-RPSYDM6C.js.map → chunk-BPWZDHFM.js.map} +0 -0
  500. /package/dist/{chunk-JKW663ZN.js.map → chunk-BVRREV3N.js.map} +0 -0
  501. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  502. /package/dist/{chunk-ELXP665P.js.map → chunk-CKSEJD7K.js.map} +0 -0
  503. /package/dist/{chunk-4GE3NA5I.js.map → chunk-CME347TM.js.map} +0 -0
  504. /package/dist/{chunk-BGLY7EEM.js.map → chunk-CMRUIKVA.js.map} +0 -0
  505. /package/dist/{chunk-HGJ6NJ4E.js.map → chunk-D4LVHPOA.js.map} +0 -0
  506. /package/dist/{chunk-YK6BDDHP.js.map → chunk-DFEODULB.js.map} +0 -0
  507. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  508. /package/dist/{chunk-XWZ6KOL6.js.map → chunk-E57E5SCS.js.map} +0 -0
  509. /package/dist/{chunk-M23RF3LJ.js.map → chunk-ER4BLWI6.js.map} +0 -0
  510. /package/dist/{chunk-47J4EDGR.js.map → chunk-F7M36OG2.js.map} +0 -0
  511. /package/dist/{chunk-ZUJW327U.js.map → chunk-FONW766A.js.map} +0 -0
  512. /package/dist/{chunk-FEBHRT2I.js.map → chunk-FR3FNPCJ.js.map} +0 -0
  513. /package/dist/{chunk-G6DFSS6A.js.map → chunk-GUNIXT36.js.map} +0 -0
  514. /package/dist/{chunk-K2UGPTYY.js.map → chunk-H6ZXNH5I.js.map} +0 -0
  515. /package/dist/{chunk-Z463UYI6.js.map → chunk-HC55YCNK.js.map} +0 -0
  516. /package/dist/{chunk-IEQCHXUS.js.map → chunk-HQ2VGCGP.js.map} +0 -0
  517. /package/dist/{chunk-ZXGKQQ3L.js.map → chunk-HXXGZ4KV.js.map} +0 -0
  518. /package/dist/{chunk-YZFPEHXF.js.map → chunk-HYVBJLEK.js.map} +0 -0
  519. /package/dist/{chunk-3GD2HFR6.js.map → chunk-IGWVMA4Y.js.map} +0 -0
  520. /package/dist/{chunk-FONWBCVY.js.map → chunk-IKT6ZVO7.js.map} +0 -0
  521. /package/dist/{chunk-KMWYZTIE.js.map → chunk-ION47U3Z.js.map} +0 -0
  522. /package/dist/{chunk-OCIP6YMD.js.map → chunk-IXGQP4RZ.js.map} +0 -0
  523. /package/dist/{chunk-FYZKFLKY.js.map → chunk-JFPZEWY3.js.map} +0 -0
  524. /package/dist/{chunk-SMNYAMJD.js.map → chunk-JKL53MOY.js.map} +0 -0
  525. /package/dist/{chunk-2T5AWWMF.js.map → chunk-JOA4Q765.js.map} +0 -0
  526. /package/dist/{chunk-MLPTFODV.js.map → chunk-KHQ57QLJ.js.map} +0 -0
  527. /package/dist/{chunk-KRTY3ENI.js.map → chunk-MDVBCPOS.js.map} +0 -0
  528. /package/dist/{chunk-M3UYE6PS.js.map → chunk-N655QIA2.js.map} +0 -0
  529. /package/dist/{chunk-5NB726GV.js.map → chunk-NFQB6RJT.js.map} +0 -0
  530. /package/dist/{chunk-OIOV4RJE.js.map → chunk-NP7FLVZW.js.map} +0 -0
  531. /package/dist/{chunk-CX5SW2EW.js.map → chunk-NRFU5MVH.js.map} +0 -0
  532. /package/dist/{chunk-QDWDVNWU.js.map → chunk-O4TTIMOP.js.map} +0 -0
  533. /package/dist/{chunk-XCO2NXPZ.js.map → chunk-O54B5YNM.js.map} +0 -0
  534. /package/dist/{chunk-UQWUDD7E.js.map → chunk-ONCWJBWV.js.map} +0 -0
  535. /package/dist/{chunk-Z3SQEEB6.js.map → chunk-PD66CVSD.js.map} +0 -0
  536. /package/dist/{chunk-QYN5PXDZ.js.map → chunk-PPUTUOC3.js.map} +0 -0
  537. /package/dist/{chunk-TPWBUKS3.js.map → chunk-PSH3VFZ7.js.map} +0 -0
  538. /package/dist/{chunk-MK5VEWCR.js.map → chunk-QKPDN325.js.map} +0 -0
  539. /package/dist/{chunk-EVWWT3KE.js.map → chunk-QP2IZTUR.js.map} +0 -0
  540. /package/dist/{chunk-4ESX4WX2.js.map → chunk-QSDPVZPD.js.map} +0 -0
  541. /package/dist/{chunk-LHIBA4G7.js.map → chunk-QV7OEHFN.js.map} +0 -0
  542. /package/dist/{chunk-3DVG3GRQ.js.map → chunk-QZR3WT3L.js.map} +0 -0
  543. /package/dist/{chunk-EEAMSNSG.js.map → chunk-R7TZ2HCS.js.map} +0 -0
  544. /package/dist/{chunk-IOYXIY7W.js.map → chunk-R7UHWPYI.js.map} +0 -0
  545. /package/dist/{chunk-L6Z5OAS4.js.map → chunk-RL3EGL7A.js.map} +0 -0
  546. /package/dist/{chunk-7SF5BAWF.js.map → chunk-S6AH7WSF.js.map} +0 -0
  547. /package/dist/{chunk-QGKCM7C4.js.map → chunk-SFCJCMZQ.js.map} +0 -0
  548. /package/dist/{chunk-K44N3CFW.js.map → chunk-T3HC7RJ7.js.map} +0 -0
  549. /package/dist/{chunk-6PCND4O2.js.map → chunk-T6EQPZ6E.js.map} +0 -0
  550. /package/dist/{chunk-G7YUH4WT.js.map → chunk-TAMY4NKO.js.map} +0 -0
  551. /package/dist/{chunk-XDBFSUHX.js.map → chunk-TAPFJ3ET.js.map} +0 -0
  552. /package/dist/{chunk-MANCJV6J.js.map → chunk-TF3LMM5E.js.map} +0 -0
  553. /package/dist/{chunk-2GD6MLXD.js.map → chunk-TFXYQNBH.js.map} +0 -0
  554. /package/dist/{chunk-7DISPKXT.js.map → chunk-THACANBI.js.map} +0 -0
  555. /package/dist/{chunk-6G4D222J.js.map → chunk-TLVLJSWS.js.map} +0 -0
  556. /package/dist/{chunk-6QPI2ITJ.js.map → chunk-TVKWT2CY.js.map} +0 -0
  557. /package/dist/{chunk-H7NAZ3UB.js.map → chunk-U7BMN33M.js.map} +0 -0
  558. /package/dist/{chunk-6LKEUCEM.js.map → chunk-UXREWVW4.js.map} +0 -0
  559. /package/dist/{chunk-SUPEYLH2.js.map → chunk-UYCIS6V5.js.map} +0 -0
  560. /package/dist/{chunk-F2BOUJUS.js.map → chunk-V3IT3XNG.js.map} +0 -0
  561. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  562. /package/dist/{chunk-NUA4VM46.js.map → chunk-VWP5DEHU.js.map} +0 -0
  563. /package/dist/{chunk-NQMSEB5D.js.map → chunk-X5OIPQME.js.map} +0 -0
  564. /package/dist/{chunk-RBII7637.js.map → chunk-XRPPHIRI.js.map} +0 -0
  565. /package/dist/{chunk-OLT3YTDH.js.map → chunk-YMOPYG3K.js.map} +0 -0
  566. /package/dist/{contradiction-scan-JDTBXRGW.js.map → config-security.js.map} +0 -0
  567. /package/dist/{graph-edge-decay-JI2XDCTY.js.map → contradiction-scan-522AYLQC.js.map} +0 -0
  568. /package/dist/{first-start-migration-CRZCZAJN.js.map → first-start-migration-HZ4VPRFQ.js.map} +0 -0
  569. /package/dist/{forget-EHGGJZLX.js.map → forget-5TWK7CZT.js.map} +0 -0
  570. /package/dist/{resolution-MMOD5WC4.js.map → graph-edge-decay-ZXGBXNPW.js.map} +0 -0
  571. /package/dist/{tier-stats-EXYSKSVN.js.map → tier-stats-7E6OBUSD.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { w as MemoryCategory } from './types-ed-SvS2t.js';
1
+ import { w as MemoryCategory } from './types-CbXieHKr.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
@@ -59,6 +59,8 @@ interface MemoryWriteInput {
59
59
  validAt?: string;
60
60
  /** Connector identity that produced this write (issue #1852). */
61
61
  sourceConnector?: string;
62
+ /** Origin class stamped at creation time (issue #1955). */
63
+ origin?: string;
62
64
  /** Human-readable provenance note. */
63
65
  sourceReason?: string;
64
66
  }
@@ -146,6 +148,7 @@ interface SealedMemoryEnvelope {
146
148
  readonly ttl: string | undefined;
147
149
  readonly validAt: string | undefined;
148
150
  readonly sourceConnector: string | undefined;
151
+ readonly origin: string | undefined;
149
152
  readonly sourceReason: string | undefined;
150
153
  readonly source: string;
151
154
  /** ISO timestamp the envelope was composed (from ctx.now). */
@@ -223,7 +226,7 @@ declare const WRITE_FINGERPRINT_FIELDS: readonly ["content", "category", "tags",
223
226
  * is a visible, reviewable decision — this list exists so the exhaustiveness
224
227
  * guard can force every new `MemoryWriteInput` field to be classified.
225
228
  */
226
- declare const FINGERPRINT_EXEMPT_FIELDS: readonly ["confidence", "sourceReason"];
229
+ declare const FINGERPRINT_EXEMPT_FIELDS: readonly ["confidence", "origin", "sourceReason"];
227
230
  /** Scope keys always folded into the fingerprint payload. */
228
231
  declare const FINGERPRINT_SCOPE_FIELDS: readonly ["surface", "namespace", "principal", "codingContext"];
229
232
  /**
@@ -11,7 +11,7 @@ import {
11
11
  isMemoryCategory,
12
12
  isSealedMemoryEnvelope,
13
13
  sealedWriteToLegacyArgs
14
- } from "./chunk-NSVDUN76.js";
14
+ } from "./chunk-LCU5R6TQ.js";
15
15
  import "./chunk-BT7NVCML.js";
16
16
  import "./chunk-JDSVLVCG.js";
17
17
  import "./chunk-5GKPFL3S.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.54.8",
3
+ "version": "9.56.0",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3136,7 +3136,7 @@
3136
3136
  "core"
3137
3137
  ],
3138
3138
  "peerDependencies": {
3139
- "@remnic/coding-graph": "^9.54.8"
3139
+ "@remnic/coding-graph": "^9.56.0"
3140
3140
  },
3141
3141
  "peerDependenciesMeta": {
3142
3142
  "@remnic/coding-graph": {
@@ -2,7 +2,7 @@ import test from "node:test";
2
2
  import assert from "node:assert/strict";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
- import { mkdtemp, rm } from "node:fs/promises";
5
+ import { mkdtemp, readFile, rm } from "node:fs/promises";
6
6
 
7
7
  import { StorageManager } from "./storage.js";
8
8
  import { isValidityExpiredNow } from "./temporal-validity.js";
@@ -54,6 +54,25 @@ test("round-trip: observedAt + eventTimeSource + valid_at survive write → read
54
54
  await rm(dir, { recursive: true, force: true });
55
55
  }
56
56
  });
57
+ test("writeMemory normalizes arbitrary origin strings to unknown", async () => {
58
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-origin-normalize-"));
59
+ try {
60
+ const storage = new StorageManager(dir);
61
+ await storage.ensureDirectories();
62
+
63
+ const { id } = await storage.writeMemory("fact", "Origin boundary test.", {
64
+ origin: "weird\nvalue",
65
+ });
66
+ const written = (await storage.readAllMemories()).find((memory) => memory.frontmatter.id === id);
67
+ assert.ok(written);
68
+ const raw = await readFile(written!.path, "utf8");
69
+ assert.match(raw, /^origin: unknown$/m);
70
+ assert.doesNotMatch(raw, /weird/);
71
+ assert.equal(written!.frontmatter.origin, "unknown");
72
+ } finally {
73
+ await rm(dir, { recursive: true, force: true });
74
+ }
75
+ });
57
76
 
58
77
  test("round-trip: invalid_at + forgottenAt coexist with observedAt/eventTimeSource (parser not corrupted)", async () => {
59
78
  // Exercises the full serialize→parse round trip through the
@@ -857,6 +857,8 @@ const SECURITY_FIELD_TO_FLAG: Record<keyof SecurityCapabilitySet, string> = {
857
857
  trustZones: "trustZonesEnabled",
858
858
  quarantinePromotion: "quarantinePromotionEnabled",
859
859
  memoryPoisoningDefense: "memoryPoisoningDefenseEnabled",
860
+ originAuthority: "originAuthorityEnabled",
861
+ injectionScreen: "injectionScreenEnabled",
860
862
  trustZoneRecall: "trustZoneRecallEnabled",
861
863
  };
862
864
 
@@ -616,13 +616,12 @@ export function resolveLocalLlmCapabilities(
616
616
  }
617
617
 
618
618
  // ---------------------------------------------------------------------------
619
- // Security capability set (issue #1523 batch 7).
620
- //
621
- // The four security/trust-zone flags gate quarantine promotion, poisoning
622
- // defense, and trust-zone recall. Read sites span orchestrator, access-service,
623
- // CLI, and research-status commands. All flags are non-optional booleans on
624
- // PluginConfig (defaults resolved at the parse boundary), so the projection is
625
- // a pure pass-through.
619
+ // Security capability set (issue #1523 batch 7). The six security/trust-zone
620
+ // flags gate quarantine promotion, poisoning defense, origin authority,
621
+ // injection screening, and trust-zone recall. Read sites span orchestrator,
622
+ // access-service, CLI, and research-status commands. All flags are
623
+ // non-optional booleans on PluginConfig (defaults resolved at the parse
624
+ // boundary), so the projection is a pure pass-through.
626
625
  // ---------------------------------------------------------------------------
627
626
 
628
627
  /**
@@ -635,26 +634,27 @@ export interface SecurityCapabilitySet {
635
634
  readonly quarantinePromotion: boolean;
636
635
  /** `memoryPoisoningDefenseEnabled` — detect and defend against memory poisoning. */
637
636
  readonly memoryPoisoningDefense: boolean;
637
+ /** `originAuthorityEnabled` — preserve origin-bound write authority. */
638
+ readonly originAuthority: boolean;
639
+ /** `injectionScreenEnabled` — quarantine deterministic injection findings. */
640
+ readonly injectionScreen: boolean;
638
641
  /** `trustZoneRecallEnabled` — restrict recall to trusted zones. */
639
642
  readonly trustZoneRecall: boolean;
640
643
  }
641
644
 
642
- /**
643
- * Config projection consumed by {@link resolveSecurityCapabilities}.
644
- */
645
- export type SecurityConfigProjection = Pick<
646
- PluginConfig,
647
- "trustZonesEnabled" | "quarantinePromotionEnabled" | "memoryPoisoningDefenseEnabled" | "trustZoneRecallEnabled"
648
- >;
645
+ /** Config projection consumed by {@link resolveSecurityCapabilities}. */
646
+ export type SecurityConfigProjection = Pick<PluginConfig,
647
+ | "trustZonesEnabled" | "quarantinePromotionEnabled" | "memoryPoisoningDefenseEnabled"
648
+ | "originAuthorityEnabled" | "injectionScreenEnabled" | "trustZoneRecallEnabled">;
649
649
 
650
- /**
651
- * Resolve the {@link SecurityCapabilitySet} from parsed config.
652
- */
650
+ /** Resolve the {@link SecurityCapabilitySet} from parsed config. */
653
651
  export function resolveSecurityCapabilities(config: SecurityConfigProjection): SecurityCapabilitySet {
654
652
  return Object.freeze({
655
653
  trustZones: config.trustZonesEnabled,
656
654
  quarantinePromotion: config.quarantinePromotionEnabled,
657
655
  memoryPoisoningDefense: config.memoryPoisoningDefenseEnabled,
656
+ originAuthority: config.originAuthorityEnabled,
657
+ injectionScreen: config.injectionScreenEnabled,
658
658
  trustZoneRecall: config.trustZoneRecallEnabled,
659
659
  });
660
660
  }
package/src/cli.ts CHANGED
@@ -66,6 +66,11 @@ import {
66
66
  restoreMemoryGovernanceRun,
67
67
  runMemoryGovernance,
68
68
  } from "./maintenance/memory-governance.js";
69
+ import {
70
+ auditMemoryStore,
71
+ type AuditMemoryStoreOptions,
72
+ } from "./security/audit-memory.js";
73
+ import { registerSecurityCommands } from "./security/audit-memory-cli.js";
69
74
  import {
70
75
  rebuildMemoryProjection,
71
76
  repairMemoryProjection,
@@ -534,6 +539,8 @@ export interface MemoryReviewDispositionCliCommandOptions {
534
539
  now?: Date;
535
540
  }
536
541
 
542
+ export interface AuditMemoryCliCommandOptions extends AuditMemoryStoreOptions {}
543
+
537
544
  export interface MigrateObservationsCliCommandOptions {
538
545
  memoryDir: string;
539
546
  write?: boolean;
@@ -1130,6 +1137,11 @@ export async function runMemoryReviewDispositionCliCommand(
1130
1137
  reasonCode: options.reasonCode,
1131
1138
  };
1132
1139
  }
1140
+ export async function runAuditMemoryCliCommand(
1141
+ options: AuditMemoryCliCommandOptions,
1142
+ ) {
1143
+ return auditMemoryStore(options);
1144
+ }
1133
1145
 
1134
1146
  export async function runMigrateObservationsCliCommand(
1135
1147
  options: MigrateObservationsCliCommandOptions,
@@ -7187,6 +7199,8 @@ export function registerCli(
7187
7199
  console.log("OK");
7188
7200
  });
7189
7201
 
7202
+ registerSecurityCommands(cmd, orchestrator);
7203
+
7190
7204
  cmd
7191
7205
  .command("governance-run")
7192
7206
  .description("Run memory governance in shadow/apply mode and write audit artifacts")
@@ -0,0 +1,131 @@
1
+ import { coerceBool } from "./connectors/coerce.js";
2
+ import { readEnvVar } from "./runtime/env.js";
3
+ import { DEFAULT_UNTRUSTED_ORIGINS } from "./security/origin-authority.js";
4
+
5
+ // Memory-poisoning hardening (#1955): preserve explicit config, but let env
6
+ // values replace schema-materialized defaults from the host config loader.
7
+ function resolveSecurityBooleanConfig(
8
+ value: unknown,
9
+ rawOperatorConfig: Record<string, unknown> | null | undefined,
10
+ flagName: string,
11
+ envName: string,
12
+ defaultValue: boolean,
13
+ ): boolean {
14
+ const rawAuthored =
15
+ rawOperatorConfig !== undefined &&
16
+ rawOperatorConfig !== null &&
17
+ Object.prototype.hasOwnProperty.call(rawOperatorConfig, flagName) &&
18
+ rawOperatorConfig[flagName] !== undefined &&
19
+ rawOperatorConfig[flagName] !== null;
20
+ const schemaDefaultMaterialized =
21
+ rawOperatorConfig !== undefined &&
22
+ !rawAuthored &&
23
+ value === defaultValue;
24
+ if (!schemaDefaultMaterialized && value !== undefined && value !== null) {
25
+ return resolveBooleanConfig(value, defaultValue, flagName);
26
+ }
27
+ if (rawAuthored) {
28
+ return resolveBooleanConfig(value ?? rawOperatorConfig?.[flagName], defaultValue, flagName);
29
+ }
30
+ const envValue = readEnvVar(envName);
31
+ return envValue === undefined
32
+ ? defaultValue
33
+ : resolveBooleanConfig(envValue, defaultValue, flagName);
34
+ }
35
+
36
+ function resolveBooleanConfig(
37
+ value: unknown,
38
+ defaultValue: boolean,
39
+ keyName: string,
40
+ ): boolean {
41
+ if (value === undefined || value === null) return defaultValue;
42
+ const coerced = coerceBool(value);
43
+ if (coerced === undefined) {
44
+ throw new Error(
45
+ `${keyName} must be a boolean-like value (true/false/1/0/yes/no/on/off); got ${JSON.stringify(value)}`,
46
+ );
47
+ }
48
+ return coerced;
49
+ }
50
+
51
+ // Memory-poisoning hardening (#1955): keep origin allow-list parsing in the
52
+ // parser module so config-contract extraction covers this delegated surface.
53
+ function resolveUntrustedOrigins(
54
+ value: unknown,
55
+ rawOperatorConfig: Record<string, unknown> | null | undefined,
56
+ ): string[] {
57
+ const rawAuthored =
58
+ rawOperatorConfig !== undefined &&
59
+ rawOperatorConfig !== null &&
60
+ Object.prototype.hasOwnProperty.call(rawOperatorConfig, "untrustedOrigins") &&
61
+ rawOperatorConfig.untrustedOrigins !== undefined &&
62
+ rawOperatorConfig.untrustedOrigins !== null;
63
+ const schemaDefaultMaterialized =
64
+ rawOperatorConfig !== undefined &&
65
+ !rawAuthored &&
66
+ Array.isArray(value) &&
67
+ value.length === DEFAULT_UNTRUSTED_ORIGINS.length &&
68
+ value.every((entry, index) => entry === DEFAULT_UNTRUSTED_ORIGINS[index]);
69
+ const configValue = schemaDefaultMaterialized ? undefined : value;
70
+ const fromEnv = configValue === undefined || configValue === null;
71
+ const envValue = fromEnv ? readEnvVar("REMNIC_UNTRUSTED_ORIGINS") : undefined;
72
+ const source = fromEnv ? envValue : configValue;
73
+ if (source === undefined || source === null) return [...DEFAULT_UNTRUSTED_ORIGINS];
74
+
75
+ let entries: unknown[];
76
+ if (Array.isArray(source)) {
77
+ entries = source;
78
+ } else if (fromEnv && typeof source === "string" && source.trim().length > 0) {
79
+ const trimmed = source.trim();
80
+ if (trimmed.startsWith("[")) {
81
+ try {
82
+ const parsed: unknown = JSON.parse(trimmed);
83
+ if (!Array.isArray(parsed)) throw new Error("not an array");
84
+ entries = parsed;
85
+ } catch {
86
+ throw new Error("untrustedOrigins must be an array of strings");
87
+ }
88
+ } else {
89
+ entries = trimmed.split(",");
90
+ }
91
+ } else {
92
+ throw new Error("untrustedOrigins must be an array of strings");
93
+ }
94
+
95
+ const normalized: string[] = [];
96
+ for (const entry of entries) {
97
+ if (typeof entry !== "string") {
98
+ throw new Error("untrustedOrigins must be an array of strings");
99
+ }
100
+ const trimmed = entry.trim();
101
+ if (trimmed.length > 0) normalized.push(trimmed);
102
+ }
103
+ return normalized.length > 0 ? normalized : [...DEFAULT_UNTRUSTED_ORIGINS];
104
+ }
105
+
106
+ export function parseSecurityConfig(
107
+ cfg: Record<string, unknown>,
108
+ rawOperatorConfig: Record<string, unknown> | null | undefined,
109
+ ): {
110
+ originAuthorityEnabled: boolean;
111
+ injectionScreenEnabled: boolean;
112
+ untrustedOrigins: string[];
113
+ } {
114
+ return {
115
+ originAuthorityEnabled: resolveSecurityBooleanConfig(
116
+ cfg.originAuthorityEnabled,
117
+ rawOperatorConfig,
118
+ "originAuthorityEnabled",
119
+ "REMNIC_ORIGIN_AUTHORITY_ENABLED",
120
+ false,
121
+ ),
122
+ injectionScreenEnabled: resolveSecurityBooleanConfig(
123
+ cfg.injectionScreenEnabled,
124
+ rawOperatorConfig,
125
+ "injectionScreenEnabled",
126
+ "REMNIC_INJECTION_SCREEN_ENABLED",
127
+ true,
128
+ ),
129
+ untrustedOrigins: resolveUntrustedOrigins(cfg.untrustedOrigins, rawOperatorConfig),
130
+ };
131
+ }
@@ -31,6 +31,67 @@ function withIsolatedConnectorsDir<T>(
31
31
  rmSync(root, { recursive: true, force: true });
32
32
  }
33
33
  }
34
+ test("parseConfig memory-poisoning hardening defaults and validation (#1955)", () => {
35
+ const previousOrigin = process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
36
+ const previousInjection = process.env.REMNIC_INJECTION_SCREEN_ENABLED;
37
+ const previousOrigins = process.env.REMNIC_UNTRUSTED_ORIGINS;
38
+ delete process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
39
+ delete process.env.REMNIC_INJECTION_SCREEN_ENABLED;
40
+ delete process.env.REMNIC_UNTRUSTED_ORIGINS;
41
+ try {
42
+ const defaults = parseConfig({});
43
+ assert.equal(defaults.originAuthorityEnabled, false);
44
+ assert.equal(defaults.injectionScreenEnabled, true);
45
+ assert.deepEqual(defaults.untrustedOrigins, ["tool_output", "import:*", "unknown"]);
46
+
47
+ const configured = parseConfig({
48
+ originAuthorityEnabled: "true",
49
+ injectionScreenEnabled: "off",
50
+ untrustedOrigins: [" connector:calendar ", "unknown", ""],
51
+ });
52
+ assert.equal(configured.originAuthorityEnabled, true);
53
+ assert.equal(configured.injectionScreenEnabled, false);
54
+ assert.deepEqual(configured.untrustedOrigins, ["connector:calendar", "unknown"]);
55
+
56
+ process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED = "yes";
57
+ process.env.REMNIC_INJECTION_SCREEN_ENABLED = "0";
58
+ process.env.REMNIC_UNTRUSTED_ORIGINS = "connector:calendar, import:legacy, unknown";
59
+ const fromEnv = parseConfig({});
60
+ assert.equal(fromEnv.originAuthorityEnabled, true);
61
+ assert.equal(fromEnv.injectionScreenEnabled, false);
62
+ assert.deepEqual(fromEnv.untrustedOrigins, ["connector:calendar", "import:legacy", "unknown"]);
63
+ const envWithSchemaDefaults = parseConfig(
64
+ {
65
+ originAuthorityEnabled: false,
66
+ injectionScreenEnabled: true,
67
+ untrustedOrigins: ["tool_output", "import:*", "unknown"],
68
+ },
69
+ {},
70
+ );
71
+ assert.equal(envWithSchemaDefaults.originAuthorityEnabled, true);
72
+ assert.equal(envWithSchemaDefaults.injectionScreenEnabled, false);
73
+ assert.deepEqual(
74
+ envWithSchemaDefaults.untrustedOrigins,
75
+ ["connector:calendar", "import:legacy", "unknown"],
76
+ );
77
+
78
+ assert.throws(
79
+ () => parseConfig({ originAuthorityEnabled: "maybe" }),
80
+ /originAuthorityEnabled must be a boolean-like value/,
81
+ );
82
+ assert.throws(
83
+ () => parseConfig({ untrustedOrigins: "unknown" }),
84
+ /untrustedOrigins must be an array of strings/,
85
+ );
86
+ } finally {
87
+ if (previousOrigin === undefined) delete process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
88
+ else process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED = previousOrigin;
89
+ if (previousInjection === undefined) delete process.env.REMNIC_INJECTION_SCREEN_ENABLED;
90
+ else process.env.REMNIC_INJECTION_SCREEN_ENABLED = previousInjection;
91
+ if (previousOrigins === undefined) delete process.env.REMNIC_UNTRUSTED_ORIGINS;
92
+ else process.env.REMNIC_UNTRUSTED_ORIGINS = previousOrigins;
93
+ }
94
+ });
34
95
 
35
96
  test("parseConfig emitLegacyTools sticky-legacy default (issue #1550)", () => {
36
97
  // Fresh install (no legacy connector entries): canonical-only surface.
package/src/config.ts CHANGED
@@ -55,6 +55,7 @@ import {
55
55
  parseQmdSubprocessStrategy,
56
56
  parseQmdSupportedVersion,
57
57
  } from "./config-qmd.js";
58
+ import { parseSecurityConfig } from "./config-security.js";
58
59
  import {
59
60
  resolveEmitLegacyTools,
60
61
  resolveNamespaceCatalogEnabled,
@@ -357,7 +358,6 @@ function resolveBooleanConfig(
357
358
  return coerced;
358
359
  }
359
360
 
360
-
361
361
  function resolvePositiveIntegerConfig(
362
362
  value: unknown,
363
363
  defaultValue: number,
@@ -1554,6 +1554,7 @@ export function parseConfig(
1554
1554
  model,
1555
1555
  reasoningEffort,
1556
1556
  triggerMode,
1557
+ ...parseSecurityConfig(cfg, rawOperatorConfig),
1557
1558
  bufferMaxTurns:
1558
1559
  typeof cfg.bufferMaxTurns === "number" ? cfg.bufferMaxTurns : 5,
1559
1560
  bufferMaxMinutes:
@@ -1,4 +1,5 @@
1
1
  import { resolveNamespaceCapabilities } from "./capabilities.js";
2
+ import { renderAuthorityBoundContent } from "./recall-context-composition.js";
2
3
  import { createHash } from "node:crypto";
3
4
  import { sanitizeMemoryContent } from "./sanitize.js";
4
5
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -44,7 +45,7 @@ type EntityMentionIndexEntry = {
44
45
  relationships: Array<{ target: string; label: string }>;
45
46
  activity: Array<{ date: string; note: string }>;
46
47
  factCount: number;
47
- memorySnippets: string[];
48
+ memorySnippets: string[]; memorySnippetOrigins?: Array<string | undefined>;
48
49
  nativeChunks: Array<{
49
50
  chunkId: string;
50
51
  title: string;
@@ -72,9 +73,8 @@ type EntityCandidate = {
72
73
  type EntityHintSnippet = {
73
74
  text: string;
74
75
  score: number;
75
- kind: "summary" | "fact" | "section" | "relationship" | "activity" | "memory" | "native";
76
+ kind: "summary" | "fact" | "section" | "relationship" | "activity" | "memory" | "native"; origin?: string;
76
77
  };
77
-
78
78
  export interface BuildEntityRecallSectionOptions {
79
79
  config: PluginConfig;
80
80
  storage: StorageManager;
@@ -87,6 +87,7 @@ export interface BuildEntityRecallSectionOptions {
87
87
  maxRelatedEntities: number;
88
88
  maxChars: number;
89
89
  transcriptEntries: TranscriptEntry[];
90
+ originAuthorityEnabled?: boolean; untrustedOrigins?: readonly string[];
90
91
  /**
91
92
  * Cancels the build at its next checkpoint (issue #2291). Entity recall reads
92
93
  * every entity and memory file across the recalled namespaces, which is
@@ -617,16 +618,13 @@ async function buildEntityMentionIndex(
617
618
  for (const memory of memories) {
618
619
  scanned += 1;
619
620
  await yieldEntityRecallScanEvery(scanned, abortSignal);
620
- const entityRef = typeof memory.frontmatter.entityRef === "string" ? memory.frontmatter.entityRef : "";
621
- if (!entityRef) continue;
622
- const entry = entities.get(entityRef);
621
+ const entry = typeof memory.frontmatter.entityRef === "string" ? entities.get(memory.frontmatter.entityRef) : undefined;
623
622
  if (!entry) continue;
624
623
  const snippet = await readMemorySnippet(memory);
625
- if (!entry.memorySnippets.includes(snippet)) {
626
- entry.memorySnippets.push(snippet);
627
- }
624
+ if (entry.memorySnippets.includes(snippet)) continue;
625
+ entry.memorySnippets.push(snippet);
626
+ entry.memorySnippetOrigins = [...(entry.memorySnippetOrigins ?? []), memory.frontmatter.origin];
628
627
  }
629
-
630
628
  // Each remaining phase is another synchronous pass over the whole index
631
629
  // (alias map, native-chunk merge, sort, two full serializations). Yield between
632
630
  // them so a section deadline can fire between passes instead of only after all
@@ -908,12 +906,8 @@ async function buildHintSnippets(
908
906
  });
909
907
  }
910
908
 
911
- for (const memorySnippet of entry.memorySnippets.slice(0, Math.min(maxSupportingFacts, 4))) {
912
- snippets.push({
913
- text: memorySnippet,
914
- score: 5,
915
- kind: "memory",
916
- });
909
+ for (const [index, memorySnippet] of entry.memorySnippets.slice(0, Math.min(maxSupportingFacts, 4)).entries()) {
910
+ snippets.push({ text: memorySnippet, score: 5, kind: "memory", origin: entry.memorySnippetOrigins?.[index] });
917
911
  }
918
912
 
919
913
  for (const chunk of entry.nativeChunks) {
@@ -968,9 +962,18 @@ function formatEntityHintSection(
968
962
  mode: EntityQueryMode,
969
963
  maxRelatedEntities: number,
970
964
  maxChars: number,
965
+ originAuthorityEnabled: boolean, untrustedOrigins: readonly string[],
971
966
  ): string | null {
972
967
  if (candidates.length === 0) return null;
973
968
  const lines: string[] = ["## entity_answer_hints", ""];
969
+ // #1955 review: non-native snippet kinds may embed extraction-written content
970
+ // without per-field origin — fence as unknown (least privilege; plumbing #2397).
971
+ const renderSnippet = (snippet: EntityHintSnippet): string => snippet.kind !== "native"
972
+ ? renderAuthorityBoundContent(snippet.text, snippet.origin, { enabled: originAuthorityEnabled, untrustedOrigins }) : snippet.text;
973
+ // (see comment above)
974
+ // #1955 review: inline fields (names/types/aliases/targets) cannot carry the
975
+ // multi-line block fence without collapsing the hint list structure —
976
+ // per-field origin plumbing is tracked in #2397.
974
977
  for (const { candidate, snippets, uncertainty } of candidates) {
975
978
  const hasSummary = Boolean(candidate.entry.summary?.trim());
976
979
  const preferredTopSnippets = hasSummary
@@ -1020,16 +1023,12 @@ function formatEntityHintSection(
1020
1023
  }
1021
1024
  const topSnippetTexts = new Set(topSnippets.map((snippet) => normalizeEntityText(snippet.text)));
1022
1025
  lines.push(`- target: ${candidate.entry.name} (${candidate.entry.type})`);
1023
- if (candidate.source === "recent_turn") {
1024
- lines.push(`- resolution: carried forward from recent turns via alias "${candidate.alias}"`);
1025
- } else {
1026
- lines.push(`- resolution: matched alias "${candidate.alias}" in the query`);
1027
- }
1026
+ lines.push(`- resolution: ${candidate.source === "recent_turn" ? "carried forward from recent turns via alias" : "matched alias"} "${candidate.alias}"${candidate.source === "recent_turn" ? "" : " in the query"}`);
1028
1027
  if (uncertainty) lines.push(`- uncertainty: ${uncertainty}`);
1029
1028
  if (topSnippets.length > 0) {
1030
1029
  lines.push("- likely answer:");
1031
1030
  for (const snippet of topSnippets) {
1032
- lines.push(` - ${snippet.text}`);
1031
+ lines.push(` - ${renderSnippet(snippet)}`);
1033
1032
  }
1034
1033
  }
1035
1034
  if (mode !== "direct") {
@@ -1039,7 +1038,7 @@ function formatEntityHintSection(
1039
1038
  if (fallbackTimeline.length > 0) {
1040
1039
  lines.push("- recent timeline:");
1041
1040
  for (const snippet of fallbackTimeline) {
1042
- lines.push(` - ${snippet.text}`);
1041
+ lines.push(` - ${renderSnippet(snippet)}`);
1043
1042
  }
1044
1043
  }
1045
1044
  }
@@ -1172,7 +1171,15 @@ export async function buildEntityRecallSection(options: BuildEntityRecallSection
1172
1171
  }),
1173
1172
  );
1174
1173
 
1175
- const section = formatEntityHintSection(enriched, queryTokens, mode, options.maxRelatedEntities, options.maxChars);
1174
+ const section = formatEntityHintSection(
1175
+ enriched,
1176
+ queryTokens,
1177
+ mode,
1178
+ options.maxRelatedEntities,
1179
+ options.maxChars,
1180
+ options.originAuthorityEnabled === true,
1181
+ options.untrustedOrigins ?? [],
1182
+ );
1176
1183
  // `entityRecallSectionAbsent` so a cancelled build is not recorded as a
1177
1184
  // successful section that simply found no entities.
1178
1185
  if (!section) return entityRecallSectionAbsent(options.abortSignal);
package/src/index.ts CHANGED
@@ -389,8 +389,9 @@ export {
389
389
  type TrustZoneRecordKind,
390
390
  type TrustZoneSourceClass,
391
391
  } from "./trust-zones.js";
392
-
393
- // ---------------------------------------------------------------------------
392
+ export { DEFAULT_UNTRUSTED_ORIGINS, classifyOrigin, isUntrustedOrigin, parseOriginClass, renderAuthorityFence, type OriginClass } from "./security/origin-authority.js";
393
+ export { INJECTION_SCREEN_THRESHOLD, screenCandidateFact, type InjectionScreenFinding, type InjectionScreenResult } from "./security/injection-screen.js";
394
+ export { auditMemoryStore, formatAuditMemoryReport, type AuditMemoryReport } from "./security/audit-memory.js";
394
395
  // Access layer (HTTP + MCP + schema validation)
395
396
  // ---------------------------------------------------------------------------
396
397
 
@@ -1204,10 +1205,7 @@ export {
1204
1205
  type ProcessBatchResult,
1205
1206
  } from "./bulk-import/index.js";
1206
1207
 
1207
- export {
1208
- runBulkImportCliCommand,
1209
- type BulkImportCliCommandOptions,
1210
- } from "./cli.js";
1208
+ export { runAuditMemoryCliCommand, runBulkImportCliCommand, type BulkImportCliCommandOptions } from "./cli.js";
1211
1209
 
1212
1210
  // ---------------------------------------------------------------------------
1213
1211
  // Wearable transcript subsystem (Limitless / Bee / Omi connectors).
@@ -19,7 +19,8 @@
19
19
  import { readdir } from "node:fs/promises";
20
20
  import path from "node:path";
21
21
 
22
- import { resolveIndexingCapabilities } from "../capabilities.js";
22
+ import { resolveIndexingCapabilities, resolveSecurityCapabilities } from "../capabilities.js";
23
+ import { renderAuthorityBoundContent } from "../recall-context-composition.js";
23
24
  import { cleanupConversationChunks } from "../conversation-index/cleanup.js";
24
25
  import { chunkTranscriptEntries } from "../conversation-index/chunker.js";
25
26
  import type { ConversationChunk } from "../conversation-index/chunker.js";
@@ -42,6 +43,7 @@ import type { PluginConfig } from "../types.js";
42
43
  */
43
44
  export class ConversationIndexCoordinator {
44
45
  private readonly config: PluginConfig;
46
+ private readonly originAuthorityEnabled: boolean;
45
47
  private readonly getTranscript: () => TranscriptManager;
46
48
  private readonly getBackend: () => ConversationIndexBackend | undefined;
47
49
  private readonly indexDir: string;
@@ -54,6 +56,7 @@ export class ConversationIndexCoordinator {
54
56
  indexDir: string;
55
57
  }) {
56
58
  this.config = options.config;
59
+ this.originAuthorityEnabled = resolveSecurityCapabilities(this.config).originAuthority;
57
60
  this.getTranscript = options.getTranscript;
58
61
  this.getBackend = options.getBackend;
59
62
  this.indexDir = options.indexDir;
@@ -81,10 +84,18 @@ export class ConversationIndexCoordinator {
81
84
  let used = 0;
82
85
  for (const r of results) {
83
86
  if (!r?.snippet) continue;
87
+ const body = renderAuthorityBoundContent(
88
+ r.snippet.trim(),
89
+ undefined,
90
+ {
91
+ enabled: this.originAuthorityEnabled,
92
+ untrustedOrigins: this.config.untrustedOrigins,
93
+ },
94
+ );
84
95
  const chunk =
85
96
  `### ${r.path}\n` +
86
97
  `Score: ${r.score.toFixed(3)}\n\n` +
87
- `${r.snippet.trim()}\n`;
98
+ `${body}\n`;
88
99
  if (used + chunk.length > maxChars) break;
89
100
  lines.push(chunk);
90
101
  used += chunk.length;