@remnic/core 9.63.4 → 9.63.5

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 (415) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -11
  2. package/dist/access-admin-ops-surface.js +23 -23
  3. package/dist/access-authorization-probe.d.ts +11 -11
  4. package/dist/access-authorization-probe.js +24 -24
  5. package/dist/access-boundary.d.ts +11 -11
  6. package/dist/access-boundary.js +23 -23
  7. package/dist/access-cli.js +55 -55
  8. package/dist/access-coding-context-resolution.d.ts +1 -1
  9. package/dist/access-extraction-force-flush.d.ts +11 -11
  10. package/dist/access-extraction-force-flush.js +23 -23
  11. package/dist/access-health-types.d.ts +1 -1
  12. package/dist/access-http-lcm-compaction.d.ts +11 -11
  13. package/dist/access-http-lifecycle-flush.d.ts +11 -11
  14. package/dist/access-http-offline-stream.d.ts +11 -11
  15. package/dist/access-http-query.d.ts +2 -2
  16. package/dist/access-http-query.js +25 -25
  17. package/dist/access-http.d.ts +12 -12
  18. package/dist/access-http.js +34 -34
  19. package/dist/access-identity-continuity-surface.d.ts +9 -9
  20. package/dist/access-identity-continuity-surface.js +23 -23
  21. package/dist/access-lcm-surface.d.ts +11 -11
  22. package/dist/access-lcm-surface.js +23 -23
  23. package/dist/access-mcp.d.ts +11 -11
  24. package/dist/access-mcp.js +28 -28
  25. package/dist/access-memory-search-fanout.d.ts +2 -2
  26. package/dist/{access-namespace-preflight-yO4LMGFH.d.ts → access-namespace-preflight-DB0zXFek.d.ts} +1 -1
  27. package/dist/access-namespace-preflight.d.ts +3 -3
  28. package/dist/access-namespace-preflight.js +23 -23
  29. package/dist/access-observe-write-surface.d.ts +11 -11
  30. package/dist/access-observe-write-surface.js +23 -23
  31. package/dist/access-offline-manifest.d.ts +9 -9
  32. package/dist/access-offline-manifest.js +3 -3
  33. package/dist/access-operations-batch.js +24 -24
  34. package/dist/access-operations.d.ts +11 -11
  35. package/dist/access-operations.js +27 -27
  36. package/dist/access-recall-concurrency.d.ts +11 -11
  37. package/dist/access-recall-concurrency.js +23 -23
  38. package/dist/access-recall-response.d.ts +11 -11
  39. package/dist/access-recall-response.js +23 -23
  40. package/dist/access-recall-surface.d.ts +11 -11
  41. package/dist/access-recall-surface.js +23 -23
  42. package/dist/{access-service-D-bi3r01.d.ts → access-service-cKQrte9Z.d.ts} +7 -7
  43. package/dist/access-service-helpers.d.ts +11 -11
  44. package/dist/access-service.d.ts +11 -11
  45. package/dist/access-service.js +23 -23
  46. package/dist/access-surface-catalog.d.ts +11 -11
  47. package/dist/access-surface-catalog.js +25 -25
  48. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  49. package/dist/action-confidence.d.ts +1 -1
  50. package/dist/active-memory-bridge.d.ts +1 -1
  51. package/dist/active-recall.d.ts +1 -1
  52. package/dist/ambient-provenance.d.ts +1 -1
  53. package/dist/artifact-search.d.ts +1 -1
  54. package/dist/behavior-learner.d.ts +1 -1
  55. package/dist/behavior-signals.d.ts +1 -1
  56. package/dist/bootstrap.d.ts +9 -9
  57. package/dist/briefing-window.d.ts +2 -2
  58. package/dist/briefing.d.ts +2 -2
  59. package/dist/briefing.js +11 -11
  60. package/dist/buffer-surprise-report.d.ts +1 -1
  61. package/dist/buffer-turn-helpers.d.ts +1 -1
  62. package/dist/buffer.d.ts +2 -2
  63. package/dist/buffer.js +4 -4
  64. package/dist/bulk-import/index.d.ts +3 -3
  65. package/dist/calibration.d.ts +1 -1
  66. package/dist/capabilities.d.ts +1 -1
  67. package/dist/{capsule-merge-HCJJMLPS.js → capsule-merge-SGIVB3WA.js} +5 -5
  68. package/dist/{catalog-BYIHQw1l.d.ts → catalog-CCzmf8IH.d.ts} +1 -1
  69. package/dist/causal-behavior.d.ts +1 -1
  70. package/dist/causal-consolidation.d.ts +1 -1
  71. package/dist/causal-consolidation.js +12 -12
  72. package/dist/causal-trajectory-graph.d.ts +1 -1
  73. package/dist/{chunk-XFCQIQQU.js → chunk-2UM6WHME.js} +3 -3
  74. package/dist/{chunk-CKWOMJDY.js → chunk-3Z5TGRFA.js} +8 -8
  75. package/dist/{chunk-JJX5XEIG.js → chunk-77QZW2D6.js} +4 -4
  76. package/dist/{chunk-X4MGNVOO.js → chunk-7AF243WZ.js} +1 -1
  77. package/dist/{chunk-2ASAS3CQ.js → chunk-7KQB4EBS.js} +2 -2
  78. package/dist/{chunk-3LJ2L3T3.js → chunk-7LF2OHIJ.js} +2 -2
  79. package/dist/{chunk-VAMQU4W7.js → chunk-AYVCKGA6.js} +2 -2
  80. package/dist/{chunk-GTRGH4ZT.js → chunk-BB2LH5JM.js} +2 -2
  81. package/dist/{chunk-XMMESCPD.js → chunk-C64XATK7.js} +17 -27
  82. package/dist/chunk-C64XATK7.js.map +1 -0
  83. package/dist/{chunk-DQV3LUQL.js → chunk-CUDSA46O.js} +2 -2
  84. package/dist/{chunk-PADG72LJ.js → chunk-DXDAQZ2K.js} +2 -2
  85. package/dist/{chunk-EJCN5ATI.js → chunk-DYZR3Z6D.js} +3 -3
  86. package/dist/{chunk-VN7IIQGS.js → chunk-E4KMY4KR.js} +2 -2
  87. package/dist/{chunk-ZQKXRKMR.js → chunk-EFKZT6AY.js} +2 -2
  88. package/dist/{chunk-DNRTKO2U.js → chunk-EJY3HJMT.js} +2 -2
  89. package/dist/{chunk-4EDAHS6D.js → chunk-ERPBRXVZ.js} +2 -2
  90. package/dist/{chunk-ZUZD2DRV.js → chunk-F6JYBVL6.js} +27 -57
  91. package/dist/{chunk-ZUZD2DRV.js.map → chunk-F6JYBVL6.js.map} +1 -1
  92. package/dist/{chunk-JWPG65LH.js → chunk-FHKXVTM5.js} +38 -39
  93. package/dist/chunk-FHKXVTM5.js.map +1 -0
  94. package/dist/{chunk-RPKJHYVE.js → chunk-FPEZ74F7.js} +2 -2
  95. package/dist/{chunk-Z334TJRB.js → chunk-GF7RQWXC.js} +2 -2
  96. package/dist/{chunk-6D7PZKCJ.js → chunk-GG4DN63W.js} +2 -2
  97. package/dist/{chunk-OR7KEGLR.js → chunk-GTD4Q62X.js} +2 -6
  98. package/dist/{chunk-QOMUE4FS.js → chunk-I5FLIB2J.js} +2 -2
  99. package/dist/{chunk-2JL7WPXL.js → chunk-IVXVLDNT.js} +12 -12
  100. package/dist/{chunk-NRFU5MVH.js → chunk-JOEJG4SD.js} +47 -1
  101. package/dist/chunk-JOEJG4SD.js.map +1 -0
  102. package/dist/{chunk-EJLTNPRY.js → chunk-KHCUVYCY.js} +3 -3
  103. package/dist/{chunk-QSIQVC32.js → chunk-KYTRF64R.js} +2 -2
  104. package/dist/{chunk-LNFYISZ6.js → chunk-LX4TNSAE.js} +4 -4
  105. package/dist/{chunk-H6ZXNH5I.js → chunk-MUJ4QFUQ.js} +3 -3
  106. package/dist/{chunk-JSH2TV34.js → chunk-NA56NSKL.js} +2 -2
  107. package/dist/{chunk-DFEYRCG2.js → chunk-NKB43PGI.js} +2 -2
  108. package/dist/{chunk-DLQQU4EG.js → chunk-NS5ETDYD.js} +2 -2
  109. package/dist/{chunk-VG6DC2GO.js → chunk-OETHJBAL.js} +53 -45
  110. package/dist/{chunk-VG6DC2GO.js.map → chunk-OETHJBAL.js.map} +1 -1
  111. package/dist/{chunk-BXOZALJ6.js → chunk-PB4WVYGC.js} +2 -2
  112. package/dist/{chunk-Q35XGIEM.js → chunk-PBRCYYO7.js} +2 -2
  113. package/dist/{chunk-QYN5PXDZ.js → chunk-PMVPCZJZ.js} +4 -4
  114. package/dist/{chunk-3USQWITL.js → chunk-QI5RDDEL.js} +3 -3
  115. package/dist/{chunk-I6OQCT3Y.js → chunk-QRWMS6SI.js} +2 -2
  116. package/dist/{chunk-ITYAXU4S.js → chunk-R6UMNP5C.js} +3 -3
  117. package/dist/{chunk-5W62VEFH.js → chunk-RWMSMTQP.js} +2 -2
  118. package/dist/{chunk-FKJVEW6O.js → chunk-SYVGVK4S.js} +2 -2
  119. package/dist/{chunk-GNKY5JEP.js → chunk-TSTI6A3A.js} +8 -8
  120. package/dist/{chunk-ISFUFLFM.js → chunk-UCLMKNHA.js} +2 -2
  121. package/dist/{chunk-ZMSZVISA.js → chunk-UFKPQBXH.js} +3 -3
  122. package/dist/{chunk-B2OOJCUX.js → chunk-UGHCZS6K.js} +2 -2
  123. package/dist/{chunk-RSLRGRBJ.js → chunk-V3KIRICY.js} +3 -3
  124. package/dist/{chunk-MRJ43KSG.js → chunk-VPHSMJ2E.js} +2 -2
  125. package/dist/{chunk-E2GYBTSP.js → chunk-VYEPACWY.js} +2 -2
  126. package/dist/{chunk-A4HXWNST.js → chunk-X7LEDA74.js} +2 -2
  127. package/dist/{chunk-KMAP7SNQ.js → chunk-XCB6QDL6.js} +2 -2
  128. package/dist/{chunk-WDUG2CH3.js → chunk-YEQCMA5L.js} +2 -2
  129. package/dist/{chunk-LZCSOUJ7.js → chunk-YFCEBB5P.js} +2 -2
  130. package/dist/{chunk-IKXUG6KC.js → chunk-YXMHUBN2.js} +2 -2
  131. package/dist/{chunk-GFNS3BHV.js → chunk-ZUPKNWRZ.js} +3 -3
  132. package/dist/{chunk-GSTIBXBW.js → chunk-ZVPVTPGI.js} +2 -2
  133. package/dist/{cli-DEoABKXH.d.ts → cli-BFBDYV0D.d.ts} +5 -5
  134. package/dist/cli.d.ts +13 -13
  135. package/dist/cli.js +45 -45
  136. package/dist/coding/pre-action-gate.d.ts +1 -1
  137. package/dist/compounding/engine.d.ts +2 -2
  138. package/dist/compounding/engine.js +11 -11
  139. package/dist/compounding/preference-consolidator.d.ts +1 -1
  140. package/dist/compression-optimizer.d.ts +1 -1
  141. package/dist/config.d.ts +1 -1
  142. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  143. package/dist/connectors/codex-materialize-runner.js +11 -11
  144. package/dist/connectors/codex-materialize.d.ts +1 -1
  145. package/dist/connectors/index.d.ts +1 -1
  146. package/dist/connectors/index.js +11 -11
  147. package/dist/consolidation-provenance-check.d.ts +2 -2
  148. package/dist/consolidation-provenance-check.js +5 -5
  149. package/dist/consolidation-undo.d.ts +2 -2
  150. package/dist/consolidation-undo.js +4 -4
  151. package/dist/contradiction/index.d.ts +2 -2
  152. package/dist/converge-config.d.ts +1 -1
  153. package/dist/convergence-refresh.d.ts +2 -2
  154. package/dist/convergence-refresh.js +13 -13
  155. package/dist/conversation-index/backend.d.ts +1 -1
  156. package/dist/conversation-index/chunker.d.ts +1 -1
  157. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  158. package/dist/conversation-index/indexer.d.ts +1 -1
  159. package/dist/conversation-index/search.d.ts +1 -1
  160. package/dist/corpus-watermark.d.ts +1 -1
  161. package/dist/corpus-watermark.js +13 -13
  162. package/dist/day-summary.d.ts +1 -1
  163. package/dist/delinearize.d.ts +1 -1
  164. package/dist/dependency-propagation-config.d.ts +1 -1
  165. package/dist/{dependency-propagation-delivery-BxhvAppj.d.ts → dependency-propagation-delivery-DiY5T63p.d.ts} +1 -1
  166. package/dist/direct-answer-wiring.d.ts +1 -1
  167. package/dist/direct-answer.d.ts +1 -1
  168. package/dist/embedding-fallback.d.ts +1 -1
  169. package/dist/enrichment/index.d.ts +1 -1
  170. package/dist/entity-origin-fields.d.ts +1 -1
  171. package/dist/entity-retrieval.d.ts +2 -2
  172. package/dist/entity-retrieval.js +11 -11
  173. package/dist/entity-schema.d.ts +1 -1
  174. package/dist/episodic-context.d.ts +1 -1
  175. package/dist/explicit-capture.d.ts +9 -9
  176. package/dist/explicit-capture.js +5 -5
  177. package/dist/external-wiki-access.d.ts +11 -11
  178. package/dist/external-wiki-access.js +24 -24
  179. package/dist/external-wiki-collection-registration.d.ts +1 -1
  180. package/dist/external-wiki-collection.d.ts +1 -1
  181. package/dist/external-wiki-mcp-tools.d.ts +11 -11
  182. package/dist/extraction-error-classification.d.ts +1 -1
  183. package/dist/extraction-faithfulness.d.ts +1 -1
  184. package/dist/extraction-judge-telemetry.d.ts +1 -1
  185. package/dist/extraction-judge-training.d.ts +1 -1
  186. package/dist/extraction-judge.d.ts +1 -1
  187. package/dist/extraction-liveness.d.ts +1 -1
  188. package/dist/extraction-normalization.d.ts +1 -1
  189. package/dist/extraction-prompt.d.ts +1 -1
  190. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  191. package/dist/extraction-source-grounding.d.ts +1 -1
  192. package/dist/extraction.d.ts +1 -1
  193. package/dist/extraction.js +14 -14
  194. package/dist/fallback-llm.d.ts +1 -1
  195. package/dist/graph-dashboard-diff.d.ts +1 -1
  196. package/dist/graph-dashboard-key.d.ts +1 -1
  197. package/dist/graph-dashboard-parser.d.ts +1 -1
  198. package/dist/graph-edge-reinforcement.d.ts +1 -1
  199. package/dist/graph-path-reconstruction.d.ts +1 -1
  200. package/dist/graph-path-scoring.d.ts +1 -1
  201. package/dist/graph-snapshot.d.ts +1 -1
  202. package/dist/graph.d.ts +1 -1
  203. package/dist/harmonic-retrieval.js +1 -1
  204. package/dist/importance.d.ts +1 -1
  205. package/dist/importers/index.d.ts +1 -1
  206. package/dist/in-flight-reads.d.ts +1 -1
  207. package/dist/index.d.ts +21 -21
  208. package/dist/index.js +55 -55
  209. package/dist/intent.d.ts +1 -1
  210. package/dist/lcm/engine.d.ts +1 -1
  211. package/dist/lcm/index.d.ts +1 -1
  212. package/dist/lcm/tools.d.ts +1 -1
  213. package/dist/lifecycle.d.ts +1 -1
  214. package/dist/live-connectors-runner.d.ts +1 -1
  215. package/dist/local-llm.d.ts +1 -1
  216. package/dist/local-model-endpoint.d.ts +1 -1
  217. package/dist/maintenance/memory-governance.d.ts +1 -1
  218. package/dist/maintenance/memory-governance.js +11 -11
  219. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  220. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
  221. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  222. package/dist/maintenance/rebuild-memory-projection.js +12 -12
  223. package/dist/{maintenance-N5ur13Al.d.ts → maintenance-CaqA4z7V.d.ts} +3 -3
  224. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  225. package/dist/memory-action-policy.d.ts +1 -1
  226. package/dist/memory-cache.d.ts +1 -1
  227. package/dist/memory-cache.js +1 -1
  228. package/dist/memory-corpus-version.js +2 -2
  229. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  230. package/dist/memory-projection-store.d.ts +1 -1
  231. package/dist/memory-provenance.d.ts +1 -1
  232. package/dist/memory-snapshot.d.ts +1 -1
  233. package/dist/memory-worth-outcomes.d.ts +2 -2
  234. package/dist/models-json.d.ts +1 -1
  235. package/dist/namespaces/migrate.d.ts +3 -3
  236. package/dist/namespaces/migrate.js +12 -12
  237. package/dist/namespaces/principal.d.ts +1 -1
  238. package/dist/namespaces/search.d.ts +1 -1
  239. package/dist/namespaces/search.js +4 -4
  240. package/dist/namespaces/storage.d.ts +3 -3
  241. package/dist/namespaces/storage.js +11 -11
  242. package/dist/native-knowledge.d.ts +1 -1
  243. package/dist/offline-sync-impression-drain.d.ts +1 -1
  244. package/dist/operator-doctor-corpus.d.ts +1 -1
  245. package/dist/operator-doctor-corpus.js +14 -14
  246. package/dist/operator-doctor-replica.d.ts +1 -1
  247. package/dist/operator-toolkit.d.ts +3 -3
  248. package/dist/operator-toolkit.js +20 -20
  249. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  250. package/dist/orchestration/maintenance.d.ts +4 -4
  251. package/dist/orchestration/maintenance.js +17 -17
  252. package/dist/{orchestrator-ByLrpav4.d.ts → orchestrator-CSc9GfQv.d.ts} +8 -8
  253. package/dist/orchestrator.d.ts +9 -9
  254. package/dist/orchestrator.js +55 -55
  255. package/dist/page-versioning.js +4 -4
  256. package/dist/patterns-cli.d.ts +1 -1
  257. package/dist/{pipeline-BdF3ferY.d.ts → pipeline-X606GdRJ.d.ts} +1 -1
  258. package/dist/policy-runtime.d.ts +1 -1
  259. package/dist/proactive-contention.d.ts +1 -1
  260. package/dist/provenance.d.ts +1 -1
  261. package/dist/{public-http-DusietP2.d.ts → public-http-8PcrDIYi.d.ts} +1 -1
  262. package/dist/{qmd-CBSxevyb.d.ts → qmd-DCKeR-GX.d.ts} +1 -1
  263. package/dist/qmd-preflight.d.ts +2 -2
  264. package/dist/qmd-recall-cache.d.ts +1 -1
  265. package/dist/qmd.d.ts +2 -2
  266. package/dist/qmd.js +2 -2
  267. package/dist/recall-concurrency-config.d.ts +1 -1
  268. package/dist/recall-disclosure-escalation.d.ts +1 -1
  269. package/dist/recall-explain-renderer.d.ts +1 -1
  270. package/dist/recall-memory-map.d.ts +1 -1
  271. package/dist/recall-planner-llm.d.ts +1 -1
  272. package/dist/recall-state.d.ts +1 -1
  273. package/dist/recall-tag-filter.d.ts +1 -1
  274. package/dist/recall-timings.d.ts +1 -1
  275. package/dist/recall-xray-cli.d.ts +1 -1
  276. package/dist/recall-xray-renderer.d.ts +1 -1
  277. package/dist/recall-xray.d.ts +1 -1
  278. package/dist/reconcile/cursor.d.ts +1 -1
  279. package/dist/reconcile/manifest.d.ts +1 -1
  280. package/dist/reconcile/manifest.js +2 -2
  281. package/dist/reconcile/plan.d.ts +1 -1
  282. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  283. package/dist/replay/normalizers/claude.d.ts +1 -1
  284. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  285. package/dist/replay/normalizers/shared.d.ts +1 -1
  286. package/dist/replay/runner.d.ts +1 -1
  287. package/dist/replay/types.d.ts +1 -1
  288. package/dist/replica-divergence.d.ts +1 -1
  289. package/dist/replica-peers-config.d.ts +1 -1
  290. package/dist/resolve-auth-token.d.ts +1 -1
  291. package/dist/retrieval-agents.d.ts +2 -2
  292. package/dist/retrieval-tiers.d.ts +1 -1
  293. package/dist/routing/engine.d.ts +1 -1
  294. package/dist/routing/store.d.ts +1 -1
  295. package/dist/salvage-envelope.d.ts +1 -1
  296. package/dist/{scope-profiles-CeMv7pP0.d.ts → scope-profiles-_Y_RHCeE.d.ts} +1 -1
  297. package/dist/search/embed-helper.d.ts +1 -1
  298. package/dist/search/factory.d.ts +1 -1
  299. package/dist/search/factory.js +3 -3
  300. package/dist/search/index.d.ts +1 -1
  301. package/dist/search/index.js +3 -3
  302. package/dist/search/lancedb-backend.d.ts +1 -1
  303. package/dist/search/meilisearch-backend.d.ts +1 -1
  304. package/dist/search/noop-backend.d.ts +1 -1
  305. package/dist/search/orama-backend.d.ts +1 -1
  306. package/dist/search/port.d.ts +1 -1
  307. package/dist/search/remote-backend.d.ts +1 -1
  308. package/dist/{semantic-consolidation-B-85brYj.d.ts → semantic-consolidation-DT2VSrU0.d.ts} +1 -1
  309. package/dist/semantic-consolidation.d.ts +2 -2
  310. package/dist/semantic-consolidation.js +12 -12
  311. package/dist/semantic-rule-promotion.js +11 -11
  312. package/dist/semantic-rule-verifier.d.ts +1 -1
  313. package/dist/semantic-rule-verifier.js +11 -11
  314. package/dist/{service-CoO0HA2E.d.ts → service-BMo-gwDE.d.ts} +3 -3
  315. package/dist/session-observer-bands.d.ts +1 -1
  316. package/dist/session-observer-state.d.ts +1 -1
  317. package/dist/shared-context/manager.d.ts +1 -1
  318. package/dist/signal.d.ts +1 -1
  319. package/dist/source-agent-qualifier.d.ts +1 -1
  320. package/dist/source-agent-qualifier.js +13 -13
  321. package/dist/{storage-BVAVitkO.d.ts → storage-CGzJGUUu.d.ts} +49 -24
  322. package/dist/storage.d.ts +2 -2
  323. package/dist/storage.js +10 -10
  324. package/dist/summarizer.d.ts +1 -1
  325. package/dist/summary-snapshot.d.ts +1 -1
  326. package/dist/support-passport/index.d.ts +14 -14
  327. package/dist/support-passport/index.js +26 -26
  328. package/dist/temporal-supersession.d.ts +2 -2
  329. package/dist/temporal-timeline-recall.d.ts +1 -1
  330. package/dist/temporal-validity.d.ts +1 -1
  331. package/dist/threading.d.ts +1 -1
  332. package/dist/tier-migration.d.ts +2 -2
  333. package/dist/tier-routing.d.ts +1 -1
  334. package/dist/topics.d.ts +1 -1
  335. package/dist/transcript.d.ts +1 -1
  336. package/dist/transfer/capsule-import.js +5 -5
  337. package/dist/trust-score-stage.d.ts +1 -1
  338. package/dist/trust-score.d.ts +1 -1
  339. package/dist/{types-DWHOxlZP.d.ts → types-CBEAYU76.d.ts} +112 -128
  340. package/dist/types.d.ts +1 -1
  341. package/dist/utility-runtime.d.ts +1 -1
  342. package/dist/verified-recall.js +11 -11
  343. package/dist/write-envelope.d.ts +1 -1
  344. package/package.json +2 -2
  345. package/src/chat/chat-cli.test.ts +53 -0
  346. package/src/chat/chat-cli.ts +22 -58
  347. package/src/dedup/index.test.ts +65 -1
  348. package/src/dedup/index.ts +24 -2
  349. package/src/meetings/build.test.ts +20 -4
  350. package/src/meetings/build.ts +2 -2
  351. package/src/meetings/day-source.test.ts +3 -1
  352. package/src/meetings/day-source.ts +1 -12
  353. package/src/meetings/fuse.test.ts +64 -15
  354. package/src/meetings/fuse.ts +18 -12
  355. package/src/meetings/types.ts +4 -19
  356. package/src/memory-cache-derived.test.ts +90 -0
  357. package/src/memory-cache.ts +40 -42
  358. package/src/storage/content-hash-index.ts +54 -0
  359. package/src/storage-contract/content-hash.test.ts +59 -1
  360. package/src/storage-fact-hash-index-defer.test.ts +9 -9
  361. package/src/storage.ts +39 -40
  362. package/dist/chunk-JWPG65LH.js.map +0 -1
  363. package/dist/chunk-NRFU5MVH.js.map +0 -1
  364. package/dist/chunk-XMMESCPD.js.map +0 -1
  365. /package/dist/{capsule-merge-HCJJMLPS.js.map → capsule-merge-SGIVB3WA.js.map} +0 -0
  366. /package/dist/{chunk-XFCQIQQU.js.map → chunk-2UM6WHME.js.map} +0 -0
  367. /package/dist/{chunk-CKWOMJDY.js.map → chunk-3Z5TGRFA.js.map} +0 -0
  368. /package/dist/{chunk-JJX5XEIG.js.map → chunk-77QZW2D6.js.map} +0 -0
  369. /package/dist/{chunk-X4MGNVOO.js.map → chunk-7AF243WZ.js.map} +0 -0
  370. /package/dist/{chunk-2ASAS3CQ.js.map → chunk-7KQB4EBS.js.map} +0 -0
  371. /package/dist/{chunk-3LJ2L3T3.js.map → chunk-7LF2OHIJ.js.map} +0 -0
  372. /package/dist/{chunk-VAMQU4W7.js.map → chunk-AYVCKGA6.js.map} +0 -0
  373. /package/dist/{chunk-GTRGH4ZT.js.map → chunk-BB2LH5JM.js.map} +0 -0
  374. /package/dist/{chunk-DQV3LUQL.js.map → chunk-CUDSA46O.js.map} +0 -0
  375. /package/dist/{chunk-PADG72LJ.js.map → chunk-DXDAQZ2K.js.map} +0 -0
  376. /package/dist/{chunk-EJCN5ATI.js.map → chunk-DYZR3Z6D.js.map} +0 -0
  377. /package/dist/{chunk-VN7IIQGS.js.map → chunk-E4KMY4KR.js.map} +0 -0
  378. /package/dist/{chunk-ZQKXRKMR.js.map → chunk-EFKZT6AY.js.map} +0 -0
  379. /package/dist/{chunk-DNRTKO2U.js.map → chunk-EJY3HJMT.js.map} +0 -0
  380. /package/dist/{chunk-4EDAHS6D.js.map → chunk-ERPBRXVZ.js.map} +0 -0
  381. /package/dist/{chunk-RPKJHYVE.js.map → chunk-FPEZ74F7.js.map} +0 -0
  382. /package/dist/{chunk-Z334TJRB.js.map → chunk-GF7RQWXC.js.map} +0 -0
  383. /package/dist/{chunk-6D7PZKCJ.js.map → chunk-GG4DN63W.js.map} +0 -0
  384. /package/dist/{chunk-OR7KEGLR.js.map → chunk-GTD4Q62X.js.map} +0 -0
  385. /package/dist/{chunk-QOMUE4FS.js.map → chunk-I5FLIB2J.js.map} +0 -0
  386. /package/dist/{chunk-2JL7WPXL.js.map → chunk-IVXVLDNT.js.map} +0 -0
  387. /package/dist/{chunk-EJLTNPRY.js.map → chunk-KHCUVYCY.js.map} +0 -0
  388. /package/dist/{chunk-QSIQVC32.js.map → chunk-KYTRF64R.js.map} +0 -0
  389. /package/dist/{chunk-LNFYISZ6.js.map → chunk-LX4TNSAE.js.map} +0 -0
  390. /package/dist/{chunk-H6ZXNH5I.js.map → chunk-MUJ4QFUQ.js.map} +0 -0
  391. /package/dist/{chunk-JSH2TV34.js.map → chunk-NA56NSKL.js.map} +0 -0
  392. /package/dist/{chunk-DFEYRCG2.js.map → chunk-NKB43PGI.js.map} +0 -0
  393. /package/dist/{chunk-DLQQU4EG.js.map → chunk-NS5ETDYD.js.map} +0 -0
  394. /package/dist/{chunk-BXOZALJ6.js.map → chunk-PB4WVYGC.js.map} +0 -0
  395. /package/dist/{chunk-Q35XGIEM.js.map → chunk-PBRCYYO7.js.map} +0 -0
  396. /package/dist/{chunk-QYN5PXDZ.js.map → chunk-PMVPCZJZ.js.map} +0 -0
  397. /package/dist/{chunk-3USQWITL.js.map → chunk-QI5RDDEL.js.map} +0 -0
  398. /package/dist/{chunk-I6OQCT3Y.js.map → chunk-QRWMS6SI.js.map} +0 -0
  399. /package/dist/{chunk-ITYAXU4S.js.map → chunk-R6UMNP5C.js.map} +0 -0
  400. /package/dist/{chunk-5W62VEFH.js.map → chunk-RWMSMTQP.js.map} +0 -0
  401. /package/dist/{chunk-FKJVEW6O.js.map → chunk-SYVGVK4S.js.map} +0 -0
  402. /package/dist/{chunk-GNKY5JEP.js.map → chunk-TSTI6A3A.js.map} +0 -0
  403. /package/dist/{chunk-ISFUFLFM.js.map → chunk-UCLMKNHA.js.map} +0 -0
  404. /package/dist/{chunk-ZMSZVISA.js.map → chunk-UFKPQBXH.js.map} +0 -0
  405. /package/dist/{chunk-B2OOJCUX.js.map → chunk-UGHCZS6K.js.map} +0 -0
  406. /package/dist/{chunk-RSLRGRBJ.js.map → chunk-V3KIRICY.js.map} +0 -0
  407. /package/dist/{chunk-MRJ43KSG.js.map → chunk-VPHSMJ2E.js.map} +0 -0
  408. /package/dist/{chunk-E2GYBTSP.js.map → chunk-VYEPACWY.js.map} +0 -0
  409. /package/dist/{chunk-A4HXWNST.js.map → chunk-X7LEDA74.js.map} +0 -0
  410. /package/dist/{chunk-KMAP7SNQ.js.map → chunk-XCB6QDL6.js.map} +0 -0
  411. /package/dist/{chunk-WDUG2CH3.js.map → chunk-YEQCMA5L.js.map} +0 -0
  412. /package/dist/{chunk-LZCSOUJ7.js.map → chunk-YFCEBB5P.js.map} +0 -0
  413. /package/dist/{chunk-IKXUG6KC.js.map → chunk-YXMHUBN2.js.map} +0 -0
  414. /package/dist/{chunk-GFNS3BHV.js.map → chunk-ZUPKNWRZ.js.map} +0 -0
  415. /package/dist/{chunk-GSTIBXBW.js.map → chunk-ZVPVTPGI.js.map} +0 -0
package/dist/buffer.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  SmartBuffer
3
- } from "./chunk-DQV3LUQL.js";
3
+ } from "./chunk-CUDSA46O.js";
4
4
  import "./chunk-H3FZVNRN.js";
5
5
  import "./chunk-2AD5SXO4.js";
6
- import "./chunk-GTRGH4ZT.js";
6
+ import "./chunk-BB2LH5JM.js";
7
7
  import "./chunk-CSAKJVXW.js";
8
8
  import "./chunk-K2XUWZBM.js";
9
9
  import "./chunk-OD4FM2U7.js";
10
- import "./chunk-E2GYBTSP.js";
10
+ import "./chunk-VYEPACWY.js";
11
11
  import "./chunk-URS5GSM7.js";
12
12
  import "./chunk-ZLQ37WJX.js";
13
13
  import "./chunk-IUM3VSHI.js";
14
- import "./chunk-XMMESCPD.js";
14
+ import "./chunk-C64XATK7.js";
15
15
  import "./chunk-42JKGUFJ.js";
16
16
  import "./chunk-6Q3ZTEF6.js";
17
17
  import "./chunk-TBBDFYXW.js";
@@ -1,6 +1,6 @@
1
- import { bF as BulkImportSourceAdapter } from '../types-DWHOxlZP.js';
2
- export { bE as BulkImportError, a9 as BulkImportOptions, ab as BulkImportResult, aa as BulkImportSource, bN as ImportSourceRole, a8 as ImportTurn, bO as ImportTurnValidationIssue, b$ as isImportRole, c1 as parseIsoTimestamp, c2 as validateImportTurn } from '../types-DWHOxlZP.js';
3
- export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from '../pipeline-BdF3ferY.js';
1
+ import { bE as BulkImportSourceAdapter } from '../types-CBEAYU76.js';
2
+ export { bD as BulkImportError, a9 as BulkImportOptions, ab as BulkImportResult, aa as BulkImportSource, bM as ImportSourceRole, a8 as ImportTurn, bN as ImportTurnValidationIssue, b_ as isImportRole, c0 as parseIsoTimestamp, c1 as validateImportTurn } from '../types-CBEAYU76.js';
3
+ export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from '../pipeline-X606GdRJ.js';
4
4
  import '../message-parts/index.js';
5
5
  import '../bounded-jsonl-state.js';
6
6
  import '../operator-doctor-types.js';
@@ -1,5 +1,5 @@
1
1
  import { FallbackLlmClient } from './fallback-llm.js';
2
- import { G as GatewayConfig, A as AgentPersonaModelConfig } from './types-DWHOxlZP.js';
2
+ import { G as GatewayConfig, A as AgentPersonaModelConfig } from './types-CBEAYU76.js';
3
3
  import './resolve-provider-secret.js';
4
4
  import './message-parts/index.js';
5
5
  import './bounded-jsonl-state.js';
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig } from './types-DWHOxlZP.js';
1
+ import { P as PluginConfig } from './types-CBEAYU76.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createVersion
3
- } from "./chunk-ZMSZVISA.js";
3
+ } from "./chunk-UFKPQBXH.js";
4
4
  import {
5
5
  bumpMemoryCorpusVersionForDir
6
- } from "./chunk-KMAP7SNQ.js";
6
+ } from "./chunk-XCB6QDL6.js";
7
7
  import "./chunk-RBOJCG4T.js";
8
8
  import {
9
9
  HistoricalEntityCanonicalIdCache,
@@ -13,10 +13,10 @@ import {
13
13
  repairContentAfterJournalMove,
14
14
  requestEntityCanonicalIdReconcile,
15
15
  withRawEntityPageMutation
16
- } from "./chunk-GSTIBXBW.js";
16
+ } from "./chunk-ZVPVTPGI.js";
17
17
  import "./chunk-5WITETWU.js";
18
18
  import "./chunk-6CIAGZ6X.js";
19
- import "./chunk-XMMESCPD.js";
19
+ import "./chunk-C64XATK7.js";
20
20
  import "./chunk-42JKGUFJ.js";
21
21
  import {
22
22
  parseExportBundle
@@ -277,4 +277,4 @@ async function readLocalFile(absPath) {
277
277
  export {
278
278
  mergeCapsule
279
279
  };
280
- //# sourceMappingURL=capsule-merge-HCJJMLPS.js.map
280
+ //# sourceMappingURL=capsule-merge-SGIVB3WA.js.map
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig } from './types-DWHOxlZP.js';
1
+ import { P as PluginConfig } from './types-CBEAYU76.js';
2
2
 
3
3
  /**
4
4
  * Rebuildable namespace catalog (issue #1499).
@@ -2,7 +2,7 @@ import { CausalChainIndex } from './causal-chain.js';
2
2
  import { ConsolidatedPreference } from './compounding/preference-consolidator.js';
3
3
  import './causal-trajectory.js';
4
4
  import './objective-state.js';
5
- import './types-DWHOxlZP.js';
5
+ import './types-CBEAYU76.js';
6
6
  import './message-parts/index.js';
7
7
  import './bounded-jsonl-state.js';
8
8
  import './operator-doctor-types.js';
@@ -1,4 +1,4 @@
1
- import { G as GatewayConfig, A as AgentPersonaModelConfig, P as PluginConfig, M as MemoryFile } from './types-DWHOxlZP.js';
1
+ import { G as GatewayConfig, A as AgentPersonaModelConfig, P as PluginConfig, M as MemoryFile } from './types-CBEAYU76.js';
2
2
  import { RolloutSummaryInput, MaterializeResult } from './connectors/codex-materialize.js';
3
3
  import './message-parts/index.js';
4
4
  import './bounded-jsonl-state.js';
@@ -4,22 +4,22 @@ import {
4
4
  } from "./chunk-2PSX5BJU.js";
5
5
  import {
6
6
  buildExtensionsBlockForConsolidation
7
- } from "./chunk-PADG72LJ.js";
7
+ } from "./chunk-DXDAQZ2K.js";
8
8
  import "./chunk-5JMAGU26.js";
9
9
  import "./chunk-B7RWBZXW.js";
10
10
  import {
11
11
  runPostConsolidationMaterialize
12
- } from "./chunk-WDUG2CH3.js";
12
+ } from "./chunk-YEQCMA5L.js";
13
13
  import "./chunk-RDFF2NAU.js";
14
14
  import {
15
15
  resolveCausalTrajectoryStoreDir
16
16
  } from "./chunk-GPFZFCRN.js";
17
- import "./chunk-JWPG65LH.js";
17
+ import "./chunk-FHKXVTM5.js";
18
18
  import "./chunk-46WM6JX2.js";
19
19
  import "./chunk-UHVXE24Y.js";
20
20
  import "./chunk-SXIMQLGV.js";
21
- import "./chunk-Z334TJRB.js";
22
- import "./chunk-6D7PZKCJ.js";
21
+ import "./chunk-GF7RQWXC.js";
22
+ import "./chunk-GG4DN63W.js";
23
23
  import "./chunk-OQIRBGUU.js";
24
24
  import "./chunk-VANZKHTN.js";
25
25
  import "./chunk-CYEPCZN5.js";
@@ -41,24 +41,24 @@ import "./chunk-DM2T26WE.js";
41
41
  import "./chunk-LDXUBPMO.js";
42
42
  import "./chunk-UG6VXIOK.js";
43
43
  import "./chunk-AAD2ZS6P.js";
44
- import "./chunk-H6ZXNH5I.js";
44
+ import "./chunk-MUJ4QFUQ.js";
45
45
  import "./chunk-LCU5R6TQ.js";
46
46
  import "./chunk-BT7NVCML.js";
47
47
  import "./chunk-YXZG5TVN.js";
48
48
  import "./chunk-3ONXXHQO.js";
49
49
  import "./chunk-5GINB5LC.js";
50
50
  import "./chunk-G7D6GZ5J.js";
51
- import "./chunk-ZMSZVISA.js";
52
- import "./chunk-KMAP7SNQ.js";
51
+ import "./chunk-UFKPQBXH.js";
52
+ import "./chunk-XCB6QDL6.js";
53
53
  import "./chunk-RBOJCG4T.js";
54
- import "./chunk-GSTIBXBW.js";
54
+ import "./chunk-ZVPVTPGI.js";
55
55
  import "./chunk-5WITETWU.js";
56
56
  import "./chunk-6CIAGZ6X.js";
57
- import "./chunk-E2GYBTSP.js";
57
+ import "./chunk-VYEPACWY.js";
58
58
  import "./chunk-URS5GSM7.js";
59
59
  import "./chunk-ZLQ37WJX.js";
60
60
  import "./chunk-IUM3VSHI.js";
61
- import "./chunk-XMMESCPD.js";
61
+ import "./chunk-C64XATK7.js";
62
62
  import "./chunk-42JKGUFJ.js";
63
63
  import {
64
64
  FallbackLlmClient,
@@ -87,7 +87,7 @@ import "./chunk-DVYRD4HY.js";
87
87
  import "./chunk-ZA53AZND.js";
88
88
  import "./chunk-GCASGYIO.js";
89
89
  import "./chunk-7RJUVTVF.js";
90
- import "./chunk-NRFU5MVH.js";
90
+ import "./chunk-JOEJG4SD.js";
91
91
  import "./chunk-2LWQSV6A.js";
92
92
  import "./chunk-RL6NEVXT.js";
93
93
  import "./chunk-5FVVY2EB.js";
@@ -1,7 +1,7 @@
1
1
  import { a as GraphEdge } from './graph-444E-DrF.js';
2
2
  import { CausalTrajectoryRecord } from './causal-trajectory.js';
3
3
  import './capabilities.js';
4
- import './types-DWHOxlZP.js';
4
+ import './types-CBEAYU76.js';
5
5
  import './message-parts/index.js';
6
6
  import './bounded-jsonl-state.js';
7
7
  import './operator-doctor-types.js';
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-B7RWBZXW.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-JWPG65LH.js";
6
+ } from "./chunk-FHKXVTM5.js";
7
7
  import {
8
8
  getCachedEpisodeMap,
9
9
  setCachedEpisodeMap
10
- } from "./chunk-XMMESCPD.js";
10
+ } from "./chunk-C64XATK7.js";
11
11
  import {
12
12
  countRecallTokenOverlap,
13
13
  normalizeRecallTokens
@@ -109,4 +109,4 @@ export {
109
109
  compareVerifiedEpisodeResults,
110
110
  searchVerifiedEpisodes
111
111
  };
112
- //# sourceMappingURL=chunk-XFCQIQQU.js.map
112
+ //# sourceMappingURL=chunk-2UM6WHME.js.map
@@ -3,7 +3,7 @@ import {
3
3
  readNamespaceMaintenanceLastRanStatuses,
4
4
  readNamespaceMaintenanceStatuses,
5
5
  runNamespaceMaintenancePlan
6
- } from "./chunk-RSLRGRBJ.js";
6
+ } from "./chunk-V3KIRICY.js";
7
7
  import {
8
8
  analyzeSessionIntegrity,
9
9
  applySessionRepair,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-CMTINOFS.js";
15
15
  import {
16
16
  summarizeCorpusAndReplica
17
- } from "./chunk-B2OOJCUX.js";
17
+ } from "./chunk-UGHCZS6K.js";
18
18
  import {
19
19
  readJudgeVerdictStats
20
20
  } from "./chunk-OZKOPQCM.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-2DQ2XREU.js";
33
33
  import {
34
34
  runConsolidationProvenanceCheck
35
- } from "./chunk-2ASAS3CQ.js";
35
+ } from "./chunk-7KQB4EBS.js";
36
36
  import {
37
37
  reportBufferSurpriseDistribution
38
38
  } from "./chunk-YBPYIAA5.js";
@@ -41,20 +41,20 @@ import {
41
41
  } from "./chunk-RYST72N5.js";
42
42
  import {
43
43
  readAggregateExtractionWatermark
44
- } from "./chunk-LZCSOUJ7.js";
44
+ } from "./chunk-YFCEBB5P.js";
45
45
  import {
46
46
  listMemoryGovernanceRuns,
47
47
  readMemoryGovernanceRunArtifact
48
- } from "./chunk-JJX5XEIG.js";
48
+ } from "./chunk-77QZW2D6.js";
49
49
  import {
50
50
  listNamespaces
51
- } from "./chunk-GFNS3BHV.js";
51
+ } from "./chunk-ZUPKNWRZ.js";
52
52
  import {
53
53
  analyzeGraphHealth
54
54
  } from "./chunk-YMOPYG3K.js";
55
55
  import {
56
56
  StorageManager
57
- } from "./chunk-JWPG65LH.js";
57
+ } from "./chunk-FHKXVTM5.js";
58
58
  import {
59
59
  lintWorkspaceFiles
60
60
  } from "./chunk-DM2T26WE.js";
@@ -1683,4 +1683,4 @@ export {
1683
1683
  runBenchmarkRecall,
1684
1684
  runOperatorRepair
1685
1685
  };
1686
- //# sourceMappingURL=chunk-CKWOMJDY.js.map
1686
+ //# sourceMappingURL=chunk-3Z5TGRFA.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-JWPG65LH.js";
3
+ } from "./chunk-FHKXVTM5.js";
4
4
  import {
5
5
  bumpMemoryCorpusVersionForDir
6
- } from "./chunk-KMAP7SNQ.js";
6
+ } from "./chunk-XCB6QDL6.js";
7
7
  import {
8
8
  requestEntityCanonicalIdReconcile
9
- } from "./chunk-GSTIBXBW.js";
9
+ } from "./chunk-ZVPVTPGI.js";
10
10
  import {
11
11
  decideLifecycleTransition
12
12
  } from "./chunk-TBBDFYXW.js";
@@ -765,4 +765,4 @@ export {
765
765
  listMemoryGovernanceRuns,
766
766
  readMemoryGovernanceRunArtifact
767
767
  };
768
- //# sourceMappingURL=chunk-JJX5XEIG.js.map
768
+ //# sourceMappingURL=chunk-77QZW2D6.js.map
@@ -296,4 +296,4 @@ async function searchHarmonicRetrieval(options) {
296
296
  export {
297
297
  searchHarmonicRetrieval
298
298
  };
299
- //# sourceMappingURL=chunk-X4MGNVOO.js.map
299
+ //# sourceMappingURL=chunk-7AF243WZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-G7D6GZ5J.js";
5
5
  import {
6
6
  sidecarKey
7
- } from "./chunk-ZMSZVISA.js";
7
+ } from "./chunk-UFKPQBXH.js";
8
8
  import {
9
9
  RECALL_FALLBACK_DIRS
10
10
  } from "./chunk-VS2IYZRU.js";
@@ -342,4 +342,4 @@ function isPathWithin(candidate, root) {
342
342
  export {
343
343
  runConsolidationProvenanceCheck
344
344
  };
345
- //# sourceMappingURL=chunk-2ASAS3CQ.js.map
345
+ //# sourceMappingURL=chunk-7KQB4EBS.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-JWPG65LH.js";
3
+ } from "./chunk-FHKXVTM5.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
6
  } from "./chunk-LCU5R6TQ.js";
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-3LJ2L3T3.js.map
549
+ //# sourceMappingURL=chunk-7LF2OHIJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-JWPG65LH.js";
3
+ } from "./chunk-FHKXVTM5.js";
4
4
  import {
5
5
  normalizeEntityName
6
6
  } from "./chunk-YXZG5TVN.js";
@@ -956,4 +956,4 @@ export {
956
956
  resolveBriefingSaveDir,
957
957
  briefingFilename
958
958
  };
959
- //# sourceMappingURL=chunk-VAMQU4W7.js.map
959
+ //# sourceMappingURL=chunk-AYVCKGA6.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-OD4FM2U7.js";
8
8
  import {
9
9
  parseQmdExplain
10
- } from "./chunk-E2GYBTSP.js";
10
+ } from "./chunk-VYEPACWY.js";
11
11
  import {
12
12
  classifyOrigin
13
13
  } from "./chunk-6Q3ZTEF6.js";
@@ -1698,4 +1698,4 @@ export {
1698
1698
  ExtractionDeadlineError,
1699
1699
  ExtractionRunCoordinator
1700
1700
  };
1701
- //# sourceMappingURL=chunk-GTRGH4ZT.js.map
1701
+ //# sourceMappingURL=chunk-BB2LH5JM.js.map
@@ -11,15 +11,19 @@ function sweepExpiredHotEntries(now) {
11
11
  if (entry.ttlMs > 0 && now - entry.loadedAt > entry.ttlMs) hotCacheByDir.delete(dir);
12
12
  }
13
13
  }
14
- function getCachedMemories(baseDir, currentVersion, keyId = "", ttlMs = 0) {
14
+ function getVersionedCacheEntry(cache, key, currentVersion, keyId, ttlMs) {
15
15
  if (currentVersion === 0) return null;
16
- const entry = hotCacheByDir.get(baseDir);
16
+ const entry = cache.get(key);
17
17
  if (!entry || entry.version !== currentVersion || entry.keyId !== keyId) return null;
18
18
  if (ttlMs > 0 && Date.now() - entry.loadedAt > ttlMs) {
19
- hotCacheByDir.delete(baseDir);
19
+ cache.delete(key);
20
20
  return null;
21
21
  }
22
- return [...entry.memories.values()];
22
+ return entry;
23
+ }
24
+ function getCachedMemories(baseDir, currentVersion, keyId = "", ttlMs = 0) {
25
+ const entry = getVersionedCacheEntry(hotCacheByDir, baseDir, currentVersion, keyId, ttlMs);
26
+ return entry ? [...entry.memories.values()] : null;
23
27
  }
24
28
  function setCachedMemories(baseDir, memories, version, keyId = "", ttlMs = 0) {
25
29
  const map = /* @__PURE__ */ new Map();
@@ -37,10 +41,8 @@ function updateCacheOnDelete(baseDir, filePath, keyId = "") {
37
41
  if (entry && entry.keyId === keyId) entry.memories.delete(filePath);
38
42
  }
39
43
  function getCachedArchivedMemories(baseDir, currentVersion, keyId = "") {
40
- if (currentVersion === 0) return null;
41
- const entry = archiveCacheByDir.get(baseDir);
42
- if (!entry || entry.version !== currentVersion || entry.keyId !== keyId) return null;
43
- return [...entry.memories.values()];
44
+ const entry = getVersionedCacheEntry(archiveCacheByDir, baseDir, currentVersion, keyId, 0);
45
+ return entry ? [...entry.memories.values()] : null;
44
46
  }
45
47
  function setCachedArchivedMemories(baseDir, memories, version, keyId = "") {
46
48
  const map = /* @__PURE__ */ new Map();
@@ -79,14 +81,8 @@ function invalidateCachedEntities(baseDir) {
79
81
  var episodeMapByDir = /* @__PURE__ */ new Map();
80
82
  var ruleMemoriesByDir = /* @__PURE__ */ new Map();
81
83
  function getCachedEpisodeMap(baseDir, currentVersion, keyId = "", ttlMs = 0) {
82
- if (currentVersion === 0) return null;
83
- const entry = episodeMapByDir.get(baseDir);
84
- if (!entry || entry.sourceVersion !== currentVersion || entry.keyId !== keyId) return null;
85
- if (ttlMs > 0 && Date.now() - entry.loadedAt > ttlMs) {
86
- episodeMapByDir.delete(baseDir);
87
- return null;
88
- }
89
- return entry.data;
84
+ const entry = getVersionedCacheEntry(episodeMapByDir, baseDir, currentVersion, keyId, ttlMs);
85
+ return entry ? entry.data : null;
90
86
  }
91
87
  function setCachedEpisodeMap(baseDir, memories, version, cache = true, keyId = "") {
92
88
  const map = /* @__PURE__ */ new Map();
@@ -95,18 +91,12 @@ function setCachedEpisodeMap(baseDir, memories, version, cache = true, keyId = "
95
91
  if (m.frontmatter.memoryKind !== "episode") continue;
96
92
  map.set(m.frontmatter.id, m);
97
93
  }
98
- if (cache) episodeMapByDir.set(baseDir, { data: map, sourceVersion: version, keyId, loadedAt: Date.now() });
94
+ if (cache) episodeMapByDir.set(baseDir, { data: map, version, keyId, loadedAt: Date.now() });
99
95
  return map;
100
96
  }
101
97
  function getCachedRuleMemories(baseDir, currentVersion, keyId = "", ttlMs = 0) {
102
- if (currentVersion === 0) return null;
103
- const entry = ruleMemoriesByDir.get(baseDir);
104
- if (!entry || entry.sourceVersion !== currentVersion || entry.keyId !== keyId) return null;
105
- if (ttlMs > 0 && Date.now() - entry.loadedAt > ttlMs) {
106
- ruleMemoriesByDir.delete(baseDir);
107
- return null;
108
- }
109
- return entry.data;
98
+ const entry = getVersionedCacheEntry(ruleMemoriesByDir, baseDir, currentVersion, keyId, ttlMs);
99
+ return entry ? entry.data : null;
110
100
  }
111
101
  function setCachedRuleMemories(baseDir, memories, version, cache = true, keyId = "") {
112
102
  const byId = /* @__PURE__ */ new Map();
@@ -118,7 +108,7 @@ function setCachedRuleMemories(baseDir, memories, version, cache = true, keyId =
118
108
  }
119
109
  }
120
110
  const result = { all, byId };
121
- if (cache) ruleMemoriesByDir.set(baseDir, { data: result, sourceVersion: version, keyId, loadedAt: Date.now() });
111
+ if (cache) ruleMemoriesByDir.set(baseDir, { data: result, version, keyId, loadedAt: Date.now() });
122
112
  return result;
123
113
  }
124
114
  var QMD_CACHE_TTL_MS = 6e4;
@@ -278,4 +268,4 @@ export {
278
268
  clearQmdResultCaches,
279
269
  getMemoryCacheStats
280
270
  };
281
- //# sourceMappingURL=chunk-XMMESCPD.js.map
271
+ //# sourceMappingURL=chunk-C64XATK7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/memory-cache.ts"],"sourcesContent":["import type { EntityFile, MemoryFile } from \"./types.js\";\nimport { clearQmdRecallCache, qmdRecallCacheSize } from \"./qmd-recall-cache.js\";\n\ninterface CacheEntry {\n memories: Map<string, MemoryFile>; // keyed by file path\n version: number;\n loadedAt: number;\n // Secure-store key identity that decrypted these memories (issue #1902, Codex\n // P1). \"\" for plaintext/locked stores. A manager only reads an entry whose\n // keyId matches its own, so a locked/unkeyed instance never sees content\n // another instance decrypted under a key for the same baseDir.\n keyId: string;\n // Effective TTL (ms) this entry was stored under (issue #1902, Codex Medium),\n // so the opportunistic sweep can evict abandoned corpora that are never\n // revisited. 0 = no TTL (never swept by age).\n ttlMs: number;\n}\n\n// Module-level singleton — shared across all StorageManager instances and sessions\nconst hotCacheByDir = new Map<string, CacheEntry>();\nconst archiveCacheByDir = new Map<string, CacheEntry>();\n\n/**\n * Evict every hot entry whose own TTL has elapsed (issue #1902, Codex Medium).\n * Called opportunistically on each set so a long-running process that reads many\n * namespace/temporary roots and never revisits some of them still releases their\n * (potentially hundreds-of-MB) corpora within the TTL, instead of holding them\n * resident until an explicit global clear. O(entries) over a small map.\n */\nfunction sweepExpiredHotEntries(now: number): void {\n for (const [dir, entry] of hotCacheByDir) {\n if (entry.ttlMs > 0 && now - entry.loadedAt > entry.ttlMs) hotCacheByDir.delete(dir);\n }\n}\n\n/**\n * Shared read gate for every versioned cache layer (issue #2481): serve an\n * entry only when its version and secure-store keyId match the caller.\n * `currentVersion === 0` means version tracking is unavailable (tests, fresh\n * installs) and always misses so disk is read. The TTL is a safety net for\n * external filesystem edits that bypass the version sentinel (issue #1902):\n * ttlMs <= 0 disables it, and on expiry the entry is evicted — not just\n * skipped — so a stale dir releases its resident corpus instead of lingering\n * until an explicit clear.\n */\nfunction getVersionedCacheEntry<K, E extends { version: number; keyId: string; loadedAt: number }>(\n cache: Map<K, E>,\n key: K,\n currentVersion: number,\n keyId: string,\n ttlMs: number,\n): E | null {\n if (currentVersion === 0) return null;\n const entry = cache.get(key);\n if (!entry || entry.version !== currentVersion || entry.keyId !== keyId) return null;\n if (ttlMs > 0 && Date.now() - entry.loadedAt > ttlMs) {\n cache.delete(key);\n return null;\n }\n return entry;\n}\n\nexport function getCachedMemories(\n baseDir: string,\n currentVersion: number,\n keyId = \"\",\n ttlMs = 0,\n): MemoryFile[] | null {\n const entry = getVersionedCacheEntry(hotCacheByDir, baseDir, currentVersion, keyId, ttlMs);\n return entry ? [...entry.memories.values()] : null;\n}\n\nexport function setCachedMemories(\n baseDir: string,\n memories: MemoryFile[],\n version: number,\n keyId = \"\",\n ttlMs = 0,\n): void {\n const map = new Map<string, MemoryFile>();\n for (const m of memories) map.set(m.path, m);\n const now = Date.now();\n hotCacheByDir.set(baseDir, { memories: map, version, loadedAt: now, keyId, ttlMs });\n // Release abandoned corpora that expired but were never revisited (Codex Medium).\n sweepExpiredHotEntries(now);\n}\n\nexport function updateCacheOnWrite(baseDir: string, memory: MemoryFile, keyId = \"\"): void {\n const entry = hotCacheByDir.get(baseDir);\n // Only mutate an entry that belongs to THIS key identity (issue #1902, Codex\n // Medium). A concurrent differently-keyed manager may have replaced the\n // single hotCacheByDir slot during an awaited parse; inserting our decrypted\n // MemoryFile into its entry would leak plaintext across the key boundary.\n if (entry && entry.keyId === keyId) entry.memories.set(memory.path, memory);\n}\n\nexport function updateCacheOnDelete(baseDir: string, filePath: string, keyId = \"\"): void {\n const entry = hotCacheByDir.get(baseDir);\n if (entry && entry.keyId === keyId) entry.memories.delete(filePath);\n}\n// Archive cache — same pattern, separate store\nexport function getCachedArchivedMemories(\n baseDir: string,\n currentVersion: number,\n keyId = \"\",\n): MemoryFile[] | null {\n // ttlMs 0: the archive cache has no age TTL; it is version-keyed and cleared\n // via invalidation.\n const entry = getVersionedCacheEntry(archiveCacheByDir, baseDir, currentVersion, keyId, 0);\n return entry ? [...entry.memories.values()] : null;\n}\n\nexport function setCachedArchivedMemories(\n baseDir: string,\n memories: MemoryFile[],\n version: number,\n keyId = \"\",\n): void {\n const map = new Map<string, MemoryFile>();\n for (const m of memories) map.set(m.path, m);\n // ttlMs: 0 — the archive cache has no age TTL; it is version-keyed and cleared\n // via invalidation. The field satisfies the shared CacheEntry shape (#1902).\n archiveCacheByDir.set(baseDir, { memories: map, version, loadedAt: Date.now(), keyId, ttlMs: 0 });\n}\n\n// Entity cache — same pattern as memory cache, but keyed by schema-aware parse inputs.\nconst entityCacheByDir = new Map<string, { entities: EntityFile[]; version: number; loadedAt: number }>();\n\n/**\n * Single normalization point for the entity-cache schema key (issue #1535).\n * BOTH the set/get key builder and the prefix invalidation derive from here so\n * `undefined` vs `\"\"` (or any future normalization rule) can never diverge\n * between the write path and the invalidate path (rule 38 cousin).\n */\nfunction normalizeEntitySchemaKey(schemaKey: string | undefined): string {\n return schemaKey ?? \"\";\n}\n\n/** Prefix shared by every entity-cache key for a dir, regardless of schemaKey. */\nfunction entityCacheKeyPrefix(baseDir: string): string {\n return `${baseDir}\\u0000`;\n}\n\nfunction buildEntityCacheKey(baseDir: string, schemaKey?: string): string {\n return `${entityCacheKeyPrefix(baseDir)}${normalizeEntitySchemaKey(schemaKey)}`;\n}\n\nexport function getCachedEntities(\n baseDir: string,\n currentVersion: number,\n schemaKey: string = \"\",\n): EntityFile[] | null {\n if (currentVersion === 0) return null;\n const entry = entityCacheByDir.get(buildEntityCacheKey(baseDir, schemaKey));\n if (!entry || entry.version !== currentVersion) return null;\n return entry.entities;\n}\n\nexport function setCachedEntities(\n baseDir: string,\n entities: EntityFile[],\n version: number,\n schemaKey: string = \"\",\n): void {\n entityCacheByDir.set(buildEntityCacheKey(baseDir, schemaKey), {\n entities,\n version,\n loadedAt: Date.now(),\n });\n}\n\nexport function invalidateCachedEntities(baseDir: string): void {\n const prefix = entityCacheKeyPrefix(baseDir);\n for (const key of entityCacheByDir.keys()) {\n if (key.startsWith(prefix)) entityCacheByDir.delete(key);\n }\n}\n\n// Derived caches — pre-filtered views invalidated alongside the main cache.\n// These avoid O(146K) filter+map on every verified recall/rules call.\ninterface DerivedCacheEntry<T> {\n data: T;\n version: number; // matches the hot cache version it was derived from\n keyId: string; // secure-store key identity of the corpus it was derived from (#1902)\n loadedAt: number; // build time — bounds staleness from external edits via ttlMs (#1902)\n}\n\nconst episodeMapByDir = new Map<string, DerivedCacheEntry<Map<string, MemoryFile>>>();\nconst ruleMemoriesByDir = new Map<string, DerivedCacheEntry<{ all: MemoryFile[]; byId: Map<string, MemoryFile> }>>();\n\nexport function getCachedEpisodeMap(\n baseDir: string,\n currentVersion: number,\n keyId = \"\",\n ttlMs = 0,\n): Map<string, MemoryFile> | null {\n const entry = getVersionedCacheEntry(episodeMapByDir, baseDir, currentVersion, keyId, ttlMs);\n return entry ? entry.data : null;\n}\n\n/** Build and cache the episode memory map from the full memory list. */\nexport function setCachedEpisodeMap(\n baseDir: string,\n memories: MemoryFile[],\n version: number,\n cache = true,\n keyId = \"\",\n): Map<string, MemoryFile> {\n const map = new Map<string, MemoryFile>();\n for (const m of memories) {\n if (m.frontmatter.status === \"archived\" || m.frontmatter.status === \"forgotten\") continue;\n if (m.frontmatter.memoryKind !== \"episode\") continue;\n map.set(m.frontmatter.id, m);\n }\n if (cache) episodeMapByDir.set(baseDir, { data: map, version, keyId, loadedAt: Date.now() });\n return map;\n}\n\n/** Get pre-filtered rule memories. Derived from hot cache. */\nexport function getCachedRuleMemories(\n baseDir: string,\n currentVersion: number,\n keyId = \"\",\n ttlMs = 0,\n): { all: MemoryFile[]; byId: Map<string, MemoryFile> } | null {\n const entry = getVersionedCacheEntry(ruleMemoriesByDir, baseDir, currentVersion, keyId, ttlMs);\n return entry ? entry.data : null;\n}\n\n/** Build and cache the rule memories from the full memory list. */\nexport function setCachedRuleMemories(\n baseDir: string,\n memories: MemoryFile[],\n version: number,\n cache = true,\n keyId = \"\",\n): { all: MemoryFile[]; byId: Map<string, MemoryFile> } {\n const byId = new Map<string, MemoryFile>();\n const all: MemoryFile[] = [];\n for (const m of memories) {\n byId.set(m.frontmatter.id, m);\n if (\n m.frontmatter.category === \"rule\" &&\n m.frontmatter.status !== \"archived\" &&\n m.frontmatter.status !== \"forgotten\"\n ) {\n all.push(m);\n }\n }\n const result = { all, byId };\n if (cache) ruleMemoriesByDir.set(baseDir, { data: result, version, keyId, loadedAt: Date.now() });\n return result;\n}\n\n// QMD search result cache — short-lived (60s TTL) to avoid stale results\n// while reducing redundant daemon calls for repeated/similar queries.\ninterface QmdCacheEntry {\n results: unknown[];\n cachedAt: number;\n}\nconst QMD_CACHE_TTL_MS = 60_000;\nconst qmdSearchCache = new Map<string, QmdCacheEntry>();\n\nexport function getCachedQmdSearch(cacheKey: string): unknown[] | null {\n const entry = qmdSearchCache.get(cacheKey);\n if (!entry) return null;\n if (Date.now() - entry.cachedAt > QMD_CACHE_TTL_MS) {\n qmdSearchCache.delete(cacheKey);\n return null;\n }\n return entry.results;\n}\n\nexport function setCachedQmdSearch(cacheKey: string, results: unknown[]): void {\n qmdSearchCache.set(cacheKey, { results, cachedAt: Date.now() });\n // Evict old entries to prevent unbounded growth\n if (qmdSearchCache.size > 200) {\n const now = Date.now();\n for (const [key, entry] of qmdSearchCache) {\n if (now - entry.cachedAt > QMD_CACHE_TTL_MS) qmdSearchCache.delete(key);\n }\n }\n}\n\n/**\n * Mutation scopes (issue #1904). A cache layer declares (via `evictOn`) which\n * of these mutation kinds evict it, so the invalidation chokepoint can clear\n * only the layers a given write actually affects instead of nuking every\n * layer on every write (the permanently-cold-cache regression #1904 fixes).\n */\nexport type MemoryMutationScope =\n | \"memory-create\" // a new memory doc added; no existing doc's recall-visibility changes\n | \"memory-mutate\" // existing doc changed/moved/removed/status-changed (update, supersede,\n // archive, invalidate, frontmatter, cold-tier change, bulk delete)\n | \"entity-write\" // an entity file changed\n | \"secure-key-change\"; // encryption key rotated; everything is now unreadable → evict all\n\n/**\n * Cache-layer registry (issue #1535).\n *\n * EVERY process-level cache that can serve memory-derived content is\n * enumerated here, and the single invalidation chokepoint\n * (`invalidateAllForDir`) iterates this list. Adding a new cache layer to\n * this module (or qmd-recall-cache.ts) REQUIRES registering it here —\n * otherwise mutations will never invalidate it (the exact bug this registry\n * exists to prevent) and the enumerate-all-layers fitness test in\n * tests/cache-invalidation-coherence.test.ts fails.\n */\nexport interface MemoryCacheLayer {\n /** Stable identifier used by tests and diagnostics. */\n readonly name: string;\n /** \"dir\" layers evict only entries for the given baseDir. \"global\" layers\n * are fully cleared on any mutation: their keys embed queries, namespaces,\n * and strategies rather than a storage dir, so a per-dir selective clear\n * is not possible without recording the dir in each entry. Full clear is\n * the simple-and-correct choice — these caches are re-warmable\n * (issue #1535, implementation guide option (b)). */\n readonly scope: \"dir\" | \"global\";\n /** Which mutation scopes evict this layer (issue #1904). A `memory-create`\n * only refreshes the full-memory-list views (hot + derived episode/rule); a\n * `memory-mutate`/`entity-write`/`secure-key-change` evicts every layer whose\n * content it can affect. Adding a layer REQUIRES declaring this. */\n readonly evictOn: Partial<Record<MemoryMutationScope, true>>;\n /** Evict entries for baseDir (\"dir\" scope) or everything (\"global\" scope). */\n readonly invalidateForDir: (baseDir: string) => void;\n /** Evict every entry across all dirs. */\n readonly clearAll: () => void;\n /** True when the layer still holds entries for baseDir (\"dir\" scope) or\n * any entries at all (\"global\" scope). */\n readonly hasEntriesFor: (baseDir: string) => boolean;\n}\n\nexport const ALL_CACHE_LAYERS: readonly MemoryCacheLayer[] = [\n {\n name: \"hot-memories\",\n scope: \"dir\",\n evictOn: { \"memory-create\": true, \"memory-mutate\": true, \"secure-key-change\": true },\n invalidateForDir: (baseDir) => void hotCacheByDir.delete(baseDir),\n clearAll: () => hotCacheByDir.clear(),\n hasEntriesFor: (baseDir) => hotCacheByDir.has(baseDir),\n },\n {\n name: \"archive-memories\",\n scope: \"dir\",\n evictOn: { \"memory-mutate\": true, \"secure-key-change\": true },\n invalidateForDir: (baseDir) => void archiveCacheByDir.delete(baseDir),\n clearAll: () => archiveCacheByDir.clear(),\n hasEntriesFor: (baseDir) => archiveCacheByDir.has(baseDir),\n },\n {\n name: \"entities\",\n scope: \"dir\",\n evictOn: { \"entity-write\": true, \"secure-key-change\": true },\n invalidateForDir: (baseDir) => invalidateCachedEntities(baseDir),\n clearAll: () => entityCacheByDir.clear(),\n hasEntriesFor: (baseDir) => {\n const prefix = entityCacheKeyPrefix(baseDir);\n for (const key of entityCacheByDir.keys()) {\n if (key.startsWith(prefix)) return true;\n }\n return false;\n },\n },\n {\n name: \"derived-episode-map\",\n scope: \"dir\",\n evictOn: { \"memory-create\": true, \"memory-mutate\": true, \"secure-key-change\": true },\n invalidateForDir: (baseDir) => void episodeMapByDir.delete(baseDir),\n clearAll: () => episodeMapByDir.clear(),\n hasEntriesFor: (baseDir) => episodeMapByDir.has(baseDir),\n },\n {\n name: \"derived-rule-memories\",\n scope: \"dir\",\n evictOn: { \"memory-create\": true, \"memory-mutate\": true, \"secure-key-change\": true },\n invalidateForDir: (baseDir) => void ruleMemoriesByDir.delete(baseDir),\n clearAll: () => ruleMemoriesByDir.clear(),\n hasEntriesFor: (baseDir) => ruleMemoriesByDir.has(baseDir),\n },\n {\n name: \"qmd-search\",\n scope: \"global\",\n evictOn: { \"memory-mutate\": true, \"entity-write\": true, \"secure-key-change\": true },\n invalidateForDir: () => qmdSearchCache.clear(),\n clearAll: () => qmdSearchCache.clear(),\n hasEntriesFor: () => qmdSearchCache.size > 0,\n },\n {\n name: \"qmd-recall\",\n scope: \"global\",\n evictOn: { \"memory-mutate\": true, \"entity-write\": true, \"secure-key-change\": true },\n invalidateForDir: () => clearQmdRecallCache(),\n clearAll: () => clearQmdRecallCache(),\n hasEntriesFor: () => qmdRecallCacheSize() > 0,\n },\n];\n\n/**\n * The single invalidation chokepoint (issue #1535, rule 37).\n *\n * Every memory/entity mutation path must route through this function —\n * storage.ts calls it from its internal invalidation funnels\n * (invalidateAllMemoriesCache / invalidateColdMemoriesCache /\n * bumpMemoryStatusVersion / setSecureStoreKey). Nothing may clear an\n * individual layer ad hoc: partial clears are how the stale-recall bug\n * happened (qmdRecallCache was never invalidated on mutations, so recall\n * served pre-edit bundles for the remainder of its fresh/stale TTL window).\n */\nexport function invalidateAllForDir(baseDir: string): void {\n for (const layer of ALL_CACHE_LAYERS) {\n layer.invalidateForDir(baseDir);\n }\n}\n\n/**\n * Scope-aware invalidation chokepoint (issue #1904). Evicts only the layers\n * whose `evictOn` includes `scope`, so the highest-frequency write\n * (`memory-create`, fired continuously by extraction) stops nuking the QMD\n * result caches and the version-keyed entity cache it cannot affect. This is\n * the single scoped entry point — like `invalidateAllForDir`, it iterates the\n * `ALL_CACHE_LAYERS` registry rather than clearing any layer ad hoc, so the\n * single-chokepoint invariant (#1535) holds: a new layer only participates by\n * declaring `evictOn`.\n */\nexport function invalidateForScope(baseDir: string, scope: MemoryMutationScope): void {\n for (const layer of ALL_CACHE_LAYERS) {\n if (layer.evictOn[scope]) layer.invalidateForDir(baseDir);\n }\n}\n\n/**\n * Companion to {@link invalidateForScope} for the single-file write fast path\n * (issue #1902 + #1904): it patches the hot-memories entry in place and\n * re-keys it, so this evicts every OTHER layer the scope would clear but leaves\n * hot-memories alone. A `memory-create` thus evicts only the derived\n * episode/rule views (hot patched, QMD/entities/archive kept warm), which is\n * the whole point of #1904 — a create must not evict the QMD result caches.\n */\nexport function invalidateForScopeExceptHot(baseDir: string, scope: MemoryMutationScope): void {\n for (const layer of ALL_CACHE_LAYERS) {\n if (layer.name === \"hot-memories\") continue;\n if (layer.evictOn[scope]) layer.invalidateForDir(baseDir);\n }\n}\n\n/**\n * Invalidate every cache layer for `baseDir` EXCEPT the hot-memories layer\n * (issue #1902). Single-file write paths use this instead of\n * `invalidateAllForDir` because they patch the hot-memories entry in place\n * (via `updateCacheOnWrite`/`updateCacheOnDelete`) and re-key it to the bumped\n * version — so dropping it here would defeat the whole warm-cache fast path.\n * The derived episode/rule views and the global QMD caches are cheap to\n * rebuild and are not patched, so they are still evicted here. Every other\n * layer remains reachable for the wholesale `invalidateAllForDir` /\n * `clearMemoryCache` chokepoint used by bulk/ambiguous mutations.\n */\nexport function invalidateDerivedAndGlobalForDir(baseDir: string): void {\n // Preserve the layers a single-file write intentionally keeps warm (issue\n // #1902, Codex Medium): hot-memories is patched + re-keyed in place; the\n // entities layer is keyed on memory-status, which plain create/content writes\n // deliberately do NOT bump (so entity retrieval stays warm); and the\n // archive-memories layer is version-keyed on the archive tier, untouched by a\n // hot-tier write. Evict ONLY the derived (episode/rule) and global (QMD) views.\n for (const layer of ALL_CACHE_LAYERS) {\n if (\n layer.name === \"hot-memories\" ||\n layer.name === \"entities\" ||\n layer.name === \"archive-memories\"\n ) {\n continue;\n }\n layer.invalidateForDir(baseDir);\n }\n}\n\nexport function clearMemoryCache(baseDir?: string): void {\n if (baseDir) {\n invalidateAllForDir(baseDir);\n return;\n }\n for (const layer of ALL_CACHE_LAYERS) {\n layer.clearAll();\n }\n}\n\n/**\n * Clear ONLY the two global QMD result caches (qmd-search + qmd-recall), leaving\n * every dir-scoped layer (hot/archive/entities/derived) untouched. Called after\n * a successful QMD maintenance update+embed (#1904, Codex): a newly-persisted\n * fact becomes searchable at that moment, so any cached pre-index recall/search\n * bundle is now stale and must not be served. This lets the create path keep the\n * QMD caches warm during index lag (perf win) while guaranteeing invalidation\n * the moment the fact is actually indexed — no extended stale window.\n */\nexport function clearQmdResultCaches(): void {\n qmdSearchCache.clear();\n clearQmdRecallCache();\n}\n\nexport function getMemoryCacheStats(baseDir: string): {\n hotSize: number;\n archiveSize: number;\n hotVersion: number | null;\n archiveVersion: number | null;\n} {\n const hot = hotCacheByDir.get(baseDir);\n const archive = archiveCacheByDir.get(baseDir);\n return {\n hotSize: hot?.memories.size ?? 0,\n archiveSize: archive?.memories.size ?? 0,\n hotVersion: hot?.version ?? null,\n archiveVersion: archive?.version ?? null,\n };\n}\n"],"mappings":";;;;;;AAmBA,IAAM,gBAAgB,oBAAI,IAAwB;AAClD,IAAM,oBAAoB,oBAAI,IAAwB;AAStD,SAAS,uBAAuB,KAAmB;AACjD,aAAW,CAAC,KAAK,KAAK,KAAK,eAAe;AACxC,QAAI,MAAM,QAAQ,KAAK,MAAM,MAAM,WAAW,MAAM,MAAO,eAAc,OAAO,GAAG;AAAA,EACrF;AACF;AAYA,SAAS,uBACP,OACA,KACA,gBACA,OACA,OACU;AACV,MAAI,mBAAmB,EAAG,QAAO;AACjC,QAAM,QAAQ,MAAM,IAAI,GAAG;AAC3B,MAAI,CAAC,SAAS,MAAM,YAAY,kBAAkB,MAAM,UAAU,MAAO,QAAO;AAChF,MAAI,QAAQ,KAAK,KAAK,IAAI,I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M,QAAQ,KAAK,EAAG,OAAM,iBAAiB,OAAO;AAAA,EAC1D;AACF;AAaO,SAAS,iCAAiC,SAAuB;AAOtE,aAAW,SAAS,kBAAkB;AACpC,QACE,MAAM,SAAS,kBACf,MAAM,SAAS,cACf,MAAM,SAAS,oBACf;AACA;AAAA,IACF;AACA,UAAM,iBAAiB,OAAO;AAAA,EAChC;AACF;AAEO,SAAS,iBAAiB,SAAwB;AACvD,MAAI,SAAS;AACX,wBAAoB,OAAO;AAC3B;AAAA,EACF;AACA,aAAW,SAAS,kBAAkB;AACpC,UAAM,SAAS;AAAA,EACjB;AACF;AAWO,SAAS,uBAA6B;AAC3C,iBAAe,MAAM;AACrB,sBAAoB;AACtB;AAEO,SAAS,oBAAoB,SAKlC;AACA,QAAM,MAAM,cAAc,IAAI,OAAO;AACrC,QAAM,UAAU,kBAAkB,IAAI,OAAO;AAC7C,SAAO;AAAA,IACL,SAAS,KAAK,SAAS,QAAQ;AAAA,IAC/B,aAAa,SAAS,SAAS,QAAQ;AAAA,IACvC,YAAY,KAAK,WAAW;AAAA,IAC5B,gBAAgB,SAAS,WAAW;AAAA,EACtC;AACF;","names":[]}
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-2AD5SXO4.js";
14
14
  import {
15
15
  ExtractionDeadlineError
16
- } from "./chunk-GTRGH4ZT.js";
16
+ } from "./chunk-BB2LH5JM.js";
17
17
  import {
18
18
  resolvePrincipal
19
19
  } from "./chunk-MRV7VSQK.js";
@@ -798,4 +798,4 @@ var SmartBuffer = class {
798
798
  export {
799
799
  SmartBuffer
800
800
  };
801
- //# sourceMappingURL=chunk-DQV3LUQL.js.map
801
+ //# sourceMappingURL=chunk-CUDSA46O.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-5JMAGU26.js";
6
6
  import {
7
7
  runPostConsolidationMaterialize
8
- } from "./chunk-WDUG2CH3.js";
8
+ } from "./chunk-YEQCMA5L.js";
9
9
  import {
10
10
  isSemanticConsolidationLlmOperator
11
11
  } from "./chunk-G7D6GZ5J.js";
@@ -220,4 +220,4 @@ export {
220
220
  buildExtensionsBlockForConsolidation,
221
221
  materializeAfterSemanticConsolidation
222
222
  };
223
- //# sourceMappingURL=chunk-PADG72LJ.js.map
223
+ //# sourceMappingURL=chunk-DXDAQZ2K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  externalWikiSearchOperation
3
- } from "./chunk-QOMUE4FS.js";
3
+ } from "./chunk-I5FLIB2J.js";
4
4
  import {
5
5
  memoryStoreRequestSchema
6
6
  } from "./chunk-CIAI24TQ.js";
@@ -10,7 +10,7 @@ import {
10
10
  DELTA_SUBCOMMANDS,
11
11
  defineOperation,
12
12
  isCodegraphToolName
13
- } from "./chunk-2JL7WPXL.js";
13
+ } from "./chunk-IVXVLDNT.js";
14
14
  import {
15
15
  serializeMutations,
16
16
  withHeldFileLock
@@ -1818,4 +1818,4 @@ export {
1818
1818
  codegraphIngestTracesOperation,
1819
1819
  REGISTERED_OPERATIONS
1820
1820
  };
1821
- //# sourceMappingURL=chunk-EJCN5ATI.js.map
1821
+ //# sourceMappingURL=chunk-DYZR3Z6D.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-UYCIS6V5.js";
8
8
  import {
9
9
  StorageManager
10
- } from "./chunk-JWPG65LH.js";
10
+ } from "./chunk-FHKXVTM5.js";
11
11
  import {
12
12
  parseContinuityImprovementLoops
13
13
  } from "./chunk-LDXUBPMO.js";
@@ -1283,4 +1283,4 @@ export {
1283
1283
  defaultTierMigrationCycleBudget,
1284
1284
  CompoundingEngine
1285
1285
  };
1286
- //# sourceMappingURL=chunk-VN7IIQGS.js.map
1286
+ //# sourceMappingURL=chunk-E4KMY4KR.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-7RJUVTVF.js";
11
11
  import {
12
12
  ContentHashIndex
13
- } from "./chunk-NRFU5MVH.js";
13
+ } from "./chunk-JOEJG4SD.js";
14
14
  import {
15
15
  computeLegacyContentHash,
16
16
  normalizeLegacyContent
@@ -298,4 +298,4 @@ export {
298
298
  buildReconcileManifest,
299
299
  collapseActiveFactDuplicates
300
300
  };
301
- //# sourceMappingURL=chunk-ZQKXRKMR.js.map
301
+ //# sourceMappingURL=chunk-EFKZT6AY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-GFNS3BHV.js";
3
+ } from "./chunk-ZUPKNWRZ.js";
4
4
  import {
5
5
  capabilityAllowsNamespace
6
6
  } from "./chunk-MZWSOLMT.js";
@@ -282,4 +282,4 @@ export {
282
282
  computeServiceCorpusWatermarks,
283
283
  computeServiceCorpusCensus
284
284
  };
285
- //# sourceMappingURL=chunk-DNRTKO2U.js.map
285
+ //# sourceMappingURL=chunk-EJY3HJMT.js.map
@@ -3,7 +3,7 @@ import {
3
3
  getOperation,
4
4
  operationRequiresAuthorizedNamespace,
5
5
  operationUsesPrincipalNamespace
6
- } from "./chunk-2JL7WPXL.js";
6
+ } from "./chunk-IVXVLDNT.js";
7
7
  import {
8
8
  assertOperationAuthorizationAllowed
9
9
  } from "./chunk-MZWSOLMT.js";
@@ -60,4 +60,4 @@ export {
60
60
  authorizationProbeNamespaces,
61
61
  authorizationProbeRequiresPrincipalNamespace
62
62
  };
63
- //# sourceMappingURL=chunk-4EDAHS6D.js.map
63
+ //# sourceMappingURL=chunk-ERPBRXVZ.js.map