@remnic/core 10.0.59 → 10.0.61

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 (370) hide show
  1. package/dist/access-admin-ops-surface.js +53 -50
  2. package/dist/access-authorization-probe.js +54 -51
  3. package/dist/access-boundary.js +53 -50
  4. package/dist/access-cli.js +143 -140
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-extraction-force-flush.js +53 -50
  7. package/dist/access-http-briefing.js +54 -51
  8. package/dist/access-http-query.js +55 -52
  9. package/dist/access-http.js +76 -73
  10. package/dist/access-identity-continuity-surface.js +53 -50
  11. package/dist/access-lcm-surface.js +53 -50
  12. package/dist/access-mcp.js +64 -61
  13. package/dist/access-namespace-preflight.js +53 -50
  14. package/dist/access-observe-write-category.js +10 -10
  15. package/dist/access-observe-write-surface.js +53 -50
  16. package/dist/access-offline-manifest.js +7 -7
  17. package/dist/access-operations-batch.js +56 -53
  18. package/dist/access-operations.js +63 -60
  19. package/dist/access-recall-concurrency.js +53 -50
  20. package/dist/access-recall-response.js +53 -50
  21. package/dist/access-recall-surface.js +53 -50
  22. package/dist/access-schema.js +9 -9
  23. package/dist/access-service.js +53 -50
  24. package/dist/access-surface-catalog.js +55 -52
  25. package/dist/access-surface-catalog.js.map +1 -1
  26. package/dist/active-recall.js +24 -20
  27. package/dist/active-recall.js.map +1 -1
  28. package/dist/adapters/index.js +7 -7
  29. package/dist/adapters/registry.js +3 -3
  30. package/dist/briefing.js +16 -12
  31. package/dist/buffer-persistence.d.ts +14 -3
  32. package/dist/buffer-persistence.d.ts.map +1 -1
  33. package/dist/buffer-persistence.js +1 -1
  34. package/dist/buffer-turn-helpers.d.ts +7 -0
  35. package/dist/buffer-turn-helpers.d.ts.map +1 -1
  36. package/dist/buffer-turn-helpers.js +5 -3
  37. package/dist/buffer.d.ts +2 -0
  38. package/dist/buffer.d.ts.map +1 -1
  39. package/dist/buffer.js +7 -7
  40. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-GWVG7LGC.js} +2 -2
  41. package/dist/causal-behavior.js +2 -2
  42. package/dist/causal-chain.js +2 -2
  43. package/dist/causal-consolidation.js +19 -15
  44. package/dist/causal-consolidation.js.map +1 -1
  45. package/dist/causal-retrieval.js +2 -2
  46. package/dist/causal-trajectory-graph.js +2 -2
  47. package/dist/causal-trajectory.js +1 -1
  48. package/dist/{chunk-ZAZZOQAQ.js → chunk-23OEPU3K.js} +2 -2
  49. package/dist/{chunk-XDKEHZUC.js → chunk-264B57GV.js} +2 -2
  50. package/dist/{chunk-5U2BBF7E.js → chunk-46U6L5DM.js} +20 -10
  51. package/dist/chunk-46U6L5DM.js.map +1 -0
  52. package/dist/chunk-4LZ7SVKM.js +211 -0
  53. package/dist/chunk-4LZ7SVKM.js.map +1 -0
  54. package/dist/{chunk-NRGQ5HJO.js → chunk-4P4VLPGB.js} +1 -1
  55. package/dist/{chunk-GIRWNTMV.js → chunk-4PG5R6BJ.js} +2 -2
  56. package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
  57. package/dist/{chunk-RG3I2663.js → chunk-64JLBFCQ.js} +2 -2
  58. package/dist/{chunk-G3T6YMBO.js → chunk-64S6X4IU.js} +7 -7
  59. package/dist/{chunk-WASVDS6G.js → chunk-6HTEPYOI.js} +4 -4
  60. package/dist/{chunk-6AEKSOWV.js → chunk-6I6DFULH.js} +8 -8
  61. package/dist/{chunk-DJR37Q37.js → chunk-6T4CMKNP.js} +2 -2
  62. package/dist/{chunk-RHJ5VGB3.js → chunk-73A2DDDR.js} +2 -2
  63. package/dist/{chunk-4B73TQQV.js → chunk-7AKPLEJV.js} +2 -2
  64. package/dist/{chunk-UHH67NLU.js → chunk-7OKYO2UC.js} +2 -2
  65. package/dist/{chunk-KAL5SXPP.js → chunk-7ULSP7AU.js} +6 -6
  66. package/dist/{chunk-USNU3BEQ.js → chunk-A4FZLM6Q.js} +2 -2
  67. package/dist/{chunk-VV73XT3A.js → chunk-BJLCV2P3.js} +2 -2
  68. package/dist/{chunk-KQAFEZQX.js → chunk-BUKK5SWA.js} +2 -2
  69. package/dist/{chunk-DJFULNXK.js → chunk-C2AYUXEF.js} +2 -2
  70. package/dist/{chunk-QY24FSXT.js → chunk-D3BYJSHX.js} +51 -51
  71. package/dist/{chunk-JZRQY7ZQ.js → chunk-D4WR56FR.js} +2 -2
  72. package/dist/{chunk-3E3Z6UA3.js → chunk-DMYNM3WG.js} +124 -97
  73. package/dist/chunk-DMYNM3WG.js.map +1 -0
  74. package/dist/{chunk-FB4JQEFS.js → chunk-DP22K7IC.js} +2 -2
  75. package/dist/{chunk-EJFOGYF3.js → chunk-DTQJ7BRN.js} +3 -3
  76. package/dist/{chunk-MLUPSZFK.js → chunk-DZL5PBEJ.js} +2 -2
  77. package/dist/{chunk-JD5F5MYN.js → chunk-EGCC5OJE.js} +3 -3
  78. package/dist/{chunk-IQSRVR6Z.js → chunk-EJ4RS7I7.js} +2 -2
  79. package/dist/{chunk-WBN66HPI.js → chunk-ELHJK7LM.js} +6 -6
  80. package/dist/{chunk-EH46DHBU.js → chunk-ENAPZQA6.js} +2 -2
  81. package/dist/{chunk-LLG5VNK7.js → chunk-F2UAAI6B.js} +2 -2
  82. package/dist/{chunk-YZNTAOPZ.js → chunk-FKNNWH7P.js} +2 -2
  83. package/dist/{chunk-AAANTXCQ.js → chunk-FZVZYU5C.js} +2 -2
  84. package/dist/{chunk-ON77FQXH.js → chunk-G6GMZJQ4.js} +2 -2
  85. package/dist/{chunk-OL7A7NKH.js → chunk-GNP4BV4Z.js} +2 -2
  86. package/dist/{chunk-GDYLZ6FR.js → chunk-HJ3UTGIW.js} +3 -3
  87. package/dist/{chunk-CCL2OXFO.js → chunk-HSHLDSPX.js} +3 -3
  88. package/dist/{chunk-R4BR62UO.js → chunk-HWMGQDZI.js} +2 -2
  89. package/dist/{chunk-BPIAXMGC.js → chunk-IIUEHIQ2.js} +2 -2
  90. package/dist/{chunk-RTJJPW3C.js → chunk-ILMB3X4X.js} +5 -5
  91. package/dist/{chunk-RFT4OPYI.js → chunk-IPN67KVR.js} +2 -2
  92. package/dist/chunk-JCL7RO2G.js +674 -0
  93. package/dist/chunk-JCL7RO2G.js.map +1 -0
  94. package/dist/{chunk-IEW6NDHX.js → chunk-JGSWWD33.js} +9 -9
  95. package/dist/{chunk-A3UFV4K3.js → chunk-JIYJIH5N.js} +2 -2
  96. package/dist/{chunk-4G2A7MH3.js → chunk-JKUVPVKR.js} +3 -3
  97. package/dist/{chunk-YJHOVA42.js → chunk-JL5FHZ7O.js} +30 -6
  98. package/dist/chunk-JL5FHZ7O.js.map +1 -0
  99. package/dist/{chunk-VCLNU6MY.js → chunk-L2HSSVVD.js} +2 -2
  100. package/dist/{chunk-U2A56LLF.js → chunk-L334PSLW.js} +8 -8
  101. package/dist/{chunk-HQUYENKK.js → chunk-LIUI46BX.js} +3 -3
  102. package/dist/{chunk-ERMT5WQM.js → chunk-MKE5DP3S.js} +2 -2
  103. package/dist/{chunk-4OFXLQJD.js → chunk-MPDLLLOG.js} +8 -3
  104. package/dist/chunk-MPDLLLOG.js.map +1 -0
  105. package/dist/{chunk-6BO27AWQ.js → chunk-MPJ7VHHA.js} +2 -2
  106. package/dist/{chunk-WXBVGKS6.js → chunk-N7RAABFM.js} +182 -421
  107. package/dist/chunk-N7RAABFM.js.map +1 -0
  108. package/dist/{chunk-KMJDH4KX.js → chunk-NSUGAIIB.js} +16 -16
  109. package/dist/{chunk-7NT3FKAF.js → chunk-NXHBQC2O.js} +2 -2
  110. package/dist/{chunk-JEX2JL3U.js → chunk-OH55F76C.js} +2 -2
  111. package/dist/{chunk-37VTMUAL.js → chunk-OUJ4DVR5.js} +2 -2
  112. package/dist/{chunk-2NLLXCJG.js → chunk-OWHERGF2.js} +2 -2
  113. package/dist/{chunk-2IVK5IDY.js → chunk-P5F7ISLV.js} +2 -2
  114. package/dist/{chunk-PM4PKC3Y.js → chunk-PNVQNAJM.js} +3 -3
  115. package/dist/{chunk-FXWX7VD3.js → chunk-PRYDNBCO.js} +12 -12
  116. package/dist/{chunk-YDDLSGYE.js → chunk-PUTH5REB.js} +2 -2
  117. package/dist/{chunk-GFAEKSFR.js → chunk-QBK3IM6W.js} +5 -5
  118. package/dist/{chunk-KRAMCBIW.js → chunk-QKXPOLQD.js} +4 -4
  119. package/dist/{chunk-YDT3OEYF.js → chunk-R4ZHF4K2.js} +2 -2
  120. package/dist/{chunk-ISNPYOXR.js → chunk-RBUR6USI.js} +5 -5
  121. package/dist/{chunk-WZYAXOGO.js → chunk-RZSHIJYY.js} +2 -2
  122. package/dist/{chunk-TYSD7UQO.js → chunk-SVTIWBSA.js} +2 -2
  123. package/dist/{chunk-AMKIIRLL.js → chunk-TBFAQHQZ.js} +2 -2
  124. package/dist/{chunk-ZE5N4JSY.js → chunk-TKCJI7WA.js} +2 -2
  125. package/dist/{chunk-RYB553SS.js → chunk-TLOAAOT3.js} +2 -2
  126. package/dist/{chunk-RKRX4C4H.js → chunk-TPKB7T6Z.js} +2 -2
  127. package/dist/{chunk-JZCBMKR5.js → chunk-TUCEP2LS.js} +5 -5
  128. package/dist/{chunk-KZMRMKC7.js → chunk-U7MIMS2Y.js} +11 -1
  129. package/dist/chunk-U7MIMS2Y.js.map +1 -0
  130. package/dist/{chunk-OMWQO7H6.js → chunk-UEDC2VGP.js} +2 -2
  131. package/dist/{chunk-X7Y7WX73.js → chunk-UVYI6VIX.js} +1 -1
  132. package/dist/{chunk-JY2BGCYN.js → chunk-VCYH2XUY.js} +2 -2
  133. package/dist/{chunk-NGH74LDV.js → chunk-WD2QH3JM.js} +9 -9
  134. package/dist/{chunk-G6A3SGCE.js → chunk-WVEEVYMH.js} +8 -25
  135. package/dist/chunk-WVEEVYMH.js.map +1 -0
  136. package/dist/{chunk-UGTYADB4.js → chunk-WWSJQ7MP.js} +3 -3
  137. package/dist/{chunk-UQBOPCDK.js → chunk-X4PAATLA.js} +2 -2
  138. package/dist/{chunk-KBOQQEVC.js → chunk-XAFSZ4DP.js} +2 -2
  139. package/dist/{chunk-2S6JADBB.js → chunk-XICJL56Z.js} +2 -2
  140. package/dist/{chunk-Y5KESB7T.js → chunk-XJDSZFBZ.js} +45 -45
  141. package/dist/{chunk-24SIB3EW.js → chunk-XWE3EOWX.js} +2 -2
  142. package/dist/{chunk-Y77FXULH.js → chunk-XWXBXBOX.js} +2 -2
  143. package/dist/{chunk-VKQI47DJ.js → chunk-Y7427SL7.js} +4 -4
  144. package/dist/{chunk-TEH5MDX5.js → chunk-YH7HJNWV.js} +22 -22
  145. package/dist/chunk-YHTG64XV.js +117 -0
  146. package/dist/chunk-YHTG64XV.js.map +1 -0
  147. package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
  148. package/dist/{chunk-2M36PR7R.js → chunk-Z2T5BPOZ.js} +2 -2
  149. package/dist/cli.js +100 -97
  150. package/dist/coding/export-okf-codegraph.js +15 -11
  151. package/dist/coding/export-okf-codegraph.js.map +1 -1
  152. package/dist/coding/pre-action-gate.js +2 -2
  153. package/dist/compounding/engine.js +17 -13
  154. package/dist/config.js +24 -20
  155. package/dist/connectors/codex-materialize-runner.js +16 -12
  156. package/dist/connectors/index.js +16 -12
  157. package/dist/convergence-refresh.js +18 -14
  158. package/dist/corpus-scan-worker-host.d.ts +109 -0
  159. package/dist/corpus-scan-worker-host.d.ts.map +1 -0
  160. package/dist/corpus-scan-worker-host.js +15 -0
  161. package/dist/corpus-scan-worker.entry.d.ts +21 -0
  162. package/dist/corpus-scan-worker.entry.d.ts.map +1 -0
  163. package/dist/corpus-scan-worker.entry.js +60 -0
  164. package/dist/corpus-scan-worker.entry.js.map +1 -0
  165. package/dist/corpus-scan-worker.entry.mjs +176 -0
  166. package/dist/corpus-scan.d.ts +71 -0
  167. package/dist/corpus-scan.d.ts.map +1 -0
  168. package/dist/corpus-scan.js +16 -0
  169. package/dist/corpus-watermark.d.ts.map +1 -1
  170. package/dist/corpus-watermark.js +18 -14
  171. package/dist/dashboard-runtime.js +2 -2
  172. package/dist/deep-recall-http-glue.js +10 -10
  173. package/dist/embedding-fallback.js +2 -2
  174. package/dist/{entity-canonical-id-migration-F3JVG6K6.js → entity-canonical-id-migration-CUDCKWPF.js} +4 -2
  175. package/dist/entity-canonical-id-migration-CUDCKWPF.js.map +1 -0
  176. package/dist/entity-retrieval.js +18 -14
  177. package/dist/event-order-recall.js +3 -3
  178. package/dist/external-wiki-access.js +54 -51
  179. package/dist/extraction.js +21 -17
  180. package/dist/{graph-edge-decay-IU75NV42.js → graph-edge-decay-2BZTY2IM.js} +5 -5
  181. package/dist/graph-edge-decay-2BZTY2IM.js.map +1 -0
  182. package/dist/graph-jsonl.js +3 -3
  183. package/dist/graph-snapshot.js +3 -3
  184. package/dist/graph.js +2 -2
  185. package/dist/harmonic-retrieval.js +16 -12
  186. package/dist/index.d.ts +1 -1
  187. package/dist/index.d.ts.map +1 -1
  188. package/dist/index.js +174 -169
  189. package/dist/lcm/engine.js +2 -2
  190. package/dist/lcm/index.js +5 -5
  191. package/dist/location/index.js +18 -14
  192. package/dist/maintenance/memory-governance.js +16 -12
  193. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +16 -12
  194. package/dist/maintenance/rebuild-memory-projection-runner.js +18 -14
  195. package/dist/maintenance/rebuild-memory-projection.js +17 -13
  196. package/dist/memory-browse-operations.js +54 -51
  197. package/dist/memory-browse.js +5 -5
  198. package/dist/namespaces/migrate.js +17 -13
  199. package/dist/namespaces/search.js +7 -7
  200. package/dist/namespaces/storage.js +16 -12
  201. package/dist/offline-sync-changeset-generations.js +4 -4
  202. package/dist/offline-sync-embedding-generation.js +3 -3
  203. package/dist/offline-sync-snapshot-stream.js +7 -7
  204. package/dist/offline-sync.js +6 -6
  205. package/dist/operator-doctor-corpus.js +19 -15
  206. package/dist/operator-toolkit.js +35 -31
  207. package/dist/orchestration/buffer-drain-gate.d.ts +21 -0
  208. package/dist/orchestration/buffer-drain-gate.d.ts.map +1 -0
  209. package/dist/orchestration/buffer-drain-runner.d.ts +79 -0
  210. package/dist/orchestration/buffer-drain-runner.d.ts.map +1 -0
  211. package/dist/orchestration/buffer-drain-runner.js +780 -0
  212. package/dist/orchestration/buffer-drain-runner.js.map +1 -0
  213. package/dist/orchestration/buffer-swap.d.ts +12 -0
  214. package/dist/orchestration/buffer-swap.d.ts.map +1 -0
  215. package/dist/orchestration/maintenance.js +26 -22
  216. package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
  217. package/dist/orchestrator.d.ts +4 -1
  218. package/dist/orchestrator.d.ts.map +1 -1
  219. package/dist/orchestrator.js +143 -140
  220. package/dist/qmd.js +4 -4
  221. package/dist/recall-navigation-operations.js +54 -51
  222. package/dist/recall-navigation.js +53 -50
  223. package/dist/recall-state-view-admission.js +5 -5
  224. package/dist/recall-why-service.js +5 -5
  225. package/dist/resume-bundles.js +25 -21
  226. package/dist/search/factory.js +6 -6
  227. package/dist/search/index.js +12 -12
  228. package/dist/semantic-consolidation.js +17 -13
  229. package/dist/semantic-rule-promotion.js +16 -12
  230. package/dist/semantic-rule-verifier.js +16 -12
  231. package/dist/source-agent-qualifier.js +19 -15
  232. package/dist/standup/build.js +16 -12
  233. package/dist/storage/buffer-drain-claims.d.ts +159 -0
  234. package/dist/storage/buffer-drain-claims.d.ts.map +1 -0
  235. package/dist/storage/buffer-drain-claims.js +18 -0
  236. package/dist/storage/buffer-drain-claims.js.map +1 -0
  237. package/dist/storage/buffer-session-files.d.ts +14 -2
  238. package/dist/storage/buffer-session-files.d.ts.map +1 -1
  239. package/dist/storage/buffer-session-files.js +22 -0
  240. package/dist/storage/buffer-session-files.js.map +1 -0
  241. package/dist/storage/entity-canonical-id-migration.d.ts.map +1 -1
  242. package/dist/storage/memory-read-store.d.ts +5 -9
  243. package/dist/storage/memory-read-store.d.ts.map +1 -1
  244. package/dist/storage.d.ts +6 -1
  245. package/dist/storage.d.ts.map +1 -1
  246. package/dist/storage.js +17 -13
  247. package/dist/support-passport/index.js +56 -53
  248. package/dist/transfer/backup.js +2 -2
  249. package/dist/transfer/capsule-export.js +2 -2
  250. package/dist/transfer/capsule-import.js +2 -2
  251. package/dist/transfer/export-okf.js +16 -12
  252. package/dist/verified-recall.js +16 -12
  253. package/dist/who-knows-cli.js +17 -13
  254. package/dist/who-knows.js +16 -12
  255. package/package.json +32 -2
  256. package/scripts/build-with-heap.mjs +8 -0
  257. package/src/buffer-drain-handover.test.ts +307 -0
  258. package/src/buffer-persistence.ts +27 -5
  259. package/src/buffer-turn-helpers.ts +16 -0
  260. package/src/buffer.ts +32 -2
  261. package/src/corpus-scan-worker-host.ts +314 -0
  262. package/src/corpus-scan-worker.entry.mjs +176 -0
  263. package/src/corpus-scan-worker.entry.ts +95 -0
  264. package/src/corpus-scan.ts +215 -0
  265. package/src/corpus-watermark.ts +28 -12
  266. package/src/index.ts +1 -1
  267. package/src/orchestration/buffer-drain-gate.test.ts +40 -0
  268. package/src/orchestration/buffer-drain-gate.ts +38 -0
  269. package/src/orchestration/buffer-drain-runner.ts +312 -0
  270. package/src/orchestration/buffer-swap.ts +27 -0
  271. package/src/orchestration/turn-ingestion.ts +2 -0
  272. package/src/orchestrator.ts +9 -6
  273. package/src/storage/buffer-drain-claims.test.ts +448 -0
  274. package/src/storage/buffer-drain-claims.ts +593 -0
  275. package/src/storage/buffer-session-files.ts +50 -3
  276. package/src/storage/entity-canonical-id-migration.ts +4 -26
  277. package/src/storage/memory-read-store.ts +17 -99
  278. package/src/storage.ts +8 -11
  279. package/src/testing/subjects/extraction-lifecycle.test.ts +34 -0
  280. package/dist/chunk-3E3Z6UA3.js.map +0 -1
  281. package/dist/chunk-4OFXLQJD.js.map +0 -1
  282. package/dist/chunk-5U2BBF7E.js.map +0 -1
  283. package/dist/chunk-G6A3SGCE.js.map +0 -1
  284. package/dist/chunk-KZMRMKC7.js.map +0 -1
  285. package/dist/chunk-WXBVGKS6.js.map +0 -1
  286. package/dist/chunk-YJHOVA42.js.map +0 -1
  287. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
  288. /package/dist/{chunk-ZAZZOQAQ.js.map → chunk-23OEPU3K.js.map} +0 -0
  289. /package/dist/{chunk-XDKEHZUC.js.map → chunk-264B57GV.js.map} +0 -0
  290. /package/dist/{chunk-NRGQ5HJO.js.map → chunk-4P4VLPGB.js.map} +0 -0
  291. /package/dist/{chunk-GIRWNTMV.js.map → chunk-4PG5R6BJ.js.map} +0 -0
  292. /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
  293. /package/dist/{chunk-RG3I2663.js.map → chunk-64JLBFCQ.js.map} +0 -0
  294. /package/dist/{chunk-G3T6YMBO.js.map → chunk-64S6X4IU.js.map} +0 -0
  295. /package/dist/{chunk-WASVDS6G.js.map → chunk-6HTEPYOI.js.map} +0 -0
  296. /package/dist/{chunk-6AEKSOWV.js.map → chunk-6I6DFULH.js.map} +0 -0
  297. /package/dist/{chunk-DJR37Q37.js.map → chunk-6T4CMKNP.js.map} +0 -0
  298. /package/dist/{chunk-RHJ5VGB3.js.map → chunk-73A2DDDR.js.map} +0 -0
  299. /package/dist/{chunk-4B73TQQV.js.map → chunk-7AKPLEJV.js.map} +0 -0
  300. /package/dist/{chunk-UHH67NLU.js.map → chunk-7OKYO2UC.js.map} +0 -0
  301. /package/dist/{chunk-KAL5SXPP.js.map → chunk-7ULSP7AU.js.map} +0 -0
  302. /package/dist/{chunk-USNU3BEQ.js.map → chunk-A4FZLM6Q.js.map} +0 -0
  303. /package/dist/{chunk-VV73XT3A.js.map → chunk-BJLCV2P3.js.map} +0 -0
  304. /package/dist/{chunk-KQAFEZQX.js.map → chunk-BUKK5SWA.js.map} +0 -0
  305. /package/dist/{chunk-DJFULNXK.js.map → chunk-C2AYUXEF.js.map} +0 -0
  306. /package/dist/{chunk-QY24FSXT.js.map → chunk-D3BYJSHX.js.map} +0 -0
  307. /package/dist/{chunk-JZRQY7ZQ.js.map → chunk-D4WR56FR.js.map} +0 -0
  308. /package/dist/{chunk-FB4JQEFS.js.map → chunk-DP22K7IC.js.map} +0 -0
  309. /package/dist/{chunk-EJFOGYF3.js.map → chunk-DTQJ7BRN.js.map} +0 -0
  310. /package/dist/{chunk-MLUPSZFK.js.map → chunk-DZL5PBEJ.js.map} +0 -0
  311. /package/dist/{chunk-JD5F5MYN.js.map → chunk-EGCC5OJE.js.map} +0 -0
  312. /package/dist/{chunk-IQSRVR6Z.js.map → chunk-EJ4RS7I7.js.map} +0 -0
  313. /package/dist/{chunk-WBN66HPI.js.map → chunk-ELHJK7LM.js.map} +0 -0
  314. /package/dist/{chunk-EH46DHBU.js.map → chunk-ENAPZQA6.js.map} +0 -0
  315. /package/dist/{chunk-LLG5VNK7.js.map → chunk-F2UAAI6B.js.map} +0 -0
  316. /package/dist/{chunk-YZNTAOPZ.js.map → chunk-FKNNWH7P.js.map} +0 -0
  317. /package/dist/{chunk-AAANTXCQ.js.map → chunk-FZVZYU5C.js.map} +0 -0
  318. /package/dist/{chunk-ON77FQXH.js.map → chunk-G6GMZJQ4.js.map} +0 -0
  319. /package/dist/{chunk-OL7A7NKH.js.map → chunk-GNP4BV4Z.js.map} +0 -0
  320. /package/dist/{chunk-GDYLZ6FR.js.map → chunk-HJ3UTGIW.js.map} +0 -0
  321. /package/dist/{chunk-CCL2OXFO.js.map → chunk-HSHLDSPX.js.map} +0 -0
  322. /package/dist/{chunk-R4BR62UO.js.map → chunk-HWMGQDZI.js.map} +0 -0
  323. /package/dist/{chunk-BPIAXMGC.js.map → chunk-IIUEHIQ2.js.map} +0 -0
  324. /package/dist/{chunk-RTJJPW3C.js.map → chunk-ILMB3X4X.js.map} +0 -0
  325. /package/dist/{chunk-RFT4OPYI.js.map → chunk-IPN67KVR.js.map} +0 -0
  326. /package/dist/{chunk-IEW6NDHX.js.map → chunk-JGSWWD33.js.map} +0 -0
  327. /package/dist/{chunk-A3UFV4K3.js.map → chunk-JIYJIH5N.js.map} +0 -0
  328. /package/dist/{chunk-4G2A7MH3.js.map → chunk-JKUVPVKR.js.map} +0 -0
  329. /package/dist/{chunk-VCLNU6MY.js.map → chunk-L2HSSVVD.js.map} +0 -0
  330. /package/dist/{chunk-U2A56LLF.js.map → chunk-L334PSLW.js.map} +0 -0
  331. /package/dist/{chunk-HQUYENKK.js.map → chunk-LIUI46BX.js.map} +0 -0
  332. /package/dist/{chunk-ERMT5WQM.js.map → chunk-MKE5DP3S.js.map} +0 -0
  333. /package/dist/{chunk-6BO27AWQ.js.map → chunk-MPJ7VHHA.js.map} +0 -0
  334. /package/dist/{chunk-KMJDH4KX.js.map → chunk-NSUGAIIB.js.map} +0 -0
  335. /package/dist/{chunk-7NT3FKAF.js.map → chunk-NXHBQC2O.js.map} +0 -0
  336. /package/dist/{chunk-JEX2JL3U.js.map → chunk-OH55F76C.js.map} +0 -0
  337. /package/dist/{chunk-37VTMUAL.js.map → chunk-OUJ4DVR5.js.map} +0 -0
  338. /package/dist/{chunk-2NLLXCJG.js.map → chunk-OWHERGF2.js.map} +0 -0
  339. /package/dist/{chunk-2IVK5IDY.js.map → chunk-P5F7ISLV.js.map} +0 -0
  340. /package/dist/{chunk-PM4PKC3Y.js.map → chunk-PNVQNAJM.js.map} +0 -0
  341. /package/dist/{chunk-FXWX7VD3.js.map → chunk-PRYDNBCO.js.map} +0 -0
  342. /package/dist/{chunk-YDDLSGYE.js.map → chunk-PUTH5REB.js.map} +0 -0
  343. /package/dist/{chunk-GFAEKSFR.js.map → chunk-QBK3IM6W.js.map} +0 -0
  344. /package/dist/{chunk-KRAMCBIW.js.map → chunk-QKXPOLQD.js.map} +0 -0
  345. /package/dist/{chunk-YDT3OEYF.js.map → chunk-R4ZHF4K2.js.map} +0 -0
  346. /package/dist/{chunk-ISNPYOXR.js.map → chunk-RBUR6USI.js.map} +0 -0
  347. /package/dist/{chunk-WZYAXOGO.js.map → chunk-RZSHIJYY.js.map} +0 -0
  348. /package/dist/{chunk-TYSD7UQO.js.map → chunk-SVTIWBSA.js.map} +0 -0
  349. /package/dist/{chunk-AMKIIRLL.js.map → chunk-TBFAQHQZ.js.map} +0 -0
  350. /package/dist/{chunk-ZE5N4JSY.js.map → chunk-TKCJI7WA.js.map} +0 -0
  351. /package/dist/{chunk-RYB553SS.js.map → chunk-TLOAAOT3.js.map} +0 -0
  352. /package/dist/{chunk-RKRX4C4H.js.map → chunk-TPKB7T6Z.js.map} +0 -0
  353. /package/dist/{chunk-JZCBMKR5.js.map → chunk-TUCEP2LS.js.map} +0 -0
  354. /package/dist/{chunk-OMWQO7H6.js.map → chunk-UEDC2VGP.js.map} +0 -0
  355. /package/dist/{chunk-X7Y7WX73.js.map → chunk-UVYI6VIX.js.map} +0 -0
  356. /package/dist/{chunk-JY2BGCYN.js.map → chunk-VCYH2XUY.js.map} +0 -0
  357. /package/dist/{chunk-NGH74LDV.js.map → chunk-WD2QH3JM.js.map} +0 -0
  358. /package/dist/{chunk-UGTYADB4.js.map → chunk-WWSJQ7MP.js.map} +0 -0
  359. /package/dist/{chunk-UQBOPCDK.js.map → chunk-X4PAATLA.js.map} +0 -0
  360. /package/dist/{chunk-KBOQQEVC.js.map → chunk-XAFSZ4DP.js.map} +0 -0
  361. /package/dist/{chunk-2S6JADBB.js.map → chunk-XICJL56Z.js.map} +0 -0
  362. /package/dist/{chunk-Y5KESB7T.js.map → chunk-XJDSZFBZ.js.map} +0 -0
  363. /package/dist/{chunk-24SIB3EW.js.map → chunk-XWE3EOWX.js.map} +0 -0
  364. /package/dist/{chunk-Y77FXULH.js.map → chunk-XWXBXBOX.js.map} +0 -0
  365. /package/dist/{chunk-VKQI47DJ.js.map → chunk-Y7427SL7.js.map} +0 -0
  366. /package/dist/{chunk-TEH5MDX5.js.map → chunk-YH7HJNWV.js.map} +0 -0
  367. /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
  368. /package/dist/{chunk-2M36PR7R.js.map → chunk-Z2T5BPOZ.js.map} +0 -0
  369. /package/dist/{entity-canonical-id-migration-F3JVG6K6.js.map → corpus-scan-worker-host.js.map} +0 -0
  370. /package/dist/{graph-edge-decay-IU75NV42.js.map → corpus-scan.js.map} +0 -0
@@ -1,25 +1,26 @@
1
1
  import {
2
2
  refreshConvergedNamespaces
3
- } from "./chunk-RYB553SS.js";
4
- import "./chunk-JD5F5MYN.js";
3
+ } from "./chunk-TLOAAOT3.js";
4
+ import "./chunk-EGCC5OJE.js";
5
5
  import "./chunk-KJTKLXTH.js";
6
6
  import "./chunk-2DQ2XREU.js";
7
- import "./chunk-MLUPSZFK.js";
7
+ import "./chunk-DZL5PBEJ.js";
8
8
  import "./chunk-TBBDFYXW.js";
9
- import "./chunk-WXBVGKS6.js";
9
+ import "./chunk-N7RAABFM.js";
10
10
  import "./chunk-UHVXE24Y.js";
11
11
  import "./chunk-DM5QZ3YU.js";
12
- import "./chunk-G6A3SGCE.js";
12
+ import "./chunk-WVEEVYMH.js";
13
+ import "./chunk-JCL7RO2G.js";
13
14
  import "./chunk-G6OFEGUR.js";
14
- import "./chunk-JEX2JL3U.js";
15
- import "./chunk-U2A56LLF.js";
16
- import "./chunk-DOJBV6WR.js";
17
- import "./chunk-PFUXPTBT.js";
15
+ import "./chunk-OH55F76C.js";
16
+ import "./chunk-L334PSLW.js";
18
17
  import "./chunk-CYEPCZN5.js";
19
18
  import "./chunk-DLZGSZVC.js";
20
19
  import "./chunk-OVZIYLBZ.js";
21
- import "./chunk-WNEVEMJ3.js";
22
20
  import "./chunk-EXYT52NR.js";
21
+ import "./chunk-DOJBV6WR.js";
22
+ import "./chunk-PFUXPTBT.js";
23
+ import "./chunk-WNEVEMJ3.js";
23
24
  import "./chunk-Y5NLBXPV.js";
24
25
  import "./chunk-TFA6HPOA.js";
25
26
  import "./chunk-F4TWWUMP.js";
@@ -28,8 +29,8 @@ import "./chunk-A7Q43EUZ.js";
28
29
  import "./chunk-S2V7RUCL.js";
29
30
  import "./chunk-PPUNC7UX.js";
30
31
  import "./chunk-X3724WL4.js";
31
- import "./chunk-S2HLHAZ4.js";
32
32
  import "./chunk-MRPOZBJC.js";
33
+ import "./chunk-S2HLHAZ4.js";
33
34
  import "./chunk-DM2T26WE.js";
34
35
  import "./chunk-LDXUBPMO.js";
35
36
  import "./chunk-FF6N7BXC.js";
@@ -37,12 +38,14 @@ import "./chunk-WXPBDEMW.js";
37
38
  import "./chunk-AAD2ZS6P.js";
38
39
  import "./chunk-WJCXUE2J.js";
39
40
  import "./chunk-ZIKENA2C.js";
41
+ import "./chunk-YXZG5TVN.js";
40
42
  import "./chunk-3OUGSOJP.js";
41
43
  import "./chunk-SCU65EZI.js";
42
44
  import "./chunk-3ONXXHQO.js";
43
- import "./chunk-YXZG5TVN.js";
44
45
  import "./chunk-3WU7XOFN.js";
45
46
  import "./chunk-P4GUQSK3.js";
47
+ import "./chunk-4LZ7SVKM.js";
48
+ import "./chunk-YHTG64XV.js";
46
49
  import "./chunk-564YP3DW.js";
47
50
  import "./chunk-M5GVCJSJ.js";
48
51
  import "./chunk-RBOJCG4T.js";
@@ -53,15 +56,16 @@ import "./chunk-7CT3AI52.js";
53
56
  import "./chunk-G7D6GZ5J.js";
54
57
  import "./chunk-7VLBZKNB.js";
55
58
  import "./chunk-UUZ7KZAO.js";
56
- import "./chunk-WBN66HPI.js";
59
+ import "./chunk-ELHJK7LM.js";
60
+ import "./chunk-IUM3VSHI.js";
57
61
  import "./chunk-NWA6IXR3.js";
58
62
  import "./chunk-VILPVT4S.js";
59
63
  import "./chunk-AF2XMJKD.js";
60
64
  import "./chunk-OR42ZI54.js";
61
- import "./chunk-IUM3VSHI.js";
62
65
  import "./chunk-23G5P7TA.js";
63
66
  import "./chunk-C64XATK7.js";
64
67
  import "./chunk-42JKGUFJ.js";
68
+ import "./chunk-U7MIMS2Y.js";
65
69
  import "./chunk-AVVCPA7U.js";
66
70
  import "./chunk-I55KAVET.js";
67
71
  import "./chunk-L2EXJQJP.js";
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Corpus-scan worker host (main-thread starvation fix).
3
+ *
4
+ * The periodic corpus maintenance scans are pure, read-only filesystem work
5
+ * whose volume scales with the corpus (hundreds of thousands of files on a
6
+ * large deployment). Running them on the daemon's main thread starves observe,
7
+ * recall and the extraction queue: every awaited syscall is a main-thread
8
+ * continuation.
9
+ *
10
+ * This host runs the scans in ONE `worker_threads` worker so the main thread
11
+ * stays free. The worker entry is plain JavaScript
12
+ * (`corpus-scan-worker.entry.mjs`, generated from the TypeScript source), so
13
+ * it loads on every runtime the package supports — no TypeScript loader is
14
+ * needed inside a worker thread.
15
+ *
16
+ * Lifecycle:
17
+ * - lazy spawn on the first job; `unref()`ed, so it never keeps the process
18
+ * alive;
19
+ * - a cancelled job is rejected on the main thread immediately and the
20
+ * worker is told to stop the walk at its next checkpoint;
21
+ * - a worker that cannot start (or dies before answering) makes the host run
22
+ * the SAME implementation inline, so the scan still happens;
23
+ * - `close()` terminates the worker and rejects in-flight jobs.
24
+ */
25
+ /** The scans the worker can run. */
26
+ export type CorpusScanJobKind = "walk" | "entity-entries-fingerprint" | "stat-mtimes";
27
+ /** Job payloads, one per kind. */
28
+ export type CorpusScanPayload = {
29
+ kind: "walk";
30
+ baseDir: string;
31
+ startDirs: string[];
32
+ propagateReadErrors: boolean;
33
+ } | {
34
+ kind: "entity-entries-fingerprint";
35
+ entitiesDir: string;
36
+ } | {
37
+ kind: "stat-mtimes";
38
+ paths: string[];
39
+ };
40
+ /** Result shape per job kind. */
41
+ export interface CorpusScanResults {
42
+ walk: string[];
43
+ "entity-entries-fingerprint": string;
44
+ "stat-mtimes": Array<number | null>;
45
+ }
46
+ /** Every result shape the worker can return, in one union. */
47
+ export type CorpusScanResult = string[] | string | Array<number | null>;
48
+ /** A worker-side failure, flattened for the thread boundary. */
49
+ export interface CorpusScanErrorPayload {
50
+ name: string;
51
+ message: string;
52
+ code?: string;
53
+ }
54
+ /** A message posted back from the worker. */
55
+ export interface CorpusScanReply {
56
+ id: number;
57
+ ok: boolean;
58
+ result?: CorpusScanResult;
59
+ error?: CorpusScanErrorPayload;
60
+ }
61
+ /** Completed-job counters per kind. */
62
+ export interface CorpusScanStats {
63
+ jobs: number;
64
+ byKind: Record<string, number>;
65
+ }
66
+ export declare class CorpusScanWorkerHost {
67
+ private worker;
68
+ private readonly pending;
69
+ private nextId;
70
+ private readonly jobCounts;
71
+ private attached;
72
+ private workerUnavailable;
73
+ /** Completed jobs per kind — observability for tests and diagnostics. */
74
+ stats(): CorpusScanStats;
75
+ /**
76
+ * Run one scan. It executes in the worker; when no worker can run it, the
77
+ * same implementation runs inline. Rejects with the job's error (errno code
78
+ * preserved) or an AbortError when `signal` fires first.
79
+ */
80
+ request<P extends CorpusScanPayload>(payload: P, signal?: AbortSignal): Promise<CorpusScanResults[P["kind"]]>;
81
+ private runInWorker;
82
+ private cancellationCheck;
83
+ /** Tell the worker to abandon a job (its next checkpoint stops the walk). */
84
+ private cancelJob;
85
+ /**
86
+ * Attach/detach the worker's message listener. A worker with a `message`
87
+ * listener keeps the parent's event loop alive (the port stays ref'd), so an
88
+ * idle worker is detached: the daemon must be able to exit with a warm
89
+ * corpus-scan worker in memory.
90
+ */
91
+ private setAttached;
92
+ private readonly onMessage;
93
+ /**
94
+ * Disable the worker and say why, exactly once: after this, every corpus
95
+ * scan runs inline on the main thread, which is the starvation this module
96
+ * exists to avoid. Silence here would hide the regression.
97
+ */
98
+ private disableWorker;
99
+ private ensureWorker;
100
+ private failAll;
101
+ /**
102
+ * Terminate the worker and reject in-flight jobs. The next request spawns a
103
+ * fresh worker, so a shutdown (or a test teardown) leaves no handle behind.
104
+ */
105
+ close(): void;
106
+ }
107
+ /** Process-wide corpus-scan worker. */
108
+ export declare const corpusScanWorker: CorpusScanWorkerHost;
109
+ //# sourceMappingURL=corpus-scan-worker-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-scan-worker-host.d.ts","sourceRoot":"","sources":["../src/corpus-scan-worker-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH,oCAAo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AO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,iBAAiB,CAAS;IAElC,yEAAyE;IAClE,KAAK,IAAI,eAAe;IAU/B;;;;OAIG;IACU,OAAO,CAAC,CAAC,SAAS,iBAAiB,EAC9C,OAAO,EAAE,CAAC,EACV,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAQ1B,WAAW;IA8CzB,OAAO,CAAC,iBAAiB;IAOzB,6EAA6E;IAC7E,OAAO,CAAC,SAAS;IAIjB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAkBnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CASxB;IAEF;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,OAAO;IAQf;;;OAGG;IACI,KAAK,IAAI,IAAI;CAOrB;AAED,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,sBAA6B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import {
2
+ CorpusScanWorkerHost,
3
+ corpusScanWorker
4
+ } from "./chunk-4LZ7SVKM.js";
5
+ import "./chunk-YHTG64XV.js";
6
+ import "./chunk-R2MBW2S4.js";
7
+ import "./chunk-QUIRIG2P.js";
8
+ import "./chunk-KNA3BXXL.js";
9
+ import "./chunk-3WCASNQZ.js";
10
+ import "./chunk-PZ5AY32C.js";
11
+ export {
12
+ CorpusScanWorkerHost,
13
+ corpusScanWorker
14
+ };
15
+ //# sourceMappingURL=corpus-scan-worker-host.js.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Corpus-scan worker entry (TypeScript source of the generated worker).
3
+ *
4
+ * The worker runs the daemon's pure, read-only corpus scans off the main event
5
+ * loop: the recall-corpus path walk, the entity-entry fingerprint, and the
6
+ * watermark's freshness stat. Every job carries its own inputs and returns its
7
+ * own results, so the worker holds no state.
8
+ *
9
+ * This file is BUNDLED into `src/corpus-scan-worker.entry.mjs` (plain
10
+ * JavaScript) by scripts/sync-corpus-scan-worker.mjs: a worker thread does not
11
+ * inherit the TypeScript loader the source tree runs under, so the worker
12
+ * entry must be JavaScript on every runtime the package supports. The bundled
13
+ * file is committed and checked for drift by
14
+ * scripts/check-corpus-scan-worker-sync.mjs.
15
+ *
16
+ * Protocol: the host posts `{ id, payload }`; the worker answers
17
+ * `{ id, ok: true, result }` or `{ id, ok: false, error }`. A posted
18
+ * `{ id, cancel: true }` abandons that job at its next checkpoint.
19
+ */
20
+ export {};
21
+ //# sourceMappingURL=corpus-scan-worker.entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-scan-worker.entry.d.ts","sourceRoot":"","sources":["../src/corpus-scan-worker.entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -0,0 +1,60 @@
1
+ import {
2
+ collectContainedMarkdownPaths,
3
+ fingerprintEntityEntries,
4
+ statMtimes
5
+ } from "./chunk-YHTG64XV.js";
6
+ import {
7
+ abortError
8
+ } from "./chunk-R2MBW2S4.js";
9
+ import "./chunk-QUIRIG2P.js";
10
+ import "./chunk-KNA3BXXL.js";
11
+ import "./chunk-PZ5AY32C.js";
12
+
13
+ // src/corpus-scan-worker.entry.ts
14
+ import { parentPort } from "worker_threads";
15
+ if (!parentPort) throw new Error("corpus scan worker must run as a worker thread");
16
+ var port = parentPort;
17
+ var cancelled = /* @__PURE__ */ new Set();
18
+ function serializeError(error) {
19
+ const payload = {
20
+ name: error.name,
21
+ message: error instanceof Error ? error.message : String(error)
22
+ };
23
+ if (error.code !== void 0) payload.code = error.code;
24
+ return payload;
25
+ }
26
+ async function runJob(id, payload) {
27
+ const checkCancelled = () => {
28
+ if (cancelled.has(id)) throw abortError("corpus read aborted");
29
+ };
30
+ switch (payload.kind) {
31
+ case "walk":
32
+ return await collectContainedMarkdownPaths({
33
+ baseDir: payload.baseDir,
34
+ startDirs: payload.startDirs,
35
+ propagateReadErrors: payload.propagateReadErrors,
36
+ checkCancelled
37
+ });
38
+ case "entity-entries-fingerprint":
39
+ return await fingerprintEntityEntries(payload.entitiesDir);
40
+ case "stat-mtimes":
41
+ return await statMtimes(payload.paths);
42
+ }
43
+ }
44
+ port.on("message", (message) => {
45
+ if (message.cancel) {
46
+ cancelled.add(message.id);
47
+ return;
48
+ }
49
+ const { id } = message;
50
+ const payload = message.payload;
51
+ if (!payload) return;
52
+ void runJob(id, payload).then((result) => {
53
+ port.postMessage({ id, ok: true, result });
54
+ }).catch((error) => {
55
+ port.postMessage({ id, ok: false, error: serializeError(error) });
56
+ }).finally(() => {
57
+ cancelled.delete(id);
58
+ });
59
+ });
60
+ //# sourceMappingURL=corpus-scan-worker.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/corpus-scan-worker.entry.ts"],"sourcesContent":["/**\n * Corpus-scan worker entry (TypeScript source of the generated worker).\n *\n * The worker runs the daemon's pure, read-only corpus scans off the main event\n * loop: the recall-corpus path walk, the entity-entry fingerprint, and the\n * watermark's freshness stat. Every job carries its own inputs and returns its\n * own results, so the worker holds no state.\n *\n * This file is BUNDLED into `src/corpus-scan-worker.entry.mjs` (plain\n * JavaScript) by scripts/sync-corpus-scan-worker.mjs: a worker thread does not\n * inherit the TypeScript loader the source tree runs under, so the worker\n * entry must be JavaScript on every runtime the package supports. The bundled\n * file is committed and checked for drift by\n * scripts/check-corpus-scan-worker-sync.mjs.\n *\n * Protocol: the host posts `{ id, payload }`; the worker answers\n * `{ id, ok: true, result }` or `{ id, ok: false, error }`. A posted\n * `{ id, cancel: true }` abandons that job at its next checkpoint.\n */\n\nimport { parentPort } from \"node:worker_threads\";\nimport { abortError } from \"./abort-error.js\";\nimport {\n collectContainedMarkdownPaths,\n fingerprintEntityEntries,\n statMtimes,\n} from \"./corpus-scan.js\";\nimport type {\n CorpusScanErrorPayload,\n CorpusScanPayload,\n CorpusScanResult,\n} from \"./corpus-scan-worker-host.js\";\n\nif (!parentPort) throw new Error(\"corpus scan worker must run as a worker thread\");\n\nconst port = parentPort;\nconst cancelled = new Set<number>();\n\n/** A thrown value from the scan code: an Error, optionally errno-coded. */\ntype ScanFailure = Error & { code?: string };\n\n/** A message the host posts to the worker. */\ninterface CorpusScanRequestMessage {\n id: number;\n payload?: CorpusScanPayload;\n cancel?: boolean;\n}\n\nfunction serializeError(error: ScanFailure): CorpusScanErrorPayload {\n const payload: CorpusScanErrorPayload = {\n name: error.name,\n message: error instanceof Error ? error.message : String(error),\n };\n if (error.code !== undefined) payload.code = error.code;\n return payload;\n}\n\nasync function runJob(id: number, payload: CorpusScanPayload): Promise<CorpusScanResult> {\n const checkCancelled = (): void => {\n if (cancelled.has(id)) throw abortError(\"corpus read aborted\");\n };\n switch (payload.kind) {\n case \"walk\":\n return await collectContainedMarkdownPaths({\n baseDir: payload.baseDir,\n startDirs: payload.startDirs,\n propagateReadErrors: payload.propagateReadErrors,\n checkCancelled,\n });\n case \"entity-entries-fingerprint\":\n return await fingerprintEntityEntries(payload.entitiesDir);\n case \"stat-mtimes\":\n return await statMtimes(payload.paths);\n }\n}\n\nport.on(\"message\", (message: CorpusScanRequestMessage) => {\n if (message.cancel) {\n cancelled.add(message.id);\n return;\n }\n const { id } = message;\n const payload = message.payload;\n if (!payload) return;\n void runJob(id, payload)\n .then((result) => {\n port.postMessage({ id, ok: true, result });\n })\n .catch((error: ScanFailure) => {\n port.postMessage({ id, ok: false, error: serializeError(error) });\n })\n .finally(() => {\n cancelled.delete(id);\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAoBA,SAAS,kBAAkB;AAa3B,IAAI,CAAC,WAAY,OAAM,IAAI,MAAM,gDAAgD;AAEjF,IAAM,OAAO;AACb,IAAM,YAAY,oBAAI,IAAY;AAYlC,SAAS,eAAe,OAA4C;AAClE,QAAM,UAAkC;AAAA,IACtC,MAAM,MAAM;AAAA,IACZ,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,EAChE;AACA,MAAI,MAAM,SAAS,OAAW,SAAQ,OAAO,MAAM;AACnD,SAAO;AACT;AAEA,eAAe,OAAO,IAAY,SAAuD;AACvF,QAAM,iBAAiB,MAAY;AACjC,QAAI,UAAU,IAAI,EAAE,EAAG,OAAM,WAAW,qBAAqB;AAAA,EAC/D;AACA,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK;AACH,aAAO,MAAM,8BAA8B;AAAA,QACzC,SAAS,QAAQ;AAAA,QACjB,WAAW,QAAQ;AAAA,QACnB,qBAAqB,QAAQ;AAAA,QAC7B;AAAA,MACF,CAAC;AAAA,IACH,KAAK;AACH,aAAO,MAAM,yBAAyB,QAAQ,WAAW;AAAA,IAC3D,KAAK;AACH,aAAO,MAAM,WAAW,QAAQ,KAAK;AAAA,EACzC;AACF;AAEA,KAAK,GAAG,WAAW,CAAC,YAAsC;AACxD,MAAI,QAAQ,QAAQ;AAClB,cAAU,IAAI,QAAQ,EAAE;AACxB;AAAA,EACF;AACA,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,UAAU,QAAQ;AACxB,MAAI,CAAC,QAAS;AACd,OAAK,OAAO,IAAI,OAAO,EACpB,KAAK,CAAC,WAAW;AAChB,SAAK,YAAY,EAAE,IAAI,IAAI,MAAM,OAAO,CAAC;AAAA,EAC3C,CAAC,EACA,MAAM,CAAC,UAAuB;AAC7B,SAAK,YAAY,EAAE,IAAI,IAAI,OAAO,OAAO,eAAe,KAAK,EAAE,CAAC;AAAA,EAClE,CAAC,EACA,QAAQ,MAAM;AACb,cAAU,OAAO,EAAE;AAAA,EACrB,CAAC;AACL,CAAC;","names":[]}
@@ -0,0 +1,176 @@
1
+ // GENERATED FILE — do not edit.
2
+ // Source: packages/remnic-core/src/corpus-scan-worker.entry.ts
3
+ // Regenerate: npm run sync:corpus-scan-worker
4
+
5
+
6
+ // packages/remnic-core/src/corpus-scan-worker.entry.ts
7
+ import { parentPort } from "node:worker_threads";
8
+
9
+ // packages/remnic-core/src/abort-error.ts
10
+ function abortError(message) {
11
+ const err = new Error(message);
12
+ Object.defineProperty(err, "name", { value: "AbortError" });
13
+ return err;
14
+ }
15
+
16
+ // packages/remnic-core/src/corpus-scan.ts
17
+ import { createHash } from "node:crypto";
18
+ import { lstat, readdir, realpath, stat } from "node:fs/promises";
19
+ import path from "node:path";
20
+
21
+ // packages/remnic-core/src/utils/errno.ts
22
+ function isErrnoCode(error, code) {
23
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
24
+ }
25
+
26
+ // packages/remnic-core/src/utils/macos-replication-junk.ts
27
+ function isMacOsReplicationJunkBasename(basename) {
28
+ return basename === ".DS_Store" || basename.startsWith("._");
29
+ }
30
+
31
+ // packages/remnic-core/src/corpus-scan.ts
32
+ function isPropagatableReadError(error) {
33
+ return error.code !== void 0 && error.code !== "ENOENT";
34
+ }
35
+ async function collectContainedMarkdownPaths(options) {
36
+ const { baseDir, startDirs, propagateReadErrors = false, checkCancelled } = options;
37
+ const filePaths = [];
38
+ try {
39
+ await realpath(baseDir);
40
+ } catch (error) {
41
+ const failure = error;
42
+ if (propagateReadErrors && isPropagatableReadError(failure)) throw error;
43
+ return filePaths;
44
+ }
45
+ const collectPaths = async (dir) => {
46
+ checkCancelled?.();
47
+ let dirStat;
48
+ try {
49
+ dirStat = await lstat(dir);
50
+ } catch (error) {
51
+ const failure = error;
52
+ if (propagateReadErrors && isPropagatableReadError(failure)) throw error;
53
+ return;
54
+ }
55
+ if (dirStat.isSymbolicLink()) return;
56
+ if (!dirStat.isDirectory()) {
57
+ if (propagateReadErrors) {
58
+ throw new Error(`corpus scan: expected a directory but found a non-directory at ${dir}`);
59
+ }
60
+ return;
61
+ }
62
+ let entries;
63
+ try {
64
+ entries = await readdir(dir, { withFileTypes: true });
65
+ } catch (error) {
66
+ const failure = error;
67
+ if (propagateReadErrors && isPropagatableReadError(failure)) throw error;
68
+ return;
69
+ }
70
+ const subdirs = [];
71
+ for (const entry of entries) {
72
+ checkCancelled?.();
73
+ if (entry.isSymbolicLink()) continue;
74
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
75
+ const fullPath = path.join(dir, entry.name);
76
+ if (entry.isDirectory()) {
77
+ subdirs.push(fullPath);
78
+ } else if (entry.name.endsWith(".md")) {
79
+ filePaths.push(fullPath);
80
+ }
81
+ }
82
+ for (const subdir of subdirs) {
83
+ await collectPaths(subdir);
84
+ }
85
+ };
86
+ for (const dir of startDirs) {
87
+ await collectPaths(dir);
88
+ }
89
+ checkCancelled?.();
90
+ return filePaths;
91
+ }
92
+ async function fingerprintEntityEntries(entitiesDir) {
93
+ let names;
94
+ try {
95
+ names = (await readdir(entitiesDir)).filter((name) => path.extname(name) === ".md" && !isMacOsReplicationJunkBasename(name)).sort();
96
+ } catch (error) {
97
+ if (isErrnoCode(error, "ENOENT")) return "missing";
98
+ throw error;
99
+ }
100
+ const hash = createHash("sha256");
101
+ for (const name of names) {
102
+ hash.update(`${name.length}:${name}:`);
103
+ try {
104
+ const entry = await lstat(path.join(entitiesDir, name), { bigint: true });
105
+ hash.update(`${entry.dev}:${entry.ino}:${entry.size}:${entry.mtimeNs}:${entry.ctimeNs}`);
106
+ } catch (error) {
107
+ if (!isErrnoCode(error, "ENOENT")) throw error;
108
+ hash.update("missing");
109
+ }
110
+ hash.update("\n");
111
+ }
112
+ return hash.digest("hex");
113
+ }
114
+ async function statMtimes(paths) {
115
+ const results = new Array(paths.length).fill(null);
116
+ const STAT_BATCH_SIZE = 256;
117
+ for (let start = 0; start < paths.length; start += STAT_BATCH_SIZE) {
118
+ await Promise.all(paths.slice(start, start + STAT_BATCH_SIZE).map(async (filePath, offset) => {
119
+ try {
120
+ const entry = await stat(filePath);
121
+ results[start + offset] = entry.mtimeMs;
122
+ } catch (error) {
123
+ if (isErrnoCode(error, "ENOENT")) return;
124
+ throw error;
125
+ }
126
+ }));
127
+ }
128
+ return results;
129
+ }
130
+
131
+ // packages/remnic-core/src/corpus-scan-worker.entry.ts
132
+ if (!parentPort) throw new Error("corpus scan worker must run as a worker thread");
133
+ var port = parentPort;
134
+ var cancelled = /* @__PURE__ */ new Set();
135
+ function serializeError(error) {
136
+ const payload = {
137
+ name: error.name,
138
+ message: error instanceof Error ? error.message : String(error)
139
+ };
140
+ if (error.code !== void 0) payload.code = error.code;
141
+ return payload;
142
+ }
143
+ async function runJob(id, payload) {
144
+ const checkCancelled = () => {
145
+ if (cancelled.has(id)) throw abortError("corpus read aborted");
146
+ };
147
+ switch (payload.kind) {
148
+ case "walk":
149
+ return await collectContainedMarkdownPaths({
150
+ baseDir: payload.baseDir,
151
+ startDirs: payload.startDirs,
152
+ propagateReadErrors: payload.propagateReadErrors,
153
+ checkCancelled
154
+ });
155
+ case "entity-entries-fingerprint":
156
+ return await fingerprintEntityEntries(payload.entitiesDir);
157
+ case "stat-mtimes":
158
+ return await statMtimes(payload.paths);
159
+ }
160
+ }
161
+ port.on("message", (message) => {
162
+ if (message.cancel) {
163
+ cancelled.add(message.id);
164
+ return;
165
+ }
166
+ const { id } = message;
167
+ const payload = message.payload;
168
+ if (!payload) return;
169
+ void runJob(id, payload).then((result) => {
170
+ port.postMessage({ id, ok: true, result });
171
+ }).catch((error) => {
172
+ port.postMessage({ id, ok: false, error: serializeError(error) });
173
+ }).finally(() => {
174
+ cancelled.delete(id);
175
+ });
176
+ });
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Corpus maintenance scans (the pure, read-only filesystem work the daemon
3
+ * runs periodically).
4
+ *
5
+ * Three scans live here, all of them corpus-sized:
6
+ * - the recall-corpus path walk (hot + cold tiers);
7
+ * - the entity-entry fingerprint the canonical-id migration reads on every
8
+ * entity unlock;
9
+ * - the watermark's freshness stat over the newest hot partition.
10
+ *
11
+ * They are plain functions over plain inputs so the corpus-scan worker can run
12
+ * them off the main event loop: `src/corpus-scan-worker.entry.ts` is bundled
13
+ * into a plain-JavaScript worker entry (`src/corpus-scan-worker.entry.mjs`,
14
+ * generated — see scripts/sync-corpus-scan-worker.mjs) and the host falls back
15
+ * to these functions inline when a worker cannot start. One implementation,
16
+ * two execution sites, identical results.
17
+ */
18
+ /** An errno-carrying filesystem failure. */
19
+ export type ErrnoFailure = NodeJS.ErrnoException;
20
+ /**
21
+ * A backend READ failure worth propagating from a strict (census) scan: an
22
+ * errno-coded fs error that is NOT `ENOENT`. `ENOENT` (an absent dir) and
23
+ * code-less rejections are expected and skipped; `EACCES`/`EIO`/… mean the
24
+ * corpus is unreadable and a divergence census must fail loud rather than
25
+ * silently publish a partial count (issue #2156 round-5). Non-strict (recall)
26
+ * callers ignore this and degrade to a best-effort partial scan.
27
+ */
28
+ export declare function isPropagatableReadError(error: ErrnoFailure): boolean;
29
+ export interface CorpusScanWalkOptions {
30
+ /** Memory root the walk is contained in. */
31
+ baseDir: string;
32
+ /** Directories to walk (category roots, cold root, archive root). */
33
+ startDirs: readonly string[];
34
+ /** Strict mode: backend read failures propagate instead of being skipped. */
35
+ propagateReadErrors?: boolean;
36
+ /**
37
+ * Cancellation check at every directory/entry boundary. The inline reader
38
+ * passes the corpus-read abort check; the worker passes its cancel flag.
39
+ */
40
+ checkCancelled?(): void;
41
+ }
42
+ /**
43
+ * Recursively collect `*.md` paths under `startDirs`. Paths only — no
44
+ * frontmatter parse. Never throws for a missing root (an empty result), and
45
+ * throws in strict mode when a backend read failure makes the corpus
46
+ * unreadable.
47
+ *
48
+ * Containment is established once, not per file: the memory root is resolved
49
+ * with a single `realpath`, every directory the walk enters is `lstat`ed (a
50
+ * symlinked or non-directory entry is never followed), and the entry TYPE
51
+ * comes from `readdir(withFileTypes)` — so a symlinked entry, file or
52
+ * directory, is skipped without a per-entry `realpath`. Reads refuse
53
+ * symlinked files at open time with `O_NOFOLLOW`, so a path swapped to a
54
+ * symlink mid-scan is refused rather than followed.
55
+ */
56
+ export declare function collectContainedMarkdownPaths(options: CorpusScanWalkOptions): Promise<string[]>;
57
+ /**
58
+ * Fingerprint of the entity entries a migration's completion verdict depends
59
+ * on: the sorted entry names plus each entry's identity and timestamps. Two
60
+ * runs over the same entries produce the same string, and an in-place edit of
61
+ * an entity file changes it.
62
+ */
63
+ export declare function fingerprintEntityEntries(entitiesDir: string): Promise<string>;
64
+ /**
65
+ * Stat a batch of files and return their mtimes, `null` for files that
66
+ * vanished (ENOENT). A backend read failure (EACCES/EIO/…) throws with its
67
+ * errno code intact so the caller can omit an unreadable corpus instead of
68
+ * publishing a stale freshness value.
69
+ */
70
+ export declare function statMtimes(paths: readonly string[]): Promise<Array<number | null>>;
71
+ //# sourceMappingURL=corpus-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-scan.d.ts","sourceRoot":"","sources":["../src/corpus-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH,4CAA4C;AAC5C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAEpE;AAED,MAAM,WAAW,qBAAqB;IACpC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,IAAI,IAAI,CAAC;CACzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAyFrG;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBnF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAkBxF"}
@@ -0,0 +1,16 @@
1
+ import {
2
+ collectContainedMarkdownPaths,
3
+ fingerprintEntityEntries,
4
+ isPropagatableReadError,
5
+ statMtimes
6
+ } from "./chunk-YHTG64XV.js";
7
+ import "./chunk-QUIRIG2P.js";
8
+ import "./chunk-KNA3BXXL.js";
9
+ import "./chunk-PZ5AY32C.js";
10
+ export {
11
+ collectContainedMarkdownPaths,
12
+ fingerprintEntityEntries,
13
+ isPropagatableReadError,
14
+ statMtimes
15
+ };
16
+ //# sourceMappingURL=corpus-scan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"corpus-watermark.d.ts","sourceRoot":"","sources":["../src/corpus-watermark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAKH,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,mFAAmF;IACnF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;AA0CxC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,C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