@remnic/core 9.3.726 → 9.3.728

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 (342) hide show
  1. package/dist/access-boundary.d.ts +5 -5
  2. package/dist/access-boundary.js +22 -22
  3. package/dist/access-cli.js +45 -45
  4. package/dist/access-http.d.ts +20 -5
  5. package/dist/access-http.js +27 -27
  6. package/dist/access-mcp.d.ts +5 -5
  7. package/dist/access-mcp.js +26 -26
  8. package/dist/access-operations-batch.js +23 -23
  9. package/dist/access-operations.d.ts +6 -6
  10. package/dist/access-operations.js +25 -25
  11. package/dist/access-schema.d.ts +4 -4
  12. package/dist/access-schema.js +3 -3
  13. package/dist/{access-service-B2PlPtxh.d.ts → access-service-Bgpjxo4f.d.ts} +36 -4
  14. package/dist/access-service.d.ts +5 -5
  15. package/dist/access-service.js +21 -21
  16. package/dist/access-surface-catalog.d.ts +5 -5
  17. package/dist/action-confidence.d.ts +1 -1
  18. package/dist/active-memory-bridge.d.ts +1 -1
  19. package/dist/active-recall.d.ts +1 -1
  20. package/dist/active-recall.js +3 -3
  21. package/dist/behavior-learner.d.ts +1 -1
  22. package/dist/behavior-signals.d.ts +1 -1
  23. package/dist/bootstrap.d.ts +4 -4
  24. package/dist/briefing.d.ts +1 -1
  25. package/dist/briefing.js +7 -7
  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/capabilities.d.ts +44 -2
  30. package/dist/capabilities.js +5 -3
  31. package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
  32. package/dist/{catalog-CzUb-GyD.d.ts → catalog-bMczlO2G.d.ts} +1 -1
  33. package/dist/causal-behavior.d.ts +1 -1
  34. package/dist/causal-consolidation.d.ts +1 -1
  35. package/dist/causal-consolidation.js +8 -8
  36. package/dist/causal-trajectory-graph.d.ts +1 -1
  37. package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
  38. package/dist/{chunk-BIA7ELIB.js → chunk-36SEDFAU.js} +3 -3
  39. package/dist/{chunk-UQSVUEN2.js → chunk-37436GML.js} +2 -2
  40. package/dist/{chunk-DVRHLN2O.js → chunk-3RCBIOOJ.js} +18 -2
  41. package/dist/{chunk-DVRHLN2O.js.map → chunk-3RCBIOOJ.js.map} +1 -1
  42. package/dist/{chunk-RRHHQYJS.js → chunk-3TSTGI6F.js} +2 -2
  43. package/dist/{chunk-5OOA7SGX.js → chunk-4ESAR77N.js} +2 -2
  44. package/dist/{chunk-FO3HO52S.js → chunk-4H4F3BFL.js} +2 -2
  45. package/dist/{chunk-BEUCACTV.js → chunk-4NOI577P.js} +2 -2
  46. package/dist/{chunk-BBIE7W52.js → chunk-4NR2PDZ5.js} +2 -2
  47. package/dist/{chunk-WGTWGDR5.js → chunk-76NHR6ZL.js} +5 -5
  48. package/dist/{chunk-PKMQK2WY.js → chunk-773DPI6T.js} +4 -4
  49. package/dist/{chunk-MQVKHFIU.js → chunk-7RLCCNHU.js} +8 -8
  50. package/dist/{chunk-XGTBNVIU.js → chunk-AAD2ZS6P.js} +11 -1
  51. package/dist/chunk-AAD2ZS6P.js.map +1 -0
  52. package/dist/{chunk-EZNDNMRH.js → chunk-AQLOP5F4.js} +2 -2
  53. package/dist/{chunk-UNNDFYUX.js → chunk-ARV3AUOM.js} +5 -5
  54. package/dist/{chunk-NPL7VDM6.js → chunk-ASKXIAHD.js} +2 -2
  55. package/dist/{chunk-TQQH2FTX.js → chunk-BQCHEV7O.js} +106 -15
  56. package/dist/{chunk-TQQH2FTX.js.map → chunk-BQCHEV7O.js.map} +1 -1
  57. package/dist/{chunk-ZA2S2VLL.js → chunk-C2PG7IEH.js} +5 -2
  58. package/dist/chunk-C2PG7IEH.js.map +1 -0
  59. package/dist/{chunk-K4ZNARDO.js → chunk-CBWI22JN.js} +2 -2
  60. package/dist/{chunk-ZOHMPFOB.js → chunk-CKFLLAIS.js} +3 -3
  61. package/dist/{chunk-JPUT5NGH.js → chunk-DMQWV6SQ.js} +2 -2
  62. package/dist/{chunk-F3XZN24Z.js → chunk-DRUDC2UX.js} +2 -2
  63. package/dist/{chunk-KJR66XOM.js → chunk-EY6MDMHK.js} +2 -2
  64. package/dist/{chunk-3TUT4PWB.js → chunk-FVZ2ISIX.js} +2 -2
  65. package/dist/{chunk-C4X4QGIO.js → chunk-G6NKALRN.js} +5 -2
  66. package/dist/chunk-G6NKALRN.js.map +1 -0
  67. package/dist/{chunk-6SQQOJ4U.js → chunk-GKRLPHPU.js} +2 -2
  68. package/dist/{chunk-PLG6JHQS.js → chunk-H5BWGCRZ.js} +43 -42
  69. package/dist/chunk-H5BWGCRZ.js.map +1 -0
  70. package/dist/{chunk-2NBP25BG.js → chunk-HGNOCPZX.js} +171 -79
  71. package/dist/chunk-HGNOCPZX.js.map +1 -0
  72. package/dist/{chunk-5NWYQUQC.js → chunk-HOHVIVDR.js} +2 -2
  73. package/dist/{chunk-DCKNMLEQ.js → chunk-I5REUWLH.js} +11 -5
  74. package/dist/chunk-I5REUWLH.js.map +1 -0
  75. package/dist/{chunk-6WAJQKBS.js → chunk-JYLFZWUX.js} +2 -2
  76. package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
  77. package/dist/{chunk-UKTDXTWX.js → chunk-M4AYVEWS.js} +7 -7
  78. package/dist/{chunk-YTZ3VGC7.js → chunk-M4V2JVSZ.js} +2 -2
  79. package/dist/{chunk-TA3Y6GEX.js → chunk-MLKWJOAJ.js} +2 -2
  80. package/dist/{chunk-DQXPJ6HD.js → chunk-O6YH5F47.js} +4 -4
  81. package/dist/{chunk-7AG54AF3.js → chunk-PUR2CKX2.js} +1 -1
  82. package/dist/chunk-PUR2CKX2.js.map +1 -0
  83. package/dist/{chunk-OAHOL3ZC.js → chunk-QNEUZIAH.js} +152 -62
  84. package/dist/chunk-QNEUZIAH.js.map +1 -0
  85. package/dist/{chunk-Q6D75LVH.js → chunk-UM5AWJNQ.js} +79 -17
  86. package/dist/chunk-UM5AWJNQ.js.map +1 -0
  87. package/dist/{chunk-53EEQYE5.js → chunk-UTHQPSRC.js} +8 -8
  88. package/dist/{chunk-BB57OZWC.js → chunk-UVPL565C.js} +2 -2
  89. package/dist/{chunk-6AFVIOVZ.js → chunk-V4GNSDFH.js} +2 -2
  90. package/dist/{chunk-EHISUJFN.js → chunk-WAS3NV46.js} +6 -3
  91. package/dist/chunk-WAS3NV46.js.map +1 -0
  92. package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
  93. package/dist/{chunk-V7CMKMHM.js → chunk-Y4YD5TYW.js} +3 -3
  94. package/dist/{chunk-7NS7AWMZ.js → chunk-YGIQORJ3.js} +3 -3
  95. package/dist/{chunk-MDBZTH7N.js → chunk-YKBHOBJK.js} +44 -10
  96. package/dist/chunk-YKBHOBJK.js.map +1 -0
  97. package/dist/{chunk-3MS3QVX6.js → chunk-YOLZS7NY.js} +2 -2
  98. package/dist/{chunk-6OIDDKAA.js → chunk-YTU7WKYN.js} +35 -9
  99. package/dist/chunk-YTU7WKYN.js.map +1 -0
  100. package/dist/{cli-IOlDHSBT.d.ts → cli-BLME420h.d.ts} +3 -3
  101. package/dist/cli.d.ts +6 -6
  102. package/dist/cli.js +49 -49
  103. package/dist/compat/codex-cli-fallback.d.ts +1 -0
  104. package/dist/compat/codex-cli-fallback.js +22 -0
  105. package/dist/compat/codex-cli-fallback.js.map +1 -0
  106. package/dist/compat/codex-thread-key.d.ts +1 -0
  107. package/dist/compat/codex-thread-key.js +18 -0
  108. package/dist/compat/codex-thread-key.js.map +1 -0
  109. package/dist/compounding/engine.d.ts +1 -1
  110. package/dist/compounding/engine.js +7 -7
  111. package/dist/compounding/preference-consolidator.d.ts +1 -1
  112. package/dist/compression-optimizer.d.ts +1 -1
  113. package/dist/config.d.ts +1 -1
  114. package/dist/config.js +3 -3
  115. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  116. package/dist/connectors/codex-materialize-runner.js +7 -7
  117. package/dist/connectors/codex-materialize.d.ts +1 -1
  118. package/dist/connectors/index.d.ts +1 -1
  119. package/dist/connectors/index.js +7 -7
  120. package/dist/consolidation-provenance-check.d.ts +1 -1
  121. package/dist/consolidation-undo.d.ts +1 -1
  122. package/dist/contradiction/index.d.ts +1 -1
  123. package/dist/conversation-index/backend.d.ts +1 -1
  124. package/dist/conversation-index/chunker.d.ts +1 -1
  125. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  126. package/dist/conversation-index/indexer.d.ts +1 -1
  127. package/dist/conversation-index/search.d.ts +1 -1
  128. package/dist/day-summary.d.ts +1 -1
  129. package/dist/delinearize.d.ts +1 -1
  130. package/dist/direct-answer-wiring.d.ts +1 -1
  131. package/dist/direct-answer.d.ts +1 -1
  132. package/dist/embedding-fallback.d.ts +1 -1
  133. package/dist/embedding-fallback.js +2 -1
  134. package/dist/enrichment/index.d.ts +1 -1
  135. package/dist/entity-retrieval.d.ts +1 -1
  136. package/dist/entity-retrieval.js +7 -7
  137. package/dist/entity-schema.d.ts +1 -1
  138. package/dist/explicit-capture.d.ts +4 -4
  139. package/dist/extraction-faithfulness.d.ts +1 -1
  140. package/dist/extraction-faithfulness.js +2 -2
  141. package/dist/extraction-judge-telemetry.d.ts +1 -1
  142. package/dist/extraction-judge-training.d.ts +1 -1
  143. package/dist/extraction-judge.d.ts +1 -1
  144. package/dist/extraction.d.ts +1 -1
  145. package/dist/extraction.js +3 -2
  146. package/dist/faithfulness-config.d.ts +1 -0
  147. package/dist/faithfulness-config.js +1 -1
  148. package/dist/fallback-llm.d.ts +1 -1
  149. package/dist/{first-start-migration-PG5HBC3K.js → first-start-migration-22LPFHD5.js} +6 -2
  150. package/dist/first-start-migration-22LPFHD5.js.map +1 -0
  151. package/dist/graph-dashboard-diff.d.ts +1 -1
  152. package/dist/graph-dashboard-key.d.ts +1 -1
  153. package/dist/graph-dashboard-parser.d.ts +1 -1
  154. package/dist/graph-edge-reinforcement.d.ts +1 -1
  155. package/dist/graph-snapshot.d.ts +1 -1
  156. package/dist/graph.d.ts +1 -1
  157. package/dist/identity-continuity.d.ts +1 -1
  158. package/dist/importance.d.ts +1 -1
  159. package/dist/index.d.ts +9 -9
  160. package/dist/index.js +64 -64
  161. package/dist/intent.d.ts +1 -1
  162. package/dist/lcm/engine.d.ts +1 -1
  163. package/dist/lcm/engine.js +2 -2
  164. package/dist/lcm/index.d.ts +1 -1
  165. package/dist/lcm/index.js +7 -7
  166. package/dist/lcm/tools.d.ts +1 -1
  167. package/dist/lifecycle.d.ts +1 -1
  168. package/dist/live-connectors-runner.d.ts +1 -1
  169. package/dist/local-llm.d.ts +1 -1
  170. package/dist/local-model-endpoint.d.ts +9 -4
  171. package/dist/local-model-endpoint.js +1 -1
  172. package/dist/maintenance/memory-governance.d.ts +1 -1
  173. package/dist/maintenance/memory-governance.js +7 -7
  174. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
  175. package/dist/maintenance/rebuild-memory-projection.js +8 -8
  176. package/dist/mcp-memory-inspector-app.d.ts +5 -5
  177. package/dist/memory-action-policy.d.ts +1 -1
  178. package/dist/memory-cache.d.ts +1 -1
  179. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  180. package/dist/memory-projection-store.d.ts +1 -1
  181. package/dist/memory-provenance.d.ts +1 -1
  182. package/dist/memory-worth-outcomes.d.ts +1 -1
  183. package/dist/models-json.d.ts +1 -1
  184. package/dist/namespaces/migrate.d.ts +2 -2
  185. package/dist/namespaces/migrate.js +14 -13
  186. package/dist/namespaces/principal.d.ts +1 -1
  187. package/dist/namespaces/search.d.ts +1 -1
  188. package/dist/namespaces/search.js +6 -5
  189. package/dist/namespaces/storage.d.ts +2 -2
  190. package/dist/namespaces/storage.js +7 -7
  191. package/dist/native-knowledge.d.ts +1 -1
  192. package/dist/operator-toolkit.d.ts +1 -1
  193. package/dist/operator-toolkit.js +20 -20
  194. package/dist/orchestration/maintenance.d.ts +2 -2
  195. package/dist/orchestration/maintenance.js +9 -9
  196. package/dist/{orchestrator-C_OMSIMZ.d.ts → orchestrator-DqPAz8ot.d.ts} +3 -3
  197. package/dist/orchestrator.d.ts +4 -4
  198. package/dist/orchestrator.js +33 -33
  199. package/dist/patterns-cli.d.ts +1 -1
  200. package/dist/policy-runtime.d.ts +1 -1
  201. package/dist/provenance.d.ts +1 -1
  202. package/dist/provenance.js +1 -1
  203. package/dist/qmd-recall-cache.d.ts +1 -1
  204. package/dist/qmd.d.ts +1 -1
  205. package/dist/recall-disclosure-escalation.d.ts +1 -1
  206. package/dist/recall-explain-renderer.d.ts +1 -1
  207. package/dist/recall-explain-renderer.js +3 -3
  208. package/dist/recall-planner-llm.d.ts +1 -1
  209. package/dist/recall-state.d.ts +1 -1
  210. package/dist/recall-tag-filter.d.ts +1 -1
  211. package/dist/recall-xray-cli.d.ts +1 -1
  212. package/dist/recall-xray-cli.js +4 -4
  213. package/dist/recall-xray-renderer.d.ts +1 -1
  214. package/dist/recall-xray-renderer.js +3 -3
  215. package/dist/recall-xray.d.ts +1 -1
  216. package/dist/recall-xray.js +2 -2
  217. package/dist/resolve-auth-token.d.ts +1 -1
  218. package/dist/resume-bundles.js +4 -4
  219. package/dist/retrieval-agents.d.ts +1 -1
  220. package/dist/retrieval-tiers.d.ts +1 -1
  221. package/dist/routing/engine.d.ts +1 -1
  222. package/dist/routing/store.d.ts +1 -1
  223. package/dist/search/embed-helper.d.ts +1 -1
  224. package/dist/search/embed-helper.js +2 -1
  225. package/dist/search/factory.d.ts +1 -1
  226. package/dist/search/factory.js +5 -4
  227. package/dist/search/index.d.ts +1 -1
  228. package/dist/search/index.js +9 -8
  229. package/dist/search/lancedb-backend.d.ts +1 -1
  230. package/dist/search/meilisearch-backend.d.ts +1 -1
  231. package/dist/search/noop-backend.d.ts +1 -1
  232. package/dist/search/orama-backend.d.ts +1 -1
  233. package/dist/search/port.d.ts +1 -1
  234. package/dist/search/remote-backend.d.ts +1 -1
  235. package/dist/{semantic-consolidation-B8LiYtvx.d.ts → semantic-consolidation-Cl15ksZy.d.ts} +1 -1
  236. package/dist/semantic-consolidation.d.ts +2 -2
  237. package/dist/semantic-consolidation.js +8 -8
  238. package/dist/semantic-rule-promotion.js +7 -7
  239. package/dist/semantic-rule-verifier.d.ts +1 -1
  240. package/dist/semantic-rule-verifier.js +7 -7
  241. package/dist/session-observer-bands.d.ts +1 -1
  242. package/dist/session-observer-state.d.ts +1 -1
  243. package/dist/shared-context/manager.d.ts +1 -1
  244. package/dist/signal.d.ts +1 -1
  245. package/dist/storage.d.ts +1 -1
  246. package/dist/storage.js +6 -6
  247. package/dist/summarizer.d.ts +1 -1
  248. package/dist/summary-snapshot.d.ts +1 -1
  249. package/dist/temporal-supersession.d.ts +1 -1
  250. package/dist/temporal-validity.d.ts +1 -1
  251. package/dist/threading.d.ts +1 -1
  252. package/dist/tier-migration.d.ts +1 -1
  253. package/dist/tier-routing.d.ts +1 -1
  254. package/dist/topics.d.ts +1 -1
  255. package/dist/transcript.d.ts +1 -1
  256. package/dist/transfer/backup.js +2 -2
  257. package/dist/transfer/capsule-export.js +2 -2
  258. package/dist/transfer/capsule-import.js +2 -2
  259. package/dist/trust-score-stage.d.ts +1 -1
  260. package/dist/trust-score.d.ts +1 -1
  261. package/dist/{types-DmTaqob2.d.ts → types-ChQb9D6s.d.ts} +8 -0
  262. package/dist/types.d.ts +1 -1
  263. package/dist/types.js +1 -1
  264. package/dist/utility-runtime.d.ts +1 -1
  265. package/dist/verified-recall.js +7 -7
  266. package/package.json +26 -2
  267. package/src/access-http.ts +68 -1
  268. package/src/access-service.ts +2 -1
  269. package/src/admin/admin-surfaces.test.ts +289 -0
  270. package/src/admin/admin-surfaces.ts +138 -7
  271. package/src/bitemporal-dedup-backfill.test.ts +294 -0
  272. package/src/capabilities.test.ts +155 -0
  273. package/src/capabilities.ts +91 -0
  274. package/src/chat/chat-engine.test.ts +104 -1
  275. package/src/chat/chat-http.test.ts +119 -1
  276. package/src/chat/chat-http.ts +252 -97
  277. package/src/chat/chat-session.ts +166 -7
  278. package/src/cli.ts +3 -2
  279. package/src/compat/codex-cli-fallback.ts +23 -0
  280. package/src/compat/codex-subpath-aliases.test.ts +93 -0
  281. package/src/compat/codex-thread-key.ts +23 -0
  282. package/src/embedding-fallback.ts +2 -1
  283. package/src/extraction-faithfulness.test.ts +240 -0
  284. package/src/extraction-faithfulness.ts +58 -6
  285. package/src/extraction.ts +7 -3
  286. package/src/faithfulness-config.ts +16 -1
  287. package/src/local-model-endpoint.ts +24 -3
  288. package/src/maintenance/first-start-migration.ts +3 -1
  289. package/src/orchestrator.ts +238 -34
  290. package/src/provenance-extraction.test.ts +266 -0
  291. package/src/provenance.ts +66 -16
  292. package/src/search/embed-helper.ts +3 -2
  293. package/src/types.ts +8 -0
  294. package/dist/chunk-2NBP25BG.js.map +0 -1
  295. package/dist/chunk-6OIDDKAA.js.map +0 -1
  296. package/dist/chunk-7AG54AF3.js.map +0 -1
  297. package/dist/chunk-C4X4QGIO.js.map +0 -1
  298. package/dist/chunk-DCKNMLEQ.js.map +0 -1
  299. package/dist/chunk-EHISUJFN.js.map +0 -1
  300. package/dist/chunk-MDBZTH7N.js.map +0 -1
  301. package/dist/chunk-OAHOL3ZC.js.map +0 -1
  302. package/dist/chunk-PLG6JHQS.js.map +0 -1
  303. package/dist/chunk-Q6D75LVH.js.map +0 -1
  304. package/dist/chunk-XGTBNVIU.js.map +0 -1
  305. package/dist/chunk-ZA2S2VLL.js.map +0 -1
  306. package/dist/first-start-migration-PG5HBC3K.js.map +0 -1
  307. /package/dist/{capsule-crypto-GWVG7LGC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
  308. /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
  309. /package/dist/{chunk-BIA7ELIB.js.map → chunk-36SEDFAU.js.map} +0 -0
  310. /package/dist/{chunk-UQSVUEN2.js.map → chunk-37436GML.js.map} +0 -0
  311. /package/dist/{chunk-RRHHQYJS.js.map → chunk-3TSTGI6F.js.map} +0 -0
  312. /package/dist/{chunk-5OOA7SGX.js.map → chunk-4ESAR77N.js.map} +0 -0
  313. /package/dist/{chunk-FO3HO52S.js.map → chunk-4H4F3BFL.js.map} +0 -0
  314. /package/dist/{chunk-BEUCACTV.js.map → chunk-4NOI577P.js.map} +0 -0
  315. /package/dist/{chunk-BBIE7W52.js.map → chunk-4NR2PDZ5.js.map} +0 -0
  316. /package/dist/{chunk-WGTWGDR5.js.map → chunk-76NHR6ZL.js.map} +0 -0
  317. /package/dist/{chunk-PKMQK2WY.js.map → chunk-773DPI6T.js.map} +0 -0
  318. /package/dist/{chunk-MQVKHFIU.js.map → chunk-7RLCCNHU.js.map} +0 -0
  319. /package/dist/{chunk-EZNDNMRH.js.map → chunk-AQLOP5F4.js.map} +0 -0
  320. /package/dist/{chunk-UNNDFYUX.js.map → chunk-ARV3AUOM.js.map} +0 -0
  321. /package/dist/{chunk-NPL7VDM6.js.map → chunk-ASKXIAHD.js.map} +0 -0
  322. /package/dist/{chunk-K4ZNARDO.js.map → chunk-CBWI22JN.js.map} +0 -0
  323. /package/dist/{chunk-ZOHMPFOB.js.map → chunk-CKFLLAIS.js.map} +0 -0
  324. /package/dist/{chunk-JPUT5NGH.js.map → chunk-DMQWV6SQ.js.map} +0 -0
  325. /package/dist/{chunk-F3XZN24Z.js.map → chunk-DRUDC2UX.js.map} +0 -0
  326. /package/dist/{chunk-KJR66XOM.js.map → chunk-EY6MDMHK.js.map} +0 -0
  327. /package/dist/{chunk-3TUT4PWB.js.map → chunk-FVZ2ISIX.js.map} +0 -0
  328. /package/dist/{chunk-6SQQOJ4U.js.map → chunk-GKRLPHPU.js.map} +0 -0
  329. /package/dist/{chunk-5NWYQUQC.js.map → chunk-HOHVIVDR.js.map} +0 -0
  330. /package/dist/{chunk-6WAJQKBS.js.map → chunk-JYLFZWUX.js.map} +0 -0
  331. /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
  332. /package/dist/{chunk-UKTDXTWX.js.map → chunk-M4AYVEWS.js.map} +0 -0
  333. /package/dist/{chunk-YTZ3VGC7.js.map → chunk-M4V2JVSZ.js.map} +0 -0
  334. /package/dist/{chunk-TA3Y6GEX.js.map → chunk-MLKWJOAJ.js.map} +0 -0
  335. /package/dist/{chunk-DQXPJ6HD.js.map → chunk-O6YH5F47.js.map} +0 -0
  336. /package/dist/{chunk-53EEQYE5.js.map → chunk-UTHQPSRC.js.map} +0 -0
  337. /package/dist/{chunk-BB57OZWC.js.map → chunk-UVPL565C.js.map} +0 -0
  338. /package/dist/{chunk-6AFVIOVZ.js.map → chunk-V4GNSDFH.js.map} +0 -0
  339. /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
  340. /package/dist/{chunk-V7CMKMHM.js.map → chunk-Y4YD5TYW.js.map} +0 -0
  341. /package/dist/{chunk-7NS7AWMZ.js.map → chunk-YGIQORJ3.js.map} +0 -0
  342. /package/dist/{chunk-3MS3QVX6.js.map → chunk-YOLZS7NY.js.map} +0 -0
@@ -269,8 +269,10 @@ import { tryDirectAnswer, type DirectAnswerSources } from "./direct-answer-wirin
269
269
  import {
270
270
  resolveCapabilities,
271
271
  resolveGraphConstructionCapabilities,
272
+ resolveMemoryLifecycleCapabilities,
272
273
  type CapabilitySet,
273
274
  type GraphConstructionCapabilitySet,
275
+ type MemoryLifecycleCapabilitySet,
274
276
  } from "./capabilities.js";
275
277
  import { DEFAULT_TAXONOMY } from "./taxonomy/index.js";
276
278
  import {
@@ -2771,16 +2773,28 @@ export class Orchestrator {
2771
2773
  dedupContent: string,
2772
2774
  bounds: {
2773
2775
  invalidAt?: string;
2776
+ // #1707 thread 2 — per-fact start bound (valid_at). Carried so a
2777
+ // re-extracted duplicate whose event time yields only a start bound
2778
+ // ("since 2024", "yesterday", an absolute date) gets the corrected
2779
+ // per-fact anchoring onto the existing copy.
2780
+ validFrom?: string;
2774
2781
  observedAt?: string;
2775
2782
  eventTimeSource?: "extracted" | "assumed";
2776
2783
  },
2777
2784
  entityRef?: string,
2778
2785
  ): Promise<void> {
2779
- // I/O gate: only scan when there is an end bound to backfill. Without
2780
- // invalidAt there is nothing that changes recall behavior observedAt
2781
- // and eventTimeSource alone do not expire a fact. This avoids a full
2782
- // readAllMemories on every dedup short-circuit under biTemporal.
2783
- if (!bounds.invalidAt) return;
2786
+ // I/O gate: scan when there is a recall-relevant bound to backfill
2787
+ // either an end bound (invalidAt, which expires the fact) or a corrected
2788
+ // EXTRACTED start bound. A start bound only changes recall when it is
2789
+ // extracted (the as-of filter excludes facts whose valid_at is after the
2790
+ // as-of instant); an "assumed" validFrom is just the ingestion anchor
2791
+ // (resolveFactEventTime sets one for every fact), so scanning on it would
2792
+ // run a full readAllMemories on every bi-temporal dedup hit for no benefit
2793
+ // (review cursor PRRT_OvHk / codex PRRT_OvHxVH). observedAt and
2794
+ // eventTimeSource alone never change recall.
2795
+ const hasExtractedStart =
2796
+ bounds.validFrom !== undefined && bounds.eventTimeSource === "extracted";
2797
+ if (!bounds.invalidAt && !hasExtractedStart) return;
2784
2798
  try {
2785
2799
  const incomingHash = ContentHashIndex.computeHash(dedupContent);
2786
2800
  const normalizedIncoming = ContentHashIndex.normalizeContent(dedupContent);
@@ -2839,6 +2853,37 @@ export class Orchestrator {
2839
2853
  ) {
2840
2854
  patch.eventTimeSource = bounds.eventTimeSource;
2841
2855
  }
2856
+ // #1707 thread 2 — per-fact-anchored start bound. A re-extracted
2857
+ // duplicate whose event time resolves a real start bound must carry
2858
+ // that anchor onto the existing copy so as-of recall uses the corrected
2859
+ // valid_at instead of a stale batch-anchored value. Only an EXTRACTED
2860
+ // bound corrects; an "assumed" bound is just the ingestion anchor.
2861
+ //
2862
+ // No-clobber via equality, not provenance inference: exact-content dedup
2863
+ // re-extracts the SAME event-time expression, which #1670 per-fact
2864
+ // anchoring resolves deterministically to the same validFrom — so for
2865
+ // stable content the incoming validFrom EQUALS the copy's valid_at and
2866
+ // we skip the redundant write (the only no-clobber that holds without a
2867
+ // fragile provenance heuristic — review codex PRRT_Ov7LKC). When they
2868
+ // differ (a prior batch/assumed anchor, end-only assumed start, or a
2869
+ // non-deterministic re-resolution), the extracted validFrom is the
2870
+ // authoritative correction and overwrites. The eventTimeSource upgrade
2871
+ // below records that the start is now extracted-anchored.
2872
+ if (
2873
+ bounds.validFrom &&
2874
+ bounds.eventTimeSource === "extracted" &&
2875
+ fm.valid_at !== bounds.validFrom
2876
+ ) {
2877
+ patch.valid_at = bounds.validFrom;
2878
+ // Mark the copy extracted-anchored in the SAME patch so its provenance
2879
+ // reflects the correction (review cursor PRRT_OvHM / codex PRRT_OvHxVD):
2880
+ // without this, a copy upgraded from "assumed" would keep "assumed"
2881
+ // provenance while carrying an extracted start. (The earlier
2882
+ // eventTimeSource block only fills an EMPTY source.)
2883
+ if (fm.eventTimeSource !== "extracted") {
2884
+ patch.eventTimeSource = "extracted";
2885
+ }
2886
+ }
2842
2887
  if (Object.keys(patch).length === 0) return;
2843
2888
  const ok = await targetStorage.writeMemoryFrontmatter(existing, patch);
2844
2889
  if (ok) {
@@ -3051,9 +3096,10 @@ export class Orchestrator {
3051
3096
  );
3052
3097
  // BoxBuilders are created per-namespace on first use in runExtraction().
3053
3098
 
3099
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);
3054
3100
  // Temporal Memory Tree (v8.2) — lazy build during consolidation
3055
3101
  this.tmtBuilder = new TmtBuilder(config.memoryDir, {
3056
- temporalMemoryTreeEnabled: config.temporalMemoryTreeEnabled,
3102
+ temporalMemoryTreeEnabled: lifecycleCaps.temporalMemoryTree,
3057
3103
  tmtHourlyMinMemories: config.tmtHourlyMinMemories,
3058
3104
  tmtSummaryMaxTokens: config.tmtSummaryMaxTokens,
3059
3105
  });
@@ -3611,6 +3657,7 @@ export class Orchestrator {
3611
3657
  }
3612
3658
 
3613
3659
  private async deferredInitialize(signal: AbortSignal): Promise<void> {
3660
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
3614
3661
 
3615
3662
  // Sync QMD index with current disk state so recall finds recently-written
3616
3663
  // facts. Without this, the index stays stale from the last extraction-
@@ -3664,7 +3711,7 @@ export class Orchestrator {
3664
3711
  }),
3665
3712
  );
3666
3713
  }
3667
- if (this.config.embeddingFallbackEnabled) {
3714
+ if (resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) {
3668
3715
  warmupPromises.push(
3669
3716
  this.embeddingFallback
3670
3717
  .isAvailable()
@@ -3749,7 +3796,7 @@ export class Orchestrator {
3749
3796
  // sweep (capped at 50 demotions) so the hot tier isn't flooded on the
3750
3797
  // first real cron pass. Non-fatal — a failure here must not break init.
3751
3798
  if (signal.aborted) return;
3752
- if (this.config.lifecyclePolicyEnabled && this.config.qmdTierMigrationEnabled) {
3799
+ if (lifecycleCaps.lifecyclePolicy && this.config.qmdTierMigrationEnabled) {
3753
3800
  try {
3754
3801
  const { runFirstStartMigration } = await import(
3755
3802
  "./maintenance/first-start-migration.js"
@@ -4074,6 +4121,7 @@ export class Orchestrator {
4074
4121
  * default storage.
4075
4122
  */
4076
4123
  async runLifecyclePolicyFanout(): Promise<NamespaceMaintenanceSummary> {
4124
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
4077
4125
  return this.runNamespaceMaintenanceFanoutForJob(
4078
4126
  "lifecycle",
4079
4127
  async (ctx) => {
@@ -4082,7 +4130,7 @@ export class Orchestrator {
4082
4130
  const assessed = await this.runLifecyclePolicyPass(corpus, storage);
4083
4131
  return { itemCount: assessed };
4084
4132
  },
4085
- { enabled: this.config.lifecyclePolicyEnabled },
4133
+ { enabled: lifecycleCaps.lifecyclePolicy },
4086
4134
  );
4087
4135
  }
4088
4136
 
@@ -7395,6 +7443,7 @@ export class Orchestrator {
7395
7443
  options: RecallInvocationOptions = {},
7396
7444
  caps: CapabilitySet = resolveCapabilities(this.config),
7397
7445
  graphCaps: GraphConstructionCapabilitySet = resolveGraphConstructionCapabilities(this.config),
7446
+ lifecycleCaps: MemoryLifecycleCapabilitySet = resolveMemoryLifecycleCapabilities(this.config),
7398
7447
  ): Promise<string> {
7399
7448
  const recallStart = Date.now();
7400
7449
  // Backend degradations observed by this recall's QMD searches (#1536):
@@ -10802,9 +10851,9 @@ export class Orchestrator {
10802
10851
  if (
10803
10852
  this.isRecallSectionEnabled(
10804
10853
  "temporal-memory-tree",
10805
- this.config.temporalMemoryTreeEnabled === true,
10854
+ lifecycleCaps.temporalMemoryTree,
10806
10855
  ) &&
10807
- this.config.temporalMemoryTreeEnabled &&
10856
+ lifecycleCaps.temporalMemoryTree &&
10808
10857
  recallMode !== "minimal" &&
10809
10858
  (recallMode as RecallPlanMode) !== "no_recall"
10810
10859
  ) {
@@ -11664,7 +11713,7 @@ export class Orchestrator {
11664
11713
  // Using the shared gate fixes both Finding 2 and Finding 3 from
11665
11714
  // PR #402 (round 6).
11666
11715
  const supersessionOptions = {
11667
- enabled: this.config.temporalSupersessionEnabled,
11716
+ enabled: lifecycleCaps.temporalSupersession,
11668
11717
  includeInRecall: this.config.temporalSupersessionIncludeInRecall,
11669
11718
  };
11670
11719
  // Cursor Medium on PR #713: when `as_of` is active, the
@@ -13188,7 +13237,8 @@ export class Orchestrator {
13188
13237
  turns: BufferTurn[],
13189
13238
  options: { commit?: boolean; bufferKey?: string } = {},
13190
13239
  ): boolean {
13191
- if (!this.config.extractionDedupeEnabled) return true;
13240
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
13241
+ if (!lifecycleCaps.extractionDedupe) return true;
13192
13242
  if (!Array.isArray(turns) || turns.length === 0) return false;
13193
13243
 
13194
13244
  const bufferKey = options.bufferKey ?? turns[0]?.sessionKey ?? "default";
@@ -14047,6 +14097,7 @@ export class Orchestrator {
14047
14097
  /** Verbatim source turn text the facts were extracted from (faithfulness gate #1576). */
14048
14098
  sourceText?: string,
14049
14099
  graphCaps: GraphConstructionCapabilitySet = resolveGraphConstructionCapabilities(this.config),
14100
+ lifecycleCaps: MemoryLifecycleCapabilitySet = resolveMemoryLifecycleCapabilities(this.config),
14050
14101
  ): Promise<string[]> {
14051
14102
  // Inline source attribution (issue #369). When enabled, every extracted
14052
14103
  // fact is rewritten to carry a compact provenance tag inside its body so
@@ -14302,12 +14353,14 @@ export class Orchestrator {
14302
14353
  // lacks (re-extraction with a now-resolved invalidAt). Best-effort,
14303
14354
  // fail-open; the helper gates on invalidAt to avoid I/O when no
14304
14355
  // end bound is present.
14305
- if (options.invalidAt) {
14356
+ if (options.invalidAt || options.validAt) {
14306
14357
  await this.backfillTemporalBoundsOnDedupHit(
14307
14358
  targetStorage,
14308
14359
  dedupContent,
14309
14360
  {
14310
14361
  invalidAt: options.invalidAt,
14362
+ // #1707 thread 2 — carry the corrected start bound.
14363
+ validFrom: options.validAt,
14311
14364
  ...(options.observedAt ? { observedAt: options.observedAt } : {}),
14312
14365
  ...(options.eventTimeSource ? { eventTimeSource: options.eventTimeSource } : {}),
14313
14366
  },
@@ -14343,7 +14396,7 @@ export class Orchestrator {
14343
14396
  },
14344
14397
  );
14345
14398
  if (
14346
- this.config.temporalSupersessionEnabled &&
14399
+ lifecycleCaps.temporalSupersession &&
14347
14400
  options.category === "fact" &&
14348
14401
  options.entityRef &&
14349
14402
  options.structuredAttributes &&
@@ -14481,12 +14534,14 @@ export class Orchestrator {
14481
14534
  // before the supersession short-circuit. Covers all return paths below
14482
14535
  // (supersession-hit, catch-skip, and the no-supersession short-circuit)
14483
14536
  // in one shot. Best-effort / fail-open; the helper gates on invalidAt.
14484
- if (options.invalidAt) {
14537
+ if (options.invalidAt || options.validAt) {
14485
14538
  await this.backfillTemporalBoundsOnDedupHit(
14486
14539
  sharedStorage,
14487
14540
  dedupContent,
14488
14541
  {
14489
14542
  invalidAt: options.invalidAt,
14543
+ // #1707 thread 2 — carry the corrected start bound.
14544
+ validFrom: options.validAt,
14490
14545
  ...(options.observedAt ? { observedAt: options.observedAt } : {}),
14491
14546
  ...(options.eventTimeSource ? { eventTimeSource: options.eventTimeSource } : {}),
14492
14547
  },
@@ -14505,7 +14560,7 @@ export class Orchestrator {
14505
14560
  // would have run post-writeMemory. This is a best-effort / fail-open
14506
14561
  // step — if the lookup fails we skip silently (same as the normal path).
14507
14562
  if (
14508
- this.config.temporalSupersessionEnabled &&
14563
+ lifecycleCaps.temporalSupersession &&
14509
14564
  options.entityRef &&
14510
14565
  options.structuredAttributes &&
14511
14566
  Object.keys(options.structuredAttributes).length > 0
@@ -14667,7 +14722,7 @@ export class Orchestrator {
14667
14722
  // shared recall continues returning the stale state. Reuses the same
14668
14723
  // applyTemporalSupersession helper — no logic duplication.
14669
14724
  if (
14670
- this.config.temporalSupersessionEnabled &&
14725
+ lifecycleCaps.temporalSupersession &&
14671
14726
  options.entityRef &&
14672
14727
  options.structuredAttributes &&
14673
14728
  Object.keys(options.structuredAttributes).length > 0
@@ -14717,6 +14772,116 @@ export class Orchestrator {
14717
14772
  );
14718
14773
  }
14719
14774
  };
14775
+ // #1707 thread 1 — backfill temporal bounds onto promotion copies when the
14776
+ // SOURCE-namespace dedup short-circuit fires. That branch patches the
14777
+ // source copy then `continue`s before the promotion dedup paths run, so
14778
+ // promoted shared/profile copies written before the source fact carried
14779
+ // resolved bounds stay stale (cross-namespace recall surfaces an expired
14780
+ // fact). This mirrors the promotion-target resolution used by the two
14781
+ // promote closures above and calls the same fail-open helper against each
14782
+ // target storage. Backfill-only: never writes a new promoted copy.
14783
+ const backfillTemporalBoundsOnPromotionCopies = async (args: {
14784
+ sourceStorage: StorageManager;
14785
+ content: string;
14786
+ category: string;
14787
+ confidence: number;
14788
+ entityRef?: string;
14789
+ structuredAttributes?: Record<string, string>;
14790
+ bounds: {
14791
+ invalidAt?: string;
14792
+ validFrom?: string;
14793
+ observedAt?: string;
14794
+ eventTimeSource?: "extracted" | "assumed";
14795
+ };
14796
+ }): Promise<void> => {
14797
+ // Mirror the helper's I/O gate: only resolve promotion targets when
14798
+ // there is an end bound OR an EXTRACTED start bound. An "assumed"
14799
+ // validFrom is just the ingestion anchor (no recall effect), so
14800
+ // skipping it avoids resolving target storages on every bi-temporal
14801
+ // duplicate (review cursor PRRT_OvHk).
14802
+ const hasExtractedStart =
14803
+ args.bounds.validFrom !== undefined &&
14804
+ args.bounds.eventTimeSource === "extracted";
14805
+ if (!args.bounds.invalidAt && !hasExtractedStart) return;
14806
+ // Build the same dedupContent the promotion functions hash on so the
14807
+ // content-hash lookup in the helper matches what was stored.
14808
+ const rawContent =
14809
+ citationEnabled && hasCitationForTemplate(args.content, citationTemplate)
14810
+ ? stripCitationForTemplate(args.content, citationTemplate)
14811
+ : args.content;
14812
+ const sanitizedBase = sanitizeMemoryContent(rawContent);
14813
+ const dedupContent =
14814
+ args.category === "fact" &&
14815
+ args.structuredAttributes &&
14816
+ Object.keys(args.structuredAttributes).length > 0
14817
+ ? `${sanitizedBase.text}\n[Attributes: ${normalizeAttributePairs(args.structuredAttributes)}]`
14818
+ : sanitizedBase.text;
14819
+ // Profile targets. NOTE: we do NOT gate on profileAutoPromotionAllows —
14820
+ // a promoted profile copy may exist from an EARLIER extraction with
14821
+ // higher confidence or older auto-promote settings, so the current
14822
+ // duplicate's confidence must not skip backfilling an already-existing
14823
+ // promoted copy (review codex PRRT_Ov7LKF). The helper no-ops when no
14824
+ // matching copy is found, so resolving all configured auto-promote
14825
+ // targets is safe.
14826
+ if (scopeProfileWritePlan) {
14827
+ const autoTargets = new Set(
14828
+ scopeProfileWritePlan.profile.autoPromote.targets,
14829
+ );
14830
+ const profileTargets = scopeProfileWritePlan.promotionTargets.filter(
14831
+ (target) =>
14832
+ target.target !== "serverShared" &&
14833
+ autoTargets.has(target.target) &&
14834
+ target.authorized &&
14835
+ target.namespace,
14836
+ );
14837
+ for (const target of profileTargets) {
14838
+ if (!target.namespace) continue;
14839
+ try {
14840
+ const targetStorage = await this.storageRouter.storageFor(
14841
+ target.namespace,
14842
+ );
14843
+ if (targetStorage.dir === args.sourceStorage.dir) continue;
14844
+ await this.backfillTemporalBoundsOnDedupHit(
14845
+ targetStorage,
14846
+ dedupContent,
14847
+ args.bounds,
14848
+ args.entityRef,
14849
+ );
14850
+ } catch (err) {
14851
+ log.warn(
14852
+ `bitemporal-backfill: profile-target backfill failed open for ${target.target}: ${err}`,
14853
+ );
14854
+ }
14855
+ }
14856
+ }
14857
+ // Shared target. A shared copy may exist from an earlier extraction
14858
+ // regardless of the current confidence, so do not gate on
14859
+ // shouldPromoteToShared (review codex PRRT_Ov7LKF) — BUT still respect
14860
+ // shared-write AUTHORIZATION: a scoped profile that does not authorize
14861
+ // serverShared writes must not have its shared namespace backfilled
14862
+ // (review codex PRRT_Ov7dHR). profileAllowsSharedWrites is true for the
14863
+ // legacy no-scope case and encodes the readable/writable/authorized
14864
+ // checks under a scope profile.
14865
+ if (profileAllowsSharedWrites) {
14866
+ try {
14867
+ const sharedStorage = await this.storageRouter.storageFor(
14868
+ this.config.sharedNamespace,
14869
+ );
14870
+ if (sharedStorage.dir !== args.sourceStorage.dir) {
14871
+ await this.backfillTemporalBoundsOnDedupHit(
14872
+ sharedStorage,
14873
+ dedupContent,
14874
+ args.bounds,
14875
+ args.entityRef,
14876
+ );
14877
+ }
14878
+ } catch (err) {
14879
+ log.warn(
14880
+ `bitemporal-backfill: shared-target backfill failed open: ${err}`,
14881
+ );
14882
+ }
14883
+ }
14884
+ };
14720
14885
 
14721
14886
  // Defensive: validate result and facts array
14722
14887
  if (!result || !Array.isArray(result.facts)) {
@@ -14867,7 +15032,7 @@ export class Orchestrator {
14867
15032
  // persistExtraction call so stale state from a prior call cannot leak
14868
15033
  // into the caller's buffer-retention decision.
14869
15034
  this.lastPersistExtractionDeferredCount = 0;
14870
- if (this.config.extractionJudgeEnabled) {
15035
+ if (lifecycleCaps.extractionJudge) {
14871
15036
  // #1669 P1: pre-filter redacted facts from judge candidates so never-store
14872
15037
  // content is not persisted as judge training data.
14873
15038
  let preJudgeRedactionRules: CompiledRedactionRule[] = [];
@@ -14933,7 +15098,7 @@ export class Orchestrator {
14933
15098
  // off; the combined callback itself is undefined when both are
14934
15099
  // disabled so there is zero overhead in the default configuration.
14935
15100
  const judgeTelemetryOpts = {
14936
- enabled: this.config.extractionJudgeTelemetryEnabled === true,
15101
+ enabled: lifecycleCaps.extractionJudgeTelemetry,
14937
15102
  memoryDir: this.config.memoryDir,
14938
15103
  };
14939
15104
  const judgeTrainingOpts = {
@@ -15144,7 +15309,7 @@ export class Orchestrator {
15144
15309
  // do not block scope routing). Rule 30: gated by
15145
15310
  // extractionScopeClassificationEnabled.
15146
15311
  if (
15147
- this.config.extractionScopeClassificationEnabled &&
15312
+ lifecycleCaps.extractionScopeClassification &&
15148
15313
  this.config.namespacesEnabled &&
15149
15314
  fact.scope === "global" &&
15150
15315
  !routedNamespaceExplicit
@@ -15226,7 +15391,20 @@ export class Orchestrator {
15226
15391
  // Skip when the fact would be rejected/deferred/pending by downstream
15227
15392
  // gates — a non-durable candidate must not expire an active fact
15228
15393
  // (chatgpt-codex P1: faithfulness, requireSpans, extraction judge).
15229
- if (biTemporal && biTemporal.validUntil) {
15394
+ // #1671 + #1707: backfill bi-temporal bounds onto the existing
15395
+ // source-namespace copy if it lacks bounds the incoming fact now
15396
+ // carries (re-extraction with a resolved bound). #1707 thread 3:
15397
+ // gate on writeCategory === "fact" — the helper only matches facts,
15398
+ // so a non-fact duplicate must not reach the fact-only scan.
15399
+ // #1707 thread 2: also fire when only a corrected start bound
15400
+ // (validFrom) is present, not just an end bound (validUntil). The
15401
+ // downstream-gate skip still applies — a non-durable candidate must
15402
+ // not expire an active fact (chatgpt-codex P1).
15403
+ if (
15404
+ biTemporal &&
15405
+ writeCategory === "fact" &&
15406
+ (biTemporal.validUntil || biTemporal.validFrom)
15407
+ ) {
15230
15408
  const fr = faithfulnessResultsByFactIndex?.get(factLoopIndex);
15231
15409
  const faithfulnessWouldPending =
15232
15410
  faithfulnessMode === "enforce" &&
@@ -15254,11 +15432,33 @@ export class Orchestrator {
15254
15432
  contentHashDedupKey,
15255
15433
  {
15256
15434
  invalidAt: biTemporal.validUntil,
15435
+ // #1707 thread 2 — carry the corrected start bound too.
15436
+ validFrom: biTemporal.validFrom,
15257
15437
  observedAt: biTemporal.observedAt,
15258
15438
  eventTimeSource: biTemporal.eventTimeSource,
15259
15439
  },
15260
15440
  fact.entityRef,
15261
15441
  );
15442
+ // #1707 thread 1 — the source branch short-circuits (`continue`
15443
+ // below) before the promotion dedup paths run, so promoted
15444
+ // shared/profile copies written before the source fact carried
15445
+ // resolved bounds stay stale and cross-namespace recall surfaces
15446
+ // an expired fact. Backfill the promotion targets too (fail-open,
15447
+ // backfill-only — never writes a new promoted copy).
15448
+ await backfillTemporalBoundsOnPromotionCopies({
15449
+ sourceStorage: targetStorage,
15450
+ content: fact.content,
15451
+ category: writeCategory,
15452
+ confidence: fact.confidence,
15453
+ entityRef: fact.entityRef,
15454
+ structuredAttributes: fact.structuredAttributes,
15455
+ bounds: {
15456
+ invalidAt: biTemporal.validUntil,
15457
+ validFrom: biTemporal.validFrom,
15458
+ observedAt: biTemporal.observedAt,
15459
+ eventTimeSource: biTemporal.eventTimeSource,
15460
+ },
15461
+ });
15262
15462
  }
15263
15463
  }
15264
15464
  log.debug(
@@ -15762,7 +15962,7 @@ export class Orchestrator {
15762
15962
  // #1578 r3: an extracted end-only bound (validFrom absent) is
15763
15963
  // historical, not a new authoritative state — never let it
15764
15964
  // supersede a later active fact (codex P1 on :15534).
15765
- enabled: this.config.temporalSupersessionEnabled &&
15965
+ enabled: lifecycleCaps.temporalSupersession &&
15766
15966
  !(biTemporal && !biTemporal.validFrom),
15767
15967
  });
15768
15968
  } catch (err) {
@@ -15998,7 +16198,7 @@ export class Orchestrator {
15998
16198
  entityRef: supersessionEntityRef,
15999
16199
  structuredAttributes: fact.structuredAttributes,
16000
16200
  createdAt: supersessionOrderingAt(biTemporal?.validFrom ?? sourceContext?.validAt),
16001
- enabled: this.config.temporalSupersessionEnabled &&
16201
+ enabled: lifecycleCaps.temporalSupersession &&
16002
16202
  !(biTemporal && !biTemporal.validFrom),
16003
16203
  });
16004
16204
  } catch (err) {
@@ -16365,7 +16565,7 @@ export class Orchestrator {
16365
16565
  storage: StorageManager,
16366
16566
  memoryId: string,
16367
16567
  ): Promise<void> {
16368
- if (!this.config.embeddingFallbackEnabled) return;
16568
+ if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) return;
16369
16569
  if (!(await this.embeddingFallback.isAvailable())) return;
16370
16570
  const memory = await storage.getMemoryById(memoryId);
16371
16571
  if (!memory) return;
@@ -16557,6 +16757,7 @@ export class Orchestrator {
16557
16757
  merged: number;
16558
16758
  invalidated: number;
16559
16759
  }> {
16760
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
16560
16761
  log.info("running consolidation pass");
16561
16762
  let merged = 0;
16562
16763
  let invalidated = 0;
@@ -16793,7 +16994,7 @@ export class Orchestrator {
16793
16994
  }
16794
16995
 
16795
16996
  // v8.3 Lifecycle policy pass — deterministic promotion/decay metadata
16796
- if (this.config.lifecyclePolicyEnabled) {
16997
+ if (lifecycleCaps.lifecyclePolicy) {
16797
16998
  try {
16798
16999
  const lightSleepStartedAt = new Date().toISOString();
16799
17000
  const lifecycleCorpus = await this.storage.readAllMemories();
@@ -16981,7 +17182,7 @@ export class Orchestrator {
16981
17182
  await this.storage.saveMeta(meta);
16982
17183
 
16983
17184
  // Temporal Memory Tree (v8.2) — rebuild nodes from all memories, fail-open
16984
- if (this.config.temporalMemoryTreeEnabled) {
17185
+ if (lifecycleCaps.temporalMemoryTree) {
16985
17186
  try {
16986
17187
  const tmtEntries = allMemories
16987
17188
  .filter(
@@ -17523,6 +17724,7 @@ export class Orchestrator {
17523
17724
  let updatedCount = 0;
17524
17725
  let disputedCount = 0;
17525
17726
  let evaluatedCount = 0;
17727
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
17526
17728
 
17527
17729
  const thresholds = this.effectiveLifecycleThresholds();
17528
17730
  const policy = {
@@ -17588,7 +17790,7 @@ export class Orchestrator {
17588
17790
 
17589
17791
  // Report how many memories had frontmatter rewritten so callers can record a
17590
17792
  // catalog write touch for lifecycle-only passes (codex NR-tS).
17591
- if (!this.config.lifecycleMetricsEnabled) return updatedCount;
17793
+ if (!lifecycleCaps.lifecycleMetrics) return updatedCount;
17592
17794
 
17593
17795
  const total = evaluatedCount;
17594
17796
  const metrics = {
@@ -19034,7 +19236,7 @@ export class Orchestrator {
19034
19236
  // • search() throws → re-throw (network/provider error).
19035
19237
  // • search() returns [] → return [] (empty index, not a
19036
19238
  // backend failure; decideSemanticDedup reports no_candidates).
19037
- if (!this.config.embeddingFallbackEnabled) {
19239
+ if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) {
19038
19240
  throw new Error("semantic dedup: embedding backend not configured");
19039
19241
  }
19040
19242
  if (!(await this.embeddingFallback.isAvailable())) {
@@ -19108,7 +19310,7 @@ export class Orchestrator {
19108
19310
  query: string,
19109
19311
  limit: number,
19110
19312
  ): Promise<QmdSearchResult[]> {
19111
- if (!this.config.embeddingFallbackEnabled) return [];
19313
+ if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) return [];
19112
19314
  if (!(await this.embeddingFallback.isAvailable())) return [];
19113
19315
  const hits = await this.embeddingFallback.search(query, limit);
19114
19316
  if (hits.length === 0) return [];
@@ -19818,6 +20020,7 @@ export class Orchestrator {
19818
20020
  blockedPaths?: Set<string>;
19819
20021
  },
19820
20022
  ): QmdSearchResult[] {
20023
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
19821
20024
  let lifecycleFilteredCount = 0;
19822
20025
  let temporalSupersededFilteredCount = 0;
19823
20026
  let biTemporalExpiredFilteredCount = 0;
@@ -19851,9 +20054,9 @@ export class Orchestrator {
19851
20054
  if (
19852
20055
  options?.allowLifecycleFiltered !== true &&
19853
20056
  shouldFilterLifecycleRecallCandidate(memory.frontmatter, {
19854
- lifecyclePolicyEnabled: this.config.lifecyclePolicyEnabled,
20057
+ lifecyclePolicyEnabled: lifecycleCaps.lifecyclePolicy,
19855
20058
  lifecycleFilterStaleEnabled:
19856
- this.config.lifecycleFilterStaleEnabled,
20059
+ lifecycleCaps.lifecycleFilterStale,
19857
20060
  })
19858
20061
  ) {
19859
20062
  lifecycleFilteredCount += 1;
@@ -19887,7 +20090,7 @@ export class Orchestrator {
19887
20090
  // half-open `[valid_at, invalid_at)` evaluation in isValidAsOf
19888
20091
  // is the authoritative gate for historical recall.
19889
20092
  shouldFilterSupersededFromRecall(memory.frontmatter, {
19890
- enabled: this.config.temporalSupersessionEnabled,
20093
+ enabled: lifecycleCaps.temporalSupersession,
19891
20094
  includeInRecall: this.config.temporalSupersessionIncludeInRecall,
19892
20095
  })
19893
20096
  ) {
@@ -20031,6 +20234,7 @@ export class Orchestrator {
20031
20234
  asOfMs?: number;
20032
20235
  },
20033
20236
  ): Promise<QmdSearchResult[]> {
20237
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
20034
20238
  if (results.length === 0) return results;
20035
20239
 
20036
20240
  const safety = await this.filterSearchResultsForRecall(
@@ -20205,7 +20409,7 @@ export class Orchestrator {
20205
20409
  const lifecycleDelta = lifecycleRecallScoreAdjustment(
20206
20410
  memory.frontmatter,
20207
20411
  {
20208
- lifecyclePolicyEnabled: this.config.lifecyclePolicyEnabled,
20412
+ lifecyclePolicyEnabled: lifecycleCaps.lifecyclePolicy,
20209
20413
  },
20210
20414
  );
20211
20415
  score += applyUtilityRankingRuntimeDelta(