@remnic/core 9.65.8 → 9.66.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 (702) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -12
  2. package/dist/access-admin-ops-surface.js +54 -51
  3. package/dist/access-authorization-probe.d.ts +11 -12
  4. package/dist/access-authorization-probe.js +55 -52
  5. package/dist/access-boundary.d.ts +11 -12
  6. package/dist/access-boundary.js +54 -51
  7. package/dist/access-citation-namespace.js +3 -3
  8. package/dist/access-cli.js +132 -125
  9. package/dist/access-cli.js.map +1 -1
  10. package/dist/access-coding-context-resolution.d.ts +1 -2
  11. package/dist/access-coding-context-resolution.js +2 -2
  12. package/dist/access-extraction-force-flush.d.ts +11 -12
  13. package/dist/access-extraction-force-flush.js +54 -51
  14. package/dist/access-health-types.d.ts +1 -2
  15. package/dist/access-http-lcm-compaction.d.ts +11 -12
  16. package/dist/access-http-lifecycle-flush.d.ts +11 -12
  17. package/dist/access-http-offline-stream.d.ts +11 -12
  18. package/dist/access-http-query.d.ts +2 -3
  19. package/dist/access-http-query.js +56 -53
  20. package/dist/access-http.d.ts +12 -13
  21. package/dist/access-http.js +77 -74
  22. package/dist/access-identity-continuity-surface.d.ts +9 -10
  23. package/dist/access-identity-continuity-surface.js +54 -51
  24. package/dist/access-lcm-surface.d.ts +11 -12
  25. package/dist/access-lcm-surface.js +54 -51
  26. package/dist/access-mcp-output-schemas.js +1 -1
  27. package/dist/access-mcp.d.ts +11 -12
  28. package/dist/access-mcp.js +67 -64
  29. package/dist/access-memory-search-fanout.d.ts +2 -3
  30. package/dist/{access-namespace-preflight-CpAOrS-9.d.ts → access-namespace-preflight-50VIkPhB.d.ts} +1 -1
  31. package/dist/access-namespace-preflight.d.ts +3 -4
  32. package/dist/access-namespace-preflight.js +54 -51
  33. package/dist/access-observe-write-surface.d.ts +11 -12
  34. package/dist/access-observe-write-surface.js +54 -51
  35. package/dist/access-offline-manifest.d.ts +9 -10
  36. package/dist/access-offline-manifest.js +15 -15
  37. package/dist/access-operations-batch.js +59 -56
  38. package/dist/access-operations.d.ts +12 -13
  39. package/dist/access-operations.js +64 -61
  40. package/dist/access-recall-concurrency.d.ts +11 -12
  41. package/dist/access-recall-concurrency.js +54 -51
  42. package/dist/access-recall-response.d.ts +11 -12
  43. package/dist/access-recall-response.js +54 -51
  44. package/dist/access-recall-surface.d.ts +11 -12
  45. package/dist/access-recall-surface.js +54 -51
  46. package/dist/access-schema.d.ts +12 -12
  47. package/dist/access-schema.js +5 -5
  48. package/dist/{access-service-Diu61Cfv.d.ts → access-service-C2tV2-uL.d.ts} +8 -8
  49. package/dist/access-service-helpers.d.ts +11 -12
  50. package/dist/access-service.d.ts +11 -12
  51. package/dist/access-service.js +54 -51
  52. package/dist/access-surface-catalog.d.ts +11 -12
  53. package/dist/access-surface-catalog.js +58 -53
  54. package/dist/access-surface-catalog.js.map +1 -1
  55. package/dist/access-wearables-meetings-surface.d.ts +3 -4
  56. package/dist/action-confidence.d.ts +1 -2
  57. package/dist/active-memory-bridge.d.ts +1 -2
  58. package/dist/active-memory-bridge.js +2 -2
  59. package/dist/active-recall.d.ts +1 -2
  60. package/dist/active-recall.js +11 -11
  61. package/dist/adapters/index.js +7 -7
  62. package/dist/adapters/registry.js +3 -3
  63. package/dist/ambient-provenance.d.ts +1 -2
  64. package/dist/artifact-search.d.ts +1 -2
  65. package/dist/{auto-sync-2YPITIWN.js → auto-sync-Q6Q2FVSC.js} +9 -9
  66. package/dist/behavior-learner.d.ts +1 -2
  67. package/dist/behavior-signals.d.ts +1 -2
  68. package/dist/bootstrap.d.ts +9 -10
  69. package/dist/briefing-window.d.ts +2 -3
  70. package/dist/briefing.d.ts +2 -3
  71. package/dist/briefing.js +28 -28
  72. package/dist/buffer-surprise-report.d.ts +1 -2
  73. package/dist/buffer-turn-helpers.d.ts +1 -2
  74. package/dist/buffer.d.ts +2 -3
  75. package/dist/buffer.js +20 -4
  76. package/dist/bulk-import/index.d.ts +3 -4
  77. package/dist/calibration.d.ts +1 -2
  78. package/dist/calibration.js +1 -1
  79. package/dist/capabilities.d.ts +1 -2
  80. package/dist/{capsule-merge-SGIVB3WA.js → capsule-merge-SEHERWWP.js} +4 -4
  81. package/dist/{catalog-9f-vEQLS.d.ts → catalog-C2jA-gLm.d.ts} +1 -1
  82. package/dist/causal-behavior.d.ts +1 -2
  83. package/dist/causal-consolidation.d.ts +1 -2
  84. package/dist/causal-consolidation.js +29 -29
  85. package/dist/causal-trajectory-graph.d.ts +1 -2
  86. package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
  87. package/dist/{chunk-TFR3HG4K.js → chunk-2FA7U5XY.js} +4 -4
  88. package/dist/{chunk-PO7NXBG2.js → chunk-2GF27PGH.js} +5 -5
  89. package/dist/{chunk-W2BAGGEW.js → chunk-2ITZ74A6.js} +40 -31
  90. package/dist/{chunk-W2BAGGEW.js.map → chunk-2ITZ74A6.js.map} +1 -1
  91. package/dist/{chunk-MY2BC6UE.js → chunk-2X6BGKQL.js} +11 -11
  92. package/dist/{chunk-UEBDCMOO.js → chunk-3TSU662L.js} +3 -3
  93. package/dist/{chunk-XAB6STPO.js → chunk-46XR5FNZ.js} +53 -3
  94. package/dist/chunk-46XR5FNZ.js.map +1 -0
  95. package/dist/{chunk-FP7YTTVO.js → chunk-4OFKZAJG.js} +2 -1
  96. package/dist/chunk-4OFKZAJG.js.map +1 -0
  97. package/dist/{chunk-S5XOSTYM.js → chunk-4XLTUR6R.js} +3 -3
  98. package/dist/{chunk-BWGCOLEL.js → chunk-65JOGLIS.js} +2 -2
  99. package/dist/{chunk-HMZKGHMD.js → chunk-7UOXCCCI.js} +3 -3
  100. package/dist/{chunk-7WOWGRAU.js → chunk-AF5H7TKI.js} +108 -23
  101. package/dist/chunk-AF5H7TKI.js.map +1 -0
  102. package/dist/{chunk-7BDZTALN.js → chunk-AJTG3CP7.js} +12 -2
  103. package/dist/chunk-AJTG3CP7.js.map +1 -0
  104. package/dist/{chunk-2LWQSV6A.js → chunk-AL3UYZ5N.js} +3 -2
  105. package/dist/chunk-AL3UYZ5N.js.map +1 -0
  106. package/dist/{chunk-4F4AQFWL.js → chunk-B4AOWRYF.js} +10 -10
  107. package/dist/{chunk-ODU2CNNX.js → chunk-C5IUOBCN.js} +2 -2
  108. package/dist/{chunk-3A2NJP2U.js → chunk-CHGG74CY.js} +3 -3
  109. package/dist/{chunk-76DIF5KT.js → chunk-CX4OLNIH.js} +2 -2
  110. package/dist/{chunk-Z3YEGSR4.js → chunk-D3UXGE5D.js} +10 -10
  111. package/dist/{chunk-5HK3CJAR.js → chunk-D6Q5EPOV.js} +2 -2
  112. package/dist/{chunk-EGBDFJ36.js → chunk-DD5JFCWM.js} +2 -2
  113. package/dist/{chunk-XBGHAAKR.js → chunk-DDX6KIXF.js} +2 -2
  114. package/dist/{chunk-JIYDRBVZ.js → chunk-DJORULH3.js} +2 -2
  115. package/dist/{chunk-7KQB4EBS.js → chunk-DUAJKRR2.js} +2 -2
  116. package/dist/{chunk-XDL5CYZN.js → chunk-EEOUMG3J.js} +2 -1
  117. package/dist/{chunk-XDL5CYZN.js.map → chunk-EEOUMG3J.js.map} +1 -1
  118. package/dist/{chunk-Q57GOHLF.js → chunk-EGALNSZ4.js} +3 -3
  119. package/dist/{chunk-DPCXDG7G.js → chunk-EH65UV2Z.js} +2 -2
  120. package/dist/{chunk-KCT36JAW.js → chunk-ESNFSSO4.js} +2 -2
  121. package/dist/{chunk-XQ3HXAQH.js → chunk-ET2CNMLD.js} +4 -4
  122. package/dist/{chunk-TUHBYJXL.js → chunk-EWKVYCFP.js} +1 -1
  123. package/dist/{chunk-NPFUNWNX.js → chunk-FFUMTH27.js} +2 -2
  124. package/dist/{chunk-3PKAS6VL.js → chunk-GAJK3DQ5.js} +2 -2
  125. package/dist/{chunk-DA7ITC5Z.js → chunk-GBEOUCBB.js} +2 -2
  126. package/dist/{chunk-UENKPWCS.js → chunk-H2IRSXZN.js} +6 -6
  127. package/dist/{chunk-CFVTRUR3.js → chunk-H6RSANGQ.js} +2 -2
  128. package/dist/chunk-HVAEXYPL.js +98 -0
  129. package/dist/chunk-HVAEXYPL.js.map +1 -0
  130. package/dist/{chunk-EUYWQ7TS.js → chunk-IEZ6CGTW.js} +2 -2
  131. package/dist/{chunk-3SZD4CYO.js → chunk-IGZCAHFL.js} +3 -3
  132. package/dist/{chunk-UPFNQJC7.js → chunk-INUBU6I5.js} +2 -2
  133. package/dist/{chunk-PMVPCZJZ.js → chunk-J2R275FN.js} +3 -3
  134. package/dist/{chunk-UW5NPZJ2.js → chunk-JALOAKSZ.js} +59 -7
  135. package/dist/chunk-JALOAKSZ.js.map +1 -0
  136. package/dist/{chunk-2QSZNTDO.js → chunk-JBPKEARU.js} +7 -7
  137. package/dist/{chunk-3BCULS4U.js → chunk-JKTV3JNX.js} +145 -507
  138. package/dist/chunk-JKTV3JNX.js.map +1 -0
  139. package/dist/{chunk-5ACCD4L7.js → chunk-JRRQ747T.js} +7 -7
  140. package/dist/{chunk-V4IDF3EZ.js → chunk-JTWZKNUH.js} +5 -5
  141. package/dist/{chunk-AZMLH5UT.js → chunk-KI64TTBL.js} +2 -2
  142. package/dist/{chunk-DEACDKE3.js → chunk-KJXCD7VR.js} +112 -87
  143. package/dist/chunk-KJXCD7VR.js.map +1 -0
  144. package/dist/chunk-LJABGXC4.js +267 -0
  145. package/dist/chunk-LJABGXC4.js.map +1 -0
  146. package/dist/{chunk-NPIBN2VL.js → chunk-LK4TOYPU.js} +2 -2
  147. package/dist/{chunk-UTQUEHC7.js → chunk-LUDBXTBJ.js} +8 -8
  148. package/dist/{chunk-PU56CXZA.js → chunk-LYUUA6QB.js} +2 -2
  149. package/dist/{chunk-P36Z4JRA.js → chunk-M5ERTI4I.js} +2 -2
  150. package/dist/{chunk-LDKPDODJ.js → chunk-ME35HVDJ.js} +2 -2
  151. package/dist/{chunk-773TRRGT.js → chunk-MJUCDM3C.js} +2 -2
  152. package/dist/{chunk-OXRRJXPR.js → chunk-MUEGIKKY.js} +476 -1796
  153. package/dist/chunk-MUEGIKKY.js.map +1 -0
  154. package/dist/{chunk-AHPIFKNG.js → chunk-N4F7ZSSG.js} +2 -2
  155. package/dist/{chunk-JOZUBF4A.js → chunk-NACLNNFQ.js} +2 -2
  156. package/dist/{chunk-LC2BDILZ.js → chunk-NBP4EX5N.js} +2 -2
  157. package/dist/{chunk-T7XP6IZE.js → chunk-NFP4KPTA.js} +2 -2
  158. package/dist/{chunk-ZVPVTPGI.js → chunk-NNZFPYYX.js} +4 -4
  159. package/dist/{chunk-LPNCR4QK.js → chunk-NSTNGMSS.js} +14 -14
  160. package/dist/{chunk-5RWZH6PH.js → chunk-NUF7VSEX.js} +2 -2
  161. package/dist/{chunk-7VZFRUQU.js → chunk-O7ERGZDA.js} +5 -5
  162. package/dist/{chunk-HSZMX3ZJ.js → chunk-ODW5GDFE.js} +2 -2
  163. package/dist/{chunk-5DHKCO52.js → chunk-OJUEUQDJ.js} +2 -2
  164. package/dist/{chunk-LOXHYCVS.js → chunk-OMX6TKXH.js} +2 -2
  165. package/dist/{chunk-J2WC5LF4.js → chunk-QBC33MPY.js} +2 -1
  166. package/dist/{chunk-SEEJOGQX.js → chunk-QBNE55VA.js} +4 -4
  167. package/dist/chunk-QJCWK2A7.js +1466 -0
  168. package/dist/chunk-QJCWK2A7.js.map +1 -0
  169. package/dist/{chunk-YEUXERJ6.js → chunk-RDGKVH6T.js} +7 -3
  170. package/dist/{chunk-YEUXERJ6.js.map → chunk-RDGKVH6T.js.map} +1 -1
  171. package/dist/{chunk-JYSN42VN.js → chunk-RPIS5FQ7.js} +237 -183
  172. package/dist/chunk-RPIS5FQ7.js.map +1 -0
  173. package/dist/{chunk-F7XUD3PL.js → chunk-S4CDUXQY.js} +2 -2
  174. package/dist/{chunk-WNXYT4MK.js → chunk-S4Z2OBTX.js} +4 -4
  175. package/dist/{chunk-UL4MKZHI.js → chunk-SN4JXNLL.js} +2 -2
  176. package/dist/{chunk-CAMNRAJF.js → chunk-SZMYGDSM.js} +2 -2
  177. package/dist/chunk-TB2MJRI6.js +866 -0
  178. package/dist/chunk-TB2MJRI6.js.map +1 -0
  179. package/dist/{chunk-XNWXSGHS.js → chunk-TBCDF556.js} +28 -10
  180. package/dist/chunk-TBCDF556.js.map +1 -0
  181. package/dist/{chunk-LKYIOCWL.js → chunk-TCF4MU7L.js} +967 -132
  182. package/dist/chunk-TCF4MU7L.js.map +1 -0
  183. package/dist/chunk-TCQRIIIN.js +202 -0
  184. package/dist/chunk-TCQRIIIN.js.map +1 -0
  185. package/dist/{chunk-7PHI6GUI.js → chunk-TEZ2HTC7.js} +42 -2
  186. package/dist/chunk-TEZ2HTC7.js.map +1 -0
  187. package/dist/{chunk-CPA5NBHN.js → chunk-TNGH4ZYI.js} +2 -2
  188. package/dist/{chunk-F3NVYTTA.js → chunk-TNXNECAN.js} +6 -6
  189. package/dist/{chunk-BEC4YBNA.js → chunk-TVW4C7PV.js} +2 -2
  190. package/dist/{chunk-UFKPQBXH.js → chunk-U62OK7BB.js} +2 -2
  191. package/dist/{chunk-KZIF6XHX.js → chunk-U65VJSCJ.js} +32 -19
  192. package/dist/chunk-U65VJSCJ.js.map +1 -0
  193. package/dist/{chunk-4QEYREAV.js → chunk-U6NGKS32.js} +8 -8
  194. package/dist/{chunk-HRHO3ZNG.js → chunk-UW4RYPWC.js} +2 -2
  195. package/dist/{chunk-AX7UXCHJ.js → chunk-UYA36DQ7.js} +2 -1
  196. package/dist/chunk-UYA36DQ7.js.map +1 -0
  197. package/dist/{chunk-T6ILXUAH.js → chunk-VG4SSPAW.js} +2 -2
  198. package/dist/chunk-VOSWUO3K.js +100 -0
  199. package/dist/chunk-VOSWUO3K.js.map +1 -0
  200. package/dist/chunk-WFCWP4XU.js +17 -0
  201. package/dist/chunk-WFCWP4XU.js.map +1 -0
  202. package/dist/{chunk-H2YSH3DG.js → chunk-WKAXBXVA.js} +2 -2
  203. package/dist/{chunk-SXIMQLGV.js → chunk-WVGXCBOC.js} +2 -2
  204. package/dist/{chunk-UNUMFURP.js → chunk-X5PIDJ3L.js} +3 -3
  205. package/dist/{chunk-CRML27CO.js → chunk-X5YYSAZX.js} +4 -4
  206. package/dist/{chunk-FZEEWOI2.js → chunk-XJJYSX6F.js} +2 -2
  207. package/dist/{chunk-U7EW2W4W.js → chunk-XKNHFDTT.js} +26 -6
  208. package/dist/chunk-XKNHFDTT.js.map +1 -0
  209. package/dist/{chunk-OA2O2GJ4.js → chunk-XOHYGIWF.js} +3 -3
  210. package/dist/{chunk-UG6VXIOK.js → chunk-XSTNGNJP.js} +2 -2
  211. package/dist/{chunk-MINHJ55X.js → chunk-XXW32OL7.js} +1 -1
  212. package/dist/{chunk-MINHJ55X.js.map → chunk-XXW32OL7.js.map} +1 -1
  213. package/dist/{chunk-YDPAE2RD.js → chunk-YFLLGRXO.js} +2 -2
  214. package/dist/{chunk-MDD2RINF.js → chunk-YWPLOJ7T.js} +3 -3
  215. package/dist/{chunk-Q4WONDMJ.js → chunk-YYGZJPOK.js} +2 -2
  216. package/dist/{chunk-GTO56JY5.js → chunk-ZPS724LT.js} +2 -2
  217. package/dist/{chunk-SNOIKAHM.js → chunk-ZZZWEDF4.js} +3 -3
  218. package/dist/{cli-O3F-ht3i.d.ts → cli-CsfFMe6n.d.ts} +5 -5
  219. package/dist/cli.d.ts +13 -14
  220. package/dist/cli.js +101 -96
  221. package/dist/coding/export-okf-codegraph.d.ts +56 -0
  222. package/dist/coding/export-okf-codegraph.js +526 -0
  223. package/dist/coding/export-okf-codegraph.js.map +1 -0
  224. package/dist/coding/pre-action-gate.d.ts +1 -2
  225. package/dist/compounding/engine.d.ts +2 -3
  226. package/dist/compounding/engine.js +29 -29
  227. package/dist/compounding/preference-consolidator.d.ts +1 -2
  228. package/dist/compression-optimizer.d.ts +1 -2
  229. package/dist/config.d.ts +1 -2
  230. package/dist/config.js +11 -11
  231. package/dist/connectors/codex-materialize-runner.d.ts +1 -2
  232. package/dist/connectors/codex-materialize-runner.js +28 -28
  233. package/dist/connectors/codex-materialize.d.ts +1 -2
  234. package/dist/connectors/index.d.ts +1 -2
  235. package/dist/connectors/index.js +28 -28
  236. package/dist/consolidation-provenance-check.d.ts +2 -3
  237. package/dist/consolidation-provenance-check.js +4 -4
  238. package/dist/consolidation-undo.d.ts +2 -3
  239. package/dist/consolidation-undo.js +3 -3
  240. package/dist/contradiction/index.d.ts +3 -4
  241. package/dist/contradiction/index.js +9 -9
  242. package/dist/{contradiction-scan-AKUWPX5N.js → contradiction-scan-NOYMFG66.js} +3 -3
  243. package/dist/converge-config.d.ts +1 -2
  244. package/dist/convergence-refresh.d.ts +2 -3
  245. package/dist/convergence-refresh.js +30 -30
  246. package/dist/conversation-index/backend.d.ts +1 -2
  247. package/dist/conversation-index/backend.js +2 -2
  248. package/dist/conversation-index/chunker.d.ts +1 -2
  249. package/dist/conversation-index/faiss-adapter.d.ts +1 -2
  250. package/dist/conversation-index/indexer.d.ts +1 -2
  251. package/dist/conversation-index/search.d.ts +1 -2
  252. package/dist/corpus-watermark.d.ts +1 -2
  253. package/dist/corpus-watermark.js +30 -30
  254. package/dist/cross-lingual-recall.d.ts +1 -2
  255. package/dist/day-summary.d.ts +1 -2
  256. package/dist/delinearize.d.ts +1 -2
  257. package/dist/dependency-propagation-config.d.ts +1 -2
  258. package/dist/{dependency-propagation-delivery-CL6RWXTA.d.ts → dependency-propagation-delivery-D4WMbOwA.d.ts} +1 -1
  259. package/dist/direct-answer-wiring.d.ts +1 -2
  260. package/dist/direct-answer.d.ts +1 -2
  261. package/dist/embedding-fallback.d.ts +1 -2
  262. package/dist/enrichment/index.d.ts +1 -2
  263. package/dist/entity-origin-fields.d.ts +1 -2
  264. package/dist/entity-retrieval.d.ts +2 -3
  265. package/dist/entity-retrieval.js +28 -28
  266. package/dist/entity-schema.d.ts +1 -2
  267. package/dist/episodic-context.d.ts +1 -2
  268. package/dist/eval-trajectory-contracts.d.ts +1 -2
  269. package/dist/eval-trajectory-store.d.ts +1 -2
  270. package/dist/eval-trajectory.d.ts +1 -2
  271. package/dist/explicit-capture.d.ts +9 -10
  272. package/dist/explicit-capture.js +11 -11
  273. package/dist/external-wiki-access.d.ts +11 -12
  274. package/dist/external-wiki-access.js +55 -52
  275. package/dist/external-wiki-collection-registration.d.ts +1 -2
  276. package/dist/external-wiki-collection.d.ts +1 -2
  277. package/dist/external-wiki-mcp-tools.d.ts +11 -12
  278. package/dist/extraction-error-classification.d.ts +1 -2
  279. package/dist/extraction-faithfulness.d.ts +1 -2
  280. package/dist/extraction-faithfulness.js +2 -2
  281. package/dist/extraction-judge-telemetry.d.ts +1 -2
  282. package/dist/extraction-judge-training.d.ts +1 -2
  283. package/dist/extraction-judge.d.ts +1 -2
  284. package/dist/extraction-judge.js +2 -2
  285. package/dist/extraction-liveness.d.ts +1 -2
  286. package/dist/extraction-normalization.d.ts +1 -2
  287. package/dist/extraction-prompt.d.ts +1 -2
  288. package/dist/extraction-source-grounding-rules.d.ts +1 -2
  289. package/dist/extraction-source-grounding.d.ts +1 -2
  290. package/dist/extraction.d.ts +1 -2
  291. package/dist/extraction.js +37 -34
  292. package/dist/fallback-llm.d.ts +7 -2
  293. package/dist/fallback-llm.js +1 -1
  294. package/dist/{first-start-migration-4NETATFF.js → first-start-migration-KHIMCBIC.js} +3 -3
  295. package/dist/graph-dashboard-diff.d.ts +1 -2
  296. package/dist/graph-dashboard-key.d.ts +1 -2
  297. package/dist/graph-dashboard-parser.d.ts +1 -2
  298. package/dist/graph-edge-reinforcement.d.ts +1 -2
  299. package/dist/graph-path-reconstruction.d.ts +1 -2
  300. package/dist/graph-path-scoring.d.ts +1 -2
  301. package/dist/graph-snapshot.d.ts +1 -2
  302. package/dist/graph.d.ts +1 -2
  303. package/dist/harmonic-retrieval.js +1 -1
  304. package/dist/importance.d.ts +1 -2
  305. package/dist/importers/index.d.ts +1 -2
  306. package/dist/in-flight-reads.d.ts +1 -2
  307. package/dist/{index-C7Xep6S9.d.ts → index-DuJnzwHv.d.ts} +2 -2
  308. package/dist/index.d.ts +364 -26
  309. package/dist/index.js +232 -169
  310. package/dist/intent.d.ts +1 -2
  311. package/dist/lcm/engine.d.ts +1 -2
  312. package/dist/lcm/engine.js +4 -4
  313. package/dist/lcm/index.d.ts +1 -2
  314. package/dist/lcm/index.js +10 -10
  315. package/dist/lcm/tools.d.ts +1 -2
  316. package/dist/lifecycle.d.ts +1 -2
  317. package/dist/live-connectors-runner.d.ts +1 -2
  318. package/dist/local-llm.d.ts +1 -2
  319. package/dist/local-model-endpoint.d.ts +1 -2
  320. package/dist/location/index.d.ts +315 -6
  321. package/dist/location/index.js +151 -19
  322. package/dist/maintenance/memory-governance.d.ts +1 -2
  323. package/dist/maintenance/memory-governance.js +28 -28
  324. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -3
  325. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +28 -28
  326. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -3
  327. package/dist/maintenance/rebuild-memory-projection.js +29 -29
  328. package/dist/{maintenance-CJ-xqFp0.d.ts → maintenance-BBeaeYRR.d.ts} +3 -3
  329. package/dist/mcp-memory-inspector-app.d.ts +11 -12
  330. package/dist/mcp-read-only-tools.js +1 -1
  331. package/dist/memory-action-policy.d.ts +1 -2
  332. package/dist/memory-cache.d.ts +1 -2
  333. package/dist/memory-controller.d.ts +1 -2
  334. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -2
  335. package/dist/memory-projection-mutations.js +3 -3
  336. package/dist/memory-projection-store.d.ts +1 -2
  337. package/dist/memory-projection-store.js +1 -1
  338. package/dist/memory-provenance.d.ts +1 -2
  339. package/dist/memory-snapshot.d.ts +1 -2
  340. package/dist/memory-subject-cli.d.ts +11 -12
  341. package/dist/memory-subject.d.ts +11 -12
  342. package/dist/memory-subject.js +4 -4
  343. package/dist/memory-worth-outcomes.d.ts +2 -3
  344. package/dist/models-json.d.ts +1 -2
  345. package/dist/namespaces/migrate.d.ts +3 -4
  346. package/dist/namespaces/migrate.js +29 -29
  347. package/dist/namespaces/principal.d.ts +1 -2
  348. package/dist/namespaces/search.d.ts +1 -2
  349. package/dist/namespaces/search.js +8 -8
  350. package/dist/namespaces/storage.d.ts +3 -4
  351. package/dist/namespaces/storage.js +28 -28
  352. package/dist/native-knowledge.d.ts +1 -2
  353. package/dist/offline-sync-file-io.js +3 -3
  354. package/dist/offline-sync-impression-drain.d.ts +1 -2
  355. package/dist/offline-sync-impression-drain.js +9 -9
  356. package/dist/offline-sync.js +4 -4
  357. package/dist/operator-doctor-corpus.d.ts +1 -2
  358. package/dist/operator-doctor-corpus.js +31 -31
  359. package/dist/operator-doctor-replica.d.ts +1 -2
  360. package/dist/operator-toolkit.d.ts +3 -4
  361. package/dist/operator-toolkit.js +47 -47
  362. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -3
  363. package/dist/orchestration/maintenance.d.ts +4 -5
  364. package/dist/orchestration/maintenance.js +42 -41
  365. package/dist/{orchestrator-BsntWxLy.d.ts → orchestrator-CaqnwNwM.d.ts} +8 -8
  366. package/dist/orchestrator.d.ts +9 -10
  367. package/dist/orchestrator.js +132 -125
  368. package/dist/page-versioning.js +3 -3
  369. package/dist/patterns-cli.d.ts +1 -2
  370. package/dist/{pipeline-CVoysPm2.d.ts → pipeline-CrxVjlJr.d.ts} +1 -1
  371. package/dist/policy-runtime.d.ts +1 -2
  372. package/dist/proactive-contention.d.ts +1 -2
  373. package/dist/provenance.d.ts +1 -2
  374. package/dist/{public-http-CuOxlTC2.d.ts → public-http-Cwvl4QZr.d.ts} +1 -1
  375. package/dist/{purge-GB7PZHT2.js → purge-OP6BEDFY.js} +2 -2
  376. package/dist/{qmd-DWMAGA5l.d.ts → qmd-BZgbJm0g.d.ts} +1 -1
  377. package/dist/qmd-preflight.d.ts +2 -3
  378. package/dist/qmd-recall-cache.d.ts +1 -2
  379. package/dist/qmd.d.ts +2 -3
  380. package/dist/recall-concurrency-config.d.ts +1 -2
  381. package/dist/recall-deep.d.ts +37 -0
  382. package/dist/recall-deep.js +81 -0
  383. package/dist/recall-deep.js.map +1 -0
  384. package/dist/recall-disclosure-escalation.d.ts +1 -2
  385. package/dist/recall-explain-renderer.d.ts +1 -2
  386. package/dist/recall-explain-renderer.js +3 -3
  387. package/dist/recall-memory-map.d.ts +1 -2
  388. package/dist/recall-navigate.d.ts +70 -0
  389. package/dist/recall-navigate.js +51 -0
  390. package/dist/recall-navigate.js.map +1 -0
  391. package/dist/recall-planner-llm.d.ts +1 -2
  392. package/dist/recall-planner-llm.js +1 -1
  393. package/dist/recall-state-view-wire.d.ts +14 -0
  394. package/dist/recall-state-view-wire.js +11 -0
  395. package/dist/recall-state-view.d.ts +25 -0
  396. package/dist/recall-state-view.js +22 -0
  397. package/dist/recall-state-view.js.map +1 -0
  398. package/dist/recall-state.d.ts +1 -2
  399. package/dist/recall-tag-filter.d.ts +1 -2
  400. package/dist/recall-timings.d.ts +1 -2
  401. package/dist/recall-xray-cli.d.ts +1 -2
  402. package/dist/recall-xray-cli.js +4 -4
  403. package/dist/recall-xray-renderer.d.ts +1 -2
  404. package/dist/recall-xray-renderer.js +3 -3
  405. package/dist/recall-xray.d.ts +1 -2
  406. package/dist/recall-xray.js +2 -2
  407. package/dist/reconcile/cursor.d.ts +1 -2
  408. package/dist/reconcile/manifest.d.ts +1 -2
  409. package/dist/reconcile/manifest.js +4 -4
  410. package/dist/reconcile/plan.d.ts +1 -2
  411. package/dist/replay/normalizers/chatgpt.d.ts +1 -2
  412. package/dist/replay/normalizers/claude.d.ts +1 -2
  413. package/dist/replay/normalizers/openclaw.d.ts +1 -2
  414. package/dist/replay/normalizers/shared.d.ts +1 -2
  415. package/dist/replay/runner.d.ts +1 -2
  416. package/dist/replay/types.d.ts +1 -2
  417. package/dist/replica-divergence.d.ts +1 -2
  418. package/dist/replica-peers-config.d.ts +1 -2
  419. package/dist/{resolution-XWBPKYFB.js → resolution-4DLI3IOR.js} +10 -10
  420. package/dist/resolution-4DLI3IOR.js.map +1 -0
  421. package/dist/resolve-auth-token.d.ts +1 -2
  422. package/dist/resume-bundles.js +12 -12
  423. package/dist/retrieval-agents.d.ts +2 -3
  424. package/dist/retrieval-tiers.d.ts +1 -2
  425. package/dist/routing/engine.d.ts +1 -2
  426. package/dist/routing/store.d.ts +1 -2
  427. package/dist/salvage-envelope.d.ts +1 -2
  428. package/dist/salvage-envelope.js +6 -6
  429. package/dist/schemas.d.ts +570 -105
  430. package/dist/schemas.js +3 -1
  431. package/dist/{scope-profiles-CPWkW_dI.d.ts → scope-profiles-DFaojvoP.d.ts} +1 -1
  432. package/dist/search/document-scanner.js +1 -1
  433. package/dist/search/embed-helper.d.ts +1 -2
  434. package/dist/search/factory.d.ts +1 -2
  435. package/dist/search/factory.js +7 -7
  436. package/dist/search/index.d.ts +1 -2
  437. package/dist/search/index.js +13 -13
  438. package/dist/search/lancedb-backend.d.ts +1 -2
  439. package/dist/search/lancedb-backend.js +1 -1
  440. package/dist/search/meilisearch-backend.d.ts +1 -2
  441. package/dist/search/meilisearch-backend.js +1 -1
  442. package/dist/search/noop-backend.d.ts +1 -2
  443. package/dist/search/orama-backend.d.ts +1 -2
  444. package/dist/search/orama-backend.js +1 -1
  445. package/dist/search/port.d.ts +1 -2
  446. package/dist/search/remote-backend.d.ts +1 -2
  447. package/dist/secure-store/index.js +3 -3
  448. package/dist/{semantic-consolidation-CNFVBXFc.d.ts → semantic-consolidation-BiX68wZA.d.ts} +1 -1
  449. package/dist/semantic-consolidation.d.ts +2 -3
  450. package/dist/semantic-consolidation.js +29 -29
  451. package/dist/semantic-rule-promotion.js +28 -28
  452. package/dist/semantic-rule-verifier.d.ts +1 -2
  453. package/dist/semantic-rule-verifier.js +28 -28
  454. package/dist/{service-Bb-JIdQ0.d.ts → service-D5h2zZ0M.d.ts} +2 -2
  455. package/dist/session-observer-bands.d.ts +1 -2
  456. package/dist/session-observer-state.d.ts +1 -2
  457. package/dist/shared-context/manager.d.ts +1 -2
  458. package/dist/signal.d.ts +1 -2
  459. package/dist/source-agent-qualifier.d.ts +1 -2
  460. package/dist/source-agent-qualifier.js +35 -32
  461. package/dist/standup/build.d.ts +16 -0
  462. package/dist/standup/build.js +17 -0
  463. package/dist/standup/build.js.map +1 -0
  464. package/dist/{storage-CukrlNKk.d.ts → storage-CtsaojWD.d.ts} +1 -1
  465. package/dist/storage.d.ts +2 -3
  466. package/dist/storage.js +27 -27
  467. package/dist/subject-config.d.ts +1 -2
  468. package/dist/subject-config.js +5 -5
  469. package/dist/summarizer.d.ts +1 -2
  470. package/dist/summarizer.js +2 -2
  471. package/dist/summary-snapshot.d.ts +1 -2
  472. package/dist/support-passport/index.d.ts +16 -17
  473. package/dist/support-passport/index.js +57 -54
  474. package/dist/temporal-supersession.d.ts +2 -3
  475. package/dist/temporal-timeline-recall.d.ts +1 -2
  476. package/dist/temporal-validity.d.ts +1 -2
  477. package/dist/threading.d.ts +1 -2
  478. package/dist/tier-migration.d.ts +2 -3
  479. package/dist/tier-routing.d.ts +1 -2
  480. package/dist/tier-routing.js +2 -2
  481. package/dist/{tier-stats-4B5IJ3NE.js → tier-stats-2TOW3QNL.js} +3 -3
  482. package/dist/topics.d.ts +1 -2
  483. package/dist/transcript.d.ts +1 -2
  484. package/dist/transfer/capsule-import.js +4 -4
  485. package/dist/transfer/export-okf.d.ts +39 -0
  486. package/dist/transfer/export-okf.js +112 -0
  487. package/dist/transfer/export-okf.js.map +1 -0
  488. package/dist/trust-score-stage.d.ts +1 -2
  489. package/dist/trust-score.d.ts +1 -2
  490. package/dist/{types-djxQlxJ7.d.ts → types-CIpfYz1I.d.ts} +132 -12
  491. package/dist/types.d.ts +1 -2
  492. package/dist/types.js +1 -1
  493. package/dist/utility-runtime.d.ts +1 -2
  494. package/dist/verified-recall.js +28 -28
  495. package/dist/who-knows-cli.d.ts +11 -12
  496. package/dist/who-knows-cli.js +29 -29
  497. package/dist/who-knows.d.ts +11 -12
  498. package/dist/who-knows.js +28 -28
  499. package/dist/write-envelope.d.ts +1 -2
  500. package/dist/write-envelope.js +5 -5
  501. package/package.json +34 -3
  502. package/src/access-admin-ops-surface.ts +6 -1
  503. package/src/access-boundary.ts +1 -0
  504. package/src/access-http.ts +3 -1
  505. package/src/access-mcp-output-schemas.ts +1 -0
  506. package/src/access-mcp.ts +3 -3
  507. package/src/access-operations.ts +1 -0
  508. package/src/access-service-offline-file-content.test.ts +63 -0
  509. package/src/access-surface-catalog.ts +2 -0
  510. package/src/activity/config.test.ts +1 -0
  511. package/src/activity/config.ts +66 -1
  512. package/src/activity/index.ts +3 -0
  513. package/src/activity/journal.test.ts +97 -0
  514. package/src/activity/journal.ts +113 -0
  515. package/src/activity/privacy.test.ts +53 -0
  516. package/src/activity/privacy.ts +80 -0
  517. package/src/activity/timeline/build.ts +279 -0
  518. package/src/activity/timeline/categories.ts +111 -0
  519. package/src/activity/timeline/classify.ts +110 -0
  520. package/src/activity/timeline/corrections.ts +145 -0
  521. package/src/activity/timeline/index.ts +8 -0
  522. package/src/activity/timeline/journal-recap.test.ts +113 -0
  523. package/src/activity/timeline/journal-recap.ts +130 -0
  524. package/src/activity/timeline/query.test.ts +198 -0
  525. package/src/activity/timeline/query.ts +313 -0
  526. package/src/activity/timeline/timeline.test.ts +277 -0
  527. package/src/activity/timeline/types.ts +106 -0
  528. package/src/activity/timeline/weekly.test.ts +215 -0
  529. package/src/activity/timeline/weekly.ts +234 -0
  530. package/src/activity/types.ts +20 -0
  531. package/src/activity/vault-publish.test.ts +166 -0
  532. package/src/activity/vault-publish.ts +101 -0
  533. package/src/cli/okf-commands.ts +45 -0
  534. package/src/cli.ts +2 -2
  535. package/src/coding/export-okf-codegraph.test.ts +381 -0
  536. package/src/coding/export-okf-codegraph.ts +565 -0
  537. package/src/config.test.ts +1 -0
  538. package/src/config.ts +2 -22
  539. package/src/dedup/merge-on-write.test.ts +91 -0
  540. package/src/dedup/merge-on-write.ts +75 -0
  541. package/src/dedup/novelty-gate.test.ts +143 -0
  542. package/src/dedup/novelty-gate.ts +163 -0
  543. package/src/extraction-prompt-safety.test.ts +14 -2
  544. package/src/extraction.ts +21 -1
  545. package/src/fallback-llm.test.ts +134 -0
  546. package/src/fallback-llm.ts +77 -5
  547. package/src/location/access-operations.ts +17 -8
  548. package/src/location/backfill.ts +137 -0
  549. package/src/location/config.test.ts +3 -0
  550. package/src/location/config.ts +46 -2
  551. package/src/location/http-glue.ts +1 -1
  552. package/src/location/index.ts +3 -0
  553. package/src/location/intervals.ts +1 -0
  554. package/src/location/matching.test.ts +65 -0
  555. package/src/location/matching.ts +354 -0
  556. package/src/location/mcp-tools.ts +2 -1
  557. package/src/location/recall-exclusion.test.ts +1 -0
  558. package/src/location/surfaces.test.ts +15 -2
  559. package/src/location/surfaces.ts +95 -18
  560. package/src/location/tagging.test.ts +119 -0
  561. package/src/location/tagging.ts +277 -0
  562. package/src/location/types.ts +23 -1
  563. package/src/mcp-read-only-tools.ts +1 -0
  564. package/src/memory-projection-store.ts +3 -1
  565. package/src/okf/cli.ts +18 -5
  566. package/src/okf/config.ts +5 -0
  567. package/src/okf/index-files.test.ts +60 -0
  568. package/src/okf/index-files.ts +114 -0
  569. package/src/okf/render.ts +133 -0
  570. package/src/okf/type-mapping.test.ts +3 -0
  571. package/src/okf/type-mapping.ts +2 -0
  572. package/src/orchestration/extraction-persist.ts +22 -23
  573. package/src/orchestration/extraction-run.ts +2 -1
  574. package/src/orchestration/generic-recall-paths.ts +15 -3
  575. package/src/orchestration/recall-entry.ts +8 -3
  576. package/src/recall-deep.test.ts +72 -0
  577. package/src/recall-deep.ts +113 -0
  578. package/src/recall-navigate.test.ts +84 -0
  579. package/src/recall-navigate.ts +100 -0
  580. package/src/recall-state-view-wire.test.ts +35 -0
  581. package/src/recall-state-view-wire.ts +28 -0
  582. package/src/recall-state-view.test.ts +131 -0
  583. package/src/recall-state-view.ts +138 -0
  584. package/src/schemas.ts +17 -1
  585. package/src/shared-context/governance.test.ts +53 -0
  586. package/src/shared-context/governance.ts +86 -0
  587. package/src/standup/access-operations.ts +14 -0
  588. package/src/standup/build.test.ts +34 -0
  589. package/src/standup/build.ts +115 -0
  590. package/src/standup/http-glue.ts +15 -0
  591. package/src/standup/mcp-tools.ts +16 -0
  592. package/src/support-passport/card-projection.ts +1 -0
  593. package/src/support-passport/card-service-commit-forwarding.test.ts +1 -0
  594. package/src/support-passport/card-service.test.ts +75 -1
  595. package/src/support-passport/card-service.ts +6 -3
  596. package/src/support-passport/card-state.ts +5 -1
  597. package/src/support-passport/offline-sync-guard.ts +14 -1
  598. package/src/transfer/export-okf.test.ts +164 -0
  599. package/src/transfer/export-okf.ts +286 -0
  600. package/src/types.ts +3 -10
  601. package/dist/chunk-2LWQSV6A.js.map +0 -1
  602. package/dist/chunk-3BCULS4U.js.map +0 -1
  603. package/dist/chunk-7BDZTALN.js.map +0 -1
  604. package/dist/chunk-7PHI6GUI.js.map +0 -1
  605. package/dist/chunk-7WOWGRAU.js.map +0 -1
  606. package/dist/chunk-AX7UXCHJ.js.map +0 -1
  607. package/dist/chunk-DEACDKE3.js.map +0 -1
  608. package/dist/chunk-FP7YTTVO.js.map +0 -1
  609. package/dist/chunk-JYSN42VN.js.map +0 -1
  610. package/dist/chunk-KZIF6XHX.js.map +0 -1
  611. package/dist/chunk-LKYIOCWL.js.map +0 -1
  612. package/dist/chunk-OXRRJXPR.js.map +0 -1
  613. package/dist/chunk-U7EW2W4W.js.map +0 -1
  614. package/dist/chunk-UW5NPZJ2.js.map +0 -1
  615. package/dist/chunk-XAB6STPO.js.map +0 -1
  616. package/dist/chunk-XNWXSGHS.js.map +0 -1
  617. package/dist/types-CM86alG1.d.ts +0 -89
  618. /package/dist/{auto-sync-2YPITIWN.js.map → auto-sync-Q6Q2FVSC.js.map} +0 -0
  619. /package/dist/{capsule-merge-SGIVB3WA.js.map → capsule-merge-SEHERWWP.js.map} +0 -0
  620. /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
  621. /package/dist/{chunk-TFR3HG4K.js.map → chunk-2FA7U5XY.js.map} +0 -0
  622. /package/dist/{chunk-PO7NXBG2.js.map → chunk-2GF27PGH.js.map} +0 -0
  623. /package/dist/{chunk-MY2BC6UE.js.map → chunk-2X6BGKQL.js.map} +0 -0
  624. /package/dist/{chunk-UEBDCMOO.js.map → chunk-3TSU662L.js.map} +0 -0
  625. /package/dist/{chunk-S5XOSTYM.js.map → chunk-4XLTUR6R.js.map} +0 -0
  626. /package/dist/{chunk-BWGCOLEL.js.map → chunk-65JOGLIS.js.map} +0 -0
  627. /package/dist/{chunk-HMZKGHMD.js.map → chunk-7UOXCCCI.js.map} +0 -0
  628. /package/dist/{chunk-4F4AQFWL.js.map → chunk-B4AOWRYF.js.map} +0 -0
  629. /package/dist/{chunk-ODU2CNNX.js.map → chunk-C5IUOBCN.js.map} +0 -0
  630. /package/dist/{chunk-3A2NJP2U.js.map → chunk-CHGG74CY.js.map} +0 -0
  631. /package/dist/{chunk-76DIF5KT.js.map → chunk-CX4OLNIH.js.map} +0 -0
  632. /package/dist/{chunk-Z3YEGSR4.js.map → chunk-D3UXGE5D.js.map} +0 -0
  633. /package/dist/{chunk-5HK3CJAR.js.map → chunk-D6Q5EPOV.js.map} +0 -0
  634. /package/dist/{chunk-EGBDFJ36.js.map → chunk-DD5JFCWM.js.map} +0 -0
  635. /package/dist/{chunk-XBGHAAKR.js.map → chunk-DDX6KIXF.js.map} +0 -0
  636. /package/dist/{chunk-JIYDRBVZ.js.map → chunk-DJORULH3.js.map} +0 -0
  637. /package/dist/{chunk-7KQB4EBS.js.map → chunk-DUAJKRR2.js.map} +0 -0
  638. /package/dist/{chunk-Q57GOHLF.js.map → chunk-EGALNSZ4.js.map} +0 -0
  639. /package/dist/{chunk-DPCXDG7G.js.map → chunk-EH65UV2Z.js.map} +0 -0
  640. /package/dist/{chunk-KCT36JAW.js.map → chunk-ESNFSSO4.js.map} +0 -0
  641. /package/dist/{chunk-XQ3HXAQH.js.map → chunk-ET2CNMLD.js.map} +0 -0
  642. /package/dist/{chunk-TUHBYJXL.js.map → chunk-EWKVYCFP.js.map} +0 -0
  643. /package/dist/{chunk-NPFUNWNX.js.map → chunk-FFUMTH27.js.map} +0 -0
  644. /package/dist/{chunk-3PKAS6VL.js.map → chunk-GAJK3DQ5.js.map} +0 -0
  645. /package/dist/{chunk-DA7ITC5Z.js.map → chunk-GBEOUCBB.js.map} +0 -0
  646. /package/dist/{chunk-UENKPWCS.js.map → chunk-H2IRSXZN.js.map} +0 -0
  647. /package/dist/{chunk-CFVTRUR3.js.map → chunk-H6RSANGQ.js.map} +0 -0
  648. /package/dist/{chunk-EUYWQ7TS.js.map → chunk-IEZ6CGTW.js.map} +0 -0
  649. /package/dist/{chunk-3SZD4CYO.js.map → chunk-IGZCAHFL.js.map} +0 -0
  650. /package/dist/{chunk-UPFNQJC7.js.map → chunk-INUBU6I5.js.map} +0 -0
  651. /package/dist/{chunk-PMVPCZJZ.js.map → chunk-J2R275FN.js.map} +0 -0
  652. /package/dist/{chunk-2QSZNTDO.js.map → chunk-JBPKEARU.js.map} +0 -0
  653. /package/dist/{chunk-5ACCD4L7.js.map → chunk-JRRQ747T.js.map} +0 -0
  654. /package/dist/{chunk-V4IDF3EZ.js.map → chunk-JTWZKNUH.js.map} +0 -0
  655. /package/dist/{chunk-AZMLH5UT.js.map → chunk-KI64TTBL.js.map} +0 -0
  656. /package/dist/{chunk-NPIBN2VL.js.map → chunk-LK4TOYPU.js.map} +0 -0
  657. /package/dist/{chunk-UTQUEHC7.js.map → chunk-LUDBXTBJ.js.map} +0 -0
  658. /package/dist/{chunk-PU56CXZA.js.map → chunk-LYUUA6QB.js.map} +0 -0
  659. /package/dist/{chunk-P36Z4JRA.js.map → chunk-M5ERTI4I.js.map} +0 -0
  660. /package/dist/{chunk-LDKPDODJ.js.map → chunk-ME35HVDJ.js.map} +0 -0
  661. /package/dist/{chunk-773TRRGT.js.map → chunk-MJUCDM3C.js.map} +0 -0
  662. /package/dist/{chunk-AHPIFKNG.js.map → chunk-N4F7ZSSG.js.map} +0 -0
  663. /package/dist/{chunk-JOZUBF4A.js.map → chunk-NACLNNFQ.js.map} +0 -0
  664. /package/dist/{chunk-LC2BDILZ.js.map → chunk-NBP4EX5N.js.map} +0 -0
  665. /package/dist/{chunk-T7XP6IZE.js.map → chunk-NFP4KPTA.js.map} +0 -0
  666. /package/dist/{chunk-ZVPVTPGI.js.map → chunk-NNZFPYYX.js.map} +0 -0
  667. /package/dist/{chunk-LPNCR4QK.js.map → chunk-NSTNGMSS.js.map} +0 -0
  668. /package/dist/{chunk-5RWZH6PH.js.map → chunk-NUF7VSEX.js.map} +0 -0
  669. /package/dist/{chunk-7VZFRUQU.js.map → chunk-O7ERGZDA.js.map} +0 -0
  670. /package/dist/{chunk-HSZMX3ZJ.js.map → chunk-ODW5GDFE.js.map} +0 -0
  671. /package/dist/{chunk-5DHKCO52.js.map → chunk-OJUEUQDJ.js.map} +0 -0
  672. /package/dist/{chunk-LOXHYCVS.js.map → chunk-OMX6TKXH.js.map} +0 -0
  673. /package/dist/{chunk-J2WC5LF4.js.map → chunk-QBC33MPY.js.map} +0 -0
  674. /package/dist/{chunk-SEEJOGQX.js.map → chunk-QBNE55VA.js.map} +0 -0
  675. /package/dist/{chunk-F7XUD3PL.js.map → chunk-S4CDUXQY.js.map} +0 -0
  676. /package/dist/{chunk-WNXYT4MK.js.map → chunk-S4Z2OBTX.js.map} +0 -0
  677. /package/dist/{chunk-UL4MKZHI.js.map → chunk-SN4JXNLL.js.map} +0 -0
  678. /package/dist/{chunk-CAMNRAJF.js.map → chunk-SZMYGDSM.js.map} +0 -0
  679. /package/dist/{chunk-CPA5NBHN.js.map → chunk-TNGH4ZYI.js.map} +0 -0
  680. /package/dist/{chunk-F3NVYTTA.js.map → chunk-TNXNECAN.js.map} +0 -0
  681. /package/dist/{chunk-BEC4YBNA.js.map → chunk-TVW4C7PV.js.map} +0 -0
  682. /package/dist/{chunk-UFKPQBXH.js.map → chunk-U62OK7BB.js.map} +0 -0
  683. /package/dist/{chunk-4QEYREAV.js.map → chunk-U6NGKS32.js.map} +0 -0
  684. /package/dist/{chunk-HRHO3ZNG.js.map → chunk-UW4RYPWC.js.map} +0 -0
  685. /package/dist/{chunk-T6ILXUAH.js.map → chunk-VG4SSPAW.js.map} +0 -0
  686. /package/dist/{chunk-H2YSH3DG.js.map → chunk-WKAXBXVA.js.map} +0 -0
  687. /package/dist/{chunk-SXIMQLGV.js.map → chunk-WVGXCBOC.js.map} +0 -0
  688. /package/dist/{chunk-UNUMFURP.js.map → chunk-X5PIDJ3L.js.map} +0 -0
  689. /package/dist/{chunk-CRML27CO.js.map → chunk-X5YYSAZX.js.map} +0 -0
  690. /package/dist/{chunk-FZEEWOI2.js.map → chunk-XJJYSX6F.js.map} +0 -0
  691. /package/dist/{chunk-OA2O2GJ4.js.map → chunk-XOHYGIWF.js.map} +0 -0
  692. /package/dist/{chunk-UG6VXIOK.js.map → chunk-XSTNGNJP.js.map} +0 -0
  693. /package/dist/{chunk-YDPAE2RD.js.map → chunk-YFLLGRXO.js.map} +0 -0
  694. /package/dist/{chunk-MDD2RINF.js.map → chunk-YWPLOJ7T.js.map} +0 -0
  695. /package/dist/{chunk-Q4WONDMJ.js.map → chunk-YYGZJPOK.js.map} +0 -0
  696. /package/dist/{chunk-GTO56JY5.js.map → chunk-ZPS724LT.js.map} +0 -0
  697. /package/dist/{chunk-SNOIKAHM.js.map → chunk-ZZZWEDF4.js.map} +0 -0
  698. /package/dist/{contradiction-scan-AKUWPX5N.js.map → contradiction-scan-NOYMFG66.js.map} +0 -0
  699. /package/dist/{first-start-migration-4NETATFF.js.map → first-start-migration-KHIMCBIC.js.map} +0 -0
  700. /package/dist/{purge-GB7PZHT2.js.map → purge-OP6BEDFY.js.map} +0 -0
  701. /package/dist/{resolution-XWBPKYFB.js.map → recall-state-view-wire.js.map} +0 -0
  702. /package/dist/{tier-stats-4B5IJ3NE.js.map → tier-stats-2TOW3QNL.js.map} +0 -0
@@ -6,14 +6,14 @@ import {
6
6
  loadSyncState,
7
7
  syncWearableSource,
8
8
  wearableSourceLabel
9
- } from "./chunk-UEBDCMOO.js";
9
+ } from "./chunk-3TSU662L.js";
10
10
  import {
11
11
  CompressionGuidelineCoordinator
12
12
  } from "./chunk-UXREWVW4.js";
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-LPNCR4QK.js";
16
+ } from "./chunk-NSTNGMSS.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-7HYPN2GC.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-Z3YEGSR4.js";
25
+ } from "./chunk-D3UXGE5D.js";
26
26
  import {
27
27
  chunkTranscriptEntries
28
28
  } from "./chunk-TECVW3JP.js";
@@ -32,39 +32,39 @@ import {
32
32
  import {
33
33
  CompoundingEngine,
34
34
  defaultTierMigrationCycleBudget
35
- } from "./chunk-3SZD4CYO.js";
35
+ } from "./chunk-IGZCAHFL.js";
36
36
  import {
37
37
  SharedContextManager
38
38
  } from "./chunk-VI637ILW.js";
39
- import {
40
- cleanArchivedUserMessage
41
- } from "./chunk-47DU4SGJ.js";
42
39
  import {
43
40
  applyUtilityPromotionRuntimePolicy,
44
41
  applyUtilityRankingRuntimeDelta,
45
42
  loadUtilityRuntimeValues
46
43
  } from "./chunk-SEF4IOFE.js";
47
44
  import {
48
- extractTopics
49
- } from "./chunk-KVDUKH5E.js";
50
- import {
51
- buildTemporalTimelineRecallSection
52
- } from "./chunk-2NKY7OC6.js";
53
- import {
54
- CODEX_THREAD_KEY_PREFIX
55
- } from "./chunk-4EX5WZ4M.js";
45
+ cleanArchivedUserMessage
46
+ } from "./chunk-47DU4SGJ.js";
56
47
  import {
57
48
  TierMigrationExecutor
58
49
  } from "./chunk-YRFAYOFQ.js";
59
50
  import {
60
51
  decideTierTransition
61
- } from "./chunk-EGBDFJ36.js";
52
+ } from "./chunk-DD5JFCWM.js";
62
53
  import {
63
54
  TmtBuilder
64
55
  } from "./chunk-ECZU5BJH.js";
56
+ import {
57
+ extractTopics
58
+ } from "./chunk-KVDUKH5E.js";
59
+ import {
60
+ buildTemporalTimelineRecallSection
61
+ } from "./chunk-2NKY7OC6.js";
62
+ import {
63
+ CODEX_THREAD_KEY_PREFIX
64
+ } from "./chunk-4EX5WZ4M.js";
65
65
  import {
66
66
  HourlySummarizer
67
- } from "./chunk-EUYWQ7TS.js";
67
+ } from "./chunk-IEZ6CGTW.js";
68
68
  import {
69
69
  buildTargetedFactRecallSection,
70
70
  shouldRecallTargetedFactEvidence
@@ -72,10 +72,6 @@ import {
72
72
  import {
73
73
  SessionObserverState
74
74
  } from "./chunk-ODZKV2F7.js";
75
- import {
76
- buildResponseGuidanceRecallSection,
77
- shouldRecallResponseGuidance
78
- } from "./chunk-6TCXIRP5.js";
79
75
  import {
80
76
  mergeWithAgentResults,
81
77
  runDirectAgent,
@@ -100,9 +96,6 @@ import {
100
96
  import {
101
97
  applyRuntimeRetrievalPolicy
102
98
  } from "./chunk-5IZL4DCV.js";
103
- import {
104
- findUnresolvedEntityRefs
105
- } from "./chunk-X7XN6YU4.js";
106
99
  import {
107
100
  RelevanceStore
108
101
  } from "./chunk-KATEWTQJ.js";
@@ -111,6 +104,16 @@ import {
111
104
  reorderByRankedKeys,
112
105
  rerankLocalOrNoop
113
106
  } from "./chunk-LUDXM7MD.js";
107
+ import {
108
+ buildResponseGuidanceRecallSection,
109
+ shouldRecallResponseGuidance
110
+ } from "./chunk-6TCXIRP5.js";
111
+ import {
112
+ findUnresolvedEntityRefs
113
+ } from "./chunk-X7XN6YU4.js";
114
+ import {
115
+ applyRecallStateViews
116
+ } from "./chunk-WFCWP4XU.js";
114
117
  import {
115
118
  dedupeResultsByNamespace,
116
119
  hasMemoryForResult,
@@ -157,10 +160,10 @@ import {
157
160
  } from "./chunk-OH7QLI6W.js";
158
161
  import {
159
162
  ExtractionEngine
160
- } from "./chunk-U7EW2W4W.js";
163
+ } from "./chunk-XKNHFDTT.js";
161
164
  import {
162
165
  parseMemoryActionEligibilityContext
163
- } from "./chunk-7BDZTALN.js";
166
+ } from "./chunk-AJTG3CP7.js";
164
167
  import {
165
168
  ModelRegistry
166
169
  } from "./chunk-WLZYGLJ4.js";
@@ -173,7 +176,7 @@ import {
173
176
  getVerdictKind,
174
177
  judgeFactDurability,
175
178
  validateProcedureExtraction
176
- } from "./chunk-HSZMX3ZJ.js";
179
+ } from "./chunk-ODW5GDFE.js";
177
180
  import {
178
181
  buildEventOrderRecallSection
179
182
  } from "./chunk-645WOU5I.js";
@@ -191,7 +194,7 @@ import {
191
194
  buildEntityRecallSection,
192
195
  entityRecentTranscriptLookbackHours,
193
196
  readRecentEntityTranscriptEntries
194
- } from "./chunk-PU56CXZA.js";
197
+ } from "./chunk-LYUUA6QB.js";
195
198
  import {
196
199
  planEpisodeWindowsWithFallback
197
200
  } from "./chunk-T3GIETKV.js";
@@ -206,31 +209,31 @@ import {
206
209
  } from "./chunk-LVXBC6YB.js";
207
210
  import {
208
211
  refreshConvergedNamespaces
209
- } from "./chunk-AZMLH5UT.js";
212
+ } from "./chunk-KI64TTBL.js";
210
213
  import {
211
214
  builtInConnectorPackageSpecifier,
212
215
  ensureBuiltInWearableConnectors,
213
216
  getWearableConnector,
214
217
  listWearableConnectors,
215
218
  screenCandidateFact
216
- } from "./chunk-JYSN42VN.js";
217
- import {
218
- RoutingRulesStore
219
- } from "./chunk-TBUEE7XF.js";
219
+ } from "./chunk-RPIS5FQ7.js";
220
220
  import {
221
221
  normalizeReplaySessionKey
222
222
  } from "./chunk-AJVLDJU6.js";
223
+ import {
224
+ RoutingRulesStore
225
+ } from "./chunk-TBUEE7XF.js";
223
226
  import {
224
227
  compareVerifiedEpisodeResults,
225
228
  searchVerifiedEpisodes
226
- } from "./chunk-GTO56JY5.js";
229
+ } from "./chunk-ZPS724LT.js";
227
230
  import {
228
231
  ThreadingManager
229
232
  } from "./chunk-OJP3N7UK.js";
230
233
  import {
231
234
  compareVerifiedSemanticRuleResults,
232
235
  searchVerifiedSemanticRules
233
- } from "./chunk-P36Z4JRA.js";
236
+ } from "./chunk-M5ERTI4I.js";
234
237
  import {
235
238
  searchWorkProductLedgerEntries
236
239
  } from "./chunk-NRLELHAY.js";
@@ -243,17 +246,17 @@ import {
243
246
  import {
244
247
  runNamespaceMaintenanceFanout,
245
248
  summarizeNamespaceMaintenanceHealth
246
- } from "./chunk-MY2BC6UE.js";
249
+ } from "./chunk-2X6BGKQL.js";
247
250
  import {
248
251
  planNamespaceMaintenance
249
- } from "./chunk-WNXYT4MK.js";
252
+ } from "./chunk-S4Z2OBTX.js";
250
253
  import {
251
254
  isAboveImportanceThreshold,
252
255
  scoreImportance
253
256
  } from "./chunk-UOBPK2OS.js";
254
257
  import {
255
258
  searchHarmonicRetrieval
256
- } from "./chunk-TUHBYJXL.js";
259
+ } from "./chunk-EWKVYCFP.js";
257
260
  import {
258
261
  EXTRACTION_JUDGE_VERDICT_CATEGORY,
259
262
  recordJudgeVerdict
@@ -281,7 +284,7 @@ import {
281
284
  materializeAfterSemanticConsolidation,
282
285
  parseConsolidationResponse,
283
286
  parseOperatorAwareConsolidationResponse
284
- } from "./chunk-UPFNQJC7.js";
287
+ } from "./chunk-INUBU6I5.js";
285
288
  import {
286
289
  semanticChunkContent
287
290
  } from "./chunk-2GBFKHBZ.js";
@@ -290,7 +293,7 @@ import {
290
293
  } from "./chunk-6TBIWIAG.js";
291
294
  import {
292
295
  SmartBuffer
293
- } from "./chunk-JOZUBF4A.js";
296
+ } from "./chunk-NACLNNFQ.js";
294
297
  import {
295
298
  buildRecallQueryPolicy
296
299
  } from "./chunk-C6WMSXCJ.js";
@@ -311,8 +314,10 @@ import {
311
314
  evaluateMemoryActionPolicy
312
315
  } from "./chunk-MI2OTWV5.js";
313
316
  import {
314
- detectMeetings
315
- } from "./chunk-7WOWGRAU.js";
317
+ applyNoveltyGate,
318
+ detectMeetings,
319
+ embeddingsFromCosineHits
320
+ } from "./chunk-AF5H7TKI.js";
316
321
  import {
317
322
  compileCorrectionRule,
318
323
  correctionsFilePath,
@@ -325,19 +330,14 @@ import {
325
330
  } from "./chunk-QW27DOHG.js";
326
331
  import {
327
332
  MeetingsInputError
328
- } from "./chunk-KZIF6XHX.js";
333
+ } from "./chunk-U65VJSCJ.js";
329
334
  import {
330
335
  WearablesInputError,
331
336
  describeErrorForOperator
332
337
  } from "./chunk-V7IZKJI3.js";
333
338
  import {
334
339
  NamespaceCatalog
335
- } from "./chunk-3PKAS6VL.js";
336
- import {
337
- activityDayWindow,
338
- isValidActivityDate,
339
- timezoneOffsetIso
340
- } from "./chunk-M6L7HI7R.js";
340
+ } from "./chunk-GAJK3DQ5.js";
341
341
  import {
342
342
  recordDreamsPhaseRun
343
343
  } from "./chunk-EQWEIIKQ.js";
@@ -354,10 +354,10 @@ import {
354
354
  filterRecallCandidates,
355
355
  isGenericRecallExcludedPath,
356
356
  isTopLevelArchivePath
357
- } from "./chunk-OXRRJXPR.js";
357
+ } from "./chunk-MUEGIKKY.js";
358
358
  import {
359
359
  importCapsule
360
- } from "./chunk-PMVPCZJZ.js";
360
+ } from "./chunk-J2R275FN.js";
361
361
  import {
362
362
  isCodingGraphInstalled
363
363
  } from "./chunk-VQ7B2Q6M.js";
@@ -380,7 +380,7 @@ import {
380
380
  } from "./chunk-ZVZHG7AI.js";
381
381
  import {
382
382
  buildXraySnapshot
383
- } from "./chunk-NPIBN2VL.js";
383
+ } from "./chunk-LK4TOYPU.js";
384
384
  import {
385
385
  objectiveStateStoreOverrideForNamespace,
386
386
  searchObjectiveStateSnapshots
@@ -397,7 +397,7 @@ import {
397
397
  } from "./chunk-IVKIODHO.js";
398
398
  import {
399
399
  shouldSkipImplicitExtraction
400
- } from "./chunk-CRML27CO.js";
400
+ } from "./chunk-X5YYSAZX.js";
401
401
  import {
402
402
  boundRecallContextComposition,
403
403
  composeRecallContext,
@@ -408,7 +408,7 @@ import {
408
408
  } from "./chunk-7ZNJN5WZ.js";
409
409
  import {
410
410
  NamespaceStorageRouter
411
- } from "./chunk-F7XUD3PL.js";
411
+ } from "./chunk-S4CDUXQY.js";
412
412
  import {
413
413
  GraphIndex
414
414
  } from "./chunk-YMOPYG3K.js";
@@ -452,7 +452,7 @@ import {
452
452
  throwIfRecallAborted,
453
453
  tokenizeRecallQuery,
454
454
  utcDateKeysForLocalDay
455
- } from "./chunk-YEUXERJ6.js";
455
+ } from "./chunk-RDGKVH6T.js";
456
456
  import {
457
457
  inferIntentFromText,
458
458
  intentCompatibilityScore,
@@ -465,7 +465,7 @@ import {
465
465
  } from "./chunk-TBBDFYXW.js";
466
466
  import {
467
467
  buildChainFollowupGenerator
468
- } from "./chunk-HMZKGHMD.js";
468
+ } from "./chunk-7UOXCCCI.js";
469
469
  import {
470
470
  QmdResultResolver,
471
471
  StorageManager,
@@ -484,7 +484,10 @@ import {
484
484
  reconstructFusionInputs,
485
485
  selfDeps,
486
486
  serializeFusionDay
487
- } from "./chunk-W2BAGGEW.js";
487
+ } from "./chunk-2ITZ74A6.js";
488
+ import {
489
+ buildRetiredFactTombstoneInputs
490
+ } from "./chunk-4ZWCQJNM.js";
488
491
  import {
489
492
  bodyIsEscaped,
490
493
  decodeTranscriptBody,
@@ -495,18 +498,15 @@ import {
495
498
  saveSpeakerRegistry,
496
499
  speakerRegistryKey
497
500
  } from "./chunk-UHVXE24Y.js";
498
- import {
499
- buildRetiredFactTombstoneInputs
500
- } from "./chunk-4ZWCQJNM.js";
501
501
  import {
502
502
  NamespaceSearchRouter,
503
503
  namespaceCollectionName
504
- } from "./chunk-ODU2CNNX.js";
504
+ } from "./chunk-C5IUOBCN.js";
505
505
  import {
506
506
  createConversationIndexRuntime,
507
507
  createSearchBackend,
508
508
  isSearchBackendEnabled
509
- } from "./chunk-4QEYREAV.js";
509
+ } from "./chunk-U6NGKS32.js";
510
510
  import {
511
511
  NoopSearchBackend
512
512
  } from "./chunk-CYEPCZN5.js";
@@ -520,7 +520,7 @@ import {
520
520
  } from "./chunk-S2V7RUCL.js";
521
521
  import {
522
522
  confidenceTier
523
- } from "./chunk-MINHJ55X.js";
523
+ } from "./chunk-XXW32OL7.js";
524
524
  import {
525
525
  lintWorkspaceFiles,
526
526
  rotateMarkdownFileToArchive
@@ -529,15 +529,7 @@ import {
529
529
  applyFaithfulnessVerdict,
530
530
  createFaithfulnessCounters,
531
531
  runFaithfulnessGateBatch
532
- } from "./chunk-UG6VXIOK.js";
533
- import {
534
- TAG_LIMITS,
535
- composeMemoryEnvelope,
536
- isMemoryCategory
537
- } from "./chunk-H2YSH3DG.js";
538
- import {
539
- normalizeTags
540
- } from "./chunk-BT7NVCML.js";
532
+ } from "./chunk-XSTNGNJP.js";
541
533
  import {
542
534
  checkCorpusReadAbort
543
535
  } from "./chunk-5GINB5LC.js";
@@ -559,7 +551,7 @@ import {
559
551
  requestEntityCanonicalIdReconcile,
560
552
  requestEntityCanonicalIdReconcileSync,
561
553
  withRawEntityPageMutation
562
- } from "./chunk-ZVPVTPGI.js";
554
+ } from "./chunk-NNZFPYYX.js";
563
555
  import {
564
556
  applyTemporalSupersession,
565
557
  applyTemporalSupersessionPrimaryMutation,
@@ -572,6 +564,14 @@ import {
572
564
  isValidAsOf,
573
565
  isValidityExpiredNow
574
566
  } from "./chunk-6CIAGZ6X.js";
567
+ import {
568
+ TAG_LIMITS,
569
+ composeMemoryEnvelope,
570
+ isMemoryCategory
571
+ } from "./chunk-WKAXBXVA.js";
572
+ import {
573
+ normalizeTags
574
+ } from "./chunk-BT7NVCML.js";
575
575
  import {
576
576
  buildQmdRecallCacheKey,
577
577
  getCachedQmdRecall,
@@ -581,7 +581,7 @@ import {
581
581
  FallbackLlmClient,
582
582
  fallbackLlmRuntimeContextFromConfig,
583
583
  gatewayTaskChainOptions
584
- } from "./chunk-UW5NPZJ2.js";
584
+ } from "./chunk-JALOAKSZ.js";
585
585
  import {
586
586
  estimateTokenCount
587
587
  } from "./chunk-TOTT6S2V.js";
@@ -591,6 +591,11 @@ import {
591
591
  import {
592
592
  buildProcedurePersistBody
593
593
  } from "./chunk-QDW3E4RD.js";
594
+ import {
595
+ activityDayWindow,
596
+ isValidActivityDate,
597
+ timezoneOffsetIso
598
+ } from "./chunk-M6L7HI7R.js";
594
599
  import {
595
600
  searchCausalTrajectories
596
601
  } from "./chunk-GPFZFCRN.js";
@@ -598,7 +603,7 @@ import {
598
603
  evaluateSubjectGuard,
599
604
  isSharedPromotionTarget,
600
605
  resolveWriteSubject
601
- } from "./chunk-LDKPDODJ.js";
606
+ } from "./chunk-ME35HVDJ.js";
602
607
  import {
603
608
  parseOriginClass
604
609
  } from "./chunk-6Q3ZTEF6.js";
@@ -606,7 +611,9 @@ import {
606
611
  normalizeRecallTokenSet
607
612
  } from "./chunk-YCVB7X56.js";
608
613
  import {
609
- coerceBool
614
+ coerceBool,
615
+ coerceBooleanLike,
616
+ coerceNumber
610
617
  } from "./chunk-PQVCH2AE.js";
611
618
  import {
612
619
  graphemeUnits,
@@ -632,27 +639,30 @@ import {
632
639
  getConfiguredNamespaces,
633
640
  resolveNamespaceFromStorageDir,
634
641
  resolveScopePlan
635
- } from "./chunk-Q57GOHLF.js";
642
+ } from "./chunk-EGALNSZ4.js";
636
643
  import {
637
644
  attachCitation,
638
645
  hasCitationForTemplate,
639
646
  stripCitationForTemplate
640
647
  } from "./chunk-J6A3CX5N.js";
641
- import {
642
- assertPathInsideRoot
643
- } from "./chunk-GCASGYIO.js";
644
648
  import {
645
649
  inferMemoryStatus,
646
650
  isActiveMemoryStatus,
647
651
  toMemoryPathRel
648
652
  } from "./chunk-7RJUVTVF.js";
653
+ import {
654
+ openBetterSqlite3
655
+ } from "./chunk-RL6NEVXT.js";
656
+ import {
657
+ assertPathInsideRoot
658
+ } from "./chunk-GCASGYIO.js";
649
659
  import {
650
660
  excludeSupportPassportPrivateMemories,
651
661
  isSupportPassportPrivateMemory
652
- } from "./chunk-XDL5CYZN.js";
662
+ } from "./chunk-EEOUMG3J.js";
653
663
  import {
654
664
  ContentHashIndex
655
- } from "./chunk-BEC4YBNA.js";
665
+ } from "./chunk-TVW4C7PV.js";
656
666
  import {
657
667
  normalizeAttributePairs,
658
668
  stripAttributesSuffix
@@ -670,6 +680,9 @@ import {
670
680
  assertIsDirectoryNotSymlink,
671
681
  assertRealpathInsideRoot
672
682
  } from "./chunk-GCGJW34D.js";
683
+ import {
684
+ parseFlexibleIsoTimestamp
685
+ } from "./chunk-P7FMDTKL.js";
673
686
  import {
674
687
  canReadNamespace,
675
688
  defaultNamespaceForPrincipal,
@@ -709,7 +722,7 @@ import {
709
722
  import {
710
723
  lcmSessionKeyForNamespace,
711
724
  resolveCodingNamespaceOverlay
712
- } from "./chunk-J2WC5LF4.js";
725
+ } from "./chunk-QBC33MPY.js";
713
726
  import {
714
727
  expandTildePath
715
728
  } from "./chunk-EYIEWJNI.js";
@@ -737,16 +750,16 @@ import {
737
750
  } from "./chunk-FF4KLI5W.js";
738
751
  import {
739
752
  SecureStoreLockedError
740
- } from "./chunk-XQ3HXAQH.js";
741
- import {
742
- isErrnoCode
743
- } from "./chunk-5UZXUTVO.js";
753
+ } from "./chunk-ET2CNMLD.js";
744
754
  import {
745
755
  ALL_CATEGORY_DIRS,
746
756
  ALL_CATEGORY_KEYS,
747
757
  RECALL_FALLBACK_DIRS,
748
758
  getCategoryDir
749
759
  } from "./chunk-VS2IYZRU.js";
760
+ import {
761
+ isErrnoCode
762
+ } from "./chunk-5UZXUTVO.js";
750
763
  import {
751
764
  log
752
765
  } from "./chunk-3WCASNQZ.js";
@@ -2303,7 +2316,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
2303
2316
  namespaces,
2304
2317
  {
2305
2318
  readNamespaceMemories: async (ns) => (await this.getStorage(ns)).readAllMemories(),
2306
- readMemoryFrontmatter: async (path34, preferredNamespace) => {
2319
+ readMemoryFrontmatter: async (path35, preferredNamespace) => {
2307
2320
  if (!fallbackReader) {
2308
2321
  for (const ns of namespaces) {
2309
2322
  try {
@@ -2315,7 +2328,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
2315
2328
  }
2316
2329
  if (!fallbackReader) return null;
2317
2330
  const memory = await this.readQmdResultMemory(
2318
- path34,
2331
+ path35,
2319
2332
  fallbackReader,
2320
2333
  namespaces,
2321
2334
  preferredNamespace
@@ -6069,8 +6082,23 @@ var ExtractionPersistCoordinator = class {
6069
6082
  );
6070
6083
  const requireSpansPendingStatus = this.deps.config.provenance?.requireSpans === true && fact.requireSpansPending === true ? "pending_review" : void 0;
6071
6084
  const faithfulnessEnforceStatus = faithfulnessGateStatus ?? requireSpansPendingStatus ?? injectionScreenStatus;
6085
+ const novelty = await applyNoveltyGate({
6086
+ enabled: this.deps.config["noveltyGateEnabled"] === true,
6087
+ addThreshold: this.deps.config.noveltyAddThreshold,
6088
+ noopThreshold: this.deps.config.noveltyNoopThreshold,
6089
+ lookup: async () => embeddingsFromCosineHits(
6090
+ await this.deps.semanticDedupLookup(
6091
+ fact.content,
6092
+ this.deps.config.semanticDedupCandidates,
6093
+ targetStorage
6094
+ ),
6095
+ // Same connector scoping as decideSemanticDedup below: a
6096
+ // cross-connector neighbor must not noop this candidate.
6097
+ { candidateConnector: sourceContext?.sourceConnector }
6098
+ )
6099
+ });
6072
6100
  let pendingSemanticSkip = null;
6073
- if (resolvePipelineProcessingCapabilities(this.deps.config).semanticDedup && injectionScreenStatus !== "pending_review") {
6101
+ if (novelty.decision !== "add" && resolvePipelineProcessingCapabilities(this.deps.config).semanticDedup && injectionScreenStatus !== "pending_review") {
6074
6102
  let semanticDecision;
6075
6103
  if (batchBackendUnavailable) {
6076
6104
  semanticDecision = { action: "keep", reason: "backend_unavailable" };
@@ -6146,11 +6174,11 @@ var ExtractionPersistCoordinator = class {
6146
6174
  }
6147
6175
  }
6148
6176
  const isCorrection = writeCategory === "correction";
6149
- if (pendingSemanticSkip && !contradictionDetected && !isCorrection && faithfulnessEnforceStatus !== "pending_review") {
6177
+ if ((pendingSemanticSkip || novelty.decision === "noop") && !contradictionDetected && !isCorrection && faithfulnessEnforceStatus !== "pending_review") {
6150
6178
  log.debug(
6151
- `dedup: skipping semantic near-duplicate fact "${fact.content.slice(0, 60).replace(/\s+/g, " ")}\u2026" score=${pendingSemanticSkip.topScore.toFixed(
6179
+ `dedup: skipping ${pendingSemanticSkip ? "semantic near-duplicate" : "novelty-noop"} fact "${fact.content.slice(0, 60).replace(/\s+/g, " ")}\u2026" score=${(pendingSemanticSkip?.topScore ?? novelty.score).toFixed(
6152
6180
  3
6153
- )} neighbor=${pendingSemanticSkip.topId}`
6181
+ )} neighbor=${pendingSemanticSkip?.topId ?? novelty.neighborId}`
6154
6182
  );
6155
6183
  dedupedCount++;
6156
6184
  continue;
@@ -15629,7 +15657,7 @@ var OrchestratorInitCoordinator = class {
15629
15657
  if (signal.aborted) return;
15630
15658
  if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
15631
15659
  try {
15632
- const { runFirstStartMigration } = await import("./first-start-migration-4NETATFF.js");
15660
+ const { runFirstStartMigration } = await import("./first-start-migration-KHIMCBIC.js");
15633
15661
  const result = await runFirstStartMigration({
15634
15662
  storage: this.deps.storage,
15635
15663
  config: this.deps.config,
@@ -15652,7 +15680,7 @@ var OrchestratorInitCoordinator = class {
15652
15680
  if (signal.aborted) return;
15653
15681
  if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
15654
15682
  try {
15655
- const { startWearablesAutoSync } = await import("./auto-sync-2YPITIWN.js");
15683
+ const { startWearablesAutoSync } = await import("./auto-sync-Q6Q2FVSC.js");
15656
15684
  if (signal.aborted) return;
15657
15685
  this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
15658
15686
  {
@@ -18956,14 +18984,14 @@ var NamespaceReadFanoutCoordinator = class {
18956
18984
  for (const { memory, namespace } of memories) {
18957
18985
  const status = memory.frontmatter.status ?? "active";
18958
18986
  if (!options?.allowArchived && status !== "active") continue;
18959
- const haystack = [
18987
+ const haystack2 = [
18960
18988
  memory.content,
18961
18989
  memory.frontmatter.category,
18962
18990
  ...memory.frontmatter.tags ?? []
18963
18991
  ].join(" ").toLowerCase();
18964
18992
  let hits = 0;
18965
18993
  for (const token of tokens) {
18966
- if (haystack.includes(token)) hits += 1;
18994
+ if (haystack2.includes(token)) hits += 1;
18967
18995
  }
18968
18996
  const score = tokens.length > 0 ? hits / tokens.length : 0.01;
18969
18997
  if (tokens.length > 0 && hits === 0) continue;
@@ -19179,7 +19207,11 @@ var RecallEntryCoordinator = class {
19179
19207
  publishRecallResults(options) {
19180
19208
  const sectionId = "memories";
19181
19209
  const trustByPath = options.trustByPath ?? null;
19182
- const injectable = trustByPath ? options.results.filter((r) => !trustResultFor(trustByPath, r)?.quarantined) : options.results;
19210
+ const injectable = applyRecallStateViews(
19211
+ trustByPath ? options.results.filter((r) => !trustResultFor(trustByPath, r)?.quarantined) : options.results,
19212
+ options.retrievalQuery,
19213
+ this.deps.config
19214
+ );
19183
19215
  if (injectable.length === 0) return;
19184
19216
  const formatted = this.deps.recallResultFormatter.formatQmdResultEntries(
19185
19217
  options.title,
@@ -22298,9 +22330,9 @@ function readStructuralSymbol(entry) {
22298
22330
  const rec = entry;
22299
22331
  const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
22300
22332
  if (!symbol) return null;
22301
- const path34 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
22333
+ const path35 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
22302
22334
  const kind = typeof rec.kind === "string" && rec.kind.length > 0 ? rec.kind : void 0;
22303
- const item = path34 !== void 0 && kind !== void 0 ? { symbol, path: path34, kind } : path34 !== void 0 ? { symbol, path: path34 } : kind !== void 0 ? { symbol, kind } : { symbol };
22335
+ const item = path35 !== void 0 && kind !== void 0 ? { symbol, path: path35, kind } : path35 !== void 0 ? { symbol, path: path35 } : kind !== void 0 ? { symbol, kind } : { symbol };
22304
22336
  return item;
22305
22337
  }
22306
22338
  function classifySpawnError(err) {
@@ -25864,6 +25896,738 @@ function publisherForConnector(connectorId) {
25864
25896
  return publisherFor(hostIdForConnector(connectorId));
25865
25897
  }
25866
25898
 
25899
+ // src/activity/timeline/categories.ts
25900
+ var TIMELINE_RESERVED_UNKNOWN = "system.unknown";
25901
+ var TIMELINE_RESERVED_IDLE = "system.idle";
25902
+ var TIMELINE_RESERVED_PAUSE = "system.pause";
25903
+ var COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
25904
+ function isTimelineCategoryId(id) {
25905
+ const parts = id.split(".");
25906
+ if (parts.length === 0) return false;
25907
+ for (const part of parts) {
25908
+ if (part.length === 0) return false;
25909
+ const first = part.charCodeAt(0);
25910
+ if (first < 97 || first > 122) return false;
25911
+ for (let i = 1; i < part.length; i += 1) {
25912
+ const code = part.charCodeAt(i);
25913
+ const ok = code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 45;
25914
+ if (!ok) return false;
25915
+ }
25916
+ }
25917
+ return true;
25918
+ }
25919
+ var DEFAULT_TIMELINE_CATEGORIES = [
25920
+ { id: "development", name: "Development", color: "#3b82f6", description: "Editors, terminals, IDEs, and code forges.", order: 10 },
25921
+ { id: "communication", name: "Communication", color: "#f59e0b", description: "Mail, chat, and meetings.", order: 20 },
25922
+ { id: "browsing", name: "Browsing", color: "#6366f1", description: "Web browsing without a more specific domain match.", order: 30 },
25923
+ { id: "documents", name: "Documents", color: "#10b981", description: "Writing, notes, and PDFs.", order: 40 },
25924
+ { id: "design", name: "Design & Media", color: "#ec4899", description: "Design, audio, and video tools.", order: 50 },
25925
+ { id: "data", name: "Data & Analysis", color: "#84cc16", description: "Spreadsheets, dashboards, and databases.", order: 60 },
25926
+ { id: "admin", name: "Admin", color: "#64748b", description: "File managers, settings, and system utilities.", order: 70 },
25927
+ { id: "entertainment", name: "Entertainment", color: "#ef4444", description: "Video, music, and games.", order: 80 },
25928
+ { id: TIMELINE_RESERVED_UNKNOWN, name: "Uncategorized", color: "#9ca3af", description: "Activity with no matching classification signal. Kept visible, never silently reassigned.", order: 990, system: true },
25929
+ { id: TIMELINE_RESERVED_IDLE, name: "Idle", color: "#d1d5db", description: "Derived gap between cards where no activity was observed.", order: 991, system: true, idle: true },
25930
+ { id: TIMELINE_RESERVED_PAUSE, name: "Paused", color: "#a78bfa", description: "User-declared pause interval.", order: 992, system: true }
25931
+ ];
25932
+ function validateTimelineCategories(categories) {
25933
+ if (!Array.isArray(categories) || categories.length === 0) {
25934
+ throw new RangeError("timeline categories must be a non-empty array");
25935
+ }
25936
+ const seen = /* @__PURE__ */ new Set();
25937
+ for (const category of categories) {
25938
+ if (typeof category.id !== "string" || !isTimelineCategoryId(category.id)) {
25939
+ throw new RangeError(`timeline category id must be dotted kebab-case: ${String(category.id)}`);
25940
+ }
25941
+ if (seen.has(category.id)) {
25942
+ throw new RangeError(`timeline category id must be unique: ${category.id}`);
25943
+ }
25944
+ seen.add(category.id);
25945
+ if (typeof category.name !== "string" || category.name.length === 0) {
25946
+ throw new RangeError(`timeline category ${category.id}: name must be a non-empty string`);
25947
+ }
25948
+ if (typeof category.color !== "string" || !COLOR_PATTERN.test(category.color)) {
25949
+ throw new RangeError(`timeline category ${category.id}: color must be #RRGGBB`);
25950
+ }
25951
+ if (typeof category.description !== "string" || category.description.length === 0) {
25952
+ throw new RangeError(`timeline category ${category.id}: description must be a non-empty string`);
25953
+ }
25954
+ if (!Number.isInteger(category.order)) {
25955
+ throw new RangeError(`timeline category ${category.id}: order must be an integer`);
25956
+ }
25957
+ const isReserved = category.id === TIMELINE_RESERVED_UNKNOWN || category.id === TIMELINE_RESERVED_IDLE || category.id === TIMELINE_RESERVED_PAUSE;
25958
+ if (isReserved && category.system !== true) {
25959
+ throw new RangeError(`timeline category ${category.id} is reserved and must set system: true`);
25960
+ }
25961
+ if (!isReserved) {
25962
+ if (category.id.startsWith("system.")) {
25963
+ throw new RangeError(`timeline category id namespace "system." is reserved: ${category.id}`);
25964
+ }
25965
+ if (category.system === true || category.idle === true) {
25966
+ throw new RangeError(`timeline category ${category.id}: only reserved categories may set system/idle flags`);
25967
+ }
25968
+ }
25969
+ }
25970
+ const idle = categories.find((category) => category.id === TIMELINE_RESERVED_IDLE);
25971
+ if (idle !== void 0 && idle.idle !== true) {
25972
+ throw new RangeError(`timeline category ${TIMELINE_RESERVED_IDLE} must set idle: true`);
25973
+ }
25974
+ for (const reserved of [TIMELINE_RESERVED_UNKNOWN, TIMELINE_RESERVED_IDLE, TIMELINE_RESERVED_PAUSE]) {
25975
+ if (!categories.some((category) => category.id === reserved)) {
25976
+ throw new RangeError(`timeline categories must include the reserved "${reserved}" category`);
25977
+ }
25978
+ }
25979
+ }
25980
+ function sortTimelineCategories(categories) {
25981
+ return [...categories].sort((a, b) => a.order - b.order || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
25982
+ }
25983
+
25984
+ // src/activity/timeline/classify.ts
25985
+ var DOMAIN_CONFIDENCE = 0.85;
25986
+ var APP_CONFIDENCE = 0.9;
25987
+ var TITLE_CONFIDENCE = 0.7;
25988
+ var UNKNOWN_CONFIDENCE = 0;
25989
+ var RULES = [
25990
+ { categoryId: "development", domains: ["github.com", "gitlab.com", "stackoverflow.com", "linear.app", "atlassian.net"] },
25991
+ { categoryId: "communication", domains: ["mail.google.com", "gmail.com", "outlook.com", "outlook.office.com", "slack.com"] },
25992
+ { categoryId: "design", domains: ["figma.com", "canva.com"] },
25993
+ { categoryId: "documents", domains: ["docs.google.com", "notion.so", "dropbox.com"] },
25994
+ { categoryId: "entertainment", domains: ["youtube.com", "netflix.com", "spotify.com"] },
25995
+ { categoryId: "data", domains: ["metabase", "tableau", "grafana"] },
25996
+ { categoryId: "development", apps: ["code", "cursor", "neovim", "vim", "emacs", "xcode", "intellij", "terminal", "iterm", "warp", "wezterm", "kitty", "alacritty", "zed", "sublime", "datagrip"] },
25997
+ { categoryId: "communication", apps: ["slack", "discord", "teams", "mail", "outlook", "thunderbird", "messages", "signal", "whatsapp", "telegram", "zoom", "facetime", "meet"] },
25998
+ { categoryId: "design", apps: ["figma", "sketch", "photoshop", "illustrator", "indesign", "premiere", "after effects", "davinci", "blender", "ableton", "logic pro", "final cut"] },
25999
+ { categoryId: "documents", apps: ["word", "pages", "notion", "obsidian", "notes", "typora", "bear", "preview", "acrobat"] },
26000
+ { categoryId: "data", apps: ["excel", "numbers", "sheets", "tableau"] },
26001
+ { categoryId: "admin", apps: ["finder", "settings", "system preferences", "activity monitor", "files", "explorer"] },
26002
+ { categoryId: "entertainment", apps: ["spotify", "music", "youtube", "vlc", "quicktime", "steam", "netflix", "podcast", "tv"] },
26003
+ { categoryId: "browsing", apps: ["chrome", "safari", "firefox", "edge", "arc", "brave", "browser"] },
26004
+ { categoryId: "development", titles: ["pull request", "merge conflict", "terminal \u2014", "repository"] },
26005
+ { categoryId: "communication", titles: ["inbox"] },
26006
+ { categoryId: "data", titles: ["spreadsheet", "pivot table"] }
26007
+ ];
26008
+ function classifyTimelineObservation(observation, categories) {
26009
+ const app = observation.app.toLowerCase();
26010
+ const title = observation.windowTitle.toLowerCase();
26011
+ const domain = observation.browserUrl === void 0 ? "" : hostOf(observation.browserUrl);
26012
+ for (const rule of RULES) {
26013
+ if (rule.domains !== void 0 && domain !== "" && rule.domains.some((pattern) => domain.includes(pattern))) {
26014
+ return checkedRule(rule, DOMAIN_CONFIDENCE, categories);
26015
+ }
26016
+ }
26017
+ for (const rule of RULES) {
26018
+ if (rule.apps !== void 0 && rule.apps.some((pattern) => app.includes(pattern))) {
26019
+ return checkedRule(rule, APP_CONFIDENCE, categories);
26020
+ }
26021
+ }
26022
+ for (const rule of RULES) {
26023
+ if (rule.titles !== void 0 && rule.titles.some((pattern) => title.includes(pattern))) {
26024
+ return checkedRule(rule, TITLE_CONFIDENCE, categories);
26025
+ }
26026
+ }
26027
+ return { categoryId: TIMELINE_RESERVED_UNKNOWN, confidence: UNKNOWN_CONFIDENCE };
26028
+ }
26029
+ function checkedRule(rule, confidence, categories) {
26030
+ if (!categories.some((category) => category.id === rule.categoryId)) {
26031
+ throw new RangeError(`timeline classification rule targets unknown category: ${rule.categoryId}`);
26032
+ }
26033
+ return { categoryId: rule.categoryId, confidence };
26034
+ }
26035
+ function hostOf(url) {
26036
+ try {
26037
+ return new URL(url).hostname.toLowerCase();
26038
+ } catch {
26039
+ return url.toLowerCase();
26040
+ }
26041
+ }
26042
+
26043
+ // src/activity/timeline/build.ts
26044
+ import { createHash as createHash9 } from "crypto";
26045
+ var TIMELINE_FORMAT_VERSION = 1;
26046
+ var TIMELINE_MERGE_GAP_MS = 12e4;
26047
+ var TIMELINE_MAX_DWELL_MS = 15 * 6e4;
26048
+ function canonicalMs(iso) {
26049
+ const parsed = Date.parse(iso);
26050
+ return Number.isFinite(parsed) ? parsed : Number.NaN;
26051
+ }
26052
+ function isoOf(ms) {
26053
+ return new Date(ms).toISOString();
26054
+ }
26055
+ function evidenceKeyOf(observation) {
26056
+ return `${observation.machine}|${isoOf(canonicalMs(observation.capturedAtUtc))}|${observation.contentHash}`;
26057
+ }
26058
+ function stableCardId(identity) {
26059
+ return `tlc_${createHash9("sha256").update(identity, "utf8").digest("hex").slice(0, 16)}`;
26060
+ }
26061
+ function formatDurationMinutes(ms) {
26062
+ return `${Math.round(ms / 6e4)}m`;
26063
+ }
26064
+ function unionIntervals(intervals) {
26065
+ const sorted = [...intervals].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
26066
+ const merged = [];
26067
+ for (const interval of sorted) {
26068
+ const last = merged[merged.length - 1];
26069
+ if (last !== void 0 && interval[0] <= last[1]) {
26070
+ last[1] = Math.max(last[1], interval[1]);
26071
+ } else {
26072
+ merged.push([interval[0], interval[1]]);
26073
+ }
26074
+ }
26075
+ return merged;
26076
+ }
26077
+ function subtractInterval(start, end, cutStart, cutEnd) {
26078
+ if (cutEnd <= start || cutStart >= end) return [[start, end]];
26079
+ const pieces = [];
26080
+ if (cutStart > start) pieces.push([start, cutStart]);
26081
+ if (cutEnd < end) pieces.push([cutEnd, end]);
26082
+ return pieces;
26083
+ }
26084
+ function mergeTrack(machine, track, pauses) {
26085
+ const cards = [];
26086
+ let current = [];
26087
+ const pauseStartsAfter = (fromMs, toMs) => pauses.some(([ps, pe]) => ps >= fromMs && ps < toMs && pe > ps);
26088
+ for (const observation of track) {
26089
+ const last = current[current.length - 1];
26090
+ if (last !== void 0) {
26091
+ const gap = canonicalMs(observation.capturedAtUtc) - canonicalMs(last.capturedAtUtc);
26092
+ const sameKey = observation.app === last.app && observation.windowTitle === last.windowTitle;
26093
+ const pauseBetween = pauseStartsAfter(canonicalMs(last.capturedAtUtc), canonicalMs(observation.capturedAtUtc));
26094
+ if (!sameKey || gap > TIMELINE_MERGE_GAP_MS || pauseBetween) {
26095
+ cards.push({ machine, observations: current });
26096
+ current = [];
26097
+ }
26098
+ }
26099
+ current.push(observation);
26100
+ }
26101
+ if (current.length > 0) cards.push({ machine, observations: current });
26102
+ return cards;
26103
+ }
26104
+ function buildTimelineDay(input) {
26105
+ const categories = input.categories ?? DEFAULT_TIMELINE_CATEGORIES;
26106
+ validateTimelineCategories(categories);
26107
+ const window = activityDayWindow(input.date, input.timezone);
26108
+ const dayStartMs = Date.parse(window.startUtc);
26109
+ const dayEndMs = Date.parse(window.endUtc);
26110
+ const observations = input.observations.filter((observation) => Number.isFinite(canonicalMs(observation.capturedAtUtc))).filter((observation) => {
26111
+ const ms = canonicalMs(observation.capturedAtUtc);
26112
+ return ms >= dayStartMs && ms < dayEndMs;
26113
+ });
26114
+ for (const pause of input.pauses ?? []) {
26115
+ const startMs = canonicalMs(pause.startUtc);
26116
+ const endMs = canonicalMs(pause.endUtc);
26117
+ if (!Number.isFinite(startMs) || !Number.isFinite(endMs) || startMs >= endMs) {
26118
+ throw new RangeError("timeline pause must be a valid half-open [startUtc, endUtc) interval");
26119
+ }
26120
+ }
26121
+ const pauseIntervals = unionIntervals(
26122
+ (input.pauses ?? []).map((pause) => [canonicalMs(pause.startUtc), canonicalMs(pause.endUtc)]).map(([startMs, endMs]) => [Math.max(startMs, dayStartMs), Math.min(endMs, dayEndMs)]).filter(([startMs, endMs]) => endMs > startMs)
26123
+ );
26124
+ const tracks = /* @__PURE__ */ new Map();
26125
+ for (const observation of observations) {
26126
+ const track = tracks.get(observation.machine) ?? [];
26127
+ track.push(observation);
26128
+ tracks.set(observation.machine, track);
26129
+ }
26130
+ for (const track of tracks.values()) {
26131
+ track.sort(
26132
+ (a, b) => canonicalMs(a.capturedAtUtc) - canonicalMs(b.capturedAtUtc) || (a.contentHash < b.contentHash ? -1 : a.contentHash > b.contentHash ? 1 : 0)
26133
+ );
26134
+ }
26135
+ const cards = [];
26136
+ const machines = [...tracks.keys()].sort();
26137
+ for (const machine of machines) {
26138
+ const track = tracks.get(machine) ?? [];
26139
+ const merged = mergeTrack(machine, track, pauseIntervals);
26140
+ const trackIntervals = [];
26141
+ for (let index = 0; index < merged.length; index++) {
26142
+ const group = merged[index];
26143
+ const first = group.observations[0];
26144
+ const last = group.observations[group.observations.length - 1];
26145
+ const startMs = canonicalMs(first.capturedAtUtc);
26146
+ const lastMs = canonicalMs(last.capturedAtUtc);
26147
+ const nextObsMs = index + 1 < merged.length ? canonicalMs(merged[index + 1].observations[0].capturedAtUtc) : Number.POSITIVE_INFINITY;
26148
+ const pauseStartMs = pauseIntervals.find(([ps]) => ps > lastMs)?.[0] ?? Number.POSITIVE_INFINITY;
26149
+ const endMs = Math.max(lastMs, Math.min(lastMs + TIMELINE_MAX_DWELL_MS, nextObsMs, pauseStartMs, dayEndMs));
26150
+ trackIntervals.push([startMs, endMs]);
26151
+ const evidenceIds = group.observations.map((observation) => observation.id);
26152
+ const classification = classifyTimelineObservation(first, categories);
26153
+ cards.push({
26154
+ id: stableCardId(`activity|${machine}|${evidenceKeyOf(first)}|${evidenceKeyOf(last)}`),
26155
+ kind: "activity",
26156
+ title: first.windowTitle.length > 0 ? first.windowTitle : first.app,
26157
+ summary: `${first.app} \xB7 ${machine} \xB7 ${evidenceIds.length} obs \xB7 ${formatDurationMinutes(endMs - startMs)}`,
26158
+ categoryId: classification.categoryId,
26159
+ confidence: classification.confidence,
26160
+ startUtc: isoOf(startMs),
26161
+ endUtc: isoOf(endMs),
26162
+ dayKey: input.date,
26163
+ timezone: input.timezone,
26164
+ machine,
26165
+ evidenceIds,
26166
+ evidenceRange: { firstKey: evidenceKeyOf(first), lastKey: evidenceKeyOf(last) }
26167
+ });
26168
+ }
26169
+ for (let index = 0; index + 1 < trackIntervals.length; index++) {
26170
+ const gapStart = trackIntervals[index][1];
26171
+ const gapEnd = trackIntervals[index + 1][0];
26172
+ if (gapEnd <= gapStart) continue;
26173
+ let pieces = [[gapStart, gapEnd]];
26174
+ for (const [pauseStart, pauseEnd] of pauseIntervals) {
26175
+ pieces = pieces.flatMap(([start, end]) => subtractInterval(start, end, pauseStart, pauseEnd));
26176
+ }
26177
+ for (const [start, end] of pieces) {
26178
+ cards.push({
26179
+ id: stableCardId(`idle|${machine}|${isoOf(start)}|${isoOf(end)}`),
26180
+ kind: "idle",
26181
+ title: "Idle",
26182
+ summary: `${formatDurationMinutes(end - start)} gap on ${machine}`,
26183
+ categoryId: TIMELINE_RESERVED_IDLE,
26184
+ confidence: 1,
26185
+ startUtc: isoOf(start),
26186
+ endUtc: isoOf(end),
26187
+ dayKey: input.date,
26188
+ timezone: input.timezone,
26189
+ machine,
26190
+ evidenceIds: [],
26191
+ evidenceRange: null
26192
+ });
26193
+ }
26194
+ }
26195
+ }
26196
+ for (const [pauseStart, pauseEnd] of pauseIntervals) {
26197
+ const reason = (input.pauses ?? []).find((pause) => canonicalMs(pause.startUtc) === pauseStart)?.reason;
26198
+ cards.push({
26199
+ id: stableCardId(`pause|${isoOf(pauseStart)}|${isoOf(pauseEnd)}`),
26200
+ kind: "pause",
26201
+ title: "Paused",
26202
+ summary: reason === void 0 ? `${formatDurationMinutes(pauseEnd - pauseStart)} user pause` : `${formatDurationMinutes(pauseEnd - pauseStart)} user pause \u2014 ${reason}`,
26203
+ categoryId: TIMELINE_RESERVED_PAUSE,
26204
+ confidence: 1,
26205
+ startUtc: isoOf(pauseStart),
26206
+ endUtc: isoOf(pauseEnd),
26207
+ dayKey: input.date,
26208
+ timezone: input.timezone,
26209
+ machine: null,
26210
+ evidenceIds: [],
26211
+ evidenceRange: null
26212
+ });
26213
+ }
26214
+ cards.sort((a, b) => a.startUtc < b.startUtc ? -1 : a.startUtc > b.startUtc ? 1 : a.endUtc < b.endUtc ? -1 : a.endUtc > b.endUtc ? 1 : (a.machine ?? "") < (b.machine ?? "") ? -1 : (a.machine ?? "") > (b.machine ?? "") ? 1 : a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
26215
+ return {
26216
+ formatVersion: TIMELINE_FORMAT_VERSION,
26217
+ date: input.date,
26218
+ timezone: input.timezone,
26219
+ startUtc: window.startUtc,
26220
+ endUtc: window.endUtc,
26221
+ cards
26222
+ };
26223
+ }
26224
+ function serializeTimelineDay(day) {
26225
+ return JSON.stringify(day);
26226
+ }
26227
+
26228
+ // src/activity/timeline/corrections.ts
26229
+ import { mkdirSync } from "fs";
26230
+ import path32 from "path";
26231
+ function timelineCorrectionDatabasePath(memoryDir) {
26232
+ return path32.join(memoryDir, "state", "activity-timeline.sqlite");
26233
+ }
26234
+ function rowToCorrection(row) {
26235
+ return {
26236
+ cardId: row.card_id,
26237
+ categoryId: row.category_id ?? void 0,
26238
+ title: row.title ?? void 0,
26239
+ editedAtUtc: row.edited_at_utc
26240
+ };
26241
+ }
26242
+ var TimelineCorrectionStore = class _TimelineCorrectionStore {
26243
+ db;
26244
+ constructor(db) {
26245
+ this.db = db;
26246
+ }
26247
+ static open(memoryDir) {
26248
+ mkdirSync(path32.join(memoryDir, "state"), { recursive: true });
26249
+ const db = openBetterSqlite3(timelineCorrectionDatabasePath(memoryDir));
26250
+ db.pragma("journal_mode = WAL");
26251
+ db.pragma("busy_timeout = 5000");
26252
+ db.exec(`
26253
+ CREATE TABLE IF NOT EXISTS timeline_corrections (
26254
+ card_id TEXT PRIMARY KEY,
26255
+ category_id TEXT,
26256
+ title TEXT,
26257
+ edited_at_utc TEXT NOT NULL
26258
+ );
26259
+ `);
26260
+ return new _TimelineCorrectionStore(db);
26261
+ }
26262
+ /**
26263
+ * Persist one correction. `categoryId`, when set, must exist in `categories`
26264
+ * (defaults to the built-in registry) — an unknown category is a malformed
26265
+ * edit and must fail rather than silently strand the card.
26266
+ */
26267
+ upsert(correction, categories = DEFAULT_TIMELINE_CATEGORIES) {
26268
+ validateTimelineCategories(categories);
26269
+ if (typeof correction.cardId !== "string" || correction.cardId.length === 0) {
26270
+ throw new RangeError("timeline correction requires a non-empty cardId");
26271
+ }
26272
+ if (typeof correction.editedAtUtc !== "string" || Number.isNaN(Date.parse(correction.editedAtUtc))) {
26273
+ throw new RangeError("timeline correction requires a valid editedAtUtc instant");
26274
+ }
26275
+ if (correction.categoryId === void 0 && correction.title === void 0 || correction.title !== void 0 && correction.title.length === 0) {
26276
+ throw new RangeError("timeline correction must set a categoryId and/or a non-empty title");
26277
+ }
26278
+ if (correction.categoryId !== void 0 && !categories.some((category) => category.id === correction.categoryId)) {
26279
+ throw new RangeError(`timeline correction targets unknown category: ${correction.categoryId}`);
26280
+ }
26281
+ this.db.prepare(
26282
+ `INSERT INTO timeline_corrections (card_id, category_id, title, edited_at_utc)
26283
+ VALUES (?, ?, ?, ?)
26284
+ ON CONFLICT(card_id) DO UPDATE SET category_id = excluded.category_id, title = excluded.title, edited_at_utc = excluded.edited_at_utc`
26285
+ ).run(correction.cardId, correction.categoryId ?? null, correction.title ?? null, correction.editedAtUtc);
26286
+ }
26287
+ get(cardId) {
26288
+ const row = this.db.prepare("SELECT card_id, category_id, title, edited_at_utc FROM timeline_corrections WHERE card_id = ?").get(cardId);
26289
+ return row === void 0 ? void 0 : rowToCorrection(row);
26290
+ }
26291
+ /** All corrections ordered by card id (deterministic listing). */
26292
+ list() {
26293
+ return this.db.prepare("SELECT card_id, category_id, title, edited_at_utc FROM timeline_corrections ORDER BY card_id ASC").all().map((row) => rowToCorrection(row));
26294
+ }
26295
+ /** Explicitly reset a card to its derived values; true when a correction existed. */
26296
+ reset(cardId) {
26297
+ return this.db.prepare("DELETE FROM timeline_corrections WHERE card_id = ?").run(cardId).changes > 0;
26298
+ }
26299
+ close() {
26300
+ this.db.close();
26301
+ }
26302
+ };
26303
+ function applyTimelineCorrections(cards, corrections) {
26304
+ const byCardId = new Map(corrections.map((correction) => [correction.cardId, correction]));
26305
+ return cards.map((card) => {
26306
+ const correction = byCardId.get(card.id);
26307
+ if (correction === void 0) return card;
26308
+ return {
26309
+ id: card.id,
26310
+ kind: card.kind,
26311
+ title: correction.title ?? card.title,
26312
+ summary: card.summary,
26313
+ categoryId: correction.categoryId ?? card.categoryId,
26314
+ confidence: 1,
26315
+ startUtc: card.startUtc,
26316
+ endUtc: card.endUtc,
26317
+ dayKey: card.dayKey,
26318
+ timezone: card.timezone,
26319
+ machine: card.machine,
26320
+ evidenceIds: card.evidenceIds,
26321
+ evidenceRange: card.evidenceRange,
26322
+ manualEdit: {
26323
+ ...correction.categoryId !== void 0 ? { categoryId: correction.categoryId } : {},
26324
+ ...correction.title !== void 0 ? { title: correction.title } : {},
26325
+ editedAtUtc: correction.editedAtUtc
26326
+ }
26327
+ };
26328
+ });
26329
+ }
26330
+
26331
+ // src/activity/timeline/query.ts
26332
+ var RANGE_FORMATS = ["cards", "compact"];
26333
+ var MS_PER_DAY = 864e5;
26334
+ var DEFAULT_MAX_RANGE_DAYS = 31;
26335
+ var DEFAULT_SEARCH_LIMIT = 10;
26336
+ var MIN_SEARCH_LIMIT = 1;
26337
+ var MAX_SEARCH_LIMIT = 50;
26338
+ var USAGE = `Usage: timeline <command> [options]
26339
+
26340
+ Commands:
26341
+ range --from <ISO> --to <ISO> [--format cards|compact] [--categories id,id] [--include-distractions]
26342
+ search --query <text> [--from <ISO>] [--to <ISO>] [--limit N]
26343
+ `;
26344
+ var VALUE_FLAGS = {
26345
+ "--from": true,
26346
+ "--to": true,
26347
+ "--format": true,
26348
+ "--categories": true,
26349
+ "--query": true,
26350
+ "--limit": true
26351
+ };
26352
+ var BOOLEAN_FLAGS = { "--include-distractions": true };
26353
+ function parseInstant(value, label) {
26354
+ const ms = parseFlexibleIsoTimestamp(value);
26355
+ if (ms === null) {
26356
+ throw new TypeError(`${label} must be an ISO date or datetime`);
26357
+ }
26358
+ return ms;
26359
+ }
26360
+ function assertRange(fromMs, toMs, maxRangeDays) {
26361
+ if (fromMs > toMs) {
26362
+ throw new RangeError("reversed range: from must be <= to");
26363
+ }
26364
+ if (fromMs === toMs) return;
26365
+ if (toMs - fromMs > maxRangeDays * MS_PER_DAY) {
26366
+ throw new RangeError(`range exceeds timeline.qa.maxRangeDays (${maxRangeDays})`);
26367
+ }
26368
+ }
26369
+ function cardOverlaps(card, fromMs, toMs) {
26370
+ const start = Date.parse(card.startUtc);
26371
+ const end = Date.parse(card.endUtc);
26372
+ if (fromMs === toMs) return start <= fromMs && fromMs < end;
26373
+ return start < toMs && end > fromMs;
26374
+ }
26375
+ function passesFilters(card, categories, includeDistractions) {
26376
+ if (!includeDistractions && card.distraction === true) return false;
26377
+ if (categories && !categories.has(card.categoryId)) return false;
26378
+ return true;
26379
+ }
26380
+ function filterRange(cards, fromMs, toMs, categories, includeDistractions) {
26381
+ return cards.filter(
26382
+ (card) => cardOverlaps(card, fromMs, toMs) && passesFilters(card, categories, includeDistractions)
26383
+ );
26384
+ }
26385
+ function toCompact(cards, from) {
26386
+ const day = from.length >= 10 ? from.slice(0, 10) : cards[0]?.dayKey ?? from;
26387
+ return {
26388
+ day,
26389
+ cards: cards.map((card) => ({
26390
+ start: card.startUtc,
26391
+ end: card.endUtc,
26392
+ category: card.categoryId,
26393
+ title: card.title,
26394
+ summary: card.summary
26395
+ }))
26396
+ };
26397
+ }
26398
+ function queryTimelineRange(cards, query) {
26399
+ if (!RANGE_FORMATS.includes(query.format)) {
26400
+ throw new TypeError(`format must be one of: ${RANGE_FORMATS.join(", ")}`);
26401
+ }
26402
+ const maxRangeDays = query.maxRangeDays ?? DEFAULT_MAX_RANGE_DAYS;
26403
+ const fromMs = parseInstant(query.from, "from");
26404
+ const toMs = parseInstant(query.to, "to");
26405
+ assertRange(fromMs, toMs, maxRangeDays);
26406
+ const categories = query.categories ? new Set(query.categories) : void 0;
26407
+ const matched = filterRange(cards, fromMs, toMs, categories, query.includeDistractions === true);
26408
+ if (query.format === "compact") return toCompact(matched, query.from);
26409
+ return matched;
26410
+ }
26411
+ function haystack(card) {
26412
+ const parts = [card.title, card.summary];
26413
+ if (card.detailedSummary) parts.push(card.detailedSummary);
26414
+ return parts.join(" ").toLowerCase();
26415
+ }
26416
+ function tokenMatchCount(card, tokens) {
26417
+ const text = haystack(card);
26418
+ let count = 0;
26419
+ for (const token of tokens) {
26420
+ if (text.includes(token)) count += 1;
26421
+ }
26422
+ return count;
26423
+ }
26424
+ function queryTimelineSearch(cards, query) {
26425
+ if (!Array.isArray(cards)) return { ok: false, error: "store_unreadable" };
26426
+ const tokens = query.query.trim().toLowerCase().split(/\s+/).filter(Boolean);
26427
+ const limit = query.limit ?? DEFAULT_SEARCH_LIMIT;
26428
+ if (!Number.isInteger(limit) || limit < MIN_SEARCH_LIMIT || limit > MAX_SEARCH_LIMIT) {
26429
+ throw new RangeError(`limit must be an integer from ${MIN_SEARCH_LIMIT} to ${MAX_SEARCH_LIMIT}`);
26430
+ }
26431
+ let pool = cards;
26432
+ if (query.from !== void 0 || query.to !== void 0) {
26433
+ const fromMs = parseInstant(query.from ?? query.to, "from");
26434
+ const toMs = parseInstant(query.to ?? query.from, "to");
26435
+ assertRange(fromMs, toMs, DEFAULT_MAX_RANGE_DAYS);
26436
+ pool = filterRange(cards, fromMs, toMs, void 0, true);
26437
+ }
26438
+ if (tokens.length === 0) return { ok: true, results: [] };
26439
+ const ranked = pool.map((card) => ({ card, matches: tokenMatchCount(card, tokens) })).filter((row) => row.matches > 0).sort((a, b) => {
26440
+ if (a.matches !== b.matches) return b.matches - a.matches;
26441
+ const recency = Date.parse(b.card.endUtc) - Date.parse(a.card.endUtc);
26442
+ if (recency !== 0) return recency;
26443
+ return a.card.id < b.card.id ? -1 : a.card.id > b.card.id ? 1 : 0;
26444
+ }).slice(0, limit).map((row) => row.card);
26445
+ return { ok: true, results: ranked };
26446
+ }
26447
+ function parseFlags(args) {
26448
+ const flags = /* @__PURE__ */ new Map();
26449
+ const positional = [];
26450
+ for (let i = 0; i < args.length; i++) {
26451
+ const arg = args[i];
26452
+ if (!arg.startsWith("--")) {
26453
+ positional.push(arg);
26454
+ continue;
26455
+ }
26456
+ if (VALUE_FLAGS[arg] === true) {
26457
+ const value = args[i + 1];
26458
+ if (value === void 0 || value.startsWith("--")) {
26459
+ throw new TypeError(`flag ${arg} requires a value`);
26460
+ }
26461
+ flags.set(arg, value);
26462
+ i += 1;
26463
+ continue;
26464
+ }
26465
+ if (BOOLEAN_FLAGS[arg] === true) {
26466
+ flags.set(arg, true);
26467
+ continue;
26468
+ }
26469
+ const known = [...Object.keys(VALUE_FLAGS), ...Object.keys(BOOLEAN_FLAGS)].sort().join(", ");
26470
+ throw new TypeError(`unknown flag ${arg} (valid: ${known})`);
26471
+ }
26472
+ return { flags, positional };
26473
+ }
26474
+ function flagString(flags, name) {
26475
+ const value = flags.get(name);
26476
+ return typeof value === "string" ? value : void 0;
26477
+ }
26478
+ async function runTimelineCliCommand(deps, args, io) {
26479
+ const [command, ...rest] = args;
26480
+ try {
26481
+ if (command === void 0 || command === "help" || command === "--help") {
26482
+ io.stdout.write(USAGE);
26483
+ return command === void 0 ? 1 : 0;
26484
+ }
26485
+ if (deps.timelineEnabled === false || !deps.qa.enabled) {
26486
+ io.stderr.write("timeline qa disabled \u2014 set activity.timeline.qa.enabled=true\n");
26487
+ return 1;
26488
+ }
26489
+ const { flags } = parseFlags(rest);
26490
+ if (command === "range") {
26491
+ const from = flagString(flags, "--from");
26492
+ const to = flagString(flags, "--to");
26493
+ if (!from || !to) throw new TypeError("range requires --from and --to");
26494
+ if (!Array.isArray(deps.cards)) {
26495
+ io.stderr.write("store_unreadable\n");
26496
+ return 1;
26497
+ }
26498
+ const formatRaw = flagString(flags, "--format") ?? "compact";
26499
+ if (formatRaw !== "cards" && formatRaw !== "compact") {
26500
+ throw new TypeError("format must be one of: cards, compact");
26501
+ }
26502
+ const categoriesRaw = flagString(flags, "--categories");
26503
+ const result = queryTimelineRange(deps.cards, {
26504
+ from,
26505
+ to,
26506
+ format: formatRaw,
26507
+ categories: categoriesRaw ? categoriesRaw.split(",").filter(Boolean) : void 0,
26508
+ includeDistractions: flags.get("--include-distractions") === true,
26509
+ maxRangeDays: deps.qa.maxRangeDays
26510
+ });
26511
+ io.stdout.write(`${JSON.stringify(result)}
26512
+ `);
26513
+ return 0;
26514
+ }
26515
+ if (command === "search") {
26516
+ const q = flagString(flags, "--query");
26517
+ if (q === void 0) throw new TypeError("search requires --query");
26518
+ const limitRaw = flagString(flags, "--limit");
26519
+ const limit = limitRaw === void 0 ? void 0 : Number(limitRaw);
26520
+ if (limitRaw !== void 0 && !Number.isInteger(limit)) {
26521
+ throw new RangeError("limit must be an integer from 1 to 50");
26522
+ }
26523
+ const result = queryTimelineSearch(deps.cards, {
26524
+ query: q,
26525
+ from: flagString(flags, "--from"),
26526
+ to: flagString(flags, "--to"),
26527
+ limit
26528
+ });
26529
+ io.stdout.write(`${JSON.stringify(result)}
26530
+ `);
26531
+ return result.ok ? 0 : 1;
26532
+ }
26533
+ throw new TypeError(`unknown command ${command} (valid: range, search)`);
26534
+ } catch (err) {
26535
+ io.stderr.write(`${err instanceof Error ? err.message : String(err)}
26536
+ `);
26537
+ return 1;
26538
+ }
26539
+ }
26540
+
26541
+ // src/activity/timeline/journal-recap.ts
26542
+ function formatMinutes(ms) {
26543
+ return `${Math.round(ms / 6e4)}m`;
26544
+ }
26545
+ function clipToWindow(cards, winStart, winEnd) {
26546
+ const clipped = [];
26547
+ for (const card of cards) {
26548
+ const start = Date.parse(card.startUtc);
26549
+ const end = Date.parse(card.endUtc);
26550
+ if (!Number.isFinite(start) || !Number.isFinite(end)) continue;
26551
+ const startMs = Math.max(start, winStart);
26552
+ const endMs = Math.min(end, winEnd);
26553
+ if (endMs <= startMs) continue;
26554
+ clipped.push({ card, startMs, endMs, durationMs: endMs - startMs });
26555
+ }
26556
+ clipped.sort((left, right) => {
26557
+ const byStart = left.startMs - right.startMs;
26558
+ if (byStart !== 0) return byStart;
26559
+ const byTitle = left.card.title.localeCompare(right.card.title);
26560
+ if (byTitle !== 0) return byTitle;
26561
+ return left.card.id.localeCompare(right.card.id);
26562
+ });
26563
+ return clipped;
26564
+ }
26565
+ function categoryLines(clipped) {
26566
+ const totals = /* @__PURE__ */ new Map();
26567
+ for (const row of clipped) {
26568
+ totals.set(row.card.categoryId, (totals.get(row.card.categoryId) ?? 0) + row.durationMs);
26569
+ }
26570
+ const rows = [...totals.entries()].sort((left, right) => {
26571
+ const byDuration = right[1] - left[1];
26572
+ return byDuration !== 0 ? byDuration : left[0].localeCompare(right[0]);
26573
+ });
26574
+ if (rows.length === 0) return ["_No categories._"];
26575
+ return rows.map(([categoryId, durationMs]) => `- ${formatMinutes(durationMs)} ${categoryId}`);
26576
+ }
26577
+ function mergeIntervals(intervals) {
26578
+ const ordered = [...intervals].sort((left, right) => left[0] - right[0] || left[1] - right[1]);
26579
+ const merged = [];
26580
+ for (const [start, end] of ordered) {
26581
+ const last = merged[merged.length - 1];
26582
+ if (!last || start > last[1]) merged.push([start, end]);
26583
+ else last[1] = Math.max(last[1], end);
26584
+ }
26585
+ return merged;
26586
+ }
26587
+ function countGaps(winStart, winEnd, intervals) {
26588
+ const merged = mergeIntervals(intervals);
26589
+ let gaps = 0;
26590
+ let cursor = winStart;
26591
+ for (const [start, end] of merged) {
26592
+ if (start > cursor) gaps += 1;
26593
+ cursor = Math.max(cursor, end);
26594
+ }
26595
+ if (cursor < winEnd) gaps += 1;
26596
+ return gaps;
26597
+ }
26598
+ function renderDeterministicJournal(cards, options) {
26599
+ const window = activityDayWindow(options.date, options.timezone);
26600
+ const winStart = Date.parse(window.startUtc);
26601
+ const winEnd = Date.parse(window.endUtc);
26602
+ const clipped = clipToWindow(cards, winStart, winEnd);
26603
+ const idle = clipped.filter((row) => row.card.kind === "idle").length;
26604
+ const pause = clipped.filter((row) => row.card.kind === "pause").length;
26605
+ const gaps = countGaps(
26606
+ winStart,
26607
+ winEnd,
26608
+ clipped.map((row) => [row.startMs, row.endMs])
26609
+ );
26610
+ const cardLines = clipped.length === 0 ? ["_No cards._"] : clipped.map((row) => `- ${formatMinutes(row.durationMs)} ${row.card.title}`);
26611
+ return [
26612
+ `# Journal \u2014 ${options.date} (${options.timezone})`,
26613
+ "",
26614
+ "## Categories",
26615
+ "",
26616
+ ...categoryLines(clipped),
26617
+ "",
26618
+ "## Cards",
26619
+ "",
26620
+ ...cardLines,
26621
+ "",
26622
+ "## Gaps / idle / pause",
26623
+ "",
26624
+ `- Gaps: ${gaps}`,
26625
+ `- Idle: ${idle}`,
26626
+ `- Pause: ${pause}`,
26627
+ ""
26628
+ ].join("\n");
26629
+ }
26630
+
25867
26631
  // src/activity/memory-gen.ts
25868
26632
  var ACTIVITY_ALLOWED_CATEGORIES = {
25869
26633
  decision: true,
@@ -26120,10 +26884,58 @@ async function generateActivityMemories(date, digestBody, config, deps) {
26120
26884
  return result;
26121
26885
  }
26122
26886
 
26887
+ // src/activity/privacy.ts
26888
+ var MS_PER_DAY2 = 864e5;
26889
+ function asRecord(value, name) {
26890
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
26891
+ throw new TypeError(`${name} must be an object`);
26892
+ }
26893
+ return value;
26894
+ }
26895
+ function parseGate(value, key, fallback) {
26896
+ if (value === void 0) return fallback;
26897
+ const parsed = coerceBooleanLike(value, key);
26898
+ if (parsed === void 0) throw new TypeError(`${key} must be a boolean`);
26899
+ return parsed;
26900
+ }
26901
+ function parseActivityPrivacy(raw) {
26902
+ if (raw === void 0 || raw === null) {
26903
+ return { enabled: false, retentionDays: 0, exportIncludeObservations: false };
26904
+ }
26905
+ const config = asRecord(raw, "activity");
26906
+ const enabled = parseGate(config.enabled, "activity.enabled", false);
26907
+ let retentionDays = 0;
26908
+ if (config.retentionDays !== void 0) {
26909
+ const parsed = coerceNumber(config.retentionDays, "activity.retentionDays");
26910
+ if (parsed === void 0 || !Number.isInteger(parsed) || parsed < 0) {
26911
+ throw new RangeError("activity.retentionDays must be a non-negative integer");
26912
+ }
26913
+ retentionDays = parsed;
26914
+ }
26915
+ const exportIncludeObservations = parseGate(
26916
+ config.exportIncludeObservations,
26917
+ "activity.exportIncludeObservations",
26918
+ false
26919
+ );
26920
+ return { enabled, retentionDays, exportIncludeObservations };
26921
+ }
26922
+ function shouldRetain(capturedAtMs, nowMs, retentionDays, enabled = true) {
26923
+ if (!enabled) return false;
26924
+ if (retentionDays < 0 || !Number.isInteger(retentionDays)) {
26925
+ throw new RangeError("activity.retentionDays must be a non-negative integer");
26926
+ }
26927
+ if (retentionDays === 0) return true;
26928
+ return nowMs - capturedAtMs < retentionDays * MS_PER_DAY2;
26929
+ }
26930
+ function observationsForExport(observations, policy) {
26931
+ if (!policy.enabled || !policy.exportIncludeObservations) return [];
26932
+ return observations;
26933
+ }
26934
+
26123
26935
  // src/session-summaries/index.ts
26124
- import { createHash as createHash9 } from "crypto";
26936
+ import { createHash as createHash10 } from "crypto";
26125
26937
  import { lstat as lstat3, mkdir as mkdir7, readFile as readFile7, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
26126
- import path32 from "path";
26938
+ import path33 from "path";
26127
26939
 
26128
26940
  // src/session-summaries/adapters.ts
26129
26941
  var VALID_ROLES = /* @__PURE__ */ new Set(["user", "assistant", "tool", "system", "other"]);
@@ -26623,12 +27435,12 @@ var DEFAULT_MAX_FILES = 5e3;
26623
27435
  var DEFAULT_MAX_SESSIONS = 500;
26624
27436
  var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".json", ".jsonl"]);
26625
27437
  function shortHash(value, length = 16) {
26626
- return createHash9("sha256").update(value).digest("hex").slice(0, length);
27438
+ return createHash10("sha256").update(value).digest("hex").slice(0, length);
26627
27439
  }
26628
27440
  async function listTranscriptFiles(root, maxFiles) {
26629
27441
  const out = [];
26630
27442
  let truncated = false;
26631
- const entrySortKey = (entryName, isDirectory) => isDirectory ? `${entryName}${path32.sep}` : entryName;
27443
+ const entrySortKey = (entryName, isDirectory) => isDirectory ? `${entryName}${path33.sep}` : entryName;
26632
27444
  async function visit(dir) {
26633
27445
  if (truncated) return;
26634
27446
  const entries = (await readdir4(dir, { withFileTypes: true })).sort(
@@ -26638,13 +27450,13 @@ async function listTranscriptFiles(root, maxFiles) {
26638
27450
  if (truncated) return;
26639
27451
  if (entry.name.startsWith(".")) continue;
26640
27452
  if (entry.isSymbolicLink()) continue;
26641
- const fullPath = path32.join(dir, entry.name);
27453
+ const fullPath = path33.join(dir, entry.name);
26642
27454
  if (entry.isDirectory()) {
26643
27455
  await visit(fullPath);
26644
27456
  continue;
26645
27457
  }
26646
27458
  if (!entry.isFile()) continue;
26647
- const ext = path32.extname(entry.name).toLowerCase();
27459
+ const ext = path33.extname(entry.name).toLowerCase();
26648
27460
  if (!SUPPORTED_EXTENSIONS.has(ext)) continue;
26649
27461
  out.push(fullPath);
26650
27462
  if (out.length > maxFiles) {
@@ -26671,7 +27483,7 @@ function normalizeInputDir(inputDir) {
26671
27483
  if (typeof inputDir !== "string" || inputDir.trim().length === 0) {
26672
27484
  throw new Error("inputDir must be a non-empty string");
26673
27485
  }
26674
- return path32.resolve(expandTildePath(inputDir.trim()));
27486
+ return path33.resolve(expandTildePath(inputDir.trim()));
26675
27487
  }
26676
27488
  function initRoleCounts() {
26677
27489
  return {
@@ -26828,11 +27640,11 @@ async function collectLocalSessionSummaries(options) {
26828
27640
  continue;
26829
27641
  }
26830
27642
  seenFileHashes.add(fileHash);
26831
- const fileExtension = path32.extname(filePath).toLowerCase();
27643
+ const fileExtension = path33.extname(filePath).toLowerCase();
26832
27644
  const parsed = await adapter.parseFile(
26833
27645
  {
26834
27646
  content,
26835
- fileName: path32.basename(filePath),
27647
+ fileName: path33.basename(filePath),
26836
27648
  fileExtension,
26837
27649
  fileRef: fileHash
26838
27650
  },
@@ -26888,7 +27700,7 @@ async function collectLocalSessionSummaries(options) {
26888
27700
  }
26889
27701
  async function readRedactionConfig(pathLike) {
26890
27702
  if (!pathLike) return void 0;
26891
- const raw = await readFile7(path32.resolve(expandTildePath(pathLike)), "utf-8");
27703
+ const raw = await readFile7(path33.resolve(expandTildePath(pathLike)), "utf-8");
26892
27704
  const parsed = JSON.parse(raw);
26893
27705
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
26894
27706
  throw new Error("redaction config must be a JSON object");
@@ -26901,15 +27713,15 @@ function toJsonl(drafts) {
26901
27713
  }
26902
27714
  function defaultDraftOutputPath(memoryDir, generatedAt) {
26903
27715
  const stamp = generatedAt.replace(/[:.]/g, "-");
26904
- return path32.join(
26905
- path32.resolve(expandTildePath(memoryDir)),
27716
+ return path33.join(
27717
+ path33.resolve(expandTildePath(memoryDir)),
26906
27718
  "state",
26907
27719
  "session-summary-drafts",
26908
27720
  `session-summaries-${stamp}.jsonl`
26909
27721
  );
26910
27722
  }
26911
27723
  async function writeDrafts(filePath, drafts) {
26912
- await mkdir7(path32.dirname(filePath), { recursive: true });
27724
+ await mkdir7(path33.dirname(filePath), { recursive: true });
26913
27725
  const tempPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
26914
27726
  try {
26915
27727
  await writeFile7(tempPath, toJsonl(drafts), "utf-8");
@@ -26927,7 +27739,7 @@ async function runLocalSessionSummaryCliCommand(options) {
26927
27739
  });
26928
27740
  const wroteFiles = [];
26929
27741
  if (options.output) {
26930
- const outputPath = path32.resolve(expandTildePath(options.output));
27742
+ const outputPath = path33.resolve(expandTildePath(options.output));
26931
27743
  await writeDrafts(outputPath, report.drafts);
26932
27744
  wroteFiles.push(outputPath);
26933
27745
  }
@@ -26962,19 +27774,19 @@ async function runLocalSessionSummaryCliCommand(options) {
26962
27774
 
26963
27775
  // src/transfer/capsule-fork.ts
26964
27776
  import { lstat as lstat4, mkdir as mkdir8, readFile as readFile8, realpath as realpath3, writeFile as writeFile8 } from "fs/promises";
26965
- import path33 from "path";
27777
+ import path34 from "path";
26966
27778
  async function forkCapsule(opts) {
26967
27779
  validateForkId(opts.forkId);
26968
- const rootAbs = path33.resolve(opts.targetRoot);
27780
+ const rootAbs = path34.resolve(opts.targetRoot);
26969
27781
  await assertIsDirectoryNotSymlink(rootAbs, "forkCapsule", "targetRoot");
26970
- const forkDirAbs = path33.join(rootAbs, "forks", opts.forkId);
27782
+ const forkDirAbs = path34.join(rootAbs, "forks", opts.forkId);
26971
27783
  const forkEntryExists = await pathEntryExists(forkDirAbs);
26972
27784
  if (forkEntryExists) {
26973
27785
  throw new Error(
26974
27786
  `forkCapsule: fork path already exists \u2014 forkId "${opts.forkId}" is already in use at: ${forkDirAbs}`
26975
27787
  );
26976
27788
  }
26977
- const archiveAbs = path33.resolve(opts.sourceArchive);
27789
+ const archiveAbs = path34.resolve(opts.sourceArchive);
26978
27790
  const importResult = await importCapsule({
26979
27791
  archivePath: archiveAbs,
26980
27792
  root: rootAbs,
@@ -26996,10 +27808,10 @@ async function forkCapsule(opts) {
26996
27808
  importedRecords: importResult.imported.length,
26997
27809
  skippedRecords: importResult.skipped.length
26998
27810
  };
26999
- const lineagePath = path33.join(forkDirAbs, "lineage.json");
27811
+ const lineagePath = path34.join(forkDirAbs, "lineage.json");
27000
27812
  const rootReal = await realpath3(rootAbs);
27001
27813
  await assertRealpathInsideRoot(rootReal, lineagePath, `forks/${opts.forkId}/lineage.json`, "forkCapsule");
27002
- await mkdir8(path33.dirname(lineagePath), { recursive: true });
27814
+ await mkdir8(path34.dirname(lineagePath), { recursive: true });
27003
27815
  await writeFile8(lineagePath, JSON.stringify(lineage, null, 2) + "\n", "utf-8");
27004
27816
  return {
27005
27817
  archivePath: archiveAbs,
@@ -27013,11 +27825,11 @@ async function readForkLineage(targetRoot, forkId) {
27013
27825
  if (typeof forkId !== "string" || forkId.length === 0 || forkId.length > 64 || !CAPSULE_ID_PATTERN.test(forkId)) {
27014
27826
  return null;
27015
27827
  }
27016
- const rootAbs = path33.resolve(targetRoot);
27828
+ const rootAbs = path34.resolve(targetRoot);
27017
27829
  const rootReal = await realpath3(rootAbs).catch(() => rootAbs);
27018
- const lineagePath = path33.join(rootReal, "forks", forkId, "lineage.json");
27019
- const rel = path33.relative(rootReal, lineagePath);
27020
- if (rel.startsWith("..") || path33.isAbsolute(rel)) {
27830
+ const lineagePath = path34.join(rootReal, "forks", forkId, "lineage.json");
27831
+ const rel = path34.relative(rootReal, lineagePath);
27832
+ if (rel.startsWith("..") || path34.isAbsolute(rel)) {
27021
27833
  return null;
27022
27834
  }
27023
27835
  if (!await isLineagePathContained(rootReal, lineagePath)) {
@@ -27058,19 +27870,19 @@ async function pathEntryExists(absPath) {
27058
27870
  async function isLineagePathContained(rootReal, lineagePath) {
27059
27871
  let existing = lineagePath;
27060
27872
  const suffix = [];
27061
- while (existing !== path33.dirname(existing)) {
27873
+ while (existing !== path34.dirname(existing)) {
27062
27874
  const st = await lstat4(existing).catch(() => null);
27063
27875
  if (st !== null) break;
27064
- suffix.unshift(path33.basename(existing));
27065
- existing = path33.dirname(existing);
27876
+ suffix.unshift(path34.basename(existing));
27877
+ existing = path34.dirname(existing);
27066
27878
  }
27067
27879
  const existingReal = await realpath3(existing).catch(() => existing);
27068
- const targetReal = suffix.length > 0 ? path33.join(existingReal, ...suffix) : existingReal;
27069
- const rel = path33.relative(rootReal, targetReal);
27880
+ const targetReal = suffix.length > 0 ? path34.join(existingReal, ...suffix) : existingReal;
27881
+ const rel = path34.relative(rootReal, targetReal);
27070
27882
  if (rel === "") return true;
27071
27883
  if (rel === "..") return false;
27072
- if (rel.startsWith(`..${path33.sep}`)) return false;
27073
- if (path33.isAbsolute(rel)) return false;
27884
+ if (rel.startsWith(`..${path34.sep}`)) return false;
27885
+ if (path34.isAbsolute(rel)) return false;
27074
27886
  return true;
27075
27887
  }
27076
27888
 
@@ -27155,8 +27967,31 @@ export {
27155
27967
  getTaxonomyFilePath,
27156
27968
  WearablesService,
27157
27969
  locateTranscriptPath,
27970
+ TIMELINE_RESERVED_UNKNOWN,
27971
+ TIMELINE_RESERVED_IDLE,
27972
+ TIMELINE_RESERVED_PAUSE,
27973
+ DEFAULT_TIMELINE_CATEGORIES,
27974
+ validateTimelineCategories,
27975
+ sortTimelineCategories,
27976
+ classifyTimelineObservation,
27977
+ TIMELINE_FORMAT_VERSION,
27978
+ TIMELINE_MERGE_GAP_MS,
27979
+ TIMELINE_MAX_DWELL_MS,
27980
+ buildTimelineDay,
27981
+ serializeTimelineDay,
27982
+ timelineCorrectionDatabasePath,
27983
+ TimelineCorrectionStore,
27984
+ applyTimelineCorrections,
27985
+ queryTimelineRange,
27986
+ queryTimelineSearch,
27987
+ runTimelineCliCommand,
27988
+ renderDeterministicJournal,
27158
27989
  isEligibleActivityFact,
27159
27990
  generateActivityMemories,
27991
+ MS_PER_DAY2 as MS_PER_DAY,
27992
+ parseActivityPrivacy,
27993
+ shouldRetain,
27994
+ observationsForExport,
27160
27995
  fuseMeeting,
27161
27996
  buildMeetingRecordsForDay,
27162
27997
  MeetingsBuilder,
@@ -27190,4 +28025,4 @@ export {
27190
28025
  blendGraphExpandedRecallScore,
27191
28026
  Orchestrator
27192
28027
  };
27193
- //# sourceMappingURL=chunk-LKYIOCWL.js.map
28028
+ //# sourceMappingURL=chunk-TCF4MU7L.js.map