@remnic/core 9.3.694 → 9.3.695

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 (330) hide show
  1. package/dist/access-boundary.d.ts +12 -11
  2. package/dist/access-boundary.js +34 -28
  3. package/dist/access-cli.js +60 -59
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +12 -11
  6. package/dist/access-http.js +38 -32
  7. package/dist/access-mcp.d.ts +12 -11
  8. package/dist/access-mcp.js +37 -31
  9. package/dist/access-operations.d.ts +12 -11
  10. package/dist/access-operations.js +36 -30
  11. package/dist/access-schema.js +3 -3
  12. package/dist/{access-service-Ceq4TdPO.d.ts → access-service-BqBQeUJd.d.ts} +15 -2
  13. package/dist/access-service.d.ts +8 -7
  14. package/dist/access-service.js +33 -27
  15. package/dist/access-surface-catalog.d.ts +12 -11
  16. package/dist/action-confidence.d.ts +1 -1
  17. package/dist/active-memory-bridge.d.ts +1 -1
  18. package/dist/active-recall.d.ts +1 -1
  19. package/dist/active-recall.js +1 -1
  20. package/dist/{auto-sync-RWXT6P5M.js → auto-sync-PFW2NJZY.js} +8 -8
  21. package/dist/behavior-learner.d.ts +1 -1
  22. package/dist/behavior-signals.d.ts +1 -1
  23. package/dist/bootstrap.d.ts +9 -8
  24. package/dist/briefing.d.ts +1 -1
  25. package/dist/briefing.js +12 -5
  26. package/dist/buffer-surprise-report.d.ts +1 -1
  27. package/dist/buffer.d.ts +1 -1
  28. package/dist/calibration.d.ts +1 -1
  29. package/dist/calibration.js +2 -2
  30. package/dist/capabilities.d.ts +1 -1
  31. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  32. package/dist/{catalog-Tkb991rg.d.ts → catalog-D7YDNNF7.d.ts} +1 -1
  33. package/dist/causal-behavior.d.ts +1 -1
  34. package/dist/causal-behavior.js +2 -2
  35. package/dist/causal-chain.js +2 -2
  36. package/dist/causal-consolidation.d.ts +1 -1
  37. package/dist/causal-consolidation.js +17 -16
  38. package/dist/causal-consolidation.js.map +1 -1
  39. package/dist/causal-retrieval.js +2 -2
  40. package/dist/causal-trajectory-graph.js +2 -2
  41. package/dist/causal-trajectory.js +1 -1
  42. package/dist/{chunk-UPTZYUYJ.js → chunk-24D66MMN.js} +2 -1
  43. package/dist/chunk-24D66MMN.js.map +1 -0
  44. package/dist/{chunk-FCH766FX.js → chunk-32XTY2DQ.js} +51 -51
  45. package/dist/{chunk-YN4ZT4CW.js → chunk-3LYJIA76.js} +1 -1
  46. package/dist/{chunk-24FCDBJV.js → chunk-3P2XEQSV.js} +2 -2
  47. package/dist/{chunk-JIKBEDSB.js → chunk-4NNDJOAO.js} +8 -8
  48. package/dist/{chunk-EPVIBPVE.js → chunk-52QIAN76.js} +2 -2
  49. package/dist/chunk-5AT62NQH.js +553 -0
  50. package/dist/chunk-5AT62NQH.js.map +1 -0
  51. package/dist/{chunk-TAPSNIMA.js → chunk-5CEJH5ZN.js} +4 -4
  52. package/dist/{chunk-4RGWCRIJ.js → chunk-5TYA4OCF.js} +4 -4
  53. package/dist/{chunk-PILLH262.js → chunk-6GAUF4OU.js} +3 -3
  54. package/dist/{chunk-QXWQ5V24.js → chunk-AF6DSAWD.js} +2 -2
  55. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  56. package/dist/{chunk-32KD5IHZ.js → chunk-CLXTDOKV.js} +2 -2
  57. package/dist/{chunk-ARV3AUOM.js → chunk-DL6H3D7S.js} +2 -2
  58. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  59. package/dist/{chunk-KCRV3HVN.js → chunk-EC3A6M43.js} +2 -2
  60. package/dist/{chunk-PNW4KKJX.js → chunk-EK6FYL2E.js} +27 -1
  61. package/dist/chunk-EK6FYL2E.js.map +1 -0
  62. package/dist/{chunk-YI3KC2B5.js → chunk-FZMH66NT.js} +2 -2
  63. package/dist/{chunk-DT2ZGQT7.js → chunk-G663XUEG.js} +2 -2
  64. package/dist/{chunk-TYEOAFH3.js → chunk-G6SVZWPB.js} +10 -1
  65. package/dist/chunk-G6SVZWPB.js.map +1 -0
  66. package/dist/{chunk-CDOIDOTQ.js → chunk-HKET3ZOI.js} +4 -4
  67. package/dist/{chunk-YOI3ELXF.js → chunk-IF362TF6.js} +2 -2
  68. package/dist/{chunk-UX5QTAFE.js → chunk-J45OCIVH.js} +2 -2
  69. package/dist/{chunk-UDJLF3BO.js → chunk-JI6HWBYL.js} +2 -2
  70. package/dist/{chunk-ECZPWSB5.js → chunk-JJT3AGL4.js} +4 -4
  71. package/dist/{chunk-6C4WHMKV.js → chunk-JMAKCWJ3.js} +6 -6
  72. package/dist/{chunk-4NFVPDIL.js → chunk-LM6JB2EG.js} +2 -2
  73. package/dist/{chunk-MOGFK2DU.js → chunk-LPIWEKZ3.js} +2 -2
  74. package/dist/{chunk-LD53WPMU.js → chunk-LQ6JI4VH.js} +4 -4
  75. package/dist/{chunk-IZLNJYLX.js → chunk-MNFAGE5D.js} +2 -2
  76. package/dist/{chunk-NXNUG7IA.js → chunk-MOBRVKWE.js} +23 -12
  77. package/dist/chunk-MOBRVKWE.js.map +1 -0
  78. package/dist/{chunk-5A35EGHM.js → chunk-N4PD5IY3.js} +35 -35
  79. package/dist/{chunk-PQP6MFPL.js → chunk-NFMDHE45.js} +2 -2
  80. package/dist/{chunk-WVTNZUER.js → chunk-NLZO5NO6.js} +2 -2
  81. package/dist/{chunk-5S53ZBPH.js → chunk-Q6ZHGGNJ.js} +2 -2
  82. package/dist/{chunk-SN5DFE34.js → chunk-Q7SFJURX.js} +2 -2
  83. package/dist/{chunk-MXZWKOOR.js → chunk-QJM2XAJD.js} +11 -11
  84. package/dist/{chunk-6ZNIUGXB.js → chunk-QQW2LIEA.js} +4 -4
  85. package/dist/{chunk-ZKD3UVEO.js → chunk-QVTSLRKT.js} +3 -3
  86. package/dist/{chunk-C5AOVGVC.js → chunk-RWST6NOL.js} +166 -102
  87. package/dist/chunk-RWST6NOL.js.map +1 -0
  88. package/dist/{chunk-YXZPKBFW.js → chunk-SPVIG2R3.js} +10 -10
  89. package/dist/{chunk-B55EAZNF.js → chunk-TIVZ4MCG.js} +2 -2
  90. package/dist/{chunk-5KBNNUXS.js → chunk-TT7BJWGI.js} +2 -2
  91. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  92. package/dist/{chunk-E6BOD3UJ.js → chunk-VPAFWWCL.js} +2 -2
  93. package/dist/{chunk-D7PQ7HZL.js → chunk-W54EAJT4.js} +2 -2
  94. package/dist/{chunk-QVG4LAQO.js → chunk-WR6KFJKA.js} +7 -7
  95. package/dist/{chunk-YQGHW5ML.js → chunk-WRFKZEO6.js} +4 -4
  96. package/dist/{chunk-SJGTY2TW.js → chunk-XUNQLJT2.js} +6 -6
  97. package/dist/{chunk-P7IDNF7H.js → chunk-XWT4JXXA.js} +2 -2
  98. package/dist/{chunk-MSUA4KAK.js → chunk-XXA6T3O4.js} +2 -2
  99. package/dist/{chunk-KF74X62T.js → chunk-YGKUAX2B.js} +4 -4
  100. package/dist/{chunk-YWYZPKK3.js → chunk-YOZNTNNA.js} +2 -2
  101. package/dist/{chunk-U62ZGWU7.js → chunk-ZXUOAFUG.js} +1 -1
  102. package/dist/chunk-ZXUOAFUG.js.map +1 -0
  103. package/dist/{cli-CxtZyBLl.d.ts → cli-DBDgdvh9.d.ts} +3 -3
  104. package/dist/cli.d.ts +11 -10
  105. package/dist/cli.js +56 -50
  106. package/dist/compounding/engine.d.ts +1 -1
  107. package/dist/compounding/engine.js +12 -5
  108. package/dist/compounding/preference-consolidator.d.ts +1 -1
  109. package/dist/compression-optimizer.d.ts +1 -1
  110. package/dist/config.d.ts +1 -1
  111. package/dist/config.js +1 -1
  112. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  113. package/dist/connectors/codex-materialize-runner.js +12 -5
  114. package/dist/connectors/codex-materialize.d.ts +1 -1
  115. package/dist/connectors/index.d.ts +1 -1
  116. package/dist/connectors/index.js +12 -5
  117. package/dist/consolidation-provenance-check.d.ts +3 -3
  118. package/dist/consolidation-undo.d.ts +2 -2
  119. package/dist/contradiction/index.d.ts +1 -1
  120. package/dist/conversation-index/backend.d.ts +1 -1
  121. package/dist/conversation-index/chunker.d.ts +1 -1
  122. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  123. package/dist/conversation-index/indexer.d.ts +1 -1
  124. package/dist/conversation-index/search.d.ts +1 -1
  125. package/dist/day-summary.d.ts +1 -1
  126. package/dist/delinearize.d.ts +1 -1
  127. package/dist/direct-answer-wiring.d.ts +1 -1
  128. package/dist/direct-answer.d.ts +1 -1
  129. package/dist/embedding-fallback.d.ts +1 -1
  130. package/dist/enrichment/index.d.ts +1 -1
  131. package/dist/entity-retrieval.d.ts +1 -1
  132. package/dist/entity-retrieval.js +13 -5
  133. package/dist/entity-schema.d.ts +1 -1
  134. package/dist/explicit-capture.d.ts +9 -8
  135. package/dist/extraction-faithfulness.d.ts +211 -0
  136. package/dist/extraction-faithfulness.js +35 -0
  137. package/dist/extraction-judge-telemetry.d.ts +1 -1
  138. package/dist/extraction-judge-training.d.ts +1 -1
  139. package/dist/extraction-judge.d.ts +1 -1
  140. package/dist/extraction-judge.js +4 -4
  141. package/dist/extraction.d.ts +1 -1
  142. package/dist/extraction.js +7 -7
  143. package/dist/fallback-llm.d.ts +1 -1
  144. package/dist/fallback-llm.js +2 -2
  145. package/dist/{graph-edge-decay-D7OESCBR.js → graph-edge-decay-JLOF3YW4.js} +3 -3
  146. package/dist/graph-snapshot.js +3 -3
  147. package/dist/graph.js +2 -2
  148. package/dist/identity-continuity.d.ts +1 -1
  149. package/dist/importance.d.ts +1 -1
  150. package/dist/index.d.ts +12 -11
  151. package/dist/index.js +96 -95
  152. package/dist/index.js.map +1 -1
  153. package/dist/intent.d.ts +1 -1
  154. package/dist/lcm/engine.d.ts +1 -1
  155. package/dist/lcm/index.d.ts +1 -1
  156. package/dist/lcm/index.js +3 -3
  157. package/dist/lcm/tools.d.ts +1 -1
  158. package/dist/lifecycle.d.ts +1 -1
  159. package/dist/live-connectors-runner.d.ts +1 -1
  160. package/dist/local-llm.d.ts +1 -1
  161. package/dist/local-llm.js +1 -1
  162. package/dist/maintenance/memory-governance.d.ts +1 -1
  163. package/dist/maintenance/memory-governance.js +13 -5
  164. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -5
  165. package/dist/maintenance/rebuild-memory-projection.js +14 -6
  166. package/dist/mcp-memory-inspector-app.d.ts +12 -11
  167. package/dist/memory-action-policy.d.ts +1 -1
  168. package/dist/memory-cache.d.ts +1 -1
  169. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  170. package/dist/memory-projection-store.d.ts +1 -1
  171. package/dist/memory-provenance.d.ts +1 -1
  172. package/dist/memory-worth-outcomes.d.ts +1 -1
  173. package/dist/models-json.d.ts +1 -1
  174. package/dist/namespaces/migrate.d.ts +2 -2
  175. package/dist/namespaces/migrate.js +20 -12
  176. package/dist/namespaces/principal.d.ts +1 -1
  177. package/dist/namespaces/search.d.ts +1 -1
  178. package/dist/namespaces/search.js +6 -6
  179. package/dist/namespaces/storage.d.ts +2 -2
  180. package/dist/namespaces/storage.js +13 -5
  181. package/dist/native-knowledge.d.ts +1 -1
  182. package/dist/operator-toolkit.d.ts +1 -1
  183. package/dist/operator-toolkit.js +26 -19
  184. package/dist/orchestration/maintenance.d.ts +2 -2
  185. package/dist/orchestration/maintenance.js +15 -7
  186. package/dist/{orchestrator-CnbxRQs8.d.ts → orchestrator-Dv8JQu3-.d.ts} +20 -3
  187. package/dist/orchestrator.d.ts +6 -5
  188. package/dist/orchestrator.js +47 -46
  189. package/dist/patterns-cli.d.ts +1 -1
  190. package/dist/policy-runtime.d.ts +1 -1
  191. package/dist/provenance.d.ts +1 -1
  192. package/dist/qmd-recall-cache.d.ts +1 -1
  193. package/dist/qmd.d.ts +1 -1
  194. package/dist/recall-disclosure-escalation.d.ts +1 -1
  195. package/dist/recall-explain-renderer.d.ts +1 -1
  196. package/dist/recall-explain-renderer.js +3 -3
  197. package/dist/recall-planner-llm.d.ts +1 -1
  198. package/dist/recall-planner-llm.js +2 -2
  199. package/dist/recall-state.d.ts +1 -1
  200. package/dist/recall-tag-filter.d.ts +1 -1
  201. package/dist/recall-xray-cli.d.ts +1 -1
  202. package/dist/recall-xray-cli.js +4 -4
  203. package/dist/recall-xray-renderer.d.ts +1 -1
  204. package/dist/recall-xray-renderer.js +3 -3
  205. package/dist/recall-xray.d.ts +1 -1
  206. package/dist/recall-xray.js +2 -2
  207. package/dist/resolve-auth-token.d.ts +1 -1
  208. package/dist/resume-bundles.js +2 -2
  209. package/dist/retrieval-agents.d.ts +1 -1
  210. package/dist/retrieval-tiers.d.ts +1 -1
  211. package/dist/routing/engine.d.ts +1 -1
  212. package/dist/routing/store.d.ts +1 -1
  213. package/dist/search/embed-helper.d.ts +1 -1
  214. package/dist/search/factory.d.ts +1 -1
  215. package/dist/search/factory.js +5 -5
  216. package/dist/search/index.d.ts +1 -1
  217. package/dist/search/index.js +5 -5
  218. package/dist/search/lancedb-backend.d.ts +1 -1
  219. package/dist/search/lancedb-backend.js +2 -2
  220. package/dist/search/meilisearch-backend.d.ts +1 -1
  221. package/dist/search/meilisearch-backend.js +2 -2
  222. package/dist/search/noop-backend.d.ts +1 -1
  223. package/dist/search/orama-backend.d.ts +1 -1
  224. package/dist/search/orama-backend.js +2 -2
  225. package/dist/search/port.d.ts +1 -1
  226. package/dist/search/remote-backend.d.ts +1 -1
  227. package/dist/{semantic-consolidation-DXmtQ_4B.d.ts → semantic-consolidation-CgREi9E0.d.ts} +1 -1
  228. package/dist/semantic-consolidation.d.ts +2 -2
  229. package/dist/semantic-consolidation.js +13 -6
  230. package/dist/semantic-rule-promotion.js +13 -5
  231. package/dist/semantic-rule-verifier.d.ts +1 -1
  232. package/dist/semantic-rule-verifier.js +13 -5
  233. package/dist/session-observer-bands.d.ts +1 -1
  234. package/dist/session-observer-state.d.ts +1 -1
  235. package/dist/shared-context/manager.d.ts +1 -1
  236. package/dist/signal.d.ts +1 -1
  237. package/dist/{state-NCHQ4TRG.js → state-ITXJKXRE.js} +2 -2
  238. package/dist/storage.d.ts +11 -1
  239. package/dist/storage.js +12 -4
  240. package/dist/summarizer.d.ts +1 -1
  241. package/dist/summarizer.js +6 -6
  242. package/dist/summary-snapshot.d.ts +1 -1
  243. package/dist/temporal-supersession.d.ts +1 -1
  244. package/dist/temporal-validity.d.ts +1 -1
  245. package/dist/threading.d.ts +1 -1
  246. package/dist/tier-migration.d.ts +1 -1
  247. package/dist/tier-routing.d.ts +1 -1
  248. package/dist/topics.d.ts +1 -1
  249. package/dist/{trace-WM7V4CKI.js → trace-ZFVRH4GO.js} +3 -3
  250. package/dist/transcript.d.ts +1 -1
  251. package/dist/transfer/backup.js +2 -2
  252. package/dist/transfer/capsule-export.js +2 -2
  253. package/dist/transfer/capsule-import.js +2 -2
  254. package/dist/{tui-RI7P6PBS.js → tui-55UJMJX7.js} +3 -3
  255. package/dist/tui-55UJMJX7.js.map +1 -0
  256. package/dist/{types-CEWBmjCH.d.ts → types-CeZYSC-E.d.ts} +37 -1
  257. package/dist/types.d.ts +1 -1
  258. package/dist/types.js +1 -1
  259. package/dist/utility-runtime.d.ts +1 -1
  260. package/dist/verified-recall.js +13 -5
  261. package/package.json +2 -2
  262. package/src/config.test.ts +16 -0
  263. package/src/config.ts +30 -0
  264. package/src/console/state.ts +32 -0
  265. package/src/extraction-faithfulness.test.ts +1112 -0
  266. package/src/extraction-faithfulness.ts +993 -0
  267. package/src/faithfulness-graph-guard.test.ts +252 -0
  268. package/src/local-llm.ts +1 -0
  269. package/src/orchestrator.ts +169 -45
  270. package/src/storage.ts +19 -0
  271. package/src/types.ts +47 -0
  272. package/dist/chunk-C5AOVGVC.js.map +0 -1
  273. package/dist/chunk-NXNUG7IA.js.map +0 -1
  274. package/dist/chunk-PNW4KKJX.js.map +0 -1
  275. package/dist/chunk-TYEOAFH3.js.map +0 -1
  276. package/dist/chunk-U62ZGWU7.js.map +0 -1
  277. package/dist/chunk-UPTZYUYJ.js.map +0 -1
  278. /package/dist/{auto-sync-RWXT6P5M.js.map → auto-sync-PFW2NJZY.js.map} +0 -0
  279. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  280. /package/dist/{chunk-FCH766FX.js.map → chunk-32XTY2DQ.js.map} +0 -0
  281. /package/dist/{chunk-YN4ZT4CW.js.map → chunk-3LYJIA76.js.map} +0 -0
  282. /package/dist/{chunk-24FCDBJV.js.map → chunk-3P2XEQSV.js.map} +0 -0
  283. /package/dist/{chunk-JIKBEDSB.js.map → chunk-4NNDJOAO.js.map} +0 -0
  284. /package/dist/{chunk-EPVIBPVE.js.map → chunk-52QIAN76.js.map} +0 -0
  285. /package/dist/{chunk-TAPSNIMA.js.map → chunk-5CEJH5ZN.js.map} +0 -0
  286. /package/dist/{chunk-4RGWCRIJ.js.map → chunk-5TYA4OCF.js.map} +0 -0
  287. /package/dist/{chunk-PILLH262.js.map → chunk-6GAUF4OU.js.map} +0 -0
  288. /package/dist/{chunk-QXWQ5V24.js.map → chunk-AF6DSAWD.js.map} +0 -0
  289. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  290. /package/dist/{chunk-32KD5IHZ.js.map → chunk-CLXTDOKV.js.map} +0 -0
  291. /package/dist/{chunk-ARV3AUOM.js.map → chunk-DL6H3D7S.js.map} +0 -0
  292. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  293. /package/dist/{chunk-KCRV3HVN.js.map → chunk-EC3A6M43.js.map} +0 -0
  294. /package/dist/{chunk-YI3KC2B5.js.map → chunk-FZMH66NT.js.map} +0 -0
  295. /package/dist/{chunk-DT2ZGQT7.js.map → chunk-G663XUEG.js.map} +0 -0
  296. /package/dist/{chunk-CDOIDOTQ.js.map → chunk-HKET3ZOI.js.map} +0 -0
  297. /package/dist/{chunk-YOI3ELXF.js.map → chunk-IF362TF6.js.map} +0 -0
  298. /package/dist/{chunk-UX5QTAFE.js.map → chunk-J45OCIVH.js.map} +0 -0
  299. /package/dist/{chunk-UDJLF3BO.js.map → chunk-JI6HWBYL.js.map} +0 -0
  300. /package/dist/{chunk-ECZPWSB5.js.map → chunk-JJT3AGL4.js.map} +0 -0
  301. /package/dist/{chunk-6C4WHMKV.js.map → chunk-JMAKCWJ3.js.map} +0 -0
  302. /package/dist/{chunk-4NFVPDIL.js.map → chunk-LM6JB2EG.js.map} +0 -0
  303. /package/dist/{chunk-MOGFK2DU.js.map → chunk-LPIWEKZ3.js.map} +0 -0
  304. /package/dist/{chunk-LD53WPMU.js.map → chunk-LQ6JI4VH.js.map} +0 -0
  305. /package/dist/{chunk-IZLNJYLX.js.map → chunk-MNFAGE5D.js.map} +0 -0
  306. /package/dist/{chunk-5A35EGHM.js.map → chunk-N4PD5IY3.js.map} +0 -0
  307. /package/dist/{chunk-PQP6MFPL.js.map → chunk-NFMDHE45.js.map} +0 -0
  308. /package/dist/{chunk-WVTNZUER.js.map → chunk-NLZO5NO6.js.map} +0 -0
  309. /package/dist/{chunk-5S53ZBPH.js.map → chunk-Q6ZHGGNJ.js.map} +0 -0
  310. /package/dist/{chunk-SN5DFE34.js.map → chunk-Q7SFJURX.js.map} +0 -0
  311. /package/dist/{chunk-MXZWKOOR.js.map → chunk-QJM2XAJD.js.map} +0 -0
  312. /package/dist/{chunk-6ZNIUGXB.js.map → chunk-QQW2LIEA.js.map} +0 -0
  313. /package/dist/{chunk-ZKD3UVEO.js.map → chunk-QVTSLRKT.js.map} +0 -0
  314. /package/dist/{chunk-YXZPKBFW.js.map → chunk-SPVIG2R3.js.map} +0 -0
  315. /package/dist/{chunk-B55EAZNF.js.map → chunk-TIVZ4MCG.js.map} +0 -0
  316. /package/dist/{chunk-5KBNNUXS.js.map → chunk-TT7BJWGI.js.map} +0 -0
  317. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  318. /package/dist/{chunk-E6BOD3UJ.js.map → chunk-VPAFWWCL.js.map} +0 -0
  319. /package/dist/{chunk-D7PQ7HZL.js.map → chunk-W54EAJT4.js.map} +0 -0
  320. /package/dist/{chunk-QVG4LAQO.js.map → chunk-WR6KFJKA.js.map} +0 -0
  321. /package/dist/{chunk-YQGHW5ML.js.map → chunk-WRFKZEO6.js.map} +0 -0
  322. /package/dist/{chunk-SJGTY2TW.js.map → chunk-XUNQLJT2.js.map} +0 -0
  323. /package/dist/{chunk-P7IDNF7H.js.map → chunk-XWT4JXXA.js.map} +0 -0
  324. /package/dist/{chunk-MSUA4KAK.js.map → chunk-XXA6T3O4.js.map} +0 -0
  325. /package/dist/{chunk-KF74X62T.js.map → chunk-YGKUAX2B.js.map} +0 -0
  326. /package/dist/{chunk-YWYZPKK3.js.map → chunk-YOZNTNNA.js.map} +0 -0
  327. /package/dist/{state-NCHQ4TRG.js.map → extraction-faithfulness.js.map} +0 -0
  328. /package/dist/{graph-edge-decay-D7OESCBR.js.map → graph-edge-decay-JLOF3YW4.js.map} +0 -0
  329. /package/dist/{tui-RI7P6PBS.js.map → state-ITXJKXRE.js.map} +0 -0
  330. /package/dist/{trace-WM7V4CKI.js.map → trace-ZFVRH4GO.js.map} +0 -0
@@ -4,29 +4,32 @@ import {
4
4
  loadSyncState,
5
5
  syncWearableSource,
6
6
  wearableSourceLabel
7
- } from "./chunk-5KBNNUXS.js";
8
- import {
9
- MaintenanceScheduler
10
- } from "./chunk-QXWQ5V24.js";
7
+ } from "./chunk-TT7BJWGI.js";
11
8
  import {
12
9
  migrateFromEngram
13
10
  } from "./chunk-7HYPN2GC.js";
11
+ import {
12
+ MaintenanceScheduler
13
+ } from "./chunk-AF6DSAWD.js";
14
14
  import {
15
15
  LcmEngine
16
16
  } from "./chunk-X5J3JZR3.js";
17
- import {
18
- chunkTranscriptEntries
19
- } from "./chunk-TECVW3JP.js";
20
17
  import {
21
18
  cleanupConversationChunks
22
19
  } from "./chunk-O7GOFAM3.js";
23
20
  import {
24
21
  CompoundingEngine,
25
22
  defaultTierMigrationCycleBudget
26
- } from "./chunk-D7PQ7HZL.js";
23
+ } from "./chunk-W54EAJT4.js";
27
24
  import {
28
25
  SharedContextManager
29
26
  } from "./chunk-UFS7OXGL.js";
27
+ import {
28
+ chunkTranscriptEntries
29
+ } from "./chunk-TECVW3JP.js";
30
+ import {
31
+ extractTopics
32
+ } from "./chunk-UHGBNIOS.js";
30
33
  import {
31
34
  applyUtilityPromotionRuntimePolicy,
32
35
  applyUtilityRankingRuntimeDelta,
@@ -50,12 +53,9 @@ import {
50
53
  import {
51
54
  TmtBuilder
52
55
  } from "./chunk-ECZU5BJH.js";
53
- import {
54
- extractTopics
55
- } from "./chunk-UHGBNIOS.js";
56
56
  import {
57
57
  HourlySummarizer
58
- } from "./chunk-QVG4LAQO.js";
58
+ } from "./chunk-WR6KFJKA.js";
59
59
  import {
60
60
  buildTargetedFactRecallSection,
61
61
  shouldRecallTargetedFactEvidence
@@ -63,6 +63,10 @@ import {
63
63
  import {
64
64
  SessionObserverState
65
65
  } from "./chunk-DKTSR7EK.js";
66
+ import {
67
+ RerankCache,
68
+ rerankLocalOrNoop
69
+ } from "./chunk-E3VODCC3.js";
66
70
  import {
67
71
  buildResponseGuidanceRecallSection,
68
72
  shouldRecallResponseGuidance
@@ -94,10 +98,6 @@ import {
94
98
  import {
95
99
  RelevanceStore
96
100
  } from "./chunk-GG6AJN7A.js";
97
- import {
98
- RerankCache,
99
- rerankLocalOrNoop
100
- } from "./chunk-E3VODCC3.js";
101
101
  import {
102
102
  reorderRecallResultsWithMmr
103
103
  } from "./chunk-YDBIWGNI.js";
@@ -135,9 +135,16 @@ import {
135
135
  import {
136
136
  classifyMemoryKind
137
137
  } from "./chunk-YAZNBMNF.js";
138
+ import {
139
+ createDeferCountMap,
140
+ createVerdictCache,
141
+ getVerdictKind,
142
+ judgeFactDurability,
143
+ validateProcedureExtraction
144
+ } from "./chunk-JJT3AGL4.js";
138
145
  import {
139
146
  ExtractionEngine
140
- } from "./chunk-MXZWKOOR.js";
147
+ } from "./chunk-QJM2XAJD.js";
141
148
  import {
142
149
  parseMemoryActionEligibilityContext
143
150
  } from "./chunk-ROZJACKP.js";
@@ -146,7 +153,7 @@ import {
146
153
  } from "./chunk-PWFWCGOO.js";
147
154
  import {
148
155
  LocalLlmClient
149
- } from "./chunk-UPTZYUYJ.js";
156
+ } from "./chunk-24D66MMN.js";
150
157
  import {
151
158
  buildFocusedListRecallSection,
152
159
  shouldRecallFocusedListEvidence
@@ -161,13 +168,6 @@ import {
161
168
  import {
162
169
  recordJudgeTrainingPair
163
170
  } from "./chunk-XHYGJVXL.js";
164
- import {
165
- createDeferCountMap,
166
- createVerdictCache,
167
- getVerdictKind,
168
- judgeFactDurability,
169
- validateProcedureExtraction
170
- } from "./chunk-ECZPWSB5.js";
171
171
  import {
172
172
  tryDirectAnswer
173
173
  } from "./chunk-OQH5XUH3.js";
@@ -178,7 +178,7 @@ import {
178
178
  buildEntityRecallSection,
179
179
  entityRecentTranscriptLookbackHours,
180
180
  readRecentEntityTranscriptEntries
181
- } from "./chunk-IZLNJYLX.js";
181
+ } from "./chunk-MNFAGE5D.js";
182
182
  import {
183
183
  formatDaySummaryMemories
184
184
  } from "./chunk-EO5QWINU.js";
@@ -191,34 +191,34 @@ import {
191
191
  import {
192
192
  compareVerifiedEpisodeResults,
193
193
  searchVerifiedEpisodes
194
- } from "./chunk-5S53ZBPH.js";
194
+ } from "./chunk-Q6ZHGGNJ.js";
195
195
  import {
196
196
  ThreadingManager
197
197
  } from "./chunk-QRDOSYOR.js";
198
198
  import {
199
199
  compareVerifiedSemanticRuleResults,
200
200
  searchVerifiedSemanticRules
201
- } from "./chunk-YI3KC2B5.js";
201
+ } from "./chunk-FZMH66NT.js";
202
202
  import {
203
203
  searchWorkProductLedgerEntries
204
204
  } from "./chunk-ZRWB5D4H.js";
205
205
  import {
206
206
  TranscriptManager
207
207
  } from "./chunk-PONNZ54D.js";
208
- import {
209
- PolicyRuntimeManager
210
- } from "./chunk-33JBK2XP.js";
211
208
  import {
212
209
  runNamespaceMaintenanceFanout,
213
210
  summarizeNamespaceMaintenanceHealth
214
- } from "./chunk-DT2ZGQT7.js";
211
+ } from "./chunk-G663XUEG.js";
215
212
  import {
216
213
  NamespaceCatalog,
217
214
  planNamespaceMaintenance
218
- } from "./chunk-SN5DFE34.js";
215
+ } from "./chunk-Q7SFJURX.js";
219
216
  import {
220
217
  NamespaceStorageRouter
221
- } from "./chunk-YWYZPKK3.js";
218
+ } from "./chunk-YOZNTNNA.js";
219
+ import {
220
+ PolicyRuntimeManager
221
+ } from "./chunk-33JBK2XP.js";
222
222
  import {
223
223
  isAboveImportanceThreshold,
224
224
  scoreImportance
@@ -263,7 +263,7 @@ import {
263
263
  materializeAfterSemanticConsolidation,
264
264
  parseConsolidationResponse,
265
265
  parseOperatorAwareConsolidationResponse
266
- } from "./chunk-EPVIBPVE.js";
266
+ } from "./chunk-52QIAN76.js";
267
267
  import {
268
268
  buildBehaviorSignalsForMemory,
269
269
  dedupeBehaviorSignalsByMemoryAndHash
@@ -286,11 +286,6 @@ import {
286
286
  import {
287
287
  isDisagreementPrompt
288
288
  } from "./chunk-H3FZVNRN.js";
289
- import {
290
- FallbackLlmClient,
291
- fallbackLlmRuntimeContextFromConfig,
292
- gatewayTaskChainOptions
293
- } from "./chunk-4RGWCRIJ.js";
294
289
  import {
295
290
  compileCorrectionRule,
296
291
  correctionsFilePath,
@@ -321,18 +316,14 @@ import {
321
316
  } from "./chunk-FF4KLI5W.js";
322
317
  import {
323
318
  buildXraySnapshot
324
- } from "./chunk-MOGFK2DU.js";
325
- import {
326
- objectiveStateStoreOverrideForNamespace,
327
- searchObjectiveStateSnapshots
328
- } from "./chunk-6HMYUWXR.js";
319
+ } from "./chunk-LPIWEKZ3.js";
329
320
  import {
330
321
  NamespaceSearchRouter
331
- } from "./chunk-E6BOD3UJ.js";
322
+ } from "./chunk-VPAFWWCL.js";
332
323
  import {
333
324
  createConversationIndexRuntime,
334
325
  createSearchBackend
335
- } from "./chunk-6ZNIUGXB.js";
326
+ } from "./chunk-QQW2LIEA.js";
336
327
  import {
337
328
  NoopSearchBackend
338
329
  } from "./chunk-CYEPCZN5.js";
@@ -347,24 +338,28 @@ import {
347
338
  import {
348
339
  parseQmdExplain
349
340
  } from "./chunk-K43PI6DQ.js";
341
+ import {
342
+ objectiveStateStoreOverrideForNamespace,
343
+ searchObjectiveStateSnapshots
344
+ } from "./chunk-6HMYUWXR.js";
350
345
  import {
351
346
  ProfilingCollector
352
347
  } from "./chunk-PNLCEFE4.js";
353
- import {
354
- shouldSkipImplicitExtraction
355
- } from "./chunk-U33LWTQQ.js";
356
348
  import {
357
349
  buildProcedurePersistBody
358
350
  } from "./chunk-QDW3E4RD.js";
351
+ import {
352
+ shouldSkipImplicitExtraction
353
+ } from "./chunk-U33LWTQQ.js";
359
354
  import {
360
355
  GraphIndex
361
- } from "./chunk-KF74X62T.js";
356
+ } from "./chunk-YGKUAX2B.js";
362
357
  import {
363
358
  searchCausalTrajectories
364
- } from "./chunk-YN4ZT4CW.js";
359
+ } from "./chunk-3LYJIA76.js";
365
360
  import {
366
361
  buildChainFollowupGenerator
367
- } from "./chunk-P7IDNF7H.js";
362
+ } from "./chunk-XWT4JXXA.js";
368
363
  import {
369
364
  ContentHashIndex,
370
365
  StorageManager,
@@ -372,7 +367,7 @@ import {
372
367
  fingerprintEntityStructuredFacts,
373
368
  normalizeAttributePairs,
374
369
  parseEntityFile
375
- } from "./chunk-NXNUG7IA.js";
370
+ } from "./chunk-MOBRVKWE.js";
376
371
  import {
377
372
  isValidTranscriptDate,
378
373
  loadSpeakerRegistry,
@@ -393,16 +388,16 @@ import {
393
388
  } from "./chunk-J6A3CX5N.js";
394
389
  import {
395
390
  confidenceTier
396
- } from "./chunk-U62ZGWU7.js";
391
+ } from "./chunk-ZXUOAFUG.js";
392
+ import {
393
+ inferMemoryStatus,
394
+ isActiveMemoryStatus
395
+ } from "./chunk-RULE4VG5.js";
397
396
  import {
398
397
  buildQmdRecallCacheKey,
399
398
  getCachedQmdRecall,
400
399
  setCachedQmdRecall
401
400
  } from "./chunk-42JKGUFJ.js";
402
- import {
403
- inferMemoryStatus,
404
- isActiveMemoryStatus
405
- } from "./chunk-RULE4VG5.js";
406
401
  import {
407
402
  lintWorkspaceFiles,
408
403
  rotateMarkdownFileToArchive
@@ -410,6 +405,16 @@ import {
410
405
  import {
411
406
  sanitizeMemoryContent
412
407
  } from "./chunk-FVQJYWH7.js";
408
+ import {
409
+ applyFaithfulnessVerdict,
410
+ createFaithfulnessCounters,
411
+ runFaithfulnessGateBatch
412
+ } from "./chunk-5AT62NQH.js";
413
+ import {
414
+ FallbackLlmClient,
415
+ fallbackLlmRuntimeContextFromConfig,
416
+ gatewayTaskChainOptions
417
+ } from "./chunk-5TYA4OCF.js";
413
418
  import {
414
419
  keyring_exports,
415
420
  secureStoreDir
@@ -2418,6 +2423,12 @@ var Orchestrator = class _Orchestrator {
2418
2423
  * hash so the defer cap can be enforced.
2419
2424
  */
2420
2425
  judgeDeferCounts;
2426
+ /**
2427
+ * Faithfulness gate distribution counters (issue #1576). Per-orchestrator
2428
+ * running tally surfaced via console_state telemetry. No module-level state
2429
+ * (rule 11) — these hang off the orchestrator instance.
2430
+ */
2431
+ faithfulnessCounters = createFaithfulnessCounters();
2421
2432
  /**
2422
2433
  * Side-channel: number of facts deferred in the most recent
2423
2434
  * `persistExtraction` call (issue #562, PR 2). The caller reads this after
@@ -2430,6 +2441,19 @@ var Orchestrator = class _Orchestrator {
2430
2441
  get fastGatewayLlm() {
2431
2442
  return this._fastGatewayLlm;
2432
2443
  }
2444
+ /**
2445
+ * Faithfulness gate verdict distribution (issue #1576). Consumed by the
2446
+ * console-state aggregator so `remnic doctor` can render how the gate is
2447
+ * performing. Returns a fresh object so callers cannot mutate the
2448
+ * internal counters. Returns `undefined` when the gate is off so the
2449
+ * console-state snapshot omits the faithfulness block entirely (cursor
2450
+ * review: an all-zero block would otherwise always be truthy and leak
2451
+ * into snapshots that document it as absent-when-off).
2452
+ */
2453
+ getConsoleFaithfulnessDistribution() {
2454
+ if (this.config.extractionFaithfulnessGate === "off") return void 0;
2455
+ return { ...this.faithfulnessCounters };
2456
+ }
2433
2457
  modelRegistry;
2434
2458
  relevance;
2435
2459
  negatives;
@@ -3712,7 +3736,7 @@ var Orchestrator = class _Orchestrator {
3712
3736
  if (signal.aborted) return;
3713
3737
  if (!this.wearablesAutoSyncHandle && this.config.wearables.enabled && this.config.wearables.autoSyncEnabled && Object.values(this.config.wearables.sources).some((source) => source.enabled)) {
3714
3738
  try {
3715
- const { startWearablesAutoSync } = await import("./auto-sync-RWXT6P5M.js");
3739
+ const { startWearablesAutoSync } = await import("./auto-sync-PFW2NJZY.js");
3716
3740
  if (signal.aborted) return;
3717
3741
  this.wearablesAutoSyncHandle = startWearablesAutoSync(
3718
3742
  {
@@ -10828,7 +10852,10 @@ ${normalized}`).digest("hex");
10828
10852
  // Pass the KNOWN base namespace (NHIdx) so the catalog write touch records the
10829
10853
  // real namespace rather than a guess decoded from the storage dir.
10830
10854
  selfNamespace,
10831
- scopeProfileGatePlan
10855
+ scopeProfileGatePlan,
10856
+ // Verbatim source turns for the faithfulness gate (#1576) so it can
10857
+ // locate a quote per fact when #1575 spans are absent.
10858
+ normalizedTurns.map((t) => t.content).join("\n\n")
10832
10859
  );
10833
10860
  let postPersistMetadataFailed = false;
10834
10861
  meta ??= await storage.loadMeta();
@@ -11154,7 +11181,7 @@ ${normalized}`).digest("hex");
11154
11181
  requestQmdMaintenanceForTool(reason) {
11155
11182
  this.maintenanceScheduler.requestQmdMaintenanceForTool(reason);
11156
11183
  }
11157
- async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, graphCaps = resolveGraphConstructionCapabilities(this.config)) {
11184
+ async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, sourceText, graphCaps = resolveGraphConstructionCapabilities(this.config)) {
11158
11185
  const citationEnabled = this.config.inlineSourceAttributionEnabled === true;
11159
11186
  const citationTemplate = this.config.inlineSourceAttributionFormat;
11160
11187
  const citationContextBase = citationEnabled ? {
@@ -11649,6 +11676,19 @@ ${normalized}`).digest("hex");
11649
11676
  );
11650
11677
  }
11651
11678
  }
11679
+ const faithfulnessMode = this.config.extractionFaithfulnessGate;
11680
+ const faithfulnessResultsByFactIndex = faithfulnessMode === "shadow" || faithfulnessMode === "enforce" ? await runFaithfulnessGateBatch(
11681
+ facts,
11682
+ faithfulnessMode,
11683
+ this.config,
11684
+ this.localLlm,
11685
+ new FallbackLlmClient(
11686
+ this.config.gatewayConfig,
11687
+ fallbackLlmRuntimeContextFromConfig(this.config)
11688
+ ),
11689
+ this.faithfulnessCounters,
11690
+ sourceText
11691
+ ) : null;
11652
11692
  let factLoopIndex = -1;
11653
11693
  for (const fact of facts) {
11654
11694
  factLoopIndex++;
@@ -11786,6 +11826,13 @@ ${normalized}`).digest("hex");
11786
11826
  continue;
11787
11827
  }
11788
11828
  }
11829
+ const { faithfulness: faithfulnessFm, enforceStatus: faithfulnessEnforceStatus } = applyFaithfulnessVerdict(
11830
+ faithfulnessResultsByFactIndex,
11831
+ factLoopIndex,
11832
+ faithfulnessMode,
11833
+ fact.content,
11834
+ this.faithfulnessCounters
11835
+ );
11789
11836
  let pendingSemanticSkip = null;
11790
11837
  if (this.config.semanticDedupEnabled) {
11791
11838
  let semanticDecision;
@@ -11827,7 +11874,7 @@ ${normalized}`).digest("hex");
11827
11874
  let supersedes;
11828
11875
  let links = [];
11829
11876
  let contradictionDetected = false;
11830
- if (this.config.contradictionDetectionEnabled && this.qmd.isAvailable()) {
11877
+ if (this.config.contradictionDetectionEnabled && this.qmd.isAvailable() && faithfulnessEnforceStatus !== "pending_review") {
11831
11878
  const targetNamespace = this.namespaceFromStorageDir(targetStorage.dir);
11832
11879
  const contradiction = await this.checkForContradiction(
11833
11880
  fact.content,
@@ -11856,7 +11903,7 @@ ${normalized}`).digest("hex");
11856
11903
  }
11857
11904
  }
11858
11905
  const isCorrection = writeCategory === "correction";
11859
- if (pendingSemanticSkip && !contradictionDetected && !isCorrection) {
11906
+ if (pendingSemanticSkip && !contradictionDetected && !isCorrection && faithfulnessEnforceStatus !== "pending_review") {
11860
11907
  log.debug(
11861
11908
  `dedup: skipping semantic near-duplicate fact "${fact.content.slice(0, 60).replace(/\s+/g, " ")}\u2026" score=${pendingSemanticSkip.topScore.toFixed(
11862
11909
  3
@@ -11909,7 +11956,10 @@ ${normalized}`).digest("hex");
11909
11956
  memoryKind: memoryKind2,
11910
11957
  structuredAttributes: fact.structuredAttributes,
11911
11958
  validAt: sourceContext?.validAt,
11912
- contentHashSource: rawChunkedContent
11959
+ contentHashSource: rawChunkedContent,
11960
+ // Faithfulness gate (issue #1576).
11961
+ ...faithfulnessFm ? { faithfulness: faithfulnessFm } : {},
11962
+ ...faithfulnessEnforceStatus ? { status: faithfulnessEnforceStatus } : {}
11913
11963
  }
11914
11964
  );
11915
11965
  try {
@@ -11938,7 +11988,12 @@ ${normalized}`).digest("hex");
11938
11988
  intentActionType: inferredIntent?.actionType,
11939
11989
  intentEntityTypes: inferredIntent?.entityTypes,
11940
11990
  memoryKind: memoryKind2,
11941
- validAt: sourceContext?.validAt
11991
+ validAt: sourceContext?.validAt,
11992
+ // Faithfulness gate (issue #1576): propagate the parent
11993
+ // fact's verdict + enforce status so a pending_review fact
11994
+ // is not indexed as active through its chunks (chatgpt P2).
11995
+ ...faithfulnessFm ? { faithfulness: faithfulnessFm } : {},
11996
+ ...faithfulnessEnforceStatus ? { status: faithfulnessEnforceStatus } : {}
11942
11997
  }
11943
11998
  );
11944
11999
  }
@@ -11953,24 +12008,26 @@ ${normalized}`).digest("hex");
11953
12008
  `chunked memory ${parentId} into ${chunkResult.chunks.length} chunks`
11954
12009
  );
11955
12010
  trackPersistedId(targetStorage, parentId);
11956
- if (threadEpisodeIdsForGraph && !threadEpisodeIdsForGraph.includes(parentId)) {
12011
+ if (faithfulnessEnforceStatus !== "pending_review" && threadEpisodeIdsForGraph && !threadEpisodeIdsForGraph.includes(parentId)) {
11957
12012
  threadEpisodeIdsForGraph.push(parentId);
11958
12013
  }
11959
12014
  await this.indexPersistedMemory(targetStorage, parentId);
11960
- try {
11961
- const supersessionEntityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
11962
- await applyTemporalSupersession({
11963
- storage: targetStorage,
11964
- newMemoryId: parentId,
11965
- entityRef: supersessionEntityRef,
11966
- structuredAttributes: fact.structuredAttributes,
11967
- createdAt: supersessionOrderingAt(sourceContext?.validAt),
11968
- enabled: this.config.temporalSupersessionEnabled
11969
- });
11970
- } catch (err) {
11971
- log.warn(`temporal-supersession (chunked): unexpected error: ${err}`);
12015
+ if (faithfulnessEnforceStatus !== "pending_review") {
12016
+ try {
12017
+ const supersessionEntityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
12018
+ await applyTemporalSupersession({
12019
+ storage: targetStorage,
12020
+ newMemoryId: parentId,
12021
+ entityRef: supersessionEntityRef,
12022
+ structuredAttributes: fact.structuredAttributes,
12023
+ createdAt: supersessionOrderingAt(sourceContext?.validAt),
12024
+ enabled: this.config.temporalSupersessionEnabled
12025
+ });
12026
+ } catch (err) {
12027
+ log.warn(`temporal-supersession (chunked): unexpected error: ${err}`);
12028
+ }
11972
12029
  }
11973
- await promoteMemoryToShared({
12030
+ if (faithfulnessEnforceStatus !== "pending_review") await promoteMemoryToShared({
11974
12031
  sourceStorage: targetStorage,
11975
12032
  category: writeCategory,
11976
12033
  content: fact.content,
@@ -12000,7 +12057,7 @@ ${normalized}`).digest("hex");
12000
12057
  await this.indexPersistedMemory(targetStorage, chunkId);
12001
12058
  }
12002
12059
  try {
12003
- if (this.config.verbatimArtifactsEnabled && this.config.verbatimArtifactCategories.includes(writeCategory) && fact.confidence >= this.config.verbatimArtifactsMinConfidence) {
12060
+ if (this.config.verbatimArtifactsEnabled && this.config.verbatimArtifactCategories.includes(writeCategory) && fact.confidence >= this.config.verbatimArtifactsMinConfidence && faithfulnessEnforceStatus !== "pending_review") {
12004
12061
  await targetStorage.writeArtifact(citedChunkedContent, {
12005
12062
  confidence: fact.confidence,
12006
12063
  tags: [...fact.tags, "artifact", "chunked-parent"],
@@ -12011,7 +12068,7 @@ ${normalized}`).digest("hex");
12011
12068
  intentEntityTypes: inferredIntent?.entityTypes
12012
12069
  });
12013
12070
  }
12014
- if (graphCaps.multiGraphMemory) {
12071
+ if (graphCaps.multiGraphMemory && faithfulnessEnforceStatus !== "pending_review") {
12015
12072
  try {
12016
12073
  const graphContext = await ensureGraphContext(targetStorage);
12017
12074
  const entityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
@@ -12094,7 +12151,10 @@ ${normalized}`).digest("hex");
12094
12151
  memoryKind,
12095
12152
  structuredAttributes: fact.structuredAttributes,
12096
12153
  validAt: sourceContext?.validAt,
12097
- contentHashSource: writeCategory === "fact" ? fact.content : void 0
12154
+ contentHashSource: writeCategory === "fact" ? fact.content : void 0,
12155
+ // Faithfulness gate (issue #1576).
12156
+ ...faithfulnessFm ? { faithfulness: faithfulnessFm } : {},
12157
+ ...faithfulnessEnforceStatus ? { status: faithfulnessEnforceStatus } : {}
12098
12158
  }
12099
12159
  );
12100
12160
  if (routedRuleId) {
@@ -12102,18 +12162,20 @@ ${normalized}`).digest("hex");
12102
12162
  `routing applied for memory ${memoryId}: rule=${routedRuleId} category=${writeCategory} storage=${targetStorage.dir}`
12103
12163
  );
12104
12164
  }
12105
- try {
12106
- const supersessionEntityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
12107
- await applyTemporalSupersession({
12108
- storage: targetStorage,
12109
- newMemoryId: memoryId,
12110
- entityRef: supersessionEntityRef,
12111
- structuredAttributes: fact.structuredAttributes,
12112
- createdAt: supersessionOrderingAt(sourceContext?.validAt),
12113
- enabled: this.config.temporalSupersessionEnabled
12114
- });
12115
- } catch (err) {
12116
- log.warn(`temporal-supersession: unexpected error: ${err}`);
12165
+ if (faithfulnessEnforceStatus !== "pending_review") {
12166
+ try {
12167
+ const supersessionEntityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
12168
+ await applyTemporalSupersession({
12169
+ storage: targetStorage,
12170
+ newMemoryId: memoryId,
12171
+ entityRef: supersessionEntityRef,
12172
+ structuredAttributes: fact.structuredAttributes,
12173
+ createdAt: supersessionOrderingAt(sourceContext?.validAt),
12174
+ enabled: this.config.temporalSupersessionEnabled
12175
+ });
12176
+ } catch (err) {
12177
+ log.warn(`temporal-supersession: unexpected error: ${err}`);
12178
+ }
12117
12179
  }
12118
12180
  try {
12119
12181
  trackBehaviorSignals(
@@ -12128,11 +12190,11 @@ ${normalized}`).digest("hex");
12128
12190
  })
12129
12191
  );
12130
12192
  trackPersistedId(targetStorage, memoryId);
12131
- if (threadEpisodeIdsForGraph && !threadEpisodeIdsForGraph.includes(memoryId)) {
12193
+ if (faithfulnessEnforceStatus !== "pending_review" && threadEpisodeIdsForGraph && !threadEpisodeIdsForGraph.includes(memoryId)) {
12132
12194
  threadEpisodeIdsForGraph.push(memoryId);
12133
12195
  }
12134
12196
  await this.indexPersistedMemory(targetStorage, memoryId);
12135
- await promoteMemoryToShared({
12197
+ if (faithfulnessEnforceStatus !== "pending_review") await promoteMemoryToShared({
12136
12198
  sourceStorage: targetStorage,
12137
12199
  category: writeCategory,
12138
12200
  content: fact.content,
@@ -12149,7 +12211,7 @@ ${normalized}`).digest("hex");
12149
12211
  validAt: sourceContext?.validAt,
12150
12212
  source: extractionWriteSource
12151
12213
  });
12152
- if (graphCaps.multiGraphMemory) {
12214
+ if (graphCaps.multiGraphMemory && faithfulnessEnforceStatus !== "pending_review") {
12153
12215
  try {
12154
12216
  const graphContext = await ensureGraphContext(targetStorage);
12155
12217
  const entityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
@@ -12185,7 +12247,7 @@ ${normalized}`).digest("hex");
12185
12247
  } catch {
12186
12248
  }
12187
12249
  }
12188
- if (this.config.verbatimArtifactsEnabled && this.config.verbatimArtifactCategories.includes(writeCategory) && fact.confidence >= this.config.verbatimArtifactsMinConfidence) {
12250
+ if (this.config.verbatimArtifactsEnabled && this.config.verbatimArtifactCategories.includes(writeCategory) && fact.confidence >= this.config.verbatimArtifactsMinConfidence && faithfulnessEnforceStatus !== "pending_review") {
12189
12251
  await targetStorage.writeArtifact(citedFactContent, {
12190
12252
  confidence: fact.confidence,
12191
12253
  tags: [...fact.tags, "artifact"],
@@ -12778,7 +12840,8 @@ ${normalized}`).digest("hex");
12778
12840
  if (this.config.temporalMemoryTreeEnabled) {
12779
12841
  try {
12780
12842
  const tmtEntries = allMemories.filter(
12781
- (m) => m.frontmatter.status !== "superseded" && m.frontmatter.status !== "archived" && m.frontmatter.status !== "forgotten"
12843
+ (m) => m.frontmatter.status !== "superseded" && m.frontmatter.status !== "archived" && m.frontmatter.status !== "forgotten" && m.frontmatter.status !== "pending_review"
12844
+ // #1576: unfaithful queue items must not feed TMT clusters
12782
12845
  ).map((m) => ({
12783
12846
  path: m.path,
12784
12847
  id: m.frontmatter.id,
@@ -14684,7 +14747,8 @@ ${lines.join("\n\n")}`;
14684
14747
  }
14685
14748
  const memory = memoryByPath.get(r.path);
14686
14749
  if (memory) {
14687
- if (memory.frontmatter.status === "forgotten") {
14750
+ const recallStatus = memory.frontmatter.status;
14751
+ if (recallStatus === "forgotten" || recallStatus === "pending_review" || recallStatus === "rejected" || recallStatus === "quarantined") {
14688
14752
  forgottenFilteredCount += 1;
14689
14753
  continue;
14690
14754
  }
@@ -15248,4 +15312,4 @@ export {
15248
15312
  resolvePersistedMemoryRelativePath,
15249
15313
  Orchestrator
15250
15314
  };
15251
- //# sourceMappingURL=chunk-C5AOVGVC.js.map
15315
+ //# sourceMappingURL=chunk-RWST6NOL.js.map