@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
@@ -1,18 +1,24 @@
1
- import {
2
- chatgptReplayNormalizer
3
- } from "./chunk-MMACM5G2.js";
4
1
  import {
5
2
  claudeReplayNormalizer
6
3
  } from "./chunk-54BGIBCR.js";
7
4
  import {
8
5
  openclawReplayNormalizer
9
6
  } from "./chunk-H4CKS5B2.js";
7
+ import {
8
+ chatgptReplayNormalizer
9
+ } from "./chunk-MMACM5G2.js";
10
+ import {
11
+ exportJsonBundle
12
+ } from "./chunk-UP6MOYCB.js";
13
+ import {
14
+ exportSqlite
15
+ } from "./chunk-BV2TIZ4F.js";
10
16
  import {
11
17
  importMarkdownBundle
12
18
  } from "./chunk-HDDRVXX4.js";
13
19
  import {
14
20
  importSqlite
15
- } from "./chunk-LRGSLV7M.js";
21
+ } from "./chunk-PYHOAXTI.js";
16
22
  import {
17
23
  detectImportFormat
18
24
  } from "./chunk-OZKVVUJB.js";
@@ -22,24 +28,9 @@ import {
22
28
  import {
23
29
  backupMemoryDir
24
30
  } from "./chunk-2NLLXCJG.js";
25
- import {
26
- exportJsonBundle
27
- } from "./chunk-UP6MOYCB.js";
28
31
  import {
29
32
  exportMarkdownBundle
30
33
  } from "./chunk-765K3SAT.js";
31
- import {
32
- exportSqlite
33
- } from "./chunk-BV2TIZ4F.js";
34
- import {
35
- buildReplayNormalizerRegistry,
36
- clampBatchSize,
37
- runReplay
38
- } from "./chunk-FGDKJJZS.js";
39
- import {
40
- isReplaySource,
41
- normalizeReplaySessionKey
42
- } from "./chunk-AJVLDJU6.js";
43
34
  import {
44
35
  RoutingRulesStore
45
36
  } from "./chunk-XL24QQ63.js";
@@ -50,22 +41,31 @@ import {
50
41
  WebDavServer
51
42
  } from "./chunk-PYIFUBRK.js";
52
43
  import {
53
- migrateObservations
54
- } from "./chunk-MNB5RMAY.js";
44
+ buildReplayNormalizerRegistry,
45
+ clampBatchSize,
46
+ runReplay
47
+ } from "./chunk-FGDKJJZS.js";
48
+ import {
49
+ isReplaySource,
50
+ normalizeReplaySessionKey
51
+ } from "./chunk-AJVLDJU6.js";
55
52
  import {
56
53
  rebuildMemoryLifecycleLedger
57
- } from "./chunk-JWMYVQAM.js";
54
+ } from "./chunk-ES5IHQ6M.js";
58
55
  import {
59
56
  rebuildMemoryProjection,
60
57
  repairMemoryProjection,
61
58
  verifyMemoryProjection
62
- } from "./chunk-HPOY2PHQ.js";
59
+ } from "./chunk-3ZW6ZQO6.js";
63
60
  import {
64
61
  rebuildObservations
65
62
  } from "./chunk-DX3XRGLH.js";
66
63
  import {
67
64
  archiveObservations
68
65
  } from "./chunk-MC6XO7T4.js";
66
+ import {
67
+ migrateObservations
68
+ } from "./chunk-MNB5RMAY.js";
69
69
  import {
70
70
  getBulkImportSource,
71
71
  listBulkImportSources,
@@ -85,24 +85,21 @@ import {
85
85
  } from "./chunk-TERNBNJB.js";
86
86
  import {
87
87
  searchVerifiedEpisodes
88
- } from "./chunk-5JQLAQUZ.js";
88
+ } from "./chunk-ATEAL5EI.js";
89
89
  import {
90
90
  ThreadingManager
91
91
  } from "./chunk-OJP3N7UK.js";
92
92
  import {
93
93
  promoteSemanticRuleFromMemory
94
- } from "./chunk-LI4ZOFHW.js";
94
+ } from "./chunk-SVZGA2MK.js";
95
95
  import {
96
96
  searchVerifiedSemanticRules
97
- } from "./chunk-EXU5IQ3S.js";
98
- import {
99
- resolveAgentAccessAuthToken
100
- } from "./chunk-TGQ2NTWH.js";
97
+ } from "./chunk-CUUY5CC4.js";
101
98
  import {
102
99
  buildResumeBundleFromState,
103
100
  getResumeBundleStatus,
104
101
  recordResumeBundle
105
- } from "./chunk-4PYLBXX6.js";
102
+ } from "./chunk-AYAROCWD.js";
106
103
  import {
107
104
  getWorkProductLedgerStatus,
108
105
  recordWorkProductLedgerEntry,
@@ -111,9 +108,21 @@ import {
111
108
  import {
112
109
  utcDayRange
113
110
  } from "./chunk-HYQJQGD3.js";
111
+ import {
112
+ resolveAgentAccessAuthToken
113
+ } from "./chunk-TGQ2NTWH.js";
114
114
  import {
115
115
  parseXrayCliOptions
116
- } from "./chunk-LMHDFOVV.js";
116
+ } from "./chunk-5CPI2QWG.js";
117
+ import {
118
+ collectPatternMemories,
119
+ explainPatternMemory,
120
+ parsePatternsExplainOptions,
121
+ parsePatternsListOptions,
122
+ parseStrictCliDate,
123
+ renderPatternExplain,
124
+ renderPatternsList
125
+ } from "./chunk-3T74IZB3.js";
117
126
  import {
118
127
  readRuntimePolicySnapshot,
119
128
  sanitizeRuntimePolicyValues
@@ -126,26 +135,17 @@ import {
126
135
  runOperatorInventory,
127
136
  runOperatorRepair,
128
137
  runOperatorSetup
129
- } from "./chunk-N7EVMKP6.js";
138
+ } from "./chunk-KNRG6ZGJ.js";
130
139
  import {
131
140
  listNamespaces,
132
141
  runNamespaceMigration,
133
142
  verifyNamespaces
134
- } from "./chunk-JN3IUA2Q.js";
143
+ } from "./chunk-7I7AYIUQ.js";
135
144
  import {
136
145
  analyzeSessionIntegrity,
137
146
  applySessionRepair,
138
147
  planSessionRepair
139
148
  } from "./chunk-KFY3SGN7.js";
140
- import {
141
- collectPatternMemories,
142
- explainPatternMemory,
143
- parsePatternsExplainOptions,
144
- parsePatternsListOptions,
145
- parseStrictCliDate,
146
- renderPatternExplain,
147
- renderPatternsList
148
- } from "./chunk-3T74IZB3.js";
149
149
  import {
150
150
  GITHUB_CONNECTOR_ID,
151
151
  GMAIL_CONNECTOR_ID,
@@ -163,12 +163,12 @@ import {
163
163
  import {
164
164
  listConnectorStates
165
165
  } from "./chunk-6GUG4YNM.js";
166
- import {
167
- searchHarmonicRetrieval
168
- } from "./chunk-AV5ZEH4M.js";
169
166
  import {
170
167
  rescoreMemoryImportance
171
168
  } from "./chunk-JXS5PDQ7.js";
169
+ import {
170
+ searchHarmonicRetrieval
171
+ } from "./chunk-AV5ZEH4M.js";
172
172
  import {
173
173
  createEvalBaselineSnapshot,
174
174
  getEvalHarnessStatus,
@@ -178,6 +178,9 @@ import {
178
178
  runEvalStoredBaselineCiGate,
179
179
  validateEvalBenchmarkPack
180
180
  } from "./chunk-3PY7VHV7.js";
181
+ import {
182
+ getCueAnchorStoreStatus
183
+ } from "./chunk-FZZ2QTJI.js";
181
184
  import {
182
185
  GraphDashboardServer
183
186
  } from "./chunk-YNDLCWXS.js";
@@ -190,9 +193,6 @@ import {
190
193
  renderConnectorsRunResult,
191
194
  runConnectorPollOnce
192
195
  } from "./chunk-OKTXM5H4.js";
193
- import {
194
- getCueAnchorStoreStatus
195
- } from "./chunk-FZZ2QTJI.js";
196
196
  import {
197
197
  applyCommitmentLedgerLifecycle,
198
198
  getCommitmentLedgerStatus,
@@ -207,10 +207,11 @@ import {
207
207
  } from "./chunk-UQ7RN5HK.js";
208
208
  import {
209
209
  parseConfig
210
- } from "./chunk-7M6APKJL.js";
210
+ } from "./chunk-ZYU7ZFLT.js";
211
211
  import {
212
- EngramAccessHttpServer
213
- } from "./chunk-5IXPWEQB.js";
212
+ EngramAccessHttpServer,
213
+ MeetingsInputError
214
+ } from "./chunk-WS32QRLO.js";
214
215
  import {
215
216
  WearablesInputError
216
217
  } from "./chunk-V7IZKJI3.js";
@@ -223,13 +224,13 @@ import {
223
224
  createProductionChatLlmAdapter,
224
225
  loadChatSession,
225
226
  sessionBelongsToPrincipal
226
- } from "./chunk-TCZWBJBO.js";
227
+ } from "./chunk-OUW4PAY4.js";
227
228
  import {
228
229
  getAbstractionNodeStoreStatus
229
230
  } from "./chunk-OADWQ5CR.js";
230
231
  import {
231
232
  EngramAccessService
232
- } from "./chunk-62QM5MKY.js";
233
+ } from "./chunk-IIXLB5E7.js";
233
234
  import {
234
235
  WorkStorage
235
236
  } from "./chunk-GDB4J2H3.js";
@@ -246,13 +247,13 @@ import {
246
247
  parseRecallExplainFormat,
247
248
  renderRecallExplain,
248
249
  renderXray
249
- } from "./chunk-GEUDRENF.js";
250
+ } from "./chunk-MMTG3SCJ.js";
250
251
  import {
251
252
  listMemoryGovernanceRuns,
252
253
  readMemoryGovernanceRunArtifact,
253
254
  restoreMemoryGovernanceRun,
254
255
  runMemoryGovernance
255
- } from "./chunk-B7C3TF5H.js";
256
+ } from "./chunk-6TWXQ4E2.js";
256
257
  import {
257
258
  renderQmdBacklogStatus
258
259
  } from "./chunk-IUM3VSHI.js";
@@ -264,11 +265,17 @@ import {
264
265
  } from "./chunk-L2DPF4DF.js";
265
266
  import {
266
267
  getCausalTrajectoryStoreStatus
267
- } from "./chunk-W4FBGYGK.js";
268
+ } from "./chunk-NRV4Y3PM.js";
269
+ import {
270
+ meetingIdDate
271
+ } from "./chunk-XWPFZX6S.js";
272
+ import {
273
+ isValidTranscriptDate
274
+ } from "./chunk-UHVXE24Y.js";
268
275
  import {
269
276
  RECALL_DISCLOSURE_LEVELS,
270
277
  isRecallDisclosure
271
- } from "./chunk-6NZ7U4R4.js";
278
+ } from "./chunk-SCOT5DTA.js";
272
279
  import {
273
280
  STATE_FILE_MAX_DECRYPT_BYTES
274
281
  } from "./chunk-XKGPIWGI.js";
@@ -278,17 +285,17 @@ import {
278
285
  import {
279
286
  bumpMemoryCorpusVersionForDir
280
287
  } from "./chunk-AITCS2RC.js";
288
+ import {
289
+ buildActionConfidenceInputFromOptions,
290
+ evaluateActionConfidence,
291
+ renderActionConfidenceText
292
+ } from "./chunk-Z2YFLXHU.js";
281
293
  import {
282
294
  expandTildePath
283
295
  } from "./chunk-EYIEWJNI.js";
284
296
  import {
285
297
  resolveHomeDir
286
298
  } from "./chunk-JUC24CTX.js";
287
- import {
288
- buildActionConfidenceInputFromOptions,
289
- evaluateActionConfidence,
290
- renderActionConfidenceText
291
- } from "./chunk-Z2YFLXHU.js";
292
299
  import {
293
300
  selectRouteRule,
294
301
  validateRouteTarget
@@ -317,12 +324,95 @@ import {
317
324
  import {
318
325
  RECALL_FALLBACK_DIRS
319
326
  } from "./chunk-VS2IYZRU.js";
327
+ import {
328
+ log
329
+ } from "./chunk-3WCASNQZ.js";
320
330
 
321
331
  // src/cli.ts
322
332
  import path3 from "path";
323
333
  import { access, lstat as lstat2, readFile, readdir as readdir2, realpath as realpath2, unlink } from "fs/promises";
324
334
  import { createHash } from "crypto";
325
335
 
336
+ // src/wearables/registry.ts
337
+ var registrations = /* @__PURE__ */ new Map();
338
+ function registerWearableConnector(registration) {
339
+ if (!registration || typeof registration !== "object") {
340
+ throw new Error("wearable connector registration must be an object");
341
+ }
342
+ if (typeof registration.id !== "string" || registration.id.trim().length === 0) {
343
+ throw new Error("wearable connector id must be a non-empty string");
344
+ }
345
+ if (typeof registration.factory !== "function") {
346
+ throw new Error(
347
+ `wearable connector '${registration.id}' must provide a factory function`
348
+ );
349
+ }
350
+ const key = registration.id.trim();
351
+ if (registrations.has(key)) {
352
+ throw new Error(`wearable connector '${key}' is already registered`);
353
+ }
354
+ registrations.set(key, { ...registration, id: key });
355
+ }
356
+ function getWearableConnector(id) {
357
+ if (typeof id !== "string") return void 0;
358
+ const key = id.trim();
359
+ if (key.length === 0) return void 0;
360
+ return registrations.get(key);
361
+ }
362
+ function listWearableConnectors() {
363
+ return [...registrations.keys()];
364
+ }
365
+ function clearWearableConnectors() {
366
+ registrations.clear();
367
+ }
368
+ var BUILT_IN_CONNECTOR_PACKAGES = [
369
+ { id: "limitless", suffix: "connector-limitless" },
370
+ { id: "bee", suffix: "connector-bee" },
371
+ { id: "omi", suffix: "connector-omi" },
372
+ { id: "fireflies", suffix: "connector-fireflies" },
373
+ { id: "granola", suffix: "connector-granola" },
374
+ { id: "desktop", suffix: "capture-audio" }
375
+ ];
376
+ function builtInConnectorPackageSpecifier(id) {
377
+ const entry = BUILT_IN_CONNECTOR_PACKAGES.find((e) => e.id === id);
378
+ return `@remnic/${entry ? entry.suffix : `connector-${id}`}`;
379
+ }
380
+ var loadFailuresWarned = /* @__PURE__ */ new Set();
381
+ async function ensureBuiltInWearableConnectors() {
382
+ for (const entry of BUILT_IN_CONNECTOR_PACKAGES) {
383
+ if (registrations.has(entry.id)) continue;
384
+ const specifier = "@remnic/" + entry.suffix;
385
+ let mod;
386
+ try {
387
+ mod = await import(specifier);
388
+ } catch (err) {
389
+ if (isModuleNotFound(err, specifier)) continue;
390
+ if (!loadFailuresWarned.has(specifier)) {
391
+ loadFailuresWarned.add(specifier);
392
+ log.warn(
393
+ `wearables: failed to load optional connector package ${specifier}: ${err instanceof Error ? err.message : String(err)}`
394
+ );
395
+ }
396
+ continue;
397
+ }
398
+ const registration = mod.wearableConnectorRegistration;
399
+ if (!registration) continue;
400
+ try {
401
+ registerWearableConnector(registration);
402
+ } catch {
403
+ }
404
+ }
405
+ }
406
+ function isModuleNotFound(err, specifier) {
407
+ if (!err || typeof err !== "object") return false;
408
+ const code = err.code;
409
+ if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND") {
410
+ return false;
411
+ }
412
+ const message = err.message;
413
+ return typeof message === "string" && message.includes(specifier);
414
+ }
415
+
326
416
  // src/wearables/cli.ts
327
417
  var USAGE = `Usage: wearables <command> [options]
328
418
 
@@ -466,7 +556,7 @@ async function runWearablesCliCommand(service, args, io) {
466
556
  }
467
557
  for (const source of status.sources) {
468
558
  io.stdout.write(
469
- ` ${source.source} (${source.displayName}): ${source.enabled ? "enabled" : "disabled"}, connector ${source.connectorInstalled ? "installed" : `MISSING \u2014 npm install @remnic/connector-${source.source}`}, memoryMode ${source.memoryMode}, ${source.transcriptDays} transcript day${source.transcriptDays === 1 ? "" : "s"}, last sync ${source.lastSyncAt ?? "never"}
559
+ ` ${source.source} (${source.displayName}): ${source.enabled ? "enabled" : "disabled"}, connector ${source.connectorInstalled ? "installed" : `MISSING \u2014 npm install ${builtInConnectorPackageSpecifier(source.source)}`}, memoryMode ${source.memoryMode}, ${source.transcriptDays} transcript day${source.transcriptDays === 1 ? "" : "s"}, last sync ${source.lastSyncAt ?? "never"}
470
560
  `
471
561
  );
472
562
  }
@@ -809,6 +899,234 @@ function formatRule(rule) {
809
899
  return parts.join(" ");
810
900
  }
811
901
 
902
+ // src/meetings/cli.ts
903
+ var USAGE2 = `Usage: meetings <command> [options]
904
+
905
+ Commands:
906
+ list [--date <YYYY-MM-DD>] List meeting records (all days, or one day)
907
+ show <meeting-id> Print a stored meeting record
908
+ build --date <YYYY-MM-DD> Detect + fuse + store the day's meetings
909
+
910
+ Add --json to list/build for machine-readable output.
911
+ `;
912
+ var VALUE_FLAGS2 = { "--date": true };
913
+ var BOOLEAN_FLAGS2 = { "--json": true };
914
+ function parseFlags2(args) {
915
+ const flags = /* @__PURE__ */ new Map();
916
+ const positional = [];
917
+ for (let i = 0; i < args.length; i++) {
918
+ const arg = args[i];
919
+ if (!arg.startsWith("--")) {
920
+ positional.push(arg);
921
+ continue;
922
+ }
923
+ if (VALUE_FLAGS2[arg] === true) {
924
+ const value = args[i + 1];
925
+ if (value === void 0 || value.startsWith("--")) {
926
+ throw new MeetingsInputError(`flag ${arg} requires a value`);
927
+ }
928
+ flags.set(arg, value);
929
+ i++;
930
+ continue;
931
+ }
932
+ if (BOOLEAN_FLAGS2[arg] === true) {
933
+ flags.set(arg, true);
934
+ continue;
935
+ }
936
+ const known = [...Object.keys(VALUE_FLAGS2), ...Object.keys(BOOLEAN_FLAGS2)].sort().join(", ");
937
+ throw new MeetingsInputError(`unknown flag ${arg} (valid: ${known})`);
938
+ }
939
+ return { flags, positional };
940
+ }
941
+ function requireDate(parsed) {
942
+ const value = parsed.flags.get("--date");
943
+ if (typeof value !== "string") {
944
+ throw new MeetingsInputError("--date <YYYY-MM-DD> is required");
945
+ }
946
+ if (!isValidTranscriptDate(value)) {
947
+ throw new MeetingsInputError(`--date must be a real YYYY-MM-DD; got '${value}'`);
948
+ }
949
+ return value;
950
+ }
951
+ function renderSummaryLine(summary) {
952
+ const attendees = summary.attendees.length > 0 ? summary.attendees.join(", ") : "(none)";
953
+ const sources = summary.sources.length > 0 ? summary.sources.join("+") : "(none)";
954
+ const corroborated = summary.corroboratedBy.length > 0 ? ` corroborated=${summary.corroboratedBy.join("+")}` : "";
955
+ return ` ${summary.id} ${summary.startUtc}\u2013${summary.endUtc} [${summary.detectionSource}] sources=${sources}${corroborated} attendees=${attendees} snapshots=${summary.snapshotCount}`;
956
+ }
957
+ function renderBuildSummary(summary) {
958
+ if (!summary.enabled) {
959
+ return `meetings disabled \u2014 set meetings.enabled=true to build (${summary.date})`;
960
+ }
961
+ const lines = [
962
+ `${summary.date}: ${summary.meetings.length} meeting${summary.meetings.length === 1 ? "" : "s"} (${summary.built} written, ${summary.skipped} unchanged, ${summary.removed.length} removed)`
963
+ ];
964
+ for (const meeting of summary.meetings) {
965
+ const sources = meeting.sources.length > 0 ? meeting.sources.join("+") : "(none)";
966
+ lines.push(
967
+ ` ${meeting.id} ${meeting.startUtc}\u2013${meeting.endUtc} [${meeting.detectionSource}] sources=${sources} snapshots=${meeting.snapshotCount} ${meeting.written ? "written" : "unchanged"}`
968
+ );
969
+ }
970
+ if (summary.reindexWarning !== void 0) {
971
+ lines.push(` warning: ${summary.reindexWarning}`);
972
+ }
973
+ if (summary.memoryWarning !== void 0) {
974
+ lines.push(` warning: ${summary.memoryWarning}`);
975
+ }
976
+ return lines.join("\n");
977
+ }
978
+ async function runMeetingsCliCommand(deps, args, io) {
979
+ const [command, ...rest] = args;
980
+ try {
981
+ switch (command) {
982
+ case void 0:
983
+ case "help":
984
+ case "--help": {
985
+ io.stdout.write(USAGE2);
986
+ return command === void 0 ? 1 : 0;
987
+ }
988
+ case "list": {
989
+ const parsed = parseFlags2(rest);
990
+ const json = parsed.flags.has("--json");
991
+ const dateFlag = parsed.flags.get("--date");
992
+ if (typeof dateFlag === "string" && !isValidTranscriptDate(dateFlag)) {
993
+ throw new MeetingsInputError(`--date must be a real YYYY-MM-DD; got '${dateFlag}'`);
994
+ }
995
+ if (!deps.config.enabled) {
996
+ if (json) {
997
+ io.stdout.write(typeof dateFlag === "string" ? "[]\n" : "{}\n");
998
+ } else {
999
+ io.stdout.write("meetings disabled \u2014 set meetings.enabled=true to build\n");
1000
+ }
1001
+ return 0;
1002
+ }
1003
+ if (typeof dateFlag === "string") {
1004
+ const summaries = await deps.store.listMeetingSummaries(dateFlag);
1005
+ if (json) {
1006
+ io.stdout.write(`${JSON.stringify(summaries, null, 2)}
1007
+ `);
1008
+ return 0;
1009
+ }
1010
+ if (summaries.length === 0) {
1011
+ io.stdout.write(`No meetings for ${dateFlag}.
1012
+ `);
1013
+ return 0;
1014
+ }
1015
+ io.stdout.write(`${dateFlag}:
1016
+ `);
1017
+ for (const summary of summaries) io.stdout.write(`${renderSummaryLine(summary)}
1018
+ `);
1019
+ return 0;
1020
+ }
1021
+ const dates = await deps.store.listMeetingDates();
1022
+ if (json) {
1023
+ const out = {};
1024
+ for (const date of dates) out[date] = await deps.store.listMeetingSummaries(date);
1025
+ io.stdout.write(`${JSON.stringify(out, null, 2)}
1026
+ `);
1027
+ return 0;
1028
+ }
1029
+ if (dates.length === 0) {
1030
+ io.stdout.write("No meetings recorded.\n");
1031
+ return 0;
1032
+ }
1033
+ for (const date of dates) {
1034
+ const summaries = await deps.store.listMeetingSummaries(date);
1035
+ io.stdout.write(`${date}:
1036
+ `);
1037
+ for (const summary of summaries) io.stdout.write(`${renderSummaryLine(summary)}
1038
+ `);
1039
+ }
1040
+ return 0;
1041
+ }
1042
+ case "show": {
1043
+ const parsed = parseFlags2(rest);
1044
+ if (!deps.config.enabled) {
1045
+ io.stdout.write("meetings disabled \u2014 set meetings.enabled=true to build\n");
1046
+ return 0;
1047
+ }
1048
+ const id = parsed.positional[0];
1049
+ if (id === void 0) {
1050
+ throw new MeetingsInputError("show requires a meeting id");
1051
+ }
1052
+ const date = meetingIdDate(id);
1053
+ if (date === null) {
1054
+ throw new MeetingsInputError(`invalid meeting id '${id}' \u2014 expected mtg-YYYY-MM-DD-<hash>`);
1055
+ }
1056
+ if (!isValidTranscriptDate(date)) {
1057
+ throw new MeetingsInputError(`invalid meeting id '${id}' \u2014 '${date}' is not a real calendar date`);
1058
+ }
1059
+ const raw = await deps.store.readMeetingRecord(date, id);
1060
+ if (raw === null) {
1061
+ throw new MeetingsInputError(`meeting '${id}' not found`);
1062
+ }
1063
+ io.stdout.write(raw.endsWith("\n") ? raw : `${raw}
1064
+ `);
1065
+ return 0;
1066
+ }
1067
+ case "build": {
1068
+ const parsed = parseFlags2(rest);
1069
+ const date = requireDate(parsed);
1070
+ const summary = await deps.builder.buildDay(date);
1071
+ if (parsed.flags.has("--json")) {
1072
+ io.stdout.write(`${JSON.stringify(summary, null, 2)}
1073
+ `);
1074
+ return 0;
1075
+ }
1076
+ io.stdout.write(`${renderBuildSummary(summary)}
1077
+ `);
1078
+ return 0;
1079
+ }
1080
+ default:
1081
+ throw new MeetingsInputError(`unknown meetings command '${command}'
1082
+
1083
+ ${USAGE2}`);
1084
+ }
1085
+ } catch (err) {
1086
+ if (err instanceof MeetingsInputError) {
1087
+ io.stderr.write(`meetings: ${err.message}
1088
+ `);
1089
+ return 1;
1090
+ }
1091
+ throw err;
1092
+ }
1093
+ }
1094
+
1095
+ // src/cli/meetings-commands.ts
1096
+ function registerMeetingsCommands(cmd, orchestrator) {
1097
+ const meetingsCmd = cmd.command("meetings").description(
1098
+ "Retrospective meetings: list records, show one, build (detect + fuse + store) a day"
1099
+ );
1100
+ const forwardMeetings = async (argv) => {
1101
+ const service = await orchestrator.getMeetingsService();
1102
+ const code = await runMeetingsCliCommand(
1103
+ { store: service.store, builder: service.builder, config: service.config },
1104
+ argv,
1105
+ { stdout: process.stdout, stderr: process.stderr }
1106
+ );
1107
+ if (code !== 0) process.exitCode = code;
1108
+ };
1109
+ meetingsCmd.command("list").description("List meeting records (all days, or one day)").option("--date <date>", "Day to list (YYYY-MM-DD)").option("--json", "JSON output").action(async (...args) => {
1110
+ const options = args[0] ?? {};
1111
+ await forwardMeetings([
1112
+ "list",
1113
+ ...typeof options.date === "string" && options.date.length > 0 ? ["--date", options.date] : [],
1114
+ ...options.json === true ? ["--json"] : []
1115
+ ]);
1116
+ });
1117
+ meetingsCmd.command("show <meeting-id>").description("Print a stored meeting record").action(async (...args) => {
1118
+ await forwardMeetings(["show", String(args[0] ?? "")]);
1119
+ });
1120
+ meetingsCmd.command("build").description("Detect + fuse + store the day's meetings").option("--date <date>", "Day to build (YYYY-MM-DD)").option("--json", "JSON output").action(async (...args) => {
1121
+ const options = args[0] ?? {};
1122
+ await forwardMeetings([
1123
+ "build",
1124
+ ...typeof options.date === "string" ? ["--date", options.date] : [],
1125
+ ...options.json === true ? ["--json"] : []
1126
+ ]);
1127
+ });
1128
+ }
1129
+
812
1130
  // src/cli/research-status-commands.ts
813
1131
  function registerResearchStatusCommands(cmd, orchestrator) {
814
1132
  const caps = resolveCapabilities(orchestrator.config);
@@ -4629,11 +4947,11 @@ function registerCli(api, orchestrator, registerOptions = {}) {
4629
4947
  "Wearable transcript sources (Limitless / Bee / Omi): sync, transcripts, search, speakers, corrections"
4630
4948
  );
4631
4949
  const forwardWearables = async (argv) => {
4632
- const code = await runWearablesCliCommand(
4633
- orchestrator.getWearablesService(),
4634
- argv,
4635
- { stdout: process.stdout, stderr: process.stderr }
4636
- );
4950
+ const io = { stdout: process.stdout, stderr: process.stderr };
4951
+ const code = await runWearablesCliCommand(orchestrator.getWearablesService(), argv, io);
4952
+ if (argv[0] === "sync" && code === 0 && orchestrator.config.meetings.enabled) {
4953
+ await (await orchestrator.getMeetingsService()).flushBuilds();
4954
+ }
4637
4955
  if (code !== 0) process.exitCode = code;
4638
4956
  };
4639
4957
  const stringOpt = (options, key, flag) => typeof options[key] === "string" && options[key].length > 0 ? [flag, options[key]] : [];
@@ -5336,6 +5654,7 @@ ${doc.content}` : doc.content,
5336
5654
  });
5337
5655
  registerResearchStatusCommands(cmd, orchestrator);
5338
5656
  registerCreationLedgerCommands(cmd, orchestrator);
5657
+ registerMeetingsCommands(cmd, orchestrator);
5339
5658
  cmd.command("trust-zone-promote").description("Dry-run or apply a trust-zone promotion with provenance enforcement").requiredOption("--record-id <recordId>", "Source trust-zone record id").requiredOption("--target-zone <targetZone>", "Promotion target zone (working|trusted)").requiredOption("--reason <reason>", "Human-readable promotion reason").option("--recorded-at <isoTimestamp>", "Promotion timestamp (defaults to now)").option("--summary <summary>", "Optional replacement summary for the promoted record").option("--dry-run", "Show the promotion plan without writing the promoted record").action(async (...args) => {
5340
5659
  const options = args[0] ?? {};
5341
5660
  const result = await runTrustZonePromoteCliCommand({
@@ -7552,7 +7871,14 @@ function parseDuration(duration) {
7552
7871
  }
7553
7872
 
7554
7873
  export {
7874
+ registerWearableConnector,
7875
+ getWearableConnector,
7876
+ listWearableConnectors,
7877
+ clearWearableConnectors,
7878
+ builtInConnectorPackageSpecifier,
7879
+ ensureBuiltInWearableConnectors,
7555
7880
  runWearablesCliCommand,
7881
+ runMeetingsCliCommand,
7556
7882
  runRebuildMemoryLifecycleLedgerCliCommand,
7557
7883
  convertMemoriesToRecords,
7558
7884
  registerTrainingExportAdapter,
@@ -7650,4 +7976,4 @@ export {
7650
7976
  listMemoryMarkdownFilePaths,
7651
7977
  registerCli
7652
7978
  };
7653
- //# sourceMappingURL=chunk-KHRKEELC.js.map
7979
+ //# sourceMappingURL=chunk-ROUL7RZU.js.map