@remnic/core 9.3.704 → 9.3.706

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 (332) hide show
  1. package/dist/access-boundary.d.ts +6 -6
  2. package/dist/access-boundary.js +29 -29
  3. package/dist/access-cli.js +59 -57
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +5 -5
  6. package/dist/access-http.js +34 -33
  7. package/dist/access-mcp.d.ts +5 -5
  8. package/dist/access-mcp.js +33 -32
  9. package/dist/access-operations-batch.d.ts +2 -0
  10. package/dist/access-operations-batch.js +120 -0
  11. package/dist/access-operations.d.ts +6 -5
  12. package/dist/access-operations.js +32 -31
  13. package/dist/access-schema.js +3 -3
  14. package/dist/{access-service-C8hc8N2i.d.ts → access-service-j1c1gptF.d.ts} +3 -3
  15. package/dist/access-service.d.ts +5 -5
  16. package/dist/access-service.js +28 -28
  17. package/dist/access-surface-catalog.d.ts +5 -5
  18. package/dist/access-surface-catalog.js +57 -54
  19. package/dist/access-surface-catalog.js.map +1 -1
  20. package/dist/action-confidence.d.ts +1 -1
  21. package/dist/active-memory-bridge.d.ts +1 -1
  22. package/dist/active-recall.d.ts +1 -1
  23. package/dist/{auto-sync-3AAP25FV.js → auto-sync-24NNS3GU.js} +3 -3
  24. package/dist/behavior-learner.d.ts +1 -1
  25. package/dist/behavior-signals.d.ts +1 -1
  26. package/dist/bootstrap.d.ts +4 -4
  27. package/dist/briefing.d.ts +1 -1
  28. package/dist/briefing.js +7 -7
  29. package/dist/buffer-surprise-report.d.ts +1 -1
  30. package/dist/buffer.d.ts +1 -1
  31. package/dist/calibration.d.ts +1 -1
  32. package/dist/capabilities.d.ts +1 -1
  33. package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
  34. package/dist/capsule-crypto-7FJQINUR.js.map +1 -0
  35. package/dist/{catalog-CAeU0e1C.d.ts → catalog-CKxilpzS.d.ts} +1 -1
  36. package/dist/causal-behavior.d.ts +1 -1
  37. package/dist/causal-behavior.js +5 -5
  38. package/dist/causal-chain.js +3 -3
  39. package/dist/causal-consolidation.d.ts +1 -1
  40. package/dist/causal-consolidation.js +11 -11
  41. package/dist/causal-retrieval.js +3 -3
  42. package/dist/causal-trajectory-graph.js +2 -2
  43. package/dist/causal-trajectory.js +1 -1
  44. package/dist/{chunk-CTY6QSLZ.js → chunk-24FGNOQS.js} +4 -4
  45. package/dist/{chunk-CTY6QSLZ.js.map → chunk-24FGNOQS.js.map} +1 -1
  46. package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
  47. package/dist/{chunk-NMW3T6T6.js → chunk-2VQYHHWB.js} +17 -11
  48. package/dist/chunk-2VQYHHWB.js.map +1 -0
  49. package/dist/{chunk-7G4KPGR3.js → chunk-3PTOZJOI.js} +2 -2
  50. package/dist/{chunk-PJ5MDXOF.js → chunk-4DZATVK5.js} +10 -10
  51. package/dist/{chunk-UOIRJ45Z.js → chunk-4E2QCH46.js} +2 -2
  52. package/dist/{chunk-KKK7YTYN.js → chunk-5GSUBCZM.js} +6 -2
  53. package/dist/chunk-5GSUBCZM.js.map +1 -0
  54. package/dist/{chunk-RYDT7LAI.js → chunk-66TSLESZ.js} +2 -2
  55. package/dist/chunk-66TSLESZ.js.map +1 -0
  56. package/dist/{chunk-IREVVFTM.js → chunk-6CIAGZ6X.js} +9 -1
  57. package/dist/chunk-6CIAGZ6X.js.map +1 -0
  58. package/dist/{chunk-QHNJVWF6.js → chunk-6HPJMR5I.js} +6 -6
  59. package/dist/{chunk-4NFVPDIL.js → chunk-74MYJSKB.js} +5 -5
  60. package/dist/{chunk-PKMQK2WY.js → chunk-773DPI6T.js} +4 -4
  61. package/dist/{chunk-AGNBY3VG.js → chunk-APJQ6UEA.js} +4 -4
  62. package/dist/{chunk-UNNDFYUX.js → chunk-ARV3AUOM.js} +5 -5
  63. package/dist/{chunk-XXDOJ5NL.js → chunk-BGAHTI4C.js} +7 -7
  64. package/dist/{chunk-6GHWF4QH.js → chunk-C63MK3WL.js} +2 -2
  65. package/dist/{chunk-VKJHM6PL.js → chunk-DGTDRIUO.js} +5 -5
  66. package/dist/{chunk-25FHSOEB.js → chunk-EJDAXR7O.js} +60 -6
  67. package/dist/chunk-EJDAXR7O.js.map +1 -0
  68. package/dist/{chunk-K7QRDDSR.js → chunk-ESMY4RJ4.js} +5 -5
  69. package/dist/{chunk-YLB7NMLD.js → chunk-GKI6LX5L.js} +2 -2
  70. package/dist/{chunk-TUPNAHHQ.js → chunk-HIV5E57C.js} +2 -2
  71. package/dist/{chunk-YOI3ELXF.js → chunk-IF362TF6.js} +2 -2
  72. package/dist/{chunk-SFOAQQDJ.js → chunk-IONFO7UK.js} +3 -3
  73. package/dist/{chunk-AE3C4PY6.js → chunk-IVCQW4C4.js} +2 -2
  74. package/dist/{chunk-6AFVIOVZ.js → chunk-K22IJO4R.js} +2 -2
  75. package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
  76. package/dist/chunk-M7R5R6OJ.js +355 -0
  77. package/dist/chunk-M7R5R6OJ.js.map +1 -0
  78. package/dist/{chunk-IX3UQT4H.js → chunk-MLLTU5FX.js} +1 -1
  79. package/dist/chunk-MLLTU5FX.js.map +1 -0
  80. package/dist/{chunk-ORXVO6TH.js → chunk-MRX6ZXHZ.js} +6 -6
  81. package/dist/chunk-N75N5SNX.js +1303 -0
  82. package/dist/chunk-N75N5SNX.js.map +1 -0
  83. package/dist/{chunk-S24J5LLQ.js → chunk-NM6TSEGQ.js} +3 -3
  84. package/dist/{chunk-QDIVMS25.js → chunk-NUWZFSKC.js} +2 -2
  85. package/dist/{chunk-53EEQYE5.js → chunk-OMSTU233.js} +4 -4
  86. package/dist/{chunk-R64MNFPV.js → chunk-PDJQVAGM.js} +114 -77
  87. package/dist/chunk-PDJQVAGM.js.map +1 -0
  88. package/dist/{chunk-WAHI7SPK.js → chunk-RH2OSRQY.js} +2 -2
  89. package/dist/{chunk-YTMDF6S7.js → chunk-SPETAWFE.js} +2 -2
  90. package/dist/{chunk-ZXFNSKPY.js → chunk-STYMKPFT.js} +34 -34
  91. package/dist/{chunk-OMNTQPZO.js → chunk-TKZ3AL5V.js} +2 -2
  92. package/dist/{chunk-ABCGDW3A.js → chunk-VYZNWH4J.js} +40 -9
  93. package/dist/chunk-VYZNWH4J.js.map +1 -0
  94. package/dist/{chunk-QV5WFNZ2.js → chunk-W2S3Z5MT.js} +2 -2
  95. package/dist/{chunk-OCFNG4LB.js → chunk-W2WQ4LE7.js} +2 -2
  96. package/dist/{chunk-DE2OPIQD.js → chunk-WDH3KUZU.js} +6 -6
  97. package/dist/{chunk-3EHCV6YV.js → chunk-WQADZ3ZY.js} +67 -67
  98. package/dist/{chunk-OOEVMJK4.js → chunk-WSWYIKXX.js} +6 -6
  99. package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
  100. package/dist/{chunk-WN4GHSDH.js → chunk-XKMDDM7P.js} +2 -2
  101. package/dist/{chunk-6Q7JFY4P.js → chunk-Y6YHAGQP.js} +2 -2
  102. package/dist/{chunk-KF74X62T.js → chunk-YGKUAX2B.js} +4 -4
  103. package/dist/{chunk-YN4ZT4CW.js → chunk-YI7RZO7Y.js} +1 -1
  104. package/dist/{cli-ChE0XlJY.d.ts → cli-CbT-pyM4.d.ts} +3 -3
  105. package/dist/cli.d.ts +6 -6
  106. package/dist/cli.js +58 -57
  107. package/dist/compounding/engine.d.ts +1 -1
  108. package/dist/compounding/engine.js +7 -7
  109. package/dist/compounding/preference-consolidator.d.ts +1 -1
  110. package/dist/compression-optimizer.d.ts +1 -1
  111. package/dist/config.d.ts +1 -1
  112. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  113. package/dist/connectors/codex-materialize-runner.js +7 -7
  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 +7 -7
  117. package/dist/consolidation-provenance-check.d.ts +1 -1
  118. package/dist/consolidation-undo.d.ts +1 -1
  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 +7 -7
  133. package/dist/entity-schema.d.ts +1 -1
  134. package/dist/event-time.d.ts +35 -1
  135. package/dist/event-time.js +6 -320
  136. package/dist/event-time.js.map +1 -1
  137. package/dist/explicit-capture.d.ts +4 -4
  138. package/dist/extraction-faithfulness.d.ts +1 -1
  139. package/dist/extraction-judge-telemetry.d.ts +1 -1
  140. package/dist/extraction-judge-training.d.ts +1 -1
  141. package/dist/extraction-judge.d.ts +1 -1
  142. package/dist/extraction.d.ts +10 -1
  143. package/dist/extraction.js +3 -3
  144. package/dist/fallback-llm.d.ts +1 -1
  145. package/dist/{forget-6SOIPUMQ.js → forget-U66KPDPY.js} +3 -3
  146. package/dist/{graph-edge-decay-D7OESCBR.js → graph-edge-decay-JLOF3YW4.js} +3 -3
  147. package/dist/graph-snapshot.js +3 -3
  148. package/dist/graph.js +2 -2
  149. package/dist/identity-continuity.d.ts +1 -1
  150. package/dist/importance.d.ts +1 -1
  151. package/dist/index.d.ts +9 -9
  152. package/dist/index.js +103 -101
  153. package/dist/index.js.map +1 -1
  154. package/dist/intent.d.ts +1 -1
  155. package/dist/lcm/engine.d.ts +1 -1
  156. package/dist/lcm/engine.js +2 -2
  157. package/dist/lcm/index.d.ts +1 -1
  158. package/dist/lcm/index.js +4 -4
  159. package/dist/lcm/tools.d.ts +1 -1
  160. package/dist/lifecycle.d.ts +1 -1
  161. package/dist/live-connectors-runner.d.ts +1 -1
  162. package/dist/local-llm.d.ts +1 -1
  163. package/dist/maintenance/memory-governance.d.ts +1 -1
  164. package/dist/maintenance/memory-governance.js +8 -8
  165. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
  166. package/dist/maintenance/rebuild-memory-projection.js +9 -9
  167. package/dist/mcp-memory-inspector-app.d.ts +5 -5
  168. package/dist/memory-action-policy.d.ts +1 -1
  169. package/dist/memory-cache.d.ts +1 -1
  170. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  171. package/dist/memory-projection-store.d.ts +1 -1
  172. package/dist/memory-provenance.d.ts +1 -1
  173. package/dist/memory-worth-outcomes.d.ts +1 -1
  174. package/dist/models-json.d.ts +1 -1
  175. package/dist/namespaces/migrate.d.ts +2 -2
  176. package/dist/namespaces/migrate.js +11 -11
  177. package/dist/namespaces/principal.d.ts +1 -1
  178. package/dist/namespaces/search.d.ts +1 -1
  179. package/dist/namespaces/search.js +3 -3
  180. package/dist/namespaces/storage.d.ts +2 -2
  181. package/dist/namespaces/storage.js +7 -7
  182. package/dist/native-knowledge.d.ts +1 -1
  183. package/dist/operator-toolkit.d.ts +1 -1
  184. package/dist/operator-toolkit.js +18 -18
  185. package/dist/orchestration/maintenance.d.ts +2 -2
  186. package/dist/orchestration/maintenance.js +9 -9
  187. package/dist/{orchestrator-m_PnhyHj.d.ts → orchestrator-D4ovYV3x.d.ts} +3 -3
  188. package/dist/orchestrator.d.ts +4 -4
  189. package/dist/orchestrator.js +46 -45
  190. package/dist/patterns-cli.d.ts +1 -1
  191. package/dist/policy-runtime.d.ts +1 -1
  192. package/dist/provenance.d.ts +1 -1
  193. package/dist/qmd-recall-cache.d.ts +1 -1
  194. package/dist/qmd.d.ts +1 -1
  195. package/dist/recall-disclosure-escalation.d.ts +1 -1
  196. package/dist/recall-explain-renderer.d.ts +1 -1
  197. package/dist/recall-explain-renderer.js +3 -3
  198. package/dist/recall-planner-llm.d.ts +1 -1
  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 +1 -1
  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/schemas.d.ts +38 -0
  214. package/dist/schemas.js +1 -1
  215. package/dist/search/embed-helper.d.ts +1 -1
  216. package/dist/search/factory.d.ts +1 -1
  217. package/dist/search/factory.js +2 -2
  218. package/dist/search/index.d.ts +1 -1
  219. package/dist/search/index.js +4 -4
  220. package/dist/search/lancedb-backend.d.ts +1 -1
  221. package/dist/search/meilisearch-backend.d.ts +1 -1
  222. package/dist/search/noop-backend.d.ts +1 -1
  223. package/dist/search/orama-backend.d.ts +1 -1
  224. package/dist/search/port.d.ts +1 -1
  225. package/dist/search/remote-backend.d.ts +1 -1
  226. package/dist/{semantic-consolidation-DVBbq6Wr.d.ts → semantic-consolidation-DyMUCsfN.d.ts} +1 -1
  227. package/dist/semantic-consolidation.d.ts +2 -2
  228. package/dist/semantic-consolidation.js +9 -9
  229. package/dist/semantic-rule-promotion.js +7 -7
  230. package/dist/semantic-rule-verifier.d.ts +1 -1
  231. package/dist/semantic-rule-verifier.js +8 -8
  232. package/dist/session-observer-bands.d.ts +1 -1
  233. package/dist/session-observer-state.d.ts +1 -1
  234. package/dist/shared-context/manager.d.ts +1 -1
  235. package/dist/signal.d.ts +1 -1
  236. package/dist/storage.d.ts +5 -1
  237. package/dist/storage.js +6 -6
  238. package/dist/summarizer.d.ts +1 -1
  239. package/dist/summary-snapshot.d.ts +1 -1
  240. package/dist/temporal-supersession.d.ts +1 -1
  241. package/dist/temporal-supersession.js +2 -2
  242. package/dist/temporal-validity.d.ts +2 -2
  243. package/dist/temporal-validity.js +1 -1
  244. package/dist/threading.d.ts +1 -1
  245. package/dist/tier-migration.d.ts +1 -1
  246. package/dist/tier-routing.d.ts +1 -1
  247. package/dist/topics.d.ts +1 -1
  248. package/dist/transcript.d.ts +1 -1
  249. package/dist/transfer/backup.js +2 -2
  250. package/dist/transfer/capsule-export.js +2 -2
  251. package/dist/transfer/capsule-import.js +2 -2
  252. package/dist/transfer/import-sqlite.js +2 -2
  253. package/dist/{types-CJrvHJjx.d.ts → types-Couvz-L3.d.ts} +12 -2
  254. package/dist/types.d.ts +1 -1
  255. package/dist/types.js +1 -1
  256. package/dist/utility-runtime.d.ts +1 -1
  257. package/dist/verified-recall.js +8 -8
  258. package/package.json +2 -2
  259. package/src/access-boundary.ts +102 -1
  260. package/src/access-http.ts +54 -0
  261. package/src/access-operations-batch.ts +1468 -0
  262. package/src/access-operations.ts +4 -0
  263. package/src/access-surface-catalog.test.ts +17 -1
  264. package/src/access-surface-catalog.ts +57 -54
  265. package/src/event-time.ts +73 -0
  266. package/src/extraction-eventtime-wiring.test.ts +269 -0
  267. package/src/extraction.ts +50 -3
  268. package/src/orchestrator.ts +71 -17
  269. package/src/schemas.ts +12 -0
  270. package/src/storage-contract/atomicity.test.ts +113 -0
  271. package/src/storage-contract/cache-coherence.test.ts +100 -0
  272. package/src/storage-contract/content-hash.test.ts +102 -0
  273. package/src/storage-contract/failure-semantics.test.ts +108 -0
  274. package/src/storage-contract/harness.ts +148 -0
  275. package/src/storage-contract/namespace-routing.test.ts +135 -0
  276. package/src/storage-contract/round-trip.test.ts +226 -0
  277. package/src/storage-contract/surface.test.ts +90 -0
  278. package/src/storage-contract/versioning.test.ts +139 -0
  279. package/src/storage.ts +13 -2
  280. package/src/temporal-validity.test.ts +33 -0
  281. package/src/temporal-validity.ts +24 -1
  282. package/src/types.ts +12 -2
  283. package/dist/chunk-25FHSOEB.js.map +0 -1
  284. package/dist/chunk-ABCGDW3A.js.map +0 -1
  285. package/dist/chunk-IREVVFTM.js.map +0 -1
  286. package/dist/chunk-IX3UQT4H.js.map +0 -1
  287. package/dist/chunk-KKK7YTYN.js.map +0 -1
  288. package/dist/chunk-NMW3T6T6.js.map +0 -1
  289. package/dist/chunk-R64MNFPV.js.map +0 -1
  290. package/dist/chunk-RYDT7LAI.js.map +0 -1
  291. /package/dist/{capsule-crypto-GWVG7LGC.js.map → access-operations-batch.js.map} +0 -0
  292. /package/dist/{auto-sync-3AAP25FV.js.map → auto-sync-24NNS3GU.js.map} +0 -0
  293. /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
  294. /package/dist/{chunk-7G4KPGR3.js.map → chunk-3PTOZJOI.js.map} +0 -0
  295. /package/dist/{chunk-PJ5MDXOF.js.map → chunk-4DZATVK5.js.map} +0 -0
  296. /package/dist/{chunk-UOIRJ45Z.js.map → chunk-4E2QCH46.js.map} +0 -0
  297. /package/dist/{chunk-QHNJVWF6.js.map → chunk-6HPJMR5I.js.map} +0 -0
  298. /package/dist/{chunk-4NFVPDIL.js.map → chunk-74MYJSKB.js.map} +0 -0
  299. /package/dist/{chunk-PKMQK2WY.js.map → chunk-773DPI6T.js.map} +0 -0
  300. /package/dist/{chunk-AGNBY3VG.js.map → chunk-APJQ6UEA.js.map} +0 -0
  301. /package/dist/{chunk-UNNDFYUX.js.map → chunk-ARV3AUOM.js.map} +0 -0
  302. /package/dist/{chunk-XXDOJ5NL.js.map → chunk-BGAHTI4C.js.map} +0 -0
  303. /package/dist/{chunk-6GHWF4QH.js.map → chunk-C63MK3WL.js.map} +0 -0
  304. /package/dist/{chunk-VKJHM6PL.js.map → chunk-DGTDRIUO.js.map} +0 -0
  305. /package/dist/{chunk-K7QRDDSR.js.map → chunk-ESMY4RJ4.js.map} +0 -0
  306. /package/dist/{chunk-YLB7NMLD.js.map → chunk-GKI6LX5L.js.map} +0 -0
  307. /package/dist/{chunk-TUPNAHHQ.js.map → chunk-HIV5E57C.js.map} +0 -0
  308. /package/dist/{chunk-YOI3ELXF.js.map → chunk-IF362TF6.js.map} +0 -0
  309. /package/dist/{chunk-SFOAQQDJ.js.map → chunk-IONFO7UK.js.map} +0 -0
  310. /package/dist/{chunk-AE3C4PY6.js.map → chunk-IVCQW4C4.js.map} +0 -0
  311. /package/dist/{chunk-6AFVIOVZ.js.map → chunk-K22IJO4R.js.map} +0 -0
  312. /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
  313. /package/dist/{chunk-ORXVO6TH.js.map → chunk-MRX6ZXHZ.js.map} +0 -0
  314. /package/dist/{chunk-S24J5LLQ.js.map → chunk-NM6TSEGQ.js.map} +0 -0
  315. /package/dist/{chunk-QDIVMS25.js.map → chunk-NUWZFSKC.js.map} +0 -0
  316. /package/dist/{chunk-53EEQYE5.js.map → chunk-OMSTU233.js.map} +0 -0
  317. /package/dist/{chunk-WAHI7SPK.js.map → chunk-RH2OSRQY.js.map} +0 -0
  318. /package/dist/{chunk-YTMDF6S7.js.map → chunk-SPETAWFE.js.map} +0 -0
  319. /package/dist/{chunk-ZXFNSKPY.js.map → chunk-STYMKPFT.js.map} +0 -0
  320. /package/dist/{chunk-OMNTQPZO.js.map → chunk-TKZ3AL5V.js.map} +0 -0
  321. /package/dist/{chunk-QV5WFNZ2.js.map → chunk-W2S3Z5MT.js.map} +0 -0
  322. /package/dist/{chunk-OCFNG4LB.js.map → chunk-W2WQ4LE7.js.map} +0 -0
  323. /package/dist/{chunk-DE2OPIQD.js.map → chunk-WDH3KUZU.js.map} +0 -0
  324. /package/dist/{chunk-3EHCV6YV.js.map → chunk-WQADZ3ZY.js.map} +0 -0
  325. /package/dist/{chunk-OOEVMJK4.js.map → chunk-WSWYIKXX.js.map} +0 -0
  326. /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
  327. /package/dist/{chunk-WN4GHSDH.js.map → chunk-XKMDDM7P.js.map} +0 -0
  328. /package/dist/{chunk-6Q7JFY4P.js.map → chunk-Y6YHAGQP.js.map} +0 -0
  329. /package/dist/{chunk-KF74X62T.js.map → chunk-YGKUAX2B.js.map} +0 -0
  330. /package/dist/{chunk-YN4ZT4CW.js.map → chunk-YI7RZO7Y.js.map} +0 -0
  331. /package/dist/{forget-6SOIPUMQ.js.map → forget-U66KPDPY.js.map} +0 -0
  332. /package/dist/{graph-edge-decay-D7OESCBR.js.map → graph-edge-decay-JLOF3YW4.js.map} +0 -0
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Issue #1533 — Phase A contract test: page versioning snapshots.
3
+ *
4
+ * When versioning is enabled, overwriting a FIXED-PATH file produces a numbered
5
+ * snapshot in the `.versions/` sidecar. Revert restores a prior version.
6
+ * This pins the versioning contract the consolidation/provenance paths rely on.
7
+ *
8
+ * NOTE: `writeMemory` generates a unique path per id, so the first write to a
9
+ * path never has pre-existing content to snapshot. The versioning integration
10
+ * is exercised through `writeProfile` — a fixed-path write that calls
11
+ * `snapshotBeforeWrite` before overwriting. The direct `createVersion`/
12
+ * `revertToVersion` API is tested separately.
13
+ */
14
+
15
+ import assert from "node:assert/strict";
16
+ import { mkdtemp, rm, readFile, writeFile } from "node:fs/promises";
17
+ import os from "node:os";
18
+ import path from "node:path";
19
+ import test from "node:test";
20
+
21
+ import {
22
+ createVersion,
23
+ listVersions,
24
+ revertToVersion,
25
+ getVersion,
26
+ type VersioningConfig,
27
+ } from "../page-versioning.js";
28
+ import { StorageManager } from "../storage.js";
29
+ import { resetStaticCaches } from "./harness.js";
30
+
31
+ const VERSIONING_CONFIG: VersioningConfig = {
32
+ enabled: true,
33
+ maxVersionsPerPage: 10,
34
+ sidecarDir: ".versions",
35
+ };
36
+
37
+ test("versioning: overwrite of a fixed-path file (writeProfile) produces a numbered snapshot", async () => {
38
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-ver-snapshot-"));
39
+ try {
40
+ resetStaticCaches();
41
+ const storage = new StorageManager(dir);
42
+ await storage.ensureDirectories();
43
+ storage.setVersioningConfig(VERSIONING_CONFIG);
44
+
45
+ const profilePath = path.join(dir, "profile.md");
46
+ await storage.writeProfile("first version of profile");
47
+
48
+ // Overwrite the same fixed path → snapshotBeforeWrite fires
49
+ await storage.writeProfile("second version of profile");
50
+
51
+ const versions = await listVersions(profilePath, VERSIONING_CONFIG);
52
+ assert.ok(
53
+ versions.versions.length >= 1,
54
+ "at least one snapshot must exist after overwriting a fixed-path file",
55
+ );
56
+ assert.equal(versions.versions[0].trigger, "consolidation");
57
+ } finally {
58
+ resetStaticCaches();
59
+ await rm(dir, { recursive: true, force: true });
60
+ }
61
+ });
62
+
63
+ test("versioning: snapshot captures the PRE-overwrite content", async () => {
64
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-ver-pre-"));
65
+ try {
66
+ resetStaticCaches();
67
+ const storage = new StorageManager(dir);
68
+ await storage.ensureDirectories();
69
+ storage.setVersioningConfig(VERSIONING_CONFIG);
70
+
71
+ const profilePath = path.join(dir, "profile.md");
72
+ await storage.writeProfile("ORIGINAL PROFILE");
73
+ await storage.writeProfile("REPLACEMENT PROFILE");
74
+
75
+ const versions = await listVersions(profilePath, VERSIONING_CONFIG);
76
+ assert.ok(versions.versions.length >= 1);
77
+
78
+ // Read the snapshot — it must contain the ORIGINAL, not the replacement
79
+ const snapshot = await getVersion(profilePath, versions.versions[0].versionId, VERSIONING_CONFIG);
80
+ assert.ok(snapshot, "snapshot content must be readable");
81
+ assert.ok(
82
+ snapshot!.includes("ORIGINAL PROFILE"),
83
+ "the snapshot must contain the pre-overwrite content",
84
+ );
85
+ assert.ok(
86
+ !snapshot!.includes("REPLACEMENT"),
87
+ "the snapshot must NOT contain the replacement content",
88
+ );
89
+
90
+ // The live file has the replacement
91
+ const live = await readFile(profilePath, "utf-8");
92
+ assert.ok(live.includes("REPLACEMENT PROFILE"));
93
+ } finally {
94
+ resetStaticCaches();
95
+ await rm(dir, { recursive: true, force: true });
96
+ }
97
+ });
98
+
99
+ test("versioning: disabled by default — no snapshots created", async () => {
100
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-ver-disabled-"));
101
+ try {
102
+ resetStaticCaches();
103
+ const storage = new StorageManager(dir);
104
+ await storage.ensureDirectories();
105
+ // Do NOT call setVersioningConfig — default is disabled
106
+ await storage.writeProfile("v1");
107
+ await storage.writeProfile("v2");
108
+
109
+ const profilePath = path.join(dir, "profile.md");
110
+ const versions = await listVersions(profilePath, VERSIONING_CONFIG);
111
+ assert.equal(versions.versions.length, 0, "no snapshots when versioning was disabled at write time");
112
+ } finally {
113
+ resetStaticCaches();
114
+ await rm(dir, { recursive: true, force: true });
115
+ }
116
+ });
117
+
118
+ test("versioning: createVersion → revertToVersion round-trip restores content", async () => {
119
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-ver-revert-"));
120
+ try {
121
+ const filePath = path.join(dir, "doc.md");
122
+ await writeFile(filePath, "alpha", "utf-8");
123
+
124
+ await createVersion(filePath, "alpha", "manual", VERSIONING_CONFIG);
125
+ await writeFile(filePath, "beta", "utf-8");
126
+ await createVersion(filePath, "beta", "manual", VERSIONING_CONFIG);
127
+
128
+ const versions = await listVersions(filePath, VERSIONING_CONFIG);
129
+ assert.ok(versions.versions.length >= 2);
130
+
131
+ const firstVersionId = versions.versions[0].versionId;
132
+ await revertToVersion(filePath, firstVersionId, VERSIONING_CONFIG);
133
+
134
+ const restored = await readFile(filePath, "utf-8");
135
+ assert.equal(restored, "alpha", "revert must restore the version-1 content");
136
+ } finally {
137
+ await rm(dir, { recursive: true, force: true });
138
+ }
139
+ });
package/src/storage.ts CHANGED
@@ -3580,6 +3580,7 @@ export class StorageManager {
3580
3580
  // or assumed from the ingestion anchor. Both validate on serialize.
3581
3581
  observedAt?: string;
3582
3582
  eventTimeSource?: "extracted" | "assumed";
3583
+ invalidAt?: string;
3583
3584
  structuredAttributes?: Record<string, string>;
3584
3585
  /**
3585
3586
  * When provided, this string is used as the source for the fact-content
@@ -3665,6 +3666,7 @@ export class StorageManager {
3665
3666
  valid_at: validAt,
3666
3667
  observedAt,
3667
3668
  eventTimeSource: options.eventTimeSource,
3669
+ invalid_at: normalizeMemoryWriteTimestamp("invalidAt", options.invalidAt),
3668
3670
  structuredAttributes: options.structuredAttributes,
3669
3671
  };
3670
3672
  if (options.status !== undefined) {
@@ -4504,12 +4506,10 @@ export class StorageManager {
4504
4506
  // is disabled, missing, or unhealthy. RECALL_FALLBACK_DIRS is the single
4505
4507
  // source of truth derived from ALL_CATEGORY_DIRS (shared with
4506
4508
  // ensureDirectories() and the write routing in utils/category-dir.ts).
4507
- //
4508
4509
  // These paths resolve identically to the legacy this.factsDir /
4509
4510
  // this.correctionsDir / this.proceduresDir / this.reasoningTracesDir
4510
4511
  // getters (all `path.join(this.baseDir, <dir>)`), so the scan stays
4511
4512
  // namespace-aware: this.baseDir is per-namespace, set by the storage router.
4512
- //
4513
4513
  // Deliberately EXCLUDED (issue #1497 + PR #1503 review): the non-category
4514
4514
  // content dirs that ensureDirectories() also creates — entities/, state/,
4515
4515
  // artifacts/, identity/, config/ — plus the root profile.md, AND the
@@ -7359,6 +7359,12 @@ export class StorageManager {
7359
7359
  sources?: ProvenanceSource[];
7360
7360
  /** Coarse provenance tag (issue #1575 PR 2), propagated from the parent. */
7361
7361
  provenance?: "verified" | "unverified" | "none";
7362
+ // Issue #1578 — bi-temporal bounds + ingestion provenance propagated from
7363
+ // the parent fact so an independently-surfaced chunk expires at the same
7364
+ // invalid_at window and carries the same observed-at anchor.
7365
+ invalidAt?: string;
7366
+ observedAt?: string;
7367
+ eventTimeSource?: "extracted" | "assumed";
7362
7368
  } = {},
7363
7369
  ): Promise<string> {
7364
7370
  await this.ensureDirectories();
@@ -7368,6 +7374,8 @@ export class StorageManager {
7368
7374
  const conf = options.confidence ?? 0.8;
7369
7375
  const tier = confidenceTier(conf);
7370
7376
  const validAt = normalizeMemoryWriteTimestamp("validAt", options.validAt);
7377
+ const chunkInvalidAt = normalizeMemoryWriteTimestamp("invalidAt", options.invalidAt);
7378
+ const chunkObservedAt = normalizeMemoryWriteTimestamp("observedAt", options.observedAt);
7371
7379
 
7372
7380
  const fm: MemoryFrontmatter = {
7373
7381
  id,
@@ -7388,6 +7396,9 @@ export class StorageManager {
7388
7396
  intentEntityTypes: options.intentEntityTypes,
7389
7397
  memoryKind: options.memoryKind,
7390
7398
  valid_at: validAt,
7399
+ invalid_at: chunkInvalidAt,
7400
+ observedAt: chunkObservedAt,
7401
+ eventTimeSource: options.eventTimeSource,
7391
7402
  ...(options.status ? { status: options.status } : {}),
7392
7403
  ...(options.faithfulness ? { faithfulness: options.faithfulness } : {}),
7393
7404
  ...(options.sources ? { sources: options.sources } : {}),
@@ -410,6 +410,39 @@ test("isValidAsOf: half-open interval [valid_at, invalid_at)", () => {
410
410
  assert.equal(isValidAsOf(fm, Date.parse("2026-01-01T00:00:00.000Z")), false);
411
411
  });
412
412
 
413
+ test("isValidAsOf: extracted end-only bound is open-start (-inf, invalid_at] (#1578 r3)", () => {
414
+ // An extracted fact like "we used MongoDB until June 2025" resolves to
415
+ // validUntil only (no validFrom); valid_at is absent, eventTimeSource is
416
+ // "extracted". The interval must be open-start so historical as_of queries
417
+ // before ingestion still see it, rather than defaulting valid_at to created.
418
+ const fm = {
419
+ invalid_at: "2025-07-01T00:00:00.000Z",
420
+ created: "2025-08-15T00:00:00.000Z",
421
+ eventTimeSource: "extracted" as const,
422
+ };
423
+ // Well before ingestion/created — still authoritative (open start).
424
+ assert.equal(isValidAsOf(fm, Date.parse("2024-01-01T00:00:00.000Z")), true);
425
+ // Mid-window — authoritative.
426
+ assert.equal(isValidAsOf(fm, Date.parse("2025-06-15T00:00:00.000Z")), true);
427
+ // Exactly at invalid_at — NOT authoritative (exclusive upper bound).
428
+ assert.equal(isValidAsOf(fm, Date.parse("2025-07-01T00:00:00.000Z")), false);
429
+ // After invalid_at — not authoritative.
430
+ assert.equal(isValidAsOf(fm, Date.parse("2026-01-01T00:00:00.000Z")), false);
431
+ });
432
+
433
+ test("isValidAsOf: legacy memory without eventTimeSource keeps created fallback (#1578 r3)", () => {
434
+ // A legacy memory with invalid_at but no eventTimeSource must NOT become
435
+ // open-start — it keeps the pre-#1578 [created, invalid_at) behaviour so
436
+ // supersession/backfill semantics are unchanged.
437
+ const fm = {
438
+ invalid_at: "2025-12-31T00:00:00.000Z",
439
+ created: "2025-06-01T00:00:00.000Z",
440
+ };
441
+ // Before created — not authoritative (legacy behaviour preserved).
442
+ assert.equal(isValidAsOf(fm, Date.parse("2025-05-01T00:00:00.000Z")), false);
443
+ assert.equal(isValidAsOf(fm, Date.parse("2025-09-01T00:00:00.000Z")), true);
444
+ });
445
+
413
446
  test("isValidAsOf: timezone-suffixed ISO strings compare via Date.parse, not lexicographic", () => {
414
447
  // Two strings that order differently lexicographically vs as Dates.
415
448
  // 2025-01-01T00:00:00+02:00 == 2024-12-31T22:00:00Z
@@ -82,11 +82,34 @@ export function effectiveInvalidAt(
82
82
  export function isValidAsOf(
83
83
  fm: Pick<
84
84
  MemoryFrontmatter,
85
- "valid_at" | "invalid_at" | "created" | "supersededAt" | "status"
85
+ | "valid_at"
86
+ | "invalid_at"
87
+ | "created"
88
+ | "supersededAt"
89
+ | "status"
90
+ | "eventTimeSource"
86
91
  >,
87
92
  asOfMs: number,
88
93
  ): boolean {
89
94
  if (!Number.isFinite(asOfMs)) return true;
95
+ // Open-start bi-temporal interval (#1578 r3): an extracted end-only bound
96
+ // (eventTimeSource "extracted", no valid_at, has invalid_at) is true from
97
+ // the indefinite past. Without this, effectiveValidAt falls back to
98
+ // `created` and a historical as_of before ingestion hides a fact that was
99
+ // actually true up until invalid_at (chatgpt-codex thread on
100
+ // orchestrator.ts:15533). Gated on eventTimeSource so legacy memories
101
+ // (no bi-temporal provenance) keep the created-anchor fallback.
102
+ const explicitValidAt = fm.valid_at?.trim();
103
+ if (
104
+ (!explicitValidAt || explicitValidAt.length === 0) &&
105
+ fm.eventTimeSource === "extracted"
106
+ ) {
107
+ const invalidAt = effectiveInvalidAt(fm);
108
+ if (invalidAt !== undefined) {
109
+ const invalidAtMs = Date.parse(invalidAt);
110
+ if (Number.isFinite(invalidAtMs)) return invalidAtMs > asOfMs;
111
+ }
112
+ }
90
113
  const validAtMs = Date.parse(effectiveValidAt(fm));
91
114
  if (!Number.isFinite(validAtMs)) return false;
92
115
  if (validAtMs > asOfMs) return false;
package/src/types.ts CHANGED
@@ -810,8 +810,9 @@ export interface PluginConfig {
810
810
  * Turn on to exclude validity-expired facts from default injection
811
811
  * candidates (they remain findable by explicit search and `as_of`
812
812
  * queries). Storage round-trips `observedAt`/`eventTimeSource`; the
813
- * extraction prompt `resolveEventTime` write-time wiring lands in a
814
- * follow-on PR, so new extractions are not yet event-time-resolved.
813
+ * extraction prompt emits an optional per-fact `eventTime` expression
814
+ * and `resolveFactEventTime` resolves it against the source turn
815
+ * timestamp at write time (#1578 PR2).
815
816
  */
816
817
  temporalBiTemporal: boolean;
817
818
  /**
@@ -2893,6 +2894,15 @@ export interface ExtractedFact {
2893
2894
  * walked through. Persisted under reasoning-traces/.
2894
2895
  */
2895
2896
  reasoningTrace?: ExtractedReasoningTrace;
2897
+ /**
2898
+ * Optional event-time expression for bi-temporal validity (#1578 PR2).
2899
+ * Verbatim temporal anchor extracted from the conversation ("2025-03-01",
2900
+ * "last March", "since 2024", "until 2025-06-01"). Resolved against the
2901
+ * source turn timestamp at write time by `resolveFactEventTime` — never
2902
+ * re-resolved at read. Absent when the fact carries no temporal anchor or
2903
+ * when `temporal.biTemporal` is off.
2904
+ */
2905
+ eventTime?: string;
2896
2906
  }
2897
2907
 
2898
2908
  export interface ExtractedReasoningTraceStep {