@remnic/core 9.21.0 → 9.22.1

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 (422) hide show
  1. package/dist/access-admin-ops-surface.d.ts +32 -12
  2. package/dist/access-admin-ops-surface.js +44 -43
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-boundary.d.ts +13 -10
  5. package/dist/access-boundary.js +44 -43
  6. package/dist/access-cli.js +125 -122
  7. package/dist/access-cli.js.map +1 -1
  8. package/dist/access-http.d.ts +16 -9
  9. package/dist/access-http.js +56 -54
  10. package/dist/access-identity-continuity-surface.d.ts +9 -7
  11. package/dist/access-identity-continuity-surface.js +44 -43
  12. package/dist/access-lcm-surface.d.ts +12 -9
  13. package/dist/access-lcm-surface.js +44 -43
  14. package/dist/access-mcp-admin-tools.d.ts +18 -0
  15. package/dist/access-mcp-admin-tools.js +10 -0
  16. package/dist/access-mcp-admin-tools.js.map +1 -0
  17. package/dist/access-mcp-output-schemas.js +1 -1
  18. package/dist/access-mcp.d.ts +22 -10
  19. package/dist/access-mcp.js +52 -50
  20. package/dist/access-memory-search-fanout.d.ts +2 -2
  21. package/dist/{access-namespace-preflight-tmwQgCT6.d.ts → access-namespace-preflight-CmErR03h.d.ts} +1 -1
  22. package/dist/access-namespace-preflight.d.ts +3 -3
  23. package/dist/access-namespace-preflight.js +44 -43
  24. package/dist/access-observe-write-surface.d.ts +12 -9
  25. package/dist/access-observe-write-surface.js +44 -43
  26. package/dist/access-operations-batch.js +46 -45
  27. package/dist/access-operations.d.ts +16 -13
  28. package/dist/access-operations.js +48 -47
  29. package/dist/access-recall-concurrency.d.ts +12 -9
  30. package/dist/access-recall-concurrency.js +44 -43
  31. package/dist/access-recall-response.d.ts +12 -9
  32. package/dist/access-recall-response.js +44 -43
  33. package/dist/access-recall-surface.d.ts +14 -11
  34. package/dist/access-recall-surface.js +44 -43
  35. package/dist/access-schema.d.ts +76 -76
  36. package/dist/{access-service-BqUii7LY.d.ts → access-service-CKEROeFP.d.ts} +32 -11
  37. package/dist/access-service.d.ts +13 -10
  38. package/dist/access-service.js +46 -45
  39. package/dist/access-surface-catalog.d.ts +12 -9
  40. package/dist/access-surface-catalog.js +7 -0
  41. package/dist/access-surface-catalog.js.map +1 -1
  42. package/dist/access-wearables-meetings-surface.d.ts +78 -0
  43. package/dist/access-wearables-meetings-surface.js +22 -0
  44. package/dist/access-wearables-meetings-surface.js.map +1 -0
  45. package/dist/action-confidence.d.ts +1 -1
  46. package/dist/active-memory-bridge.d.ts +1 -1
  47. package/dist/active-recall.d.ts +1 -1
  48. package/dist/active-recall.js +7 -7
  49. package/dist/adapters/index.js +4 -4
  50. package/dist/adapters/registry.js +2 -2
  51. package/dist/{auto-sync-UPTUVE4X.js → auto-sync-5OE5QOZB.js} +4 -4
  52. package/dist/behavior-learner.d.ts +1 -1
  53. package/dist/behavior-signals.d.ts +1 -1
  54. package/dist/bootstrap.d.ts +9 -7
  55. package/dist/briefing.d.ts +2 -2
  56. package/dist/briefing.js +11 -11
  57. package/dist/buffer-surprise-report.d.ts +1 -1
  58. package/dist/buffer.d.ts +2 -2
  59. package/dist/bulk-import/index.d.ts +3 -3
  60. package/dist/calibration.d.ts +1 -1
  61. package/dist/capabilities.d.ts +1 -1
  62. package/dist/{catalog-iWvWz61I.d.ts → catalog-BFTVo2Ez.d.ts} +1 -1
  63. package/dist/causal-behavior.d.ts +1 -1
  64. package/dist/causal-behavior.js +2 -2
  65. package/dist/causal-chain.js +2 -2
  66. package/dist/causal-consolidation.d.ts +1 -1
  67. package/dist/causal-consolidation.js +15 -15
  68. package/dist/causal-retrieval.js +2 -2
  69. package/dist/causal-trajectory-graph.d.ts +1 -1
  70. package/dist/causal-trajectory.js +1 -1
  71. package/dist/{chunk-Z54EM5YZ.js → chunk-2PHX3I5C.js} +10 -10
  72. package/dist/{chunk-JFDEYXF7.js → chunk-3NAHZQU3.js} +2 -2
  73. package/dist/{chunk-MJYYXODM.js → chunk-3UOSVTFR.js} +8 -8
  74. package/dist/{chunk-HPOY2PHQ.js → chunk-3ZW6ZQO6.js} +6 -6
  75. package/dist/{chunk-UV72DEZD.js → chunk-4B77XSG5.js} +5 -5
  76. package/dist/chunk-56BSXSHC.js +158 -0
  77. package/dist/chunk-56BSXSHC.js.map +1 -0
  78. package/dist/{chunk-IC2TCZJ2.js → chunk-57QKLRBV.js} +3 -1
  79. package/dist/chunk-57QKLRBV.js.map +1 -0
  80. package/dist/{chunk-LMHDFOVV.js → chunk-5CPI2QWG.js} +3 -3
  81. package/dist/{chunk-3ZUY2VQF.js → chunk-5FZQ74K5.js} +2 -2
  82. package/dist/{chunk-B7C3TF5H.js → chunk-6TWXQ4E2.js} +5 -5
  83. package/dist/{chunk-JN3IUA2Q.js → chunk-7I7AYIUQ.js} +3 -3
  84. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  85. package/dist/{chunk-MONWCSVL.js → chunk-7RAJ3GXO.js} +2 -1
  86. package/dist/chunk-7RAJ3GXO.js.map +1 -0
  87. package/dist/{chunk-SQEDDWAM.js → chunk-A2RFKL3V.js} +5 -34
  88. package/dist/chunk-A2RFKL3V.js.map +1 -0
  89. package/dist/{chunk-5JQLAQUZ.js → chunk-ATEAL5EI.js} +6 -6
  90. package/dist/{chunk-4PYLBXX6.js → chunk-AYAROCWD.js} +2 -2
  91. package/dist/chunk-BLDBT6HZ.js +39 -0
  92. package/dist/chunk-BLDBT6HZ.js.map +1 -0
  93. package/dist/{chunk-EXU5IQ3S.js → chunk-CUUY5CC4.js} +6 -6
  94. package/dist/{chunk-X5QS5C2O.js → chunk-E3ZMFFQZ.js} +2 -2
  95. package/dist/{chunk-JWMYVQAM.js → chunk-ES5IHQ6M.js} +2 -2
  96. package/dist/{chunk-HJEEAO4O.js → chunk-G2NSSQES.js} +2 -2
  97. package/dist/{chunk-QO2KODU6.js → chunk-GD3QOBMB.js} +2 -2
  98. package/dist/{chunk-62QM5MKY.js → chunk-IIXLB5E7.js} +118 -62
  99. package/dist/chunk-IIXLB5E7.js.map +1 -0
  100. package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
  101. package/dist/{chunk-Q3FWRDCP.js → chunk-JNIJBXVK.js} +2 -2
  102. package/dist/{chunk-EILX7SQR.js → chunk-JVGUY2AU.js} +27 -16
  103. package/dist/chunk-JVGUY2AU.js.map +1 -0
  104. package/dist/{chunk-N7EVMKP6.js → chunk-KNRG6ZGJ.js} +11 -11
  105. package/dist/{chunk-GEUDRENF.js → chunk-MMTG3SCJ.js} +2 -2
  106. package/dist/{chunk-WZFAPHIK.js → chunk-MU7ZHSZE.js} +2 -2
  107. package/dist/{chunk-W4FBGYGK.js → chunk-NRV4Y3PM.js} +1 -1
  108. package/dist/{chunk-TCZWBJBO.js → chunk-OUW4PAY4.js} +199 -256
  109. package/dist/chunk-OUW4PAY4.js.map +1 -0
  110. package/dist/{chunk-275ENJDK.js → chunk-P2BLHUL2.js} +2 -2
  111. package/dist/{chunk-LRGSLV7M.js → chunk-PYHOAXTI.js} +4 -4
  112. package/dist/{chunk-V5TSUGRB.js → chunk-QCKQEBIY.js} +17 -9
  113. package/dist/chunk-QCKQEBIY.js.map +1 -0
  114. package/dist/{chunk-EZKKHVFY.js → chunk-QE63OHLB.js} +2 -2
  115. package/dist/{chunk-ONHRRJZM.js → chunk-QJAQNXWI.js} +6 -6
  116. package/dist/{chunk-KHRKEELC.js → chunk-ROUL7RZU.js} +395 -69
  117. package/dist/chunk-ROUL7RZU.js.map +1 -0
  118. package/dist/{chunk-AT3TDN6O.js → chunk-RT4TSR2C.js} +8953 -8645
  119. package/dist/chunk-RT4TSR2C.js.map +1 -0
  120. package/dist/{chunk-6NZ7U4R4.js → chunk-SCOT5DTA.js} +1 -1
  121. package/dist/chunk-SCOT5DTA.js.map +1 -0
  122. package/dist/{chunk-LI4ZOFHW.js → chunk-SVZGA2MK.js} +2 -2
  123. package/dist/chunk-SYOIVK7K.js +63 -0
  124. package/dist/chunk-SYOIVK7K.js.map +1 -0
  125. package/dist/{chunk-5RUE3GHQ.js → chunk-TWCOYET2.js} +17 -1
  126. package/dist/chunk-TWCOYET2.js.map +1 -0
  127. package/dist/{chunk-5IXPWEQB.js → chunk-WS32QRLO.js} +113 -48
  128. package/dist/chunk-WS32QRLO.js.map +1 -0
  129. package/dist/{chunk-53WDAG7X.js → chunk-WWZ35GWW.js} +5 -5
  130. package/dist/{chunk-4F6AANKS.js → chunk-XWPFZX6S.js} +507 -143
  131. package/dist/chunk-XWPFZX6S.js.map +1 -0
  132. package/dist/{chunk-SB4OKS6C.js → chunk-ZN4UZWMT.js} +2 -2
  133. package/dist/{chunk-7M6APKJL.js → chunk-ZYU7ZFLT.js} +2 -2
  134. package/dist/{cli-DPEhq0Cp.d.ts → cli-BrwT9YMD.d.ts} +5 -5
  135. package/dist/cli.d.ts +14 -11
  136. package/dist/cli.js +86 -84
  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/config.js +4 -4
  143. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  144. package/dist/connectors/codex-materialize-runner.js +11 -11
  145. package/dist/connectors/codex-materialize.d.ts +1 -1
  146. package/dist/connectors/index.d.ts +1 -1
  147. package/dist/connectors/index.js +12 -12
  148. package/dist/consolidation-provenance-check.d.ts +2 -2
  149. package/dist/consolidation-undo.d.ts +2 -2
  150. package/dist/contradiction/index.d.ts +2 -2
  151. package/dist/contradiction/index.js +1 -1
  152. package/dist/conversation-index/backend.d.ts +1 -1
  153. package/dist/conversation-index/chunker.d.ts +1 -1
  154. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  155. package/dist/conversation-index/indexer.d.ts +1 -1
  156. package/dist/conversation-index/search.d.ts +1 -1
  157. package/dist/day-summary.d.ts +1 -1
  158. package/dist/delinearize.d.ts +1 -1
  159. package/dist/direct-answer-wiring.d.ts +1 -1
  160. package/dist/direct-answer.d.ts +1 -1
  161. package/dist/embedding-fallback.d.ts +1 -1
  162. package/dist/enrichment/index.d.ts +1 -1
  163. package/dist/entity-retrieval.d.ts +2 -2
  164. package/dist/entity-retrieval.js +11 -11
  165. package/dist/entity-schema.d.ts +1 -1
  166. package/dist/explicit-capture.d.ts +9 -7
  167. package/dist/explicit-capture.js +1 -1
  168. package/dist/extraction-error-classification.d.ts +22 -0
  169. package/dist/extraction-error-classification.js +11 -0
  170. package/dist/extraction-error-classification.js.map +1 -0
  171. package/dist/extraction-faithfulness.d.ts +1 -1
  172. package/dist/extraction-judge-telemetry.d.ts +1 -1
  173. package/dist/extraction-judge-training.d.ts +1 -1
  174. package/dist/extraction-judge.d.ts +1 -1
  175. package/dist/extraction.d.ts +3 -17
  176. package/dist/extraction.js +5 -3
  177. package/dist/fallback-llm.d.ts +1 -1
  178. package/dist/{first-start-migration-LEXL3XYL.js → first-start-migration-BKNGOFED.js} +4 -4
  179. package/dist/graph-dashboard-diff.d.ts +1 -1
  180. package/dist/graph-dashboard-key.d.ts +1 -1
  181. package/dist/graph-dashboard-parser.d.ts +1 -1
  182. package/dist/graph-edge-reinforcement.d.ts +1 -1
  183. package/dist/graph-snapshot.d.ts +1 -1
  184. package/dist/graph.d.ts +1 -1
  185. package/dist/importance.d.ts +1 -1
  186. package/dist/importers/index.d.ts +1 -1
  187. package/dist/in-flight-reads.d.ts +1 -1
  188. package/dist/index.d.ts +713 -923
  189. package/dist/index.js +249 -212
  190. package/dist/intent.d.ts +1 -1
  191. package/dist/lcm/engine.d.ts +1 -1
  192. package/dist/lcm/engine.js +4 -4
  193. package/dist/lcm/index.d.ts +1 -1
  194. package/dist/lcm/index.js +13 -13
  195. package/dist/lcm/tools.d.ts +1 -1
  196. package/dist/lifecycle.d.ts +1 -1
  197. package/dist/live-connectors-runner.d.ts +1 -1
  198. package/dist/local-llm.d.ts +1 -1
  199. package/dist/local-model-endpoint.d.ts +1 -1
  200. package/dist/maintenance/memory-governance.d.ts +1 -1
  201. package/dist/maintenance/memory-governance.js +12 -12
  202. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  203. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
  204. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  205. package/dist/maintenance/rebuild-memory-projection.js +13 -13
  206. package/dist/maintenance-C98njYb8.d.ts +366 -0
  207. package/dist/mcp-memory-inspector-app.d.ts +12 -9
  208. package/dist/mcp-read-only-tools.js +1 -1
  209. package/dist/memory-action-policy.d.ts +1 -1
  210. package/dist/memory-cache.d.ts +1 -1
  211. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  212. package/dist/memory-projection-store.d.ts +1 -1
  213. package/dist/memory-provenance.d.ts +1 -1
  214. package/dist/memory-worth-outcomes.d.ts +2 -2
  215. package/dist/models-json.d.ts +1 -1
  216. package/dist/namespaces/migrate.d.ts +3 -3
  217. package/dist/namespaces/migrate.js +19 -19
  218. package/dist/namespaces/principal.d.ts +1 -1
  219. package/dist/namespaces/search.d.ts +1 -1
  220. package/dist/namespaces/search.js +7 -7
  221. package/dist/namespaces/storage.d.ts +3 -3
  222. package/dist/namespaces/storage.js +11 -11
  223. package/dist/native-knowledge.d.ts +1 -1
  224. package/dist/offline-sync-impression-drain.d.ts +1 -1
  225. package/dist/offline-sync-impression-drain.js +1 -1
  226. package/dist/operator-toolkit.d.ts +2 -2
  227. package/dist/operator-toolkit.js +28 -28
  228. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  229. package/dist/orchestration/maintenance.d.ts +6 -223
  230. package/dist/orchestration/maintenance.js +19 -19
  231. package/dist/{orchestrator-DB93S48I.d.ts → orchestrator-C9ZVppNh.d.ts} +12 -481
  232. package/dist/orchestrator.d.ts +10 -8
  233. package/dist/orchestrator.js +122 -119
  234. package/dist/patterns-cli.d.ts +1 -1
  235. package/dist/{pipeline-DmGc-H66.d.ts → pipeline-id_-sqYm.d.ts} +1 -1
  236. package/dist/policy-runtime.d.ts +1 -1
  237. package/dist/proactive-contention.d.ts +1 -1
  238. package/dist/provenance.d.ts +1 -1
  239. package/dist/{qmd-cJT0crkF.d.ts → qmd-R6XaQOZK.d.ts} +1 -1
  240. package/dist/qmd-preflight.d.ts +2 -2
  241. package/dist/qmd-recall-cache.d.ts +1 -1
  242. package/dist/qmd.d.ts +2 -2
  243. package/dist/qmd.js +4 -4
  244. package/dist/recall-concurrency-config.d.ts +1 -1
  245. package/dist/recall-disclosure-escalation.d.ts +1 -1
  246. package/dist/recall-explain-renderer.d.ts +1 -1
  247. package/dist/recall-explain-renderer.js +3 -3
  248. package/dist/recall-memory-map.d.ts +1 -1
  249. package/dist/recall-planner-llm.d.ts +1 -1
  250. package/dist/recall-state.d.ts +1 -1
  251. package/dist/recall-tag-filter.d.ts +1 -1
  252. package/dist/recall-timings.d.ts +1 -1
  253. package/dist/recall-xray-cli.d.ts +1 -1
  254. package/dist/recall-xray-cli.js +4 -4
  255. package/dist/recall-xray-renderer.d.ts +1 -1
  256. package/dist/recall-xray-renderer.js +3 -3
  257. package/dist/recall-xray.d.ts +1 -1
  258. package/dist/recall-xray.js +2 -2
  259. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  260. package/dist/replay/normalizers/claude.d.ts +1 -1
  261. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  262. package/dist/replay/normalizers/shared.d.ts +1 -1
  263. package/dist/replay/runner.d.ts +1 -1
  264. package/dist/replay/types.d.ts +1 -1
  265. package/dist/resolution-3K27T4VO.js +1 -1
  266. package/dist/resolve-auth-token.d.ts +1 -1
  267. package/dist/resume-bundles.js +6 -6
  268. package/dist/retrieval-agents.d.ts +2 -2
  269. package/dist/retrieval-tiers.d.ts +1 -1
  270. package/dist/routing/engine.d.ts +1 -1
  271. package/dist/routing/store.d.ts +1 -1
  272. package/dist/salvage-envelope.d.ts +1 -1
  273. package/dist/salvage-envelope.js +1 -1
  274. package/dist/schemas.d.ts +76 -76
  275. package/dist/{scope-profiles-KG2nODX7.d.ts → scope-profiles-EhyuAKkd.d.ts} +1 -1
  276. package/dist/search/embed-helper.d.ts +1 -1
  277. package/dist/search/factory.d.ts +1 -1
  278. package/dist/search/factory.js +6 -6
  279. package/dist/search/index.d.ts +1 -1
  280. package/dist/search/index.js +12 -12
  281. package/dist/search/lancedb-backend.d.ts +1 -1
  282. package/dist/search/meilisearch-backend.d.ts +1 -1
  283. package/dist/search/noop-backend.d.ts +1 -1
  284. package/dist/search/orama-backend.d.ts +1 -1
  285. package/dist/search/port.d.ts +1 -1
  286. package/dist/search/remote-backend.d.ts +1 -1
  287. package/dist/{semantic-consolidation-BaZlg0D8.d.ts → semantic-consolidation-B2xo26UQ.d.ts} +1 -1
  288. package/dist/semantic-consolidation.d.ts +2 -2
  289. package/dist/semantic-consolidation.js +13 -13
  290. package/dist/semantic-rule-promotion.js +11 -11
  291. package/dist/semantic-rule-verifier.d.ts +1 -1
  292. package/dist/semantic-rule-verifier.js +12 -12
  293. package/dist/service-DgFWlZ-r.d.ts +835 -0
  294. package/dist/session-observer-bands.d.ts +1 -1
  295. package/dist/session-observer-state.d.ts +1 -1
  296. package/dist/shared-context/manager.d.ts +9 -9
  297. package/dist/signal.d.ts +1 -1
  298. package/dist/{storage-BKhHHnRo.d.ts → storage-XGawwqXE.d.ts} +131 -2
  299. package/dist/storage.d.ts +2 -2
  300. package/dist/storage.js +10 -10
  301. package/dist/summarizer.d.ts +1 -1
  302. package/dist/summary-snapshot.d.ts +1 -1
  303. package/dist/temporal-supersession.d.ts +2 -2
  304. package/dist/temporal-timeline-recall.d.ts +1 -1
  305. package/dist/temporal-validity.d.ts +1 -1
  306. package/dist/threading.d.ts +1 -1
  307. package/dist/tier-migration.d.ts +2 -2
  308. package/dist/tier-routing.d.ts +1 -1
  309. package/dist/topics.d.ts +1 -1
  310. package/dist/transcript.d.ts +1 -1
  311. package/dist/transfer/import-sqlite.js +2 -2
  312. package/dist/transfer/types.d.ts +66 -66
  313. package/dist/trust-score-stage.d.ts +1 -1
  314. package/dist/trust-score.d.ts +1 -1
  315. package/dist/{types-GBQZuT7l.d.ts → types-Bbs0qz6b.d.ts} +2 -3
  316. package/dist/types.d.ts +1 -1
  317. package/dist/types.js +1 -1
  318. package/dist/utility-runtime.d.ts +1 -1
  319. package/dist/verified-recall.js +12 -12
  320. package/dist/write-envelope.d.ts +1 -1
  321. package/dist/write-envelope.js +1 -1
  322. package/package.json +2 -2
  323. package/src/access-admin-ops-surface.ts +47 -0
  324. package/src/access-boundary.ts +4 -0
  325. package/src/access-http.test.ts +63 -0
  326. package/src/access-http.ts +27 -37
  327. package/src/access-mcp-admin-tools.ts +171 -0
  328. package/src/access-mcp-output-schemas.ts +16 -0
  329. package/src/access-mcp.ts +10 -262
  330. package/src/access-operations-batch.ts +11 -5
  331. package/src/access-service.ts +59 -46
  332. package/src/access-surface-catalog.ts +7 -0
  333. package/src/access-wearables-meetings-surface.ts +139 -0
  334. package/src/activity/digest.ts +1 -1
  335. package/src/activity/runner.test.ts +37 -0
  336. package/src/activity/runner.ts +12 -0
  337. package/src/activity/scheduler.test.ts +1 -0
  338. package/src/activity/sync-registration.ts +13 -0
  339. package/src/cli/meetings-commands.ts +70 -0
  340. package/src/cli.ts +7 -6
  341. package/src/extraction-error-classification.ts +52 -0
  342. package/src/extraction.ts +2 -50
  343. package/src/mcp-read-only-tools.ts +2 -0
  344. package/src/meetings/build-memory.test.ts +364 -0
  345. package/src/meetings/build-scheduler.test.ts +55 -0
  346. package/src/meetings/build-scheduler.ts +96 -0
  347. package/src/meetings/day-source.test.ts +275 -0
  348. package/src/meetings/day-source.ts +352 -0
  349. package/src/meetings/http-glue.ts +126 -0
  350. package/src/meetings/index.ts +5 -4
  351. package/src/meetings/manual-sync-flush.test.ts +72 -0
  352. package/src/meetings/mcp-tools.ts +65 -0
  353. package/src/meetings/memory-gen.test.ts +498 -0
  354. package/src/meetings/memory-gen.ts +549 -0
  355. package/src/meetings/memory-generator.ts +5 -0
  356. package/src/meetings/namespace-isolation.test.ts +159 -0
  357. package/src/meetings/service.test.ts +195 -0
  358. package/src/meetings/service.ts +157 -0
  359. package/src/meetings/summary-extractor.test.ts +287 -0
  360. package/src/meetings/summary-extractor.ts +264 -0
  361. package/src/orchestration/maintenance.ts +8 -0
  362. package/src/orchestration/orchestrator-init.ts +6 -1
  363. package/src/orchestration/workspace-ops.ts +172 -8
  364. package/src/orchestrator.ts +12 -13
  365. package/src/storage.ts +21 -0
  366. package/src/testing/subjects/meetings-namespace-harness.ts +159 -0
  367. package/src/testing/subjects/meetings-namespace.test.ts +93 -0
  368. package/src/types.ts +1 -2
  369. package/src/wearables/cli.ts +2 -1
  370. package/src/wearables/index.ts +1 -0
  371. package/src/wearables/mcp-tools.ts +143 -0
  372. package/src/wearables/registry.test.ts +11 -0
  373. package/src/wearables/registry.ts +13 -0
  374. package/src/wearables/service.test.ts +62 -1
  375. package/src/wearables/service.ts +30 -2
  376. package/src/wearables/transcript-search-namespace-isolation.test.ts +98 -0
  377. package/dist/chunk-4F6AANKS.js.map +0 -1
  378. package/dist/chunk-5IXPWEQB.js.map +0 -1
  379. package/dist/chunk-5RUE3GHQ.js.map +0 -1
  380. package/dist/chunk-62QM5MKY.js.map +0 -1
  381. package/dist/chunk-6NZ7U4R4.js.map +0 -1
  382. package/dist/chunk-AT3TDN6O.js.map +0 -1
  383. package/dist/chunk-EILX7SQR.js.map +0 -1
  384. package/dist/chunk-IC2TCZJ2.js.map +0 -1
  385. package/dist/chunk-KHRKEELC.js.map +0 -1
  386. package/dist/chunk-MONWCSVL.js.map +0 -1
  387. package/dist/chunk-SQEDDWAM.js.map +0 -1
  388. package/dist/chunk-TCZWBJBO.js.map +0 -1
  389. package/dist/chunk-V5TSUGRB.js.map +0 -1
  390. /package/dist/{auto-sync-UPTUVE4X.js.map → auto-sync-5OE5QOZB.js.map} +0 -0
  391. /package/dist/{chunk-Z54EM5YZ.js.map → chunk-2PHX3I5C.js.map} +0 -0
  392. /package/dist/{chunk-JFDEYXF7.js.map → chunk-3NAHZQU3.js.map} +0 -0
  393. /package/dist/{chunk-MJYYXODM.js.map → chunk-3UOSVTFR.js.map} +0 -0
  394. /package/dist/{chunk-HPOY2PHQ.js.map → chunk-3ZW6ZQO6.js.map} +0 -0
  395. /package/dist/{chunk-UV72DEZD.js.map → chunk-4B77XSG5.js.map} +0 -0
  396. /package/dist/{chunk-LMHDFOVV.js.map → chunk-5CPI2QWG.js.map} +0 -0
  397. /package/dist/{chunk-3ZUY2VQF.js.map → chunk-5FZQ74K5.js.map} +0 -0
  398. /package/dist/{chunk-B7C3TF5H.js.map → chunk-6TWXQ4E2.js.map} +0 -0
  399. /package/dist/{chunk-JN3IUA2Q.js.map → chunk-7I7AYIUQ.js.map} +0 -0
  400. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  401. /package/dist/{chunk-5JQLAQUZ.js.map → chunk-ATEAL5EI.js.map} +0 -0
  402. /package/dist/{chunk-4PYLBXX6.js.map → chunk-AYAROCWD.js.map} +0 -0
  403. /package/dist/{chunk-EXU5IQ3S.js.map → chunk-CUUY5CC4.js.map} +0 -0
  404. /package/dist/{chunk-X5QS5C2O.js.map → chunk-E3ZMFFQZ.js.map} +0 -0
  405. /package/dist/{chunk-JWMYVQAM.js.map → chunk-ES5IHQ6M.js.map} +0 -0
  406. /package/dist/{chunk-HJEEAO4O.js.map → chunk-G2NSSQES.js.map} +0 -0
  407. /package/dist/{chunk-QO2KODU6.js.map → chunk-GD3QOBMB.js.map} +0 -0
  408. /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
  409. /package/dist/{chunk-Q3FWRDCP.js.map → chunk-JNIJBXVK.js.map} +0 -0
  410. /package/dist/{chunk-N7EVMKP6.js.map → chunk-KNRG6ZGJ.js.map} +0 -0
  411. /package/dist/{chunk-GEUDRENF.js.map → chunk-MMTG3SCJ.js.map} +0 -0
  412. /package/dist/{chunk-WZFAPHIK.js.map → chunk-MU7ZHSZE.js.map} +0 -0
  413. /package/dist/{chunk-W4FBGYGK.js.map → chunk-NRV4Y3PM.js.map} +0 -0
  414. /package/dist/{chunk-275ENJDK.js.map → chunk-P2BLHUL2.js.map} +0 -0
  415. /package/dist/{chunk-LRGSLV7M.js.map → chunk-PYHOAXTI.js.map} +0 -0
  416. /package/dist/{chunk-EZKKHVFY.js.map → chunk-QE63OHLB.js.map} +0 -0
  417. /package/dist/{chunk-ONHRRJZM.js.map → chunk-QJAQNXWI.js.map} +0 -0
  418. /package/dist/{chunk-LI4ZOFHW.js.map → chunk-SVZGA2MK.js.map} +0 -0
  419. /package/dist/{chunk-53WDAG7X.js.map → chunk-WWZ35GWW.js.map} +0 -0
  420. /package/dist/{chunk-SB4OKS6C.js.map → chunk-ZN4UZWMT.js.map} +0 -0
  421. /package/dist/{chunk-7M6APKJL.js.map → chunk-ZYU7ZFLT.js.map} +0 -0
  422. /package/dist/{first-start-migration-LEXL3XYL.js.map → first-start-migration-BKNGOFED.js.map} +0 -0
@@ -0,0 +1,366 @@
1
+ import { au as ActivitySnapshot, av as ActivityConfig, aw as ActivitySourceConfig, ax as ActivitySourceClient, P as PluginConfig } from './types-Bbs0qz6b.js';
2
+ import { SearchBackend } from './search/port.js';
3
+ import { S as StorageManager } from './storage-XGawwqXE.js';
4
+ import { N as NamespaceCatalog } from './catalog-BFTVo2Ez.js';
5
+ import { NamespaceSearchRouter } from './namespaces/search.js';
6
+ import { BetterSqlite3Database } from './runtime/better-sqlite.js';
7
+
8
+ /**
9
+ * Screen-activity SQLite store (issue #1899).
10
+ *
11
+ * Durable, capture-machine-agnostic store for on-screen text snapshots plus a
12
+ * per-machine sync cursor. Mirrors the LCM store conventions
13
+ * (packages/remnic-core/src/lcm/schema.ts): WAL, a `<name>_meta` schema-version
14
+ * row, `CREATE TABLE IF NOT EXISTS`, and an FTS5 virtual table created
15
+ * separately. better-sqlite3 is synchronous.
16
+ *
17
+ * Snapshots dedup on `(machine, content_hash)` so a re-sync is idempotent, and
18
+ * day queries use half-open [start, end) UTC bounds (AGENTS.md §23).
19
+ */
20
+
21
+ declare function activityDatabasePath(memoryDir: string): string;
22
+ declare function ensureActivityStateDir(memoryDir: string): Promise<void>;
23
+ declare function openActivityDatabase(memoryDir: string): BetterSqlite3Database;
24
+ /** Apply the activity schema on an already-open handle (test/in-memory use). */
25
+ declare function applyActivitySchema(db: BetterSqlite3Database): void;
26
+ declare class ActivityStore {
27
+ private readonly db;
28
+ constructor(db: BetterSqlite3Database);
29
+ static open(memoryDir: string): ActivityStore;
30
+ /**
31
+ * Insert a snapshot, idempotent on (machine, captured_at_utc, content_hash):
32
+ * the same screen content recurring at a *different* time is kept; only an
33
+ * exact re-ingestion of the same capture dedups. Returns `inserted: false`
34
+ * for a duplicate. The FTS row is written only on a real insert (atomically),
35
+ * so it never drifts from the base table.
36
+ */
37
+ insertSnapshot(snapshot: ActivitySnapshot): {
38
+ inserted: boolean;
39
+ id: number;
40
+ };
41
+ /** Snapshots whose capture instant is in the half-open [start, end) window. */
42
+ listSnapshotsForDay(machine: string | null, startUtcInclusive: string, endUtcExclusive: string): ActivitySnapshot[];
43
+ getCursor(machine: string): string | null;
44
+ setCursor(machine: string, cursor: string | null, updatedAtUtc?: string): void;
45
+ /** Full-text search over snapshot text/app/window/url; newest first. */
46
+ searchSnapshots(query: string, limit: number): ActivitySnapshot[];
47
+ /** Retention: drop snapshots captured strictly before `cutoffUtc`. */
48
+ pruneOlderThan(cutoffUtc: string): number;
49
+ close(): void;
50
+ }
51
+
52
+ /**
53
+ * Host-agnostic activity sync runner (issue #1900).
54
+ *
55
+ * Bridges parsed `config.activity` to the durable sync pipeline: the parser
56
+ * (config.ts) validates settings but never contacts a daemon, and
57
+ * `syncActivitySource` (pipeline.ts) syncs one source for one day. This runner
58
+ * is the missing middle — it instantiates one `ActivityHttpSourceClient` per
59
+ * configured source from the parsed config and drives a sync across the
60
+ * `syncDays` local-day window, but ONLY when the feature is enabled.
61
+ *
62
+ * The feature is master default-off: source config alone never starts a sync.
63
+ * When `config.enabled` is false the runner opens no store, builds no client,
64
+ * and makes no HTTP call or write — it returns a disabled summary. This mirrors
65
+ * `runLiveConnectorsOnce`'s disabled-vs-result reporting so a host scheduler
66
+ * (CLI, cron) can trigger it through the runtime with no OpenClaw imports.
67
+ *
68
+ * Cursor semantics are delegated wholesale to `syncActivitySource`: the
69
+ * per-machine cursor advances only after every page and the digest are durable,
70
+ * so a runtime failure (or an aborted stop) leaves the cursor unadvanced and a
71
+ * restart resumes from the persisted position. A per-source failure is captured
72
+ * as an error item and never aborts the other sources or the host flow.
73
+ */
74
+
75
+ type ActivityNow = Date | (() => Date);
76
+ /** One configured source's aggregate result across the synced day window. */
77
+ interface ActivitySourceRunItem {
78
+ machineLabel: string;
79
+ /** True when at least one day synced durably (no error). */
80
+ ran: boolean;
81
+ fetched: number;
82
+ inserted: number;
83
+ duplicates: number;
84
+ digestsWritten: number;
85
+ /** Persisted cursor after the run; unadvanced from prior on failure. */
86
+ cursor: string | null;
87
+ /** Set when the source failed; distinguishes a fault from an empty page. */
88
+ error?: string;
89
+ /**
90
+ * Set when a durable day synced but its post-digest search reindex failed.
91
+ * The rows/digest/cursor are committed; the index is stale until the next
92
+ * refresh, so this is a signal (not a sync failure) for the scheduler.
93
+ */
94
+ reindexError?: string;
95
+ }
96
+ interface ActivitySyncRunSummary {
97
+ ranAt: string;
98
+ /** False means the feature is off: no client built, no HTTP, no write. */
99
+ enabled: boolean;
100
+ ranCount: number;
101
+ errorCount: number;
102
+ /** Sources whose durable sync succeeded but whose search reindex failed. */
103
+ reindexErrorCount: number;
104
+ totalInserted: number;
105
+ results: ActivitySourceRunItem[];
106
+ /**
107
+ * Local dates (YYYY-MM-DD, in the sync timezone) that gained new snapshots
108
+ * this run — a backfill/rolling window can touch several. Meetings rebuild
109
+ * uses this so a change to an OLDER day rebuilds that day, not just today.
110
+ */
111
+ touchedDates: string[];
112
+ }
113
+ interface ActivitySyncRunOptions {
114
+ config: ActivityConfig;
115
+ memoryDir: string;
116
+ /** Injectable store; opened from memoryDir when omitted (and closed here). */
117
+ store?: ActivityStore;
118
+ /** Clock injection for deterministic day-window resolution in tests. */
119
+ now?: ActivityNow;
120
+ /** Abort a run in flight (stop); an aborted source leaves its cursor intact. */
121
+ signal?: AbortSignal;
122
+ /** Injectable client factory; builds an ActivityHttpSourceClient by default. */
123
+ createSourceClient?: (source: ActivitySourceConfig) => ActivitySourceClient;
124
+ /**
125
+ * Search-index refresh forwarded to each source sync as `afterWrites`, run
126
+ * after a digest is (re)written so it becomes discoverable (rule 31).
127
+ * Host wires the core index seam (SearchBackend.update); best-effort.
128
+ */
129
+ reindexSearch?: (signal?: AbortSignal) => Promise<void>;
130
+ }
131
+ /**
132
+ * The local-day window to sync, oldest first: today back `syncDays` calendar
133
+ * days in the configured timezone. Walking by calendar days (not fixed 24h
134
+ * intervals) keeps the window correct across DST transitions.
135
+ */
136
+ declare function resolveActivitySyncDates(syncDays: number, timezone: string, now: Date): string[];
137
+ /**
138
+ * Run one activity sync pass across every configured source. Disabled config
139
+ * short-circuits before any store/client/HTTP work; an enabled config syncs
140
+ * each source across the `syncDays` window and isolates per-source faults.
141
+ */
142
+ declare function runActivitySyncOnce(options: ActivitySyncRunOptions): Promise<ActivitySyncRunSummary>;
143
+
144
+ /**
145
+ * Maintenance scheduler — extracted from the orchestrator (issue #1526 PR1).
146
+ *
147
+ * Owns the WHEN of memory maintenance:
148
+ * - cron auto-registration (writes jobs.json entries the OpenClaw cron
149
+ * daemon picks up)
150
+ * - debounced + singleflight QMD index maintenance (re-index + embed
151
+ * after writes)
152
+ * - consolidation scheduling trigger (count + interval gated)
153
+ *
154
+ * Does NOT own the WHAT — the actual job runners (runSemanticConsolidation,
155
+ * runPatternReinforcement, runDeepSleepGovernanceNow, runConsolidation)
156
+ * remain on the orchestrator because they need the full LLM + extraction
157
+ * dependency surface. The scheduler invokes consolidation through a
158
+ * callback so the orchestrator stays the source of truth for that work.
159
+ *
160
+ * Behavior-preserving move from orchestrator.ts. No logic changes — the
161
+ * orchestrator keeps thin delegating methods so existing tests that stub
162
+ * `orchestrator.requestQmdMaintenance` etc. continue to work.
163
+ */
164
+
165
+ /** Dependencies injected by the orchestrator. All stable references. */
166
+ interface MaintenanceSchedulerDeps {
167
+ config: PluginConfig;
168
+ /** Live accessor — the orchestrator can reassign its qmd backend after
169
+ * construction (e.g. swap to NoopSearchBackend when the collection is
170
+ * missing), and the scheduler must always observe the current backend. */
171
+ getQmd: () => SearchBackend;
172
+ namespaceSearchRouter: NamespaceSearchRouter;
173
+ namespaceCatalog: NamespaceCatalog;
174
+ /**
175
+ * Root storage (secure-store configured). Threaded so lifecycle-ledger
176
+ * auto-compaction (#1910) rebuilds through the live secure context: encrypted
177
+ * memories stay decryptable and the rewritten ledger stays encrypted at rest.
178
+ * Omitted in focused tests, where compaction falls back to a fresh plaintext
179
+ * StorageManager (the CLI-equivalent path).
180
+ */
181
+ getStorage?: () => StorageManager;
182
+ /**
183
+ * Resolve a namespace's (secure-store aware) storage. Threaded so
184
+ * auto-compaction also bounds per-namespace lifecycle ledgers under
185
+ * `memoryDir/namespaces/<token>/state/`, not just the root state path
186
+ * (#1910). Consulted only when namespaces are enabled.
187
+ */
188
+ storageForNamespace?: (namespace: string) => Promise<StorageManager>;
189
+ /**
190
+ * Tail step (issue #1900): observe a durable activity sync tick so the
191
+ * meetings builder can rebuild the affected day(s). Optional; omitted by
192
+ * hosts that do not build meetings.
193
+ */
194
+ onActivitySynced?: (summary: ActivitySyncRunSummary) => void;
195
+ }
196
+ /**
197
+ * Schedules and debounces memory maintenance work. Owns the cadence +
198
+ * singleflight state that previously lived as private orchestrator fields.
199
+ *
200
+ * The orchestrator constructs one instance in its constructor and delegates
201
+ * the public scheduling entrypoints to it. Job execution stays on the
202
+ * orchestrator (LLM-heavy) and is invoked through callbacks.
203
+ */
204
+ declare class MaintenanceScheduler {
205
+ private readonly deps;
206
+ private nonZeroExtractionsSinceConsolidation;
207
+ private lastConsolidationRunAtMs;
208
+ private consolidationInFlight;
209
+ private qmdMaintenanceTimer;
210
+ private qmdMaintenancePending;
211
+ private qmdMaintenanceInFlight;
212
+ private lastQmdEmbedAtMs;
213
+ private lastQmdEmbedAtMsByNamespace;
214
+ private lifecycleCompactionInFlight;
215
+ private lastLifecycleCompactionAtMs;
216
+ private lifecycleLedgerMaxBytes;
217
+ private readonly projectionRebuild;
218
+ private readonly activityRegistrar;
219
+ constructor(deps: MaintenanceSchedulerDeps);
220
+ /**
221
+ * Register every cron job the daemon should run, gated by its config flag.
222
+ * Each registration is independent and non-fatal — a failure in one does
223
+ * not block the others (mirrors the orchestrator's prior sequential try/
224
+ * catch behavior exactly).
225
+ *
226
+ * Returns when all eligible registrations have completed so callers that
227
+ * `await deferredReady` can rely on jobs.json being current.
228
+ */
229
+ autoRegisterCrons(signal: AbortSignal): Promise<void>;
230
+ autoRegisterDaySummaryCron(): Promise<void>;
231
+ autoRegisterNightlyGovernanceCron(): Promise<void>;
232
+ autoRegisterProceduralMiningCron(): Promise<void>;
233
+ autoRegisterContradictionScanCron(): Promise<void>;
234
+ autoRegisterPatternReinforcementCron(): Promise<void>;
235
+ autoRegisterGraphEdgeDecayCron(): Promise<void>;
236
+ /**
237
+ * Maybe trigger a background consolidation pass after an extraction.
238
+ * Counted + interval gated so a burst of extractions does not fan into a
239
+ * burst of consolidation passes. The consolidation runner itself is
240
+ * passed in as a callback because it lives on the orchestrator (LLM +
241
+ * storage dependency surface) and is not owned by this module.
242
+ */
243
+ maybeScheduleConsolidation(nonZeroExtraction: boolean, runConsolidation: () => Promise<unknown>): void;
244
+ /** Whether a background consolidation pass is currently running. Exposed so
245
+ * the orchestrator's waitForConsolidationIdle can poll idle state without
246
+ * owning the cadence state (issue #1526 PR1). */
247
+ isConsolidationInFlight(): boolean;
248
+ /** Whether a debounced QMD maintenance pass is armed and waiting for the
249
+ * debounce timer. Exposed so drain/teardown diagnostics (e.g. the bench
250
+ * adapter) can observe scheduler idle state after the #1526 PR1 extraction
251
+ * moved this flag off the orchestrator. */
252
+ isQmdMaintenancePending(): boolean;
253
+ /** Whether a QMD maintenance pass is currently running (singleflight guard).
254
+ * Exposed for drain/teardown diagnostics (see isQmdMaintenancePending). */
255
+ isQmdMaintenanceInFlight(): boolean;
256
+ /** Internal: queue a debounced QMD maintenance pass. */
257
+ private requestQmdMaintenance;
258
+ /**
259
+ * Public entrypoint for tool-driven QMD maintenance requests.
260
+ * Routes through existing debounced/singleflight maintenance controls.
261
+ */
262
+ requestQmdMaintenanceForTool(reason: string): void;
263
+ /** Internal: run a single QMD maintenance pass under singleflight guard. */
264
+ runQmdMaintenance(): Promise<void>;
265
+ /**
266
+ * Size-gated, throttled, single-flighted auto-compaction of the lifecycle
267
+ * ledger (issue #1910). Compacts the root ledger AND every namespace ledger
268
+ * (`memoryDir/namespaces/<token>/state/`) when namespaces are enabled, each
269
+ * through the existing `rebuildMemoryLifecycleLedger` so the
270
+ * archive-then-atomic-write discipline is reused verbatim. `0` disables.
271
+ *
272
+ * Before compacting, drain EVERY target's durable pending-append spill (the
273
+ * root ledger AND each namespace ledger) so a lifecycle event that spilled
274
+ * while a prior long rewrite held the lock is folded back into its ledger and
275
+ * cannot be silently lost (issue #2033). Draining is independent of both the
276
+ * compaction threshold and the min-interval throttle: targets are enumerated
277
+ * through the same safe (symlink/containment-checked) resolver and every
278
+ * eligible queue is drained BEFORE any throttle return, so a namespace spill
279
+ * created after the previous pass never waits out the whole interval.
280
+ * Encrypted-store safety is preserved — a keyed target drains through its
281
+ * secure StorageManager, a filesystem-fallback target only through a plaintext
282
+ * context that refuses encrypted ledgers/spills. Work stays bounded: one
283
+ * target enumeration plus a bounded per-queue drain.
284
+ *
285
+ * The min-interval throttle timestamp advances ONLY after real, fully
286
+ * successful compaction work: a failed OR deferred target leaves the throttle
287
+ * un-advanced so it stays eligible on the next maintenance pass, while
288
+ * `lifecycleCompactionInFlight` still prevents overlapping runs. A "deferred"
289
+ * target is oversized but could not be compacted because its encrypted ledger
290
+ * has no unlocked secure store — arming the throttle for it would suppress the
291
+ * retry of that still-oversized ledger for the whole interval (#2033).
292
+ *
293
+ * The min-interval throttle is bypassed for one case: an encrypted ledger
294
+ * already at/over the whole-file decrypt cap is unreadable, so it must be
295
+ * clamped on the next pass rather than wait out the interval. Ordinary
296
+ * below-cap (or plaintext) targets stay throttled (#2033).
297
+ */
298
+ private maybeCompactMemoryLifecycleLedger;
299
+ /**
300
+ * True when any lifecycle target's ledger is encrypted at rest AND its
301
+ * on-disk size is at/over the whole-file decrypt cap. Such a ledger is already
302
+ * unreadable (the secure reader refuses at/over the cap), so it must reach the
303
+ * bounded compaction path on the next maintenance pass regardless of the
304
+ * global min-interval throttle — otherwise the throttle could keep an
305
+ * unreadable ledger un-clamped for a whole interval (#2033). Ordinary
306
+ * below-cap or plaintext targets never match, so the throttle still governs
307
+ * them. A stat/probe failure yields "no forced target" and is left to the
308
+ * normal compaction path, which classifies it as failed and retries.
309
+ */
310
+ private hasOverCapEncryptedLifecycleLedger;
311
+ /**
312
+ * Drain one compaction target's durable pending spill. A catalog-backed
313
+ * target folds through its secure StorageManager; a filesystem-fallback
314
+ * target (no storage) folds through a path-scoped plaintext context that
315
+ * refuses encrypted ledgers/spills so a keyless drain never downgrades an
316
+ * encrypted ledger (issue #2033).
317
+ */
318
+ private drainPendingForTarget;
319
+ /** Drain a target's durable pending lifecycle-append spill into its ledger
320
+ * (issue #2033); non-fatal and a fast no-op when nothing is pending. */
321
+ private drainPendingLifecycleAppends;
322
+ /**
323
+ * Drain a filesystem-fallback target's pending lifecycle-append spill when no
324
+ * secure StorageManager is available (catalog-disabled namespace; issue
325
+ * #2033). Uses the safe path-scoped PLAINTEXT context this fallback already
326
+ * operates in: a keyless drain can only fold plaintext spills into a plaintext
327
+ * ledger, so it refuses when the ledger or ANY spill is encrypted at rest,
328
+ * leaving those pending for a keyed (catalog-path) drain — exactly mirroring
329
+ * the fallback compaction's encrypted-ledger deferral. Non-fatal; a fast
330
+ * no-op when nothing is pending. The shared spill lister enforces the symlink/
331
+ * containment guard on every spill file it reads or deletes.
332
+ */
333
+ private drainPendingLifecycleAppendsForPath;
334
+ /**
335
+ * Enumerate the lifecycle ledgers to consider for compaction: the root
336
+ * (through the secure-configured root storage when available) plus every
337
+ * cataloged namespace ledger when namespaces are enabled. Deduplicated by
338
+ * resolved storage dir so a namespace that collapses onto the root is not
339
+ * compacted twice. Namespace resolution failures are non-fatal.
340
+ */
341
+ private resolveLifecycleCompactionTargets;
342
+ /**
343
+ * Compact one lifecycle ledger when it is at/over `threshold`. Returns
344
+ * `"skipped"` (absent or below threshold — nothing to do), `"compacted"`
345
+ * (rewritten and verified under the read/decrypt cap), `"failed"`
346
+ * (rebuild/probe threw, or the rewritten ledger is STILL over the cap — an
347
+ * ineffective compaction — non-fatal, retried next pass), or `"deferred"`
348
+ * (oversized but its encrypted ledger cannot be rewritten because no unlocked
349
+ * secure store is available — real work still pending, so the caller must NOT
350
+ * arm the throttle). #2033: a deferred/failed target is distinct from a genuine
351
+ * no-op so one namespace compacting cannot suppress retries for another, and
352
+ * an over-cap rewrite never arms the throttle.
353
+ */
354
+ private compactLifecycleLedgerTarget;
355
+ /** Build the namespace-aware maintenance plan for one job. */
356
+ private namespaceMaintenancePlan;
357
+ /**
358
+ * Clear any pending debounce timer and drain the activity sync scheduler.
359
+ * Called from the orchestrator's destroy() so a late tick does not fire on a
360
+ * torn-down instance and no in-flight activity tick keeps writing after
361
+ * teardown. Async: awaits the scheduler's abort+drain before resolving.
362
+ */
363
+ dispose(): Promise<void>;
364
+ }
365
+
366
+ export { ActivityStore as A, MaintenanceScheduler as M, type ActivitySyncRunSummary as a, type ActivitySourceRunItem as b, type ActivitySyncRunOptions as c, activityDatabasePath as d, applyActivitySchema as e, ensureActivityStateDir as f, runActivitySyncOnce as g, type MaintenanceSchedulerDeps as h, openActivityDatabase as o, resolveActivitySyncDates as r };
@@ -1,17 +1,17 @@
1
- import { x as EngramAccessRecallResponse } from './access-service-BqUii7LY.js';
1
+ import { x as EngramAccessRecallResponse } from './access-service-CKEROeFP.js';
2
2
  import { ActionConfidenceRequest } from './access-schema.js';
3
3
  import { RecallXraySnapshot } from './recall-xray.js';
4
4
  import { ActionConfidenceResult } from './action-confidence.js';
5
- import './catalog-iWvWz61I.js';
6
- import './types-GBQZuT7l.js';
5
+ import './catalog-BFTVo2Ez.js';
6
+ import './types-Bbs0qz6b.js';
7
7
  import './message-parts/index.js';
8
8
  import './bounded-jsonl-state.js';
9
9
  import './types-continuity.js';
10
- import './access-namespace-preflight-tmwQgCT6.js';
10
+ import './access-namespace-preflight-CmErR03h.js';
11
11
  import './access-token-capabilities.js';
12
12
  import 'node:async_hooks';
13
- import './scope-profiles-KG2nODX7.js';
14
- import './storage-BKhHHnRo.js';
13
+ import './scope-profiles-EhyuAKkd.js';
14
+ import './storage-XGawwqXE.js';
15
15
  import './page-versioning.js';
16
16
  import './consolidation-operator.js';
17
17
  import './memory-projection-store.js';
@@ -30,7 +30,7 @@ import './user-model.js';
30
30
  import './access-citation.js';
31
31
  import './recall-audit-anomaly.js';
32
32
  import './recall-audit.js';
33
- import './orchestrator-DB93S48I.js';
33
+ import './orchestrator-C9ZVppNh.js';
34
34
  import './briefing.js';
35
35
  import './buffer.js';
36
36
  import './extraction-faithfulness.js';
@@ -41,7 +41,7 @@ import './resolve-provider-secret.js';
41
41
  import './transcript.js';
42
42
  import './session-integrity.js';
43
43
  import './summarizer.js';
44
- import './orchestration/maintenance.js';
44
+ import './maintenance-C98njYb8.js';
45
45
  import './namespaces/search.js';
46
46
  import './compounding/engine.js';
47
47
  import './shared-context/manager.js';
@@ -51,13 +51,14 @@ import './utility-runtime.js';
51
51
  import './tier-routing.js';
52
52
  import './lifecycle.js';
53
53
  import './orchestration/compression-guideline-coordinator.js';
54
- import './semantic-consolidation-BaZlg0D8.js';
54
+ import './semantic-consolidation-B2xo26UQ.js';
55
55
  import './connectors/codex-materialize.js';
56
56
  import './logger.js';
57
57
  import './embedding-fallback.js';
58
58
  import './extraction.js';
59
59
  import './schemas.js';
60
60
  import './profiling.js';
61
+ import './extraction-error-classification.js';
61
62
  import './objective-state.js';
62
63
  import './causal-trajectory.js';
63
64
  import './trust-zones.js';
@@ -84,6 +85,7 @@ import './negative.js';
84
85
  import './session-observer-state.js';
85
86
  import './semantic-TddhF0y7.js';
86
87
  import './replay/types.js';
88
+ import './service-DgFWlZ-r.js';
87
89
  import './extraction-judge.js';
88
90
  import './lcm/engine.js';
89
91
  import './lcm/archive.js';
@@ -94,6 +96,7 @@ import './lcm/queue.js';
94
96
  import './policy-runtime.js';
95
97
  import './explicit-capture.js';
96
98
  import './cross-namespace-budget.js';
99
+ import './access-wearables-meetings-surface.js';
97
100
  import './graph-snapshot.js';
98
101
  import './memory-worth-outcomes.js';
99
102
  import './transfer/capsule-import.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MCP_READ_ONLY_TOOL_SUFFIXES
3
- } from "./chunk-IC2TCZJ2.js";
3
+ } from "./chunk-57QKLRBV.js";
4
4
  import "./chunk-PZ5AY32C.js";
5
5
  export {
6
6
  MCP_READ_ONLY_TOOL_SUFFIXES
@@ -1,4 +1,4 @@
1
- import { aa as MemoryActionType, aj as MemoryActionEligibilityContext, ak as MemoryActionPolicyResult } from './types-GBQZuT7l.js';
1
+ import { aa as MemoryActionType, aj as MemoryActionEligibilityContext, ak as MemoryActionPolicyResult } from './types-Bbs0qz6b.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './types-continuity.js';
@@ -1,4 +1,4 @@
1
- import { M as MemoryFile, E as EntityFile } from './types-GBQZuT7l.js';
1
+ import { M as MemoryFile, E as EntityFile } from './types-Bbs0qz6b.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './types-continuity.js';
@@ -1,4 +1,4 @@
1
- import { al as MemoryLifecycleEventType, M as MemoryFile, z as MemoryLifecycleEvent, o as MemoryFrontmatter, x as MemoryStatus, am as MemoryLifecycleStateSummary } from './types-GBQZuT7l.js';
1
+ import { al as MemoryLifecycleEventType, M as MemoryFile, z as MemoryLifecycleEvent, o as MemoryFrontmatter, x as MemoryStatus, am as MemoryLifecycleStateSummary } from './types-Bbs0qz6b.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './types-continuity.js';
@@ -1,5 +1,5 @@
1
1
  import { MemoryGovernanceReviewQueueEntry, MemoryGovernanceAppliedAction, MemoryGovernanceSummary, MemoryGovernanceMetrics } from './maintenance/memory-governance.js';
2
- import { w as MemoryCategory, x as MemoryStatus, y as MemoryProjectionCurrentState, z as MemoryLifecycleEvent } from './types-GBQZuT7l.js';
2
+ import { w as MemoryCategory, x as MemoryStatus, y as MemoryProjectionCurrentState, z as MemoryLifecycleEvent } from './types-Bbs0qz6b.js';
3
3
  import { openBetterSqlite3, BetterSqlite3Database } from './runtime/better-sqlite.js';
4
4
  import './message-parts/index.js';
5
5
  import './bounded-jsonl-state.js';
@@ -1,4 +1,4 @@
1
- import { x as MemoryStatus, X as LifecycleState, Y as VerificationState, Z as PolicyClass, o as MemoryFrontmatter, M as MemoryFile } from './types-GBQZuT7l.js';
1
+ import { x as MemoryStatus, W as LifecycleState, X as VerificationState, Y as PolicyClass, o as MemoryFrontmatter, M as MemoryFile } from './types-Bbs0qz6b.js';
2
2
  import { UserContextScope } from './user-model.js';
3
3
  import './message-parts/index.js';
4
4
  import './bounded-jsonl-state.js';
@@ -1,5 +1,5 @@
1
- import { S as StorageManager } from './storage-BKhHHnRo.js';
2
- import { o as MemoryFrontmatter } from './types-GBQZuT7l.js';
1
+ import { S as StorageManager } from './storage-XGawwqXE.js';
2
+ import { o as MemoryFrontmatter } from './types-Bbs0qz6b.js';
3
3
  import './page-versioning.js';
4
4
  import './consolidation-operator.js';
5
5
  import './memory-projection-store.js';
@@ -1,4 +1,4 @@
1
- import { an as ModelProviderConfig } from './types-GBQZuT7l.js';
1
+ import { an as ModelProviderConfig } from './types-Bbs0qz6b.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './types-continuity.js';
@@ -1,10 +1,10 @@
1
1
  import { rename } from 'node:fs/promises';
2
- import { P as PluginConfig } from '../types-GBQZuT7l.js';
2
+ import { P as PluginConfig } from '../types-Bbs0qz6b.js';
3
3
  import { NamespaceStorageRouter } from './storage.js';
4
4
  import '../message-parts/index.js';
5
5
  import '../bounded-jsonl-state.js';
6
6
  import '../types-continuity.js';
7
- import '../storage-BKhHHnRo.js';
7
+ import '../storage-XGawwqXE.js';
8
8
  import '../page-versioning.js';
9
9
  import '../consolidation-operator.js';
10
10
  import '../memory-projection-store.js';
@@ -13,7 +13,7 @@ import '../runtime/better-sqlite.js';
13
13
  import 'better-sqlite3';
14
14
  import '../write-envelope.js';
15
15
  import '../structured-attributes.js';
16
- import '../catalog-iWvWz61I.js';
16
+ import '../catalog-BFTVo2Ez.js';
17
17
 
18
18
  interface NamespaceInventoryEntry {
19
19
  namespace: string;
@@ -2,37 +2,37 @@ import {
2
2
  listNamespaces,
3
3
  runNamespaceMigration,
4
4
  verifyNamespaces
5
- } from "../chunk-JN3IUA2Q.js";
6
- import "../chunk-QO2KODU6.js";
7
- import "../chunk-SB4OKS6C.js";
8
- import "../chunk-MJYYXODM.js";
5
+ } from "../chunk-7I7AYIUQ.js";
6
+ import "../chunk-GD3QOBMB.js";
7
+ import "../chunk-ZN4UZWMT.js";
8
+ import "../chunk-3UOSVTFR.js";
9
+ import "../chunk-BLAKS3CP.js";
10
+ import "../chunk-S2BBISHU.js";
9
11
  import "../chunk-CYEPCZN5.js";
10
12
  import "../chunk-ES36HTSC.js";
11
13
  import "../chunk-3Y224NYC.js";
12
- import "../chunk-QH6CS6XJ.js";
13
- import "../chunk-BLAKS3CP.js";
14
- import "../chunk-S2BBISHU.js";
15
14
  import "../chunk-W7IGLX4G.js";
15
+ import "../chunk-QH6CS6XJ.js";
16
16
  import "../chunk-CINZGPSJ.js";
17
17
  import "../chunk-227UFSEQ.js";
18
18
  import "../chunk-ET356KSB.js";
19
19
  import "../chunk-72A4L5JJ.js";
20
20
  import "../chunk-A7Q43EUZ.js";
21
- import "../chunk-ONHRRJZM.js";
21
+ import "../chunk-QJAQNXWI.js";
22
22
  import "../chunk-YV32N67O.js";
23
- import "../chunk-IUM3VSHI.js";
24
23
  import "../chunk-64UDOIMI.js";
24
+ import "../chunk-IUM3VSHI.js";
25
25
  import "../chunk-O75CRYGF.js";
26
26
  import "../chunk-3ONXXHQO.js";
27
- import "../chunk-4F6AANKS.js";
28
- import "../chunk-UHVXE24Y.js";
27
+ import "../chunk-XWPFZX6S.js";
29
28
  import "../chunk-2QMKMVHH.js";
29
+ import "../chunk-UHVXE24Y.js";
30
30
  import "../chunk-DEBHXHJR.js";
31
31
  import "../chunk-DNHVPZOD.js";
32
32
  import "../chunk-6CIAGZ6X.js";
33
33
  import "../chunk-J6A3CX5N.js";
34
34
  import "../chunk-HKF5VASQ.js";
35
- import "../chunk-6NZ7U4R4.js";
35
+ import "../chunk-SCOT5DTA.js";
36
36
  import "../chunk-XKGPIWGI.js";
37
37
  import "../chunk-EGGE52UU.js";
38
38
  import "../chunk-GCASGYIO.js";
@@ -41,13 +41,13 @@ import "../chunk-ILGC6JH6.js";
41
41
  import "../chunk-SCU65EZI.js";
42
42
  import "../chunk-3CSX3ETE.js";
43
43
  import "../chunk-RL6NEVXT.js";
44
- import "../chunk-DM2T26WE.js";
45
44
  import "../chunk-LDXUBPMO.js";
45
+ import "../chunk-DM2T26WE.js";
46
+ import "../chunk-JYIJNNN3.js";
47
+ import "../chunk-AAD2ZS6P.js";
46
48
  import "../chunk-CGASUJVP.js";
47
49
  import "../chunk-R3DJVOSM.js";
48
50
  import "../chunk-BT7NVCML.js";
49
- import "../chunk-JYIJNNN3.js";
50
- import "../chunk-AAD2ZS6P.js";
51
51
  import "../chunk-G7D6GZ5J.js";
52
52
  import "../chunk-5VQJBH2G.js";
53
53
  import "../chunk-AITCS2RC.js";
@@ -61,18 +61,18 @@ import "../chunk-L2EXJQJP.js";
61
61
  import "../chunk-45GF7Y3V.js";
62
62
  import "../chunk-RGMVMVMF.js";
63
63
  import "../chunk-N7RWREIQ.js";
64
+ import "../chunk-BJMBJZ2Y.js";
65
+ import "../chunk-UKJAGEXH.js";
66
+ import "../chunk-FP2373TW.js";
64
67
  import "../chunk-5I4M26Q7.js";
65
68
  import "../chunk-4DJQYKMN.js";
66
69
  import "../chunk-5GKPFL3S.js";
67
70
  import "../chunk-PQVCH2AE.js";
68
71
  import "../chunk-EYIEWJNI.js";
69
72
  import "../chunk-JUC24CTX.js";
73
+ import "../chunk-P7FMDTKL.js";
70
74
  import "../chunk-6MKAMLQL.js";
71
75
  import "../chunk-JAKIDQB2.js";
72
- import "../chunk-BJMBJZ2Y.js";
73
- import "../chunk-UKJAGEXH.js";
74
- import "../chunk-FP2373TW.js";
75
- import "../chunk-P7FMDTKL.js";
76
76
  import "../chunk-U3PN77QT.js";
77
77
  import "../chunk-RDQGLJRR.js";
78
78
  import "../chunk-PVGDJXVK.js";
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig } from '../types-GBQZuT7l.js';
1
+ import { P as PluginConfig } from '../types-Bbs0qz6b.js';
2
2
  import '../message-parts/index.js';
3
3
  import '../bounded-jsonl-state.js';
4
4
  import '../types-continuity.js';
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig, Q as QmdSearchResult } from '../types-GBQZuT7l.js';
1
+ import { P as PluginConfig, Q as QmdSearchResult } from '../types-Bbs0qz6b.js';
2
2
  import { SearchBackend, SearchQueryOptions, SearchExecutionOptions } from '../search/port.js';
3
3
  import '../message-parts/index.js';
4
4
  import '../bounded-jsonl-state.js';
@@ -2,24 +2,24 @@ import {
2
2
  NamespaceSearchRouter,
3
3
  namespaceCollectionName,
4
4
  normalizeQmdResultPath
5
- } from "../chunk-SB4OKS6C.js";
6
- import "../chunk-MJYYXODM.js";
5
+ } from "../chunk-ZN4UZWMT.js";
6
+ import "../chunk-3UOSVTFR.js";
7
+ import "../chunk-BLAKS3CP.js";
8
+ import "../chunk-S2BBISHU.js";
7
9
  import "../chunk-CYEPCZN5.js";
8
10
  import "../chunk-ES36HTSC.js";
9
11
  import "../chunk-3Y224NYC.js";
10
- import "../chunk-QH6CS6XJ.js";
11
- import "../chunk-BLAKS3CP.js";
12
- import "../chunk-S2BBISHU.js";
13
12
  import "../chunk-W7IGLX4G.js";
13
+ import "../chunk-QH6CS6XJ.js";
14
14
  import "../chunk-CINZGPSJ.js";
15
15
  import "../chunk-227UFSEQ.js";
16
16
  import "../chunk-ET356KSB.js";
17
17
  import "../chunk-72A4L5JJ.js";
18
18
  import "../chunk-A7Q43EUZ.js";
19
- import "../chunk-ONHRRJZM.js";
19
+ import "../chunk-QJAQNXWI.js";
20
20
  import "../chunk-YV32N67O.js";
21
- import "../chunk-IUM3VSHI.js";
22
21
  import "../chunk-64UDOIMI.js";
22
+ import "../chunk-IUM3VSHI.js";
23
23
  import "../chunk-O75CRYGF.js";
24
24
  import "../chunk-3ONXXHQO.js";
25
25
  import "../chunk-EGGE52UU.js";