@remnic/core 10.0.155 → 10.0.156

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 (195) hide show
  1. package/dist/abstraction-nodes.js +4 -4
  2. package/dist/access-admin-ops-surface.js +52 -52
  3. package/dist/access-cli.js +52 -52
  4. package/dist/access-extraction-force-flush-preempt.js +52 -52
  5. package/dist/access-extraction-force-flush.js +52 -52
  6. package/dist/access-http-briefing.js +52 -52
  7. package/dist/access-http-query.js +52 -52
  8. package/dist/access-http.js +52 -52
  9. package/dist/access-identity-continuity-surface.js +52 -52
  10. package/dist/access-lcm-surface.js +52 -52
  11. package/dist/access-mcp.js +52 -52
  12. package/dist/access-observe-write-surface.js +52 -52
  13. package/dist/access-operations-batch.js +52 -52
  14. package/dist/access-operations.js +52 -52
  15. package/dist/access-recall-concurrency.js +52 -52
  16. package/dist/access-recall-response.js +52 -52
  17. package/dist/access-recall-surface.js +52 -52
  18. package/dist/access-service.js +52 -52
  19. package/dist/active-recall.js +9 -9
  20. package/dist/briefing.js +10 -10
  21. package/dist/buffer.js +5 -5
  22. package/dist/{capsule-merge-PCSDJOAO.js → capsule-merge-VHBRF65A.js} +5 -5
  23. package/dist/causal-consolidation.js +11 -11
  24. package/dist/{chunk-G2NTB4TM.js → chunk-2COHMHLQ.js} +2 -2
  25. package/dist/{chunk-TZ7KXZ47.js → chunk-2G5XUS4S.js} +2 -2
  26. package/dist/{chunk-ZRTFGKPG.js → chunk-3BNWEHHC.js} +2 -2
  27. package/dist/{chunk-FYJYQ65N.js → chunk-3DADRUGW.js} +3 -3
  28. package/dist/{chunk-X4EF7IG3.js → chunk-4AKPTHOO.js} +2 -2
  29. package/dist/{chunk-SDDHY437.js → chunk-4DCKLDYM.js} +2 -2
  30. package/dist/{chunk-G4SAFDNR.js → chunk-4MZCWJVS.js} +2 -2
  31. package/dist/{chunk-IQBBNFSP.js → chunk-5O26UA6Z.js} +5 -5
  32. package/dist/{chunk-ZH36OFFA.js → chunk-6PE4O7UE.js} +2 -2
  33. package/dist/{chunk-56BVK6DU.js → chunk-7FUE2LSW.js} +2 -2
  34. package/dist/{chunk-AW56K4SI.js → chunk-BL7WULM5.js} +2 -2
  35. package/dist/{chunk-NNZR5JZJ.js → chunk-D7GZM7AD.js} +2 -2
  36. package/dist/{chunk-ZCJP4UA6.js → chunk-DE6KQUAP.js} +2 -2
  37. package/dist/{chunk-W5T7QBYZ.js → chunk-DHPGGMGL.js} +2 -2
  38. package/dist/{chunk-GYJI34G6.js → chunk-E2R5BTBB.js} +2 -2
  39. package/dist/{chunk-CYPS6NPQ.js → chunk-E4PME33M.js} +4 -4
  40. package/dist/{chunk-4QEDFEBY.js → chunk-E5QI6C6C.js} +3 -3
  41. package/dist/{chunk-FPII4O7C.js → chunk-EJYUAN5F.js} +2 -2
  42. package/dist/{chunk-SPQXVDUP.js → chunk-EKXMWUXE.js} +8 -8
  43. package/dist/{chunk-RAGRW65B.js → chunk-EPTLYMQY.js} +3 -3
  44. package/dist/{chunk-W7KDTZWR.js → chunk-G5D5JKJJ.js} +2 -2
  45. package/dist/{chunk-3LO6OFRM.js → chunk-GCOQDPOE.js} +2 -2
  46. package/dist/{chunk-XUYUYYK2.js → chunk-GCVMCCX7.js} +3 -3
  47. package/dist/{chunk-SFRAXHQO.js → chunk-H6X7GNDW.js} +2 -2
  48. package/dist/{chunk-FJEYZSJD.js → chunk-H7USCTPQ.js} +3 -3
  49. package/dist/{chunk-VHSCKVWB.js → chunk-IMJKWVT7.js} +3 -3
  50. package/dist/{chunk-MV3D5IDW.js → chunk-IML7HMMK.js} +5 -5
  51. package/dist/{chunk-VPTPLNTS.js → chunk-IUAWTN2B.js} +2 -2
  52. package/dist/{chunk-QMDYZIXK.js → chunk-IYH6NQDI.js} +2 -2
  53. package/dist/{chunk-UUSL22HE.js → chunk-KM4QO4LN.js} +2 -2
  54. package/dist/{chunk-73MEZ6LB.js → chunk-L56BEEKZ.js} +2 -2
  55. package/dist/{chunk-447ERYQ5.js → chunk-NFLZMAIV.js} +7 -7
  56. package/dist/{chunk-TVWLYSX4.js → chunk-NTS2RCQK.js} +2 -2
  57. package/dist/{chunk-GCQIXPWZ.js → chunk-OQGGJBXX.js} +4 -4
  58. package/dist/{chunk-FXZEKC32.js → chunk-PORCJ6NC.js} +2 -2
  59. package/dist/{chunk-ONMYWZLY.js → chunk-QASTQVGK.js} +2 -2
  60. package/dist/{chunk-X6VXQALC.js → chunk-QWDXHBDY.js} +46 -46
  61. package/dist/{chunk-AXR472RS.js → chunk-R3YMWUF3.js} +2 -2
  62. package/dist/{chunk-4U5VHHVF.js → chunk-R5S57GRK.js} +10 -42
  63. package/dist/chunk-R5S57GRK.js.map +1 -0
  64. package/dist/{chunk-OOLREGPZ.js → chunk-S7U6PKKV.js} +2 -2
  65. package/dist/{chunk-H36HLLSU.js → chunk-SAMHDJSQ.js} +3 -3
  66. package/dist/{chunk-P7TJUCNC.js → chunk-SGD7PCHI.js} +2 -2
  67. package/dist/{chunk-5ZZZDDSF.js → chunk-SX6O25WK.js} +2 -2
  68. package/dist/{chunk-DUAGLBFC.js → chunk-TE2SBFZD.js} +2 -2
  69. package/dist/{chunk-IACG6B5R.js → chunk-TE46SBDJ.js} +3 -3
  70. package/dist/{chunk-2EFXVRYX.js → chunk-TS6UKENE.js} +2 -2
  71. package/dist/{chunk-E2CJNFAZ.js → chunk-U6CKHWUQ.js} +7 -7
  72. package/dist/{chunk-4KHGOVRI.js → chunk-UI77UYQP.js} +2 -2
  73. package/dist/{chunk-PXCQKVIF.js → chunk-V5NHW44X.js} +2 -2
  74. package/dist/{chunk-KNOWIDYI.js → chunk-V7IH24UG.js} +2 -2
  75. package/dist/{chunk-DDUWI2XM.js → chunk-XEBNSY7N.js} +2 -2
  76. package/dist/{chunk-JE2ZI4SS.js → chunk-XV3I7SLU.js} +3 -3
  77. package/dist/{chunk-ZFJOPBQD.js → chunk-YZYAYUJQ.js} +2 -2
  78. package/dist/cli.js +52 -52
  79. package/dist/coding/export-okf-codegraph.js +9 -9
  80. package/dist/compounding/engine.js +11 -11
  81. package/dist/config.js +9 -9
  82. package/dist/connectors/codex-materialize-runner.js +10 -10
  83. package/dist/connectors/index.js +10 -10
  84. package/dist/consolidation-provenance-check.js +5 -5
  85. package/dist/consolidation-undo.js +4 -4
  86. package/dist/contradiction/index.js +3 -3
  87. package/dist/convergence-refresh.js +12 -12
  88. package/dist/corpus-watermark.js +12 -12
  89. package/dist/cue-anchors.js +5 -5
  90. package/dist/{entity-canonical-id-migration-ZOWR44RK.js → entity-canonical-id-migration-74IDJFPB.js} +4 -4
  91. package/dist/entity-retrieval.js +10 -10
  92. package/dist/explicit-capture.js +52 -52
  93. package/dist/extraction.js +14 -14
  94. package/dist/harmonic-construction.js +6 -6
  95. package/dist/harmonic-graph-version.js +3 -3
  96. package/dist/harmonic-retrieval.js +13 -13
  97. package/dist/index.js +52 -52
  98. package/dist/location/index.js +11 -11
  99. package/dist/maintenance/memory-governance.js +10 -10
  100. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -10
  101. package/dist/maintenance/rebuild-memory-projection-runner.js +12 -12
  102. package/dist/maintenance/rebuild-memory-projection.js +11 -11
  103. package/dist/memory-browse.js +5 -5
  104. package/dist/memory-cache.d.ts +0 -4
  105. package/dist/memory-cache.d.ts.map +1 -1
  106. package/dist/memory-cache.js +1 -7
  107. package/dist/memory-corpus-version.js +2 -2
  108. package/dist/namespaces/migrate.js +11 -11
  109. package/dist/namespaces/search.js +4 -4
  110. package/dist/namespaces/storage.js +10 -10
  111. package/dist/operator-doctor-corpus.js +13 -13
  112. package/dist/operator-toolkit.js +17 -17
  113. package/dist/orchestration/backlog-scheduler.js +53 -53
  114. package/dist/orchestration/buffer-drain-runner.js +53 -53
  115. package/dist/orchestration/maintenance.js +18 -18
  116. package/dist/orchestrator.js +52 -52
  117. package/dist/page-versioning.js +4 -4
  118. package/dist/qmd.js +2 -2
  119. package/dist/recall-navigation.js +52 -52
  120. package/dist/recall-state-view-admission.js +5 -5
  121. package/dist/recall-why-service.js +5 -5
  122. package/dist/{resolution-TCO63RRC.js → resolution-CV6QEYEZ.js} +4 -4
  123. package/dist/resume-bundles.js +9 -9
  124. package/dist/search/factory.js +3 -3
  125. package/dist/search/index.js +3 -3
  126. package/dist/semantic-consolidation.js +11 -11
  127. package/dist/semantic-rule-promotion.js +10 -10
  128. package/dist/semantic-rule-verifier.js +10 -10
  129. package/dist/source-agent-qualifier.js +13 -13
  130. package/dist/standup/build.js +10 -10
  131. package/dist/storage.js +9 -9
  132. package/dist/transfer/capsule-import.js +5 -5
  133. package/dist/transfer/export-okf.js +10 -10
  134. package/dist/verified-recall.js +10 -10
  135. package/dist/who-knows-cli.js +11 -11
  136. package/dist/who-knows.js +10 -10
  137. package/package.json +2 -2
  138. package/src/memory-cache.test.ts +46 -19
  139. package/src/memory-cache.ts +12 -45
  140. package/dist/chunk-4U5VHHVF.js.map +0 -1
  141. /package/dist/{capsule-merge-PCSDJOAO.js.map → capsule-merge-VHBRF65A.js.map} +0 -0
  142. /package/dist/{chunk-G2NTB4TM.js.map → chunk-2COHMHLQ.js.map} +0 -0
  143. /package/dist/{chunk-TZ7KXZ47.js.map → chunk-2G5XUS4S.js.map} +0 -0
  144. /package/dist/{chunk-ZRTFGKPG.js.map → chunk-3BNWEHHC.js.map} +0 -0
  145. /package/dist/{chunk-FYJYQ65N.js.map → chunk-3DADRUGW.js.map} +0 -0
  146. /package/dist/{chunk-X4EF7IG3.js.map → chunk-4AKPTHOO.js.map} +0 -0
  147. /package/dist/{chunk-SDDHY437.js.map → chunk-4DCKLDYM.js.map} +0 -0
  148. /package/dist/{chunk-G4SAFDNR.js.map → chunk-4MZCWJVS.js.map} +0 -0
  149. /package/dist/{chunk-IQBBNFSP.js.map → chunk-5O26UA6Z.js.map} +0 -0
  150. /package/dist/{chunk-ZH36OFFA.js.map → chunk-6PE4O7UE.js.map} +0 -0
  151. /package/dist/{chunk-56BVK6DU.js.map → chunk-7FUE2LSW.js.map} +0 -0
  152. /package/dist/{chunk-AW56K4SI.js.map → chunk-BL7WULM5.js.map} +0 -0
  153. /package/dist/{chunk-NNZR5JZJ.js.map → chunk-D7GZM7AD.js.map} +0 -0
  154. /package/dist/{chunk-ZCJP4UA6.js.map → chunk-DE6KQUAP.js.map} +0 -0
  155. /package/dist/{chunk-W5T7QBYZ.js.map → chunk-DHPGGMGL.js.map} +0 -0
  156. /package/dist/{chunk-GYJI34G6.js.map → chunk-E2R5BTBB.js.map} +0 -0
  157. /package/dist/{chunk-CYPS6NPQ.js.map → chunk-E4PME33M.js.map} +0 -0
  158. /package/dist/{chunk-4QEDFEBY.js.map → chunk-E5QI6C6C.js.map} +0 -0
  159. /package/dist/{chunk-FPII4O7C.js.map → chunk-EJYUAN5F.js.map} +0 -0
  160. /package/dist/{chunk-SPQXVDUP.js.map → chunk-EKXMWUXE.js.map} +0 -0
  161. /package/dist/{chunk-RAGRW65B.js.map → chunk-EPTLYMQY.js.map} +0 -0
  162. /package/dist/{chunk-W7KDTZWR.js.map → chunk-G5D5JKJJ.js.map} +0 -0
  163. /package/dist/{chunk-3LO6OFRM.js.map → chunk-GCOQDPOE.js.map} +0 -0
  164. /package/dist/{chunk-XUYUYYK2.js.map → chunk-GCVMCCX7.js.map} +0 -0
  165. /package/dist/{chunk-SFRAXHQO.js.map → chunk-H6X7GNDW.js.map} +0 -0
  166. /package/dist/{chunk-FJEYZSJD.js.map → chunk-H7USCTPQ.js.map} +0 -0
  167. /package/dist/{chunk-VHSCKVWB.js.map → chunk-IMJKWVT7.js.map} +0 -0
  168. /package/dist/{chunk-MV3D5IDW.js.map → chunk-IML7HMMK.js.map} +0 -0
  169. /package/dist/{chunk-VPTPLNTS.js.map → chunk-IUAWTN2B.js.map} +0 -0
  170. /package/dist/{chunk-QMDYZIXK.js.map → chunk-IYH6NQDI.js.map} +0 -0
  171. /package/dist/{chunk-UUSL22HE.js.map → chunk-KM4QO4LN.js.map} +0 -0
  172. /package/dist/{chunk-73MEZ6LB.js.map → chunk-L56BEEKZ.js.map} +0 -0
  173. /package/dist/{chunk-447ERYQ5.js.map → chunk-NFLZMAIV.js.map} +0 -0
  174. /package/dist/{chunk-TVWLYSX4.js.map → chunk-NTS2RCQK.js.map} +0 -0
  175. /package/dist/{chunk-GCQIXPWZ.js.map → chunk-OQGGJBXX.js.map} +0 -0
  176. /package/dist/{chunk-FXZEKC32.js.map → chunk-PORCJ6NC.js.map} +0 -0
  177. /package/dist/{chunk-ONMYWZLY.js.map → chunk-QASTQVGK.js.map} +0 -0
  178. /package/dist/{chunk-X6VXQALC.js.map → chunk-QWDXHBDY.js.map} +0 -0
  179. /package/dist/{chunk-AXR472RS.js.map → chunk-R3YMWUF3.js.map} +0 -0
  180. /package/dist/{chunk-OOLREGPZ.js.map → chunk-S7U6PKKV.js.map} +0 -0
  181. /package/dist/{chunk-H36HLLSU.js.map → chunk-SAMHDJSQ.js.map} +0 -0
  182. /package/dist/{chunk-P7TJUCNC.js.map → chunk-SGD7PCHI.js.map} +0 -0
  183. /package/dist/{chunk-5ZZZDDSF.js.map → chunk-SX6O25WK.js.map} +0 -0
  184. /package/dist/{chunk-DUAGLBFC.js.map → chunk-TE2SBFZD.js.map} +0 -0
  185. /package/dist/{chunk-IACG6B5R.js.map → chunk-TE46SBDJ.js.map} +0 -0
  186. /package/dist/{chunk-2EFXVRYX.js.map → chunk-TS6UKENE.js.map} +0 -0
  187. /package/dist/{chunk-E2CJNFAZ.js.map → chunk-U6CKHWUQ.js.map} +0 -0
  188. /package/dist/{chunk-4KHGOVRI.js.map → chunk-UI77UYQP.js.map} +0 -0
  189. /package/dist/{chunk-PXCQKVIF.js.map → chunk-V5NHW44X.js.map} +0 -0
  190. /package/dist/{chunk-KNOWIDYI.js.map → chunk-V7IH24UG.js.map} +0 -0
  191. /package/dist/{chunk-DDUWI2XM.js.map → chunk-XEBNSY7N.js.map} +0 -0
  192. /package/dist/{chunk-JE2ZI4SS.js.map → chunk-XV3I7SLU.js.map} +0 -0
  193. /package/dist/{chunk-ZFJOPBQD.js.map → chunk-YZYAYUJQ.js.map} +0 -0
  194. /package/dist/{entity-canonical-id-migration-ZOWR44RK.js.map → entity-canonical-id-migration-74IDJFPB.js.map} +0 -0
  195. /package/dist/{resolution-TCO63RRC.js.map → resolution-CV6QEYEZ.js.map} +0 -0
@@ -39,7 +39,7 @@ import {
39
39
  import {
40
40
  exportOkfBundle,
41
41
  parseIncludeStatus
42
- } from "./chunk-P7TJUCNC.js";
42
+ } from "./chunk-SGD7PCHI.js";
43
43
  import {
44
44
  exportSqlite
45
45
  } from "./chunk-BV2TIZ4F.js";
@@ -63,7 +63,7 @@ import {
63
63
  } from "./chunk-765K3SAT.js";
64
64
  import {
65
65
  importCapsule
66
- } from "./chunk-GCQIXPWZ.js";
66
+ } from "./chunk-OQGGJBXX.js";
67
67
  import {
68
68
  isSharedContextWriteInputError,
69
69
  parseSharedWriteOutputControls
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  buildStandup,
73
73
  parseStandupDate
74
- } from "./chunk-TZ7KXZ47.js";
74
+ } from "./chunk-2G5XUS4S.js";
75
75
  import {
76
76
  SupportPassportAccessSurface,
77
77
  createSupportPassportModelAdapter,
@@ -86,7 +86,7 @@ import {
86
86
  import {
87
87
  ActivityStore,
88
88
  MaintenanceScheduler
89
- } from "./chunk-E2CJNFAZ.js";
89
+ } from "./chunk-U6CKHWUQ.js";
90
90
  import {
91
91
  runPeerProfileReasoner
92
92
  } from "./chunk-I74SUMNI.js";
@@ -113,7 +113,7 @@ import {
113
113
  } from "./chunk-EDR6CVWZ.js";
114
114
  import {
115
115
  rebuildMemoryLifecycleLedger
116
- } from "./chunk-KNOWIDYI.js";
116
+ } from "./chunk-V7IH24UG.js";
117
117
  import {
118
118
  rebuildObservations
119
119
  } from "./chunk-WHCD4Z3D.js";
@@ -124,7 +124,7 @@ import {
124
124
  runLocationDay,
125
125
  runLocationStatus,
126
126
  runLocationSync
127
- } from "./chunk-JE2ZI4SS.js";
127
+ } from "./chunk-XV3I7SLU.js";
128
128
  import {
129
129
  archiveObservations
130
130
  } from "./chunk-7IGMKQWK.js";
@@ -135,7 +135,7 @@ import {
135
135
  executeResolution,
136
136
  isValidResolutionVerb,
137
137
  runPreferenceDriftScan
138
- } from "./chunk-X4EF7IG3.js";
138
+ } from "./chunk-4AKPTHOO.js";
139
139
  import {
140
140
  chunkTranscriptEntries
141
141
  } from "./chunk-TECVW3JP.js";
@@ -145,7 +145,7 @@ import {
145
145
  import {
146
146
  CompoundingEngine,
147
147
  defaultTierMigrationCycleBudget
148
- } from "./chunk-RAGRW65B.js";
148
+ } from "./chunk-EPTLYMQY.js";
149
149
  import {
150
150
  SharedContextManager,
151
151
  UNATTRIBUTED_ACCESS_WRITE_ORIGIN
@@ -192,7 +192,7 @@ import {
192
192
  import {
193
193
  compareVerifiedEpisodeResults,
194
194
  searchVerifiedEpisodes
195
- } from "./chunk-H36HLLSU.js";
195
+ } from "./chunk-SAMHDJSQ.js";
196
196
  import {
197
197
  WHO_KNOWS_DEFAULT_LIMIT,
198
198
  WHO_KNOWS_MCP_TOOLS,
@@ -200,7 +200,7 @@ import {
200
200
  handleWhoKnowsHttpQuery,
201
201
  loadWhoKnowsEntities,
202
202
  validateWhoKnowsInput
203
- } from "./chunk-56BVK6DU.js";
203
+ } from "./chunk-7FUE2LSW.js";
204
204
  import {
205
205
  WriteQuarantineStore
206
206
  } from "./chunk-BANSBRNX.js";
@@ -280,11 +280,11 @@ import {
280
280
  } from "./chunk-LJLGH2DE.js";
281
281
  import {
282
282
  promoteSemanticRuleFromMemory
283
- } from "./chunk-W7KDTZWR.js";
283
+ } from "./chunk-G5D5JKJJ.js";
284
284
  import {
285
285
  compareVerifiedSemanticRuleResults,
286
286
  searchVerifiedSemanticRules
287
- } from "./chunk-XUYUYYK2.js";
287
+ } from "./chunk-GCVMCCX7.js";
288
288
  import {
289
289
  SessionObserverState
290
290
  } from "./chunk-ODZKV2F7.js";
@@ -355,11 +355,11 @@ import {
355
355
  } from "./chunk-VT75USBD.js";
356
356
  import {
357
357
  runRecallWhy
358
- } from "./chunk-G4SAFDNR.js";
358
+ } from "./chunk-4MZCWJVS.js";
359
359
  import {
360
360
  indexStateViewAnnotatedResults,
361
361
  resolveRecallStateViewActive
362
- } from "./chunk-W5T7QBYZ.js";
362
+ } from "./chunk-DHPGGMGL.js";
363
363
  import {
364
364
  applyRecallStateViews
365
365
  } from "./chunk-DBB5JPSL.js";
@@ -464,12 +464,12 @@ import {
464
464
  runOperatorRepair,
465
465
  runOperatorSetup,
466
466
  summarizeNamespaceMaintenanceHealth
467
- } from "./chunk-SPQXVDUP.js";
467
+ } from "./chunk-EKXMWUXE.js";
468
468
  import {
469
469
  NamespaceCatalog,
470
470
  isNamespaceKind,
471
471
  planNamespaceMaintenance
472
- } from "./chunk-DUAGLBFC.js";
472
+ } from "./chunk-TE2SBFZD.js";
473
473
  import {
474
474
  analyzeSessionIntegrity,
475
475
  applySessionRepair,
@@ -506,7 +506,7 @@ import {
506
506
  } from "./chunk-EIB4FJVR.js";
507
507
  import {
508
508
  runMemoryBrowse
509
- } from "./chunk-OOLREGPZ.js";
509
+ } from "./chunk-S7U6PKKV.js";
510
510
  import {
511
511
  filterRecallCandidates,
512
512
  isGenericRecallExcludedPath,
@@ -514,7 +514,7 @@ import {
514
514
  isTopLevelArchivePath,
515
515
  journalPath,
516
516
  writeJournalFile
517
- } from "./chunk-4KHGOVRI.js";
517
+ } from "./chunk-UI77UYQP.js";
518
518
  import {
519
519
  REMNIC_CHATGPT_MEMORY_INSPECTOR_MIME_TYPE,
520
520
  REMNIC_CHATGPT_MEMORY_INSPECTOR_TOOL,
@@ -561,11 +561,11 @@ import {
561
561
  harmonicEntitySegment,
562
562
  normalizedHarmonicEntityIdentity,
563
563
  persistHarmonicRecords
564
- } from "./chunk-FJEYZSJD.js";
564
+ } from "./chunk-H7USCTPQ.js";
565
565
  import {
566
566
  readProjectedHarmonicGraph,
567
567
  searchHarmonicRetrieval
568
- } from "./chunk-MV3D5IDW.js";
568
+ } from "./chunk-IML7HMMK.js";
569
569
  import {
570
570
  classifyMemoryKind
571
571
  } from "./chunk-YAZNBMNF.js";
@@ -592,13 +592,13 @@ import {
592
592
  } from "./chunk-LEO4MQ3S.js";
593
593
  import {
594
594
  ExtractionEngine
595
- } from "./chunk-PXCQKVIF.js";
595
+ } from "./chunk-V5NHW44X.js";
596
596
  import {
597
597
  wrapWorkLayerContext
598
598
  } from "./chunk-EI6V5UXY.js";
599
599
  import {
600
600
  CONNECTOR_LABEL_MAX_LENGTH
601
- } from "./chunk-ZCJP4UA6.js";
601
+ } from "./chunk-DE6KQUAP.js";
602
602
  import {
603
603
  isValidConnectorId
604
604
  } from "./chunk-YAVIBVCU.js";
@@ -657,7 +657,7 @@ import {
657
657
  buildEntityRecallSection,
658
658
  entityRecentTranscriptLookbackHours,
659
659
  readRecentEntityTranscriptEntries
660
- } from "./chunk-SDDHY437.js";
660
+ } from "./chunk-4DCKLDYM.js";
661
661
  import {
662
662
  boundRecallContextComposition,
663
663
  composeMissingMemoryContext,
@@ -707,15 +707,15 @@ import {
707
707
  import {
708
708
  CorpusWatermarkCache,
709
709
  computeServiceCorpusCensus
710
- } from "./chunk-FXZEKC32.js";
710
+ } from "./chunk-PORCJ6NC.js";
711
711
  import {
712
712
  listNamespaces,
713
713
  runNamespaceMigration,
714
714
  verifyNamespaces
715
- } from "./chunk-VHSCKVWB.js";
715
+ } from "./chunk-IMJKWVT7.js";
716
716
  import {
717
717
  NamespaceStorageRouter
718
- } from "./chunk-SFRAXHQO.js";
718
+ } from "./chunk-H6X7GNDW.js";
719
719
  import {
720
720
  CrossNamespaceBudget,
721
721
  toBudgetWarning
@@ -723,7 +723,7 @@ import {
723
723
  import {
724
724
  getCueAnchorStoreStatus,
725
725
  pruneOrphanCueAnchors
726
- } from "./chunk-FYJYQ65N.js";
726
+ } from "./chunk-3DADRUGW.js";
727
727
  import {
728
728
  GraphDashboardServer
729
729
  } from "./chunk-YNDLCWXS.js";
@@ -732,12 +732,12 @@ import {
732
732
  } from "./chunk-7G5NTS7F.js";
733
733
  import {
734
734
  refreshConvergedNamespaces
735
- } from "./chunk-VPTPLNTS.js";
735
+ } from "./chunk-IUAWTN2B.js";
736
736
  import {
737
737
  rebuildMemoryProjection,
738
738
  repairMemoryProjection,
739
739
  verifyMemoryProjection
740
- } from "./chunk-IACG6B5R.js";
740
+ } from "./chunk-TE46SBDJ.js";
741
741
  import {
742
742
  buildProposedActions,
743
743
  buildQualityScore,
@@ -746,7 +746,7 @@ import {
746
746
  readMemoryGovernanceRunArtifact,
747
747
  restoreMemoryGovernanceRun,
748
748
  runMemoryGovernance
749
- } from "./chunk-CYPS6NPQ.js";
749
+ } from "./chunk-E4PME33M.js";
750
750
  import {
751
751
  collectNativeKnowledgeChunks,
752
752
  formatNativeKnowledgeSection,
@@ -779,7 +779,7 @@ import {
779
779
  materializeAfterSemanticConsolidation,
780
780
  parseConsolidationResponse,
781
781
  parseOperatorAwareConsolidationResponse
782
- } from "./chunk-GYJI34G6.js";
782
+ } from "./chunk-E2R5BTBB.js";
783
783
  import {
784
784
  resolveNamespaceChildRoot
785
785
  } from "./chunk-3UXOZBHV.js";
@@ -795,13 +795,13 @@ import {
795
795
  } from "./chunk-DEUNUKTD.js";
796
796
  import {
797
797
  SmartBuffer
798
- } from "./chunk-3LO6OFRM.js";
798
+ } from "./chunk-GCOQDPOE.js";
799
799
  import {
800
800
  ExtractionDeadlineError,
801
801
  ExtractionRunCoordinator,
802
802
  ProviderCircuitBreaker,
803
803
  classifyExtractionOrigin
804
- } from "./chunk-ZH36OFFA.js";
804
+ } from "./chunk-6PE4O7UE.js";
805
805
  import {
806
806
  ARTIFACT_STATUS_CACHE_TTL_MS,
807
807
  BulkImportBatchPartialFailureError,
@@ -841,7 +841,7 @@ import {
841
841
  throwIfRecallAborted,
842
842
  tokenizeRecallQuery,
843
843
  utcDateKeysForLocalDay
844
- } from "./chunk-ONMYWZLY.js";
844
+ } from "./chunk-QASTQVGK.js";
845
845
  import {
846
846
  inferIntentFromText,
847
847
  intentCompatibilityScore,
@@ -875,7 +875,7 @@ import {
875
875
  parseBriefingFocus,
876
876
  parseBriefingWindow,
877
877
  validateBriefingFormat
878
- } from "./chunk-2EFXVRYX.js";
878
+ } from "./chunk-TS6UKENE.js";
879
879
  import {
880
880
  BriefingTimeoutError,
881
881
  withBriefingDeadline
@@ -1053,7 +1053,7 @@ import {
1053
1053
  reconstructFusionInputs,
1054
1054
  selfDeps,
1055
1055
  serializeFusionDay
1056
- } from "./chunk-447ERYQ5.js";
1056
+ } from "./chunk-NFLZMAIV.js";
1057
1057
  import {
1058
1058
  buildRetiredFactTombstoneInputs
1059
1059
  } from "./chunk-QGVCFVX6.js";
@@ -1072,12 +1072,12 @@ import {
1072
1072
  embeddingBacklogExceeds,
1073
1073
  isSearchHealthDegraded,
1074
1074
  namespaceCollectionName
1075
- } from "./chunk-G2NTB4TM.js";
1075
+ } from "./chunk-2COHMHLQ.js";
1076
1076
  import {
1077
1077
  createConversationIndexRuntime,
1078
1078
  createSearchBackend,
1079
1079
  isSearchBackendEnabled
1080
- } from "./chunk-73MEZ6LB.js";
1080
+ } from "./chunk-L56BEEKZ.js";
1081
1081
  import {
1082
1082
  NoopSearchBackend
1083
1083
  } from "./chunk-CYEPCZN5.js";
@@ -1124,7 +1124,7 @@ import {
1124
1124
  recordStrandedCommit,
1125
1125
  removeVersion,
1126
1126
  revertToVersion
1127
- } from "./chunk-4QEDFEBY.js";
1127
+ } from "./chunk-E5QI6C6C.js";
1128
1128
  import {
1129
1129
  HistoricalEntityCanonicalIdCache,
1130
1130
  canonicalizeEntityRefFrontmatter,
@@ -1135,7 +1135,7 @@ import {
1135
1135
  requestEntityCanonicalIdReconcile,
1136
1136
  requestEntityCanonicalIdReconcileSync,
1137
1137
  withRawEntityPageMutation
1138
- } from "./chunk-UUSL22HE.js";
1138
+ } from "./chunk-KM4QO4LN.js";
1139
1139
  import {
1140
1140
  applyTemporalSupersession,
1141
1141
  applyTemporalSupersessionPrimaryMutation,
@@ -1567,14 +1567,14 @@ import {
1567
1567
  } from "./chunk-R2MBW2S4.js";
1568
1568
  import {
1569
1569
  getAbstractionNodeStoreStatus
1570
- } from "./chunk-AXR472RS.js";
1570
+ } from "./chunk-R3YMWUF3.js";
1571
1571
  import {
1572
1572
  MEMORY_CORPUS_VERSION_SENTINEL,
1573
1573
  bumpMemoryCorpusVersionForDir
1574
- } from "./chunk-TVWLYSX4.js";
1574
+ } from "./chunk-NTS2RCQK.js";
1575
1575
  import {
1576
1576
  runInQmdSearchCacheRecallScope
1577
- } from "./chunk-4U5VHHVF.js";
1577
+ } from "./chunk-R5S57GRK.js";
1578
1578
  import {
1579
1579
  buildQmdRecallCacheKey,
1580
1580
  getCachedQmdRecall,
@@ -51129,7 +51129,7 @@ function registerCli(api, orchestrator, registerOptions = {}) {
51129
51129
  );
51130
51130
  }
51131
51131
  }
51132
- const { mergeCapsule } = await import("./capsule-merge-PCSDJOAO.js");
51132
+ const { mergeCapsule } = await import("./capsule-merge-VHBRF65A.js");
51133
51133
  const result = await mergeCapsule({
51134
51134
  sourceArchive,
51135
51135
  targetRoot: memoryDir,
@@ -53775,7 +53775,7 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
53775
53775
  console.error("--verb is required. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context");
53776
53776
  process.exit(1);
53777
53777
  }
53778
- const { isValidResolutionVerb: isValidResolutionVerb2, executeResolution: executeResolution2 } = await import("./resolution-TCO63RRC.js");
53778
+ const { isValidResolutionVerb: isValidResolutionVerb2, executeResolution: executeResolution2 } = await import("./resolution-CV6QEYEZ.js");
53779
53779
  if (!isValidResolutionVerb2(verb)) {
53780
53780
  console.error(`Invalid verb: ${verb}. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context`);
53781
53781
  process.exit(1);
@@ -67531,4 +67531,4 @@ export {
67531
67531
  EngramAccessService,
67532
67532
  AccessAdminOpsSurface
67533
67533
  };
67534
- //# sourceMappingURL=chunk-X6VXQALC.js.map
67534
+ //# sourceMappingURL=chunk-QWDXHBDY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bumpHarmonicGraphVersion
3
- } from "./chunk-FPII4O7C.js";
3
+ } from "./chunk-EJYUAN5F.js";
4
4
  import {
5
5
  compareDeterministicStrings,
6
6
  mergeSortedUniqueStrings
@@ -264,4 +264,4 @@ export {
264
264
  upsertAbstractionNode,
265
265
  getAbstractionNodeStoreStatus
266
266
  };
267
- //# sourceMappingURL=chunk-AXR472RS.js.map
267
+ //# sourceMappingURL=chunk-R3YMWUF3.js.map
@@ -4,6 +4,7 @@ import {
4
4
  } from "./chunk-42JKGUFJ.js";
5
5
 
6
6
  // src/memory-cache.ts
7
+ import { AsyncLocalStorage } from "async_hooks";
7
8
  var hotCacheByDir = /* @__PURE__ */ new Map();
8
9
  var archiveCacheByDir = /* @__PURE__ */ new Map();
9
10
  function sweepExpiredHotEntries(now) {
@@ -113,54 +114,24 @@ function setCachedRuleMemories(baseDir, memories, version, cache = true, keyId =
113
114
  }
114
115
  var QMD_CACHE_TTL_MS = 6e4;
115
116
  var qmdSearchCache = /* @__PURE__ */ new Map();
116
- var qmdSearchCacheRecallScopeDepth = 0;
117
- var qmdSearchCacheRecallTtlMs;
118
- function beginQmdSearchCacheRecallScope(ttlMs) {
119
- if (!Number.isFinite(ttlMs) || ttlMs <= 0) return;
120
- const next = Math.floor(ttlMs);
121
- qmdSearchCacheRecallScopeDepth += 1;
122
- qmdSearchCacheRecallTtlMs = Math.max(qmdSearchCacheRecallTtlMs ?? 0, next);
123
- }
124
- function endQmdSearchCacheRecallScope() {
125
- if (qmdSearchCacheRecallScopeDepth <= 0) return;
126
- qmdSearchCacheRecallScopeDepth -= 1;
127
- if (qmdSearchCacheRecallScopeDepth === 0) {
128
- qmdSearchCacheRecallTtlMs = void 0;
129
- }
130
- }
117
+ var qmdSearchCacheRecallTtl = new AsyncLocalStorage();
131
118
  async function runInQmdSearchCacheRecallScope(ttlMs, run) {
132
- const acquired = Number.isFinite(ttlMs) && ttlMs > 0;
133
- if (acquired) beginQmdSearchCacheRecallScope(ttlMs);
134
- try {
135
- return await run();
136
- } finally {
137
- if (acquired) endQmdSearchCacheRecallScope();
138
- }
139
- }
140
- function peekQmdSearchCacheRecallScopeDepth() {
141
- return qmdSearchCacheRecallScopeDepth;
142
- }
143
- function effectiveQmdSearchCacheTtlMs() {
144
- return Math.max(QMD_CACHE_TTL_MS, qmdSearchCacheRecallTtlMs ?? 0);
119
+ const ttl = Number.isFinite(ttlMs) ? Math.max(QMD_CACHE_TTL_MS, Math.floor(ttlMs)) : QMD_CACHE_TTL_MS;
120
+ return qmdSearchCacheRecallTtl.run(ttl, run);
145
121
  }
146
122
  function getCachedQmdSearch(cacheKey) {
147
123
  const entry = qmdSearchCache.get(cacheKey);
148
124
  if (!entry) return null;
149
- const ttl = effectiveQmdSearchCacheTtlMs();
150
- if (Date.now() - entry.cachedAt > ttl) {
151
- qmdSearchCache.delete(cacheKey);
152
- return null;
153
- }
125
+ const ttl = qmdSearchCacheRecallTtl.getStore() ?? QMD_CACHE_TTL_MS;
126
+ if (Date.now() - entry.cachedAt > ttl) return null;
154
127
  return entry.results;
155
128
  }
156
129
  function setCachedQmdSearch(cacheKey, results) {
130
+ qmdSearchCache.delete(cacheKey);
157
131
  qmdSearchCache.set(cacheKey, { results, cachedAt: Date.now() });
158
132
  if (qmdSearchCache.size > 200) {
159
- const now = Date.now();
160
- const ttl = effectiveQmdSearchCacheTtlMs();
161
- for (const [key, entry] of qmdSearchCache) {
162
- if (now - entry.cachedAt > ttl) qmdSearchCache.delete(key);
163
- }
133
+ const oldest = qmdSearchCache.keys().next();
134
+ if (!oldest.done) qmdSearchCache.delete(oldest.value);
164
135
  }
165
136
  }
166
137
  var ALL_CACHE_LAYERS = [
@@ -289,10 +260,7 @@ export {
289
260
  setCachedEpisodeMap,
290
261
  getCachedRuleMemories,
291
262
  setCachedRuleMemories,
292
- beginQmdSearchCacheRecallScope,
293
- endQmdSearchCacheRecallScope,
294
263
  runInQmdSearchCacheRecallScope,
295
- peekQmdSearchCacheRecallScopeDepth,
296
264
  getCachedQmdSearch,
297
265
  setCachedQmdSearch,
298
266
  ALL_CACHE_LAYERS,
@@ -304,4 +272,4 @@ export {
304
272
  clearQmdResultCaches,
305
273
  getMemoryCacheStats
306
274
  };
307
- //# sourceMappingURL=chunk-4U5VHHVF.js.map
275
+ //# sourceMappingURL=chunk-R5S57GRK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/memory-cache.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\nimport 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\nconst qmdSearchCacheRecallTtl = new AsyncLocalStorage<number>();\n\nexport async function runInQmdSearchCacheRecallScope<T>(\n ttlMs: number,\n run: () => Promise<T>,\n): Promise<T> {\n const ttl = Number.isFinite(ttlMs)\n ? Math.max(QMD_CACHE_TTL_MS, Math.floor(ttlMs))\n : QMD_CACHE_TTL_MS;\n return qmdSearchCacheRecallTtl.run(ttl, run);\n}\n\nexport function getCachedQmdSearch(cacheKey: string): unknown[] | null {\n const entry = qmdSearchCache.get(cacheKey);\n if (!entry) return null;\n const ttl = qmdSearchCacheRecallTtl.getStore() ?? QMD_CACHE_TTL_MS;\n // A concurrent recall can still use an entry that is too old for this recall.\n if (Date.now() - entry.cachedAt > ttl) return null;\n return entry.results;\n}\n\nexport function setCachedQmdSearch(cacheKey: string, results: unknown[]): void {\n qmdSearchCache.delete(cacheKey);\n qmdSearchCache.set(cacheKey, { results, cachedAt: Date.now() });\n if (qmdSearchCache.size > 200) {\n const oldest = qmdSearchCache.keys().next();\n if (!oldest.done) qmdSearchCache.delete(oldest.value);\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":";;;;;;AAAA,SAAS,yBAAyB;AAoBlC,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,IAAI,MAAM,WAAW,OAAO;AACpD,UAAM,OAAO,GAAG;AAChB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,SAAS,kBACd,SACA,gBACA,QAAQ,IACR,QAAQ,GACa;AACrB,QAAM,QAAQ,uBAAuB,eAAe,SAAS,gBAAgB,OAAO,KAAK;AACzF,SAAO,QAAQ,CAAC,GAAG,MAAM,SAAS,OA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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":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isGenericRecallExcludedPath
3
- } from "./chunk-4KHGOVRI.js";
3
+ } from "./chunk-UI77UYQP.js";
4
4
  import {
5
5
  normalizeProjectionPreview
6
6
  } from "./chunk-SCU65EZI.js";
@@ -209,4 +209,4 @@ export {
209
209
  browsePatternMatches,
210
210
  runMemoryBrowse
211
211
  };
212
- //# sourceMappingURL=chunk-OOLREGPZ.js.map
212
+ //# sourceMappingURL=chunk-S7U6PKKV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-B7RWBZXW.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-447ERYQ5.js";
6
+ } from "./chunk-NFLZMAIV.js";
7
7
  import {
8
8
  countRecallTokenOverlap,
9
9
  normalizeRecallTokens
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  getCachedEpisodeMap,
13
13
  setCachedEpisodeMap
14
- } from "./chunk-4U5VHHVF.js";
14
+ } from "./chunk-R5S57GRK.js";
15
15
 
16
16
  // src/verified-recall.ts
17
17
  function createReadOnlyBoxBuilder(memoryDir) {
@@ -109,4 +109,4 @@ export {
109
109
  compareVerifiedEpisodeResults,
110
110
  searchVerifiedEpisodes
111
111
  };
112
- //# sourceMappingURL=chunk-H36HLLSU.js.map
112
+ //# sourceMappingURL=chunk-SAMHDJSQ.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-3UXOZBHV.js";
15
15
  import {
16
16
  StorageManager
17
- } from "./chunk-447ERYQ5.js";
17
+ } from "./chunk-NFLZMAIV.js";
18
18
  import {
19
19
  OKF_PROFILE_TYPE,
20
20
  okfTypeForMemory
@@ -272,4 +272,4 @@ export {
272
272
  exportOkfBundle,
273
273
  firstHeading
274
274
  };
275
- //# sourceMappingURL=chunk-P7TJUCNC.js.map
275
+ //# sourceMappingURL=chunk-SGD7PCHI.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  computeCorpusWatermarks,
6
6
  resolveCorpusNamespaceRoots
7
- } from "./chunk-FXZEKC32.js";
7
+ } from "./chunk-PORCJ6NC.js";
8
8
 
9
9
  // src/operator-doctor-corpus.ts
10
10
  var DIGEST_PREFIX_LENGTH = 12;
@@ -78,4 +78,4 @@ export {
78
78
  corpusWatermarksFromCheck,
79
79
  summarizeCorpusAndReplica
80
80
  };
81
- //# sourceMappingURL=chunk-5ZZZDDSF.js.map
81
+ //# sourceMappingURL=chunk-SX6O25WK.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot,
3
3
  resolveNamespaceStorageRoot
4
- } from "./chunk-SFRAXHQO.js";
4
+ } from "./chunk-H6X7GNDW.js";
5
5
  import {
6
6
  getConfiguredNamespaces
7
7
  } from "./chunk-UPWOMMVU.js";
@@ -2308,4 +2308,4 @@ export {
2308
2308
  runNamespaceMaintenancePlan,
2309
2309
  runNamespaceMaintenanceBatchPlan
2310
2310
  };
2311
- //# sourceMappingURL=chunk-DUAGLBFC.js.map
2311
+ //# sourceMappingURL=chunk-TE2SBFZD.js.map
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  listMemoryGovernanceRuns,
6
6
  readMemoryGovernanceRunArtifact
7
- } from "./chunk-CYPS6NPQ.js";
7
+ } from "./chunk-E4PME33M.js";
8
8
  import {
9
9
  loadPersistedNativeKnowledgeChunks
10
10
  } from "./chunk-2DQ2XREU.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-447ERYQ5.js";
13
+ } from "./chunk-NFLZMAIV.js";
14
14
  import {
15
15
  normalizeProjectionPreview,
16
16
  normalizeProjectionTags
@@ -1156,4 +1156,4 @@ export {
1156
1156
  verifyMemoryProjection,
1157
1157
  repairMemoryProjection
1158
1158
  };
1159
- //# sourceMappingURL=chunk-IACG6B5R.js.map
1159
+ //# sourceMappingURL=chunk-TE46SBDJ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-EKUI7I2X.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-447ERYQ5.js";
13
+ } from "./chunk-NFLZMAIV.js";
14
14
  import {
15
15
  normalizeEntityName
16
16
  } from "./chunk-YXZG5TVN.js";
@@ -974,4 +974,4 @@ export {
974
974
  resolveBriefingSaveDir,
975
975
  briefingFilename
976
976
  };
977
- //# sourceMappingURL=chunk-2EFXVRYX.js.map
977
+ //# sourceMappingURL=chunk-TS6UKENE.js.map