@remnic/core 9.22.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 (399) hide show
  1. package/dist/access-admin-ops-surface.d.ts +15 -12
  2. package/dist/access-admin-ops-surface.js +25 -24
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-boundary.d.ts +13 -10
  5. package/dist/access-boundary.js +25 -24
  6. package/dist/access-cli.js +84 -82
  7. package/dist/access-cli.js.map +1 -1
  8. package/dist/access-http.d.ts +16 -9
  9. package/dist/access-http.js +33 -32
  10. package/dist/access-identity-continuity-surface.d.ts +9 -7
  11. package/dist/access-identity-continuity-surface.js +25 -24
  12. package/dist/access-lcm-surface.d.ts +12 -9
  13. package/dist/access-lcm-surface.js +25 -24
  14. package/dist/access-mcp-output-schemas.js +1 -1
  15. package/dist/access-mcp.d.ts +22 -10
  16. package/dist/access-mcp.js +31 -30
  17. package/dist/access-memory-search-fanout.d.ts +2 -2
  18. package/dist/{access-namespace-preflight-tmwQgCT6.d.ts → access-namespace-preflight-CmErR03h.d.ts} +1 -1
  19. package/dist/access-namespace-preflight.d.ts +3 -3
  20. package/dist/access-namespace-preflight.js +25 -24
  21. package/dist/access-observe-write-surface.d.ts +12 -9
  22. package/dist/access-observe-write-surface.js +25 -24
  23. package/dist/access-operations-batch.js +27 -26
  24. package/dist/access-operations.d.ts +13 -10
  25. package/dist/access-operations.js +28 -27
  26. package/dist/access-recall-concurrency.d.ts +12 -9
  27. package/dist/access-recall-concurrency.js +25 -24
  28. package/dist/access-recall-response.d.ts +12 -9
  29. package/dist/access-recall-response.js +25 -24
  30. package/dist/access-recall-surface.d.ts +14 -11
  31. package/dist/access-recall-surface.js +25 -24
  32. package/dist/{access-service-BtxW52vv.d.ts → access-service-CKEROeFP.d.ts} +22 -11
  33. package/dist/access-service.d.ts +13 -10
  34. package/dist/access-service.js +25 -24
  35. package/dist/access-surface-catalog.d.ts +12 -9
  36. package/dist/access-surface-catalog.js +6 -0
  37. package/dist/access-surface-catalog.js.map +1 -1
  38. package/dist/access-wearables-meetings-surface.d.ts +78 -0
  39. package/dist/access-wearables-meetings-surface.js +22 -0
  40. package/dist/access-wearables-meetings-surface.js.map +1 -0
  41. package/dist/action-confidence.d.ts +1 -1
  42. package/dist/active-memory-bridge.d.ts +1 -1
  43. package/dist/active-recall.d.ts +1 -1
  44. package/dist/active-recall.js +2 -2
  45. package/dist/{auto-sync-UPTUVE4X.js → auto-sync-5OE5QOZB.js} +3 -3
  46. package/dist/behavior-learner.d.ts +1 -1
  47. package/dist/behavior-signals.d.ts +1 -1
  48. package/dist/bootstrap.d.ts +9 -7
  49. package/dist/briefing.d.ts +2 -2
  50. package/dist/briefing.js +5 -5
  51. package/dist/buffer-surprise-report.d.ts +1 -1
  52. package/dist/buffer.d.ts +2 -2
  53. package/dist/bulk-import/index.d.ts +3 -3
  54. package/dist/calibration.d.ts +1 -1
  55. package/dist/capabilities.d.ts +1 -1
  56. package/dist/{catalog-iWvWz61I.d.ts → catalog-BFTVo2Ez.d.ts} +1 -1
  57. package/dist/causal-behavior.d.ts +1 -1
  58. package/dist/causal-behavior.js +2 -2
  59. package/dist/causal-chain.js +2 -2
  60. package/dist/causal-consolidation.d.ts +1 -1
  61. package/dist/causal-consolidation.js +9 -9
  62. package/dist/causal-retrieval.js +2 -2
  63. package/dist/causal-trajectory-graph.d.ts +1 -1
  64. package/dist/causal-trajectory.js +1 -1
  65. package/dist/{chunk-GF22HWS2.js → chunk-2PHX3I5C.js} +7 -7
  66. package/dist/{chunk-JFDEYXF7.js → chunk-3NAHZQU3.js} +2 -2
  67. package/dist/{chunk-XBRPEGXF.js → chunk-3UOSVTFR.js} +5 -5
  68. package/dist/{chunk-TTKWTT72.js → chunk-3ZW6ZQO6.js} +3 -3
  69. package/dist/{chunk-UV72DEZD.js → chunk-4B77XSG5.js} +5 -5
  70. package/dist/{chunk-IC2TCZJ2.js → chunk-57QKLRBV.js} +3 -1
  71. package/dist/chunk-57QKLRBV.js.map +1 -0
  72. package/dist/{chunk-LMHDFOVV.js → chunk-5CPI2QWG.js} +3 -3
  73. package/dist/{chunk-P72WZMWQ.js → chunk-5FZQ74K5.js} +2 -2
  74. package/dist/{chunk-BRT7KEXU.js → chunk-6TWXQ4E2.js} +5 -5
  75. package/dist/{chunk-CV6ZYXK3.js → chunk-7I7AYIUQ.js} +3 -3
  76. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  77. package/dist/{chunk-MONWCSVL.js → chunk-7RAJ3GXO.js} +2 -1
  78. package/dist/chunk-7RAJ3GXO.js.map +1 -0
  79. package/dist/{chunk-SQEDDWAM.js → chunk-A2RFKL3V.js} +5 -34
  80. package/dist/chunk-A2RFKL3V.js.map +1 -0
  81. package/dist/{chunk-JN57HZCD.js → chunk-ATEAL5EI.js} +6 -6
  82. package/dist/{chunk-4PYLBXX6.js → chunk-AYAROCWD.js} +2 -2
  83. package/dist/chunk-BLDBT6HZ.js +39 -0
  84. package/dist/chunk-BLDBT6HZ.js.map +1 -0
  85. package/dist/{chunk-NB2P47N7.js → chunk-CUUY5CC4.js} +6 -6
  86. package/dist/{chunk-KL5Y6PEV.js → chunk-E3ZMFFQZ.js} +2 -2
  87. package/dist/{chunk-55FDQYPS.js → chunk-ES5IHQ6M.js} +2 -2
  88. package/dist/{chunk-N47ZWQBO.js → chunk-G2NSSQES.js} +2 -2
  89. package/dist/{chunk-GSWPU5CR.js → chunk-GD3QOBMB.js} +2 -2
  90. package/dist/{chunk-6ANPNUVL.js → chunk-IIXLB5E7.js} +58 -36
  91. package/dist/chunk-IIXLB5E7.js.map +1 -0
  92. package/dist/{chunk-SACPRJ7F.js → chunk-JNIJBXVK.js} +2 -2
  93. package/dist/{chunk-W3XT32W7.js → chunk-JVGUY2AU.js} +23 -13
  94. package/dist/chunk-JVGUY2AU.js.map +1 -0
  95. package/dist/{chunk-DGLON3AL.js → chunk-KNRG6ZGJ.js} +6 -6
  96. package/dist/{chunk-GEUDRENF.js → chunk-MMTG3SCJ.js} +2 -2
  97. package/dist/{chunk-WZFAPHIK.js → chunk-MU7ZHSZE.js} +2 -2
  98. package/dist/{chunk-W4FBGYGK.js → chunk-NRV4Y3PM.js} +1 -1
  99. package/dist/{chunk-QTO2FGBT.js → chunk-OUW4PAY4.js} +191 -117
  100. package/dist/chunk-OUW4PAY4.js.map +1 -0
  101. package/dist/{chunk-KQ2XCQYN.js → chunk-P2BLHUL2.js} +2 -2
  102. package/dist/{chunk-ACGGTPU4.js → chunk-QCKQEBIY.js} +17 -9
  103. package/dist/chunk-QCKQEBIY.js.map +1 -0
  104. package/dist/{chunk-6L775BUB.js → chunk-QE63OHLB.js} +2 -2
  105. package/dist/{chunk-ONHRRJZM.js → chunk-QJAQNXWI.js} +6 -6
  106. package/dist/{chunk-EQYBHXRR.js → chunk-ROUL7RZU.js} +385 -59
  107. package/dist/chunk-ROUL7RZU.js.map +1 -0
  108. package/dist/{chunk-N6M7MRVN.js → chunk-RT4TSR2C.js} +9034 -8726
  109. package/dist/chunk-RT4TSR2C.js.map +1 -0
  110. package/dist/{chunk-6NZ7U4R4.js → chunk-SCOT5DTA.js} +1 -1
  111. package/dist/chunk-SCOT5DTA.js.map +1 -0
  112. package/dist/{chunk-6RYWNBSA.js → chunk-SVZGA2MK.js} +2 -2
  113. package/dist/chunk-SYOIVK7K.js +63 -0
  114. package/dist/chunk-SYOIVK7K.js.map +1 -0
  115. package/dist/{chunk-DM5A4ZFL.js → chunk-TWCOYET2.js} +11 -1
  116. package/dist/chunk-TWCOYET2.js.map +1 -0
  117. package/dist/{chunk-7S5OMI76.js → chunk-WS32QRLO.js} +109 -44
  118. package/dist/chunk-WS32QRLO.js.map +1 -0
  119. package/dist/{chunk-OCMLGND7.js → chunk-WWZ35GWW.js} +5 -5
  120. package/dist/{chunk-QMGIQUBG.js → chunk-XWPFZX6S.js} +503 -139
  121. package/dist/chunk-XWPFZX6S.js.map +1 -0
  122. package/dist/{chunk-A5N6ISRK.js → chunk-ZN4UZWMT.js} +2 -2
  123. package/dist/{chunk-7M6APKJL.js → chunk-ZYU7ZFLT.js} +2 -2
  124. package/dist/{cli-D9vXgWwM.d.ts → cli-BrwT9YMD.d.ts} +5 -5
  125. package/dist/cli.d.ts +14 -11
  126. package/dist/cli.js +57 -56
  127. package/dist/compounding/engine.d.ts +2 -2
  128. package/dist/compounding/engine.js +5 -5
  129. package/dist/compounding/preference-consolidator.d.ts +1 -1
  130. package/dist/compression-optimizer.d.ts +1 -1
  131. package/dist/config.d.ts +1 -1
  132. package/dist/config.js +2 -2
  133. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  134. package/dist/connectors/codex-materialize-runner.js +5 -5
  135. package/dist/connectors/codex-materialize.d.ts +1 -1
  136. package/dist/connectors/index.d.ts +1 -1
  137. package/dist/connectors/index.js +5 -5
  138. package/dist/consolidation-provenance-check.d.ts +2 -2
  139. package/dist/consolidation-undo.d.ts +2 -2
  140. package/dist/contradiction/index.d.ts +2 -2
  141. package/dist/conversation-index/backend.d.ts +1 -1
  142. package/dist/conversation-index/chunker.d.ts +1 -1
  143. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  144. package/dist/conversation-index/indexer.d.ts +1 -1
  145. package/dist/conversation-index/search.d.ts +1 -1
  146. package/dist/day-summary.d.ts +1 -1
  147. package/dist/delinearize.d.ts +1 -1
  148. package/dist/direct-answer-wiring.d.ts +1 -1
  149. package/dist/direct-answer.d.ts +1 -1
  150. package/dist/embedding-fallback.d.ts +1 -1
  151. package/dist/enrichment/index.d.ts +1 -1
  152. package/dist/entity-retrieval.d.ts +2 -2
  153. package/dist/entity-retrieval.js +5 -5
  154. package/dist/entity-schema.d.ts +1 -1
  155. package/dist/explicit-capture.d.ts +9 -7
  156. package/dist/extraction-error-classification.d.ts +22 -0
  157. package/dist/extraction-error-classification.js +11 -0
  158. package/dist/extraction-error-classification.js.map +1 -0
  159. package/dist/extraction-faithfulness.d.ts +1 -1
  160. package/dist/extraction-judge-telemetry.d.ts +1 -1
  161. package/dist/extraction-judge-training.d.ts +1 -1
  162. package/dist/extraction-judge.d.ts +1 -1
  163. package/dist/extraction.d.ts +3 -17
  164. package/dist/extraction.js +5 -3
  165. package/dist/fallback-llm.d.ts +1 -1
  166. package/dist/{first-start-migration-LEXL3XYL.js → first-start-migration-BKNGOFED.js} +4 -4
  167. package/dist/graph-dashboard-diff.d.ts +1 -1
  168. package/dist/graph-dashboard-key.d.ts +1 -1
  169. package/dist/graph-dashboard-parser.d.ts +1 -1
  170. package/dist/graph-edge-reinforcement.d.ts +1 -1
  171. package/dist/graph-snapshot.d.ts +1 -1
  172. package/dist/graph.d.ts +1 -1
  173. package/dist/importance.d.ts +1 -1
  174. package/dist/importers/index.d.ts +1 -1
  175. package/dist/in-flight-reads.d.ts +1 -1
  176. package/dist/index.d.ts +309 -519
  177. package/dist/index.js +176 -140
  178. package/dist/intent.d.ts +1 -1
  179. package/dist/lcm/engine.d.ts +1 -1
  180. package/dist/lcm/engine.js +3 -3
  181. package/dist/lcm/index.d.ts +1 -1
  182. package/dist/lcm/index.js +11 -11
  183. package/dist/lcm/tools.d.ts +1 -1
  184. package/dist/lifecycle.d.ts +1 -1
  185. package/dist/live-connectors-runner.d.ts +1 -1
  186. package/dist/local-llm.d.ts +1 -1
  187. package/dist/local-model-endpoint.d.ts +1 -1
  188. package/dist/maintenance/memory-governance.d.ts +1 -1
  189. package/dist/maintenance/memory-governance.js +6 -6
  190. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  191. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
  192. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  193. package/dist/maintenance/rebuild-memory-projection.js +7 -7
  194. package/dist/maintenance-C98njYb8.d.ts +366 -0
  195. package/dist/mcp-memory-inspector-app.d.ts +12 -9
  196. package/dist/mcp-read-only-tools.js +1 -1
  197. package/dist/memory-action-policy.d.ts +1 -1
  198. package/dist/memory-cache.d.ts +1 -1
  199. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  200. package/dist/memory-projection-store.d.ts +1 -1
  201. package/dist/memory-provenance.d.ts +1 -1
  202. package/dist/memory-worth-outcomes.d.ts +2 -2
  203. package/dist/models-json.d.ts +1 -1
  204. package/dist/namespaces/migrate.d.ts +3 -3
  205. package/dist/namespaces/migrate.js +12 -12
  206. package/dist/namespaces/principal.d.ts +1 -1
  207. package/dist/namespaces/search.d.ts +1 -1
  208. package/dist/namespaces/search.js +6 -6
  209. package/dist/namespaces/storage.d.ts +3 -3
  210. package/dist/namespaces/storage.js +5 -5
  211. package/dist/native-knowledge.d.ts +1 -1
  212. package/dist/offline-sync-impression-drain.d.ts +1 -1
  213. package/dist/operator-toolkit.d.ts +2 -2
  214. package/dist/operator-toolkit.js +18 -18
  215. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  216. package/dist/orchestration/maintenance.d.ts +6 -223
  217. package/dist/orchestration/maintenance.js +12 -12
  218. package/dist/{orchestrator-DB93S48I.d.ts → orchestrator-C9ZVppNh.d.ts} +12 -481
  219. package/dist/orchestrator.d.ts +10 -8
  220. package/dist/orchestrator.js +84 -82
  221. package/dist/patterns-cli.d.ts +1 -1
  222. package/dist/{pipeline-DmGc-H66.d.ts → pipeline-id_-sqYm.d.ts} +1 -1
  223. package/dist/policy-runtime.d.ts +1 -1
  224. package/dist/proactive-contention.d.ts +1 -1
  225. package/dist/provenance.d.ts +1 -1
  226. package/dist/{qmd-cJT0crkF.d.ts → qmd-R6XaQOZK.d.ts} +1 -1
  227. package/dist/qmd-preflight.d.ts +2 -2
  228. package/dist/qmd-recall-cache.d.ts +1 -1
  229. package/dist/qmd.d.ts +2 -2
  230. package/dist/qmd.js +4 -4
  231. package/dist/recall-concurrency-config.d.ts +1 -1
  232. package/dist/recall-disclosure-escalation.d.ts +1 -1
  233. package/dist/recall-explain-renderer.d.ts +1 -1
  234. package/dist/recall-explain-renderer.js +3 -3
  235. package/dist/recall-memory-map.d.ts +1 -1
  236. package/dist/recall-planner-llm.d.ts +1 -1
  237. package/dist/recall-state.d.ts +1 -1
  238. package/dist/recall-tag-filter.d.ts +1 -1
  239. package/dist/recall-timings.d.ts +1 -1
  240. package/dist/recall-xray-cli.d.ts +1 -1
  241. package/dist/recall-xray-cli.js +4 -4
  242. package/dist/recall-xray-renderer.d.ts +1 -1
  243. package/dist/recall-xray-renderer.js +3 -3
  244. package/dist/recall-xray.d.ts +1 -1
  245. package/dist/recall-xray.js +2 -2
  246. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  247. package/dist/replay/normalizers/claude.d.ts +1 -1
  248. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  249. package/dist/replay/normalizers/shared.d.ts +1 -1
  250. package/dist/replay/runner.d.ts +1 -1
  251. package/dist/replay/types.d.ts +1 -1
  252. package/dist/resolve-auth-token.d.ts +1 -1
  253. package/dist/resume-bundles.js +4 -4
  254. package/dist/retrieval-agents.d.ts +2 -2
  255. package/dist/retrieval-tiers.d.ts +1 -1
  256. package/dist/routing/engine.d.ts +1 -1
  257. package/dist/routing/store.d.ts +1 -1
  258. package/dist/salvage-envelope.d.ts +1 -1
  259. package/dist/{scope-profiles-KG2nODX7.d.ts → scope-profiles-EhyuAKkd.d.ts} +1 -1
  260. package/dist/search/embed-helper.d.ts +1 -1
  261. package/dist/search/factory.d.ts +1 -1
  262. package/dist/search/factory.js +5 -5
  263. package/dist/search/index.d.ts +1 -1
  264. package/dist/search/index.js +9 -9
  265. package/dist/search/lancedb-backend.d.ts +1 -1
  266. package/dist/search/meilisearch-backend.d.ts +1 -1
  267. package/dist/search/noop-backend.d.ts +1 -1
  268. package/dist/search/orama-backend.d.ts +1 -1
  269. package/dist/search/port.d.ts +1 -1
  270. package/dist/search/remote-backend.d.ts +1 -1
  271. package/dist/{semantic-consolidation-BaZlg0D8.d.ts → semantic-consolidation-B2xo26UQ.d.ts} +1 -1
  272. package/dist/semantic-consolidation.d.ts +2 -2
  273. package/dist/semantic-consolidation.js +7 -7
  274. package/dist/semantic-rule-promotion.js +5 -5
  275. package/dist/semantic-rule-verifier.d.ts +1 -1
  276. package/dist/semantic-rule-verifier.js +6 -6
  277. package/dist/service-DgFWlZ-r.d.ts +835 -0
  278. package/dist/session-observer-bands.d.ts +1 -1
  279. package/dist/session-observer-state.d.ts +1 -1
  280. package/dist/shared-context/manager.d.ts +1 -1
  281. package/dist/signal.d.ts +1 -1
  282. package/dist/{storage-BKhHHnRo.d.ts → storage-XGawwqXE.d.ts} +131 -2
  283. package/dist/storage.d.ts +2 -2
  284. package/dist/storage.js +4 -4
  285. package/dist/summarizer.d.ts +1 -1
  286. package/dist/summary-snapshot.d.ts +1 -1
  287. package/dist/temporal-supersession.d.ts +2 -2
  288. package/dist/temporal-timeline-recall.d.ts +1 -1
  289. package/dist/temporal-validity.d.ts +1 -1
  290. package/dist/threading.d.ts +1 -1
  291. package/dist/tier-migration.d.ts +2 -2
  292. package/dist/tier-routing.d.ts +1 -1
  293. package/dist/topics.d.ts +1 -1
  294. package/dist/transcript.d.ts +1 -1
  295. package/dist/trust-score-stage.d.ts +1 -1
  296. package/dist/trust-score.d.ts +1 -1
  297. package/dist/{types-GBQZuT7l.d.ts → types-Bbs0qz6b.d.ts} +2 -3
  298. package/dist/types.d.ts +1 -1
  299. package/dist/types.js +1 -1
  300. package/dist/utility-runtime.d.ts +1 -1
  301. package/dist/verified-recall.js +6 -6
  302. package/dist/write-envelope.d.ts +1 -1
  303. package/package.json +2 -2
  304. package/src/access-boundary.ts +3 -0
  305. package/src/access-http.test.ts +63 -0
  306. package/src/access-http.ts +26 -37
  307. package/src/access-mcp-output-schemas.ts +10 -0
  308. package/src/access-mcp.ts +4 -121
  309. package/src/access-operations-batch.ts +10 -5
  310. package/src/access-service.ts +43 -46
  311. package/src/access-surface-catalog.ts +6 -0
  312. package/src/access-wearables-meetings-surface.ts +139 -0
  313. package/src/activity/digest.ts +1 -1
  314. package/src/activity/runner.test.ts +37 -0
  315. package/src/activity/runner.ts +12 -0
  316. package/src/activity/scheduler.test.ts +1 -0
  317. package/src/activity/sync-registration.ts +13 -0
  318. package/src/cli/meetings-commands.ts +70 -0
  319. package/src/cli.ts +7 -6
  320. package/src/extraction-error-classification.ts +52 -0
  321. package/src/extraction.ts +2 -50
  322. package/src/mcp-read-only-tools.ts +2 -0
  323. package/src/meetings/build-memory.test.ts +364 -0
  324. package/src/meetings/build-scheduler.test.ts +55 -0
  325. package/src/meetings/build-scheduler.ts +96 -0
  326. package/src/meetings/day-source.test.ts +275 -0
  327. package/src/meetings/day-source.ts +352 -0
  328. package/src/meetings/http-glue.ts +126 -0
  329. package/src/meetings/index.ts +5 -4
  330. package/src/meetings/manual-sync-flush.test.ts +72 -0
  331. package/src/meetings/mcp-tools.ts +65 -0
  332. package/src/meetings/memory-gen.test.ts +498 -0
  333. package/src/meetings/memory-gen.ts +549 -0
  334. package/src/meetings/memory-generator.ts +5 -0
  335. package/src/meetings/namespace-isolation.test.ts +159 -0
  336. package/src/meetings/service.test.ts +195 -0
  337. package/src/meetings/service.ts +157 -0
  338. package/src/meetings/summary-extractor.test.ts +287 -0
  339. package/src/meetings/summary-extractor.ts +264 -0
  340. package/src/orchestration/maintenance.ts +8 -0
  341. package/src/orchestration/orchestrator-init.ts +6 -1
  342. package/src/orchestration/workspace-ops.ts +172 -8
  343. package/src/orchestrator.ts +12 -13
  344. package/src/storage.ts +21 -0
  345. package/src/testing/subjects/meetings-namespace-harness.ts +159 -0
  346. package/src/testing/subjects/meetings-namespace.test.ts +93 -0
  347. package/src/types.ts +1 -2
  348. package/src/wearables/cli.ts +2 -1
  349. package/src/wearables/index.ts +1 -0
  350. package/src/wearables/mcp-tools.ts +143 -0
  351. package/src/wearables/registry.test.ts +11 -0
  352. package/src/wearables/registry.ts +13 -0
  353. package/src/wearables/service.test.ts +62 -1
  354. package/src/wearables/service.ts +30 -2
  355. package/src/wearables/transcript-search-namespace-isolation.test.ts +98 -0
  356. package/dist/chunk-6ANPNUVL.js.map +0 -1
  357. package/dist/chunk-6NZ7U4R4.js.map +0 -1
  358. package/dist/chunk-7S5OMI76.js.map +0 -1
  359. package/dist/chunk-ACGGTPU4.js.map +0 -1
  360. package/dist/chunk-DM5A4ZFL.js.map +0 -1
  361. package/dist/chunk-EQYBHXRR.js.map +0 -1
  362. package/dist/chunk-IC2TCZJ2.js.map +0 -1
  363. package/dist/chunk-MONWCSVL.js.map +0 -1
  364. package/dist/chunk-N6M7MRVN.js.map +0 -1
  365. package/dist/chunk-QMGIQUBG.js.map +0 -1
  366. package/dist/chunk-QTO2FGBT.js.map +0 -1
  367. package/dist/chunk-SQEDDWAM.js.map +0 -1
  368. package/dist/chunk-W3XT32W7.js.map +0 -1
  369. /package/dist/{auto-sync-UPTUVE4X.js.map → auto-sync-5OE5QOZB.js.map} +0 -0
  370. /package/dist/{chunk-GF22HWS2.js.map → chunk-2PHX3I5C.js.map} +0 -0
  371. /package/dist/{chunk-JFDEYXF7.js.map → chunk-3NAHZQU3.js.map} +0 -0
  372. /package/dist/{chunk-XBRPEGXF.js.map → chunk-3UOSVTFR.js.map} +0 -0
  373. /package/dist/{chunk-TTKWTT72.js.map → chunk-3ZW6ZQO6.js.map} +0 -0
  374. /package/dist/{chunk-UV72DEZD.js.map → chunk-4B77XSG5.js.map} +0 -0
  375. /package/dist/{chunk-LMHDFOVV.js.map → chunk-5CPI2QWG.js.map} +0 -0
  376. /package/dist/{chunk-P72WZMWQ.js.map → chunk-5FZQ74K5.js.map} +0 -0
  377. /package/dist/{chunk-BRT7KEXU.js.map → chunk-6TWXQ4E2.js.map} +0 -0
  378. /package/dist/{chunk-CV6ZYXK3.js.map → chunk-7I7AYIUQ.js.map} +0 -0
  379. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  380. /package/dist/{chunk-JN57HZCD.js.map → chunk-ATEAL5EI.js.map} +0 -0
  381. /package/dist/{chunk-4PYLBXX6.js.map → chunk-AYAROCWD.js.map} +0 -0
  382. /package/dist/{chunk-NB2P47N7.js.map → chunk-CUUY5CC4.js.map} +0 -0
  383. /package/dist/{chunk-KL5Y6PEV.js.map → chunk-E3ZMFFQZ.js.map} +0 -0
  384. /package/dist/{chunk-55FDQYPS.js.map → chunk-ES5IHQ6M.js.map} +0 -0
  385. /package/dist/{chunk-N47ZWQBO.js.map → chunk-G2NSSQES.js.map} +0 -0
  386. /package/dist/{chunk-GSWPU5CR.js.map → chunk-GD3QOBMB.js.map} +0 -0
  387. /package/dist/{chunk-SACPRJ7F.js.map → chunk-JNIJBXVK.js.map} +0 -0
  388. /package/dist/{chunk-DGLON3AL.js.map → chunk-KNRG6ZGJ.js.map} +0 -0
  389. /package/dist/{chunk-GEUDRENF.js.map → chunk-MMTG3SCJ.js.map} +0 -0
  390. /package/dist/{chunk-WZFAPHIK.js.map → chunk-MU7ZHSZE.js.map} +0 -0
  391. /package/dist/{chunk-W4FBGYGK.js.map → chunk-NRV4Y3PM.js.map} +0 -0
  392. /package/dist/{chunk-KQ2XCQYN.js.map → chunk-P2BLHUL2.js.map} +0 -0
  393. /package/dist/{chunk-6L775BUB.js.map → chunk-QE63OHLB.js.map} +0 -0
  394. /package/dist/{chunk-ONHRRJZM.js.map → chunk-QJAQNXWI.js.map} +0 -0
  395. /package/dist/{chunk-6RYWNBSA.js.map → chunk-SVZGA2MK.js.map} +0 -0
  396. /package/dist/{chunk-OCMLGND7.js.map → chunk-WWZ35GWW.js.map} +0 -0
  397. /package/dist/{chunk-A5N6ISRK.js.map → chunk-ZN4UZWMT.js.map} +0 -0
  398. /package/dist/{chunk-7M6APKJL.js.map → chunk-ZYU7ZFLT.js.map} +0 -0
  399. /package/dist/{first-start-migration-LEXL3XYL.js.map → first-start-migration-BKNGOFED.js.map} +0 -0
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Meetings HTTP route glue (issue #1900) — the route bodies extracted from
3
+ * access-http.ts so the surface file stays under its structural ceiling. The
4
+ * thin inline hooks in access-http.ts keep the pathname/method match + the
5
+ * `enforceTokenOp("meetings_*")` boundary-dispatch marker (required by the
6
+ * surface-catalog fitness test) and delegate the body here.
7
+ *
8
+ * `MeetingsInputError` (invalid dates/ids) maps to a 400; everything else
9
+ * rethrows so backend faults keep flowing to the global 500 handler. Behaviour,
10
+ * validation, and `meetings.enabled` gating live in MeetingsService — these
11
+ * functions only translate transport shape.
12
+ */
13
+
14
+ import type { IncomingMessage, ServerResponse } from "node:http";
15
+ import { EngramAccessInputError, type WearablesMeetingsScope } from "../access-service.js";
16
+ import { MeetingsInputError } from "./errors.js";
17
+
18
+ type RespondJson = (res: ServerResponse, status: number, payload: unknown) => void;
19
+ type ReadJsonBody = (req: IncomingMessage) => Promise<unknown>;
20
+
21
+ /** Minimal meetings surface the HTTP glue drives (satisfied by EngramAccessService). */
22
+ export interface MeetingsHttpService {
23
+ meetingsList(date?: string, scope?: WearablesMeetingsScope): Promise<unknown>;
24
+ meetingsGet(id: string, scope?: WearablesMeetingsScope): Promise<unknown>;
25
+ meetingsBuild(date: string, scope?: WearablesMeetingsScope): Promise<unknown>;
26
+ }
27
+
28
+ function respondMeetingsError(respondJson: RespondJson, res: ServerResponse, err: unknown): boolean {
29
+ if (err instanceof MeetingsInputError) {
30
+ respondJson(res, 400, { error: "invalid_request", code: "invalid_request", message: err.message });
31
+ return true;
32
+ }
33
+ return false;
34
+ }
35
+
36
+ /**
37
+ * Decode a meeting `:id` URL path segment, mapping malformed percent-encoded
38
+ * input (e.g. `%E0%A4%A`) to a 400 `MeetingsInputError` rather than letting the
39
+ * `URIError` bubble up to the global 500 handler — mirrors the access-http
40
+ * `decode*Segment` helpers.
41
+ */
42
+ function decodeMeetingIdSegment(raw: string): string {
43
+ try {
44
+ return decodeURIComponent(raw);
45
+ } catch {
46
+ throw new MeetingsInputError("meeting id path segment is not valid percent-encoded input");
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Per-principal write-quota hooks the build route shares with every other
52
+ * mutating REST route: `enforceQuota` throws a 429 when the principal is over
53
+ * budget; `recordHit` accounts the successful write. Injected from access-http
54
+ * so the quota state stays owned by the server (issue #1937).
55
+ */
56
+ export interface MeetingsWriteQuotaHooks {
57
+ enforceQuota(): void;
58
+ recordHit(): void;
59
+ }
60
+
61
+ export async function respondMeetingsList(
62
+ res: ServerResponse,
63
+ respondJson: RespondJson,
64
+ service: MeetingsHttpService,
65
+ date: string | undefined,
66
+ scope?: WearablesMeetingsScope,
67
+ ): Promise<void> {
68
+ try {
69
+ respondJson(res, 200, await service.meetingsList(date, scope));
70
+ } catch (err) {
71
+ if (respondMeetingsError(respondJson, res, err)) return;
72
+ throw err;
73
+ }
74
+ }
75
+
76
+ export async function respondMeetingsGet(
77
+ res: ServerResponse,
78
+ respondJson: RespondJson,
79
+ service: MeetingsHttpService,
80
+ rawId: string,
81
+ scope?: WearablesMeetingsScope,
82
+ ): Promise<void> {
83
+ try {
84
+ respondJson(res, 200, await service.meetingsGet(decodeMeetingIdSegment(rawId), scope));
85
+ } catch (err) {
86
+ if (respondMeetingsError(respondJson, res, err)) return;
87
+ throw err;
88
+ }
89
+ }
90
+
91
+ export async function respondMeetingsBuild(
92
+ req: IncomingMessage,
93
+ res: ServerResponse,
94
+ respondJson: RespondJson,
95
+ readJsonBody: ReadJsonBody,
96
+ service: MeetingsHttpService,
97
+ quota: MeetingsWriteQuotaHooks,
98
+ scopeFor?: (bodyNamespace?: string, bodySessionKey?: string) => WearablesMeetingsScope,
99
+ ): Promise<void> {
100
+ const body = (await readJsonBody(req)) as Record<string, unknown>;
101
+ const raw = body.date;
102
+ if (raw !== undefined && raw !== null && raw !== "" && typeof raw !== "string") {
103
+ throw new EngramAccessInputError(`date must be a string (got ${JSON.stringify(raw)})`);
104
+ }
105
+ const date = raw === undefined || raw === null || raw === "" ? undefined : raw;
106
+ if (date === undefined) {
107
+ throw new EngramAccessInputError("date is required (YYYY-MM-DD)");
108
+ }
109
+ // Build persists/deletes records, writes memories, and reindexes — a mutating
110
+ // route, so it carries the same per-principal write quota as every other
111
+ // write (capsule import/export, admin promote). Enforce before the write,
112
+ // account the hit after it succeeds (issue #1937).
113
+ quota.enforceQuota();
114
+ const scope = scopeFor?.(
115
+ typeof body.namespace === "string" ? body.namespace : undefined,
116
+ typeof body.sessionKey === "string" ? body.sessionKey : undefined,
117
+ );
118
+ try {
119
+ const result = await service.meetingsBuild(date, scope);
120
+ quota.recordHit();
121
+ respondJson(res, 200, result);
122
+ } catch (err) {
123
+ if (respondMeetingsError(respondJson, res, err)) return;
124
+ throw err;
125
+ }
126
+ }
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * Public entry for the retrospective meeting-detection subsystem (issue #1900):
3
- * the deterministic engine detection, fusion, record store, day build, and the
4
- * CLI over a day's already-ingested audio + app-span signals — plus the
5
- * memory-generation SEAM the builder depends on. The concrete memory generator
6
- * and the day-source/service/scheduler wiring ship in the surface slice.
3
+ * pure detection over a day's already-ingested audio + app-span signals.
7
4
  * Re-exported from the package root (`src/index.ts`) so consumers import it from
8
5
  * `@remnic/core`, matching the wearables/activity subsystems' surfacing.
9
6
  */
@@ -15,4 +12,8 @@ export * from "./fuse.js";
15
12
  export * from "./store.js";
16
13
  export * from "./memory-generator.js";
17
14
  export * from "./build.js";
15
+ export * from "./memory-gen.js";
18
16
  export * from "./cli.js";
17
+ export * from "./day-source.js";
18
+ export * from "./build-scheduler.js";
19
+ export * from "./service.js";
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Manual wearables-sync tail-step flush (P2 gap).
3
+ *
4
+ * The meeting tail-step (`MeetingsService.requestBuild`) arms a DEBOUNCED,
5
+ * unref'd 5s timer. A long-lived orchestrator lets that timer fire; a
6
+ * short-lived one-shot caller (manual `remnic wearables sync` over CLI/HTTP/MCP)
7
+ * reaches its shutdown before the debounce fires, so the meeting build never
8
+ * ran for a manual sync.
9
+ *
10
+ * `EngramAccessService.wearablesSync` — the shared manual sync path every
11
+ * one-shot host funnels through — now drains the debounced build
12
+ * (`flushBuilds()`) after sync completes, so the meeting build actually runs
13
+ * before the caller exits. The long-lived auto-sync daemon calls the shared
14
+ * wearables service's `sync` DIRECTLY (never through this method) and must keep
15
+ * coalescing on the debounce timer instead of flushing eagerly.
16
+ */
17
+ import assert from "node:assert/strict";
18
+ import test from "node:test";
19
+
20
+ import { buildMeetingsNamespaceHarness } from "../testing/subjects/meetings-namespace-harness.js";
21
+
22
+ const scope = (namespace: string, principal: string) => ({ namespace, authenticatedPrincipal: principal });
23
+
24
+ test("manual wearables sync flushes the debounced meeting build (P2): the build runs before the one-shot caller returns", async () => {
25
+ const h = await buildMeetingsNamespaceHarness();
26
+ const DATE = "2026-03-10";
27
+ try {
28
+ // Manual one-shot path (CLI/HTTP/MCP funnel through EngramAccessService).
29
+ await h.service.wearablesSync({ date: DATE, ...scope("nsA", "pA") });
30
+
31
+ // No explicit meetingsBuild and no 5s wait: the meeting record can only
32
+ // exist if the manual sync drained the debounced tail-step build. Before
33
+ // the fix the build sat on an unfired unref'd timer and this was empty.
34
+ const storageA = await h.storageForNs("nsA");
35
+ assert.deepEqual(
36
+ await storageA.meetingRecordStore().listMeetingDates(),
37
+ [DATE],
38
+ "manual sync ran the debounced meeting build (record present without an explicit build)",
39
+ );
40
+ } finally {
41
+ await h.cleanup();
42
+ }
43
+ });
44
+
45
+ test("auto-sync path keeps the meeting build debounced (P2): the shared wearables service's direct sync does NOT flush eagerly", async () => {
46
+ const h = await buildMeetingsNamespaceHarness();
47
+ const DATE = "2026-03-11";
48
+ try {
49
+ // Daemon-style path: startWearablesAutoSync's adapter calls the shared
50
+ // wearables service's `sync` directly, bypassing EngramAccessService. It
51
+ // must arm the debounce, not flush it.
52
+ await h.orchestrator.getWearablesService("nsA").sync({ date: DATE });
53
+
54
+ const storageA = await h.storageForNs("nsA");
55
+ assert.deepEqual(
56
+ await storageA.meetingRecordStore().listMeetingDates(),
57
+ [],
58
+ "auto-sync path left the meeting build debounced (no eager flush)",
59
+ );
60
+
61
+ // The pending build is real, not impossible: draining it now produces the
62
+ // record — proving the auto-sync path merely deferred it on the timer.
63
+ await (await h.orchestrator.getMeetingsService("nsA")).flushBuilds();
64
+ assert.deepEqual(
65
+ await storageA.meetingRecordStore().listMeetingDates(),
66
+ [DATE],
67
+ "the debounced build was pending, not skipped",
68
+ );
69
+ } finally {
70
+ await h.cleanup();
71
+ }
72
+ });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Meetings MCP tool definitions (issue #1900) — the three `engram.meetings_*`
3
+ * tool-def objects, extracted from access-mcp.ts so the surface file stays under
4
+ * its structural ceiling. Spread back into `this.tools` (`...MEETINGS_MCP_TOOLS`);
5
+ * tools/list is verified at runtime. MCP_MIGRATED_OPERATIONS + callTool dispatch
6
+ * stay inline in access-mcp.ts.
7
+ */
8
+
9
+ import type { McpTool } from "../access-mcp.js";
10
+
11
+ export const MEETINGS_MCP_TOOLS: McpTool[] = [
12
+ {
13
+ name: "engram.meetings_list",
14
+ description:
15
+ "List stored meeting records (issue #1900), across all days or one day. Returns per-day meeting summaries; empty when meetings.enabled is off.",
16
+ inputSchema: {
17
+ type: "object",
18
+ properties: {
19
+ namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
20
+ sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
21
+ date: {
22
+ type: "string",
23
+ description: "Optional day to list (YYYY-MM-DD). Omit for all days.",
24
+ },
25
+ },
26
+ additionalProperties: false,
27
+ },
28
+ },
29
+ {
30
+ name: "engram.meetings_get",
31
+ description:
32
+ "Return one stored meeting record's markdown by id (mtg-YYYY-MM-DD-<hash>). Absent when not found or meetings.enabled is off.",
33
+ inputSchema: {
34
+ type: "object",
35
+ properties: {
36
+ namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
37
+ sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
38
+ id: {
39
+ type: "string",
40
+ description: "Meeting id (mtg-YYYY-MM-DD-<hash>). Required.",
41
+ },
42
+ },
43
+ required: ["id"],
44
+ additionalProperties: false,
45
+ },
46
+ },
47
+ {
48
+ name: "engram.meetings_build",
49
+ description:
50
+ "Detect + fuse + store a day's meetings from ingested audio + screen activity. No-op (enabled:false) when meetings.enabled is off.",
51
+ inputSchema: {
52
+ type: "object",
53
+ properties: {
54
+ namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
55
+ sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
56
+ date: {
57
+ type: "string",
58
+ description: "Day to build (YYYY-MM-DD). Required.",
59
+ },
60
+ },
61
+ required: ["date"],
62
+ additionalProperties: false,
63
+ },
64
+ },
65
+ ];