@remnic/core 1.1.2 → 1.1.3

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 (485) hide show
  1. package/dist/abort-error.js +1 -0
  2. package/dist/abstraction-nodes.js +1 -0
  3. package/dist/access-audit.js +1 -0
  4. package/dist/access-cli.js +70 -45
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.d.ts +50 -5
  7. package/dist/access-http.js +37 -15
  8. package/dist/access-idempotency.js +1 -0
  9. package/dist/access-mcp.d.ts +10 -5
  10. package/dist/access-mcp.js +36 -13
  11. package/dist/access-schema.d.ts +133 -13
  12. package/dist/access-schema.js +20 -1
  13. package/dist/access-service-_AEUMVyX.d.ts +1981 -0
  14. package/dist/access-service.d.ts +11 -6
  15. package/dist/access-service.js +38 -14
  16. package/dist/active-memory-bridge.js +1 -0
  17. package/dist/active-recall.js +1 -0
  18. package/dist/active-recall.js.map +1 -1
  19. package/dist/behavior-learner.js +1 -0
  20. package/dist/behavior-learner.js.map +1 -1
  21. package/dist/behavior-signals.js +1 -0
  22. package/dist/bootstrap.d.ts +6 -4
  23. package/dist/bootstrap.js +1 -0
  24. package/dist/boxes.js +1 -0
  25. package/dist/briefing.d.ts +9 -5
  26. package/dist/briefing.js +9 -6
  27. package/dist/buffer-surprise-report.js +1 -0
  28. package/dist/buffer-surprise.js +1 -0
  29. package/dist/buffer.d.ts +1 -1
  30. package/dist/buffer.js +1 -0
  31. package/dist/calibration.d.ts +8 -1
  32. package/dist/calibration.js +10 -2
  33. package/dist/calibration.js.map +1 -1
  34. package/dist/capsule-cli.d.ts +137 -0
  35. package/dist/capsule-cli.js +34 -0
  36. package/dist/capsule-crypto-5CYAGVC5.js +18 -0
  37. package/dist/capsule-export-NZQPOTQ4.js +17 -0
  38. package/dist/capsule-export-NZQPOTQ4.js.map +1 -0
  39. package/dist/capsule-import-SDCUXLEV.js +16 -0
  40. package/dist/capsule-import-SDCUXLEV.js.map +1 -0
  41. package/dist/capsule-merge-DI7PNQ2H.js +189 -0
  42. package/dist/capsule-merge-DI7PNQ2H.js.map +1 -0
  43. package/dist/causal-behavior.js +1 -0
  44. package/dist/causal-behavior.js.map +1 -1
  45. package/dist/causal-chain.js +1 -0
  46. package/dist/causal-consolidation.js +11 -8
  47. package/dist/causal-consolidation.js.map +1 -1
  48. package/dist/causal-retrieval.js +2 -1
  49. package/dist/causal-retrieval.js.map +1 -1
  50. package/dist/causal-trajectory-graph.js +4 -1
  51. package/dist/causal-trajectory-graph.js.map +1 -1
  52. package/dist/causal-trajectory.js +2 -1
  53. package/dist/chunk-2LSZVONP.js +67 -0
  54. package/dist/chunk-2LSZVONP.js.map +1 -0
  55. package/dist/chunk-32KD5IHZ.js +245 -0
  56. package/dist/chunk-32KD5IHZ.js.map +1 -0
  57. package/dist/{chunk-VDX363PS.js → chunk-34F3PLWZ.js} +10 -3
  58. package/dist/chunk-34F3PLWZ.js.map +1 -0
  59. package/dist/chunk-3KIS4VGT.js +228 -0
  60. package/dist/chunk-3KIS4VGT.js.map +1 -0
  61. package/dist/chunk-3LCWFNVS.js +350 -0
  62. package/dist/chunk-3LCWFNVS.js.map +1 -0
  63. package/dist/chunk-43EKP2UK.js +26 -0
  64. package/dist/chunk-43EKP2UK.js.map +1 -0
  65. package/dist/chunk-457A4P3L.js +119 -0
  66. package/dist/chunk-457A4P3L.js.map +1 -0
  67. package/dist/{chunk-TMYO7B5P.js → chunk-47WOM4YW.js} +2 -2
  68. package/dist/{chunk-OC5OXUQ4.js → chunk-4PLGJRBV.js} +653 -17
  69. package/dist/chunk-4PLGJRBV.js.map +1 -0
  70. package/dist/{chunk-PVICZTKG.js → chunk-55FXRRSJ.js} +5 -5
  71. package/dist/{chunk-PVICZTKG.js.map → chunk-55FXRRSJ.js.map} +1 -1
  72. package/dist/{chunk-ULYOGL6R.js → chunk-5HRY2WRF.js} +7 -3
  73. package/dist/chunk-5HRY2WRF.js.map +1 -0
  74. package/dist/chunk-6TBWYBJ3.js +236 -0
  75. package/dist/chunk-6TBWYBJ3.js.map +1 -0
  76. package/dist/chunk-74EMIVE4.js +329 -0
  77. package/dist/chunk-74EMIVE4.js.map +1 -0
  78. package/dist/chunk-74WWN7ZW.js +82 -0
  79. package/dist/chunk-74WWN7ZW.js.map +1 -0
  80. package/dist/{chunk-6YJHX2DL.js → chunk-7GCMLT7J.js} +242 -22
  81. package/dist/chunk-7GCMLT7J.js.map +1 -0
  82. package/dist/chunk-A6XUJE5D.js +126 -0
  83. package/dist/chunk-A6XUJE5D.js.map +1 -0
  84. package/dist/chunk-AJA46VX5.js +393 -0
  85. package/dist/chunk-AJA46VX5.js.map +1 -0
  86. package/dist/{chunk-UWB5LMWY.js → chunk-AKUCB2OG.js} +525 -24
  87. package/dist/chunk-AKUCB2OG.js.map +1 -0
  88. package/dist/chunk-ASIQZXYO.js +277 -0
  89. package/dist/chunk-ASIQZXYO.js.map +1 -0
  90. package/dist/{chunk-DG6YMRDC.js → chunk-B2TL6GA2.js} +2 -2
  91. package/dist/chunk-BJMBJZ2Y.js +290 -0
  92. package/dist/chunk-BJMBJZ2Y.js.map +1 -0
  93. package/dist/chunk-BT7NVCML.js +79 -0
  94. package/dist/chunk-BT7NVCML.js.map +1 -0
  95. package/dist/chunk-CK5NTM2S.js +454 -0
  96. package/dist/chunk-CK5NTM2S.js.map +1 -0
  97. package/dist/{chunk-AYXIPSZO.js → chunk-CRU27Q4J.js} +2 -2
  98. package/dist/{chunk-F5VP6YCB.js → chunk-DCE6SQLA.js} +572 -155
  99. package/dist/chunk-DCE6SQLA.js.map +1 -0
  100. package/dist/{chunk-CUPFXL3J.js → chunk-DHRQHX36.js} +4 -4
  101. package/dist/chunk-DHRQHX36.js.map +1 -0
  102. package/dist/{chunk-STGWEHYR.js → chunk-DR7MCMPS.js} +981 -61
  103. package/dist/chunk-DR7MCMPS.js.map +1 -0
  104. package/dist/chunk-FP2373TW.js +149 -0
  105. package/dist/chunk-FP2373TW.js.map +1 -0
  106. package/dist/{chunk-RBBWYEFJ.js → chunk-G2WADRQ3.js} +1 -1
  107. package/dist/chunk-G7D6GZ5J.js +48 -0
  108. package/dist/chunk-G7D6GZ5J.js.map +1 -0
  109. package/dist/chunk-H7XKCNR6.js +60 -0
  110. package/dist/chunk-H7XKCNR6.js.map +1 -0
  111. package/dist/{chunk-3YGHKTBF.js → chunk-IM3JSE73.js} +953 -322
  112. package/dist/chunk-IM3JSE73.js.map +1 -0
  113. package/dist/chunk-IXEJRKCZ.js +18 -0
  114. package/dist/chunk-IXEJRKCZ.js.map +1 -0
  115. package/dist/chunk-IYY4MCPG.js +275 -0
  116. package/dist/chunk-IYY4MCPG.js.map +1 -0
  117. package/dist/{chunk-BECYBZLX.js → chunk-JWSENLQI.js} +502 -22
  118. package/dist/chunk-JWSENLQI.js.map +1 -0
  119. package/dist/chunk-KNKUID7G.js +183 -0
  120. package/dist/chunk-KNKUID7G.js.map +1 -0
  121. package/dist/chunk-L2IO2QPY.js +2036 -0
  122. package/dist/chunk-L2IO2QPY.js.map +1 -0
  123. package/dist/{chunk-SPI27QT6.js → chunk-L5IIGA5V.js} +9 -4
  124. package/dist/chunk-L5IIGA5V.js.map +1 -0
  125. package/dist/{chunk-XXVWLXSG.js → chunk-LVYGDT5V.js} +56 -82
  126. package/dist/chunk-LVYGDT5V.js.map +1 -0
  127. package/dist/{chunk-ZAIM4TUE.js → chunk-LW2NMHDW.js} +46 -1
  128. package/dist/chunk-LW2NMHDW.js.map +1 -0
  129. package/dist/{chunk-3OGMS3PE.js → chunk-LZRYQK6L.js} +3 -2
  130. package/dist/chunk-LZRYQK6L.js.map +1 -0
  131. package/dist/chunk-MDYG7VI7.js +48 -0
  132. package/dist/chunk-MDYG7VI7.js.map +1 -0
  133. package/dist/chunk-MXC3AP5I.js +74 -0
  134. package/dist/chunk-MXC3AP5I.js.map +1 -0
  135. package/dist/{chunk-DIXB44VE.js → chunk-N7X62G74.js} +25 -10
  136. package/dist/chunk-N7X62G74.js.map +1 -0
  137. package/dist/chunk-NN3TS5BM.js +147 -0
  138. package/dist/chunk-NN3TS5BM.js.map +1 -0
  139. package/dist/chunk-OA3L7BFR.js +183 -0
  140. package/dist/chunk-OA3L7BFR.js.map +1 -0
  141. package/dist/chunk-OZHRDTDX.js +240 -0
  142. package/dist/chunk-OZHRDTDX.js.map +1 -0
  143. package/dist/chunk-PCUKNJAZ.js +165 -0
  144. package/dist/chunk-PCUKNJAZ.js.map +1 -0
  145. package/dist/{chunk-6PFRXT4K.js → chunk-PFV5C235.js} +11 -6
  146. package/dist/chunk-PFV5C235.js.map +1 -0
  147. package/dist/chunk-PZ5AY32C.js +10 -0
  148. package/dist/chunk-PZ5AY32C.js.map +1 -0
  149. package/dist/{chunk-Y7R2XJ5Q.js → chunk-Q7FJ5ZHM.js} +6 -2
  150. package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
  151. package/dist/{chunk-NBVAS5MT.js → chunk-R2L7SUX2.js} +6 -6
  152. package/dist/{chunk-WCLICCGB.js → chunk-RILIVK4O.js} +91 -4
  153. package/dist/chunk-RILIVK4O.js.map +1 -0
  154. package/dist/{chunk-C2EFFULQ.js → chunk-RK2Y4XOM.js} +163 -20
  155. package/dist/chunk-RK2Y4XOM.js.map +1 -0
  156. package/dist/{chunk-TP4FZJIZ.js → chunk-RULE4VG5.js} +5 -1
  157. package/dist/chunk-RULE4VG5.js.map +1 -0
  158. package/dist/{chunk-PVPWZSSI.js → chunk-SMA4IMHV.js} +19 -3
  159. package/dist/chunk-SMA4IMHV.js.map +1 -0
  160. package/dist/{chunk-L7IXWRYE.js → chunk-SS253RXF.js} +22 -13
  161. package/dist/chunk-SS253RXF.js.map +1 -0
  162. package/dist/chunk-TUFG6VXY.js +875 -0
  163. package/dist/chunk-TUFG6VXY.js.map +1 -0
  164. package/dist/chunk-TYEOAFH3.js +251 -0
  165. package/dist/chunk-TYEOAFH3.js.map +1 -0
  166. package/dist/chunk-UKJAGEXH.js +260 -0
  167. package/dist/chunk-UKJAGEXH.js.map +1 -0
  168. package/dist/{chunk-KVBLZUKV.js → chunk-USFPPRAF.js} +93 -3
  169. package/dist/chunk-USFPPRAF.js.map +1 -0
  170. package/dist/{chunk-GA5P7RST.js → chunk-VTJVUHRK.js} +22 -36
  171. package/dist/chunk-VTJVUHRK.js.map +1 -0
  172. package/dist/chunk-WIICJPET.js +45 -0
  173. package/dist/chunk-WIICJPET.js.map +1 -0
  174. package/dist/{chunk-VBVG2M5G.js → chunk-WPGJYVUH.js} +6 -2
  175. package/dist/chunk-WPGJYVUH.js.map +1 -0
  176. package/dist/{chunk-4HQS2HPX.js → chunk-WSZIHQBK.js} +29 -9
  177. package/dist/{chunk-4HQS2HPX.js.map → chunk-WSZIHQBK.js.map} +1 -1
  178. package/dist/{chunk-NZLQTHS5.js → chunk-WW3QQF4H.js} +4 -1
  179. package/dist/chunk-WW3QQF4H.js.map +1 -0
  180. package/dist/{chunk-FVA6TGI3.js → chunk-Y3WQ4ZWK.js} +42 -2
  181. package/dist/chunk-Y3WQ4ZWK.js.map +1 -0
  182. package/dist/chunk-YNJHCGDT.js +309 -0
  183. package/dist/chunk-YNJHCGDT.js.map +1 -0
  184. package/dist/{chunk-LOIMBRDE.js → chunk-ZGXSCMQN.js} +1993 -411
  185. package/dist/chunk-ZGXSCMQN.js.map +1 -0
  186. package/dist/{chunk-W6SL7OFG.js → chunk-ZTSE2ZJ6.js} +12 -2
  187. package/dist/{chunk-W6SL7OFG.js.map → chunk-ZTSE2ZJ6.js.map} +1 -1
  188. package/dist/chunking.js +1 -0
  189. package/dist/cipher-GVE2GQ5H.js +28 -0
  190. package/dist/cipher-GVE2GQ5H.js.map +1 -0
  191. package/dist/citations.js +1 -0
  192. package/dist/{cli-BkeRaYfk.d.ts → cli-x2APT9a6.d.ts} +26 -7
  193. package/dist/cli.d.ts +11 -6
  194. package/dist/cli.js +67 -33
  195. package/dist/codex-thread-key.js +1 -0
  196. package/dist/commitment-ledger.js +1 -0
  197. package/dist/compression-optimizer.js +1 -0
  198. package/dist/config.d.ts +2 -1
  199. package/dist/config.js +4 -1
  200. package/dist/connectors-cli-DFGtY2DB.d.ts +257 -0
  201. package/dist/connectors-cli.d.ts +2 -0
  202. package/dist/connectors-cli.js +22 -0
  203. package/dist/connectors-cli.js.map +1 -0
  204. package/dist/consolidation-operator.d.ts +65 -5
  205. package/dist/consolidation-operator.js +6 -1
  206. package/dist/consolidation-provenance-check.d.ts +1 -1
  207. package/dist/consolidation-provenance-check.js +3 -2
  208. package/dist/consolidation-undo.d.ts +1 -1
  209. package/dist/consolidation-undo.js +1 -0
  210. package/dist/consolidation-undo.js.map +1 -1
  211. package/dist/{contradiction-review-WIUBAR52.js → contradiction-review-5LTTVDQV.js} +2 -1
  212. package/dist/contradiction-review-5LTTVDQV.js.map +1 -0
  213. package/dist/{contradiction-scan-E3GJTI4F.js → contradiction-scan-3Z6YW7YA.js} +2 -1
  214. package/dist/{contradiction-scan-E3GJTI4F.js.map → contradiction-scan-3Z6YW7YA.js.map} +1 -1
  215. package/dist/cross-namespace-budget.js +1 -0
  216. package/dist/cue-anchors.js +1 -0
  217. package/dist/dashboard-runtime.js +1 -0
  218. package/dist/day-summary.js +1 -0
  219. package/dist/delinearize.js +1 -0
  220. package/dist/direct-answer-wiring.js +1 -0
  221. package/dist/direct-answer.js +1 -0
  222. package/dist/dreams-ledger-LR2NBAZE.js +286 -0
  223. package/dist/dreams-ledger-LR2NBAZE.js.map +1 -0
  224. package/dist/embedding-fallback.js +1 -0
  225. package/dist/{engine-72LSIWQP.js → engine-ICC2DSQF.js} +10 -7
  226. package/dist/engine-ICC2DSQF.js.map +1 -0
  227. package/dist/entity-retrieval.d.ts +1 -1
  228. package/dist/entity-retrieval.js +9 -6
  229. package/dist/entity-schema.js +1 -0
  230. package/dist/evals.js +1 -0
  231. package/dist/evidence-pack.d.ts +16 -0
  232. package/dist/evidence-pack.js +8 -0
  233. package/dist/evidence-pack.js.map +1 -0
  234. package/dist/explicit-capture.d.ts +6 -4
  235. package/dist/explicit-capture.js +1 -0
  236. package/dist/extraction-judge-telemetry.js +1 -0
  237. package/dist/extraction-judge-training.js +1 -0
  238. package/dist/extraction-judge.js +1 -0
  239. package/dist/extraction.js +7 -6
  240. package/dist/fallback-llm.js +3 -2
  241. package/dist/first-start-migration-4MHQEOSD.js +263 -0
  242. package/dist/first-start-migration-4MHQEOSD.js.map +1 -0
  243. package/dist/forget-PLR6J5DN.js +69 -0
  244. package/dist/forget-PLR6J5DN.js.map +1 -0
  245. package/dist/framework-CyHYDcri.d.ts +153 -0
  246. package/dist/fs-utils-IRVUFB6G.js +30 -0
  247. package/dist/fs-utils-IRVUFB6G.js.map +1 -0
  248. package/dist/graph-dashboard-diff.js +1 -0
  249. package/dist/graph-dashboard-key.js +1 -0
  250. package/dist/graph-dashboard-parser.js +1 -0
  251. package/dist/graph-edge-decay-PWB63GRE.js +207 -0
  252. package/dist/graph-edge-decay-PWB63GRE.js.map +1 -0
  253. package/dist/graph-edge-reinforcement.d.ts +81 -0
  254. package/dist/graph-edge-reinforcement.js +24 -0
  255. package/dist/graph-edge-reinforcement.js.map +1 -0
  256. package/dist/graph-events.d.ts +87 -0
  257. package/dist/graph-events.js +14 -0
  258. package/dist/graph-events.js.map +1 -0
  259. package/dist/graph-recall.js +1 -0
  260. package/dist/graph-retrieval.js +1 -0
  261. package/dist/graph-snapshot.d.ts +112 -0
  262. package/dist/graph-snapshot.js +19 -0
  263. package/dist/graph-snapshot.js.map +1 -0
  264. package/dist/graph.d.ts +105 -7
  265. package/dist/graph.js +20 -3
  266. package/dist/harmonic-retrieval.js +1 -0
  267. package/dist/himem.js +1 -0
  268. package/dist/hygiene.js +1 -0
  269. package/dist/identity-continuity.js +1 -0
  270. package/dist/importance.js +1 -0
  271. package/dist/index.d.ts +562 -13
  272. package/dist/index.js +329 -67
  273. package/dist/index.js.map +1 -1
  274. package/dist/intent.js +1 -0
  275. package/dist/json-extract.js +1 -0
  276. package/dist/json-store.js +1 -0
  277. package/dist/kdf-7S6RWKLZ.js +26 -0
  278. package/dist/kdf-7S6RWKLZ.js.map +1 -0
  279. package/dist/legacy-hook-compat.js +1 -0
  280. package/dist/legacy-hook-compat.js.map +1 -1
  281. package/dist/lifecycle.js +1 -0
  282. package/dist/live-connectors-runner.d.ts +48 -0
  283. package/dist/live-connectors-runner.js +17 -0
  284. package/dist/live-connectors-runner.js.map +1 -0
  285. package/dist/local-llm.js +1 -0
  286. package/dist/logger.js +1 -0
  287. package/dist/memory-action-policy.js +1 -0
  288. package/dist/memory-cache.d.ts +2 -1
  289. package/dist/memory-cache.js +4 -1
  290. package/dist/memory-governance-KG52RITE.js +37 -0
  291. package/dist/memory-governance-KG52RITE.js.map +1 -0
  292. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  293. package/dist/memory-lifecycle-ledger-utils.js +4 -1
  294. package/dist/memory-projection-format.js +1 -0
  295. package/dist/{memory-projection-store-DeSXPh1j.d.ts → memory-projection-store-D3vBHS4J.d.ts} +1 -0
  296. package/dist/memory-projection-store.d.ts +1 -1
  297. package/dist/memory-projection-store.js +1 -0
  298. package/dist/memory-worth-bench.js +1 -0
  299. package/dist/memory-worth-bench.js.map +1 -1
  300. package/dist/memory-worth-filter.js +1 -0
  301. package/dist/memory-worth-outcomes.d.ts +1 -1
  302. package/dist/memory-worth-outcomes.js +1 -0
  303. package/dist/memory-worth.js +1 -0
  304. package/dist/metadata-FC3XPDRQ.js +21 -0
  305. package/dist/metadata-FC3XPDRQ.js.map +1 -0
  306. package/dist/migrate-from-identity-anchor-TTEDEJGX.js +8 -0
  307. package/dist/migrate-from-identity-anchor-TTEDEJGX.js.map +1 -0
  308. package/dist/model-registry.js +1 -0
  309. package/dist/models-json.js +1 -0
  310. package/dist/native-knowledge.js +1 -0
  311. package/dist/negative.js +1 -0
  312. package/dist/objective-state-writers.js +1 -0
  313. package/dist/objective-state-writers.js.map +1 -1
  314. package/dist/objective-state.js +1 -0
  315. package/dist/openai-chat-compat.js +1 -0
  316. package/dist/operator-toolkit.d.ts +46 -2
  317. package/dist/operator-toolkit.js +28 -16
  318. package/dist/opik-exporter.js +1 -0
  319. package/dist/opik-exporter.js.map +1 -1
  320. package/dist/{orchestrator-CmJ-NTdJ.d.ts → orchestrator-ChkesB8U.d.ts} +177 -13
  321. package/dist/orchestrator.d.ts +6 -4
  322. package/dist/orchestrator.js +55 -39
  323. package/dist/page-versioning.js +1 -0
  324. package/dist/path-RMTY5Y5A.js +9 -0
  325. package/dist/path-RMTY5Y5A.js.map +1 -0
  326. package/dist/patterns-cli.d.ts +160 -0
  327. package/dist/patterns-cli.js +29 -0
  328. package/dist/patterns-cli.js.map +1 -0
  329. package/dist/peers-6OSQ3NK6.js +44 -0
  330. package/dist/peers-6OSQ3NK6.js.map +1 -0
  331. package/dist/plugin-id.js +1 -0
  332. package/dist/policy-runtime.js +1 -0
  333. package/dist/{port-BADbLZU5.d.ts → port-hqGnoStS.d.ts} +6 -0
  334. package/dist/profiling.js +1 -0
  335. package/dist/purge-6ATBGT77.js +205 -0
  336. package/dist/purge-6ATBGT77.js.map +1 -0
  337. package/dist/qmd-recall-cache.d.ts +1 -1
  338. package/dist/qmd-recall-cache.js +1 -0
  339. package/dist/qmd.d.ts +2 -1
  340. package/dist/qmd.js +4 -3
  341. package/dist/reasoning-trace-recall.js +1 -0
  342. package/dist/reasoning-trace-types.js +1 -0
  343. package/dist/recall-audit-anomaly.js +1 -0
  344. package/dist/recall-audit.js +1 -0
  345. package/dist/recall-disclosure-escalation.d.ts +84 -0
  346. package/dist/recall-disclosure-escalation.js +14 -0
  347. package/dist/recall-disclosure-escalation.js.map +1 -0
  348. package/dist/recall-explain-renderer.js +4 -1
  349. package/dist/recall-mmr.js +1 -0
  350. package/dist/recall-qos.js +1 -0
  351. package/dist/recall-query-policy.js +1 -0
  352. package/dist/recall-state.d.ts +7 -0
  353. package/dist/recall-state.js +2 -1
  354. package/dist/recall-tag-filter.d.ts +56 -0
  355. package/dist/recall-tag-filter.js +14 -0
  356. package/dist/recall-tag-filter.js.map +1 -0
  357. package/dist/recall-tokenization.js +1 -0
  358. package/dist/recall-xray-cli.d.ts +9 -2
  359. package/dist/recall-xray-cli.js +9 -4
  360. package/dist/recall-xray-renderer.js +4 -1
  361. package/dist/recall-xray.d.ts +116 -2
  362. package/dist/recall-xray.js +9 -3
  363. package/dist/reconstruct.js +1 -0
  364. package/dist/release-changelog.js +2 -0
  365. package/dist/release-changelog.js.map +1 -1
  366. package/dist/relevance.js +1 -0
  367. package/dist/rerank.js +1 -0
  368. package/dist/{resolution-QBTDHTG7.js → resolution-YGIBORXI.js} +2 -1
  369. package/dist/{resolution-QBTDHTG7.js.map → resolution-YGIBORXI.js.map} +1 -1
  370. package/dist/resolve-auth-token.d.ts +51 -0
  371. package/dist/resolve-auth-token.js +12 -0
  372. package/dist/resolve-auth-token.js.map +1 -0
  373. package/dist/resolve-provider-secret.d.ts +9 -1
  374. package/dist/resolve-provider-secret.js +4 -1
  375. package/dist/resume-bundles.js +4 -3
  376. package/dist/retrieval-agents.d.ts +1 -1
  377. package/dist/retrieval-agents.js +1 -0
  378. package/dist/retrieval-tiers.js +1 -0
  379. package/dist/retrieval.js +1 -0
  380. package/dist/sanitize.js +1 -0
  381. package/dist/schemas.d.ts +37 -24
  382. package/dist/schemas.js +2 -1
  383. package/dist/sdk-compat.js +1 -0
  384. package/dist/sdk-compat.js.map +1 -1
  385. package/dist/secure-store-4R2GSO7S.js +156 -0
  386. package/dist/secure-store-4R2GSO7S.js.map +1 -0
  387. package/dist/semantic-chunking.js +1 -0
  388. package/dist/{semantic-consolidation-CxJU6MJk.d.ts → semantic-consolidation-ByBXb-sf.d.ts} +3 -3
  389. package/dist/semantic-consolidation.d.ts +2 -2
  390. package/dist/semantic-consolidation.js +11 -6
  391. package/dist/semantic-rule-promotion.d.ts +1 -1
  392. package/dist/semantic-rule-promotion.js +9 -6
  393. package/dist/semantic-rule-verifier.d.ts +1 -1
  394. package/dist/semantic-rule-verifier.js +9 -6
  395. package/dist/session-integrity.js +1 -0
  396. package/dist/session-observer-bands.js +1 -0
  397. package/dist/session-observer-state.js +1 -0
  398. package/dist/session-toggles.js +2 -0
  399. package/dist/session-toggles.js.map +1 -1
  400. package/dist/signal.js +1 -0
  401. package/dist/skills-registry.js +2 -0
  402. package/dist/skills-registry.js.map +1 -1
  403. package/dist/source-attribution.js +1 -0
  404. package/dist/state-NCHQ4TRG.js +8 -0
  405. package/dist/state-NCHQ4TRG.js.map +1 -0
  406. package/dist/state-store-3EH7HYIN.js +16 -0
  407. package/dist/state-store-3EH7HYIN.js.map +1 -0
  408. package/dist/storage.d.ts +76 -2
  409. package/dist/storage.js +8 -5
  410. package/dist/store-contract.js +1 -0
  411. package/dist/summarizer.js +5 -4
  412. package/dist/summary-snapshot.js +1 -0
  413. package/dist/temporal-index.js +1 -0
  414. package/dist/temporal-supersession.d.ts +1 -1
  415. package/dist/temporal-supersession.js +2 -1
  416. package/dist/temporal-validity.d.ts +52 -0
  417. package/dist/temporal-validity.js +14 -0
  418. package/dist/temporal-validity.js.map +1 -0
  419. package/dist/threading.js +1 -0
  420. package/dist/tier-migration.d.ts +2 -2
  421. package/dist/tier-migration.js +1 -0
  422. package/dist/tier-routing.js +1 -0
  423. package/dist/tier-stats-62ZVDFKS.js +152 -0
  424. package/dist/tier-stats-62ZVDFKS.js.map +1 -0
  425. package/dist/tmt.js +1 -0
  426. package/dist/tokens.js +1 -0
  427. package/dist/topics.js +1 -0
  428. package/dist/trace-C5ETWBEF.js +290 -0
  429. package/dist/trace-C5ETWBEF.js.map +1 -0
  430. package/dist/transcript.js +1 -0
  431. package/dist/trust-zones.js +1 -0
  432. package/dist/tui-RI7P6PBS.js +13 -0
  433. package/dist/tui-RI7P6PBS.js.map +1 -0
  434. package/dist/types-V3FJ26TF.js +30 -0
  435. package/dist/types-V3FJ26TF.js.map +1 -0
  436. package/dist/types.d.ts +634 -9
  437. package/dist/types.js +10 -3
  438. package/dist/utility-learner.js +1 -0
  439. package/dist/utility-runtime.js +1 -0
  440. package/dist/utility-telemetry.js +1 -0
  441. package/dist/verified-recall.js +9 -6
  442. package/dist/version-utils.js +1 -0
  443. package/dist/whitespace.js +1 -0
  444. package/dist/work-product-ledger.js +1 -0
  445. package/package.json +2 -1
  446. package/dist/access-service-Br8ZydTK.d.ts +0 -827
  447. package/dist/chunk-3OGMS3PE.js.map +0 -1
  448. package/dist/chunk-3YGHKTBF.js.map +0 -1
  449. package/dist/chunk-6PFRXT4K.js.map +0 -1
  450. package/dist/chunk-6YJHX2DL.js.map +0 -1
  451. package/dist/chunk-BECYBZLX.js.map +0 -1
  452. package/dist/chunk-C2EFFULQ.js.map +0 -1
  453. package/dist/chunk-CUPFXL3J.js.map +0 -1
  454. package/dist/chunk-DIXB44VE.js.map +0 -1
  455. package/dist/chunk-F5VP6YCB.js.map +0 -1
  456. package/dist/chunk-FVA6TGI3.js.map +0 -1
  457. package/dist/chunk-GA5P7RST.js.map +0 -1
  458. package/dist/chunk-KVBLZUKV.js.map +0 -1
  459. package/dist/chunk-L7IXWRYE.js.map +0 -1
  460. package/dist/chunk-LOIMBRDE.js.map +0 -1
  461. package/dist/chunk-LTCGGW2D.js +0 -14
  462. package/dist/chunk-LTCGGW2D.js.map +0 -1
  463. package/dist/chunk-NZLQTHS5.js.map +0 -1
  464. package/dist/chunk-OC5OXUQ4.js.map +0 -1
  465. package/dist/chunk-PVPWZSSI.js.map +0 -1
  466. package/dist/chunk-SPI27QT6.js.map +0 -1
  467. package/dist/chunk-STGWEHYR.js.map +0 -1
  468. package/dist/chunk-TP4FZJIZ.js.map +0 -1
  469. package/dist/chunk-ULYOGL6R.js.map +0 -1
  470. package/dist/chunk-UWB5LMWY.js.map +0 -1
  471. package/dist/chunk-VBVG2M5G.js.map +0 -1
  472. package/dist/chunk-VDX363PS.js.map +0 -1
  473. package/dist/chunk-WCLICCGB.js.map +0 -1
  474. package/dist/chunk-X6GF3FX2.js +0 -26
  475. package/dist/chunk-X6GF3FX2.js.map +0 -1
  476. package/dist/chunk-XXVWLXSG.js.map +0 -1
  477. package/dist/chunk-Y7R2XJ5Q.js.map +0 -1
  478. package/dist/chunk-ZAIM4TUE.js.map +0 -1
  479. /package/dist/{contradiction-review-WIUBAR52.js.map → capsule-cli.js.map} +0 -0
  480. /package/dist/{engine-72LSIWQP.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  481. /package/dist/{chunk-TMYO7B5P.js.map → chunk-47WOM4YW.js.map} +0 -0
  482. /package/dist/{chunk-DG6YMRDC.js.map → chunk-B2TL6GA2.js.map} +0 -0
  483. /package/dist/{chunk-AYXIPSZO.js.map → chunk-CRU27Q4J.js.map} +0 -0
  484. /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
  485. /package/dist/{chunk-NBVAS5MT.js.map → chunk-R2L7SUX2.js.map} +0 -0
@@ -131,13 +131,23 @@ async function applyTemporalSupersession(args) {
131
131
  Number.isFinite(argCreatedMs) ? argCreatedMs : 0
132
132
  );
133
133
  const supersededAt = new Date(maxMs).toISOString();
134
+ let invalidAtPatch;
135
+ if (!fresh.frontmatter.invalid_at) {
136
+ if (args.useCallerTimestamp) {
137
+ invalidAtPatch = persistedCreatedAt;
138
+ } else {
139
+ const newValidAt = newMemoryFile?.frontmatter.valid_at?.trim();
140
+ invalidAtPatch = newValidAt && newValidAt.length > 0 ? newValidAt : persistedCreatedAt;
141
+ }
142
+ }
134
143
  const wrote = await args.storage.writeMemoryFrontmatter(
135
144
  fresh,
136
145
  {
137
146
  status: "superseded",
138
147
  supersededBy: args.newMemoryId,
139
148
  supersededAt,
140
- updated: supersededAt
149
+ updated: supersededAt,
150
+ ...invalidAtPatch ? { invalid_at: invalidAtPatch } : {}
141
151
  },
142
152
  {
143
153
  actor: "temporal-supersession",
@@ -177,4 +187,4 @@ export {
177
187
  applyTemporalSupersession,
178
188
  shouldFilterSupersededFromRecall
179
189
  };
180
- //# sourceMappingURL=chunk-W6SL7OFG.js.map
190
+ //# sourceMappingURL=chunk-ZTSE2ZJ6.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/temporal-supersession.ts"],"sourcesContent":["/**\n * Temporal Supersession (issue #375)\n *\n * When a new fact lands with `structuredAttributes` keyed on a known\n * `entityRef`, any prior fact whose supersession key collides with the new\n * fact's key is marked `status: \"superseded\"` and linked via\n * `supersededBy` / `supersededAt`. Recall filters those superseded memories\n * by default so agents see only the \"current\" value per entity attribute.\n *\n * The algorithm is intentionally O(N) over the memory corpus per write, but\n * skips cheaply when the new fact has no structuredAttributes. It reuses the\n * cached `readAllMemories()` path so cost is amortized with the rest of the\n * write pipeline.\n */\nimport type { MemoryFile, MemoryFrontmatter } from \"./types.js\";\nimport type { StorageManager } from \"./storage.js\";\nimport { log } from \"./logger.js\";\n\n/**\n * Shared normalization for supersession key components.\n *\n * Trims surrounding whitespace, lowercases, then collapses any run of\n * whitespace OR hyphens to a single hyphen, and strips any leading/trailing\n * hyphens that result. Both `computeSupersessionKey` and\n * `lookupAttributeByNormalizedKey` must use this so that keys produced at\n * write time and keys used at lookup time are identical regardless of how\n * the LLM encoded whitespace, hyphens, or casing (Finding B fix).\n *\n * Symmetry guarantee: `\"foo bar\"`, `\"foo-bar\"`, `\"foo - bar\"`, and\n * `\"foo bar\"` all canonicalize to `\"foo-bar\"`.\n *\n * Exported so external tests can verify the canonical form.\n */\nexport function normalizeSupersessionKey(raw: string): string {\n return raw\n .trim()\n .toLowerCase()\n .replace(/[\\s\\-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\n/**\n * Stable supersession key for an (entityRef, attributeName) pair.\n *\n * The algorithm is:\n * - normalize the entityRef (trim, lower-case, collapse whitespace)\n * - normalize the attributeName the same way\n * - join with `::`\n *\n * Exported so tests and tools can recompute it without depending on storage.\n */\nexport function computeSupersessionKey(\n entityRef: string | undefined,\n attributeName: string,\n): string | null {\n if (!entityRef || typeof entityRef !== \"string\") return null;\n if (!attributeName || typeof attributeName !== \"string\") return null;\n const entity = normalizeSupersessionKey(entityRef);\n const attr = normalizeSupersessionKey(attributeName);\n if (entity.length === 0 || attr.length === 0) return null;\n return `${entity}::${attr}`;\n}\n\n/**\n * Compute the full set of supersession keys for a fact with structured\n * attributes. Returns an empty array if no keys can be derived.\n */\nexport function supersessionKeysForFact(spec: {\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n}): string[] {\n if (!spec.entityRef) return [];\n if (!spec.structuredAttributes) return [];\n const keys: string[] = [];\n for (const attrName of Object.keys(spec.structuredAttributes)) {\n const key = computeSupersessionKey(spec.entityRef, attrName);\n if (key) keys.push(key);\n }\n return keys;\n}\n\n/**\n * Look up a structured-attribute value by a raw key, normalizing both sides\n * with `normalizeSupersessionKey` before comparing. This ensures that keys\n * written by the LLM with mixed case, surrounding whitespace, or internal\n * whitespace (e.g. `\"City\"`, `\" city \"`, `\"job title\"`, `\"job-title\"`)\n * are all matched against normalized keys produced by `computeSupersessionKey`\n * (Finding B fix — uses the same helper so both sides are identical).\n *\n * The storage format is NOT changed — we only normalize at lookup time.\n */\nexport function lookupAttributeByNormalizedKey(\n attributes: Record<string, unknown>,\n rawKey: string,\n): unknown {\n const normalizedTarget = normalizeSupersessionKey(rawKey);\n for (const [k, v] of Object.entries(attributes)) {\n if (normalizeSupersessionKey(k) === normalizedTarget) return v;\n }\n return undefined;\n}\n\n/**\n * Decide whether an existing memory should be superseded by a newly-written\n * memory that carries the supplied supersession key set.\n *\n * Only memories that:\n * - are currently `active`\n * - share an `entityRef` with the new fact\n * - share at least one supersession key with the new fact\n * - are older than the new fact\n * - have a conflicting value (different string) for the overlapping key\n * are eligible. This keeps supersession local to the attribute that actually\n * changed — if fact A sets `{city: Austin, tool: vim}` and fact B sets\n * `{city: NYC}`, only the city attribute is superseded, not the tool.\n */\nexport function shouldSupersedeExisting(args: {\n candidate: MemoryFrontmatter;\n newEntityRef: string;\n newAttributes: Record<string, string>;\n newCreatedAt: string;\n newMemoryId: string;\n}): { matchedKeys: string[] } | null {\n const { candidate, newEntityRef, newAttributes, newCreatedAt, newMemoryId } = args;\n\n if (candidate.id === newMemoryId) return null;\n if (candidate.status && candidate.status !== \"active\") return null;\n if (!candidate.entityRef) return null;\n if (!candidate.structuredAttributes) return null;\n\n // Reuse the shared `normalizeSupersessionKey` helper so this comparison\n // cannot drift from the canonical form used to build supersession keys\n // elsewhere in this file.\n const candidateEntityNorm = normalizeSupersessionKey(candidate.entityRef);\n const newEntityNorm = normalizeSupersessionKey(newEntityRef);\n if (candidateEntityNorm !== newEntityNorm) return null;\n\n // Must be older than the new fact — equal timestamps are ignored to avoid\n // races within the same millisecond.\n const candidateCreated = Date.parse(candidate.created);\n const newCreated = Date.parse(newCreatedAt);\n if (!Number.isFinite(candidateCreated) || !Number.isFinite(newCreated)) return null;\n if (candidateCreated >= newCreated) return null;\n\n const matchedKeys: string[] = [];\n for (const [attrName, newValue] of Object.entries(newAttributes)) {\n // Use normalized key lookup so mixed-case or whitespace-padded keys\n // stored by the LLM are matched correctly (Finding 2 fix).\n const candidateValue = lookupAttributeByNormalizedKey(\n candidate.structuredAttributes,\n attrName,\n );\n if (candidateValue === undefined) continue;\n // Only supersede on conflicting values — identical values are a no-op.\n if (normalizeValue(String(candidateValue)) === normalizeValue(newValue)) continue;\n const key = computeSupersessionKey(newEntityRef, attrName);\n if (key) matchedKeys.push(key);\n }\n\n return matchedKeys.length > 0 ? { matchedKeys } : null;\n}\n\nfunction normalizeValue(v: string): string {\n return v.trim().toLowerCase();\n}\n\nexport interface TemporalSupersessionResult {\n supersededIds: string[];\n matchedKeys: string[];\n}\n\n/**\n * Scan existing memories and mark any that are superseded by the\n * just-written memory. Fails open on I/O errors — the new memory is already\n * on disk, and supersession is a best-effort hygiene step.\n */\nexport async function applyTemporalSupersession(args: {\n storage: StorageManager;\n newMemoryId: string;\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n createdAt: string;\n enabled: boolean;\n /**\n * When true, skip the persisted `frontmatter.created` lookup and use\n * `args.createdAt` directly as the ordering anchor. Set this on the\n * hash-dedup short-circuit path where `newMemoryId` points to an existing\n * OLD fact (no new file is written) and its persisted timestamp would be\n * stale relative to the incoming promotion event (PR #402 Finding Uyui).\n */\n useCallerTimestamp?: boolean;\n}): Promise<TemporalSupersessionResult> {\n const empty: TemporalSupersessionResult = { supersededIds: [], matchedKeys: [] };\n if (!args.enabled) return empty;\n if (!args.entityRef) return empty;\n if (!args.structuredAttributes) return empty;\n if (Object.keys(args.structuredAttributes).length === 0) return empty;\n\n const newKeys = supersessionKeysForFact({\n entityRef: args.entityRef,\n structuredAttributes: args.structuredAttributes,\n });\n if (newKeys.length === 0) return empty;\n\n let hotMemories: MemoryFile[];\n try {\n hotMemories = await args.storage.readAllMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllMemories failed: ${err}`);\n return empty;\n }\n\n // Finding 1 fix: use the on-disk `frontmatter.created` of the newly-written\n // memory rather than a wall-clock timestamp sampled after `writeMemory`\n // returns. In concurrent writers the two can differ by enough to cause\n // wrong-direction supersession. If the memory is not yet visible in the\n // cache (edge case during fast concurrent writes) fall back to args.createdAt.\n //\n // PR #402 round-12 (Finding Uyui): on the hash-dedup early-return path the\n // caller supplies the OLD matching fact's id as `newMemoryId` (no new file is\n // written). That makes `newMemoryFile.frontmatter.created` an arbitrarily\n // old timestamp. When `args.useCallerTimestamp` is set the caller explicitly\n // opts out of the persisted-timestamp lookup so `args.createdAt` (the current\n // wall-clock) is used directly, keeping ordering correct regardless of how\n // old the matching fact is.\n const newMemoryFile = hotMemories.find((m) => m.frontmatter.id === args.newMemoryId);\n const persistedCreatedAt = args.useCallerTimestamp\n ? args.createdAt\n : (newMemoryFile?.frontmatter.created ?? args.createdAt);\n\n const supersededIds: string[] = [];\n const matchedKeys = new Set<string>();\n\n // Process hot then cold. Hot-then-cold ordering is safer because hot\n // writes are more frequent and the CAS re-read guards against double-writes.\n // A Set<string> of already-processed ids ensures that a memory visible in\n // both tiers (same logical memory with different filesystem paths during a\n // migration race) is processed at most once. Keying on `frontmatter.id`\n // is correct because the same logical memory has the same id regardless of\n // which tier's directory it currently lives in (PR #402 Finding 1 fix).\n // Fall back to path-based keying when id is absent (defensive).\n const processedIds = new Set<string>();\n\n // Finding UOGi fix (round-6): readAllColdMemories() performs a full uncached\n // recursive directory scan of cold/. After Finding UTsP broadened the scan\n // to cover the entire cold root (not just facts/+corrections/), the per-call\n // cost grows with the cold tree size.\n //\n // The fix is a TTL-based in-memory cache inside StorageManager\n // (readAllColdMemories caches its result for COLD_SCAN_CACHE_TTL_MS) that is\n // shared across consecutive supersession calls within the same write burst.\n // The cache is invalidated automatically on any hot→cold demotion (which\n // calls invalidateAllMemoriesCache, which also clears the cold cache) and\n // expires after the TTL as a safety net.\n //\n // This means back-to-back structured-attribute writes in the same burst\n // (e.g. batch extraction) pay the cold I/O cost at most once, not N times.\n // Correctness is preserved because the cache TTL ensures eventual consistency\n // and the invalidation hook covers the hot→cold path.\n\n let coldMemories: MemoryFile[];\n try {\n coldMemories = await args.storage.readAllColdMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllColdMemories failed: ${err}`);\n coldMemories = [];\n }\n\n // Combine hot and cold memories into a single scan. New memory itself is\n // excluded inline. We do NOT skip cold scan when hot produced zero\n // supersessions — the P1 finding is precisely that stale cold facts leak\n // when hot has no hits.\n const allCandidates: MemoryFile[] = [...hotMemories, ...coldMemories];\n\n for (const memory of allCandidates) {\n if (memory.frontmatter.id === args.newMemoryId) continue;\n const dedupeKey = memory.frontmatter.id ?? memory.path;\n if (processedIds.has(dedupeKey)) continue;\n // NOTE: do NOT call processedIds.add(dedupeKey) here. We defer marking\n // the id as processed until AFTER the CAS re-read succeeds. If we mark\n // it here and the re-read fails (e.g. the hot entry has already been\n // migrated to cold storage), the same logical id that appears later in\n // the cold tier scan would be silently skipped, leaving a stale cold\n // fact unsuperseded. Deferring ensures that a failed primary-tier read\n // grants the alternate tier a chance to process the same id (PR #402\n // round-6 Finding 1 fix).\n\n const decision = shouldSupersedeExisting({\n candidate: memory.frontmatter,\n newEntityRef: args.entityRef,\n newAttributes: args.structuredAttributes,\n newCreatedAt: persistedCreatedAt,\n newMemoryId: args.newMemoryId,\n });\n if (!decision) {\n // No supersession decision — safe to mark as processed now so the\n // alternate tier doesn't re-evaluate an identical non-matching entry.\n processedIds.add(dedupeKey);\n continue;\n }\n\n try {\n // CAS-style re-read immediately before the write. `readAllMemories()`\n // is a snapshot — with concurrent writers, another run may have already\n // superseded this candidate since we loaded it. If we blindly trust the\n // snapshot we can clobber a newer `supersededBy` link with a stale one.\n //\n // File storage offers no true locking, so the best we can do is:\n // 1. re-read the exact file we're about to mutate\n // 2. verify status is still \"active\" and no `supersededBy` is set\n // 3. only then issue the write\n // If the re-read shows a newer concurrent writer beat us to it, skip.\n // This CAS pattern applies equally to hot and cold tier candidates.\n // Mark as processed AFTER confirming the candidate is readable so that\n // a migration-race read failure on the hot entry does not silently\n // prevent the cold entry from being evaluated (Finding 1, round 6).\n const fresh = await args.storage.readMemoryByPath(memory.path);\n if (!fresh) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: no longer readable at ${memory.path} — leaving id available for alternate tier`,\n );\n // Do NOT add to processedIds — allow the cold-tier copy to be\n // evaluated in the next iteration of the same scan.\n continue;\n }\n // Candidate is readable — mark the id as processed now to prevent the\n // alternate tier from double-writing.\n processedIds.add(dedupeKey);\n const freshStatus = fresh.frontmatter.status ?? \"active\";\n if (freshStatus !== \"active\" || fresh.frontmatter.supersededBy) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: already superseded by concurrent writer`,\n );\n continue;\n }\n\n // Finding 2 fix: the `supersededAt` / `updated` timestamps written to the\n // old fact must never run backwards relative to its own persisted\n // `created` timestamp. If the caller-supplied `args.createdAt` (which\n // represents \"when the new replacing fact was authored\") is earlier than\n // either the new fact's persisted `created` (T_new) or the old fact's\n // persisted `created` (T_old), we'd be writing a nonsensical\n // `supersededAt` that precedes the old memory's own creation. Clamp to\n // the monotonic maximum so time only moves forward.\n // This monotonic clamp is applied for both hot and cold tier writes.\n const oldCreatedMs = new Date(fresh.frontmatter.created).getTime();\n const newCreatedMs = new Date(persistedCreatedAt).getTime();\n const argCreatedMs = new Date(args.createdAt).getTime();\n const maxMs = Math.max(\n Number.isFinite(oldCreatedMs) ? oldCreatedMs : 0,\n Number.isFinite(newCreatedMs) ? newCreatedMs : 0,\n Number.isFinite(argCreatedMs) ? argCreatedMs : 0,\n );\n const supersededAt = new Date(maxMs).toISOString();\n\n const wrote = await args.storage.writeMemoryFrontmatter(\n fresh,\n {\n status: \"superseded\",\n supersededBy: args.newMemoryId,\n supersededAt,\n updated: supersededAt,\n },\n {\n actor: \"temporal-supersession\",\n reasonCode: \"structured-attribute-update\",\n relatedMemoryIds: [args.newMemoryId],\n },\n );\n if (wrote) {\n supersededIds.push(memory.frontmatter.id);\n for (const key of decision.matchedKeys) matchedKeys.add(key);\n }\n } catch (err) {\n log.warn(\n `temporal-supersession: failed to mark ${memory.frontmatter.id} superseded: ${err}`,\n );\n }\n }\n\n if (supersededIds.length > 0) {\n log.debug(\n `temporal-supersession: marked ${supersededIds.length} memories superseded by ${args.newMemoryId} (keys=${Array.from(matchedKeys).join(\",\")})`,\n );\n }\n\n return { supersededIds, matchedKeys: Array.from(matchedKeys) };\n}\n\n/**\n * Recall-side filter: returns true when the candidate should be excluded\n * from recall because it has been temporally superseded. When\n * `includeInRecall` is true, this always returns false (the fact is kept),\n * matching the audit/history opt-in described in the config.\n */\nexport function shouldFilterSupersededFromRecall(\n frontmatter: MemoryFrontmatter,\n options: { enabled: boolean; includeInRecall: boolean },\n): boolean {\n if (!options.enabled) return false;\n if (options.includeInRecall) return false;\n return frontmatter.status === \"superseded\";\n}\n"],"mappings":";;;;;AAiCO,SAAS,yBAAyB,KAAqB;AAC5D,SAAO,IACJ,KAAK,EACL,YAAY,EACZ,QAAQ,YAAY,GAAG,EACvB,QAAQ,YAAY,EAAE;AAC3B;AAYO,SAAS,uBACd,WACA,eACe;AAC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Q,KAAK;AAAA,QACjB,OAAO,SAAS,YAAY,IAAI,eAAe;AAAA,QAC/C,OAAO,SAAS,YAAY,IAAI,eAAe;AAAA,QAC/C,OAAO,SAAS,YAAY,IAAI,eAAe;AAAA,MACjD;AACA,YAAM,eAAe,IAAI,KAAK,KAAK,EAAE,YAAY;AAEjD,YAAM,QAAQ,MAAM,KAAK,QAAQ;AAAA,QAC/B;AAAA,QACA;AAAA,UACE,QAAQ;AAAA,UACR,cAAc,KAAK;AAAA,UACnB;AAAA,UACA,SAAS;AAAA,QACX;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,YAAY;AAAA,UACZ,kBAAkB,CAAC,KAAK,WAAW;AAAA,QACrC;AAAA,MACF;AACA,UAAI,OAAO;AACT,sBAAc,KAAK,OAAO,YAAY,EAAE;AACxC,mBAAW,OAAO,SAAS,YAAa,aAAY,IAAI,GAAG;AAAA,MAC7D;AAAA,IACF,SAAS,KAAK;AACZ,UAAI;AAAA,QACF,yCAAyC,OAAO,YAAY,EAAE,gBAAgB,GAAG;AAAA,MACnF;AAAA,IACF;AAAA,EACF;AAEA,MAAI,cAAc,SAAS,GAAG;AAC5B,QAAI;AAAA,MACF,iCAAiC,cAAc,MAAM,2BAA2B,KAAK,WAAW,UAAU,MAAM,KAAK,WAAW,EAAE,KAAK,GAAG,CAAC;AAAA,IAC7I;AAAA,EACF;AAEA,SAAO,EAAE,eAAe,aAAa,MAAM,KAAK,WAAW,EAAE;AAC/D;AAQO,SAAS,iCACd,aACA,SACS;AACT,MAAI,CAAC,QAAQ,QAAS,QAAO;AAC7B,MAAI,QAAQ,gBAAiB,QAAO;AACpC,SAAO,YAAY,WAAW;AAChC;","names":[]}
1
+ {"version":3,"sources":["../src/temporal-supersession.ts"],"sourcesContent":["/**\n * Temporal Supersession (issue #375)\n *\n * When a new fact lands with `structuredAttributes` keyed on a known\n * `entityRef`, any prior fact whose supersession key collides with the new\n * fact's key is marked `status: \"superseded\"` and linked via\n * `supersededBy` / `supersededAt`. Recall filters those superseded memories\n * by default so agents see only the \"current\" value per entity attribute.\n *\n * The algorithm is intentionally O(N) over the memory corpus per write, but\n * skips cheaply when the new fact has no structuredAttributes. It reuses the\n * cached `readAllMemories()` path so cost is amortized with the rest of the\n * write pipeline.\n */\nimport type { MemoryFile, MemoryFrontmatter } from \"./types.js\";\nimport type { StorageManager } from \"./storage.js\";\nimport { log } from \"./logger.js\";\n\n/**\n * Shared normalization for supersession key components.\n *\n * Trims surrounding whitespace, lowercases, then collapses any run of\n * whitespace OR hyphens to a single hyphen, and strips any leading/trailing\n * hyphens that result. Both `computeSupersessionKey` and\n * `lookupAttributeByNormalizedKey` must use this so that keys produced at\n * write time and keys used at lookup time are identical regardless of how\n * the LLM encoded whitespace, hyphens, or casing (Finding B fix).\n *\n * Symmetry guarantee: `\"foo bar\"`, `\"foo-bar\"`, `\"foo - bar\"`, and\n * `\"foo bar\"` all canonicalize to `\"foo-bar\"`.\n *\n * Exported so external tests can verify the canonical form.\n */\nexport function normalizeSupersessionKey(raw: string): string {\n return raw\n .trim()\n .toLowerCase()\n .replace(/[\\s\\-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\n/**\n * Stable supersession key for an (entityRef, attributeName) pair.\n *\n * The algorithm is:\n * - normalize the entityRef (trim, lower-case, collapse whitespace)\n * - normalize the attributeName the same way\n * - join with `::`\n *\n * Exported so tests and tools can recompute it without depending on storage.\n */\nexport function computeSupersessionKey(\n entityRef: string | undefined,\n attributeName: string,\n): string | null {\n if (!entityRef || typeof entityRef !== \"string\") return null;\n if (!attributeName || typeof attributeName !== \"string\") return null;\n const entity = normalizeSupersessionKey(entityRef);\n const attr = normalizeSupersessionKey(attributeName);\n if (entity.length === 0 || attr.length === 0) return null;\n return `${entity}::${attr}`;\n}\n\n/**\n * Compute the full set of supersession keys for a fact with structured\n * attributes. Returns an empty array if no keys can be derived.\n */\nexport function supersessionKeysForFact(spec: {\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n}): string[] {\n if (!spec.entityRef) return [];\n if (!spec.structuredAttributes) return [];\n const keys: string[] = [];\n for (const attrName of Object.keys(spec.structuredAttributes)) {\n const key = computeSupersessionKey(spec.entityRef, attrName);\n if (key) keys.push(key);\n }\n return keys;\n}\n\n/**\n * Look up a structured-attribute value by a raw key, normalizing both sides\n * with `normalizeSupersessionKey` before comparing. This ensures that keys\n * written by the LLM with mixed case, surrounding whitespace, or internal\n * whitespace (e.g. `\"City\"`, `\" city \"`, `\"job title\"`, `\"job-title\"`)\n * are all matched against normalized keys produced by `computeSupersessionKey`\n * (Finding B fix — uses the same helper so both sides are identical).\n *\n * The storage format is NOT changed — we only normalize at lookup time.\n */\nexport function lookupAttributeByNormalizedKey(\n attributes: Record<string, unknown>,\n rawKey: string,\n): unknown {\n const normalizedTarget = normalizeSupersessionKey(rawKey);\n for (const [k, v] of Object.entries(attributes)) {\n if (normalizeSupersessionKey(k) === normalizedTarget) return v;\n }\n return undefined;\n}\n\n/**\n * Decide whether an existing memory should be superseded by a newly-written\n * memory that carries the supplied supersession key set.\n *\n * Only memories that:\n * - are currently `active`\n * - share an `entityRef` with the new fact\n * - share at least one supersession key with the new fact\n * - are older than the new fact\n * - have a conflicting value (different string) for the overlapping key\n * are eligible. This keeps supersession local to the attribute that actually\n * changed — if fact A sets `{city: Austin, tool: vim}` and fact B sets\n * `{city: NYC}`, only the city attribute is superseded, not the tool.\n */\nexport function shouldSupersedeExisting(args: {\n candidate: MemoryFrontmatter;\n newEntityRef: string;\n newAttributes: Record<string, string>;\n newCreatedAt: string;\n newMemoryId: string;\n}): { matchedKeys: string[] } | null {\n const { candidate, newEntityRef, newAttributes, newCreatedAt, newMemoryId } = args;\n\n if (candidate.id === newMemoryId) return null;\n if (candidate.status && candidate.status !== \"active\") return null;\n if (!candidate.entityRef) return null;\n if (!candidate.structuredAttributes) return null;\n\n // Reuse the shared `normalizeSupersessionKey` helper so this comparison\n // cannot drift from the canonical form used to build supersession keys\n // elsewhere in this file.\n const candidateEntityNorm = normalizeSupersessionKey(candidate.entityRef);\n const newEntityNorm = normalizeSupersessionKey(newEntityRef);\n if (candidateEntityNorm !== newEntityNorm) return null;\n\n // Must be older than the new fact — equal timestamps are ignored to avoid\n // races within the same millisecond.\n const candidateCreated = Date.parse(candidate.created);\n const newCreated = Date.parse(newCreatedAt);\n if (!Number.isFinite(candidateCreated) || !Number.isFinite(newCreated)) return null;\n if (candidateCreated >= newCreated) return null;\n\n const matchedKeys: string[] = [];\n for (const [attrName, newValue] of Object.entries(newAttributes)) {\n // Use normalized key lookup so mixed-case or whitespace-padded keys\n // stored by the LLM are matched correctly (Finding 2 fix).\n const candidateValue = lookupAttributeByNormalizedKey(\n candidate.structuredAttributes,\n attrName,\n );\n if (candidateValue === undefined) continue;\n // Only supersede on conflicting values — identical values are a no-op.\n if (normalizeValue(String(candidateValue)) === normalizeValue(newValue)) continue;\n const key = computeSupersessionKey(newEntityRef, attrName);\n if (key) matchedKeys.push(key);\n }\n\n return matchedKeys.length > 0 ? { matchedKeys } : null;\n}\n\nfunction normalizeValue(v: string): string {\n return v.trim().toLowerCase();\n}\n\nexport interface TemporalSupersessionResult {\n supersededIds: string[];\n matchedKeys: string[];\n}\n\n/**\n * Scan existing memories and mark any that are superseded by the\n * just-written memory. Fails open on I/O errors — the new memory is already\n * on disk, and supersession is a best-effort hygiene step.\n */\nexport async function applyTemporalSupersession(args: {\n storage: StorageManager;\n newMemoryId: string;\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n createdAt: string;\n enabled: boolean;\n /**\n * When true, skip the persisted `frontmatter.created` lookup and use\n * `args.createdAt` directly as the ordering anchor. Set this on the\n * hash-dedup short-circuit path where `newMemoryId` points to an existing\n * OLD fact (no new file is written) and its persisted timestamp would be\n * stale relative to the incoming promotion event (PR #402 Finding Uyui).\n */\n useCallerTimestamp?: boolean;\n}): Promise<TemporalSupersessionResult> {\n const empty: TemporalSupersessionResult = { supersededIds: [], matchedKeys: [] };\n if (!args.enabled) return empty;\n if (!args.entityRef) return empty;\n if (!args.structuredAttributes) return empty;\n if (Object.keys(args.structuredAttributes).length === 0) return empty;\n\n const newKeys = supersessionKeysForFact({\n entityRef: args.entityRef,\n structuredAttributes: args.structuredAttributes,\n });\n if (newKeys.length === 0) return empty;\n\n let hotMemories: MemoryFile[];\n try {\n hotMemories = await args.storage.readAllMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllMemories failed: ${err}`);\n return empty;\n }\n\n // Finding 1 fix: use the on-disk `frontmatter.created` of the newly-written\n // memory rather than a wall-clock timestamp sampled after `writeMemory`\n // returns. In concurrent writers the two can differ by enough to cause\n // wrong-direction supersession. If the memory is not yet visible in the\n // cache (edge case during fast concurrent writes) fall back to args.createdAt.\n //\n // PR #402 round-12 (Finding Uyui): on the hash-dedup early-return path the\n // caller supplies the OLD matching fact's id as `newMemoryId` (no new file is\n // written). That makes `newMemoryFile.frontmatter.created` an arbitrarily\n // old timestamp. When `args.useCallerTimestamp` is set the caller explicitly\n // opts out of the persisted-timestamp lookup so `args.createdAt` (the current\n // wall-clock) is used directly, keeping ordering correct regardless of how\n // old the matching fact is.\n const newMemoryFile = hotMemories.find((m) => m.frontmatter.id === args.newMemoryId);\n const persistedCreatedAt = args.useCallerTimestamp\n ? args.createdAt\n : (newMemoryFile?.frontmatter.created ?? args.createdAt);\n\n const supersededIds: string[] = [];\n const matchedKeys = new Set<string>();\n\n // Process hot then cold. Hot-then-cold ordering is safer because hot\n // writes are more frequent and the CAS re-read guards against double-writes.\n // A Set<string> of already-processed ids ensures that a memory visible in\n // both tiers (same logical memory with different filesystem paths during a\n // migration race) is processed at most once. Keying on `frontmatter.id`\n // is correct because the same logical memory has the same id regardless of\n // which tier's directory it currently lives in (PR #402 Finding 1 fix).\n // Fall back to path-based keying when id is absent (defensive).\n const processedIds = new Set<string>();\n\n // Finding UOGi fix (round-6): readAllColdMemories() performs a full uncached\n // recursive directory scan of cold/. After Finding UTsP broadened the scan\n // to cover the entire cold root (not just facts/+corrections/), the per-call\n // cost grows with the cold tree size.\n //\n // The fix is a TTL-based in-memory cache inside StorageManager\n // (readAllColdMemories caches its result for COLD_SCAN_CACHE_TTL_MS) that is\n // shared across consecutive supersession calls within the same write burst.\n // The cache is invalidated automatically on any hot→cold demotion (which\n // calls invalidateAllMemoriesCache, which also clears the cold cache) and\n // expires after the TTL as a safety net.\n //\n // This means back-to-back structured-attribute writes in the same burst\n // (e.g. batch extraction) pay the cold I/O cost at most once, not N times.\n // Correctness is preserved because the cache TTL ensures eventual consistency\n // and the invalidation hook covers the hot→cold path.\n\n let coldMemories: MemoryFile[];\n try {\n coldMemories = await args.storage.readAllColdMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllColdMemories failed: ${err}`);\n coldMemories = [];\n }\n\n // Combine hot and cold memories into a single scan. New memory itself is\n // excluded inline. We do NOT skip cold scan when hot produced zero\n // supersessions — the P1 finding is precisely that stale cold facts leak\n // when hot has no hits.\n const allCandidates: MemoryFile[] = [...hotMemories, ...coldMemories];\n\n for (const memory of allCandidates) {\n if (memory.frontmatter.id === args.newMemoryId) continue;\n const dedupeKey = memory.frontmatter.id ?? memory.path;\n if (processedIds.has(dedupeKey)) continue;\n // NOTE: do NOT call processedIds.add(dedupeKey) here. We defer marking\n // the id as processed until AFTER the CAS re-read succeeds. If we mark\n // it here and the re-read fails (e.g. the hot entry has already been\n // migrated to cold storage), the same logical id that appears later in\n // the cold tier scan would be silently skipped, leaving a stale cold\n // fact unsuperseded. Deferring ensures that a failed primary-tier read\n // grants the alternate tier a chance to process the same id (PR #402\n // round-6 Finding 1 fix).\n\n const decision = shouldSupersedeExisting({\n candidate: memory.frontmatter,\n newEntityRef: args.entityRef,\n newAttributes: args.structuredAttributes,\n newCreatedAt: persistedCreatedAt,\n newMemoryId: args.newMemoryId,\n });\n if (!decision) {\n // No supersession decision — safe to mark as processed now so the\n // alternate tier doesn't re-evaluate an identical non-matching entry.\n processedIds.add(dedupeKey);\n continue;\n }\n\n try {\n // CAS-style re-read immediately before the write. `readAllMemories()`\n // is a snapshot — with concurrent writers, another run may have already\n // superseded this candidate since we loaded it. If we blindly trust the\n // snapshot we can clobber a newer `supersededBy` link with a stale one.\n //\n // File storage offers no true locking, so the best we can do is:\n // 1. re-read the exact file we're about to mutate\n // 2. verify status is still \"active\" and no `supersededBy` is set\n // 3. only then issue the write\n // If the re-read shows a newer concurrent writer beat us to it, skip.\n // This CAS pattern applies equally to hot and cold tier candidates.\n // Mark as processed AFTER confirming the candidate is readable so that\n // a migration-race read failure on the hot entry does not silently\n // prevent the cold entry from being evaluated (Finding 1, round 6).\n const fresh = await args.storage.readMemoryByPath(memory.path);\n if (!fresh) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: no longer readable at ${memory.path} — leaving id available for alternate tier`,\n );\n // Do NOT add to processedIds — allow the cold-tier copy to be\n // evaluated in the next iteration of the same scan.\n continue;\n }\n // Candidate is readable — mark the id as processed now to prevent the\n // alternate tier from double-writing.\n processedIds.add(dedupeKey);\n const freshStatus = fresh.frontmatter.status ?? \"active\";\n if (freshStatus !== \"active\" || fresh.frontmatter.supersededBy) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: already superseded by concurrent writer`,\n );\n continue;\n }\n\n // Finding 2 fix: the `supersededAt` / `updated` timestamps written to the\n // old fact must never run backwards relative to its own persisted\n // `created` timestamp. If the caller-supplied `args.createdAt` (which\n // represents \"when the new replacing fact was authored\") is earlier than\n // either the new fact's persisted `created` (T_new) or the old fact's\n // persisted `created` (T_old), we'd be writing a nonsensical\n // `supersededAt` that precedes the old memory's own creation. Clamp to\n // the monotonic maximum so time only moves forward.\n // This monotonic clamp is applied for both hot and cold tier writes.\n const oldCreatedMs = new Date(fresh.frontmatter.created).getTime();\n const newCreatedMs = new Date(persistedCreatedAt).getTime();\n const argCreatedMs = new Date(args.createdAt).getTime();\n const maxMs = Math.max(\n Number.isFinite(oldCreatedMs) ? oldCreatedMs : 0,\n Number.isFinite(newCreatedMs) ? newCreatedMs : 0,\n Number.isFinite(argCreatedMs) ? argCreatedMs : 0,\n );\n const supersededAt = new Date(maxMs).toISOString();\n\n // Issue #680 — explicit fact lifecycle. When the new fact\n // supersedes this one, set the predecessor's `invalid_at` to the\n // successor's effective valid_at. Skip when the predecessor\n // already carries an `invalid_at` so manual / earlier values\n // are preserved (idempotent).\n //\n // Codex P1 on PR #713: in the hash-dedup early-return path\n // (`useCallerTimestamp: true`), `newMemoryFile` is actually the\n // OLD matching fact — no new file was written — so its\n // `valid_at` is the predecessor's own old timestamp, not the\n // successor's effective time. Use `persistedCreatedAt`\n // directly in that path so the predecessor's invalid_at lines\n // up with the caller's wall-clock, not the matching fact's old\n // valid_at. The non-dedup path keeps the previous behavior\n // (prefer the new file's explicit valid_at, fall back to its\n // persisted created).\n let invalidAtPatch: string | undefined;\n if (!fresh.frontmatter.invalid_at) {\n if (args.useCallerTimestamp) {\n invalidAtPatch = persistedCreatedAt;\n } else {\n const newValidAt = newMemoryFile?.frontmatter.valid_at?.trim();\n invalidAtPatch =\n newValidAt && newValidAt.length > 0 ? newValidAt : persistedCreatedAt;\n }\n }\n const wrote = await args.storage.writeMemoryFrontmatter(\n fresh,\n {\n status: \"superseded\",\n supersededBy: args.newMemoryId,\n supersededAt,\n updated: supersededAt,\n ...(invalidAtPatch ? { invalid_at: invalidAtPatch } : {}),\n },\n {\n actor: \"temporal-supersession\",\n reasonCode: \"structured-attribute-update\",\n relatedMemoryIds: [args.newMemoryId],\n },\n );\n if (wrote) {\n supersededIds.push(memory.frontmatter.id);\n for (const key of decision.matchedKeys) matchedKeys.add(key);\n }\n } catch (err) {\n log.warn(\n `temporal-supersession: failed to mark ${memory.frontmatter.id} superseded: ${err}`,\n );\n }\n }\n\n if (supersededIds.length > 0) {\n log.debug(\n `temporal-supersession: marked ${supersededIds.length} memories superseded by ${args.newMemoryId} (keys=${Array.from(matchedKeys).join(\",\")})`,\n );\n }\n\n return { supersededIds, matchedKeys: Array.from(matchedKeys) };\n}\n\n/**\n * Recall-side filter: returns true when the candidate should be excluded\n * from recall because it has been temporally superseded. When\n * `includeInRecall` is true, this always returns false (the fact is kept),\n * matching the audit/history opt-in described in the config.\n */\nexport function shouldFilterSupersededFromRecall(\n frontmatter: MemoryFrontmatter,\n options: { enabled: boolean; includeInRecall: boolean },\n): boolean {\n if (!options.enabled) return false;\n if (options.includeInRecall) return false;\n return frontmatter.status === \"superseded\";\n}\n"],"mappings":";;;;;AAiCO,SAAS,yBAAyB,KAAqB;AAC5D,SAAO,IACJ,KAAK,EACL,YAAY,EACZ,QAAQ,YAAY,GAAG,EACvB,QAAQ,YAAY,EAAE;AAC3B;AAYO,SAAS,uBACd,WACA,eACe;AACf,MAAI,CAAC,aAAa,OAAO,cAAc,SAAU,QAAO;AACxD,MAAI,CAAC,iBAAiB,OAAO,kBAAkB,SAAU,QAAO;AAChE,QAAM,SAAS,yBAAyB,SAAS;AACjD,QAAM,OAAO,yBAAyB,aAAa;AACnD,MAAI,OAAO,WAAW,KAAK,KAAK,WAAW,EAAG,QAAO;AACrD,SAAO,GAAG,MAAM,KAAK,IAAI;AAC3B;AAMO,SAAS,wBAAwB,MAG3B;AACX,MAAI,CAAC,KAAK,UAAW,QAAO,CAAC;AAC7B,MAAI,CAAC,KAAK,qBAAsB,QAAO,CAAC;AACxC,QAAM,OAAiB,CAAC;AACxB,aAAW,YAAY,OAAO,KAAK,KAAK,oBAAoB,GAAG;AAC7D,UAAM,MAAM,uBAAuB,KAAK,WAAW,QAAQ;AAC3D,QAAI,IAAK,MAAK,KAAK,GAAG;AAAA,EACxB;AACA,SAAO;AACT;AAYO,SAAS,+BACd,YACA,QACS;AACT,QAAM,mBAAmB,yBAAyB,MAAM;AACxD,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,UAAU,GAAG;AAC/C,QAAI,yBAAyB,CAAC,MAAM,iBAAkB,QAAO;AAAA,EAC/D;AACA,SAAO;AACT;AAgBO,SAAS,wBAAwB,MAMH;AACnC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AAS,YAAa,aAAY,IAAI,GAAG;AAAA,MAC7D;AAAA,IACF,SAAS,KAAK;AACZ,UAAI;AAAA,QACF,yCAAyC,OAAO,YAAY,EAAE,gBAAgB,GAAG;AAAA,MACnF;AAAA,IACF;AAAA,EACF;AAEA,MAAI,cAAc,SAAS,GAAG;AAC5B,QAAI;AAAA,MACF,iCAAiC,cAAc,MAAM,2BAA2B,KAAK,WAAW,UAAU,MAAM,KAAK,WAAW,EAAE,KAAK,GAAG,CAAC;AAAA,IAC7I;AAAA,EACF;AAEA,SAAO,EAAE,eAAe,aAAa,MAAM,KAAK,WAAW,EAAE;AAC/D;AAQO,SAAS,iCACd,aACA,SACS;AACT,MAAI,CAAC,QAAQ,QAAS,QAAO;AAC7B,MAAI,QAAQ,gBAAiB,QAAO;AACpC,SAAO,YAAY,WAAW;AAChC;","names":[]}
package/dist/chunking.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  chunkContent,
4
4
  reassembleChunks
5
5
  } from "./chunk-4WMCPJWX.js";
6
+ import "./chunk-PZ5AY32C.js";
6
7
  export {
7
8
  DEFAULT_CHUNKING_CONFIG,
8
9
  chunkContent,
@@ -0,0 +1,28 @@
1
+ import {
2
+ AES_KEY_LENGTH,
3
+ AUTH_TAG_LENGTH,
4
+ ENVELOPE_HEADER_SIZE,
5
+ ENVELOPE_LAYOUT,
6
+ ENVELOPE_SALT_LENGTH,
7
+ ENVELOPE_VERSION,
8
+ IV_LENGTH,
9
+ generateSalt,
10
+ open,
11
+ parseEnvelope,
12
+ seal
13
+ } from "./chunk-A6XUJE5D.js";
14
+ import "./chunk-PZ5AY32C.js";
15
+ export {
16
+ AES_KEY_LENGTH,
17
+ AUTH_TAG_LENGTH,
18
+ ENVELOPE_HEADER_SIZE,
19
+ ENVELOPE_LAYOUT,
20
+ ENVELOPE_SALT_LENGTH,
21
+ ENVELOPE_VERSION,
22
+ IV_LENGTH,
23
+ generateSalt,
24
+ open,
25
+ parseEnvelope,
26
+ seal
27
+ };
28
+ //# sourceMappingURL=cipher-GVE2GQ5H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/citations.js CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  parseOaiMemCitation,
5
5
  sanitizeNoteForCitation
6
6
  } from "./chunk-IQT3XTKW.js";
7
+ import "./chunk-PZ5AY32C.js";
7
8
  export {
8
9
  buildCitationGuidance,
9
10
  formatOaiMemCitation,
@@ -1,9 +1,10 @@
1
- import { R as ReplaySource, a as ReplayWarning, b as ImportTurn, B as BulkImportSource, c as BulkImportOptions, d as BulkImportResult, e as ReplayTurn, O as Orchestrator, C as CompoundingPromotionReport } from './orchestrator-CmJ-NTdJ.js';
2
- import { M as MemoryGovernanceRunResult, c as MemoryGovernanceSummary, d as MemoryGovernanceMetrics, e as MemoryGovernanceQualityScore, f as MemoryGovernanceReviewQueueEntry, g as MemoryGovernanceAppliedAction, h as MemoryGovernanceTransitionReport, i as MemoryGovernanceManifest, j as MemoryGovernanceRestoreManifest, R as RestoreMemoryGovernanceRunResult } from './memory-projection-store-DeSXPh1j.js';
3
- import { MemoryStatus, MemoryFile, BehaviorSignalEvent, MemoryActionEvent, MemoryLifecycleEvent } from './types.js';
1
+ import { R as ReplaySource, a as ReplayWarning, b as ImportTurn, B as BulkImportSource, c as BulkImportOptions, d as BulkImportResult, e as ReplayTurn, O as Orchestrator, C as CompoundingPromotionReport } from './orchestrator-ChkesB8U.js';
2
+ import { M as MemoryGovernanceRunResult, c as MemoryGovernanceSummary, d as MemoryGovernanceMetrics, e as MemoryGovernanceQualityScore, f as MemoryGovernanceReviewQueueEntry, g as MemoryGovernanceAppliedAction, h as MemoryGovernanceTransitionReport, i as MemoryGovernanceManifest, j as MemoryGovernanceRestoreManifest, R as RestoreMemoryGovernanceRunResult } from './memory-projection-store-D3vBHS4J.js';
3
+ import { MemoryStatus, MemoryFile, BehaviorSignalEvent, QmdSearchResult, MemoryActionEvent, MemoryLifecycleEvent } from './types.js';
4
4
  import { Writable, Readable } from 'node:stream';
5
5
  import { DashboardStatus } from './dashboard-runtime.js';
6
- import { E as EngramAccessService } from './access-service-Br8ZydTK.js';
6
+ import { E as EngramAccessService } from './access-service-_AEUMVyX.js';
7
+ import { ResolveSecretRefFn } from './resolve-auth-token.js';
7
8
  import { EvalBaselineDeltaReport, EvalBaselineSnapshot, EvalCiGateReport, EvalBenchmarkPackSummary, EvalHarnessStatus, EvalStoredBaselineCiGateReport } from './evals.js';
8
9
  import { GraphHealthReport } from './graph.js';
9
10
  import { CausalTrajectoryStoreStatus } from './causal-trajectory.js';
@@ -218,12 +219,16 @@ interface CliApi {
218
219
  commands: string[];
219
220
  }): void;
220
221
  }
222
+ type RegisterCliOptions = {
223
+ resolveSecretRef?: ResolveSecretRefFn | null;
224
+ loadResolveSecretRef?: () => Promise<ResolveSecretRefFn | null | undefined> | ResolveSecretRefFn | null | undefined;
225
+ };
221
226
  interface CliProgram {
222
227
  command(name: string): CliCommand;
223
228
  }
224
229
  interface CliCommand {
225
230
  description(desc: string): CliCommand;
226
- option(flags: string, desc: string, defaultValue?: string): CliCommand;
231
+ option(flags: string, desc: string, parserOrDefault?: string | ((value: string, prev: unknown) => unknown), defaultValue?: unknown): CliCommand;
227
232
  requiredOption(flags: string, desc: string, defaultValue?: string): CliCommand;
228
233
  argument(name: string, desc: string): CliCommand;
229
234
  action(fn: (...args: unknown[]) => Promise<void> | void): CliCommand;
@@ -835,6 +840,10 @@ declare function runVerifiedRecallSearchCliCommand(options: {
835
840
  maxResults?: number;
836
841
  boxRecallDays?: number;
837
842
  }): Promise<VerifiedEpisodeResult[]>;
843
+ declare function isNormalRetrievalVisibleMemory(memory: MemoryFile): boolean;
844
+ declare function filterNormalMemorySearchResults(results: QmdSearchResult[], storage: {
845
+ readMemoryByPath(path: string): Promise<MemoryFile | null>;
846
+ }): Promise<QmdSearchResult[]>;
838
847
  declare function runSemanticRulePromoteCliCommand(options: {
839
848
  memoryDir: string;
840
849
  semanticRulePromotionEnabled: boolean;
@@ -1136,6 +1145,16 @@ interface PolicyTuningCliOrchestrator {
1136
1145
  * `cli-date-validation.test.ts` suite.
1137
1146
  */
1138
1147
  declare const parseStrictCliDate: typeof parseStrictCliDate$1;
1148
+ /**
1149
+ * Parse an ISO 8601 duration string (e.g. "P1Y", "P90D", "P6M") or a plain
1150
+ * integer number of days (e.g. "365", "90") into milliseconds.
1151
+ *
1152
+ * Returns null if the value cannot be parsed.
1153
+ */
1154
+ declare function parseDurationToMs(raw: string): number | null;
1155
+ declare function hasDestructivePurgeFailures(errors: Array<{
1156
+ id: string;
1157
+ }>): boolean;
1139
1158
  declare function runPolicyStatusCliCommand(orchestrator: PolicyTuningCliOrchestrator): Promise<PolicyStatusCliReport>;
1140
1159
  declare function runPolicyDiffCliCommand(orchestrator: PolicyTuningCliOrchestrator, options?: {
1141
1160
  since?: string;
@@ -1235,6 +1254,6 @@ declare function runBulkImportCliCommand(opts: BulkImportCliCommandOptions): Pro
1235
1254
  declare function resolveMemoryDirForNamespace(orchestrator: Orchestrator, namespace?: string, options?: {
1236
1255
  rejectUnsupportedOverride?: boolean;
1237
1256
  }): Promise<string>;
1238
- declare function registerCli(api: CliApi, orchestrator: Orchestrator): void;
1257
+ declare function registerCli(api: CliApi, orchestrator: Orchestrator, registerOptions?: RegisterCliOptions): void;
1239
1258
 
1240
- export { resolveMemoryDirForNamespace as $, type AccessHttpServeCliCommandOptions as A, type BulkImportCliCommandOptions as B, type CompatCliCommandOptions as C, type DashboardStartCliCommandOptions as D, type ExactDedupePlan as E, type ReplayCliCommandOptions as F, type GraphHealthCliCommandOptions as G, type ReplayCliOrchestrator as H, type RouteCliCommandOptions as I, type SessionRepairCliCommandOptions as J, type TailscaleSyncCliCommandOptions as K, type TierMigrationCliOrchestrator as L, type MemoryActionAuditCliCommandOptions as M, type TrainingExportCliCommandOptions as N, type WorkProjectCliCommandOptions as O, type ProcessBatchFn as P, type WorkTaskCliCommandOptions as Q, type RebuildMemoryLifecycleLedgerCliCommandOptions as R, type SessionIntegrityCliCommandOptions as S, type TailscaleStatusCliCommandOptions as T, parseStrictCliDate as U, type VerifyMemoryProjectionCliCommandOptions as V, type WebDavServeCliCommandOptions as W, planAggressiveDuplicateDeletions as X, planExactDuplicateDeletions as Y, registerCli as Z, resolveAccessPrincipalOverride as _, type ProcessBatchResult as a, runTrustZonePromoteCliCommand as a$, runAbstractionNodeStatusCliCommand as a0, runAccessHttpServeCliCommand as a1, runAccessHttpStatusCliCommand as a2, runAccessHttpStopCliCommand as a3, runAccessMcpServeCliCommand as a4, runArchiveObservationsCliCommand as a5, runBenchmarkBaselineReportCliCommand as a6, runBenchmarkBaselineSnapshotCliCommand as a7, runBenchmarkCiGateCliCommand as a8, runBenchmarkImportCliCommand as a9, runMigrateObservationsCliCommand as aA, runMigrateRechunkCliCommand as aB, runMigrateReextractCliCommand as aC, runMigrateRescoreImportanceCliCommand as aD, runObjectiveStateStatusCliCommand as aE, runPolicyDiffCliCommand as aF, runPolicyRollbackCliCommand as aG, runPolicyStatusCliCommand as aH, runRebuildMemoryLifecycleLedgerCliCommand as aI, runRebuildMemoryProjectionCliCommand as aJ, runRebuildObservationsCliCommand as aK, runRepairMemoryProjectionCliCommand as aL, runReplayCliCommand as aM, runResumeBundleBuildCliCommand as aN, runResumeBundleRecordCliCommand as aO, runResumeBundleStatusCliCommand as aP, runRouteCliCommand as aQ, runSemanticRulePromoteCliCommand as aR, runSemanticRuleVerifyCliCommand as aS, runSessionCheckCliCommand as aT, runSessionRepairCliCommand as aU, runTailscaleStatusCliCommand as aV, runTailscaleSyncCliCommand as aW, runTierMigrateCliCommand as aX, runTierStatusCliCommand as aY, runTrainingExportCliCommand as aZ, runTrustZoneDemoSeedCliCommand as a_, runBenchmarkStatusCliCommand as aa, runBenchmarkStoredBaselineCiGateCliCommand as ab, runBenchmarkValidateCliCommand as ac, runCausalTrajectoryStatusCliCommand as ad, runCommitmentLifecycleCliCommand as ae, runCommitmentRecordCliCommand as af, runCommitmentSetStateCliCommand as ag, runCommitmentStatusCliCommand as ah, runCompatCliCommand as ai, runCompoundingPromoteCliCommand as aj, runConversationIndexHealthCliCommand as ak, runConversationIndexInspectCliCommand as al, runConversationIndexRebuildCliCommand as am, runCueAnchorStatusCliCommand as an, runDashboardStartCliCommand as ao, runDashboardStatusCliCommand as ap, runDashboardStopCliCommand as aq, runGraphHealthCliCommand as ar, runHarmonicSearchCliCommand as as, runMemoryActionAuditCliCommand as at, runMemoryGovernanceCliCommand as au, runMemoryGovernanceReportCliCommand as av, runMemoryGovernanceRestoreCliCommand as aw, runMemoryReviewDispositionCliCommand as ax, runMemoryTimelineCliCommand as ay, runMigrateNormalizeFrontmatterCliCommand as az, runBulkImportPipeline as b, runTrustZoneStatusCliCommand as b0, runUtilityLearningCliCommand as b1, runUtilityLearningStatusCliCommand as b2, runUtilityTelemetryRecordCliCommand as b3, runUtilityTelemetryStatusCliCommand as b4, runVerifiedRecallSearchCliCommand as b5, runVerifyMemoryProjectionCliCommand as b6, runWebDavServeCliCommand as b7, runWebDavStopCliCommand as b8, runWorkProductRecallSearchCliCommand as b9, runWorkProductRecordCliCommand as ba, runWorkProductStatusCliCommand as bb, runWorkProjectCliCommand as bc, runWorkTaskCliCommand as bd, type ArchiveObservationsCliCommandOptions as c, type ConversationIndexHealthCliOrchestrator as d, type DedupeCandidate as e, formatBatchTranscript as f, type MemoryActionAuditCliNamespaceSummary as g, type MemoryActionAuditCliReport as h, type MemoryGovernanceCliCommandOptions as i, type MemoryGovernanceReportCliCommandOptions as j, type MemoryGovernanceRestoreCliCommandOptions as k, type MemoryReviewDispositionCliCommandOptions as l, type MemoryTimelineCliCommandOptions as m, type MigrateCliOrchestrator as n, type MigrateCliReport as o, parseStrictCliDate$1 as p, type MigrateObservationsCliCommandOptions as q, runBulkImportCliCommand as r, type PolicyDiffCliReport as s, type PolicyDiffEntry as t, type PolicyRollbackCliReport as u, type PolicyStatusCliReport as v, type PolicyTuningCliOrchestrator as w, type RebuildMemoryProjectionCliCommandOptions as x, type RebuildObservationsCliCommandOptions as y, type RepairMemoryProjectionCliCommandOptions as z };
1259
+ export { planAggressiveDuplicateDeletions as $, type AccessHttpServeCliCommandOptions as A, type BulkImportCliCommandOptions as B, type CompatCliCommandOptions as C, type DashboardStartCliCommandOptions as D, type ExactDedupePlan as E, type ReplayCliCommandOptions as F, type GraphHealthCliCommandOptions as G, type ReplayCliOrchestrator as H, type RouteCliCommandOptions as I, type SessionRepairCliCommandOptions as J, type TailscaleSyncCliCommandOptions as K, type TierMigrationCliOrchestrator as L, type MemoryActionAuditCliCommandOptions as M, type TrainingExportCliCommandOptions as N, type WorkProjectCliCommandOptions as O, type ProcessBatchFn as P, type WorkTaskCliCommandOptions as Q, type RebuildMemoryLifecycleLedgerCliCommandOptions as R, type SessionIntegrityCliCommandOptions as S, type TailscaleStatusCliCommandOptions as T, filterNormalMemorySearchResults as U, type VerifyMemoryProjectionCliCommandOptions as V, type WebDavServeCliCommandOptions as W, hasDestructivePurgeFailures as X, isNormalRetrievalVisibleMemory as Y, parseDurationToMs as Z, parseStrictCliDate as _, type ProcessBatchResult as a, runTierMigrateCliCommand as a$, planExactDuplicateDeletions as a0, registerCli as a1, resolveAccessPrincipalOverride as a2, resolveMemoryDirForNamespace as a3, runAbstractionNodeStatusCliCommand as a4, runAccessHttpServeCliCommand as a5, runAccessHttpStatusCliCommand as a6, runAccessHttpStopCliCommand as a7, runAccessMcpServeCliCommand as a8, runArchiveObservationsCliCommand as a9, runMemoryGovernanceRestoreCliCommand as aA, runMemoryReviewDispositionCliCommand as aB, runMemoryTimelineCliCommand as aC, runMigrateNormalizeFrontmatterCliCommand as aD, runMigrateObservationsCliCommand as aE, runMigrateRechunkCliCommand as aF, runMigrateReextractCliCommand as aG, runMigrateRescoreImportanceCliCommand as aH, runObjectiveStateStatusCliCommand as aI, runPolicyDiffCliCommand as aJ, runPolicyRollbackCliCommand as aK, runPolicyStatusCliCommand as aL, runRebuildMemoryLifecycleLedgerCliCommand as aM, runRebuildMemoryProjectionCliCommand as aN, runRebuildObservationsCliCommand as aO, runRepairMemoryProjectionCliCommand as aP, runReplayCliCommand as aQ, runResumeBundleBuildCliCommand as aR, runResumeBundleRecordCliCommand as aS, runResumeBundleStatusCliCommand as aT, runRouteCliCommand as aU, runSemanticRulePromoteCliCommand as aV, runSemanticRuleVerifyCliCommand as aW, runSessionCheckCliCommand as aX, runSessionRepairCliCommand as aY, runTailscaleStatusCliCommand as aZ, runTailscaleSyncCliCommand as a_, runBenchmarkBaselineReportCliCommand as aa, runBenchmarkBaselineSnapshotCliCommand as ab, runBenchmarkCiGateCliCommand as ac, runBenchmarkImportCliCommand as ad, runBenchmarkStatusCliCommand as ae, runBenchmarkStoredBaselineCiGateCliCommand as af, runBenchmarkValidateCliCommand as ag, runCausalTrajectoryStatusCliCommand as ah, runCommitmentLifecycleCliCommand as ai, runCommitmentRecordCliCommand as aj, runCommitmentSetStateCliCommand as ak, runCommitmentStatusCliCommand as al, runCompatCliCommand as am, runCompoundingPromoteCliCommand as an, runConversationIndexHealthCliCommand as ao, runConversationIndexInspectCliCommand as ap, runConversationIndexRebuildCliCommand as aq, runCueAnchorStatusCliCommand as ar, runDashboardStartCliCommand as as, runDashboardStatusCliCommand as at, runDashboardStopCliCommand as au, runGraphHealthCliCommand as av, runHarmonicSearchCliCommand as aw, runMemoryActionAuditCliCommand as ax, runMemoryGovernanceCliCommand as ay, runMemoryGovernanceReportCliCommand as az, runBulkImportPipeline as b, runTierStatusCliCommand as b0, runTrainingExportCliCommand as b1, runTrustZoneDemoSeedCliCommand as b2, runTrustZonePromoteCliCommand as b3, runTrustZoneStatusCliCommand as b4, runUtilityLearningCliCommand as b5, runUtilityLearningStatusCliCommand as b6, runUtilityTelemetryRecordCliCommand as b7, runUtilityTelemetryStatusCliCommand as b8, runVerifiedRecallSearchCliCommand as b9, runVerifyMemoryProjectionCliCommand as ba, runWebDavServeCliCommand as bb, runWebDavStopCliCommand as bc, runWorkProductRecallSearchCliCommand as bd, runWorkProductRecordCliCommand as be, runWorkProductStatusCliCommand as bf, runWorkProjectCliCommand as bg, runWorkTaskCliCommand as bh, type ArchiveObservationsCliCommandOptions as c, type ConversationIndexHealthCliOrchestrator as d, type DedupeCandidate as e, formatBatchTranscript as f, type MemoryActionAuditCliNamespaceSummary as g, type MemoryActionAuditCliReport as h, type MemoryGovernanceCliCommandOptions as i, type MemoryGovernanceReportCliCommandOptions as j, type MemoryGovernanceRestoreCliCommandOptions as k, type MemoryReviewDispositionCliCommandOptions as l, type MemoryTimelineCliCommandOptions as m, type MigrateCliOrchestrator as n, type MigrateCliReport as o, parseStrictCliDate$1 as p, type MigrateObservationsCliCommandOptions as q, runBulkImportCliCommand as r, type PolicyDiffCliReport as s, type PolicyDiffEntry as t, type PolicyRollbackCliReport as u, type PolicyStatusCliReport as v, type PolicyTuningCliOrchestrator as w, type RebuildMemoryProjectionCliCommandOptions as x, type RebuildObservationsCliCommandOptions as y, type RepairMemoryProjectionCliCommandOptions as z };
package/dist/cli.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import './orchestrator-CmJ-NTdJ.js';
2
- export { A as AccessHttpServeCliCommandOptions, c as ArchiveObservationsCliCommandOptions, B as BulkImportCliCommandOptions, C as CompatCliCommandOptions, d as ConversationIndexHealthCliOrchestrator, D as DashboardStartCliCommandOptions, e as DedupeCandidate, E as ExactDedupePlan, G as GraphHealthCliCommandOptions, M as MemoryActionAuditCliCommandOptions, g as MemoryActionAuditCliNamespaceSummary, h as MemoryActionAuditCliReport, i as MemoryGovernanceCliCommandOptions, j as MemoryGovernanceReportCliCommandOptions, k as MemoryGovernanceRestoreCliCommandOptions, l as MemoryReviewDispositionCliCommandOptions, m as MemoryTimelineCliCommandOptions, n as MigrateCliOrchestrator, o as MigrateCliReport, q as MigrateObservationsCliCommandOptions, s as PolicyDiffCliReport, t as PolicyDiffEntry, u as PolicyRollbackCliReport, v as PolicyStatusCliReport, w as PolicyTuningCliOrchestrator, R as RebuildMemoryLifecycleLedgerCliCommandOptions, x as RebuildMemoryProjectionCliCommandOptions, y as RebuildObservationsCliCommandOptions, z as RepairMemoryProjectionCliCommandOptions, F as ReplayCliCommandOptions, H as ReplayCliOrchestrator, I as RouteCliCommandOptions, S as SessionIntegrityCliCommandOptions, J as SessionRepairCliCommandOptions, T as TailscaleStatusCliCommandOptions, K as TailscaleSyncCliCommandOptions, L as TierMigrationCliOrchestrator, N as TrainingExportCliCommandOptions, V as VerifyMemoryProjectionCliCommandOptions, W as WebDavServeCliCommandOptions, O as WorkProjectCliCommandOptions, Q as WorkTaskCliCommandOptions, U as parseStrictCliDate, X as planAggressiveDuplicateDeletions, Y as planExactDuplicateDeletions, Z as registerCli, _ as resolveAccessPrincipalOverride, $ as resolveMemoryDirForNamespace, a0 as runAbstractionNodeStatusCliCommand, a1 as runAccessHttpServeCliCommand, a2 as runAccessHttpStatusCliCommand, a3 as runAccessHttpStopCliCommand, a4 as runAccessMcpServeCliCommand, a5 as runArchiveObservationsCliCommand, a6 as runBenchmarkBaselineReportCliCommand, a7 as runBenchmarkBaselineSnapshotCliCommand, a8 as runBenchmarkCiGateCliCommand, a9 as runBenchmarkImportCliCommand, aa as runBenchmarkStatusCliCommand, ab as runBenchmarkStoredBaselineCiGateCliCommand, ac as runBenchmarkValidateCliCommand, r as runBulkImportCliCommand, ad as runCausalTrajectoryStatusCliCommand, ae as runCommitmentLifecycleCliCommand, af as runCommitmentRecordCliCommand, ag as runCommitmentSetStateCliCommand, ah as runCommitmentStatusCliCommand, ai as runCompatCliCommand, aj as runCompoundingPromoteCliCommand, ak as runConversationIndexHealthCliCommand, al as runConversationIndexInspectCliCommand, am as runConversationIndexRebuildCliCommand, an as runCueAnchorStatusCliCommand, ao as runDashboardStartCliCommand, ap as runDashboardStatusCliCommand, aq as runDashboardStopCliCommand, ar as runGraphHealthCliCommand, as as runHarmonicSearchCliCommand, at as runMemoryActionAuditCliCommand, au as runMemoryGovernanceCliCommand, av as runMemoryGovernanceReportCliCommand, aw as runMemoryGovernanceRestoreCliCommand, ax as runMemoryReviewDispositionCliCommand, ay as runMemoryTimelineCliCommand, az as runMigrateNormalizeFrontmatterCliCommand, aA as runMigrateObservationsCliCommand, aB as runMigrateRechunkCliCommand, aC as runMigrateReextractCliCommand, aD as runMigrateRescoreImportanceCliCommand, aE as runObjectiveStateStatusCliCommand, aF as runPolicyDiffCliCommand, aG as runPolicyRollbackCliCommand, aH as runPolicyStatusCliCommand, aI as runRebuildMemoryLifecycleLedgerCliCommand, aJ as runRebuildMemoryProjectionCliCommand, aK as runRebuildObservationsCliCommand, aL as runRepairMemoryProjectionCliCommand, aM as runReplayCliCommand, aN as runResumeBundleBuildCliCommand, aO as runResumeBundleRecordCliCommand, aP as runResumeBundleStatusCliCommand, aQ as runRouteCliCommand, aR as runSemanticRulePromoteCliCommand, aS as runSemanticRuleVerifyCliCommand, aT as runSessionCheckCliCommand, aU as runSessionRepairCliCommand, aV as runTailscaleStatusCliCommand, aW as runTailscaleSyncCliCommand, aX as runTierMigrateCliCommand, aY as runTierStatusCliCommand, aZ as runTrainingExportCliCommand, a_ as runTrustZoneDemoSeedCliCommand, a$ as runTrustZonePromoteCliCommand, b0 as runTrustZoneStatusCliCommand, b1 as runUtilityLearningCliCommand, b2 as runUtilityLearningStatusCliCommand, b3 as runUtilityTelemetryRecordCliCommand, b4 as runUtilityTelemetryStatusCliCommand, b5 as runVerifiedRecallSearchCliCommand, b6 as runVerifyMemoryProjectionCliCommand, b7 as runWebDavServeCliCommand, b8 as runWebDavStopCliCommand, b9 as runWorkProductRecallSearchCliCommand, ba as runWorkProductRecordCliCommand, bb as runWorkProductStatusCliCommand, bc as runWorkProjectCliCommand, bd as runWorkTaskCliCommand } from './cli-BkeRaYfk.js';
3
- import './memory-projection-store-DeSXPh1j.js';
1
+ import './orchestrator-ChkesB8U.js';
2
+ export { A as AccessHttpServeCliCommandOptions, c as ArchiveObservationsCliCommandOptions, B as BulkImportCliCommandOptions, C as CompatCliCommandOptions, d as ConversationIndexHealthCliOrchestrator, D as DashboardStartCliCommandOptions, e as DedupeCandidate, E as ExactDedupePlan, G as GraphHealthCliCommandOptions, M as MemoryActionAuditCliCommandOptions, g as MemoryActionAuditCliNamespaceSummary, h as MemoryActionAuditCliReport, i as MemoryGovernanceCliCommandOptions, j as MemoryGovernanceReportCliCommandOptions, k as MemoryGovernanceRestoreCliCommandOptions, l as MemoryReviewDispositionCliCommandOptions, m as MemoryTimelineCliCommandOptions, n as MigrateCliOrchestrator, o as MigrateCliReport, q as MigrateObservationsCliCommandOptions, s as PolicyDiffCliReport, t as PolicyDiffEntry, u as PolicyRollbackCliReport, v as PolicyStatusCliReport, w as PolicyTuningCliOrchestrator, R as RebuildMemoryLifecycleLedgerCliCommandOptions, x as RebuildMemoryProjectionCliCommandOptions, y as RebuildObservationsCliCommandOptions, z as RepairMemoryProjectionCliCommandOptions, F as ReplayCliCommandOptions, H as ReplayCliOrchestrator, I as RouteCliCommandOptions, S as SessionIntegrityCliCommandOptions, J as SessionRepairCliCommandOptions, T as TailscaleStatusCliCommandOptions, K as TailscaleSyncCliCommandOptions, L as TierMigrationCliOrchestrator, N as TrainingExportCliCommandOptions, V as VerifyMemoryProjectionCliCommandOptions, W as WebDavServeCliCommandOptions, O as WorkProjectCliCommandOptions, Q as WorkTaskCliCommandOptions, U as filterNormalMemorySearchResults, X as hasDestructivePurgeFailures, Y as isNormalRetrievalVisibleMemory, Z as parseDurationToMs, _ as parseStrictCliDate, $ as planAggressiveDuplicateDeletions, a0 as planExactDuplicateDeletions, a1 as registerCli, a2 as resolveAccessPrincipalOverride, a3 as resolveMemoryDirForNamespace, a4 as runAbstractionNodeStatusCliCommand, a5 as runAccessHttpServeCliCommand, a6 as runAccessHttpStatusCliCommand, a7 as runAccessHttpStopCliCommand, a8 as runAccessMcpServeCliCommand, a9 as runArchiveObservationsCliCommand, aa as runBenchmarkBaselineReportCliCommand, ab as runBenchmarkBaselineSnapshotCliCommand, ac as runBenchmarkCiGateCliCommand, ad as runBenchmarkImportCliCommand, ae as runBenchmarkStatusCliCommand, af as runBenchmarkStoredBaselineCiGateCliCommand, ag as runBenchmarkValidateCliCommand, r as runBulkImportCliCommand, ah as runCausalTrajectoryStatusCliCommand, ai as runCommitmentLifecycleCliCommand, aj as runCommitmentRecordCliCommand, ak as runCommitmentSetStateCliCommand, al as runCommitmentStatusCliCommand, am as runCompatCliCommand, an as runCompoundingPromoteCliCommand, ao as runConversationIndexHealthCliCommand, ap as runConversationIndexInspectCliCommand, aq as runConversationIndexRebuildCliCommand, ar as runCueAnchorStatusCliCommand, as as runDashboardStartCliCommand, at as runDashboardStatusCliCommand, au as runDashboardStopCliCommand, av as runGraphHealthCliCommand, aw as runHarmonicSearchCliCommand, ax as runMemoryActionAuditCliCommand, ay as runMemoryGovernanceCliCommand, az as runMemoryGovernanceReportCliCommand, aA as runMemoryGovernanceRestoreCliCommand, aB as runMemoryReviewDispositionCliCommand, aC as runMemoryTimelineCliCommand, aD as runMigrateNormalizeFrontmatterCliCommand, aE as runMigrateObservationsCliCommand, aF as runMigrateRechunkCliCommand, aG as runMigrateReextractCliCommand, aH as runMigrateRescoreImportanceCliCommand, aI as runObjectiveStateStatusCliCommand, aJ as runPolicyDiffCliCommand, aK as runPolicyRollbackCliCommand, aL as runPolicyStatusCliCommand, aM as runRebuildMemoryLifecycleLedgerCliCommand, aN as runRebuildMemoryProjectionCliCommand, aO as runRebuildObservationsCliCommand, aP as runRepairMemoryProjectionCliCommand, aQ as runReplayCliCommand, aR as runResumeBundleBuildCliCommand, aS as runResumeBundleRecordCliCommand, aT as runResumeBundleStatusCliCommand, aU as runRouteCliCommand, aV as runSemanticRulePromoteCliCommand, aW as runSemanticRuleVerifyCliCommand, aX as runSessionCheckCliCommand, aY as runSessionRepairCliCommand, aZ as runTailscaleStatusCliCommand, a_ as runTailscaleSyncCliCommand, a$ as runTierMigrateCliCommand, b0 as runTierStatusCliCommand, b1 as runTrainingExportCliCommand, b2 as runTrustZoneDemoSeedCliCommand, b3 as runTrustZonePromoteCliCommand, b4 as runTrustZoneStatusCliCommand, b5 as runUtilityLearningCliCommand, b6 as runUtilityLearningStatusCliCommand, b7 as runUtilityTelemetryRecordCliCommand, b8 as runUtilityTelemetryStatusCliCommand, b9 as runVerifiedRecallSearchCliCommand, ba as runVerifyMemoryProjectionCliCommand, bb as runWebDavServeCliCommand, bc as runWebDavStopCliCommand, bd as runWorkProductRecallSearchCliCommand, be as runWorkProductRecordCliCommand, bf as runWorkProductStatusCliCommand, bg as runWorkProjectCliCommand, bh as runWorkTaskCliCommand } from './cli-x2APT9a6.js';
3
+ import './memory-projection-store-D3vBHS4J.js';
4
4
  import './types.js';
5
5
  import 'node:stream';
6
6
  import './dashboard-runtime.js';
7
- import './access-service-Br8ZydTK.js';
7
+ import './access-service-_AEUMVyX.js';
8
+ import './resolve-auth-token.js';
8
9
  import './evals.js';
9
10
  import './graph.js';
10
11
  import './causal-trajectory.js';
@@ -29,18 +30,20 @@ import './storage.js';
29
30
  import './page-versioning.js';
30
31
  import './consolidation-operator.js';
31
32
  import 'better-sqlite3';
32
- import './port-BADbLZU5.js';
33
+ import './port-hqGnoStS.js';
33
34
  import './transcript.js';
34
35
  import './summarizer.js';
35
36
  import './model-registry.js';
36
37
  import './local-llm.js';
37
38
  import './fallback-llm.js';
39
+ import './live-connectors-runner.js';
40
+ import './framework-CyHYDcri.js';
38
41
  import './relevance.js';
39
42
  import './negative.js';
40
43
  import './recall-xray.js';
41
44
  import './session-observer-state.js';
42
45
  import './embedding-fallback.js';
43
- import './semantic-consolidation-CxJU6MJk.js';
46
+ import './semantic-consolidation-ByBXb-sf.js';
44
47
  import './codex-materialize-CQlLTzke.js';
45
48
  import './logger.js';
46
49
  import 'zod';
@@ -50,5 +53,7 @@ import './recall-audit-anomaly.js';
50
53
  import './recall-audit.js';
51
54
  import './explicit-capture.js';
52
55
  import './cross-namespace-budget.js';
56
+ import './graph-snapshot.js';
53
57
  import './memory-worth-outcomes.js';
58
+ import './capsule-cli.js';
54
59
  import './boxes.js';
package/dist/cli.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import {
2
- parseStrictCliDate2 as parseStrictCliDate,
2
+ filterNormalMemorySearchResults,
3
+ hasDestructivePurgeFailures,
4
+ isNormalRetrievalVisibleMemory,
5
+ parseDurationToMs,
6
+ parseStrictCliDate,
3
7
  planAggressiveDuplicateDeletions,
4
8
  planExactDuplicateDeletions,
5
9
  registerCli,
@@ -84,78 +88,95 @@ import {
84
88
  runWorkProductStatusCliCommand,
85
89
  runWorkProjectCliCommand,
86
90
  runWorkTaskCliCommand
87
- } from "./chunk-LOIMBRDE.js";
88
- import "./chunk-VDX363PS.js";
89
- import "./chunk-TMYO7B5P.js";
90
- import "./chunk-PVPWZSSI.js";
91
- import "./chunk-6YJHX2DL.js";
91
+ } from "./chunk-ZGXSCMQN.js";
92
+ import "./chunk-34F3PLWZ.js";
93
+ import "./chunk-MXC3AP5I.js";
94
+ import "./chunk-47WOM4YW.js";
95
+ import "./chunk-SMA4IMHV.js";
96
+ import "./chunk-AJA46VX5.js";
97
+ import "./chunk-7GCMLT7J.js";
92
98
  import "./chunk-HL4DB7TO.js";
93
- import "./chunk-ULYOGL6R.js";
94
99
  import "./chunk-ZPKBYX2F.js";
95
100
  import "./chunk-3SLRNYNG.js";
96
101
  import "./chunk-LIRZNNUP.js";
97
102
  import "./chunk-Y4Z4I6WK.js";
103
+ import "./chunk-5HRY2WRF.js";
98
104
  import "./chunk-ASAITVLA.js";
99
- import "./chunk-GA5P7RST.js";
105
+ import "./chunk-VTJVUHRK.js";
100
106
  import "./chunk-PYXS46O7.js";
101
107
  import "./chunk-3QKK7QOS.js";
102
- import "./chunk-CUPFXL3J.js";
108
+ import "./chunk-DHRQHX36.js";
103
109
  import "./chunk-JRNQ3RNA.js";
104
- import "./chunk-SPI27QT6.js";
110
+ import "./chunk-L5IIGA5V.js";
105
111
  import "./chunk-CULXMQJH.js";
106
112
  import "./chunk-E6K4NIEU.js";
107
- import "./chunk-NBVAS5MT.js";
108
- import "./chunk-YRMVARQP.js";
109
- import "./chunk-4HQS2HPX.js";
110
- import "./chunk-U66YHYC7.js";
111
113
  import "./chunk-EABGC2TL.js";
112
114
  import "./chunk-LOBRX7VD.js";
115
+ import "./chunk-R2L7SUX2.js";
116
+ import "./chunk-YRMVARQP.js";
117
+ import "./chunk-WSZIHQBK.js";
118
+ import "./chunk-U66YHYC7.js";
119
+ import "./chunk-L2IO2QPY.js";
120
+ import "./chunk-6TBWYBJ3.js";
113
121
  import "./chunk-HMDCOMYU.js";
114
122
  import "./chunk-JXS5PDQ7.js";
115
- import "./chunk-OR64ZGRZ.js";
116
- import "./chunk-7SEAZFFB.js";
117
123
  import "./chunk-K6WK37A6.js";
118
- import "./chunk-BECYBZLX.js";
124
+ import "./chunk-AJU4PJGY.js";
125
+ import "./chunk-7SEAZFFB.js";
126
+ import "./chunk-JWSENLQI.js";
119
127
  import "./chunk-Z5LAYHGJ.js";
128
+ import "./chunk-OZHRDTDX.js";
120
129
  import "./chunk-C6QPK5GG.js";
121
- import "./chunk-C2EFFULQ.js";
122
130
  import "./chunk-FYIYMQ5N.js";
123
131
  import "./chunk-4WMCPJWX.js";
124
132
  import "./chunk-6HZ6AO2P.js";
125
133
  import "./chunk-URB2WSKZ.js";
126
134
  import "./chunk-PVGDJXVK.js";
127
135
  import "./chunk-NGAVDO7E.js";
128
- import "./chunk-UWB5LMWY.js";
129
- import "./chunk-OC5OXUQ4.js";
136
+ import "./chunk-AKUCB2OG.js";
137
+ import "./chunk-4PLGJRBV.js";
130
138
  import "./chunk-IQT3XTKW.js";
131
- import "./chunk-STGWEHYR.js";
132
- import "./chunk-ZAIM4TUE.js";
139
+ import "./chunk-DR7MCMPS.js";
140
+ import "./chunk-3KIS4VGT.js";
141
+ import "./chunk-BT7NVCML.js";
142
+ import "./chunk-H7XKCNR6.js";
143
+ import "./chunk-LW2NMHDW.js";
133
144
  import "./chunk-SOBJ6NEY.js";
134
- import "./chunk-3OGMS3PE.js";
145
+ import "./chunk-NN3TS5BM.js";
135
146
  import "./chunk-EQINRHYR.js";
147
+ import "./chunk-USFPPRAF.js";
148
+ import "./chunk-LZRYQK6L.js";
136
149
  import "./chunk-EIR5VLIH.js";
137
- import "./chunk-EEQLFRUM.js";
138
- import "./chunk-QDW3E4RD.js";
150
+ import "./chunk-IXEJRKCZ.js";
151
+ import "./chunk-PCUKNJAZ.js";
139
152
  import "./chunk-3FPTCC3Z.js";
140
153
  import "./chunk-2LGMW3DJ.js";
154
+ import "./chunk-EEQLFRUM.js";
155
+ import "./chunk-OR64ZGRZ.js";
156
+ import "./chunk-QDW3E4RD.js";
141
157
  import "./chunk-GDFS42HT.js";
142
- import "./chunk-RBBWYEFJ.js";
158
+ import "./chunk-RK2Y4XOM.js";
159
+ import "./chunk-2LSZVONP.js";
160
+ import "./chunk-WIICJPET.js";
161
+ import "./chunk-G2WADRQ3.js";
162
+ import "./chunk-74EMIVE4.js";
143
163
  import "./chunk-DT5TVLJE.js";
144
164
  import "./chunk-N5AKDXAI.js";
145
165
  import "./chunk-TBBDFYXW.js";
146
- import "./chunk-L7IXWRYE.js";
147
- import "./chunk-F5VP6YCB.js";
148
- import "./chunk-LTCGGW2D.js";
166
+ import "./chunk-SS253RXF.js";
167
+ import "./chunk-DCE6SQLA.js";
168
+ import "./chunk-YNJHCGDT.js";
149
169
  import "./chunk-4KAN3GZ3.js";
150
- import "./chunk-6PFRXT4K.js";
151
- import "./chunk-TP4FZJIZ.js";
170
+ import "./chunk-43EKP2UK.js";
171
+ import "./chunk-PFV5C235.js";
172
+ import "./chunk-RULE4VG5.js";
152
173
  import "./chunk-SCU65EZI.js";
153
174
  import "./chunk-BOUYNNYD.js";
154
175
  import "./chunk-DM2T26WE.js";
155
176
  import "./chunk-QSVPYQPG.js";
156
177
  import "./chunk-M62O4P4T.js";
157
178
  import "./chunk-4DJQYKMN.js";
158
- import "./chunk-X6GF3FX2.js";
179
+ import "./chunk-G7D6GZ5J.js";
159
180
  import "./chunk-FAAFWE4G.js";
160
181
  import "./chunk-MARWOCVP.js";
161
182
  import "./chunk-2ODBA7MQ.js";
@@ -165,8 +186,21 @@ import "./chunk-TVVEYCNW.js";
165
186
  import "./chunk-RFYAYKTD.js";
166
187
  import "./chunk-LBLXEFWK.js";
167
188
  import "./chunk-XKECPATV.js";
168
- import "./chunk-WCLICCGB.js";
189
+ import "./chunk-RILIVK4O.js";
190
+ import "./chunk-IYY4MCPG.js";
191
+ import "./chunk-457A4P3L.js";
192
+ import "./chunk-OA3L7BFR.js";
193
+ import "./chunk-KNKUID7G.js";
194
+ import "./chunk-BJMBJZ2Y.js";
195
+ import "./chunk-UKJAGEXH.js";
196
+ import "./chunk-FP2373TW.js";
197
+ import "./chunk-A6XUJE5D.js";
198
+ import "./chunk-PZ5AY32C.js";
169
199
  export {
200
+ filterNormalMemorySearchResults,
201
+ hasDestructivePurgeFailures,
202
+ isNormalRetrievalVisibleMemory,
203
+ parseDurationToMs,
170
204
  parseStrictCliDate,
171
205
  planAggressiveDuplicateDeletions,
172
206
  planExactDuplicateDeletions,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  CODEX_THREAD_KEY_PREFIX
3
3
  } from "./chunk-3PG3H5TD.js";
4
+ import "./chunk-PZ5AY32C.js";
4
5
  export {
5
6
  CODEX_THREAD_KEY_PREFIX
6
7
  };
@@ -8,6 +8,7 @@ import {
8
8
  } from "./chunk-FYIYMQ5N.js";
9
9
  import "./chunk-DGXUHMOV.js";
10
10
  import "./chunk-LPSF4OQH.js";
11
+ import "./chunk-PZ5AY32C.js";
11
12
  export {
12
13
  applyCommitmentLedgerLifecycle,
13
14
  getCommitmentLedgerStatus,
@@ -4,6 +4,7 @@ import {
4
4
  refineCompressionGuidelineCandidateSemantically,
5
5
  renderCompressionGuidelinesMarkdown
6
6
  } from "./chunk-2NMMFZ5T.js";
7
+ import "./chunk-PZ5AY32C.js";
7
8
  export {
8
9
  buildCompressionGuidelinesMarkdown,
9
10
  computeCompressionGuidelineCandidate,
package/dist/config.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { PluginConfig } from './types.js';
2
2
 
3
+ declare const DEFAULT_REASONING_MODEL = "gpt-5.2";
3
4
  declare const VALID_MEMORY_CATEGORIES: Set<string>;
4
5
  declare function parseConfig(raw: unknown): PluginConfig;
5
6
 
6
- export { VALID_MEMORY_CATEGORIES, parseConfig };
7
+ export { DEFAULT_REASONING_MODEL, VALID_MEMORY_CATEGORIES, parseConfig };
package/dist/config.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import {
2
+ DEFAULT_REASONING_MODEL,
2
3
  VALID_MEMORY_CATEGORIES,
3
4
  parseConfig
4
- } from "./chunk-BECYBZLX.js";
5
+ } from "./chunk-JWSENLQI.js";
5
6
  import "./chunk-Z5LAYHGJ.js";
6
7
  import "./chunk-4DJQYKMN.js";
7
8
  import "./chunk-MARWOCVP.js";
8
9
  import "./chunk-2ODBA7MQ.js";
10
+ import "./chunk-PZ5AY32C.js";
9
11
  export {
12
+ DEFAULT_REASONING_MODEL,
10
13
  VALID_MEMORY_CATEGORIES,
11
14
  parseConfig
12
15
  };