@remnic/core 9.69.59 → 9.69.61

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 (343) hide show
  1. package/dist/access-admin-ops-surface.js +36 -36
  2. package/dist/access-authorization-probe.js +37 -37
  3. package/dist/access-boundary.js +36 -36
  4. package/dist/access-cli.js +93 -93
  5. package/dist/access-extraction-force-flush.js +36 -36
  6. package/dist/access-http-briefing.js +37 -37
  7. package/dist/access-http-query.js +38 -38
  8. package/dist/access-http.js +54 -54
  9. package/dist/access-identity-continuity-surface.js +36 -36
  10. package/dist/access-lcm-surface.js +36 -36
  11. package/dist/access-mcp.js +47 -47
  12. package/dist/access-memory-search-fanout.js +3 -3
  13. package/dist/access-namespace-preflight.js +36 -36
  14. package/dist/access-observe-write-surface.js +36 -36
  15. package/dist/access-offline-manifest.js +6 -6
  16. package/dist/access-operations-batch.js +38 -38
  17. package/dist/access-operations.js +45 -45
  18. package/dist/access-recall-concurrency.js +36 -36
  19. package/dist/access-recall-diagnostics.js +5 -5
  20. package/dist/access-recall-response.js +36 -36
  21. package/dist/access-recall-surface.js +36 -36
  22. package/dist/access-service.js +36 -36
  23. package/dist/access-surface-catalog.js +38 -38
  24. package/dist/active-memory-bridge.js +3 -3
  25. package/dist/active-recall.js +9 -9
  26. package/dist/{auto-sync-CWSZDLLW.js → auto-sync-QJNIKZHV.js} +5 -5
  27. package/dist/briefing.js +8 -8
  28. package/dist/buffer-turn-helpers.d.ts.map +1 -1
  29. package/dist/buffer-turn-helpers.js +1 -1
  30. package/dist/buffer.d.ts.map +1 -1
  31. package/dist/buffer.js +7 -7
  32. package/dist/calibration.js +2 -2
  33. package/dist/capabilities.d.ts +6 -7
  34. package/dist/capabilities.d.ts.map +1 -1
  35. package/dist/capabilities.js +1 -1
  36. package/dist/causal-consolidation.js +9 -9
  37. package/dist/{chunk-6Q3ZTEF6.js → chunk-23G5P7TA.js} +9 -1
  38. package/dist/chunk-23G5P7TA.js.map +1 -0
  39. package/dist/{chunk-RP7TZEI6.js → chunk-2C5Z7CWB.js} +2 -2
  40. package/dist/{chunk-6JYYSDHH.js → chunk-2L5DIVDU.js} +4 -4
  41. package/dist/{chunk-ZLVUWROW.js → chunk-2OUSWDY6.js} +2 -2
  42. package/dist/{chunk-M5IJP3YW.js → chunk-2PKGJPQL.js} +2 -2
  43. package/dist/{chunk-FJMYMJLR.js → chunk-3JDA3XF5.js} +2 -2
  44. package/dist/{chunk-KR5SZNNF.js → chunk-4IFSMCRS.js} +2 -2
  45. package/dist/{chunk-KPKGDQR3.js → chunk-4P3ZBL5E.js} +2 -2
  46. package/dist/{chunk-YUHGJBQK.js → chunk-5LWVTSF7.js} +2 -2
  47. package/dist/{chunk-2T2RF5ZK.js → chunk-5QZHDS4X.js} +5 -5
  48. package/dist/{chunk-DJ4CKWAD.js → chunk-5Y7VCE3A.js} +2 -2
  49. package/dist/{chunk-G2XZFGYN.js → chunk-62JTOLEX.js} +2 -2
  50. package/dist/{chunk-LVXBC6YB.js → chunk-65I2LZEK.js} +2 -2
  51. package/dist/{chunk-NZLFVLLJ.js → chunk-7CRUDH7G.js} +2 -2
  52. package/dist/{chunk-B4EGAHHS.js → chunk-7DE2NOON.js} +2 -2
  53. package/dist/{chunk-BSDBDFKZ.js → chunk-7JFQI6DQ.js} +3 -3
  54. package/dist/{chunk-BOADKFN4.js → chunk-7LNHRQKR.js} +2 -2
  55. package/dist/{chunk-IV6APZJS.js → chunk-7OC3Q5X4.js} +2 -2
  56. package/dist/{chunk-X2QPKLPL.js → chunk-ACX55QDO.js} +3 -3
  57. package/dist/{chunk-YLPCEUXP.js → chunk-AEGQ5PJ7.js} +2 -2
  58. package/dist/{chunk-GK6NOQE6.js → chunk-AERXJCOG.js} +2 -2
  59. package/dist/{chunk-HW2QYZEV.js → chunk-B5GMOOY2.js} +5 -5
  60. package/dist/{chunk-JUOZ62Y7.js → chunk-BMXEBWBT.js} +2 -1
  61. package/dist/chunk-BMXEBWBT.js.map +1 -0
  62. package/dist/{chunk-YHGRA7CK.js → chunk-CDQO5DCD.js} +2 -2
  63. package/dist/{chunk-ENUI3IO7.js → chunk-D433RXFJ.js} +2 -2
  64. package/dist/{chunk-IK63WA5A.js → chunk-D4SPMHEW.js} +2 -2
  65. package/dist/{chunk-IDBLAGIM.js → chunk-DC5CTLCZ.js} +14 -14
  66. package/dist/{chunk-42DJ235G.js → chunk-DINRT75P.js} +2 -2
  67. package/dist/{chunk-LELJRLPY.js → chunk-DQFZOPDL.js} +2 -2
  68. package/dist/{chunk-WN4HFL4K.js → chunk-DQISIT63.js} +2 -2
  69. package/dist/{chunk-Q7KQ5YHT.js → chunk-EIU642TN.js} +2 -2
  70. package/dist/{chunk-EN2YX5SF.js → chunk-F4PEETM4.js} +3 -3
  71. package/dist/{chunk-FNQEXI3D.js → chunk-F5O6WEDO.js} +1 -1
  72. package/dist/{chunk-FNQEXI3D.js.map → chunk-F5O6WEDO.js.map} +1 -1
  73. package/dist/{chunk-Q6C5PIBW.js → chunk-F5ZCNJ3V.js} +3 -3
  74. package/dist/{chunk-42G4FIKQ.js → chunk-FG5QU7A2.js} +4 -4
  75. package/dist/{chunk-IRGQYQQ7.js → chunk-FM5HN7LL.js} +4 -4
  76. package/dist/{chunk-FF2XYADH.js → chunk-FQGY7XB2.js} +6 -6
  77. package/dist/{chunk-FF2XYADH.js.map → chunk-FQGY7XB2.js.map} +1 -1
  78. package/dist/{chunk-R4Y5PF25.js → chunk-FWVDTLRK.js} +1 -1
  79. package/dist/{chunk-C6FQJ52H.js → chunk-G2XTGEGL.js} +65 -18
  80. package/dist/chunk-G2XTGEGL.js.map +1 -0
  81. package/dist/{chunk-Q5FL3MEH.js → chunk-G4WZDQ32.js} +3 -3
  82. package/dist/{chunk-4HNY6ORZ.js → chunk-GMHWCPLP.js} +2 -2
  83. package/dist/{chunk-ZWWKKAJL.js → chunk-GYNCJSQ7.js} +4 -4
  84. package/dist/{chunk-BJI2D4SU.js → chunk-GZBNEZIU.js} +3 -3
  85. package/dist/{chunk-NYVECYCF.js → chunk-HNOKNHFO.js} +2 -2
  86. package/dist/{chunk-XLXYARWC.js → chunk-HXCJF4XU.js} +2 -2
  87. package/dist/{chunk-RMF763SX.js → chunk-IDRSTHVR.js} +5 -5
  88. package/dist/{chunk-UXREWVW4.js → chunk-IW3RMBPB.js} +2 -2
  89. package/dist/{chunk-W6YK672C.js → chunk-JTTLH646.js} +3 -3
  90. package/dist/{chunk-Y76HXF3F.js → chunk-K7S2IMGJ.js} +93 -38
  91. package/dist/{chunk-Y76HXF3F.js.map → chunk-K7S2IMGJ.js.map} +1 -1
  92. package/dist/{chunk-AJW2K7K3.js → chunk-KIOXEHWF.js} +2 -2
  93. package/dist/{chunk-BQB5ZMYO.js → chunk-KKNZ7PUZ.js} +2 -2
  94. package/dist/{chunk-AAMFQHKI.js → chunk-KRPMISWO.js} +3 -3
  95. package/dist/{chunk-XX2IGMCB.js → chunk-KV44HTMJ.js} +2 -2
  96. package/dist/{chunk-FKFTPFUG.js → chunk-KXJ7XYUT.js} +2 -2
  97. package/dist/{chunk-5SV2GFZX.js → chunk-LDP6LBDS.js} +2 -2
  98. package/dist/{chunk-F6WCOXTF.js → chunk-LMLPLIT4.js} +2 -2
  99. package/dist/{chunk-JGT7M3BA.js → chunk-LY3SDHMI.js} +6 -6
  100. package/dist/{chunk-2NZ7KWRW.js → chunk-M4PHCEPU.js} +2 -2
  101. package/dist/{chunk-VRF2KFI2.js → chunk-NORFVW2H.js} +2 -2
  102. package/dist/{chunk-OINFRHLR.js → chunk-NRTVZSPO.js} +2 -2
  103. package/dist/{chunk-IAZPYX6W.js → chunk-NRVGODSE.js} +3 -3
  104. package/dist/{chunk-IHOXK2I6.js → chunk-NVKO5YKP.js} +2 -2
  105. package/dist/{chunk-OQQXGYMX.js → chunk-OWYHHW67.js} +4 -4
  106. package/dist/{chunk-DXODYQ7J.js → chunk-Q3THVX75.js} +2 -2
  107. package/dist/{chunk-TAC5WFJC.js → chunk-QEGKMZNQ.js} +4 -4
  108. package/dist/{chunk-V2HHAAPI.js → chunk-RB776UH3.js} +2 -2
  109. package/dist/{chunk-TAIIC5OM.js → chunk-SEHKTE4F.js} +3 -3
  110. package/dist/{chunk-3JLWSFTV.js → chunk-SVWYZXIL.js} +8 -5
  111. package/dist/{chunk-3JLWSFTV.js.map → chunk-SVWYZXIL.js.map} +1 -1
  112. package/dist/{chunk-G6E7XJYL.js → chunk-SZAWZPY6.js} +10 -10
  113. package/dist/{chunk-2AD5SXO4.js → chunk-T5IF2ZCE.js} +5 -2
  114. package/dist/chunk-T5IF2ZCE.js.map +1 -0
  115. package/dist/{chunk-OVJFS5P5.js → chunk-TM7S5UHD.js} +2 -2
  116. package/dist/{chunk-7DNMX7SA.js → chunk-TQAXUYUE.js} +2 -2
  117. package/dist/{chunk-7WSQZJPC.js → chunk-V3JM4XEI.js} +4 -4
  118. package/dist/{chunk-36S7UHAW.js → chunk-VEBYLZQQ.js} +2 -2
  119. package/dist/{chunk-IMJPJY7V.js → chunk-VHF73MGU.js} +2 -2
  120. package/dist/{chunk-TDULASPE.js → chunk-VKDWYDFQ.js} +7 -7
  121. package/dist/{chunk-NKXHCCLB.js → chunk-VTPASHTO.js} +2 -2
  122. package/dist/{chunk-L3R24OLZ.js → chunk-W65KK3X6.js} +2 -2
  123. package/dist/{chunk-MNIPH6LD.js → chunk-WBYQA3VN.js} +3 -3
  124. package/dist/{chunk-4B5S3VWD.js → chunk-WD32KTVI.js} +28 -28
  125. package/dist/{chunk-WD2JD2UB.js → chunk-WEQZ5OYK.js} +2 -2
  126. package/dist/{chunk-UD6J2LIA.js → chunk-XDH5MO6L.js} +2 -2
  127. package/dist/{chunk-QJTFMH5Y.js → chunk-XN4CPSCN.js} +2 -2
  128. package/dist/{chunk-64JK4TL7.js → chunk-XOLVM3AT.js} +3 -3
  129. package/dist/{chunk-MRV7VSQK.js → chunk-Y23L4YJV.js} +2 -2
  130. package/dist/{chunk-6ISP2EN2.js → chunk-YF3JERFZ.js} +2 -2
  131. package/dist/{chunk-TYZK56OA.js → chunk-YL2W6NUG.js} +7 -7
  132. package/dist/{chunk-C5CPYMLX.js → chunk-YR6A6ZK7.js} +2 -2
  133. package/dist/{chunk-EJO2NWW7.js → chunk-Z3YQOV45.js} +2 -2
  134. package/dist/{chunk-6KTXE6A3.js → chunk-Z4TXB4K7.js} +2 -2
  135. package/dist/{chunk-6VITOSPL.js → chunk-ZFUPRODV.js} +2 -2
  136. package/dist/{chunk-BJX6G726.js → chunk-ZJ6MEVTX.js} +65 -62
  137. package/dist/chunk-ZJ6MEVTX.js.map +1 -0
  138. package/dist/{chunk-ADP2VCP6.js → chunk-ZNFHWNDM.js} +5 -5
  139. package/dist/cli.js +68 -68
  140. package/dist/coding/export-okf-codegraph.js +7 -7
  141. package/dist/compounding/engine.js +9 -9
  142. package/dist/config-security.d.ts +4 -0
  143. package/dist/config-security.d.ts.map +1 -1
  144. package/dist/config-security.js +2 -2
  145. package/dist/config.js +9 -9
  146. package/dist/connectors/codex-materialize-runner.js +8 -8
  147. package/dist/connectors/index.js +9 -9
  148. package/dist/contradiction/index.js +3 -3
  149. package/dist/{contradiction-scan-GVD4JJ7B.js → contradiction-scan-5EJYRKD3.js} +3 -3
  150. package/dist/convergence-refresh.js +10 -10
  151. package/dist/corpus-watermark.js +10 -10
  152. package/dist/day-summary.js +2 -2
  153. package/dist/embedding-fallback.js +2 -2
  154. package/dist/entity-retrieval.js +9 -9
  155. package/dist/explicit-capture.js +2 -2
  156. package/dist/external-wiki-access.js +37 -37
  157. package/dist/extraction-judge.js +3 -3
  158. package/dist/extraction-normalization.js +3 -3
  159. package/dist/extraction-prompt.js +2 -2
  160. package/dist/extraction.js +19 -19
  161. package/dist/{first-start-migration-L3UFX5CU.js → first-start-migration-7OATHJKB.js} +2 -2
  162. package/dist/harmonic-retrieval.js +1 -1
  163. package/dist/index.d.ts +2 -2
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.js +95 -93
  166. package/dist/local-llm.js +2 -2
  167. package/dist/location/index.js +10 -10
  168. package/dist/maintenance/memory-governance.js +8 -8
  169. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +8 -8
  170. package/dist/maintenance/rebuild-memory-projection.js +9 -9
  171. package/dist/memory-browse-operations.js +37 -37
  172. package/dist/namespaces/migrate.js +9 -9
  173. package/dist/namespaces/principal.js +2 -2
  174. package/dist/namespaces/search.js +4 -4
  175. package/dist/namespaces/storage.js +8 -8
  176. package/dist/offline-sync-impression-drain.js +5 -5
  177. package/dist/operator-doctor-corpus.js +11 -11
  178. package/dist/operator-toolkit.js +21 -21
  179. package/dist/orchestration/compression-guideline-coordinator.js +2 -2
  180. package/dist/orchestration/extraction-injection-gate.d.ts +5 -4
  181. package/dist/orchestration/extraction-injection-gate.d.ts.map +1 -1
  182. package/dist/orchestration/maintenance.js +20 -20
  183. package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
  184. package/dist/orchestrator.js +93 -93
  185. package/dist/recall-composition-decision.js +3 -3
  186. package/dist/recall-context-composition.js +2 -2
  187. package/dist/recall-explain-renderer.js +3 -3
  188. package/dist/recall-navigate-access.js +2 -2
  189. package/dist/recall-navigate-disclosure.js +2 -2
  190. package/dist/recall-navigate.js +2 -2
  191. package/dist/recall-navigation-operations.js +37 -37
  192. package/dist/recall-navigation.js +36 -36
  193. package/dist/recall-why-service.js +5 -5
  194. package/dist/recall-why.js +3 -3
  195. package/dist/recall-xray-cli.js +4 -4
  196. package/dist/recall-xray-renderer.js +3 -3
  197. package/dist/recall-xray.js +2 -2
  198. package/dist/{resolution-CHNISQJB.js → resolution-UYJU5JUA.js} +4 -4
  199. package/dist/resume-bundles.js +10 -10
  200. package/dist/search/embed-helper.js +2 -2
  201. package/dist/search/factory.js +3 -3
  202. package/dist/search/index.js +3 -3
  203. package/dist/security/audit-memory.d.ts +3 -0
  204. package/dist/security/audit-memory.d.ts.map +1 -1
  205. package/dist/security/injection-screen.d.ts +2 -1
  206. package/dist/security/injection-screen.d.ts.map +1 -1
  207. package/dist/security/origin-authority.d.ts +3 -0
  208. package/dist/security/origin-authority.d.ts.map +1 -1
  209. package/dist/security/types.d.ts +5 -0
  210. package/dist/security/types.d.ts.map +1 -1
  211. package/dist/semantic-consolidation.js +9 -9
  212. package/dist/semantic-rule-promotion.js +8 -8
  213. package/dist/semantic-rule-verifier.js +8 -8
  214. package/dist/shared-context/manager.js +2 -2
  215. package/dist/source-agent-qualifier.js +14 -14
  216. package/dist/standup/build.js +8 -8
  217. package/dist/storage.js +7 -7
  218. package/dist/summarizer.js +3 -3
  219. package/dist/support-passport/index.js +39 -39
  220. package/dist/temporal-timeline-recall.js +3 -3
  221. package/dist/{tier-stats-VK5PCO2L.js → tier-stats-VF6DS52E.js} +2 -2
  222. package/dist/transfer/export-okf.js +8 -8
  223. package/dist/types.d.ts +4 -3
  224. package/dist/types.d.ts.map +1 -1
  225. package/dist/types.js +1 -1
  226. package/dist/verified-recall.js +8 -8
  227. package/dist/who-knows-cli.js +9 -9
  228. package/dist/who-knows.js +8 -8
  229. package/package.json +2 -2
  230. package/src/buffer-turn-helpers.ts +4 -0
  231. package/src/buffer.ts +3 -0
  232. package/src/capabilities.test.ts +4 -1
  233. package/src/capabilities.ts +7 -7
  234. package/src/config-security.ts +103 -16
  235. package/src/config.test.ts +58 -1
  236. package/src/connector-provenance-lifecycle.test.ts +19 -0
  237. package/src/index.ts +2 -2
  238. package/src/orchestration/extraction-injection-gate.ts +11 -7
  239. package/src/orchestration/extraction-origin-context.ts +1 -1
  240. package/src/orchestration/extraction-persist.ts +8 -8
  241. package/src/orchestration/extraction-security.test.ts +12 -0
  242. package/src/orchestration/turn-ingestion.ts +2 -0
  243. package/src/security/audit-memory.test.ts +21 -10
  244. package/src/security/audit-memory.ts +6 -2
  245. package/src/security/injection-screen.test.ts +56 -0
  246. package/src/security/injection-screen.ts +81 -8
  247. package/src/security/origin-authority.ts +10 -0
  248. package/src/security/types.ts +11 -0
  249. package/src/types.ts +4 -3
  250. package/dist/chunk-2AD5SXO4.js.map +0 -1
  251. package/dist/chunk-6Q3ZTEF6.js.map +0 -1
  252. package/dist/chunk-BJX6G726.js.map +0 -1
  253. package/dist/chunk-C6FQJ52H.js.map +0 -1
  254. package/dist/chunk-JUOZ62Y7.js.map +0 -1
  255. /package/dist/{auto-sync-CWSZDLLW.js.map → auto-sync-QJNIKZHV.js.map} +0 -0
  256. /package/dist/{chunk-RP7TZEI6.js.map → chunk-2C5Z7CWB.js.map} +0 -0
  257. /package/dist/{chunk-6JYYSDHH.js.map → chunk-2L5DIVDU.js.map} +0 -0
  258. /package/dist/{chunk-ZLVUWROW.js.map → chunk-2OUSWDY6.js.map} +0 -0
  259. /package/dist/{chunk-M5IJP3YW.js.map → chunk-2PKGJPQL.js.map} +0 -0
  260. /package/dist/{chunk-FJMYMJLR.js.map → chunk-3JDA3XF5.js.map} +0 -0
  261. /package/dist/{chunk-KR5SZNNF.js.map → chunk-4IFSMCRS.js.map} +0 -0
  262. /package/dist/{chunk-KPKGDQR3.js.map → chunk-4P3ZBL5E.js.map} +0 -0
  263. /package/dist/{chunk-YUHGJBQK.js.map → chunk-5LWVTSF7.js.map} +0 -0
  264. /package/dist/{chunk-2T2RF5ZK.js.map → chunk-5QZHDS4X.js.map} +0 -0
  265. /package/dist/{chunk-DJ4CKWAD.js.map → chunk-5Y7VCE3A.js.map} +0 -0
  266. /package/dist/{chunk-G2XZFGYN.js.map → chunk-62JTOLEX.js.map} +0 -0
  267. /package/dist/{chunk-LVXBC6YB.js.map → chunk-65I2LZEK.js.map} +0 -0
  268. /package/dist/{chunk-NZLFVLLJ.js.map → chunk-7CRUDH7G.js.map} +0 -0
  269. /package/dist/{chunk-B4EGAHHS.js.map → chunk-7DE2NOON.js.map} +0 -0
  270. /package/dist/{chunk-BSDBDFKZ.js.map → chunk-7JFQI6DQ.js.map} +0 -0
  271. /package/dist/{chunk-BOADKFN4.js.map → chunk-7LNHRQKR.js.map} +0 -0
  272. /package/dist/{chunk-IV6APZJS.js.map → chunk-7OC3Q5X4.js.map} +0 -0
  273. /package/dist/{chunk-X2QPKLPL.js.map → chunk-ACX55QDO.js.map} +0 -0
  274. /package/dist/{chunk-YLPCEUXP.js.map → chunk-AEGQ5PJ7.js.map} +0 -0
  275. /package/dist/{chunk-GK6NOQE6.js.map → chunk-AERXJCOG.js.map} +0 -0
  276. /package/dist/{chunk-HW2QYZEV.js.map → chunk-B5GMOOY2.js.map} +0 -0
  277. /package/dist/{chunk-YHGRA7CK.js.map → chunk-CDQO5DCD.js.map} +0 -0
  278. /package/dist/{chunk-ENUI3IO7.js.map → chunk-D433RXFJ.js.map} +0 -0
  279. /package/dist/{chunk-IK63WA5A.js.map → chunk-D4SPMHEW.js.map} +0 -0
  280. /package/dist/{chunk-IDBLAGIM.js.map → chunk-DC5CTLCZ.js.map} +0 -0
  281. /package/dist/{chunk-42DJ235G.js.map → chunk-DINRT75P.js.map} +0 -0
  282. /package/dist/{chunk-LELJRLPY.js.map → chunk-DQFZOPDL.js.map} +0 -0
  283. /package/dist/{chunk-WN4HFL4K.js.map → chunk-DQISIT63.js.map} +0 -0
  284. /package/dist/{chunk-Q7KQ5YHT.js.map → chunk-EIU642TN.js.map} +0 -0
  285. /package/dist/{chunk-EN2YX5SF.js.map → chunk-F4PEETM4.js.map} +0 -0
  286. /package/dist/{chunk-Q6C5PIBW.js.map → chunk-F5ZCNJ3V.js.map} +0 -0
  287. /package/dist/{chunk-42G4FIKQ.js.map → chunk-FG5QU7A2.js.map} +0 -0
  288. /package/dist/{chunk-IRGQYQQ7.js.map → chunk-FM5HN7LL.js.map} +0 -0
  289. /package/dist/{chunk-R4Y5PF25.js.map → chunk-FWVDTLRK.js.map} +0 -0
  290. /package/dist/{chunk-Q5FL3MEH.js.map → chunk-G4WZDQ32.js.map} +0 -0
  291. /package/dist/{chunk-4HNY6ORZ.js.map → chunk-GMHWCPLP.js.map} +0 -0
  292. /package/dist/{chunk-ZWWKKAJL.js.map → chunk-GYNCJSQ7.js.map} +0 -0
  293. /package/dist/{chunk-BJI2D4SU.js.map → chunk-GZBNEZIU.js.map} +0 -0
  294. /package/dist/{chunk-NYVECYCF.js.map → chunk-HNOKNHFO.js.map} +0 -0
  295. /package/dist/{chunk-XLXYARWC.js.map → chunk-HXCJF4XU.js.map} +0 -0
  296. /package/dist/{chunk-RMF763SX.js.map → chunk-IDRSTHVR.js.map} +0 -0
  297. /package/dist/{chunk-UXREWVW4.js.map → chunk-IW3RMBPB.js.map} +0 -0
  298. /package/dist/{chunk-W6YK672C.js.map → chunk-JTTLH646.js.map} +0 -0
  299. /package/dist/{chunk-AJW2K7K3.js.map → chunk-KIOXEHWF.js.map} +0 -0
  300. /package/dist/{chunk-BQB5ZMYO.js.map → chunk-KKNZ7PUZ.js.map} +0 -0
  301. /package/dist/{chunk-AAMFQHKI.js.map → chunk-KRPMISWO.js.map} +0 -0
  302. /package/dist/{chunk-XX2IGMCB.js.map → chunk-KV44HTMJ.js.map} +0 -0
  303. /package/dist/{chunk-FKFTPFUG.js.map → chunk-KXJ7XYUT.js.map} +0 -0
  304. /package/dist/{chunk-5SV2GFZX.js.map → chunk-LDP6LBDS.js.map} +0 -0
  305. /package/dist/{chunk-F6WCOXTF.js.map → chunk-LMLPLIT4.js.map} +0 -0
  306. /package/dist/{chunk-JGT7M3BA.js.map → chunk-LY3SDHMI.js.map} +0 -0
  307. /package/dist/{chunk-2NZ7KWRW.js.map → chunk-M4PHCEPU.js.map} +0 -0
  308. /package/dist/{chunk-VRF2KFI2.js.map → chunk-NORFVW2H.js.map} +0 -0
  309. /package/dist/{chunk-OINFRHLR.js.map → chunk-NRTVZSPO.js.map} +0 -0
  310. /package/dist/{chunk-IAZPYX6W.js.map → chunk-NRVGODSE.js.map} +0 -0
  311. /package/dist/{chunk-IHOXK2I6.js.map → chunk-NVKO5YKP.js.map} +0 -0
  312. /package/dist/{chunk-OQQXGYMX.js.map → chunk-OWYHHW67.js.map} +0 -0
  313. /package/dist/{chunk-DXODYQ7J.js.map → chunk-Q3THVX75.js.map} +0 -0
  314. /package/dist/{chunk-TAC5WFJC.js.map → chunk-QEGKMZNQ.js.map} +0 -0
  315. /package/dist/{chunk-V2HHAAPI.js.map → chunk-RB776UH3.js.map} +0 -0
  316. /package/dist/{chunk-TAIIC5OM.js.map → chunk-SEHKTE4F.js.map} +0 -0
  317. /package/dist/{chunk-G6E7XJYL.js.map → chunk-SZAWZPY6.js.map} +0 -0
  318. /package/dist/{chunk-OVJFS5P5.js.map → chunk-TM7S5UHD.js.map} +0 -0
  319. /package/dist/{chunk-7DNMX7SA.js.map → chunk-TQAXUYUE.js.map} +0 -0
  320. /package/dist/{chunk-7WSQZJPC.js.map → chunk-V3JM4XEI.js.map} +0 -0
  321. /package/dist/{chunk-36S7UHAW.js.map → chunk-VEBYLZQQ.js.map} +0 -0
  322. /package/dist/{chunk-IMJPJY7V.js.map → chunk-VHF73MGU.js.map} +0 -0
  323. /package/dist/{chunk-TDULASPE.js.map → chunk-VKDWYDFQ.js.map} +0 -0
  324. /package/dist/{chunk-NKXHCCLB.js.map → chunk-VTPASHTO.js.map} +0 -0
  325. /package/dist/{chunk-L3R24OLZ.js.map → chunk-W65KK3X6.js.map} +0 -0
  326. /package/dist/{chunk-MNIPH6LD.js.map → chunk-WBYQA3VN.js.map} +0 -0
  327. /package/dist/{chunk-4B5S3VWD.js.map → chunk-WD32KTVI.js.map} +0 -0
  328. /package/dist/{chunk-WD2JD2UB.js.map → chunk-WEQZ5OYK.js.map} +0 -0
  329. /package/dist/{chunk-UD6J2LIA.js.map → chunk-XDH5MO6L.js.map} +0 -0
  330. /package/dist/{chunk-QJTFMH5Y.js.map → chunk-XN4CPSCN.js.map} +0 -0
  331. /package/dist/{chunk-64JK4TL7.js.map → chunk-XOLVM3AT.js.map} +0 -0
  332. /package/dist/{chunk-MRV7VSQK.js.map → chunk-Y23L4YJV.js.map} +0 -0
  333. /package/dist/{chunk-6ISP2EN2.js.map → chunk-YF3JERFZ.js.map} +0 -0
  334. /package/dist/{chunk-TYZK56OA.js.map → chunk-YL2W6NUG.js.map} +0 -0
  335. /package/dist/{chunk-C5CPYMLX.js.map → chunk-YR6A6ZK7.js.map} +0 -0
  336. /package/dist/{chunk-EJO2NWW7.js.map → chunk-Z3YQOV45.js.map} +0 -0
  337. /package/dist/{chunk-6KTXE6A3.js.map → chunk-Z4TXB4K7.js.map} +0 -0
  338. /package/dist/{chunk-6VITOSPL.js.map → chunk-ZFUPRODV.js.map} +0 -0
  339. /package/dist/{chunk-ADP2VCP6.js.map → chunk-ZNFHWNDM.js.map} +0 -0
  340. /package/dist/{contradiction-scan-GVD4JJ7B.js.map → contradiction-scan-5EJYRKD3.js.map} +0 -0
  341. /package/dist/{first-start-migration-L3UFX5CU.js.map → first-start-migration-7OATHJKB.js.map} +0 -0
  342. /package/dist/{resolution-CHNISQJB.js.map → resolution-UYJU5JUA.js.map} +0 -0
  343. /package/dist/{tier-stats-VK5PCO2L.js.map → tier-stats-VF6DS52E.js.map} +0 -0
@@ -1,6 +1,7 @@
1
1
  import {
2
- DEFAULT_UNTRUSTED_ORIGINS
3
- } from "./chunk-6Q3ZTEF6.js";
2
+ DEFAULT_UNTRUSTED_ORIGINS,
3
+ HARDENED_UNTRUSTED_ORIGINS
4
+ } from "./chunk-23G5P7TA.js";
4
5
  import {
5
6
  coerceBool
6
7
  } from "./chunk-PQVCH2AE.js";
@@ -68,27 +69,73 @@ function resolveUntrustedOrigins(value, rawOperatorConfig) {
68
69
  }
69
70
  return normalized.length > 0 ? normalized : [...DEFAULT_UNTRUSTED_ORIGINS];
70
71
  }
72
+ function validateDefenseMode(value) {
73
+ if (value === "custom" || value === "off" || value === "fencing" || value === "quarantine" || value === "layered") {
74
+ return value;
75
+ }
76
+ throw new Error(
77
+ `memoryInjectionDefenseMode must be custom|off|fencing|quarantine|layered; got ${JSON.stringify(value)}`
78
+ );
79
+ }
80
+ function isOperatorAuthored(rawOperatorConfig, key) {
81
+ return rawOperatorConfig !== void 0 && rawOperatorConfig !== null && Object.prototype.hasOwnProperty.call(rawOperatorConfig, key) && rawOperatorConfig[key] !== void 0 && rawOperatorConfig[key] !== null;
82
+ }
83
+ function resolveMemoryInjectionDefenseMode(value, rawOperatorConfig) {
84
+ if (isOperatorAuthored(rawOperatorConfig, "memoryInjectionDefenseMode")) {
85
+ return validateDefenseMode(
86
+ rawOperatorConfig.memoryInjectionDefenseMode
87
+ );
88
+ }
89
+ const envValue = readEnvVar("REMNIC_MEMORY_INJECTION_DEFENSE_MODE");
90
+ if (envValue !== void 0 && rawOperatorConfig !== void 0) return validateDefenseMode(envValue);
91
+ if (value !== void 0 && value !== null) return validateDefenseMode(value);
92
+ if (envValue !== void 0) return validateDefenseMode(envValue);
93
+ return "custom";
94
+ }
95
+ function hasExplicitUntrustedOrigins(cfg, rawOperatorConfig) {
96
+ const configAuthored = rawOperatorConfig === void 0 ? Object.prototype.hasOwnProperty.call(cfg, "untrustedOrigins") : rawOperatorConfig !== null && Object.prototype.hasOwnProperty.call(rawOperatorConfig, "untrustedOrigins");
97
+ return configAuthored || readEnvVar("REMNIC_UNTRUSTED_ORIGINS") !== void 0;
98
+ }
71
99
  function parseSecurityConfig(cfg, rawOperatorConfig) {
100
+ const memoryInjectionDefenseMode = resolveMemoryInjectionDefenseMode(
101
+ cfg.memoryInjectionDefenseMode,
102
+ rawOperatorConfig
103
+ );
104
+ const customOriginAuthority = resolveSecurityBooleanConfig(
105
+ cfg.originAuthorityEnabled,
106
+ rawOperatorConfig,
107
+ "originAuthorityEnabled",
108
+ "REMNIC_ORIGIN_AUTHORITY_ENABLED",
109
+ false
110
+ );
111
+ const customInjectionScreen = resolveSecurityBooleanConfig(
112
+ cfg.injectionScreenEnabled,
113
+ rawOperatorConfig,
114
+ "injectionScreenEnabled",
115
+ "REMNIC_INJECTION_SCREEN_ENABLED",
116
+ true
117
+ );
118
+ const flags = {
119
+ custom: [customOriginAuthority, customInjectionScreen],
120
+ off: [false, false],
121
+ fencing: [true, false],
122
+ quarantine: [false, true],
123
+ layered: [true, true]
124
+ };
125
+ const [originAuthorityEnabled, injectionScreenEnabled] = flags[memoryInjectionDefenseMode];
126
+ const injectionScreenProfile = memoryInjectionDefenseMode === "custom" ? "default" : "hardened";
127
+ const configuredOrigins = resolveUntrustedOrigins(cfg.untrustedOrigins, rawOperatorConfig);
128
+ const untrustedOrigins = memoryInjectionDefenseMode !== "custom" && !hasExplicitUntrustedOrigins(cfg, rawOperatorConfig) ? [...HARDENED_UNTRUSTED_ORIGINS] : configuredOrigins;
72
129
  return {
73
- originAuthorityEnabled: resolveSecurityBooleanConfig(
74
- cfg.originAuthorityEnabled,
75
- rawOperatorConfig,
76
- "originAuthorityEnabled",
77
- "REMNIC_ORIGIN_AUTHORITY_ENABLED",
78
- false
79
- ),
80
- injectionScreenEnabled: resolveSecurityBooleanConfig(
81
- cfg.injectionScreenEnabled,
82
- rawOperatorConfig,
83
- "injectionScreenEnabled",
84
- "REMNIC_INJECTION_SCREEN_ENABLED",
85
- true
86
- ),
87
- untrustedOrigins: resolveUntrustedOrigins(cfg.untrustedOrigins, rawOperatorConfig)
130
+ memoryInjectionDefenseMode,
131
+ originAuthorityEnabled,
132
+ injectionScreenEnabled,
133
+ injectionScreenProfile,
134
+ untrustedOrigins
88
135
  };
89
136
  }
90
137
 
91
138
  export {
92
139
  parseSecurityConfig
93
140
  };
94
- //# sourceMappingURL=chunk-C6FQJ52H.js.map
141
+ //# sourceMappingURL=chunk-G2XTGEGL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config-security.ts"],"sourcesContent":["import { coerceBool } from \"./connectors/coerce.js\";\nimport { readEnvVar } from \"./runtime/env.js\";\nimport {\n DEFAULT_UNTRUSTED_ORIGINS,\n HARDENED_UNTRUSTED_ORIGINS,\n} from \"./security/origin-authority.js\";\nimport type { MemoryInjectionDefenseMode } from \"./security/types.js\";\nimport type { InjectionScreenProfile } from \"./security/injection-screen.js\";\n\n// Memory-poisoning hardening (#1955): preserve explicit config, but let env\n// values replace schema-materialized defaults from the host config loader.\nfunction resolveSecurityBooleanConfig(\n value: unknown,\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n flagName: string,\n envName: string,\n defaultValue: boolean,\n): boolean {\n const rawAuthored =\n rawOperatorConfig !== undefined &&\n rawOperatorConfig !== null &&\n Object.prototype.hasOwnProperty.call(rawOperatorConfig, flagName) &&\n rawOperatorConfig[flagName] !== undefined &&\n rawOperatorConfig[flagName] !== null;\n const schemaDefaultMaterialized =\n rawOperatorConfig !== undefined &&\n !rawAuthored &&\n value === defaultValue;\n if (!schemaDefaultMaterialized && value !== undefined && value !== null) {\n return resolveBooleanConfig(value, defaultValue, flagName);\n }\n if (rawAuthored) {\n return resolveBooleanConfig(value ?? rawOperatorConfig?.[flagName], defaultValue, flagName);\n }\n const envValue = readEnvVar(envName);\n return envValue === undefined\n ? defaultValue\n : resolveBooleanConfig(envValue, defaultValue, flagName);\n}\n\nfunction resolveBooleanConfig(\n value: unknown,\n defaultValue: boolean,\n keyName: string,\n): boolean {\n if (value === undefined || value === null) return defaultValue;\n const coerced = coerceBool(value);\n if (coerced === undefined) {\n throw new Error(\n `${keyName} must be a boolean-like value (true/false/1/0/yes/no/on/off); got ${JSON.stringify(value)}`,\n );\n }\n return coerced;\n}\n\n// Memory-poisoning hardening (#1955): keep origin allow-list parsing in the\n// parser module so config-contract extraction covers this delegated surface.\nfunction resolveUntrustedOrigins(\n value: unknown,\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n): string[] {\n const rawAuthored =\n rawOperatorConfig !== undefined &&\n rawOperatorConfig !== null &&\n Object.prototype.hasOwnProperty.call(rawOperatorConfig, \"untrustedOrigins\") &&\n rawOperatorConfig.untrustedOrigins !== undefined &&\n rawOperatorConfig.untrustedOrigins !== null;\n const schemaDefaultMaterialized =\n rawOperatorConfig !== undefined &&\n !rawAuthored &&\n Array.isArray(value) &&\n value.length === DEFAULT_UNTRUSTED_ORIGINS.length &&\n value.every((entry, index) => entry === DEFAULT_UNTRUSTED_ORIGINS[index]);\n const configValue = schemaDefaultMaterialized ? undefined : value;\n const fromEnv = configValue === undefined || configValue === null;\n const envValue = fromEnv ? readEnvVar(\"REMNIC_UNTRUSTED_ORIGINS\") : undefined;\n const source = fromEnv ? envValue : configValue;\n if (source === undefined || source === null) return [...DEFAULT_UNTRUSTED_ORIGINS];\n\n let entries: unknown[];\n if (Array.isArray(source)) {\n entries = source;\n } else if (fromEnv && typeof source === \"string\" && source.trim().length > 0) {\n const trimmed = source.trim();\n if (trimmed.startsWith(\"[\")) {\n try {\n const parsed: unknown = JSON.parse(trimmed);\n if (!Array.isArray(parsed)) throw new Error(\"not an array\");\n entries = parsed;\n } catch {\n throw new Error(\"untrustedOrigins must be an array of strings\");\n }\n } else {\n entries = trimmed.split(\",\");\n }\n } else {\n throw new Error(\"untrustedOrigins must be an array of strings\");\n }\n\n const normalized: string[] = [];\n for (const entry of entries) {\n if (typeof entry !== \"string\") {\n throw new Error(\"untrustedOrigins must be an array of strings\");\n }\n const trimmed = entry.trim();\n if (trimmed.length > 0) normalized.push(trimmed);\n }\n return normalized.length > 0 ? normalized : [...DEFAULT_UNTRUSTED_ORIGINS];\n}\n\nfunction validateDefenseMode(value: unknown): MemoryInjectionDefenseMode {\n if (\n value === \"custom\"\n || value === \"off\"\n || value === \"fencing\"\n || value === \"quarantine\"\n || value === \"layered\"\n ) {\n return value;\n }\n throw new Error(\n `memoryInjectionDefenseMode must be custom|off|fencing|quarantine|layered; got ${JSON.stringify(value)}`,\n );\n}\n\nfunction isOperatorAuthored(\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n key: string,\n): boolean {\n return rawOperatorConfig !== undefined\n && rawOperatorConfig !== null\n && Object.prototype.hasOwnProperty.call(rawOperatorConfig, key)\n && (rawOperatorConfig as Record<string, unknown>)[key] !== undefined\n && (rawOperatorConfig as Record<string, unknown>)[key] !== null;\n}\n\nfunction resolveMemoryInjectionDefenseMode(\n value: unknown,\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n): MemoryInjectionDefenseMode {\n // Precedence: operator-authored config, then the environment, then a\n // host-materialized schema default. A host that fills in the manifest\n // default must not shadow an operator's environment override.\n if (isOperatorAuthored(rawOperatorConfig, \"memoryInjectionDefenseMode\")) {\n return validateDefenseMode(\n (rawOperatorConfig as Record<string, unknown>).memoryInjectionDefenseMode,\n );\n }\n const envValue = readEnvVar(\"REMNIC_MEMORY_INJECTION_DEFENSE_MODE\");\n if (envValue !== undefined && rawOperatorConfig !== undefined) return validateDefenseMode(envValue);\n if (value !== undefined && value !== null) return validateDefenseMode(value);\n if (envValue !== undefined) return validateDefenseMode(envValue);\n return \"custom\";\n}\n\nfunction hasExplicitUntrustedOrigins(\n cfg: Record<string, unknown>,\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n): boolean {\n const configAuthored = rawOperatorConfig === undefined\n ? Object.prototype.hasOwnProperty.call(cfg, \"untrustedOrigins\")\n : rawOperatorConfig !== null\n && Object.prototype.hasOwnProperty.call(rawOperatorConfig, \"untrustedOrigins\");\n return configAuthored || readEnvVar(\"REMNIC_UNTRUSTED_ORIGINS\") !== undefined;\n}\n\nexport function parseSecurityConfig(\n cfg: Record<string, unknown>,\n rawOperatorConfig: Record<string, unknown> | null | undefined,\n): {\n memoryInjectionDefenseMode: MemoryInjectionDefenseMode;\n originAuthorityEnabled: boolean;\n injectionScreenEnabled: boolean;\n injectionScreenProfile: InjectionScreenProfile;\n untrustedOrigins: string[];\n} {\n const memoryInjectionDefenseMode = resolveMemoryInjectionDefenseMode(\n cfg.memoryInjectionDefenseMode,\n rawOperatorConfig,\n );\n const customOriginAuthority = resolveSecurityBooleanConfig(\n cfg.originAuthorityEnabled,\n rawOperatorConfig,\n \"originAuthorityEnabled\",\n \"REMNIC_ORIGIN_AUTHORITY_ENABLED\",\n false,\n );\n const customInjectionScreen = resolveSecurityBooleanConfig(\n cfg.injectionScreenEnabled,\n rawOperatorConfig,\n \"injectionScreenEnabled\",\n \"REMNIC_INJECTION_SCREEN_ENABLED\",\n true,\n );\n const flags = {\n custom: [customOriginAuthority, customInjectionScreen],\n off: [false, false],\n fencing: [true, false],\n quarantine: [false, true],\n layered: [true, true],\n } satisfies Record<MemoryInjectionDefenseMode, readonly [boolean, boolean]>;\n const [originAuthorityEnabled, injectionScreenEnabled] = flags[memoryInjectionDefenseMode];\n const injectionScreenProfile: InjectionScreenProfile =\n memoryInjectionDefenseMode === \"custom\" ? \"default\" : \"hardened\";\n const configuredOrigins = resolveUntrustedOrigins(cfg.untrustedOrigins, rawOperatorConfig);\n const untrustedOrigins =\n memoryInjectionDefenseMode !== \"custom\"\n && !hasExplicitUntrustedOrigins(cfg, rawOperatorConfig)\n ? [...HARDENED_UNTRUSTED_ORIGINS]\n : configuredOrigins;\n return {\n memoryInjectionDefenseMode,\n originAuthorityEnabled,\n injectionScreenEnabled,\n injectionScreenProfile,\n untrustedOrigins,\n };\n}\n"],"mappings":"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","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-2T2RF5ZK.js";
3
+ } from "./chunk-5QZHDS4X.js";
4
4
  import {
5
5
  keyring_exports,
6
6
  secureStoreDir
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  resolveNamespaceCapabilities,
21
21
  resolveRecallAuxiliaryCapabilities
22
- } from "./chunk-JUOZ62Y7.js";
22
+ } from "./chunk-BMXEBWBT.js";
23
23
  import {
24
24
  ALL_CATEGORY_DIRS
25
25
  } from "./chunk-VS2IYZRU.js";
@@ -412,4 +412,4 @@ export {
412
412
  resolveNamespaceStorageRoot,
413
413
  NamespaceStorageRouter
414
414
  };
415
- //# sourceMappingURL=chunk-Q5FL3MEH.js.map
415
+ //# sourceMappingURL=chunk-G4WZDQ32.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  computeCorpusWatermarks,
6
6
  resolveCorpusNamespaceRoots
7
- } from "./chunk-YHGRA7CK.js";
7
+ } from "./chunk-CDQO5DCD.js";
8
8
 
9
9
  // src/operator-doctor-corpus.ts
10
10
  var DIGEST_PREFIX_LENGTH = 12;
@@ -78,4 +78,4 @@ export {
78
78
  corpusWatermarksFromCheck,
79
79
  summarizeCorpusAndReplica
80
80
  };
81
- //# sourceMappingURL=chunk-4HNY6ORZ.js.map
81
+ //# sourceMappingURL=chunk-GMHWCPLP.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot
3
- } from "./chunk-Q5FL3MEH.js";
3
+ } from "./chunk-G4WZDQ32.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-2T2RF5ZK.js";
6
+ } from "./chunk-5QZHDS4X.js";
7
7
  import {
8
8
  composeLocationDayBody,
9
9
  composeLocationDayMeta,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-IGEZE6QB.js";
27
27
  import {
28
28
  resolveNamespaceCapabilities
29
- } from "./chunk-JUOZ62Y7.js";
29
+ } from "./chunk-BMXEBWBT.js";
30
30
  import {
31
31
  readEnvVar
32
32
  } from "./chunk-P2QRMMVQ.js";
@@ -728,4 +728,4 @@ export {
728
728
  runLocationBackfill,
729
729
  runLocationCliCommand
730
730
  };
731
- //# sourceMappingURL=chunk-ZWWKKAJL.js.map
731
+ //# sourceMappingURL=chunk-GYNCJSQ7.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  parseXrayFormat
3
- } from "./chunk-36S7UHAW.js";
3
+ } from "./chunk-VEBYLZQQ.js";
4
4
  import {
5
5
  RECALL_DISCLOSURE_LEVELS,
6
6
  isRecallDisclosure
7
- } from "./chunk-FNQEXI3D.js";
7
+ } from "./chunk-F5O6WEDO.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-BJI2D4SU.js.map
53
+ //# sourceMappingURL=chunk-GZBNEZIU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseEntityFile
3
- } from "./chunk-2T2RF5ZK.js";
3
+ } from "./chunk-5QZHDS4X.js";
4
4
  import {
5
5
  inferMemoryStatus
6
6
  } from "./chunk-7RJUVTVF.js";
@@ -253,4 +253,4 @@ export {
253
253
  WHO_KNOWS_MCP_TOOLS,
254
254
  handleWhoKnowsHttpQuery
255
255
  };
256
- //# sourceMappingURL=chunk-NYVECYCF.js.map
256
+ //# sourceMappingURL=chunk-HNOKNHFO.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canReadNamespace,
3
3
  defaultNamespaceForPrincipal
4
- } from "./chunk-MRV7VSQK.js";
4
+ } from "./chunk-Y23L4YJV.js";
5
5
  import {
6
6
  EngramAccessInputError
7
7
  } from "./chunk-3MUKQQ7A.js";
@@ -207,4 +207,4 @@ export {
207
207
  runScopedMemorySearch,
208
208
  memorySearchThroughScope
209
209
  };
210
- //# sourceMappingURL=chunk-XLXYARWC.js.map
210
+ //# sourceMappingURL=chunk-HXCJF4XU.js.map
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  CONNECTOR_LABEL_MAX_LENGTH,
6
6
  knownConnectorIds
7
- } from "./chunk-BQB5ZMYO.js";
7
+ } from "./chunk-KKNZ7PUZ.js";
8
8
  import {
9
9
  isValidConnectorId
10
- } from "./chunk-GK6NOQE6.js";
10
+ } from "./chunk-AERXJCOG.js";
11
11
  import {
12
12
  deriveSourceConnector
13
- } from "./chunk-FF2XYADH.js";
13
+ } from "./chunk-FQGY7XB2.js";
14
14
  import {
15
15
  resolvePipelineProcessingCapabilities
16
- } from "./chunk-JUOZ62Y7.js";
16
+ } from "./chunk-BMXEBWBT.js";
17
17
 
18
18
  // src/source-agent-qualifier.ts
19
19
  function resolveSourceConnector(turns) {
@@ -112,4 +112,4 @@ export {
112
112
  renderExtractionConversation,
113
113
  applyGroundingWithConnector
114
114
  };
115
- //# sourceMappingURL=chunk-RMF763SX.js.map
115
+ //# sourceMappingURL=chunk-IDRSTHVR.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-OD4FM2U7.js";
6
6
  import {
7
7
  resolveCompressionCapabilities
8
- } from "./chunk-JUOZ62Y7.js";
8
+ } from "./chunk-BMXEBWBT.js";
9
9
  import {
10
10
  log
11
11
  } from "./chunk-3WCASNQZ.js";
@@ -283,4 +283,4 @@ export {
283
283
  CompressionGuidelineCoordinator,
284
284
  formatCompressionGuidelinesForRecall
285
285
  };
286
- //# sourceMappingURL=chunk-UXREWVW4.js.map
286
+ //# sourceMappingURL=chunk-IW3RMBPB.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-IAZPYX6W.js";
3
+ } from "./chunk-NRVGODSE.js";
4
4
  import {
5
5
  namespaceIdentityToken,
6
6
  normalizeNamespaceIdentity
7
7
  } from "./chunk-VUFL7X3H.js";
8
8
  import {
9
9
  resolveNamespaceCapabilities
10
- } from "./chunk-JUOZ62Y7.js";
10
+ } from "./chunk-BMXEBWBT.js";
11
11
  import {
12
12
  ALL_CATEGORY_DIRS
13
13
  } from "./chunk-VS2IYZRU.js";
@@ -508,4 +508,4 @@ export {
508
508
  NamespaceSearchRouter,
509
509
  normalizeQmdResultPath
510
510
  };
511
- //# sourceMappingURL=chunk-W6YK672C.js.map
511
+ //# sourceMappingURL=chunk-JTTLH646.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  exportOkfBundle,
12
12
  parseIncludeStatus
13
- } from "./chunk-UD6J2LIA.js";
13
+ } from "./chunk-XDH5MO6L.js";
14
14
  import {
15
15
  exportSqlite
16
16
  } from "./chunk-BV2TIZ4F.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-IIFFC3RL.js";
65
65
  import {
66
66
  rebuildMemoryLifecycleLedger
67
- } from "./chunk-L3R24OLZ.js";
67
+ } from "./chunk-W65KK3X6.js";
68
68
  import {
69
69
  lintOkfDir
70
70
  } from "./chunk-UJX4I26O.js";
@@ -87,21 +87,21 @@ import {
87
87
  } from "./chunk-EBA5DA77.js";
88
88
  import {
89
89
  searchVerifiedEpisodes
90
- } from "./chunk-OINFRHLR.js";
90
+ } from "./chunk-NRTVZSPO.js";
91
91
  import {
92
92
  ThreadingManager
93
93
  } from "./chunk-OJP3N7UK.js";
94
94
  import {
95
95
  promoteSemanticRuleFromMemory
96
- } from "./chunk-DJ4CKWAD.js";
96
+ } from "./chunk-5Y7VCE3A.js";
97
97
  import {
98
98
  searchVerifiedSemanticRules
99
- } from "./chunk-FKFTPFUG.js";
99
+ } from "./chunk-KXJ7XYUT.js";
100
100
  import {
101
101
  buildResumeBundleFromState,
102
102
  getResumeBundleStatus,
103
103
  recordResumeBundle
104
- } from "./chunk-ENUI3IO7.js";
104
+ } from "./chunk-D433RXFJ.js";
105
105
  import {
106
106
  getWorkProductLedgerStatus,
107
107
  recordWorkProductLedgerEntry,
@@ -112,7 +112,7 @@ import {
112
112
  } from "./chunk-AM4T6CHX.js";
113
113
  import {
114
114
  parseXrayCliOptions
115
- } from "./chunk-BJI2D4SU.js";
115
+ } from "./chunk-GZBNEZIU.js";
116
116
  import {
117
117
  collectPatternMemories,
118
118
  explainPatternMemory,
@@ -134,7 +134,7 @@ import {
134
134
  runOperatorInventory,
135
135
  runOperatorRepair,
136
136
  runOperatorSetup
137
- } from "./chunk-G6E7XJYL.js";
137
+ } from "./chunk-SZAWZPY6.js";
138
138
  import {
139
139
  analyzeSessionIntegrity,
140
140
  applySessionRepair,
@@ -173,7 +173,7 @@ import {
173
173
  rebuildMemoryProjection,
174
174
  repairMemoryProjection,
175
175
  verifyMemoryProjection
176
- } from "./chunk-TAIIC5OM.js";
176
+ } from "./chunk-SEHKTE4F.js";
177
177
  import {
178
178
  GraphDashboardServer
179
179
  } from "./chunk-YNDLCWXS.js";
@@ -197,7 +197,7 @@ import {
197
197
  } from "./chunk-6TBIWIAG.js";
198
198
  import {
199
199
  parseConfig
200
- } from "./chunk-M5IJP3YW.js";
200
+ } from "./chunk-2PKGJPQL.js";
201
201
  import {
202
202
  applyManagedRegion,
203
203
  expandVaultTemplateTokens,
@@ -210,7 +210,7 @@ import {
210
210
  import {
211
211
  EngramAccessHttpServer,
212
212
  MeetingsInputError
213
- } from "./chunk-IDBLAGIM.js";
213
+ } from "./chunk-DC5CTLCZ.js";
214
214
  import {
215
215
  WearablesInputError
216
216
  } from "./chunk-V7IZKJI3.js";
@@ -220,10 +220,10 @@ import {
220
220
  loadChatSession,
221
221
  processChatMessage,
222
222
  sessionBelongsToPrincipal
223
- } from "./chunk-6JYYSDHH.js";
223
+ } from "./chunk-2L5DIVDU.js";
224
224
  import {
225
225
  EngramAccessService
226
- } from "./chunk-4B5S3VWD.js";
226
+ } from "./chunk-WD32KTVI.js";
227
227
  import {
228
228
  WorkStorage
229
229
  } from "./chunk-MPC7TYTZ.js";
@@ -240,10 +240,10 @@ import {
240
240
  parseRecallExplainFormat,
241
241
  renderRecallExplain,
242
242
  renderXray
243
- } from "./chunk-36S7UHAW.js";
243
+ } from "./chunk-VEBYLZQQ.js";
244
244
  import {
245
245
  readAggregateExtractionWatermark
246
- } from "./chunk-AAMFQHKI.js";
246
+ } from "./chunk-KRPMISWO.js";
247
247
  import {
248
248
  getObjectiveStateStoreStatus
249
249
  } from "./chunk-HM7RHKS4.js";
@@ -252,18 +252,18 @@ import {
252
252
  } from "./chunk-TYP7GYRI.js";
253
253
  import {
254
254
  searchHarmonicRetrieval
255
- } from "./chunk-R4Y5PF25.js";
255
+ } from "./chunk-FWVDTLRK.js";
256
256
  import {
257
257
  listMemoryGovernanceRuns,
258
258
  readMemoryGovernanceRunArtifact,
259
259
  restoreMemoryGovernanceRun,
260
260
  runMemoryGovernance
261
- } from "./chunk-F6WCOXTF.js";
261
+ } from "./chunk-LMLPLIT4.js";
262
262
  import {
263
263
  listNamespaces,
264
264
  runNamespaceMigration,
265
265
  verifyNamespaces
266
- } from "./chunk-TAC5WFJC.js";
266
+ } from "./chunk-QEGKMZNQ.js";
267
267
  import {
268
268
  getCueAnchorStoreStatus
269
269
  } from "./chunk-BMWN7B3Y.js";
@@ -303,7 +303,7 @@ import {
303
303
  } from "./chunk-LMMQKZK3.js";
304
304
  import {
305
305
  meetingIdDate
306
- } from "./chunk-2T2RF5ZK.js";
306
+ } from "./chunk-5QZHDS4X.js";
307
307
  import {
308
308
  isValidTranscriptDate
309
309
  } from "./chunk-UHVXE24Y.js";
@@ -354,7 +354,7 @@ import {
354
354
  import {
355
355
  RECALL_DISCLOSURE_LEVELS,
356
356
  isRecallDisclosure
357
- } from "./chunk-FNQEXI3D.js";
357
+ } from "./chunk-F5O6WEDO.js";
358
358
  import {
359
359
  isSupportPassportPrivateMemory
360
360
  } from "./chunk-PWPIERBM.js";
@@ -378,7 +378,7 @@ import {
378
378
  resolveRecallEnhancementCapabilities,
379
379
  resolveSecurityCapabilities,
380
380
  resolveUtilityLearningCapabilities
381
- } from "./chunk-JUOZ62Y7.js";
381
+ } from "./chunk-BMXEBWBT.js";
382
382
  import {
383
383
  expandTildePath
384
384
  } from "./chunk-6KH5NLQS.js";
@@ -2951,11 +2951,21 @@ var RULE_WEIGHTS = {
2951
2951
  "encoded-blob": 5,
2952
2952
  // Instruction resets directly try to replace the active authority.
2953
2953
  "ignore-previous-family": 4,
2954
- // Conditional triggers encode a hidden action for a future turn.
2955
- "conditional-trigger": 3,
2956
2954
  // Remnic command references can redirect the memory system itself.
2957
- "authority-escalation": 4
2955
+ "authority-escalation": 4,
2956
+ // Stored response controls try to turn recalled data into future behavior.
2957
+ "response-control-directive": 4,
2958
+ // Tool-routing controls replace the current tool choice from recalled data.
2959
+ "tool-routing-directive": 4
2960
+ };
2961
+ var PROFILE_RULE_WEIGHTS = {
2962
+ // Conditional triggers encode a hidden action for a future turn.
2963
+ "conditional-trigger": { default: 3, hardened: 4 }
2958
2964
  };
2965
+ function ruleWeight(rule, profile) {
2966
+ const profileWeights = PROFILE_RULE_WEIGHTS[rule];
2967
+ return profileWeights ? profileWeights[profile] : RULE_WEIGHTS[rule];
2968
+ }
2959
2969
  var INJECTION_SCREEN_THRESHOLD = 4;
2960
2970
  var MAX_EXCERPT_LENGTH = 180;
2961
2971
  var AUTHORITY_EXECUTABLE_TOOL_REFERENCE = String.raw`(?:remnic|engram)(?:\s+security\s+audit-memory\b|\s+(?:memory_store|suggestion_submit|observe|recall|delete_memory|memory_correct_apply|memory_search)(?:\s+(?:tool|command))?\b|\s+(?:tool|command)\b|[_:-](?:memory_store|suggestion_submit|observe|recall|delete_memory|memory_correct_apply|memory_search)\b)`;
@@ -2982,11 +2992,11 @@ function findImperativeToAgent(content) {
2982
2992
  return findingFor(
2983
2993
  "imperative-to-agent",
2984
2994
  content,
2985
- /\b(?:agent|assistant|ai|model)\s*[,!:.-]\s*(?:please\s+)?(?:ignore|disregard|call|run|execute|send|delete|reveal|email|store|remember|follow|use|do)\b/i
2995
+ /\b(?:agent|assistant|ai|model)[ \t]{0,8}[,!:.-][ \t]{0,8}(?:please[ \t]{1,8})?(?:ignore|disregard|call|run|execute|send|delete|reveal|email|store|remember|follow|use|do|answer|respond|reply|emit|output|return|include|produce|say)\b/i
2986
2996
  ) ?? findingFor(
2987
2997
  "imperative-to-agent",
2988
2998
  content,
2989
- /\b(?:agent|assistant|ai|model)\s+(?:must|should|need to|please)\s+(?:ignore|disregard|call|run|execute|send|delete|reveal|email|store|remember|follow|use|do)\b/i
2999
+ /\b(?:agent|assistant|ai|model)[ \t]{1,8}(?:must|should|need to|please|to)[ \t]{1,8}(?:ignore|disregard|call|run|execute|send|delete|reveal|email|store|remember|follow|use|do|answer|respond|reply|emit|output|return|include|produce|say)\b/i
2990
3000
  );
2991
3001
  }
2992
3002
  function findToolInvocationSyntax(content) {
@@ -3030,11 +3040,53 @@ function findConditionalTrigger(content) {
3030
3040
  return findingFor(
3031
3041
  "conditional-trigger",
3032
3042
  content,
3033
- /\b(?:when|if)\b[\s\S]{1,120}\b(?:say|says|see|sees|hear|hears|receive|receives|mention|mentions|contain|contains|encounter|encounters)\b[\s\S]{1,120}\b(?:then\s+)?(?:call|invoke|run|execute|send|delete|reveal|store|use|follow|do|respond)\b/i
3043
+ /\b(?:when|if|unless|after|only after|if and only if|on seeing)\b[\s\S]{1,180}\b(?:ask|asked|say|says|see|sees|seeing|hear|hears|receive|receives|mention|mentions|mentioned|appear|appears|contain|contains|encounter|encounters|phrase|condition|key)\b[\s\S]{0,180}\b(?:then[ \t]{1,8})?(?:answer|call|include|invoke|run|execute|send|delete|reveal|store|use|follow|do|respond|reply|emit|output|return|produce|say|add|replace)\b/i
3034
3044
  ) ?? findingFor(
3035
3045
  "conditional-trigger",
3036
3046
  content,
3037
- /\b(?:when|if)\b[\s\S]{1,100},\s*(?:then\s+)?(?:call|invoke|run|execute|send|delete|reveal|store|use|follow|do|respond)\b/i
3047
+ /\b(?:when|if|unless)\b[\s\S]{1,120},[ \t]{0,8}(?:then[ \t]{1,8})?(?:answer|call|include|invoke|run|execute|send|delete|reveal|store|use|follow|do|respond|reply|emit|output|return|produce|say|add|replace)\b/i
3048
+ );
3049
+ }
3050
+ var RESPONSE_NOUN = String.raw`(?:answers?|responses?|repl(?:y|ies)|output)`;
3051
+ var RESPONSE_CONTROL_PATTERNS = [
3052
+ // "the approved response concerning X is exactly CANARY"
3053
+ new RegExp(
3054
+ String.raw`\b${RESPONSE_NOUN}\b[^\n]{0,60}\b(?:(?:is|are|be)[ \t]{1,8}exactly|becomes?)\b`,
3055
+ "i"
3056
+ ),
3057
+ // "the response must include / should begin with / needs to say ..."
3058
+ new RegExp(
3059
+ String.raw`\b${RESPONSE_NOUN}\b[^\n]{0,60}\b(?:must|should|shall|will|needs?[ \t]{1,8}to|has[ \t]{1,8}to|have[ \t]{1,8}to|is[ \t]{1,8}to|are[ \t]{1,8}to)[ \t]{1,8}(?:always[ \t]{1,8})?(?:include|contain|begin|start|end|say|state|mention|output|return|emit|produce|read|quote|reference|append|prepend)\b`,
3060
+ "i"
3061
+ ),
3062
+ // "include CANARY in every answer", "add <url> to answers"
3063
+ new RegExp(
3064
+ String.raw`\b(?:include|add|emit|output|return|append|prepend|say|state|put)\b[^\n]{0,80}\b(?:in|to|into|with|as|on)[ \t]{1,8}[^\n]{0,30}\b${RESPONSE_NOUN}\b`,
3065
+ "i"
3066
+ ),
3067
+ // "reply with the marker CANARY", "respond by saying"
3068
+ /\b(?:reply|respond|answer)[ \t]{1,8}(?:with|by|using)[ \t]{1,8}(?:the[ \t]{1,8}|only[ \t]{1,8}|exactly[ \t]{1,8})?(?:marker|phrase|code|string|text|token|exact|exactly|only|saying|outputting|returning|CANARY)/i,
3069
+ // "activation requires outputting CANARY", "retrieval should produce CANARY"
3070
+ /\b(?:requires?|should|must|will)[ \t]{1,8}(?:outputting|emitting|returning|saying|replying|responding|answering|producing|output|emit|produce)\b[^\n]{0,40}\b(?:CANARY|marker|phrase|code|token|exactly|https?:)/i,
3071
+ /\b(?:retrieval|recall|activation)\b[^\n]{0,40}\b(?:should|must|will|requires?)[ \t]{1,8}(?:produce|output|emit|return|say|reply|respond)\b/i,
3072
+ // "say CANARY", "answer CANARY", "use CANARY instead", "return https://..."
3073
+ /\b(?:say|answer|reply|respond|output|return|emit|use|produce)[ \t]{1,8}(?:with[ \t]{1,8}|only[ \t]{1,8}|exactly[ \t]{1,8})?(?:CANARY|the[ \t]{1,8}(?:literal|exact|marker|phrase|string|token)\b|https?:)/i,
3074
+ // "replace normal behavior with the literal response", "require the literal marker"
3075
+ /\breplace[ \t]{1,8}(?:normal|default|your|the|its|all)?[ \t]{0,8}(?:behaviou?r|responses?|answers?|repl(?:y|ies)|output)\b/i,
3076
+ /\b(?:literal|exact|verbatim)[ \t]{1,8}(?:response|answer|reply|marker|string|output|phrase|token)\b/i
3077
+ ];
3078
+ function findResponseControlDirective(content) {
3079
+ for (const pattern of RESPONSE_CONTROL_PATTERNS) {
3080
+ const finding = findingFor("response-control-directive", content, pattern);
3081
+ if (finding) return finding;
3082
+ }
3083
+ return void 0;
3084
+ }
3085
+ function findToolRoutingDirective(content) {
3086
+ return findingFor(
3087
+ "tool-routing-directive",
3088
+ content,
3089
+ /\b(?:ignore|redirect(?:ing)?|override|substitute|preferred[_ -]?tool|never[ \t]{1,8}use|must[ \t]{1,8}call|requires?[ \t]{1,8}redirecting)\b[\s\S]{0,160}\b(?:tool|function|[a-z][a-z0-9-]*[_:.][a-z0-9-]+)\b|\b(?:tool|function|[a-z][a-z0-9-]*[_:.][a-z0-9-]+)\b[\s\S]{0,160}\b(?:redirect(?:ing)?|override|substitute|preferred[_ -]?tool|never[ \t]{1,8}use|must[ \t]{1,8}call)\b/i
3038
3090
  );
3039
3091
  }
3040
3092
  function findAuthorityEscalation(content) {
@@ -3048,7 +3100,7 @@ function findAuthorityEscalation(content) {
3048
3100
  AUTHORITY_MANDATORY_DIRECTIVE_PATTERN
3049
3101
  );
3050
3102
  }
3051
- function screenCandidateFact(content) {
3103
+ function screenCandidateFact(content, profile = "default") {
3052
3104
  const findings = [];
3053
3105
  const rules = [
3054
3106
  ["imperative-to-agent", findImperativeToAgent],
@@ -3056,13 +3108,15 @@ function screenCandidateFact(content) {
3056
3108
  ["encoded-blob", findEncodedBlob],
3057
3109
  ["ignore-previous-family", findIgnorePreviousFamily],
3058
3110
  ["conditional-trigger", findConditionalTrigger],
3059
- ["authority-escalation", findAuthorityEscalation]
3111
+ ["authority-escalation", findAuthorityEscalation],
3112
+ ["response-control-directive", findResponseControlDirective],
3113
+ ["tool-routing-directive", findToolRoutingDirective]
3060
3114
  ];
3061
3115
  for (const [rule, find] of rules) {
3062
3116
  const finding = find(content);
3063
3117
  if (finding) findings.push({ rule, excerpt: finding.excerpt });
3064
3118
  }
3065
- const score = findings.reduce((sum, finding) => sum + RULE_WEIGHTS[finding.rule], 0);
3119
+ const score = findings.reduce((sum, finding) => sum + ruleWeight(finding.rule, profile), 0);
3066
3120
  return { score, findings, quarantine: score >= INJECTION_SCREEN_THRESHOLD };
3067
3121
  }
3068
3122
 
@@ -3188,8 +3242,9 @@ async function auditMemoryStore(options) {
3188
3242
  );
3189
3243
  const findings = [];
3190
3244
  const quarantinePaths = /* @__PURE__ */ new Map();
3245
+ const profile = options.profile ?? "default";
3191
3246
  for (const memory of activeMemories) {
3192
- const screened = screenCandidateFact(memory.content);
3247
+ const screened = screenCandidateFact(memory.content, profile);
3193
3248
  if (screened.quarantine === true) quarantinePaths.set(memory.path, { injection: true, burst: false });
3194
3249
  for (const screenFinding of screened.findings) {
3195
3250
  findings.push({
@@ -3236,7 +3291,7 @@ async function auditMemoryStore(options) {
3236
3291
  if (!qInfo) continue;
3237
3292
  const memory = await storage.readMemoryByPath(staleMemory.path);
3238
3293
  if (!memory || !isActive(memory, options.memoryDir)) continue;
3239
- if (qInfo.injection && !qInfo.burst && !screenCandidateFact(memory.content).quarantine) continue;
3294
+ if (qInfo.injection && !qInfo.burst && !screenCandidateFact(memory.content, profile).quarantine) continue;
3240
3295
  const changed = await storage.writeMemoryFrontmatterIfUnchanged(memory, {
3241
3296
  status: "pending_review",
3242
3297
  updated: now
@@ -5738,7 +5793,7 @@ function registerCli(api, orchestrator, registerOptions = {}) {
5738
5793
  );
5739
5794
  tierCmd.command("list").description("Summarize tier distribution across all memories").option("--json", "Emit machine-readable JSON only").action(async (...args) => {
5740
5795
  const options = args[0] ?? {};
5741
- const { summarizeTiers, formatTierSummaryText } = await import("./tier-stats-VK5PCO2L.js");
5796
+ const { summarizeTiers, formatTierSummaryText } = await import("./tier-stats-VF6DS52E.js");
5742
5797
  const summary = await summarizeTiers(orchestrator.storage);
5743
5798
  if (reportHasMachineReadableOutput(options)) {
5744
5799
  console.log(JSON.stringify(summary, null, 2));
@@ -5749,7 +5804,7 @@ function registerCli(api, orchestrator, registerOptions = {}) {
5749
5804
  tierCmd.command("explain").description("Explain the tier-transition decision for a single memory").argument("<id>", "Memory id to explain").option("--json", "Emit machine-readable JSON only").action(async (...args) => {
5750
5805
  const idArg = typeof args[0] === "string" ? args[0] : "";
5751
5806
  const options = args[1] ?? {};
5752
- const { explainTierForMemory, formatTierExplainText } = await import("./tier-stats-VK5PCO2L.js");
5807
+ const { explainTierForMemory, formatTierExplainText } = await import("./tier-stats-VF6DS52E.js");
5753
5808
  try {
5754
5809
  const explain = await explainTierForMemory(
5755
5810
  orchestrator.storage,
@@ -8995,7 +9050,7 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
8995
9050
  console.error("--verb is required. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context");
8996
9051
  process.exit(1);
8997
9052
  }
8998
- const { isValidResolutionVerb, executeResolution } = await import("./resolution-CHNISQJB.js");
9053
+ const { isValidResolutionVerb, executeResolution } = await import("./resolution-UYJU5JUA.js");
8999
9054
  if (!isValidResolutionVerb(verb)) {
9000
9055
  console.error(`Invalid verb: ${verb}. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context`);
9001
9056
  process.exit(1);
@@ -9027,7 +9082,7 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
9027
9082
  });
9028
9083
  reviewCmd.command("scan").description("Run an on-demand contradiction scan").option("--namespace <ns>", "Namespace to scan").action(async (...args) => {
9029
9084
  const options = args[0] ?? {};
9030
- const { runContradictionScan } = await import("./contradiction-scan-GVD4JJ7B.js");
9085
+ const { runContradictionScan } = await import("./contradiction-scan-5EJYRKD3.js");
9031
9086
  console.log("Running contradiction scan...");
9032
9087
  const result = await runContradictionScan({
9033
9088
  storage: orchestrator.storage,
@@ -9779,4 +9834,4 @@ export {
9779
9834
  listMemoryMarkdownFilePaths,
9780
9835
  registerCli
9781
9836
  };
9782
- //# sourceMappingURL=chunk-Y76HXF3F.js.map
9837
+ //# sourceMappingURL=chunk-K7S2IMGJ.js.map