@remnic/core 9.7.11 → 9.7.13

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 (286) hide show
  1. package/dist/access-admin-ops-surface.d.ts +6 -6
  2. package/dist/access-admin-ops-surface.js +7 -7
  3. package/dist/access-boundary.d.ts +6 -6
  4. package/dist/access-boundary.js +8 -8
  5. package/dist/access-cli.js +31 -31
  6. package/dist/access-http.d.ts +6 -6
  7. package/dist/access-http.js +12 -12
  8. package/dist/access-identity-continuity-surface.d.ts +5 -5
  9. package/dist/access-identity-continuity-surface.js +7 -7
  10. package/dist/access-lcm-surface.d.ts +6 -6
  11. package/dist/access-lcm-surface.js +7 -7
  12. package/dist/access-mcp.d.ts +6 -6
  13. package/dist/access-mcp.js +11 -11
  14. package/dist/access-observe-write-surface.d.ts +6 -6
  15. package/dist/access-observe-write-surface.js +7 -7
  16. package/dist/access-operations-batch.js +9 -9
  17. package/dist/access-operations.d.ts +9 -9
  18. package/dist/access-operations.js +10 -10
  19. package/dist/access-recall-surface.d.ts +6 -6
  20. package/dist/access-recall-surface.js +7 -7
  21. package/dist/access-schema.d.ts +64 -64
  22. package/dist/{access-service-DSuzikHQ.d.ts → access-service-tHd3eQpd.d.ts} +4 -4
  23. package/dist/access-service.d.ts +6 -6
  24. package/dist/access-service.js +7 -7
  25. package/dist/access-surface-catalog.d.ts +6 -6
  26. package/dist/action-confidence.d.ts +1 -1
  27. package/dist/active-memory-bridge.d.ts +1 -1
  28. package/dist/active-recall.d.ts +1 -1
  29. package/dist/active-recall.js +1 -1
  30. package/dist/behavior-learner.d.ts +1 -1
  31. package/dist/behavior-signals.d.ts +1 -1
  32. package/dist/bootstrap.d.ts +5 -5
  33. package/dist/briefing.d.ts +2 -2
  34. package/dist/briefing.js +3 -3
  35. package/dist/buffer-surprise-report.d.ts +1 -1
  36. package/dist/buffer.d.ts +2 -2
  37. package/dist/bulk-import/index.d.ts +3 -3
  38. package/dist/calibration.d.ts +1 -1
  39. package/dist/capabilities.d.ts +1 -1
  40. package/dist/{catalog-BNwjACa5.d.ts → catalog-DEMiw6HZ.d.ts} +48 -1
  41. package/dist/causal-behavior.d.ts +1 -1
  42. package/dist/causal-consolidation.d.ts +1 -1
  43. package/dist/causal-consolidation.js +4 -4
  44. package/dist/causal-trajectory-graph.d.ts +1 -1
  45. package/dist/{chunk-U4KHQTJ6.js → chunk-2AL7N3BH.js} +4 -2
  46. package/dist/{chunk-U4KHQTJ6.js.map → chunk-2AL7N3BH.js.map} +1 -1
  47. package/dist/{chunk-L4H6MQ7I.js → chunk-2RSL6YRA.js} +2 -2
  48. package/dist/{chunk-QHT4W3RU.js → chunk-2V5QI6NQ.js} +41 -9
  49. package/dist/chunk-2V5QI6NQ.js.map +1 -0
  50. package/dist/{chunk-JYRFO4EH.js → chunk-2ZPQUTMW.js} +4 -4
  51. package/dist/{chunk-673NPXE3.js → chunk-3SIC3E65.js} +2 -2
  52. package/dist/{chunk-OVMS3DCB.js → chunk-675YU5IK.js} +2 -2
  53. package/dist/{chunk-7LMEY5KZ.js → chunk-6N7R7TR2.js} +34 -1
  54. package/dist/chunk-6N7R7TR2.js.map +1 -0
  55. package/dist/{chunk-TGBJ2OMK.js → chunk-BQTSGK5Y.js} +2 -2
  56. package/dist/{chunk-6LM6PPDX.js → chunk-CE3GMHT4.js} +2 -2
  57. package/dist/{chunk-YXOAQAH2.js → chunk-CLFY35ED.js} +3 -3
  58. package/dist/{chunk-HQ7QZJM5.js → chunk-D4TLWDYR.js} +2 -2
  59. package/dist/{chunk-LQKITFGB.js → chunk-FUUF7FMX.js} +2 -2
  60. package/dist/{chunk-3ZVFLMFQ.js → chunk-G5PVJJRA.js} +1 -1
  61. package/dist/chunk-G5PVJJRA.js.map +1 -0
  62. package/dist/{chunk-MXRMNKSY.js → chunk-I3GKTDM2.js} +3 -3
  63. package/dist/{chunk-EQF5763Z.js → chunk-IQULRIZM.js} +2 -2
  64. package/dist/{chunk-W6R43NLA.js → chunk-KQMKF4G2.js} +17 -17
  65. package/dist/{chunk-DJCKXI4M.js → chunk-NVXQTRBL.js} +2 -2
  66. package/dist/{chunk-GHVJASQ4.js → chunk-OCY3CRPG.js} +3 -3
  67. package/dist/{chunk-YLTG6BO4.js → chunk-OIFZII6J.js} +2 -2
  68. package/dist/{chunk-XF4KOVDK.js → chunk-PA6DMYEK.js} +6 -6
  69. package/dist/{chunk-3OQ4IZJN.js → chunk-QPZCAVDC.js} +7 -7
  70. package/dist/{chunk-DLWYAN6A.js → chunk-T6U7HDIY.js} +2 -2
  71. package/dist/{chunk-JZM5QUTE.js → chunk-TMGK6YE7.js} +171 -9
  72. package/dist/chunk-TMGK6YE7.js.map +1 -0
  73. package/dist/{chunk-KXLRMM35.js → chunk-TRH533CA.js} +30 -7
  74. package/dist/chunk-TRH533CA.js.map +1 -0
  75. package/dist/{chunk-UTDA43TB.js → chunk-TWGGNUWJ.js} +2 -2
  76. package/dist/{chunk-SBFDL2EQ.js → chunk-UTZW3X2R.js} +2 -2
  77. package/dist/{chunk-SECMZACR.js → chunk-XUQUBZ7O.js} +2 -2
  78. package/dist/{chunk-5U65RIVI.js → chunk-YI7XUXLX.js} +16 -15
  79. package/dist/chunk-YI7XUXLX.js.map +1 -0
  80. package/dist/{chunk-7XRUYC6G.js → chunk-Z6WN2KSH.js} +19 -5
  81. package/dist/chunk-Z6WN2KSH.js.map +1 -0
  82. package/dist/{chunk-WUDBMLC6.js → chunk-ZC3HG22I.js} +2 -2
  83. package/dist/{chunk-VCEH5UYS.js → chunk-ZRXSHGXT.js} +2 -2
  84. package/dist/{cli-DACyuK8-.d.ts → cli-D8Tsa4Sh.d.ts} +5 -5
  85. package/dist/cli.d.ts +8 -8
  86. package/dist/cli.js +25 -25
  87. package/dist/compounding/engine.d.ts +2 -2
  88. package/dist/compounding/engine.js +3 -3
  89. package/dist/compounding/preference-consolidator.d.ts +1 -1
  90. package/dist/compression-optimizer.d.ts +1 -1
  91. package/dist/config.d.ts +1 -1
  92. package/dist/config.js +1 -1
  93. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  94. package/dist/connectors/codex-materialize-runner.js +3 -3
  95. package/dist/connectors/codex-materialize.d.ts +1 -1
  96. package/dist/connectors/index.d.ts +1 -1
  97. package/dist/connectors/index.js +3 -3
  98. package/dist/consolidation-provenance-check.d.ts +2 -2
  99. package/dist/consolidation-undo.d.ts +2 -2
  100. package/dist/contradiction/index.d.ts +2 -2
  101. package/dist/conversation-index/backend.d.ts +1 -1
  102. package/dist/conversation-index/chunker.d.ts +1 -1
  103. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  104. package/dist/conversation-index/indexer.d.ts +1 -1
  105. package/dist/conversation-index/search.d.ts +1 -1
  106. package/dist/day-summary.d.ts +1 -1
  107. package/dist/delinearize.d.ts +1 -1
  108. package/dist/direct-answer-wiring.d.ts +1 -1
  109. package/dist/direct-answer.d.ts +1 -1
  110. package/dist/embedding-fallback.d.ts +1 -1
  111. package/dist/enrichment/index.d.ts +1 -1
  112. package/dist/entity-retrieval.d.ts +2 -2
  113. package/dist/entity-retrieval.js +3 -3
  114. package/dist/entity-schema.d.ts +1 -1
  115. package/dist/explicit-capture.d.ts +5 -5
  116. package/dist/extraction-faithfulness.d.ts +1 -1
  117. package/dist/extraction-judge-telemetry.d.ts +1 -1
  118. package/dist/extraction-judge-training.d.ts +1 -1
  119. package/dist/extraction-judge.d.ts +1 -1
  120. package/dist/extraction.d.ts +1 -1
  121. package/dist/fallback-llm.d.ts +1 -1
  122. package/dist/graph-dashboard-diff.d.ts +1 -1
  123. package/dist/graph-dashboard-key.d.ts +1 -1
  124. package/dist/graph-dashboard-parser.d.ts +1 -1
  125. package/dist/graph-edge-reinforcement.d.ts +1 -1
  126. package/dist/graph-snapshot.d.ts +1 -1
  127. package/dist/graph.d.ts +1 -1
  128. package/dist/identity-continuity.d.ts +1 -1
  129. package/dist/importance.d.ts +1 -1
  130. package/dist/importers/index.d.ts +1 -1
  131. package/dist/in-flight-reads.d.ts +1 -1
  132. package/dist/index.d.ts +386 -386
  133. package/dist/index.js +31 -31
  134. package/dist/intent.d.ts +1 -1
  135. package/dist/lcm/engine.d.ts +1 -1
  136. package/dist/lcm/index.d.ts +1 -1
  137. package/dist/lcm/tools.d.ts +1 -1
  138. package/dist/lifecycle.d.ts +1 -1
  139. package/dist/live-connectors-runner.d.ts +1 -1
  140. package/dist/local-llm.d.ts +1 -1
  141. package/dist/local-model-endpoint.d.ts +1 -1
  142. package/dist/maintenance/memory-governance.d.ts +1 -1
  143. package/dist/maintenance/memory-governance.js +3 -3
  144. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  145. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  146. package/dist/mcp-memory-inspector-app.d.ts +6 -6
  147. package/dist/memory-action-policy.d.ts +1 -1
  148. package/dist/memory-cache.d.ts +1 -1
  149. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  150. package/dist/memory-projection-store.d.ts +1 -1
  151. package/dist/memory-provenance.d.ts +1 -1
  152. package/dist/memory-worth-outcomes.d.ts +2 -2
  153. package/dist/models-json.d.ts +1 -1
  154. package/dist/namespaces/migrate.d.ts +3 -3
  155. package/dist/namespaces/migrate.js +4 -4
  156. package/dist/namespaces/principal.d.ts +1 -1
  157. package/dist/namespaces/search.d.ts +1 -1
  158. package/dist/namespaces/storage.d.ts +3 -3
  159. package/dist/namespaces/storage.js +3 -3
  160. package/dist/native-knowledge.d.ts +1 -1
  161. package/dist/operator-toolkit.d.ts +2 -2
  162. package/dist/operator-toolkit.js +8 -8
  163. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  164. package/dist/orchestration/maintenance.d.ts +2 -2
  165. package/dist/orchestration/maintenance.js +5 -5
  166. package/dist/{orchestrator-D83AvrPf.d.ts → orchestrator-B_WXBmuE.d.ts} +4 -4
  167. package/dist/orchestrator.d.ts +5 -5
  168. package/dist/orchestrator.js +31 -31
  169. package/dist/patterns-cli.d.ts +1 -1
  170. package/dist/{pipeline-BSqGpYl1.d.ts → pipeline-Dvtvt141.d.ts} +1 -1
  171. package/dist/policy-runtime.d.ts +1 -1
  172. package/dist/provenance.d.ts +1 -1
  173. package/dist/{qmd-CutnpRVe.d.ts → qmd-DwBLh_hl.d.ts} +1 -1
  174. package/dist/qmd-preflight.d.ts +2 -2
  175. package/dist/qmd-recall-cache.d.ts +1 -1
  176. package/dist/qmd.d.ts +2 -2
  177. package/dist/recall-disclosure-escalation.d.ts +1 -1
  178. package/dist/recall-explain-renderer.d.ts +1 -1
  179. package/dist/recall-explain-renderer.js +3 -3
  180. package/dist/recall-planner-llm.d.ts +1 -1
  181. package/dist/recall-state.d.ts +1 -1
  182. package/dist/recall-tag-filter.d.ts +1 -1
  183. package/dist/recall-timings.d.ts +1 -1
  184. package/dist/recall-xray-cli.d.ts +1 -1
  185. package/dist/recall-xray-cli.js +4 -4
  186. package/dist/recall-xray-renderer.d.ts +1 -1
  187. package/dist/recall-xray-renderer.js +3 -3
  188. package/dist/recall-xray.d.ts +1 -1
  189. package/dist/recall-xray.js +2 -2
  190. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  191. package/dist/replay/normalizers/claude.d.ts +1 -1
  192. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  193. package/dist/replay/normalizers/shared.d.ts +1 -1
  194. package/dist/replay/runner.d.ts +1 -1
  195. package/dist/replay/types.d.ts +1 -1
  196. package/dist/resolve-auth-token.d.ts +1 -1
  197. package/dist/resume-bundles.js +2 -2
  198. package/dist/retrieval-agents.d.ts +2 -2
  199. package/dist/retrieval-tiers.d.ts +1 -1
  200. package/dist/routing/engine.d.ts +1 -1
  201. package/dist/routing/store.d.ts +1 -1
  202. package/dist/schemas.d.ts +74 -74
  203. package/dist/search/embed-helper.d.ts +1 -1
  204. package/dist/search/factory.d.ts +1 -1
  205. package/dist/search/index.d.ts +1 -1
  206. package/dist/search/lancedb-backend.d.ts +1 -1
  207. package/dist/search/meilisearch-backend.d.ts +1 -1
  208. package/dist/search/noop-backend.d.ts +1 -1
  209. package/dist/search/orama-backend.d.ts +1 -1
  210. package/dist/search/port.d.ts +1 -1
  211. package/dist/search/remote-backend.d.ts +1 -1
  212. package/dist/{semantic-consolidation-btIVRC4l.d.ts → semantic-consolidation-Dia_6FOn.d.ts} +1 -1
  213. package/dist/semantic-consolidation.d.ts +2 -2
  214. package/dist/semantic-consolidation.js +4 -4
  215. package/dist/semantic-rule-promotion.js +3 -3
  216. package/dist/semantic-rule-verifier.d.ts +1 -1
  217. package/dist/semantic-rule-verifier.js +3 -3
  218. package/dist/session-observer-bands.d.ts +1 -1
  219. package/dist/session-observer-state.d.ts +1 -1
  220. package/dist/shared-context/manager.d.ts +9 -9
  221. package/dist/signal.d.ts +1 -1
  222. package/dist/{storage-BVv_Mqa0.d.ts → storage-RshM7i8-.d.ts} +18 -1
  223. package/dist/storage.d.ts +2 -2
  224. package/dist/storage.js +2 -2
  225. package/dist/summarizer.d.ts +1 -1
  226. package/dist/summary-snapshot.d.ts +1 -1
  227. package/dist/temporal-supersession.d.ts +2 -2
  228. package/dist/temporal-timeline-recall.d.ts +1 -1
  229. package/dist/temporal-validity.d.ts +1 -1
  230. package/dist/threading.d.ts +1 -1
  231. package/dist/tier-migration.d.ts +2 -2
  232. package/dist/tier-routing.d.ts +1 -1
  233. package/dist/topics.d.ts +1 -1
  234. package/dist/transcript.d.ts +1 -1
  235. package/dist/transfer/types.d.ts +66 -66
  236. package/dist/trust-score-stage.d.ts +1 -1
  237. package/dist/trust-score.d.ts +1 -1
  238. package/dist/{types-Cmkz7csa.d.ts → types-CHSXOq7s.d.ts} +34 -0
  239. package/dist/types.d.ts +1 -1
  240. package/dist/types.js +1 -1
  241. package/dist/utility-runtime.d.ts +1 -1
  242. package/dist/verified-recall.js +3 -3
  243. package/package.json +2 -2
  244. package/src/access-http.ts +40 -2
  245. package/src/config.test.ts +44 -0
  246. package/src/config.ts +43 -0
  247. package/src/namespaces/catalog.test.ts +258 -0
  248. package/src/namespaces/catalog.ts +235 -10
  249. package/src/namespaces/storage.ts +9 -0
  250. package/src/orchestrator.ts +3 -0
  251. package/src/relay/mission-access.test.ts +58 -3
  252. package/src/relay/mission-access.ts +17 -3
  253. package/src/relay/mission-ui.test.ts +90 -0
  254. package/src/storage-catalog-touch-gating.test.ts +70 -0
  255. package/src/storage.ts +31 -5
  256. package/src/types.ts +34 -0
  257. package/dist/chunk-3ZVFLMFQ.js.map +0 -1
  258. package/dist/chunk-5U65RIVI.js.map +0 -1
  259. package/dist/chunk-7LMEY5KZ.js.map +0 -1
  260. package/dist/chunk-7XRUYC6G.js.map +0 -1
  261. package/dist/chunk-JZM5QUTE.js.map +0 -1
  262. package/dist/chunk-KXLRMM35.js.map +0 -1
  263. package/dist/chunk-QHT4W3RU.js.map +0 -1
  264. /package/dist/{chunk-L4H6MQ7I.js.map → chunk-2RSL6YRA.js.map} +0 -0
  265. /package/dist/{chunk-JYRFO4EH.js.map → chunk-2ZPQUTMW.js.map} +0 -0
  266. /package/dist/{chunk-673NPXE3.js.map → chunk-3SIC3E65.js.map} +0 -0
  267. /package/dist/{chunk-OVMS3DCB.js.map → chunk-675YU5IK.js.map} +0 -0
  268. /package/dist/{chunk-TGBJ2OMK.js.map → chunk-BQTSGK5Y.js.map} +0 -0
  269. /package/dist/{chunk-6LM6PPDX.js.map → chunk-CE3GMHT4.js.map} +0 -0
  270. /package/dist/{chunk-YXOAQAH2.js.map → chunk-CLFY35ED.js.map} +0 -0
  271. /package/dist/{chunk-HQ7QZJM5.js.map → chunk-D4TLWDYR.js.map} +0 -0
  272. /package/dist/{chunk-LQKITFGB.js.map → chunk-FUUF7FMX.js.map} +0 -0
  273. /package/dist/{chunk-MXRMNKSY.js.map → chunk-I3GKTDM2.js.map} +0 -0
  274. /package/dist/{chunk-EQF5763Z.js.map → chunk-IQULRIZM.js.map} +0 -0
  275. /package/dist/{chunk-W6R43NLA.js.map → chunk-KQMKF4G2.js.map} +0 -0
  276. /package/dist/{chunk-DJCKXI4M.js.map → chunk-NVXQTRBL.js.map} +0 -0
  277. /package/dist/{chunk-GHVJASQ4.js.map → chunk-OCY3CRPG.js.map} +0 -0
  278. /package/dist/{chunk-YLTG6BO4.js.map → chunk-OIFZII6J.js.map} +0 -0
  279. /package/dist/{chunk-XF4KOVDK.js.map → chunk-PA6DMYEK.js.map} +0 -0
  280. /package/dist/{chunk-3OQ4IZJN.js.map → chunk-QPZCAVDC.js.map} +0 -0
  281. /package/dist/{chunk-DLWYAN6A.js.map → chunk-T6U7HDIY.js.map} +0 -0
  282. /package/dist/{chunk-UTDA43TB.js.map → chunk-TWGGNUWJ.js.map} +0 -0
  283. /package/dist/{chunk-SBFDL2EQ.js.map → chunk-UTZW3X2R.js.map} +0 -0
  284. /package/dist/{chunk-SECMZACR.js.map → chunk-XUQUBZ7O.js.map} +0 -0
  285. /package/dist/{chunk-WUDBMLC6.js.map → chunk-ZC3HG22I.js.map} +0 -0
  286. /package/dist/{chunk-VCEH5UYS.js.map → chunk-ZRXSHGXT.js.map} +0 -0
@@ -51,12 +51,12 @@ import {
51
51
  } from "./chunk-AJVLDJU6.js";
52
52
  import {
53
53
  rebuildMemoryLifecycleLedger
54
- } from "./chunk-SBFDL2EQ.js";
54
+ } from "./chunk-UTZW3X2R.js";
55
55
  import {
56
56
  rebuildMemoryProjection,
57
57
  repairMemoryProjection,
58
58
  verifyMemoryProjection
59
- } from "./chunk-MXRMNKSY.js";
59
+ } from "./chunk-I3GKTDM2.js";
60
60
  import {
61
61
  rebuildObservations
62
62
  } from "./chunk-LZZNTPLR.js";
@@ -77,7 +77,7 @@ import {
77
77
  } from "./chunk-GQL52GQ5.js";
78
78
  import {
79
79
  searchVerifiedEpisodes
80
- } from "./chunk-YLTG6BO4.js";
80
+ } from "./chunk-OIFZII6J.js";
81
81
  import {
82
82
  getUtilityLearningStatus,
83
83
  learnUtilityPromotionWeights
@@ -91,10 +91,10 @@ import {
91
91
  } from "./chunk-DBRYEIGY.js";
92
92
  import {
93
93
  promoteSemanticRuleFromMemory
94
- } from "./chunk-WUDBMLC6.js";
94
+ } from "./chunk-ZC3HG22I.js";
95
95
  import {
96
96
  searchVerifiedSemanticRules
97
- } from "./chunk-EQF5763Z.js";
97
+ } from "./chunk-IQULRIZM.js";
98
98
  import {
99
99
  resolveAgentAccessAuthToken
100
100
  } from "./chunk-TGQ2NTWH.js";
@@ -102,7 +102,7 @@ import {
102
102
  buildResumeBundleFromState,
103
103
  getResumeBundleStatus,
104
104
  recordResumeBundle
105
- } from "./chunk-DJCKXI4M.js";
105
+ } from "./chunk-NVXQTRBL.js";
106
106
  import {
107
107
  getWorkProductLedgerStatus,
108
108
  recordWorkProductLedgerEntry,
@@ -113,7 +113,7 @@ import {
113
113
  } from "./chunk-5EZXHU36.js";
114
114
  import {
115
115
  parseXrayCliOptions
116
- } from "./chunk-YXOAQAH2.js";
116
+ } from "./chunk-CLFY35ED.js";
117
117
  import {
118
118
  formatNamespaceMaintenanceHealthText,
119
119
  runBenchmarkRecall,
@@ -122,12 +122,12 @@ import {
122
122
  runOperatorInventory,
123
123
  runOperatorRepair,
124
124
  runOperatorSetup
125
- } from "./chunk-XF4KOVDK.js";
125
+ } from "./chunk-PA6DMYEK.js";
126
126
  import {
127
127
  listNamespaces,
128
128
  runNamespaceMigration,
129
129
  verifyNamespaces
130
- } from "./chunk-VCEH5UYS.js";
130
+ } from "./chunk-ZRXSHGXT.js";
131
131
  import {
132
132
  analyzeSessionIntegrity,
133
133
  applySessionRepair,
@@ -207,13 +207,13 @@ import {
207
207
  } from "./chunk-UQ7RN5HK.js";
208
208
  import {
209
209
  parseConfig
210
- } from "./chunk-7LMEY5KZ.js";
210
+ } from "./chunk-6N7R7TR2.js";
211
211
  import {
212
212
  getAbstractionNodeStoreStatus
213
213
  } from "./chunk-OADWQ5CR.js";
214
214
  import {
215
215
  EngramAccessHttpServer
216
- } from "./chunk-QHT4W3RU.js";
216
+ } from "./chunk-2V5QI6NQ.js";
217
217
  import {
218
218
  WearablesInputError
219
219
  } from "./chunk-V7IZKJI3.js";
@@ -226,10 +226,10 @@ import {
226
226
  createProductionChatLlmAdapter,
227
227
  loadChatSession,
228
228
  sessionBelongsToPrincipal
229
- } from "./chunk-GHVJASQ4.js";
229
+ } from "./chunk-OCY3CRPG.js";
230
230
  import {
231
231
  EngramAccessService
232
- } from "./chunk-3OQ4IZJN.js";
232
+ } from "./chunk-QPZCAVDC.js";
233
233
  import {
234
234
  WorkStorage
235
235
  } from "./chunk-GDB4J2H3.js";
@@ -246,13 +246,13 @@ import {
246
246
  parseRecallExplainFormat,
247
247
  renderRecallExplain,
248
248
  renderXray
249
- } from "./chunk-OVMS3DCB.js";
249
+ } from "./chunk-675YU5IK.js";
250
250
  import {
251
251
  listMemoryGovernanceRuns,
252
252
  readMemoryGovernanceRunArtifact,
253
253
  restoreMemoryGovernanceRun,
254
254
  runMemoryGovernance
255
- } from "./chunk-L4H6MQ7I.js";
255
+ } from "./chunk-2RSL6YRA.js";
256
256
  import {
257
257
  getObjectiveStateStoreStatus
258
258
  } from "./chunk-6HMYUWXR.js";
@@ -268,7 +268,7 @@ import {
268
268
  import {
269
269
  RECALL_DISCLOSURE_LEVELS,
270
270
  isRecallDisclosure
271
- } from "./chunk-3ZVFLMFQ.js";
271
+ } from "./chunk-G5PVJJRA.js";
272
272
  import {
273
273
  bumpMemoryCorpusVersionForDir
274
274
  } from "./chunk-OKUEZOGW.js";
@@ -7617,4 +7617,4 @@ export {
7617
7617
  listMemoryMarkdownFilePaths,
7618
7618
  registerCli
7619
7619
  };
7620
- //# sourceMappingURL=chunk-W6R43NLA.js.map
7620
+ //# sourceMappingURL=chunk-KQMKF4G2.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-LMDRGRJ2.js";
12
12
  import {
13
13
  parseConfig
14
- } from "./chunk-7LMEY5KZ.js";
14
+ } from "./chunk-6N7R7TR2.js";
15
15
  import {
16
16
  resolveObjectiveStateStoreDir,
17
17
  validateObjectiveStateSnapshot
@@ -268,4 +268,4 @@ export {
268
268
  recordResumeBundle,
269
269
  getResumeBundleStatus
270
270
  };
271
- //# sourceMappingURL=chunk-DJCKXI4M.js.map
271
+ //# sourceMappingURL=chunk-NVXQTRBL.js.map
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-T4WDJPEZ.js";
19
19
  import {
20
20
  getOperation
21
- } from "./chunk-6LM6PPDX.js";
21
+ } from "./chunk-CE3GMHT4.js";
22
22
  import {
23
23
  assertOperationAllowed,
24
24
  capabilityAllowsOp,
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-D7FOKIY5.js";
28
28
  import {
29
29
  EngramAccessInputError
30
- } from "./chunk-3OQ4IZJN.js";
30
+ } from "./chunk-QPZCAVDC.js";
31
31
  import {
32
32
  readEnvVar
33
33
  } from "./chunk-JUC24CTX.js";
@@ -3789,4 +3789,4 @@ export {
3789
3789
  MCP_SUPPORTED_PROTOCOL_VERSIONS,
3790
3790
  EngramMcpServer
3791
3791
  };
3792
- //# sourceMappingURL=chunk-GHVJASQ4.js.map
3792
+ //# sourceMappingURL=chunk-OCY3CRPG.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-ZBJMUXZH.js";
8
8
  import {
9
9
  StorageManager
10
- } from "./chunk-KXLRMM35.js";
10
+ } from "./chunk-TRH533CA.js";
11
11
  import {
12
12
  getCachedEpisodeMap,
13
13
  setCachedEpisodeMap
@@ -109,4 +109,4 @@ export {
109
109
  compareVerifiedEpisodeResults,
110
110
  searchVerifiedEpisodes
111
111
  };
112
- //# sourceMappingURL=chunk-YLTG6BO4.js.map
112
+ //# sourceMappingURL=chunk-OIFZII6J.js.map
@@ -3,10 +3,10 @@ import {
3
3
  readNamespaceMaintenanceLastRanStatuses,
4
4
  readNamespaceMaintenanceStatuses,
5
5
  runNamespaceMaintenancePlan
6
- } from "./chunk-JZM5QUTE.js";
6
+ } from "./chunk-TMGK6YE7.js";
7
7
  import {
8
8
  listNamespaces
9
- } from "./chunk-VCEH5UYS.js";
9
+ } from "./chunk-ZRXSHGXT.js";
10
10
  import {
11
11
  analyzeSessionIntegrity,
12
12
  applySessionRepair,
@@ -38,17 +38,17 @@ import {
38
38
  } from "./chunk-YBPYIAA5.js";
39
39
  import {
40
40
  parseConfig
41
- } from "./chunk-7LMEY5KZ.js";
41
+ } from "./chunk-6N7R7TR2.js";
42
42
  import {
43
43
  listMemoryGovernanceRuns,
44
44
  readMemoryGovernanceRunArtifact
45
- } from "./chunk-L4H6MQ7I.js";
45
+ } from "./chunk-2RSL6YRA.js";
46
46
  import {
47
47
  analyzeGraphHealth
48
48
  } from "./chunk-OBMR4VIX.js";
49
49
  import {
50
50
  StorageManager
51
- } from "./chunk-KXLRMM35.js";
51
+ } from "./chunk-TRH533CA.js";
52
52
  import {
53
53
  probeProjectionHealth
54
54
  } from "./chunk-RHOZ5LLO.js";
@@ -1671,4 +1671,4 @@ export {
1671
1671
  runBenchmarkRecall,
1672
1672
  runOperatorRepair
1673
1673
  };
1674
- //# sourceMappingURL=chunk-XF4KOVDK.js.map
1674
+ //# sourceMappingURL=chunk-PA6DMYEK.js.map
@@ -34,10 +34,10 @@ import {
34
34
  } from "./chunk-H7XKCNR6.js";
35
35
  import {
36
36
  toRecallExplainJson
37
- } from "./chunk-OVMS3DCB.js";
37
+ } from "./chunk-675YU5IK.js";
38
38
  import {
39
39
  estimateRecallTokens
40
- } from "./chunk-HQ7QZJM5.js";
40
+ } from "./chunk-D4TLWDYR.js";
41
41
  import {
42
42
  combineNamespaces,
43
43
  defaultGitInvoker,
@@ -64,7 +64,7 @@ import {
64
64
  listMemoryGovernanceRuns,
65
65
  readMemoryGovernanceRunArtifact,
66
66
  runMemoryGovernance
67
- } from "./chunk-L4H6MQ7I.js";
67
+ } from "./chunk-2RSL6YRA.js";
68
68
  import {
69
69
  recordObjectiveStateSnapshotsFromObservedMessages
70
70
  } from "./chunk-ICP53SKG.js";
@@ -111,11 +111,11 @@ import {
111
111
  enqueuePassiveCorrectionNotification,
112
112
  parseBriefingFocus,
113
113
  parseBriefingWindow
114
- } from "./chunk-UTDA43TB.js";
114
+ } from "./chunk-TWGGNUWJ.js";
115
115
  import {
116
116
  parseEntityFile,
117
117
  selfDeps
118
- } from "./chunk-KXLRMM35.js";
118
+ } from "./chunk-TRH533CA.js";
119
119
  import {
120
120
  serializeMutations
121
121
  } from "./chunk-LTJAMRGI.js";
@@ -128,7 +128,7 @@ import {
128
128
  import {
129
129
  DEFAULT_RECALL_DISCLOSURE,
130
130
  isRecallDisclosure
131
- } from "./chunk-3ZVFLMFQ.js";
131
+ } from "./chunk-G5PVJJRA.js";
132
132
  import {
133
133
  inferMemoryStatus,
134
134
  toMemoryPathRel
@@ -11250,4 +11250,4 @@ export {
11250
11250
  EngramAccessService,
11251
11251
  AccessAdminOpsSurface
11252
11252
  };
11253
- //# sourceMappingURL=chunk-3OQ4IZJN.js.map
11253
+ //# sourceMappingURL=chunk-QPZCAVDC.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-5CJVLG3H.js";
5
5
  import {
6
6
  StorageManager
7
- } from "./chunk-KXLRMM35.js";
7
+ } from "./chunk-TRH533CA.js";
8
8
  import {
9
9
  parseContinuityImprovementLoops
10
10
  } from "./chunk-LDXUBPMO.js";
@@ -1282,4 +1282,4 @@ export {
1282
1282
  defaultTierMigrationCycleBudget,
1283
1283
  CompoundingEngine
1284
1284
  };
1285
- //# sourceMappingURL=chunk-DLWYAN6A.js.map
1285
+ //# sourceMappingURL=chunk-T6U7HDIY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot,
3
3
  resolveNamespaceStorageRoot
4
- } from "./chunk-U4KHQTJ6.js";
4
+ } from "./chunk-2AL7N3BH.js";
5
5
  import {
6
6
  getConfiguredNamespaces
7
7
  } from "./chunk-7PND4PUC.js";
@@ -41,6 +41,7 @@ import {
41
41
  stat,
42
42
  writeFile
43
43
  } from "fs/promises";
44
+ import { StringDecoder } from "string_decoder";
44
45
  var NAMESPACE_KINDS = [
45
46
  "default",
46
47
  "self",
@@ -241,6 +242,9 @@ var NamespaceCatalog = class {
241
242
  this.catalogPath = path.join(this.stateDir, CATALOG_FILE);
242
243
  this.rebuildLockPath = path.join(this.stateDir, REBUILD_LOCK_FILE);
243
244
  this.defaultNamespaceIdentity = normalizeNamespaceIdentity(config.defaultNamespace);
245
+ this.compactBytesLimit = config.namespacesCatalogCompactBytes ?? 16 * 1024 * 1024;
246
+ this.readCoalesceMs = config.namespacesCatalogReadTouchCoalesceMs ?? 6e4;
247
+ this.writeCoalesceMs = config.namespacesCatalogWriteTouchCoalesceMs ?? 1e3;
244
248
  }
245
249
  config;
246
250
  memoryDir;
@@ -299,6 +303,26 @@ var NamespaceCatalog = class {
299
303
  // misclassified, dropped at read time, or given the wrong storage root. Compare
300
304
  // against this normalized form everywhere instead.
301
305
  defaultNamespaceIdentity;
306
+ // Issue #1903 — touch-path performance knobs, resolved with the documented
307
+ // defaults when an externally-built PluginConfig omits them (so a partial
308
+ // config object still yields the production behavior). `0` is a real disable
309
+ // switch for each and is preserved by `??` (0 is not null/undefined).
310
+ compactBytesLimit;
311
+ readCoalesceMs;
312
+ writeCoalesceMs;
313
+ // Size after the most recent auto-compaction (0 = none yet). Hysteresis for
314
+ // maybeAutoCompact: a folded catalog that is itself above the limit (many
315
+ // distinct namespaces) would otherwise be re-folded + re-rewritten on every
316
+ // touch. We only compact again once the log has grown by >= one limit-worth
317
+ // since the last compaction (#1903, Codex).
318
+ lastCompactedSize = 0;
319
+ // Issue #1903 — per-(namespace, kind) coalescing buffer. Keyed `${kind}:${ns}`.
320
+ // Holds the latest buffered timestamp/metadata for a pure-timestamp touch on
321
+ // an already-known record; a `.unref()`'d timer flushes it once per window so
322
+ // the append-only log does not grow one line per repeat touch. Semantically
323
+ // observable touches (first sight, provenance/field change) bypass this buffer
324
+ // and flush immediately (see `coalesceTouch`).
325
+ pendingTouches = /* @__PURE__ */ new Map();
302
326
  /** Whether the catalog is active (namespaces enabled and catalog not opted out). */
303
327
  get enabled() {
304
328
  return isCatalogEnabled(this.config);
@@ -421,10 +445,102 @@ var NamespaceCatalog = class {
421
445
  }
422
446
  // ── Touch API (cheap, failure-tolerant) ─────────────────────────────────
423
447
  async markRead(namespace, metadata) {
424
- await this.touch(namespace, "read", metadata);
448
+ await this.coalesceTouch(namespace, "read", metadata);
425
449
  }
426
450
  async markWrite(namespace, metadata) {
427
- await this.touch(namespace, "write", metadata);
451
+ await this.coalesceTouch(namespace, "write", metadata);
452
+ }
453
+ /**
454
+ * Route a read/write touch through the per-(namespace, kind) coalescing buffer
455
+ * (issue #1903). A touch flushes IMMEDIATELY (bypassing the buffer) whenever it
456
+ * is semantically observable to an in-process reader — first sight of the
457
+ * namespace, a `config`→`write` provenance upgrade, the first time a touch
458
+ * field is set (so `listNamespaces({ writtenSince })` and record presence stay
459
+ * correct), or a change to `kind`/`principal`/`projectId`/`branch`/
460
+ * `parentNamespace`. A pure timestamp refresh on an already-known record is
461
+ * DEFERRED and coalesced: the newest buffered `at`/metadata wins and a single
462
+ * `touch` runs when the window elapses (or on `flushPendingTouches`). Window
463
+ * `0` skips the buffer entirely (the pre-#1903 immediate-append behavior).
464
+ * Best-effort: coalescing decisions read only the warm `compactedCache`, never
465
+ * forcing a disk parse; a cold cache flushes immediately (and re-warms it).
466
+ */
467
+ async coalesceTouch(namespace, kind, metadata) {
468
+ if (!this.enabled) return;
469
+ const window = kind === "read" ? this.readCoalesceMs : this.writeCoalesceMs;
470
+ if (window <= 0) {
471
+ await this.touch(namespace, kind, metadata);
472
+ return;
473
+ }
474
+ const ns = this.validateNamespace(namespace);
475
+ const cached = this.compactedCache?.records.get(ns);
476
+ if (cached === void 0 || this.touchMustFlushImmediately(kind, metadata, cached)) {
477
+ const stale = this.pendingTouches.get(`${kind}:${ns}`);
478
+ if (stale) {
479
+ clearTimeout(stale.timer);
480
+ this.pendingTouches.delete(`${kind}:${ns}`);
481
+ }
482
+ await this.touch(namespace, kind, metadata);
483
+ return;
484
+ }
485
+ const key = `${kind}:${ns}`;
486
+ const at = metadata?.at ?? /* @__PURE__ */ new Date();
487
+ const existing = this.pendingTouches.get(key);
488
+ if (existing) {
489
+ existing.metadata = metadata;
490
+ existing.at = at;
491
+ return;
492
+ }
493
+ const safeWindow = Math.min(window, 2147483647);
494
+ const timer = setTimeout(() => {
495
+ void this.flushPendingTouch(key);
496
+ }, safeWindow);
497
+ timer.unref();
498
+ this.pendingTouches.set(key, { namespace: ns, kind, metadata, at, timer });
499
+ }
500
+ /**
501
+ * Whether a read/write touch on an EXISTING cached record must flush
502
+ * immediately rather than coalesce. Only pure timestamp refreshes (the value
503
+ * returns false) are safe to defer.
504
+ */
505
+ touchMustFlushImmediately(kind, metadata, cached) {
506
+ if (kind === "write" && cached.discoveredBy === "config") return true;
507
+ if (kind === "write" && cached.lastWriteAt === void 0) return true;
508
+ if (kind === "read" && cached.lastReadAt === void 0) return true;
509
+ if (!metadata) return false;
510
+ if (metadata.kind !== void 0 && metadata.kind !== cached.kind) return true;
511
+ if (metadata.principal !== void 0 && metadata.principal !== cached.principal) return true;
512
+ if (metadata.projectId !== void 0 && metadata.projectId !== cached.projectId) return true;
513
+ if (metadata.branch !== void 0 && metadata.branch !== cached.branch) return true;
514
+ if (metadata.parentNamespace !== void 0 && metadata.parentNamespace !== cached.parentNamespace) {
515
+ return true;
516
+ }
517
+ if (metadata.storageDir !== void 0 && metadata.storageDir !== cached.storageDir) return true;
518
+ return false;
519
+ }
520
+ /** Fire a single buffered touch when its coalescing window elapses. */
521
+ async flushPendingTouch(key) {
522
+ const pending = this.pendingTouches.get(key);
523
+ if (!pending) return;
524
+ this.pendingTouches.delete(key);
525
+ clearTimeout(pending.timer);
526
+ await this.touch(pending.namespace, pending.kind, { ...pending.metadata, at: pending.at }).catch(
527
+ () => void 0
528
+ );
529
+ }
530
+ /**
531
+ * Flush every buffered coalesced touch now (issue #1903). Called from the
532
+ * router/orchestrator shutdown hook so a long-lived host does not drop
533
+ * buffered read/write timestamps on teardown, and by tests to make coalesced
534
+ * touches deterministically observable. Best-effort: a failed flush never
535
+ * throws (each touch is `.catch()`-guarded).
536
+ */
537
+ async flushPendingTouches() {
538
+ const pending = [...this.pendingTouches.values()];
539
+ this.pendingTouches.clear();
540
+ for (const p of pending) {
541
+ clearTimeout(p.timer);
542
+ await this.touch(p.namespace, p.kind, { ...p.metadata, at: p.at }).catch(() => void 0);
543
+ }
428
544
  }
429
545
  async markMaintenance(namespace, jobName, at) {
430
546
  if (typeof jobName !== "string" || jobName.trim().length === 0) {
@@ -830,10 +946,34 @@ var NamespaceCatalog = class {
830
946
  record.lastMaintenanceAt = { ...record.lastMaintenanceAt ?? {}, [jobName]: nowIso };
831
947
  }
832
948
  await this.appendUnchained(record);
949
+ await this.maybeAutoCompact();
833
950
  return true;
834
951
  })
835
952
  );
836
953
  }
954
+ /**
955
+ * Fold-and-rewrite the JSONL log when it exceeds `compactBytesLimit`
956
+ * (issue #1903). MUST be called only from inside `touch`'s held-lock +
957
+ * `queueCritical` critical section — it reuses `loadCompacted` (last-record-
958
+ * wins fold; every namespace row survives) and `rewriteUnchained` (atomic
959
+ * temp-file + rename), so the collapse is cross-process safe and never
960
+ * invokes the disk-scan purge in `finishRebuild`. Best-effort and fail-open
961
+ * (rule #40): the append already succeeded and is durable, so a failed
962
+ * compaction must not fail the touch — the next over-limit touch retries.
963
+ */
964
+ async maybeAutoCompact() {
965
+ try {
966
+ const limit = this.compactBytesLimit;
967
+ if (limit <= 0) return;
968
+ const size = this.compactedCache?.identity.size;
969
+ if (size === void 0 || size <= limit) return;
970
+ if (this.lastCompactedSize > 0 && size - this.lastCompactedSize < limit) return;
971
+ const folded = await this.loadCompacted();
972
+ await this.rewriteUnchained([...folded.values()]);
973
+ this.lastCompactedSize = this.compactedCache?.identity.size ?? size;
974
+ } catch {
975
+ }
976
+ }
837
977
  // ── Rebuild from disk ────────────────────────────────────────────────────
838
978
  async rebuildFromDisk(options) {
839
979
  const dryRun = options?.dryRun === true;
@@ -1204,21 +1344,43 @@ var NamespaceCatalog = class {
1204
1344
  }
1205
1345
  try {
1206
1346
  this.onCatalogReadForTest?.();
1207
- const raw = await handle.readFile("utf8");
1208
- for (const line of raw.split("\n")) {
1347
+ const CHUNK_BYTES = 1 << 16;
1348
+ const YIELD_EVERY_LINES = 5e3;
1349
+ const chunk = Buffer.allocUnsafe(CHUNK_BYTES);
1350
+ const decoder = new StringDecoder("utf8");
1351
+ let leftover = "";
1352
+ let linesSinceYield = 0;
1353
+ const foldLine = (line) => {
1209
1354
  const trimmed = line.trim();
1210
- if (trimmed.length === 0) continue;
1355
+ if (trimmed.length === 0) return;
1211
1356
  let parsed;
1212
1357
  try {
1213
1358
  parsed = JSON.parse(trimmed);
1214
1359
  } catch {
1215
- continue;
1360
+ return;
1216
1361
  }
1217
1362
  const record = coerceRecord(parsed);
1218
- if (!record) continue;
1363
+ if (!record) return;
1219
1364
  const prior = records.get(record.namespace);
1220
1365
  records.set(record.namespace, prior ? mergeNewerTouchFields(record, prior) : record);
1366
+ };
1367
+ for (; ; ) {
1368
+ const { bytesRead } = await handle.read(chunk, 0, CHUNK_BYTES, null);
1369
+ if (bytesRead === 0) break;
1370
+ leftover += decoder.write(chunk.subarray(0, bytesRead));
1371
+ let newlineIndex = leftover.indexOf("\n");
1372
+ while (newlineIndex !== -1) {
1373
+ foldLine(leftover.slice(0, newlineIndex));
1374
+ leftover = leftover.slice(newlineIndex + 1);
1375
+ if (++linesSinceYield >= YIELD_EVERY_LINES) {
1376
+ linesSinceYield = 0;
1377
+ await new Promise((resolve) => setImmediate(resolve));
1378
+ }
1379
+ newlineIndex = leftover.indexOf("\n");
1380
+ }
1221
1381
  }
1382
+ leftover += decoder.end();
1383
+ foldLine(leftover);
1222
1384
  } catch {
1223
1385
  this.compactedCache = void 0;
1224
1386
  return /* @__PURE__ */ new Map();
@@ -2042,4 +2204,4 @@ export {
2042
2204
  runNamespaceMaintenancePlan,
2043
2205
  runNamespaceMaintenanceBatchPlan
2044
2206
  };
2045
- //# sourceMappingURL=chunk-JZM5QUTE.js.map
2207
+ //# sourceMappingURL=chunk-TMGK6YE7.js.map