@remnic/core 9.69.87 → 9.69.89

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 (416) hide show
  1. package/dist/access-admin-ops-surface.js +56 -49
  2. package/dist/access-authorization-probe.js +57 -50
  3. package/dist/access-boundary.js +56 -49
  4. package/dist/access-citation-namespace.js +2 -2
  5. package/dist/access-cli.js +129 -122
  6. package/dist/access-cli.js.map +1 -1
  7. package/dist/access-extraction-force-flush.js +56 -49
  8. package/dist/access-http-briefing.js +57 -50
  9. package/dist/access-http-offline-stream.d.ts.map +1 -1
  10. package/dist/access-http-offline-stream.js +1 -1
  11. package/dist/access-http-query.js +58 -51
  12. package/dist/access-http.js +78 -71
  13. package/dist/access-identity-continuity-surface.js +56 -49
  14. package/dist/access-lcm-surface.js +56 -49
  15. package/dist/access-mcp-output-schemas.d.ts.map +1 -1
  16. package/dist/access-mcp-output-schemas.js +1 -1
  17. package/dist/access-mcp.js +69 -62
  18. package/dist/access-namespace-preflight.js +56 -49
  19. package/dist/access-observe-write-category.js +20 -13
  20. package/dist/access-observe-write-surface.js +56 -49
  21. package/dist/access-offline-manifest.js +16 -10
  22. package/dist/access-operations-batch.js +60 -53
  23. package/dist/access-operations.js +67 -60
  24. package/dist/access-recall-concurrency.js +56 -49
  25. package/dist/access-recall-response.js +56 -49
  26. package/dist/access-recall-surface.js +56 -49
  27. package/dist/access-schema.js +16 -7
  28. package/dist/access-service.d.ts.map +1 -1
  29. package/dist/access-service.js +56 -49
  30. package/dist/access-surface-catalog.js +58 -51
  31. package/dist/access-surface-catalog.js.map +1 -1
  32. package/dist/active-recall.js +24 -18
  33. package/dist/active-recall.js.map +1 -1
  34. package/dist/{auto-sync-6IPX2BAC.js → auto-sync-U5N3CB5Y.js} +7 -7
  35. package/dist/briefing.js +11 -11
  36. package/dist/buffer.js +7 -7
  37. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-GWVG7LGC.js} +2 -2
  38. package/dist/{capsule-merge-3MNURAQ3.js → capsule-merge-ZCXUPLNJ.js} +2 -2
  39. package/dist/causal-behavior.js +2 -2
  40. package/dist/causal-chain.js +2 -2
  41. package/dist/causal-consolidation.js +14 -14
  42. package/dist/causal-retrieval.js +2 -2
  43. package/dist/causal-trajectory-graph.js +2 -2
  44. package/dist/causal-trajectory.js +1 -1
  45. package/dist/{chunk-JE334SIA.js → chunk-22DYJLFN.js} +2 -2
  46. package/dist/{chunk-YTQGGO3K.js → chunk-22LMCQ5B.js} +85 -82
  47. package/dist/{chunk-YTQGGO3K.js.map → chunk-22LMCQ5B.js.map} +1 -1
  48. package/dist/{chunk-JGSQ6P4D.js → chunk-2FX374UI.js} +2 -2
  49. package/dist/{chunk-SY5KDWGU.js → chunk-2WLMWP2T.js} +2 -2
  50. package/dist/{chunk-6TT6HRE4.js → chunk-3AGHSQPM.js} +2 -2
  51. package/dist/{chunk-P6WFK4ZJ.js → chunk-3O5BB45T.js} +4 -4
  52. package/dist/{chunk-3C3J243X.js → chunk-3QKO4QN7.js} +3 -3
  53. package/dist/{chunk-KFCMMDHH.js → chunk-3YD44CH2.js} +2 -2
  54. package/dist/{chunk-FRCESVV6.js → chunk-4HUCP4R4.js} +18 -18
  55. package/dist/chunk-4HUCP4R4.js.map +1 -0
  56. package/dist/chunk-4NSLQ7EU.js +137 -0
  57. package/dist/chunk-4NSLQ7EU.js.map +1 -0
  58. package/dist/{chunk-7DE2NOON.js → chunk-4O4XCBOS.js} +3 -3
  59. package/dist/{chunk-GDYU6VF4.js → chunk-5AYUHSAU.js} +2 -2
  60. package/dist/{chunk-ICZQG4XE.js → chunk-5FAGCOZD.js} +4 -4
  61. package/dist/{chunk-VKQI47DJ.js → chunk-5FNZ3G6X.js} +4 -4
  62. package/dist/{chunk-CK5KOVHW.js → chunk-5R627MYY.js} +3 -2
  63. package/dist/{chunk-CK5KOVHW.js.map → chunk-5R627MYY.js.map} +1 -1
  64. package/dist/{chunk-VQNONC4E.js → chunk-5STPRPE7.js} +2 -2
  65. package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
  66. package/dist/{chunk-SRZW7FNU.js → chunk-64ZUALXK.js} +2 -2
  67. package/dist/{chunk-4BZP2B4U.js → chunk-6MNKDTDI.js} +2 -2
  68. package/dist/{chunk-DUJYRVUD.js → chunk-6O2VUWV6.js} +3 -3
  69. package/dist/chunk-75PT4N7Q.js +75 -0
  70. package/dist/chunk-75PT4N7Q.js.map +1 -0
  71. package/dist/{chunk-HESDNYRB.js → chunk-76M5OK7V.js} +2 -2
  72. package/dist/{chunk-FAN73COB.js → chunk-7D7OUO5W.js} +2 -2
  73. package/dist/{chunk-DZ525SNQ.js → chunk-7QE46QXI.js} +1 -1
  74. package/dist/{chunk-VX6GCKBS.js → chunk-7WBSMXGC.js} +4 -4
  75. package/dist/{chunk-VVDWZRZG.js → chunk-A6RVIHHK.js} +3 -3
  76. package/dist/{chunk-M536WNTQ.js → chunk-AEJ3TE5H.js} +2 -2
  77. package/dist/{chunk-72JNNJJJ.js → chunk-AXC4WSF3.js} +3 -3
  78. package/dist/chunk-AXGJMDBS.js +684 -0
  79. package/dist/chunk-AXGJMDBS.js.map +1 -0
  80. package/dist/{chunk-UA5DX5C3.js → chunk-AZIOEOK4.js} +2 -2
  81. package/dist/{chunk-N4S4NUX5.js → chunk-B3O3IRZN.js} +1 -1
  82. package/dist/{chunk-XTYX6V52.js → chunk-BJVO4H5C.js} +2 -2
  83. package/dist/{chunk-7LCGFUMB.js → chunk-BUKK5SWA.js} +4 -4
  84. package/dist/{chunk-TM3RXL4G.js → chunk-BUQKSQXL.js} +2 -2
  85. package/dist/chunk-C6HPNPNK.js +64 -0
  86. package/dist/chunk-C6HPNPNK.js.map +1 -0
  87. package/dist/{chunk-RB776UH3.js → chunk-C7V3KPKJ.js} +235 -93
  88. package/dist/chunk-C7V3KPKJ.js.map +1 -0
  89. package/dist/{chunk-FOH7AMMI.js → chunk-CALBQ2NG.js} +71 -72
  90. package/dist/chunk-CALBQ2NG.js.map +1 -0
  91. package/dist/{chunk-37S3IMYB.js → chunk-DGS34QSY.js} +2 -2
  92. package/dist/{chunk-4IEOGIPB.js → chunk-DO4C4AXD.js} +2 -2
  93. package/dist/{chunk-SPSRGEDQ.js → chunk-EAQQ2FD3.js} +9 -9
  94. package/dist/{chunk-3BTFBQLO.js → chunk-EFHNFTWB.js} +49 -3
  95. package/dist/chunk-EFHNFTWB.js.map +1 -0
  96. package/dist/{chunk-C3QXITIP.js → chunk-EQUD7FP4.js} +2 -2
  97. package/dist/chunk-ETUZFFPU.js +218 -0
  98. package/dist/chunk-ETUZFFPU.js.map +1 -0
  99. package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
  100. package/dist/{chunk-YITN5WXI.js → chunk-FC52YWAO.js} +2 -2
  101. package/dist/{chunk-ZI7QA4MK.js → chunk-FEIXG5FA.js} +2 -2
  102. package/dist/{chunk-CLXTDOKV.js → chunk-FUNBJQYR.js} +2 -2
  103. package/dist/{chunk-CLSYE5OZ.js → chunk-G2STTRYB.js} +2 -2
  104. package/dist/{chunk-TDYAIXHK.js → chunk-H36X4NRH.js} +5 -5
  105. package/dist/{chunk-3GQC3NMB.js → chunk-H56VY4BY.js} +5 -5
  106. package/dist/{chunk-PUKTBULQ.js → chunk-HWLIMQE2.js} +2 -2
  107. package/dist/{chunk-V2ES4WCZ.js → chunk-IIARQTZ2.js} +2 -2
  108. package/dist/{chunk-QEV26L2F.js → chunk-IKDRGVVJ.js} +2 -2
  109. package/dist/{chunk-WQZZDN5M.js → chunk-IVEHY2VT.js} +254 -377
  110. package/dist/chunk-IVEHY2VT.js.map +1 -0
  111. package/dist/{chunk-LS3XH3UE.js → chunk-IYIBGSHJ.js} +2 -2
  112. package/dist/{chunk-YSJTCOHR.js → chunk-J27JML5O.js} +2 -2
  113. package/dist/{chunk-AQK54Q7O.js → chunk-JB56XYHP.js} +2 -2
  114. package/dist/{chunk-NE6PHPLG.js → chunk-JBH26P62.js} +10 -10
  115. package/dist/{chunk-CWHV574S.js → chunk-JUT3OR2L.js} +6 -6
  116. package/dist/{chunk-6ET2VII7.js → chunk-JYG2334B.js} +2 -2
  117. package/dist/{chunk-LF5IGOOD.js → chunk-JYM4Y6SO.js} +16 -16
  118. package/dist/{chunk-FB64XE3R.js → chunk-JZ4TJHR2.js} +2 -2
  119. package/dist/{chunk-EHS5MJEF.js → chunk-KTKHO3UI.js} +3 -3
  120. package/dist/{chunk-WIKO4SCR.js → chunk-LHRQBMJN.js} +2 -2
  121. package/dist/{chunk-K4J4E7WV.js → chunk-LO4UKPKX.js} +2 -2
  122. package/dist/{chunk-JN72EPOE.js → chunk-MAAL6OZV.js} +7 -7
  123. package/dist/chunk-MAAL6OZV.js.map +1 -0
  124. package/dist/{chunk-MY2PLXSM.js → chunk-MCTM4YPL.js} +2 -1
  125. package/dist/{chunk-MY2PLXSM.js.map → chunk-MCTM4YPL.js.map} +1 -1
  126. package/dist/{chunk-6NQ4LSMS.js → chunk-MGZMC6WN.js} +47 -47
  127. package/dist/chunk-MSAI3Q7D.js +372 -0
  128. package/dist/chunk-MSAI3Q7D.js.map +1 -0
  129. package/dist/{chunk-BMYZTZ5D.js → chunk-MY7B3HYC.js} +2 -2
  130. package/dist/{chunk-NB3LRY4T.js → chunk-N4PYB235.js} +2 -2
  131. package/dist/{chunk-S3YM4SZQ.js → chunk-N7QV3CMX.js} +2 -2
  132. package/dist/{chunk-L6UZEAID.js → chunk-NJVR724O.js} +4 -4
  133. package/dist/{chunk-VLLD4TOB.js → chunk-NMZVDRVP.js} +2 -2
  134. package/dist/{chunk-P2WZHLUF.js → chunk-NOL7SEWN.js} +2 -2
  135. package/dist/{chunk-2NLLXCJG.js → chunk-OWHERGF2.js} +2 -2
  136. package/dist/{chunk-6L3PBSAR.js → chunk-PMNLL2TL.js} +2 -2
  137. package/dist/{chunk-VYCOJKSX.js → chunk-PO7NXNGC.js} +2 -2
  138. package/dist/{chunk-4IIMMZZK.js → chunk-PULDSMCJ.js} +10 -10
  139. package/dist/{chunk-G6SVZWPB.js → chunk-PZX3AQLF.js} +44 -1
  140. package/dist/chunk-PZX3AQLF.js.map +1 -0
  141. package/dist/{chunk-HBBHL4YF.js → chunk-QOXNTKXB.js} +2 -2
  142. package/dist/{chunk-CUCWX3MO.js → chunk-QZLCVO2V.js} +2 -2
  143. package/dist/{chunk-NE7I2RCT.js → chunk-R3X2T2LP.js} +2 -2
  144. package/dist/{chunk-S7GCT7NU.js → chunk-RBITPCMK.js} +8 -8
  145. package/dist/{chunk-EVBI7S4J.js → chunk-RMDGAAZF.js} +4 -4
  146. package/dist/{chunk-BJRAELDH.js → chunk-SCXURCVT.js} +3 -3
  147. package/dist/{chunk-EQ6YOIKO.js → chunk-ST2RQUXC.js} +3 -3
  148. package/dist/{chunk-CS52MFDV.js → chunk-SZG4WFAG.js} +2 -2
  149. package/dist/{chunk-BFO3IR56.js → chunk-TPEZ2SHV.js} +2 -2
  150. package/dist/chunk-TYT4TEQV.js +45 -0
  151. package/dist/chunk-TYT4TEQV.js.map +1 -0
  152. package/dist/{chunk-YRLHEEQT.js → chunk-U6VC6RP3.js} +2 -2
  153. package/dist/chunk-UCPGOUDZ.js +726 -0
  154. package/dist/chunk-UCPGOUDZ.js.map +1 -0
  155. package/dist/{chunk-MOQPEFLN.js → chunk-UP75KL3L.js} +2 -2
  156. package/dist/{chunk-W4AOR52H.js → chunk-UQDC3W77.js} +2 -2
  157. package/dist/{chunk-X7Y7WX73.js → chunk-UVYI6VIX.js} +1 -1
  158. package/dist/{chunk-D5F7TKMH.js → chunk-V4JZCTMK.js} +2 -2
  159. package/dist/{chunk-MQJL6CDZ.js → chunk-VA4O3U7U.js} +4 -4
  160. package/dist/{chunk-4CDYONWO.js → chunk-VDO32NLK.js} +3 -3
  161. package/dist/{chunk-SOZUJCME.js → chunk-VHDKPGMG.js} +6 -6
  162. package/dist/{chunk-QWW2JDDX.js → chunk-WNRTXEWW.js} +6 -6
  163. package/dist/{chunk-NR2ASHBL.js → chunk-XOV7NRY5.js} +2 -2
  164. package/dist/{chunk-KP7SANCF.js → chunk-YPI4RQWV.js} +2 -2
  165. package/dist/{chunk-JKMHZF3Q.js → chunk-YSWJXOOL.js} +2 -2
  166. package/dist/{chunk-LQG5O5EP.js → chunk-Z3O53WZR.js} +2 -2
  167. package/dist/{chunk-QVS22WTO.js → chunk-ZG5DWWKK.js} +2 -2
  168. package/dist/cli.js +99 -92
  169. package/dist/coding/export-okf-codegraph.js +12 -12
  170. package/dist/coding/pre-action-gate.js +2 -2
  171. package/dist/compounding/engine.js +12 -12
  172. package/dist/config.js +24 -18
  173. package/dist/connectors/codex-materialize-runner.js +11 -11
  174. package/dist/connectors/index.js +11 -11
  175. package/dist/console/state.d.ts +30 -0
  176. package/dist/console/state.d.ts.map +1 -1
  177. package/dist/contradiction/index.js +5 -5
  178. package/dist/convergence-refresh.js +13 -13
  179. package/dist/corpus-watermark.js +13 -13
  180. package/dist/dashboard-runtime.js +2 -2
  181. package/dist/deep-recall-http-glue.js +16 -8
  182. package/dist/embedding-fallback.d.ts +41 -31
  183. package/dist/embedding-fallback.d.ts.map +1 -1
  184. package/dist/embedding-fallback.js +9 -1
  185. package/dist/embedding-generation-lock.d.ts +49 -0
  186. package/dist/embedding-generation-lock.d.ts.map +1 -0
  187. package/dist/embedding-generation-lock.js +19 -0
  188. package/dist/embedding-index-storage.d.ts +276 -0
  189. package/dist/embedding-index-storage.d.ts.map +1 -0
  190. package/dist/embedding-index-storage.js +28 -0
  191. package/dist/entity-retrieval.js +12 -12
  192. package/dist/event-order-recall.js +3 -3
  193. package/dist/explicit-capture.js +6 -6
  194. package/dist/external-wiki-access.js +57 -50
  195. package/dist/extraction.js +17 -17
  196. package/dist/{first-start-migration-7OATHJKB.js → first-start-migration-GAT7G733.js} +4 -4
  197. package/dist/{graph-edge-decay-KQGS3L3B.js → graph-edge-decay-MKIRZ762.js} +5 -5
  198. package/dist/graph-jsonl.js +3 -3
  199. package/dist/graph-snapshot.js +3 -3
  200. package/dist/graph.js +2 -2
  201. package/dist/harmonic-retrieval.js +1 -1
  202. package/dist/index.d.ts +2 -0
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +195 -164
  205. package/dist/lcm/engine.js +2 -2
  206. package/dist/lcm/index.js +5 -5
  207. package/dist/local-llm.js +2 -2
  208. package/dist/location/index.js +14 -14
  209. package/dist/maintenance/memory-governance.js +11 -11
  210. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
  211. package/dist/maintenance/rebuild-memory-projection.js +12 -12
  212. package/dist/memory-browse-operations.js +57 -50
  213. package/dist/memory-subject.js +3 -3
  214. package/dist/namespaces/migrate.js +12 -12
  215. package/dist/namespaces/storage.js +11 -11
  216. package/dist/offline-sync-changeset-generations.d.ts +82 -0
  217. package/dist/offline-sync-changeset-generations.d.ts.map +1 -0
  218. package/dist/offline-sync-changeset-generations.js +21 -0
  219. package/dist/offline-sync-embedding-generation.d.ts +257 -0
  220. package/dist/offline-sync-embedding-generation.d.ts.map +1 -0
  221. package/dist/offline-sync-embedding-generation.js +44 -0
  222. package/dist/offline-sync-embedding-generation.js.map +1 -0
  223. package/dist/offline-sync-exclude-globs.d.ts +15 -0
  224. package/dist/offline-sync-exclude-globs.d.ts.map +1 -1
  225. package/dist/offline-sync-exclude-globs.js +11 -3
  226. package/dist/offline-sync-file-io.d.ts +7 -0
  227. package/dist/offline-sync-file-io.d.ts.map +1 -1
  228. package/dist/offline-sync-file-io.js +14 -2
  229. package/dist/offline-sync-impression-drain.js +3 -3
  230. package/dist/offline-sync-runtime-state.d.ts +5 -0
  231. package/dist/offline-sync-runtime-state.d.ts.map +1 -0
  232. package/dist/offline-sync-runtime-state.js +14 -0
  233. package/dist/offline-sync-runtime-state.js.map +1 -0
  234. package/dist/offline-sync-snapshot-stream.d.ts +26 -0
  235. package/dist/offline-sync-snapshot-stream.d.ts.map +1 -0
  236. package/dist/offline-sync-snapshot-stream.js +29 -0
  237. package/dist/offline-sync-snapshot-stream.js.map +1 -0
  238. package/dist/offline-sync-upload-staging.d.ts +34 -0
  239. package/dist/offline-sync-upload-staging.d.ts.map +1 -0
  240. package/dist/offline-sync-upload-staging.js +26 -0
  241. package/dist/offline-sync-upload-staging.js.map +1 -0
  242. package/dist/offline-sync.d.ts +58 -28
  243. package/dist/offline-sync.d.ts.map +1 -1
  244. package/dist/offline-sync.js +22 -8
  245. package/dist/operator-doctor-corpus.js +14 -14
  246. package/dist/operator-toolkit.js +35 -29
  247. package/dist/orchestration/maintenance.js +22 -22
  248. package/dist/orchestrator.d.ts.map +1 -1
  249. package/dist/orchestrator.js +129 -122
  250. package/dist/recall-navigation-operations.js +57 -50
  251. package/dist/recall-navigation.js +56 -49
  252. package/dist/reconcile/manifest.js +4 -4
  253. package/dist/{resolution-DNX7FO7A.js → resolution-K4A3VPKZ.js} +6 -6
  254. package/dist/resolution-K4A3VPKZ.js.map +1 -0
  255. package/dist/resume-bundles.js +25 -19
  256. package/dist/salvage-envelope.js +5 -5
  257. package/dist/secure-store/index.js +2 -2
  258. package/dist/secure-store/secure-fs.d.ts +14 -1
  259. package/dist/secure-store/secure-fs.d.ts.map +1 -1
  260. package/dist/semantic-consolidation.js +12 -12
  261. package/dist/semantic-rule-promotion.js +11 -11
  262. package/dist/semantic-rule-verifier.js +11 -11
  263. package/dist/source-agent-qualifier.js +14 -14
  264. package/dist/standup/build.js +11 -11
  265. package/dist/{state-ITXJKXRE.js → state-JB47KHYV.js} +2 -2
  266. package/dist/state-JB47KHYV.js.map +1 -0
  267. package/dist/storage.d.ts +9 -3
  268. package/dist/storage.d.ts.map +1 -1
  269. package/dist/storage.js +10 -10
  270. package/dist/subject-config.js +4 -4
  271. package/dist/summarizer.js +3 -3
  272. package/dist/support-passport/index.js +59 -52
  273. package/dist/support-passport/offline-sync-guard.d.ts +6 -2
  274. package/dist/support-passport/offline-sync-guard.d.ts.map +1 -1
  275. package/dist/{trace-ZFVRH4GO.js → trace-LXXCMZJA.js} +3 -3
  276. package/dist/transfer/backup.js +2 -2
  277. package/dist/transfer/capsule-export.js +2 -2
  278. package/dist/transfer/capsule-import.js +3 -3
  279. package/dist/transfer/export-okf.js +12 -12
  280. package/dist/{tui-55UJMJX7.js → tui-2Z5WOV7L.js} +3 -3
  281. package/dist/tui-2Z5WOV7L.js.map +1 -0
  282. package/dist/verified-recall.js +11 -11
  283. package/dist/who-knows-cli.js +12 -12
  284. package/dist/who-knows.js +11 -11
  285. package/dist/write-envelope.js +4 -4
  286. package/package.json +2 -2
  287. package/src/access-http-offline-stream.ts +3 -0
  288. package/src/access-mcp-output-schemas.ts +1 -0
  289. package/src/access-service.ts +7 -18
  290. package/src/console/state.test.ts +56 -0
  291. package/src/console/state.ts +83 -0
  292. package/src/embedding-fallback.ts +325 -141
  293. package/src/embedding-generation-lock.ts +141 -0
  294. package/src/embedding-index-storage.test.ts +245 -0
  295. package/src/embedding-index-storage.ts +1068 -0
  296. package/src/index.ts +3 -3
  297. package/src/offline-sync-changeset-generations.test.ts +962 -0
  298. package/src/offline-sync-changeset-generations.ts +549 -0
  299. package/src/offline-sync-embedding-generation.test.ts +2173 -0
  300. package/src/offline-sync-embedding-generation.ts +1153 -0
  301. package/src/offline-sync-exclude-globs.ts +112 -0
  302. package/src/offline-sync-file-io.ts +48 -0
  303. package/src/offline-sync-runtime-state.ts +48 -0
  304. package/src/offline-sync-snapshot-stream.ts +99 -0
  305. package/src/offline-sync-upload-staging.ts +291 -0
  306. package/src/offline-sync.test.ts +164 -1
  307. package/src/offline-sync.ts +372 -454
  308. package/src/orchestrator.ts +2 -1
  309. package/src/secure-store/secure-fs.ts +26 -6
  310. package/src/storage.ts +11 -6
  311. package/src/support-passport/offline-sync-guard.ts +16 -2
  312. package/dist/chunk-3BTFBQLO.js.map +0 -1
  313. package/dist/chunk-AREGMX2J.js +0 -50
  314. package/dist/chunk-AREGMX2J.js.map +0 -1
  315. package/dist/chunk-FOH7AMMI.js.map +0 -1
  316. package/dist/chunk-FRCESVV6.js.map +0 -1
  317. package/dist/chunk-G6SVZWPB.js.map +0 -1
  318. package/dist/chunk-JN72EPOE.js.map +0 -1
  319. package/dist/chunk-RB776UH3.js.map +0 -1
  320. package/dist/chunk-WQZZDN5M.js.map +0 -1
  321. /package/dist/{auto-sync-6IPX2BAC.js.map → auto-sync-U5N3CB5Y.js.map} +0 -0
  322. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
  323. /package/dist/{capsule-merge-3MNURAQ3.js.map → capsule-merge-ZCXUPLNJ.js.map} +0 -0
  324. /package/dist/{chunk-JE334SIA.js.map → chunk-22DYJLFN.js.map} +0 -0
  325. /package/dist/{chunk-JGSQ6P4D.js.map → chunk-2FX374UI.js.map} +0 -0
  326. /package/dist/{chunk-SY5KDWGU.js.map → chunk-2WLMWP2T.js.map} +0 -0
  327. /package/dist/{chunk-6TT6HRE4.js.map → chunk-3AGHSQPM.js.map} +0 -0
  328. /package/dist/{chunk-P6WFK4ZJ.js.map → chunk-3O5BB45T.js.map} +0 -0
  329. /package/dist/{chunk-3C3J243X.js.map → chunk-3QKO4QN7.js.map} +0 -0
  330. /package/dist/{chunk-KFCMMDHH.js.map → chunk-3YD44CH2.js.map} +0 -0
  331. /package/dist/{chunk-7DE2NOON.js.map → chunk-4O4XCBOS.js.map} +0 -0
  332. /package/dist/{chunk-GDYU6VF4.js.map → chunk-5AYUHSAU.js.map} +0 -0
  333. /package/dist/{chunk-ICZQG4XE.js.map → chunk-5FAGCOZD.js.map} +0 -0
  334. /package/dist/{chunk-VKQI47DJ.js.map → chunk-5FNZ3G6X.js.map} +0 -0
  335. /package/dist/{chunk-VQNONC4E.js.map → chunk-5STPRPE7.js.map} +0 -0
  336. /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
  337. /package/dist/{chunk-SRZW7FNU.js.map → chunk-64ZUALXK.js.map} +0 -0
  338. /package/dist/{chunk-4BZP2B4U.js.map → chunk-6MNKDTDI.js.map} +0 -0
  339. /package/dist/{chunk-DUJYRVUD.js.map → chunk-6O2VUWV6.js.map} +0 -0
  340. /package/dist/{chunk-HESDNYRB.js.map → chunk-76M5OK7V.js.map} +0 -0
  341. /package/dist/{chunk-FAN73COB.js.map → chunk-7D7OUO5W.js.map} +0 -0
  342. /package/dist/{chunk-DZ525SNQ.js.map → chunk-7QE46QXI.js.map} +0 -0
  343. /package/dist/{chunk-VX6GCKBS.js.map → chunk-7WBSMXGC.js.map} +0 -0
  344. /package/dist/{chunk-VVDWZRZG.js.map → chunk-A6RVIHHK.js.map} +0 -0
  345. /package/dist/{chunk-M536WNTQ.js.map → chunk-AEJ3TE5H.js.map} +0 -0
  346. /package/dist/{chunk-72JNNJJJ.js.map → chunk-AXC4WSF3.js.map} +0 -0
  347. /package/dist/{chunk-UA5DX5C3.js.map → chunk-AZIOEOK4.js.map} +0 -0
  348. /package/dist/{chunk-N4S4NUX5.js.map → chunk-B3O3IRZN.js.map} +0 -0
  349. /package/dist/{chunk-XTYX6V52.js.map → chunk-BJVO4H5C.js.map} +0 -0
  350. /package/dist/{chunk-7LCGFUMB.js.map → chunk-BUKK5SWA.js.map} +0 -0
  351. /package/dist/{chunk-TM3RXL4G.js.map → chunk-BUQKSQXL.js.map} +0 -0
  352. /package/dist/{chunk-37S3IMYB.js.map → chunk-DGS34QSY.js.map} +0 -0
  353. /package/dist/{chunk-4IEOGIPB.js.map → chunk-DO4C4AXD.js.map} +0 -0
  354. /package/dist/{chunk-SPSRGEDQ.js.map → chunk-EAQQ2FD3.js.map} +0 -0
  355. /package/dist/{chunk-C3QXITIP.js.map → chunk-EQUD7FP4.js.map} +0 -0
  356. /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
  357. /package/dist/{chunk-YITN5WXI.js.map → chunk-FC52YWAO.js.map} +0 -0
  358. /package/dist/{chunk-ZI7QA4MK.js.map → chunk-FEIXG5FA.js.map} +0 -0
  359. /package/dist/{chunk-CLXTDOKV.js.map → chunk-FUNBJQYR.js.map} +0 -0
  360. /package/dist/{chunk-CLSYE5OZ.js.map → chunk-G2STTRYB.js.map} +0 -0
  361. /package/dist/{chunk-TDYAIXHK.js.map → chunk-H36X4NRH.js.map} +0 -0
  362. /package/dist/{chunk-3GQC3NMB.js.map → chunk-H56VY4BY.js.map} +0 -0
  363. /package/dist/{chunk-PUKTBULQ.js.map → chunk-HWLIMQE2.js.map} +0 -0
  364. /package/dist/{chunk-V2ES4WCZ.js.map → chunk-IIARQTZ2.js.map} +0 -0
  365. /package/dist/{chunk-QEV26L2F.js.map → chunk-IKDRGVVJ.js.map} +0 -0
  366. /package/dist/{chunk-LS3XH3UE.js.map → chunk-IYIBGSHJ.js.map} +0 -0
  367. /package/dist/{chunk-YSJTCOHR.js.map → chunk-J27JML5O.js.map} +0 -0
  368. /package/dist/{chunk-AQK54Q7O.js.map → chunk-JB56XYHP.js.map} +0 -0
  369. /package/dist/{chunk-NE6PHPLG.js.map → chunk-JBH26P62.js.map} +0 -0
  370. /package/dist/{chunk-CWHV574S.js.map → chunk-JUT3OR2L.js.map} +0 -0
  371. /package/dist/{chunk-6ET2VII7.js.map → chunk-JYG2334B.js.map} +0 -0
  372. /package/dist/{chunk-LF5IGOOD.js.map → chunk-JYM4Y6SO.js.map} +0 -0
  373. /package/dist/{chunk-FB64XE3R.js.map → chunk-JZ4TJHR2.js.map} +0 -0
  374. /package/dist/{chunk-EHS5MJEF.js.map → chunk-KTKHO3UI.js.map} +0 -0
  375. /package/dist/{chunk-WIKO4SCR.js.map → chunk-LHRQBMJN.js.map} +0 -0
  376. /package/dist/{chunk-K4J4E7WV.js.map → chunk-LO4UKPKX.js.map} +0 -0
  377. /package/dist/{chunk-6NQ4LSMS.js.map → chunk-MGZMC6WN.js.map} +0 -0
  378. /package/dist/{chunk-BMYZTZ5D.js.map → chunk-MY7B3HYC.js.map} +0 -0
  379. /package/dist/{chunk-NB3LRY4T.js.map → chunk-N4PYB235.js.map} +0 -0
  380. /package/dist/{chunk-S3YM4SZQ.js.map → chunk-N7QV3CMX.js.map} +0 -0
  381. /package/dist/{chunk-L6UZEAID.js.map → chunk-NJVR724O.js.map} +0 -0
  382. /package/dist/{chunk-VLLD4TOB.js.map → chunk-NMZVDRVP.js.map} +0 -0
  383. /package/dist/{chunk-P2WZHLUF.js.map → chunk-NOL7SEWN.js.map} +0 -0
  384. /package/dist/{chunk-2NLLXCJG.js.map → chunk-OWHERGF2.js.map} +0 -0
  385. /package/dist/{chunk-6L3PBSAR.js.map → chunk-PMNLL2TL.js.map} +0 -0
  386. /package/dist/{chunk-VYCOJKSX.js.map → chunk-PO7NXNGC.js.map} +0 -0
  387. /package/dist/{chunk-4IIMMZZK.js.map → chunk-PULDSMCJ.js.map} +0 -0
  388. /package/dist/{chunk-HBBHL4YF.js.map → chunk-QOXNTKXB.js.map} +0 -0
  389. /package/dist/{chunk-CUCWX3MO.js.map → chunk-QZLCVO2V.js.map} +0 -0
  390. /package/dist/{chunk-NE7I2RCT.js.map → chunk-R3X2T2LP.js.map} +0 -0
  391. /package/dist/{chunk-S7GCT7NU.js.map → chunk-RBITPCMK.js.map} +0 -0
  392. /package/dist/{chunk-EVBI7S4J.js.map → chunk-RMDGAAZF.js.map} +0 -0
  393. /package/dist/{chunk-BJRAELDH.js.map → chunk-SCXURCVT.js.map} +0 -0
  394. /package/dist/{chunk-EQ6YOIKO.js.map → chunk-ST2RQUXC.js.map} +0 -0
  395. /package/dist/{chunk-CS52MFDV.js.map → chunk-SZG4WFAG.js.map} +0 -0
  396. /package/dist/{chunk-BFO3IR56.js.map → chunk-TPEZ2SHV.js.map} +0 -0
  397. /package/dist/{chunk-YRLHEEQT.js.map → chunk-U6VC6RP3.js.map} +0 -0
  398. /package/dist/{chunk-MOQPEFLN.js.map → chunk-UP75KL3L.js.map} +0 -0
  399. /package/dist/{chunk-W4AOR52H.js.map → chunk-UQDC3W77.js.map} +0 -0
  400. /package/dist/{chunk-X7Y7WX73.js.map → chunk-UVYI6VIX.js.map} +0 -0
  401. /package/dist/{chunk-D5F7TKMH.js.map → chunk-V4JZCTMK.js.map} +0 -0
  402. /package/dist/{chunk-MQJL6CDZ.js.map → chunk-VA4O3U7U.js.map} +0 -0
  403. /package/dist/{chunk-4CDYONWO.js.map → chunk-VDO32NLK.js.map} +0 -0
  404. /package/dist/{chunk-SOZUJCME.js.map → chunk-VHDKPGMG.js.map} +0 -0
  405. /package/dist/{chunk-QWW2JDDX.js.map → chunk-WNRTXEWW.js.map} +0 -0
  406. /package/dist/{chunk-NR2ASHBL.js.map → chunk-XOV7NRY5.js.map} +0 -0
  407. /package/dist/{chunk-KP7SANCF.js.map → chunk-YPI4RQWV.js.map} +0 -0
  408. /package/dist/{chunk-JKMHZF3Q.js.map → chunk-YSWJXOOL.js.map} +0 -0
  409. /package/dist/{chunk-LQG5O5EP.js.map → chunk-Z3O53WZR.js.map} +0 -0
  410. /package/dist/{chunk-QVS22WTO.js.map → chunk-ZG5DWWKK.js.map} +0 -0
  411. /package/dist/{graph-edge-decay-KQGS3L3B.js.map → embedding-generation-lock.js.map} +0 -0
  412. /package/dist/{resolution-DNX7FO7A.js.map → embedding-index-storage.js.map} +0 -0
  413. /package/dist/{first-start-migration-7OATHJKB.js.map → first-start-migration-GAT7G733.js.map} +0 -0
  414. /package/dist/{state-ITXJKXRE.js.map → graph-edge-decay-MKIRZ762.js.map} +0 -0
  415. /package/dist/{tui-55UJMJX7.js.map → offline-sync-changeset-generations.js.map} +0 -0
  416. /package/dist/{trace-ZFVRH4GO.js.map → trace-LXXCMZJA.js.map} +0 -0
@@ -0,0 +1,137 @@
1
+ // src/offline-sync-exclude-globs.ts
2
+ var OFFLINE_DECRYPT_STAGING_DIR_PREFIX = ".remnic-offline-decrypt-";
3
+ var DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS = [
4
+ // Leading `**/` matches zero or more segments, so each pattern covers both
5
+ // the root `state/` dir AND per-namespace `namespaces/<ns>/state/` dirs
6
+ // (Cursor review on PR #1793: multi-namespace deployments previously kept
7
+ // pushing their namespaced live sqlite files).
8
+ "**/state/*.sqlite",
9
+ "**/state/*.sqlite-*",
10
+ "**/state/index_tags.json",
11
+ "**/state/entity-mention-index.json",
12
+ "**/state/memory-governance/runs/**",
13
+ // Rotated recall-impression archives (issue #1910). The active
14
+ // recall_impressions.jsonl stays remote-authoritative; only the .1..N
15
+ // archives and the .lock are node-local and never pushed/hashed.
16
+ "**/state/recall_impressions.jsonl.*",
17
+ // Durable recall-impression pending spill directory (issue #2033). Node-local:
18
+ // an impression spills a per-event file here when its rotation lock cannot be
19
+ // acquired, and the next lock holder folds them back into the synced active
20
+ // recall_impressions.jsonl. The `.*` glob above matches the directory name but
21
+ // not its children, so exclude the contents explicitly.
22
+ "**/state/recall_impressions.jsonl.pending.d/**",
23
+ // Durable lifecycle-append pending spill directory (issue #2033). Node-local:
24
+ // an append spills a per-event file here when it cannot get the ledger lock,
25
+ // and the next lock holder folds them back into the synced
26
+ // memory-lifecycle-ledger.jsonl. Pushing them would duplicate rows remotely.
27
+ // The offline-sync snapshot entrypoints drain this queue first (access-service
28
+ // `drainPendingLifecycleForSync` -> `StorageManager.drainPendingMemoryLifecycleEventsForSync`),
29
+ // aborting the snapshot when durable rows cannot be folded, so excluding the
30
+ // dir never silently drops append-only lifecycle history (promotions/imports).
31
+ "**/state/memory-lifecycle-ledger.jsonl.pending.d/**",
32
+ // The active lifecycle ledger lock is node-local and must never be
33
+ // transferred to another node during an offline snapshot.
34
+ "**/state/memory-lifecycle-ledger.jsonl.lock",
35
+ // Transient plaintext decrypt staging (issue #2033 P1). The CLI offline
36
+ // decrypt path materializes a decrypted secure-store file under an owner-only
37
+ // `<OFFLINE_DECRYPT_STAGING_DIR_PREFIX>*` dir before hashing/pushing, removing
38
+ // it in a `finally`. A hard crash between create and cleanup would otherwise
39
+ // let a later snapshot walk `<prefix>*/content` and push decrypted secure-store
40
+ // plaintext to the remote. Exclude the dir and its contents unconditionally so
41
+ // a crash-orphan can never be enumerated into a snapshot; the leading `**/`
42
+ // matches the root-level dir (zero segments) and any nested placement.
43
+ "**/.remnic-offline-decrypt-*/**",
44
+ // Embedding-index transaction leftovers (issue #3146, PR #3148). The
45
+ // identity-replacement backup (`embeddings.pre-replace.tmp`) can hold a
46
+ // full obsolete generation and `embeddings.staging.tmp-*` holds a
47
+ // partially staged one; both are node-local recovery state that must
48
+ // never be enumerated into a snapshot. The demoted legacy recovery file
49
+ // (`embeddings.json.pre-migration.tmp-*`) is likewise node-local.
50
+ "**/state/embeddings.pre-replace.tmp/**",
51
+ "**/state/embeddings.staging.tmp-*/**",
52
+ "**/state/embeddings.json.pre-migration.tmp-*",
53
+ "**/namespaces/*/state/embeddings.pre-replace.tmp/**",
54
+ "**/namespaces/*/state/embeddings.staging.tmp-*/**",
55
+ "**/namespaces/*/state/embeddings.json.pre-migration.tmp-*"
56
+ ];
57
+ var DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS = DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS.map((glob) => globToRegExp(glob));
58
+ function matchesOfflineSyncDefaultExclude(relPosix) {
59
+ for (const regexp of DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS) {
60
+ if (regexp.test(relPosix)) return true;
61
+ }
62
+ return false;
63
+ }
64
+ function globToRegExp(glob) {
65
+ if (typeof glob !== "string" || glob.length === 0) {
66
+ throw new Error("offlineSyncExcludes entry must be a non-empty string");
67
+ }
68
+ if (glob.includes("\0")) {
69
+ throw new Error("offlineSyncExcludes entry must not contain NUL bytes");
70
+ }
71
+ let source = "";
72
+ for (let i = 0; i < glob.length; i += 1) {
73
+ const ch = glob[i];
74
+ if (ch === "*") {
75
+ if (glob[i + 1] === "*") {
76
+ if (glob[i + 2] === "/") {
77
+ source += "(?:.*/)?";
78
+ i += 2;
79
+ continue;
80
+ }
81
+ source += ".*";
82
+ i += 1;
83
+ continue;
84
+ }
85
+ source += "[^/]*";
86
+ continue;
87
+ }
88
+ if (ch === "?") {
89
+ source += "[^/]";
90
+ continue;
91
+ }
92
+ if (ch === "/") {
93
+ source += "/";
94
+ continue;
95
+ }
96
+ source += ch.replace(/[\\^$.+()|{}\[\]]/g, "\\$&");
97
+ }
98
+ return new RegExp(`^${source}$`);
99
+ }
100
+ function compileOfflineSyncExcludeGlobs(globs) {
101
+ const out = [];
102
+ for (const entry of globs) {
103
+ if (typeof entry !== "string" || entry.length === 0) {
104
+ throw new Error("offlineSyncExcludes must contain only non-empty strings");
105
+ }
106
+ out.push(globToRegExp(entry));
107
+ }
108
+ return out;
109
+ }
110
+ function parseOfflineSyncExcludes(raw) {
111
+ if (raw === void 0 || raw === null) return [];
112
+ if (!Array.isArray(raw)) {
113
+ throw new Error(
114
+ `offlineSyncExcludes must be an array of non-empty glob strings; got ${typeof raw}`
115
+ );
116
+ }
117
+ for (const entry of raw) {
118
+ if (typeof entry !== "string" || entry.trim().length === 0) {
119
+ throw new Error(
120
+ "offlineSyncExcludes must contain only non-empty glob strings"
121
+ );
122
+ }
123
+ }
124
+ const globs = raw.map((entry) => entry.trim());
125
+ compileOfflineSyncExcludeGlobs(globs);
126
+ return globs;
127
+ }
128
+
129
+ export {
130
+ OFFLINE_DECRYPT_STAGING_DIR_PREFIX,
131
+ DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS,
132
+ matchesOfflineSyncDefaultExclude,
133
+ globToRegExp,
134
+ compileOfflineSyncExcludeGlobs,
135
+ parseOfflineSyncExcludes
136
+ };
137
+ //# sourceMappingURL=chunk-4NSLQ7EU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/offline-sync-exclude-globs.ts"],"sourcesContent":["// Issue #1786: node-local runtime state that each node rebuilds from synced\n// records. Pushing these wastes bandwidth, corrupts the remote's live state\n// dir, and trips the large-file push retry loop on a live SQLite database.\n// Extracted from offline-sync.ts (issue #1995) so the god-file line-count\n// ratchet does not grow when the list gains entries; behavior is unchanged.\n/**\n * Directory-name prefix for the transient plaintext staging dir the CLI offline\n * decrypt path (`offline-storage-io.ts`) creates under the memory root when it\n * must materialize a decrypted secure-store file before hashing/pushing (#2033\n * P1). Shared here so the hard-exclude glob below and the CLI's `mkdtemp` prefix\n * can never drift apart: a crash-orphaned staging dir must NEVER be enumerated\n * into an offline snapshot, or decrypted secure-store plaintext would leak into\n * the remote push.\n */\nexport const OFFLINE_DECRYPT_STAGING_DIR_PREFIX = \".remnic-offline-decrypt-\";\n\nexport const DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS: readonly string[] = [\n // Leading `**/` matches zero or more segments, so each pattern covers both\n // the root `state/` dir AND per-namespace `namespaces/<ns>/state/` dirs\n // (Cursor review on PR #1793: multi-namespace deployments previously kept\n // pushing their namespaced live sqlite files).\n \"**/state/*.sqlite\",\n \"**/state/*.sqlite-*\",\n \"**/state/index_tags.json\",\n \"**/state/entity-mention-index.json\",\n \"**/state/memory-governance/runs/**\",\n // Rotated recall-impression archives (issue #1910). The active\n // recall_impressions.jsonl stays remote-authoritative; only the .1..N\n // archives and the .lock are node-local and never pushed/hashed.\n \"**/state/recall_impressions.jsonl.*\",\n // Durable recall-impression pending spill directory (issue #2033). Node-local:\n // an impression spills a per-event file here when its rotation lock cannot be\n // acquired, and the next lock holder folds them back into the synced active\n // recall_impressions.jsonl. The `.*` glob above matches the directory name but\n // not its children, so exclude the contents explicitly.\n \"**/state/recall_impressions.jsonl.pending.d/**\",\n // Durable lifecycle-append pending spill directory (issue #2033). Node-local:\n // an append spills a per-event file here when it cannot get the ledger lock,\n // and the next lock holder folds them back into the synced\n // memory-lifecycle-ledger.jsonl. Pushing them would duplicate rows remotely.\n // The offline-sync snapshot entrypoints drain this queue first (access-service\n // `drainPendingLifecycleForSync` -> `StorageManager.drainPendingMemoryLifecycleEventsForSync`),\n // aborting the snapshot when durable rows cannot be folded, so excluding the\n // dir never silently drops append-only lifecycle history (promotions/imports).\n \"**/state/memory-lifecycle-ledger.jsonl.pending.d/**\",\n // The active lifecycle ledger lock is node-local and must never be\n // transferred to another node during an offline snapshot.\n \"**/state/memory-lifecycle-ledger.jsonl.lock\",\n // Transient plaintext decrypt staging (issue #2033 P1). The CLI offline\n // decrypt path materializes a decrypted secure-store file under an owner-only\n // `<OFFLINE_DECRYPT_STAGING_DIR_PREFIX>*` dir before hashing/pushing, removing\n // it in a `finally`. A hard crash between create and cleanup would otherwise\n // let a later snapshot walk `<prefix>*/content` and push decrypted secure-store\n // plaintext to the remote. Exclude the dir and its contents unconditionally so\n // a crash-orphan can never be enumerated into a snapshot; the leading `**/`\n // matches the root-level dir (zero segments) and any nested placement.\n \"**/.remnic-offline-decrypt-*/**\",\n // Embedding-index transaction leftovers (issue #3146, PR #3148). The\n // identity-replacement backup (`embeddings.pre-replace.tmp`) can hold a\n // full obsolete generation and `embeddings.staging.tmp-*` holds a\n // partially staged one; both are node-local recovery state that must\n // never be enumerated into a snapshot. The demoted legacy recovery file\n // (`embeddings.json.pre-migration.tmp-*`) is likewise node-local.\n \"**/state/embeddings.pre-replace.tmp/**\",\n \"**/state/embeddings.staging.tmp-*/**\",\n \"**/state/embeddings.json.pre-migration.tmp-*\",\n \"**/namespaces/*/state/embeddings.pre-replace.tmp/**\",\n \"**/namespaces/*/state/embeddings.staging.tmp-*/**\",\n \"**/namespaces/*/state/embeddings.json.pre-migration.tmp-*\",\n];\n\n\nconst DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS: readonly RegExp[] =\n DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS.map((glob) => globToRegExp(glob));\n\n/**\n * Precompiled-once default-exclude check for the snapshot enumeration hot\n * path (Kilo review, PR #1793). Moved here from offline-sync.ts with the\n * glob list so the two can never drift (issue #1995).\n */\nexport function matchesOfflineSyncDefaultExclude(relPosix: string): boolean {\n for (const regexp of DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS) {\n if (regexp.test(relPosix)) return true;\n }\n return false;\n}\n\nexport function globToRegExp(glob: string): RegExp {\n if (typeof glob !== \"string\" || glob.length === 0) {\n throw new Error(\"offlineSyncExcludes entry must be a non-empty string\");\n }\n if (glob.includes(\"\\0\")) {\n throw new Error(\"offlineSyncExcludes entry must not contain NUL bytes\");\n }\n let source = \"\";\n for (let i = 0; i < glob.length; i += 1) {\n const ch = glob[i];\n if (ch === \"*\") {\n if (glob[i + 1] === \"*\") {\n // `**` is cross-segment wherever it appears:\n // leading `**/` -> zero or more whole segments\n // `/**` at end -> everything under the directory\n // `a/**/b` -> any depth between segments\n // (Cursor review on PR #1793: trailing `scratch/**` must match\n // nested `scratch/a/b.md`, matching the offline-mode guide.)\n if (glob[i + 2] === \"/\") {\n source += \"(?:.*/)?\";\n i += 2;\n continue;\n }\n source += \".*\";\n i += 1;\n continue;\n }\n source += \"[^/]*\";\n continue;\n }\n if (ch === \"?\") {\n source += \"[^/]\";\n continue;\n }\n if (ch === \"/\") {\n source += \"/\";\n continue;\n }\n source += ch.replace(/[\\\\^$.+()|{}\\[\\]]/g, \"\\\\$&\");\n }\n return new RegExp(`^${source}$`);\n}\n\nexport function compileOfflineSyncExcludeGlobs(\n globs: readonly unknown[],\n): RegExp[] {\n const out: RegExp[] = [];\n for (const entry of globs) {\n if (typeof entry !== \"string\" || entry.length === 0) {\n throw new Error(\"offlineSyncExcludes must contain only non-empty strings\");\n }\n out.push(globToRegExp(entry));\n }\n return out;\n}\n\n/**\n * Validate the operator-supplied offline-sync exclude list (#1786).\n * Rejects loudly instead of silently defaulting (CLAUDE.md rule 39):\n * a misspelled key value must fail config parse, not be ignored.\n * Lives next to the glob compiler so config.ts only carries the call.\n */\nexport function parseOfflineSyncExcludes(raw: unknown): string[] {\n if (raw === undefined || raw === null) return [];\n if (!Array.isArray(raw)) {\n throw new Error(\n `offlineSyncExcludes must be an array of non-empty glob strings; got ${typeof raw}`,\n );\n }\n for (const entry of raw) {\n if (typeof entry !== \"string\" || entry.trim().length === 0) {\n throw new Error(\n \"offlineSyncExcludes must contain only non-empty glob strings\",\n );\n }\n }\n const globs = raw.map((entry) => (entry as string).trim());\n // Compile-check every glob now so a bad pattern fails at parse time\n // rather than mid-sync. compileOfflineSyncExcludeGlobs throws with a\n // per-entry message.\n compileOfflineSyncExcludeGlobs(globs);\n return globs;\n}\n"],"mappings":";AAcO,IAAM,qCAAqC;AAE3C,IAAM,qCAAwD;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AAAA;AAAA;AAAA,EAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGA,IAAM,uCACJ,mCAAmC,IAAI,CAAC,SAAS,aAAa,IAAI,CAAC;AAO9D,SAAS,iCAAiC,UAA2B;AAC1E,aAAW,UAAU,sCAAsC;AACzD,QAAI,OAAO,KAAK,QAAQ,EAAG,QAAO;AAAA,EACpC;AACA,SAAO;AACT;AAEO,SAAS,aAAa,MAAsB;AACjD,MAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAAG;AACjD,UAAM,IAAI,MAAM,sDAAsD;AAAA,EACxE;AACA,MAAI,KAAK,SAAS,IAAI,GAAG;AACvB,UAAM,IAAI,MAAM,sDAAsD;AAAA,EACxE;AACA,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK,GAAG;AACvC,UAAM,KAAK,KAAK,CAAC;AACjB,QAAI,OAAO,KAAK;AACd,UAAI,KAAK,IAAI,CAAC,MAAM,KAAK;AAOvB,YAAI,KAAK,IAAI,CAAC,MAAM,KAAK;AACvB,oBAAU;AACV,eAAK;AACL;AAAA,QACF;AACA,kBAAU;AACV,aAAK;AACL;AAAA,MACF;AACA,gBAAU;AACV;AAAA,IACF;AACA,QAAI,OAAO,KAAK;AACd,gBAAU;AACV;AAAA,IACF;AACA,QAAI,OAAO,KAAK;AACd,gBAAU;AACV;AAAA,IACF;AACA,cAAU,GAAG,QAAQ,sBAAsB,MAAM;AAAA,EACnD;AACA,SAAO,IAAI,OAAO,IAAI,MAAM,GAAG;AACjC;AAEO,SAAS,+BACd,OACU;AACV,QAAM,MAAgB,CAAC;AACvB,aAAW,SAAS,OAAO;AACzB,QAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG;AACnD,YAAM,IAAI,MAAM,yDAAyD;AAAA,IAC3E;AACA,QAAI,KAAK,aAAa,KAAK,CAAC;AAAA,EAC9B;AACA,SAAO;AACT;AAQO,SAAS,yBAAyB,KAAwB;AAC/D,MAAI,QAAQ,UAAa,QAAQ,KAAM,QAAO,CAAC;AAC/C,MAAI,CAAC,MAAM,QAAQ,GAAG,GAAG;AACvB,UAAM,IAAI;AAAA,MACR,uEAAuE,OAAO,GAAG;AAAA,IACnF;AAAA,EACF;AACA,aAAW,SAAS,KAAK;AACvB,QAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAC1D,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,QAAM,QAAQ,IAAI,IAAI,CAAC,UAAW,MAAiB,KAAK,CAAC;AAIzD,iCAA+B,KAAK;AACpC,SAAO;AACT;","names":[]}
@@ -2,11 +2,11 @@ import {
2
2
  buildExplicitCaptureDedupKey,
3
3
  isTombstoneBlockedCaptureWriteLockBusy,
4
4
  normalizeExplicitCaptureContent
5
- } from "./chunk-DUJYRVUD.js";
5
+ } from "./chunk-6O2VUWV6.js";
6
6
  import {
7
7
  TAG_LIMITS,
8
8
  composeMemoryEnvelope
9
- } from "./chunk-GDYU6VF4.js";
9
+ } from "./chunk-5AYUHSAU.js";
10
10
  import {
11
11
  isSupportPassportPrivateMemory
12
12
  } from "./chunk-PWPIERBM.js";
@@ -787,4 +787,4 @@ export {
787
787
  shouldProcessInlineExplicitCapture,
788
788
  InlineExplicitCaptureProcessor
789
789
  };
790
- //# sourceMappingURL=chunk-7DE2NOON.js.map
790
+ //# sourceMappingURL=chunk-4O4XCBOS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BT7NVCML.js";
4
4
  import {
5
5
  isMemorySubject
6
- } from "./chunk-VYCOJKSX.js";
6
+ } from "./chunk-PO7NXNGC.js";
7
7
  import {
8
8
  assemblePersistedBody
9
9
  } from "./chunk-JDSVLVCG.js";
@@ -443,4 +443,4 @@ export {
443
443
  buildAccessWriteRequestFingerprint,
444
444
  buildObserveRequestFingerprint
445
445
  };
446
- //# sourceMappingURL=chunk-GDYU6VF4.js.map
446
+ //# sourceMappingURL=chunk-5AYUHSAU.js.map
@@ -3,6 +3,9 @@ import {
3
3
  withGraphWriteLock,
4
4
  yieldForLockHeartbeat
5
5
  } from "./chunk-EUT2WCWS.js";
6
+ import {
7
+ readEdgeConfidence
8
+ } from "./chunk-2LSZVONP.js";
6
9
  import {
7
10
  emitGraphEvent
8
11
  } from "./chunk-DEUNUKTD.js";
@@ -14,9 +17,6 @@ import {
14
17
  import {
15
18
  GraphEdgeAppendError
16
19
  } from "./chunk-GKCXTSFF.js";
17
- import {
18
- readEdgeConfidence
19
- } from "./chunk-2LSZVONP.js";
20
20
  import {
21
21
  isErrnoCode
22
22
  } from "./chunk-KNA3BXXL.js";
@@ -758,4 +758,4 @@ export {
758
758
  applyPageRankRefinement,
759
759
  applyLateralInhibition
760
760
  };
761
- //# sourceMappingURL=chunk-ICZQG4XE.js.map
761
+ //# sourceMappingURL=chunk-5FAGCOZD.js.map
@@ -1,6 +1,3 @@
1
- import {
2
- assembleCompressedHistoryWithTrace
3
- } from "./chunk-UXPUUL3G.js";
4
1
  import {
5
2
  ensureLcmStateDir,
6
3
  openLcmDatabase
@@ -17,6 +14,9 @@ import {
17
14
  import {
18
15
  LcmWorkQueue
19
16
  } from "./chunk-MMCO4SRG.js";
17
+ import {
18
+ assembleCompressedHistoryWithTrace
19
+ } from "./chunk-UXPUUL3G.js";
20
20
  import {
21
21
  nativeBindingRecoveryHint
22
22
  } from "./chunk-LD72P4YS.js";
@@ -602,4 +602,4 @@ export {
602
602
  extractLcmConfig,
603
603
  LcmEngine
604
604
  };
605
- //# sourceMappingURL=chunk-VKQI47DJ.js.map
605
+ //# sourceMappingURL=chunk-5FNZ3G6X.js.map
@@ -50,7 +50,8 @@ async function respondOfflineSnapshotStream(response, snapshot, requestId) {
50
50
  createdAt: snapshot.createdAt,
51
51
  sourceId: snapshot.sourceId,
52
52
  includeTranscripts: snapshot.includeTranscripts,
53
- deletions: snapshot.deletions
53
+ deletions: snapshot.deletions,
54
+ ...snapshot.omittedEmbeddingGenerationDirs ? { omittedEmbeddingGenerationDirs: snapshot.omittedEmbeddingGenerationDirs } : {}
54
55
  }, snapshot.files, requestId);
55
56
  }
56
57
  async function respondOfflineManifestStream(response, manifest, requestId) {
@@ -66,4 +67,4 @@ export {
66
67
  respondOfflineSnapshotStream,
67
68
  respondOfflineManifestStream
68
69
  };
69
- //# sourceMappingURL=chunk-CK5KOVHW.js.map
70
+ //# sourceMappingURL=chunk-5R627MYY.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/access-http-offline-stream.ts"],"sourcesContent":["import type { ServerResponse } from \"node:http\";\nimport type { OfflineSyncManifestStreamResponse } from \"./access-offline-manifest.js\";\nimport type { EngramAccessOfflineSyncSnapshotStreamResponse } from \"./access-service.js\";\n\nasync function respondOfflineNdjsonStream(\n response: ServerResponse,\n header: unknown,\n files: AsyncIterable<unknown>,\n requestId?: string,\n): Promise<void> {\n response.statusCode = 200;\n response.setHeader(\"content-type\", \"application/x-ndjson; charset=utf-8\");\n response.setHeader(\"cache-control\", \"no-store\");\n if (requestId) response.setHeader(\"x-request-id\", requestId);\n const waitForDrainOrClose = async (): Promise<boolean> => {\n const { promise, resolve, reject } = Promise.withResolvers<boolean>();\n const cleanup = () => {\n response.off(\"drain\", onDrain);\n response.off(\"close\", onClose);\n response.off(\"error\", onError);\n };\n const onDrain = () => {\n cleanup();\n resolve(true);\n };\n const onClose = () => {\n cleanup();\n resolve(false);\n };\n const onError = (error: Error) => {\n cleanup();\n reject(error);\n };\n response.once(\"drain\", onDrain);\n response.once(\"close\", onClose);\n response.once(\"error\", onError);\n return promise;\n };\n const writeLine = async (payload: unknown): Promise<boolean> => {\n if (response.destroyed || response.writableEnded) return false;\n if (response.write(`${JSON.stringify(payload)}\\n`)) return true;\n if (response.destroyed || response.writableEnded) return false;\n return waitForDrainOrClose();\n };\n if (!await writeLine(header)) return;\n for await (const file of files) {\n if (!await writeLine({ type: \"file\", file })) return;\n }\n if (!response.destroyed && !response.writableEnded) response.end();\n}\n\nexport async function respondOfflineSnapshotStream(\n response: ServerResponse,\n snapshot: EngramAccessOfflineSyncSnapshotStreamResponse,\n requestId?: string,\n): Promise<void> {\n await respondOfflineNdjsonStream(response, {\n type: \"snapshot\",\n namespace: snapshot.namespace,\n format: snapshot.format,\n schemaVersion: snapshot.schemaVersion,\n createdAt: snapshot.createdAt,\n sourceId: snapshot.sourceId,\n includeTranscripts: snapshot.includeTranscripts,\n deletions: snapshot.deletions,\n }, snapshot.files, requestId);\n}\n\nexport async function respondOfflineManifestStream(\n response: ServerResponse,\n manifest: OfflineSyncManifestStreamResponse,\n requestId?: string,\n): Promise<void> {\n await respondOfflineNdjsonStream(response, {\n type: \"manifest\",\n namespace: manifest.namespace,\n format: manifest.format,\n schemaVersion: manifest.schemaVersion,\n }, manifest.files, requestId);\n}\n"],"mappings":";AAIA,eAAe,2BACb,UACA,QACA,OACA,WACe;AACf,WAAS,aAAa;AACtB,WAAS,UAAU,gBAAgB,qCAAqC;AACxE,WAAS,UAAU,iBAAiB,UAAU;AAC9C,MAAI,UAAW,UAAS,UAAU,gBAAgB,SAAS;AAC3D,QAAM,sBAAsB,YAA8B;AACxD,UAAM,EAAE,SAAS,SAAS,OAAO,IAAI,QAAQ,cAAuB;AACpE,UAAM,UAAU,MAAM;AACpB,eAAS,IAAI,SAAS,OAAO;AAC7B,eAAS,IAAI,SAAS,OAAO;AAC7B,eAAS,IAAI,SAAS,OAAO;AAAA,IAC/B;AACA,UAAM,UAAU,MAAM;AACpB,cAAQ;AACR,cAAQ,IAAI;AAAA,IACd;AACA,UAAM,UAAU,MAAM;AACpB,cAAQ;AACR,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,UAAU,CAAC,UAAiB;AAChC,cAAQ;AACR,aAAO,KAAK;AAAA,IACd;AACA,aAAS,KAAK,SAAS,OAAO;AAC9B,aAAS,KAAK,SAAS,OAAO;AAC9B,aAAS,KAAK,SAAS,OAAO;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,YAAY,OAAO,YAAuC;AAC9D,QAAI,SAAS,aAAa,SAAS,cAAe,QAAO;AACzD,QAAI,SAAS,MAAM,GAAG,KAAK,UAAU,OAAO,CAAC;AAAA,CAAI,EAAG,QAAO;AAC3D,QAAI,SAAS,aAAa,SAAS,cAAe,QAAO;AACzD,WAAO,oBAAoB;AAAA,EAC7B;AACA,MAAI,CAAC,MAAM,UAAU,MAAM,EAAG;AAC9B,mBAAiB,QAAQ,OAAO;AAC9B,QAAI,CAAC,MAAM,UAAU,EAAE,MAAM,QAAQ,KAAK,CAAC,EAAG;AAAA,EAChD;AACA,MAAI,CAAC,SAAS,aAAa,CAAC,SAAS,cAAe,UAAS,IAAI;AACnE;AAEA,eAAsB,6BACpB,UACA,UACA,WACe;AACf,QAAM,2BAA2B,UAAU;AAAA,IACzC,MAAM;AAAA,IACN,WAAW,SAAS;AAAA,IACpB,QAAQ,SAAS;AAAA,IACjB,eAAe,SAAS;AAAA,IACxB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,WAAW,SAAS;AAAA,EACtB,GAAG,SAAS,OAAO,SAAS;AAC9B;AAEA,eAAsB,6BACpB,UACA,UACA,WACe;AACf,QAAM,2BAA2B,UAAU;AAAA,IACzC,MAAM;AAAA,IACN,WAAW,SAAS;AAAA,IACpB,QAAQ,SAAS;AAAA,IACjB,eAAe,SAAS;AAAA,EAC1B,GAAG,SAAS,OAAO,SAAS;AAC9B;","names":[]}
1
+ {"version":3,"sources":["../src/access-http-offline-stream.ts"],"sourcesContent":["import type { ServerResponse } from \"node:http\";\nimport type { OfflineSyncManifestStreamResponse } from \"./access-offline-manifest.js\";\nimport type { EngramAccessOfflineSyncSnapshotStreamResponse } from \"./access-service.js\";\n\nasync function respondOfflineNdjsonStream(\n response: ServerResponse,\n header: unknown,\n files: AsyncIterable<unknown>,\n requestId?: string,\n): Promise<void> {\n response.statusCode = 200;\n response.setHeader(\"content-type\", \"application/x-ndjson; charset=utf-8\");\n response.setHeader(\"cache-control\", \"no-store\");\n if (requestId) response.setHeader(\"x-request-id\", requestId);\n const waitForDrainOrClose = async (): Promise<boolean> => {\n const { promise, resolve, reject } = Promise.withResolvers<boolean>();\n const cleanup = () => {\n response.off(\"drain\", onDrain);\n response.off(\"close\", onClose);\n response.off(\"error\", onError);\n };\n const onDrain = () => {\n cleanup();\n resolve(true);\n };\n const onClose = () => {\n cleanup();\n resolve(false);\n };\n const onError = (error: Error) => {\n cleanup();\n reject(error);\n };\n response.once(\"drain\", onDrain);\n response.once(\"close\", onClose);\n response.once(\"error\", onError);\n return promise;\n };\n const writeLine = async (payload: unknown): Promise<boolean> => {\n if (response.destroyed || response.writableEnded) return false;\n if (response.write(`${JSON.stringify(payload)}\\n`)) return true;\n if (response.destroyed || response.writableEnded) return false;\n return waitForDrainOrClose();\n };\n if (!await writeLine(header)) return;\n for await (const file of files) {\n if (!await writeLine({ type: \"file\", file })) return;\n }\n if (!response.destroyed && !response.writableEnded) response.end();\n}\n\nexport async function respondOfflineSnapshotStream(\n response: ServerResponse,\n snapshot: EngramAccessOfflineSyncSnapshotStreamResponse,\n requestId?: string,\n): Promise<void> {\n await respondOfflineNdjsonStream(response, {\n type: \"snapshot\",\n namespace: snapshot.namespace,\n format: snapshot.format,\n schemaVersion: snapshot.schemaVersion,\n createdAt: snapshot.createdAt,\n sourceId: snapshot.sourceId,\n includeTranscripts: snapshot.includeTranscripts,\n deletions: snapshot.deletions,\n ...(snapshot.omittedEmbeddingGenerationDirs\n ? { omittedEmbeddingGenerationDirs: snapshot.omittedEmbeddingGenerationDirs }\n : {}),\n }, snapshot.files, requestId);\n}\n\nexport async function respondOfflineManifestStream(\n response: ServerResponse,\n manifest: OfflineSyncManifestStreamResponse,\n requestId?: string,\n): Promise<void> {\n await respondOfflineNdjsonStream(response, {\n type: \"manifest\",\n namespace: manifest.namespace,\n format: manifest.format,\n schemaVersion: manifest.schemaVersion,\n }, manifest.files, requestId);\n}\n"],"mappings":";AAIA,eAAe,2BACb,UACA,QACA,OACA,WACe;AACf,WAAS,aAAa;AACtB,WAAS,UAAU,gBAAgB,qCAAqC;AACxE,WAAS,UAAU,iBAAiB,UAAU;AAC9C,MAAI,UAAW,UAAS,UAAU,gBAAgB,SAAS;AAC3D,QAAM,sBAAsB,YAA8B;AACxD,UAAM,EAAE,SAAS,SAAS,OAAO,IAAI,QAAQ,cAAuB;AACpE,UAAM,UAAU,MAAM;AACpB,eAAS,IAAI,SAAS,OAAO;AAC7B,eAAS,IAAI,SAAS,OAAO;AAC7B,eAAS,IAAI,SAAS,OAAO;AAAA,IAC/B;AACA,UAAM,UAAU,MAAM;AACpB,cAAQ;AACR,cAAQ,IAAI;AAAA,IACd;AACA,UAAM,UAAU,MAAM;AACpB,cAAQ;AACR,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,UAAU,CAAC,UAAiB;AAChC,cAAQ;AACR,aAAO,KAAK;AAAA,IACd;AACA,aAAS,KAAK,SAAS,OAAO;AAC9B,aAAS,KAAK,SAAS,OAAO;AAC9B,aAAS,KAAK,SAAS,OAAO;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,YAAY,OAAO,YAAuC;AAC9D,QAAI,SAAS,aAAa,SAAS,cAAe,QAAO;AACzD,QAAI,SAAS,MAAM,GAAG,KAAK,UAAU,OAAO,CAAC;AAAA,CAAI,EAAG,QAAO;AAC3D,QAAI,SAAS,aAAa,SAAS,cAAe,QAAO;AACzD,WAAO,oBAAoB;AAAA,EAC7B;AACA,MAAI,CAAC,MAAM,UAAU,MAAM,EAAG;AAC9B,mBAAiB,QAAQ,OAAO;AAC9B,QAAI,CAAC,MAAM,UAAU,EAAE,MAAM,QAAQ,KAAK,CAAC,EAAG;AAAA,EAChD;AACA,MAAI,CAAC,SAAS,aAAa,CAAC,SAAS,cAAe,UAAS,IAAI;AACnE;AAEA,eAAsB,6BACpB,UACA,UACA,WACe;AACf,QAAM,2BAA2B,UAAU;AAAA,IACzC,MAAM;AAAA,IACN,WAAW,SAAS;AAAA,IACpB,QAAQ,SAAS;AAAA,IACjB,eAAe,SAAS;AAAA,IACxB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,WAAW,SAAS;AAAA,IACpB,GAAI,SAAS,iCACT,EAAE,gCAAgC,SAAS,+BAA+B,IAC1E,CAAC;AAAA,EACP,GAAG,SAAS,OAAO,SAAS;AAC9B;AAEA,eAAsB,6BACpB,UACA,UACA,WACe;AACf,QAAM,2BAA2B,UAAU;AAAA,IACzC,MAAM;AAAA,IACN,WAAW,SAAS;AAAA,IACpB,QAAQ,SAAS;AAAA,IACjB,eAAe,SAAS;AAAA,EAC1B,GAAG,SAAS,OAAO,SAAS;AAC9B;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getOperation
3
- } from "./chunk-FOH7AMMI.js";
3
+ } from "./chunk-CALBQ2NG.js";
4
4
  import {
5
5
  EngramAccessInputError
6
6
  } from "./chunk-3MUKQQ7A.js";
@@ -21,4 +21,4 @@ async function respondBriefingHttp(options) {
21
21
  export {
22
22
  respondBriefingHttp
23
23
  };
24
- //# sourceMappingURL=chunk-VQNONC4E.js.map
24
+ //# sourceMappingURL=chunk-5STPRPE7.js.map
@@ -1,12 +1,12 @@
1
+ import {
2
+ shouldRecallEventOrderEvidence
3
+ } from "./chunk-BUYVPUEM.js";
1
4
  import {
2
5
  unifiedDedupeAndRank
3
6
  } from "./chunk-LUPVCGYK.js";
4
7
  import {
5
8
  buildEvidencePack
6
9
  } from "./chunk-DGFU5MSX.js";
7
- import {
8
- shouldRecallEventOrderEvidence
9
- } from "./chunk-BUYVPUEM.js";
10
10
  import {
11
11
  lcmEvidenceIdentity
12
12
  } from "./chunk-C37ZRXX7.js";
@@ -2236,4 +2236,4 @@ var NUMBER_WORD_VALUES = {
2236
2236
  export {
2237
2237
  buildEventOrderRecallSection
2238
2238
  };
2239
- //# sourceMappingURL=chunk-52II7PB6.js.map
2239
+ //# sourceMappingURL=chunk-645WOU5I.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalCategoryForAlias,
3
3
  categoryAliasCoercion
4
- } from "./chunk-3C3J243X.js";
4
+ } from "./chunk-3QKO4QN7.js";
5
5
 
6
6
  // src/access-observe-write-category.ts
7
7
  function splitCanonicalWriteRequest(request) {
@@ -22,4 +22,4 @@ function splitCanonicalWriteRequest(request) {
22
22
  export {
23
23
  splitCanonicalWriteRequest
24
24
  };
25
- //# sourceMappingURL=chunk-SRZW7FNU.js.map
25
+ //# sourceMappingURL=chunk-64ZUALXK.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-5JMAGU26.js";
6
6
  import {
7
7
  runPostConsolidationMaterialize
8
- } from "./chunk-QVS22WTO.js";
8
+ } from "./chunk-ZG5DWWKK.js";
9
9
  import {
10
10
  isSemanticConsolidationLlmOperator
11
11
  } from "./chunk-G7D6GZ5J.js";
@@ -220,4 +220,4 @@ export {
220
220
  buildExtensionsBlockForConsolidation,
221
221
  materializeAfterSemanticConsolidation
222
222
  };
223
- //# sourceMappingURL=chunk-4BZP2B4U.js.map
223
+ //# sourceMappingURL=chunk-6MNKDTDI.js.map
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  CONTENT_HASH_INDEX_RETRY_MAX_DELAY_MS,
14
14
  ContentHashIndex
15
- } from "./chunk-NB3LRY4T.js";
15
+ } from "./chunk-N4PYB235.js";
16
16
  import {
17
17
  withHeldFileLock
18
18
  } from "./chunk-FFAZ2XFU.js";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  readMaybeEncryptedFileFromChunks,
24
24
  writeMaybeEncryptedFileFromChunks
25
- } from "./chunk-JN72EPOE.js";
25
+ } from "./chunk-MAAL6OZV.js";
26
26
  import {
27
27
  RECALL_FALLBACK_DIRS
28
28
  } from "./chunk-VS2IYZRU.js";
@@ -2509,4 +2509,4 @@ export {
2509
2509
  parseTombstoneBlockedOfflineSyncMemory,
2510
2510
  TombstoneBlockedCaptureIndexHost
2511
2511
  };
2512
- //# sourceMappingURL=chunk-DUJYRVUD.js.map
2512
+ //# sourceMappingURL=chunk-6O2VUWV6.js.map
@@ -0,0 +1,75 @@
1
+ import {
2
+ serializeMutations,
3
+ withHeldFileLock
4
+ } from "./chunk-FFAZ2XFU.js";
5
+
6
+ // src/embedding-generation-lock.ts
7
+ import path from "path";
8
+ var LOCK_STALE_MS = 3e4;
9
+ var LOCK_MAX_WAIT_MS = 1e4;
10
+ var EmbeddingGenerationLockLostError = class extends Error {
11
+ constructor(lockPath) {
12
+ super(
13
+ `embedding generation: the mutation lock for ${lockPath} was lost mid-section \u2014 a peer stale-broke and replaced it; aborting instead of clobbering the peer's write`
14
+ );
15
+ this.name = "EmbeddingGenerationLockLostError";
16
+ }
17
+ };
18
+ var EmbeddingGenerationLockUnavailableError = class extends Error {
19
+ constructor(lockPath, reason) {
20
+ super(`embedding generation: could not acquire the mutation lock for ${lockPath} (${reason})`);
21
+ this.name = "EmbeddingGenerationLockUnavailableError";
22
+ }
23
+ };
24
+ function embeddingGenerationLockPath(absoluteStateDir) {
25
+ const stateDir = path.resolve(absoluteStateDir);
26
+ return path.join(stateDir, ".offline-sync", "locks", "embedding-generation.lock");
27
+ }
28
+ async function assertEmbeddingGenerationLockHeld(lockPath, section) {
29
+ if (!await section.refresh()) throw new EmbeddingGenerationLockLostError(lockPath);
30
+ }
31
+ function withEmbeddingGenerationLock(absoluteStateDir, fn) {
32
+ const lockPath = embeddingGenerationLockPath(absoluteStateDir);
33
+ return serializeMutations(
34
+ lockPath,
35
+ () => withHeldFileLock(lockPath, { staleMs: LOCK_STALE_MS, maxWaitMs: LOCK_MAX_WAIT_MS }, (acquired, lock) => {
36
+ if (!acquired) {
37
+ throw new EmbeddingGenerationLockUnavailableError(lockPath, lock.failure ?? "error");
38
+ }
39
+ return fn(lock);
40
+ })
41
+ );
42
+ }
43
+ async function* withEmbeddingGenerationLockIter(absoluteStateDir, make, includeContent, verify) {
44
+ const lockPath = embeddingGenerationLockPath(absoluteStateDir);
45
+ const baseline = await withEmbeddingGenerationLock(absoluteStateDir, async (section) => {
46
+ await verify?.();
47
+ const records = [];
48
+ for await (const record of make(false)) {
49
+ await assertEmbeddingGenerationLockHeld(lockPath, section);
50
+ records.push({ path: record.path, sha256: record.sha256, bytes: record.bytes });
51
+ }
52
+ return records;
53
+ });
54
+ let count = 0;
55
+ for await (const record of make(includeContent)) {
56
+ const expected = baseline[count++];
57
+ if (!expected || expected.path !== record.path || expected.sha256 !== record.sha256 || expected.bytes !== record.bytes) {
58
+ throw new Error(`embedding generation changed while streaming ${absoluteStateDir}; retry the snapshot`);
59
+ }
60
+ yield record;
61
+ }
62
+ if (count !== baseline.length) {
63
+ throw new Error(`embedding generation changed while streaming ${absoluteStateDir}; retry the snapshot`);
64
+ }
65
+ }
66
+
67
+ export {
68
+ EmbeddingGenerationLockLostError,
69
+ EmbeddingGenerationLockUnavailableError,
70
+ embeddingGenerationLockPath,
71
+ assertEmbeddingGenerationLockHeld,
72
+ withEmbeddingGenerationLock,
73
+ withEmbeddingGenerationLockIter
74
+ };
75
+ //# sourceMappingURL=chunk-75PT4N7Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/embedding-generation-lock.ts"],"sourcesContent":["// Cross-process embedding-generation mutation lock (issue #3148, Codex P1).\n//\n// Two processes legitimately mutate the SAME embedding generation: the\n// daemon's EmbeddingFallback index mutations (load → modify → persist) and\n// the offline-sync apply transaction (census → stage → swap) — plus the\n// snapshot walkers that must capture one COMPLETE generation. All of them\n// enumerate or replace `state/embeddings/` (or the legacy marker), so an\n// unsynchronized writer's bytes are silently discarded by the other side's\n// wholesale directory swap.\n//\n// Built directly on the existing utilities: `serializeMutations` (in-process\n// keyed chain, rejection-recovering — gotcha #40) around `withHeldFileLock`\n// (cross-process held advisory lock, replacement-safe stale breaking,\n// ownership-checked release). A lock that cannot be acquired within the\n// bounded wait FAILS CLOSED — proceeding unsynchronized would reintroduce\n// the lost-write race this lock exists to prevent.\n//\n// The lock is keyed by the PHYSICAL state directory (dirname of the\n// generation's shard dir / of the legacy marker), so every caller\n// convention — memory-root-relative (`namespaces/<ns>/state`) or\n// namespace-scoped roots (`<ns>/state`) — contends on the SAME lock file\n// for the same generation. The lock file lives under that state dir's\n// `.offline-sync/` (sync-internal, excluded from every offline-sync\n// snapshot by the default excludes).\nimport path from \"node:path\";\nimport { type HeldFileLockController, serializeMutations, withHeldFileLock } from \"./utils/serialize-mutations.js\";\n\n/** Stale-lock window for a crashed holder (mirrors the graph lock). */\nconst LOCK_STALE_MS = 30_000;\n/** Bounded acquisition wait; a busy lock FAILS the operation (strict). */\nconst LOCK_MAX_WAIT_MS = 10_000;\n\n/** Control surface handed to a held embedding-generation lock section. */\nexport type EmbeddingGenerationLockSection = HeldFileLockController;\n\n/**\n * A fence the store calls immediately before a destructive write: reasserts\n * lock ownership so a peer that stale-broke and replaced the lock aborts\n * this write instead of clobbering the peer's.\n */\nexport type EmbeddingGenerationFence = () => Promise<void>;\n\n/**\n * A held embedding-generation lock section was lost mid-critical-section —\n * a peer stale-broke and replaced it. Abort; never publish.\n */\nexport class EmbeddingGenerationLockLostError extends Error {\n constructor(lockPath: string) {\n super(\n `embedding generation: the mutation lock for ${lockPath} was lost mid-section — a peer stale-broke and replaced it; aborting instead of clobbering the peer's write`\n );\n this.name = \"EmbeddingGenerationLockLostError\";\n }\n}\n\n/** The generation lock could not be acquired; callers fail closed and report it. */\nexport class EmbeddingGenerationLockUnavailableError extends Error {\n constructor(lockPath: string, reason: \"timeout\" | \"error\") {\n super(`embedding generation: could not acquire the mutation lock for ${lockPath} (${reason})`);\n this.name = \"EmbeddingGenerationLockUnavailableError\";\n }\n}\n\n/**\n * The lock file path for the generation whose canonical state dir is\n * `absoluteStateDir` (physical path; e.g. `<memoryRoot>/state` or\n * `<memoryRoot>/namespaces/<ns>/state`). Keyed by the physical directory so\n * every root convention contends on one lock file per generation.\n */\nexport function embeddingGenerationLockPath(absoluteStateDir: string): string {\n const stateDir = path.resolve(absoluteStateDir);\n return path.join(stateDir, \".offline-sync\", \"locks\", \"embedding-generation.lock\");\n}\n\n/**\n * Revalidate lock ownership immediately before a destructive publish.\n * Throws {@link EmbeddingGenerationLockLostError} when the lock was\n * broken/replaced, so the caller aborts and leaves the peer's write intact.\n */\nexport async function assertEmbeddingGenerationLockHeld(\n lockPath: string,\n section: EmbeddingGenerationLockSection\n): Promise<void> {\n if (!(await section.refresh())) throw new EmbeddingGenerationLockLostError(lockPath);\n}\n\n/**\n * Run `fn` while holding the embedding-generation mutation lock for the\n * generation whose state dir is `absoluteStateDir`, handing it the section\n * controller. `serializeMutations` provides the in-process keyed chain\n * INSIDE the cross-process advisory lock, so peers serialize against every\n * section this process runs, one at a time. Times out fail-closed.\n */\nexport function withEmbeddingGenerationLock<T>(\n absoluteStateDir: string,\n fn: (lock: EmbeddingGenerationLockSection) => Promise<T>\n): Promise<T> {\n const lockPath = embeddingGenerationLockPath(absoluteStateDir);\n return serializeMutations(lockPath, () =>\n withHeldFileLock(lockPath, { staleMs: LOCK_STALE_MS, maxWaitMs: LOCK_MAX_WAIT_MS }, (acquired, lock) => {\n if (!acquired) {\n throw new EmbeddingGenerationLockUnavailableError(lockPath, lock.failure ?? \"error\");\n }\n return fn(lock);\n })\n );\n}\n\n/** Capture a complete bounded digest census under lock, then stream outside\n * the lock. If any member changes, throw rather than emit a complete subset. */\nexport async function* withEmbeddingGenerationLockIter<T extends { path: string; sha256: string; bytes: number }>(\n absoluteStateDir: string,\n make: (includeContent: boolean) => AsyncIterable<T>,\n includeContent: boolean,\n verify?: () => Promise<void>\n): AsyncIterable<T> {\n const lockPath = embeddingGenerationLockPath(absoluteStateDir);\n // Capture only bounded metadata under the lock, never large content or\n // network backpressure. Every emitted record must match this complete\n // generation census; a concurrent swap/dirty write aborts the stream.\n const baseline = await withEmbeddingGenerationLock(absoluteStateDir, async (section) => {\n await verify?.();\n const records: Array<{ path: string; sha256: string; bytes: number }> = [];\n for await (const record of make(false)) {\n await assertEmbeddingGenerationLockHeld(lockPath, section);\n records.push({ path: record.path, sha256: record.sha256, bytes: record.bytes });\n }\n return records;\n });\n let count = 0;\n for await (const record of make(includeContent)) {\n const expected = baseline[count++];\n if (!expected || expected.path !== record.path || expected.sha256 !== record.sha256 || expected.bytes !== record.bytes) {\n throw new Error(`embedding generation changed while streaming ${absoluteStateDir}; retry the snapshot`);\n }\n yield record;\n }\n if (count !== baseline.length) {\n throw new Error(`embedding generation changed while streaming ${absoluteStateDir}; retry the snapshot`);\n }\n}\n"],"mappings":";;;;;;AAwBA,OAAO,UAAU;AAIjB,IAAM,gBAAgB;AAEtB,IAAM,mBAAmB;AAgBlB,IAAM,mCAAN,cAA+C,MAAM;AAAA,EAC1D,YAAY,UAAkB;AAC5B;AAAA,MACE,+CAA+C,QAAQ;AAAA,IACzD;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAGO,IAAM,0CAAN,cAAsD,MAAM;AAAA,EACjE,YAAY,UAAkB,QAA6B;AACzD,UAAM,iEAAiE,QAAQ,KAAK,MAAM,GAAG;AAC7F,SAAK,OAAO;AAAA,EACd;AACF;AAQO,SAAS,4BAA4B,kBAAkC;AAC5E,QAAM,WAAW,KAAK,QAAQ,gBAAgB;AAC9C,SAAO,KAAK,KAAK,UAAU,iBAAiB,SAAS,2BAA2B;AAClF;AAOA,eAAsB,kCACpB,UACA,SACe;AACf,MAAI,CAAE,MAAM,QAAQ,QAAQ,EAAI,OAAM,IAAI,iCAAiC,QAAQ;AACrF;AASO,SAAS,4BACd,kBACA,IACY;AACZ,QAAM,WAAW,4BAA4B,gBAAgB;AAC7D,SAAO;AAAA,IAAmB;AAAA,IAAU,MAClC,iBAAiB,UAAU,EAAE,SAAS,eAAe,WAAW,iBAAiB,GAAG,CAAC,UAAU,SAAS;AACtG,UAAI,CAAC,UAAU;AACb,cAAM,IAAI,wCAAwC,UAAU,KAAK,WAAW,OAAO;AAAA,MACrF;AACA,aAAO,GAAG,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AACF;AAIA,gBAAuB,gCACrB,kBACA,MACA,gBACA,QACkB;AAClB,QAAM,WAAW,4BAA4B,gBAAgB;AAI7D,QAAM,WAAW,MAAM,4BAA4B,kBAAkB,OAAO,YAAY;AACtF,UAAM,SAAS;AACf,UAAM,UAAkE,CAAC;AACzE,qBAAiB,UAAU,KAAK,KAAK,GAAG;AACtC,YAAM,kCAAkC,UAAU,OAAO;AACzD,cAAQ,KAAK,EAAE,MAAM,OAAO,MAAM,QAAQ,OAAO,QAAQ,OAAO,OAAO,MAAM,CAAC;AAAA,IAChF;AACA,WAAO;AAAA,EACT,CAAC;AACD,MAAI,QAAQ;AACZ,mBAAiB,UAAU,KAAK,cAAc,GAAG;AAC/C,UAAM,WAAW,SAAS,OAAO;AACjC,QAAI,CAAC,YAAY,SAAS,SAAS,OAAO,QAAQ,SAAS,WAAW,OAAO,UAAU,SAAS,UAAU,OAAO,OAAO;AACtH,YAAM,IAAI,MAAM,gDAAgD,gBAAgB,sBAAsB;AAAA,IACxG;AACA,UAAM;AAAA,EACR;AACA,MAAI,UAAU,SAAS,QAAQ;AAC7B,UAAM,IAAI,MAAM,gDAAgD,gBAAgB,sBAAsB;AAAA,EACxG;AACF;","names":[]}
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-AERXJCOG.js";
11
11
  import {
12
12
  deriveSourceConnector
13
- } from "./chunk-TM3RXL4G.js";
13
+ } from "./chunk-BUQKSQXL.js";
14
14
  import {
15
15
  resolvePipelineProcessingCapabilities
16
16
  } from "./chunk-BMXEBWBT.js";
@@ -112,4 +112,4 @@ export {
112
112
  renderExtractionConversation,
113
113
  applyGroundingWithConnector
114
114
  };
115
- //# sourceMappingURL=chunk-HESDNYRB.js.map
115
+ //# sourceMappingURL=chunk-76M5OK7V.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7T4TOGMS.js";
4
4
  import {
5
5
  defineOperation
6
- } from "./chunk-FOH7AMMI.js";
6
+ } from "./chunk-CALBQ2NG.js";
7
7
 
8
8
  // src/external-wiki-access.ts
9
9
  import { z } from "zod";
@@ -26,4 +26,4 @@ var externalWikiSearchOperation = defineOperation({
26
26
  export {
27
27
  externalWikiSearchOperation
28
28
  };
29
- //# sourceMappingURL=chunk-FAN73COB.js.map
29
+ //# sourceMappingURL=chunk-7D7OUO5W.js.map
@@ -318,4 +318,4 @@ export {
318
318
  readProjectedHarmonicGraph,
319
319
  searchHarmonicRetrieval
320
320
  };
321
- //# sourceMappingURL=chunk-DZ525SNQ.js.map
321
+ //# sourceMappingURL=chunk-7QE46QXI.js.map
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  listMemoryGovernanceRuns,
9
9
  readMemoryGovernanceRunArtifact
10
- } from "./chunk-VLLD4TOB.js";
10
+ } from "./chunk-NMZVDRVP.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-FRCESVV6.js";
13
+ } from "./chunk-4HUCP4R4.js";
14
14
  import {
15
15
  normalizeProjectionPreview,
16
16
  normalizeProjectionTags
@@ -21,7 +21,7 @@ import {
21
21
  readProjectedGovernanceRows,
22
22
  readProjectedNativeKnowledgeRows,
23
23
  writeProjectionMetaHighWater
24
- } from "./chunk-JE334SIA.js";
24
+ } from "./chunk-22DYJLFN.js";
25
25
  import {
26
26
  MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
27
27
  buildLifecycleEventsForMemory,
@@ -1005,4 +1005,4 @@ export {
1005
1005
  verifyMemoryProjection,
1006
1006
  repairMemoryProjection
1007
1007
  };
1008
- //# sourceMappingURL=chunk-VX6GCKBS.js.map
1008
+ //# sourceMappingURL=chunk-7WBSMXGC.js.map
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-7CRUDH7G.js";
5
5
  import {
6
6
  composeSalvagedEnvelope
7
- } from "./chunk-6ET2VII7.js";
7
+ } from "./chunk-JYG2334B.js";
8
8
  import {
9
9
  StorageManager
10
- } from "./chunk-FRCESVV6.js";
10
+ } from "./chunk-4HUCP4R4.js";
11
11
  import {
12
12
  parseContinuityImprovementLoops
13
13
  } from "./chunk-LDXUBPMO.js";
@@ -1283,4 +1283,4 @@ export {
1283
1283
  defaultTierMigrationCycleBudget,
1284
1284
  CompoundingEngine
1285
1285
  };
1286
- //# sourceMappingURL=chunk-VVDWZRZG.js.map
1286
+ //# sourceMappingURL=chunk-A6RVIHHK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runLocationSync
3
- } from "./chunk-MQJL6CDZ.js";
3
+ } from "./chunk-VA4O3U7U.js";
4
4
  import {
5
5
  log
6
6
  } from "./chunk-3WCASNQZ.js";
@@ -58,4 +58,4 @@ export {
58
58
  LOCATION_SYNC_DEFAULT_INTERVAL_MS,
59
59
  startLocationAutoSync
60
60
  };
61
- //# sourceMappingURL=chunk-M536WNTQ.js.map
61
+ //# sourceMappingURL=chunk-AEJ3TE5H.js.map
@@ -37,10 +37,10 @@ import {
37
37
  } from "./chunk-YCVB7X56.js";
38
38
  import {
39
39
  fillWearableConversationLocations
40
- } from "./chunk-BMYZTZ5D.js";
40
+ } from "./chunk-MY7B3HYC.js";
41
41
  import {
42
42
  composeMemoryEnvelope
43
- } from "./chunk-GDYU6VF4.js";
43
+ } from "./chunk-5AYUHSAU.js";
44
44
  import {
45
45
  log
46
46
  } from "./chunk-3WCASNQZ.js";
@@ -1329,4 +1329,4 @@ export {
1329
1329
  syncWearableSource,
1330
1330
  defaultTimezone
1331
1331
  };
1332
- //# sourceMappingURL=chunk-72JNNJJJ.js.map
1332
+ //# sourceMappingURL=chunk-AXC4WSF3.js.map