@remnic/core 9.69.50 → 9.69.51

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 (271) hide show
  1. package/dist/access-admin-ops-surface.js +30 -30
  2. package/dist/access-audit.d.ts +1 -0
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-authorization-probe.js +31 -31
  5. package/dist/access-boundary.js +30 -30
  6. package/dist/access-cli.js +84 -83
  7. package/dist/access-cli.js.map +1 -1
  8. package/dist/access-extraction-force-flush.js +30 -30
  9. package/dist/access-http-briefing.js +31 -31
  10. package/dist/access-http-query.js +32 -32
  11. package/dist/access-http.js +50 -50
  12. package/dist/access-identity-continuity-surface.js +30 -30
  13. package/dist/access-lcm-surface.js +30 -30
  14. package/dist/access-mcp-output-schemas.js +1 -1
  15. package/dist/access-mcp.js +41 -41
  16. package/dist/access-namespace-preflight.js +30 -30
  17. package/dist/access-observe-write-category.js +5 -5
  18. package/dist/access-observe-write-surface.js +30 -30
  19. package/dist/access-operations-batch.js +32 -32
  20. package/dist/access-operations.js +39 -39
  21. package/dist/access-recall-concurrency.js +30 -30
  22. package/dist/access-recall-response.js +30 -30
  23. package/dist/access-recall-surface.d.ts +1 -1
  24. package/dist/access-recall-surface.js +30 -30
  25. package/dist/access-schema.js +4 -4
  26. package/dist/access-service.js +30 -30
  27. package/dist/access-surface-catalog.js +32 -32
  28. package/dist/active-recall.js +2 -2
  29. package/dist/briefing.js +5 -5
  30. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  31. package/dist/causal-consolidation.js +6 -6
  32. package/dist/{chunk-BHI5ILU5.js → chunk-25HSEIEM.js} +2 -2
  33. package/dist/{chunk-3RZB7TYL.js → chunk-2EICZYIG.js} +2 -2
  34. package/dist/{chunk-2IVHOQRY.js → chunk-2ERLN25A.js} +2 -2
  35. package/dist/{chunk-OQZYHCWM.js → chunk-2G2CVN2T.js} +27 -26
  36. package/dist/{chunk-OQZYHCWM.js.map → chunk-2G2CVN2T.js.map} +1 -1
  37. package/dist/{chunk-PPNFKQ6D.js → chunk-2SZBCM2S.js} +2 -2
  38. package/dist/{chunk-E73SVGJA.js → chunk-33SX6K3N.js} +2 -2
  39. package/dist/{chunk-D6WX5FEF.js → chunk-3QZRSEAM.js} +2 -2
  40. package/dist/{chunk-LBLXEFWK.js → chunk-4MN27537.js} +1 -1
  41. package/dist/chunk-4MN27537.js.map +1 -0
  42. package/dist/{chunk-LR7KUQ2W.js → chunk-6HCJWCA4.js} +5 -5
  43. package/dist/chunk-6VITOSPL.js +69 -0
  44. package/dist/chunk-6VITOSPL.js.map +1 -0
  45. package/dist/{chunk-EZV43XBD.js → chunk-6Z4OLQUO.js} +2 -2
  46. package/dist/{chunk-JTPAXDSX.js → chunk-6ZMIASYT.js} +2 -2
  47. package/dist/{chunk-UD6W67JM.js → chunk-72AV2H3R.js} +76 -25
  48. package/dist/chunk-72AV2H3R.js.map +1 -0
  49. package/dist/{chunk-DNO6QWCB.js → chunk-7TTOX6NW.js} +2 -2
  50. package/dist/{chunk-OP5IBPHP.js → chunk-A33DLYNY.js} +2 -2
  51. package/dist/{chunk-3MIZ2EKQ.js → chunk-AH3OIMS7.js} +2 -2
  52. package/dist/{chunk-TZ44E732.js → chunk-AIVRD66I.js} +2 -2
  53. package/dist/{chunk-IST6MBYC.js → chunk-BMAYH7F4.js} +473 -329
  54. package/dist/chunk-BMAYH7F4.js.map +1 -0
  55. package/dist/{chunk-XTMABIFW.js → chunk-BULK6DGB.js} +2 -2
  56. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  57. package/dist/{chunk-PMLFPVYJ.js → chunk-CKBA2MWS.js} +2 -2
  58. package/dist/{chunk-TVVEYCNW.js → chunk-DAOMWGO2.js} +2 -2
  59. package/dist/{chunk-E64HBW7M.js → chunk-DLXBMXIB.js} +2 -2
  60. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  61. package/dist/{chunk-MQMZO23A.js → chunk-DQSVGTKB.js} +2 -2
  62. package/dist/{chunk-X6B2QWXW.js → chunk-DX63RFDJ.js} +2 -2
  63. package/dist/{chunk-OLJYDGGP.js → chunk-EBJL6HGR.js} +4 -4
  64. package/dist/{chunk-KOEDSRF5.js → chunk-ETNC6TT6.js} +2 -2
  65. package/dist/{chunk-SRMBMMTK.js → chunk-HEKWNWNL.js} +3 -3
  66. package/dist/{chunk-UI6R2YUB.js → chunk-IGDEKECC.js} +1 -1
  67. package/dist/{chunk-MECKA6G2.js → chunk-ISA5U5AP.js} +2 -2
  68. package/dist/{chunk-ZUNYFDI4.js → chunk-JGPG5UHM.js} +2 -2
  69. package/dist/{chunk-C3PKRFZ4.js → chunk-JXSOB3SA.js} +2 -2
  70. package/dist/{chunk-56C7OO3N.js → chunk-KAPYPTPS.js} +15 -15
  71. package/dist/{chunk-W6V7JN2E.js → chunk-KBHDV7P3.js} +3 -3
  72. package/dist/{chunk-F5V7KRQS.js → chunk-LIAKZGOY.js} +2 -2
  73. package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
  74. package/dist/{chunk-QSP4Y73Q.js → chunk-LX7KIJQF.js} +2 -2
  75. package/dist/{chunk-ECLY4NZA.js → chunk-LZI6FWZW.js} +7 -1
  76. package/dist/chunk-LZI6FWZW.js.map +1 -0
  77. package/dist/{chunk-4PXFLDMJ.js → chunk-MNF6PTNL.js} +2 -2
  78. package/dist/{chunk-BOTSR5S3.js → chunk-MYDA2GA2.js} +2 -2
  79. package/dist/{chunk-4SDO74N2.js → chunk-NROI5XMG.js} +2 -2
  80. package/dist/{chunk-IYHHCSF6.js → chunk-NVW5ISEJ.js} +32 -32
  81. package/dist/{chunk-AL7OLBL7.js → chunk-NXSNFPYI.js} +2 -2
  82. package/dist/{chunk-D7QX26FF.js → chunk-O4JFBEUL.js} +2 -2
  83. package/dist/{chunk-PA5EOTRR.js → chunk-OIK3YL2P.js} +3 -3
  84. package/dist/{chunk-JOP7W24J.js → chunk-PLJ2MQFT.js} +4 -4
  85. package/dist/{chunk-HRCWDO6S.js → chunk-PYTSGD5M.js} +2 -2
  86. package/dist/{chunk-VBRS7Z3O.js → chunk-Q6OC4UUT.js} +2 -2
  87. package/dist/{chunk-4FWNMN5R.js → chunk-QRSC37NC.js} +5 -5
  88. package/dist/{chunk-D2XUSZ24.js → chunk-RIP2AOZW.js} +2 -2
  89. package/dist/{chunk-ZBAQMSEY.js → chunk-SCM4VYJW.js} +2 -2
  90. package/dist/{chunk-6525YIYL.js → chunk-SMI2G3MA.js} +3 -3
  91. package/dist/{chunk-DH536WT2.js → chunk-ST7FDKZT.js} +12 -2
  92. package/dist/chunk-ST7FDKZT.js.map +1 -0
  93. package/dist/{chunk-AYGWJ2UK.js → chunk-SZ75IB2T.js} +2 -2
  94. package/dist/{chunk-42BV46XS.js → chunk-T73ZC7C5.js} +2 -2
  95. package/dist/{chunk-3SI3FFTW.js → chunk-TNFDWJRS.js} +2 -2
  96. package/dist/{chunk-3UQIS2GC.js → chunk-TTFJQ5B5.js} +2 -2
  97. package/dist/{chunk-QZDUNK6V.js → chunk-UP3226JC.js} +6 -6
  98. package/dist/{chunk-IPLYGWQF.js → chunk-VDX2J7OX.js} +6 -6
  99. package/dist/{chunk-QXQCPNKA.js → chunk-VLR4S5GF.js} +7 -7
  100. package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
  101. package/dist/{chunk-HS75MCQF.js → chunk-WUUGE7QC.js} +4 -4
  102. package/dist/{chunk-MVMNEU65.js → chunk-X25NTN3W.js} +2 -2
  103. package/dist/{chunk-IC3PM3YO.js → chunk-XFXVIXDI.js} +2 -2
  104. package/dist/{chunk-ML5FW2RO.js → chunk-XHDQQ2TT.js} +2 -2
  105. package/dist/{chunk-XUKUMBP3.js → chunk-XRUOO7OT.js} +2 -2
  106. package/dist/{chunk-WVI43D54.js → chunk-YEIKOBOW.js} +15 -2
  107. package/dist/chunk-YEIKOBOW.js.map +1 -0
  108. package/dist/{chunk-AYP2FZFA.js → chunk-YIIW2OH2.js} +2 -2
  109. package/dist/{chunk-FO6IK4IF.js → chunk-YJJMJH6J.js} +8 -8
  110. package/dist/cli.js +68 -68
  111. package/dist/coding/export-okf-codegraph.js +4 -4
  112. package/dist/compounding/engine.js +5 -5
  113. package/dist/config.js +2 -2
  114. package/dist/connectors/codex-materialize-runner.js +5 -5
  115. package/dist/connectors/index.js +5 -5
  116. package/dist/convergence-refresh.js +7 -7
  117. package/dist/corpus-watermark.js +7 -7
  118. package/dist/deep-recall-http-glue.js +5 -5
  119. package/dist/deep-recall.js +2 -2
  120. package/dist/directory-sidecars.d.ts +28 -2
  121. package/dist/directory-sidecars.js +9 -1
  122. package/dist/entity-retrieval.js +5 -5
  123. package/dist/external-wiki-access.js +31 -31
  124. package/dist/extraction.js +5 -5
  125. package/dist/harmonic-retrieval.js +1 -1
  126. package/dist/index.d.ts +2 -0
  127. package/dist/index.js +98 -88
  128. package/dist/lcm/engine.js +3 -3
  129. package/dist/lcm/index.js +8 -8
  130. package/dist/location/index.js +7 -7
  131. package/dist/maintenance/memory-governance.js +5 -5
  132. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
  133. package/dist/maintenance/rebuild-memory-projection.js +6 -6
  134. package/dist/memory-browse-operations.js +31 -31
  135. package/dist/memory-browse.js +3 -3
  136. package/dist/namespaces/migrate.js +6 -6
  137. package/dist/namespaces/search.js +3 -3
  138. package/dist/namespaces/storage.js +5 -5
  139. package/dist/operator-doctor-corpus.js +8 -8
  140. package/dist/operator-toolkit.js +15 -15
  141. package/dist/orchestration/maintenance.js +13 -13
  142. package/dist/orchestrator.js +84 -83
  143. package/dist/recall-audit-anomaly.d.ts +1 -0
  144. package/dist/recall-audit.d.ts +4 -0
  145. package/dist/recall-audit.js +1 -1
  146. package/dist/recall-composition-decision.d.ts +41 -0
  147. package/dist/recall-composition-decision.js +17 -0
  148. package/dist/recall-composition-decision.js.map +1 -0
  149. package/dist/recall-explain-renderer.d.ts +1 -0
  150. package/dist/recall-explain-renderer.js +2 -2
  151. package/dist/recall-navigation-operations.js +31 -31
  152. package/dist/recall-navigation-renderer.d.ts +1 -0
  153. package/dist/recall-navigation.d.ts +1 -0
  154. package/dist/recall-navigation.js +30 -30
  155. package/dist/recall-state-view-admission.js +3 -3
  156. package/dist/recall-tag-filter.d.ts +1 -0
  157. package/dist/recall-xray-cli.d.ts +1 -0
  158. package/dist/recall-xray-cli.js +3 -3
  159. package/dist/recall-xray-renderer.d.ts +1 -0
  160. package/dist/recall-xray-renderer.js +2 -2
  161. package/dist/recall-xray.d.ts +9 -0
  162. package/dist/recall-xray.js +1 -1
  163. package/dist/resume-bundles.js +3 -3
  164. package/dist/search/factory.js +2 -2
  165. package/dist/search/index.js +4 -4
  166. package/dist/semantic-consolidation.js +6 -6
  167. package/dist/semantic-rule-promotion.js +5 -5
  168. package/dist/semantic-rule-verifier.js +5 -5
  169. package/dist/source-agent-qualifier.js +5 -5
  170. package/dist/standup/build.js +5 -5
  171. package/dist/storage.js +4 -4
  172. package/dist/support-passport/index.js +33 -33
  173. package/dist/transfer/autodetect.js +1 -1
  174. package/dist/transfer/backup.js +2 -2
  175. package/dist/transfer/capsule-export.js +3 -3
  176. package/dist/transfer/capsule-import.js +2 -2
  177. package/dist/transfer/export-okf.js +5 -5
  178. package/dist/verified-recall.js +5 -5
  179. package/dist/who-knows-cli.js +6 -6
  180. package/dist/who-knows.js +5 -5
  181. package/package.json +2 -2
  182. package/src/access-mcp-output-schemas.ts +14 -1
  183. package/src/access-recall-response.ts +3 -0
  184. package/src/directory-sidecars.test.ts +119 -0
  185. package/src/directory-sidecars.ts +110 -25
  186. package/src/experience/session-experience-recall.test.ts +228 -0
  187. package/src/experience/session-experience-recall.ts +60 -0
  188. package/src/index.ts +1 -0
  189. package/src/orchestration/recall-entry.ts +16 -2
  190. package/src/orchestration/recall-internal.ts +21 -18
  191. package/src/orchestration/recall-recognition-search.test.ts +290 -0
  192. package/src/orchestration/recall-recognition-search.ts +160 -0
  193. package/src/procedural/procedure-recall.ts +14 -3
  194. package/src/recall-audit.test.ts +34 -0
  195. package/src/recall-audit.ts +4 -0
  196. package/src/recall-composition-decision.test.ts +134 -0
  197. package/src/recall-composition-decision.ts +113 -0
  198. package/src/recall-xray-renderer.test.ts +17 -0
  199. package/src/recall-xray-renderer.ts +10 -0
  200. package/src/recall-xray.test.ts +28 -0
  201. package/src/recall-xray.ts +15 -0
  202. package/src/testing/subjects/recall-recognition-tier.test.ts +106 -0
  203. package/dist/chunk-DH536WT2.js.map +0 -1
  204. package/dist/chunk-ECLY4NZA.js.map +0 -1
  205. package/dist/chunk-IST6MBYC.js.map +0 -1
  206. package/dist/chunk-LBLXEFWK.js.map +0 -1
  207. package/dist/chunk-UD6W67JM.js.map +0 -1
  208. package/dist/chunk-WVI43D54.js.map +0 -1
  209. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  210. /package/dist/{chunk-BHI5ILU5.js.map → chunk-25HSEIEM.js.map} +0 -0
  211. /package/dist/{chunk-3RZB7TYL.js.map → chunk-2EICZYIG.js.map} +0 -0
  212. /package/dist/{chunk-2IVHOQRY.js.map → chunk-2ERLN25A.js.map} +0 -0
  213. /package/dist/{chunk-PPNFKQ6D.js.map → chunk-2SZBCM2S.js.map} +0 -0
  214. /package/dist/{chunk-E73SVGJA.js.map → chunk-33SX6K3N.js.map} +0 -0
  215. /package/dist/{chunk-D6WX5FEF.js.map → chunk-3QZRSEAM.js.map} +0 -0
  216. /package/dist/{chunk-LR7KUQ2W.js.map → chunk-6HCJWCA4.js.map} +0 -0
  217. /package/dist/{chunk-EZV43XBD.js.map → chunk-6Z4OLQUO.js.map} +0 -0
  218. /package/dist/{chunk-JTPAXDSX.js.map → chunk-6ZMIASYT.js.map} +0 -0
  219. /package/dist/{chunk-DNO6QWCB.js.map → chunk-7TTOX6NW.js.map} +0 -0
  220. /package/dist/{chunk-OP5IBPHP.js.map → chunk-A33DLYNY.js.map} +0 -0
  221. /package/dist/{chunk-3MIZ2EKQ.js.map → chunk-AH3OIMS7.js.map} +0 -0
  222. /package/dist/{chunk-TZ44E732.js.map → chunk-AIVRD66I.js.map} +0 -0
  223. /package/dist/{chunk-XTMABIFW.js.map → chunk-BULK6DGB.js.map} +0 -0
  224. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  225. /package/dist/{chunk-PMLFPVYJ.js.map → chunk-CKBA2MWS.js.map} +0 -0
  226. /package/dist/{chunk-TVVEYCNW.js.map → chunk-DAOMWGO2.js.map} +0 -0
  227. /package/dist/{chunk-E64HBW7M.js.map → chunk-DLXBMXIB.js.map} +0 -0
  228. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  229. /package/dist/{chunk-MQMZO23A.js.map → chunk-DQSVGTKB.js.map} +0 -0
  230. /package/dist/{chunk-X6B2QWXW.js.map → chunk-DX63RFDJ.js.map} +0 -0
  231. /package/dist/{chunk-OLJYDGGP.js.map → chunk-EBJL6HGR.js.map} +0 -0
  232. /package/dist/{chunk-KOEDSRF5.js.map → chunk-ETNC6TT6.js.map} +0 -0
  233. /package/dist/{chunk-SRMBMMTK.js.map → chunk-HEKWNWNL.js.map} +0 -0
  234. /package/dist/{chunk-UI6R2YUB.js.map → chunk-IGDEKECC.js.map} +0 -0
  235. /package/dist/{chunk-MECKA6G2.js.map → chunk-ISA5U5AP.js.map} +0 -0
  236. /package/dist/{chunk-ZUNYFDI4.js.map → chunk-JGPG5UHM.js.map} +0 -0
  237. /package/dist/{chunk-C3PKRFZ4.js.map → chunk-JXSOB3SA.js.map} +0 -0
  238. /package/dist/{chunk-56C7OO3N.js.map → chunk-KAPYPTPS.js.map} +0 -0
  239. /package/dist/{chunk-W6V7JN2E.js.map → chunk-KBHDV7P3.js.map} +0 -0
  240. /package/dist/{chunk-F5V7KRQS.js.map → chunk-LIAKZGOY.js.map} +0 -0
  241. /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
  242. /package/dist/{chunk-QSP4Y73Q.js.map → chunk-LX7KIJQF.js.map} +0 -0
  243. /package/dist/{chunk-4PXFLDMJ.js.map → chunk-MNF6PTNL.js.map} +0 -0
  244. /package/dist/{chunk-BOTSR5S3.js.map → chunk-MYDA2GA2.js.map} +0 -0
  245. /package/dist/{chunk-4SDO74N2.js.map → chunk-NROI5XMG.js.map} +0 -0
  246. /package/dist/{chunk-IYHHCSF6.js.map → chunk-NVW5ISEJ.js.map} +0 -0
  247. /package/dist/{chunk-AL7OLBL7.js.map → chunk-NXSNFPYI.js.map} +0 -0
  248. /package/dist/{chunk-D7QX26FF.js.map → chunk-O4JFBEUL.js.map} +0 -0
  249. /package/dist/{chunk-PA5EOTRR.js.map → chunk-OIK3YL2P.js.map} +0 -0
  250. /package/dist/{chunk-JOP7W24J.js.map → chunk-PLJ2MQFT.js.map} +0 -0
  251. /package/dist/{chunk-HRCWDO6S.js.map → chunk-PYTSGD5M.js.map} +0 -0
  252. /package/dist/{chunk-VBRS7Z3O.js.map → chunk-Q6OC4UUT.js.map} +0 -0
  253. /package/dist/{chunk-4FWNMN5R.js.map → chunk-QRSC37NC.js.map} +0 -0
  254. /package/dist/{chunk-D2XUSZ24.js.map → chunk-RIP2AOZW.js.map} +0 -0
  255. /package/dist/{chunk-ZBAQMSEY.js.map → chunk-SCM4VYJW.js.map} +0 -0
  256. /package/dist/{chunk-6525YIYL.js.map → chunk-SMI2G3MA.js.map} +0 -0
  257. /package/dist/{chunk-AYGWJ2UK.js.map → chunk-SZ75IB2T.js.map} +0 -0
  258. /package/dist/{chunk-42BV46XS.js.map → chunk-T73ZC7C5.js.map} +0 -0
  259. /package/dist/{chunk-3SI3FFTW.js.map → chunk-TNFDWJRS.js.map} +0 -0
  260. /package/dist/{chunk-3UQIS2GC.js.map → chunk-TTFJQ5B5.js.map} +0 -0
  261. /package/dist/{chunk-QZDUNK6V.js.map → chunk-UP3226JC.js.map} +0 -0
  262. /package/dist/{chunk-IPLYGWQF.js.map → chunk-VDX2J7OX.js.map} +0 -0
  263. /package/dist/{chunk-QXQCPNKA.js.map → chunk-VLR4S5GF.js.map} +0 -0
  264. /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
  265. /package/dist/{chunk-HS75MCQF.js.map → chunk-WUUGE7QC.js.map} +0 -0
  266. /package/dist/{chunk-MVMNEU65.js.map → chunk-X25NTN3W.js.map} +0 -0
  267. /package/dist/{chunk-IC3PM3YO.js.map → chunk-XFXVIXDI.js.map} +0 -0
  268. /package/dist/{chunk-ML5FW2RO.js.map → chunk-XHDQQ2TT.js.map} +0 -0
  269. /package/dist/{chunk-XUKUMBP3.js.map → chunk-XRUOO7OT.js.map} +0 -0
  270. /package/dist/{chunk-AYP2FZFA.js.map → chunk-YIIW2OH2.js.map} +0 -0
  271. /package/dist/{chunk-FO6IK4IF.js.map → chunk-YJJMJH6J.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rebuildMemoryProjection
3
- } from "./chunk-W6V7JN2E.js";
3
+ } from "./chunk-KBHDV7P3.js";
4
4
 
5
5
  // src/convergence-refresh.ts
6
6
  async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, getStorage, searchEnabled) {
@@ -32,4 +32,4 @@ async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, get
32
32
  export {
33
33
  refreshConvergedNamespaces
34
34
  };
35
- //# sourceMappingURL=chunk-PPNFKQ6D.js.map
35
+ //# sourceMappingURL=chunk-2SZBCM2S.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  computeCorpusWatermarks,
6
6
  resolveCorpusNamespaceRoots
7
- } from "./chunk-ZUNYFDI4.js";
7
+ } from "./chunk-JGPG5UHM.js";
8
8
 
9
9
  // src/operator-doctor-corpus.ts
10
10
  var DIGEST_PREFIX_LENGTH = 12;
@@ -78,4 +78,4 @@ export {
78
78
  corpusWatermarksFromCheck,
79
79
  summarizeCorpusAndReplica
80
80
  };
81
- //# sourceMappingURL=chunk-E73SVGJA.js.map
81
+ //# sourceMappingURL=chunk-33SX6K3N.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-B7RWBZXW.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-D2XUSZ24.js";
6
+ } from "./chunk-RIP2AOZW.js";
7
7
  import {
8
8
  getCachedEpisodeMap,
9
9
  setCachedEpisodeMap
@@ -109,4 +109,4 @@ export {
109
109
  compareVerifiedEpisodeResults,
110
110
  searchVerifiedEpisodes
111
111
  };
112
- //# sourceMappingURL=chunk-D6WX5FEF.js.map
112
+ //# sourceMappingURL=chunk-3QZRSEAM.js.map
@@ -48,4 +48,4 @@ export {
48
48
  appendRecallAuditEntry,
49
49
  pruneRecallAuditEntries
50
50
  };
51
- //# sourceMappingURL=chunk-LBLXEFWK.js.map
51
+ //# sourceMappingURL=chunk-4MN27537.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/recall-audit.ts"],"sourcesContent":["import type { Dirent } from \"node:fs\";\nimport { appendFile, mkdir, readdir, rm } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport type { RecallContextDegradation } from \"./recall-context-composition.js\";\n\nexport interface RecallAuditEntry {\n ts: string;\n sessionKey: string;\n agentId: string;\n trigger: string;\n queryText: string;\n candidateMemoryIds: string[];\n summary: string | null;\n injectedChars: number;\n toggleState: \"enabled\" | \"disabled-primary\" | \"disabled-secondary\";\n latencyMs?: number;\n plannerMode?: string;\n requestedMode?: string;\n fallbackUsed?: boolean;\n /** Injected-context degradation (#2972). Absent on a healthy recall. */\n degradation?: RecallContextDegradation;\n}\n\nfunction formatIsoDate(ts: string): string {\n const normalized = new Date(ts);\n if (Number.isNaN(normalized.getTime())) {\n return new Date().toISOString().slice(0, 10);\n }\n return normalized.toISOString().slice(0, 10);\n}\n\nexport function buildRecallAuditPath(rootDir: string, ts: string, sessionKey: string): string {\n const safeSessionKey = encodeURIComponent(sessionKey);\n return path.join(rootDir, \"transcripts\", formatIsoDate(ts), `${safeSessionKey}.jsonl`);\n}\n\nexport async function appendRecallAuditEntry(\n rootDir: string,\n entry: RecallAuditEntry,\n): Promise<string> {\n const filePath = buildRecallAuditPath(rootDir, entry.ts, entry.sessionKey);\n await mkdir(path.dirname(filePath), { recursive: true });\n await appendFile(filePath, `${JSON.stringify(entry)}\\n`, \"utf8\");\n return filePath;\n}\n\nexport async function pruneRecallAuditEntries(\n rootDir: string,\n retentionDays: number,\n now: Date = new Date(),\n): Promise<string[]> {\n const transcriptsDir = path.join(rootDir, \"transcripts\");\n const removed: string[] = [];\n const cutoff = new Date(now);\n cutoff.setUTCHours(0, 0, 0, 0);\n cutoff.setUTCDate(cutoff.getUTCDate() - Math.max(1, Math.floor(retentionDays)));\n let entries: Dirent[];\n try {\n entries = await readdir(transcriptsDir, { withFileTypes: true });\n } catch {\n return removed;\n }\n\n for (const entry of entries) {\n if (!entry.isDirectory()) continue;\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(entry.name)) continue;\n const day = new Date(`${entry.name}T00:00:00.000Z`);\n if (Number.isNaN(day.getTime()) || day >= cutoff) continue;\n const dirPath = path.join(transcriptsDir, entry.name);\n await rm(dirPath, { recursive: true, force: true });\n removed.push(dirPath);\n }\n\n return removed;\n}\n"],"mappings":";AACA,SAAS,YAAY,OAAO,SAAS,UAAU;AAC/C,OAAO,UAAU;AAsBjB,SAAS,cAAc,IAAoB;AACzC,QAAM,aAAa,IAAI,KAAK,EAAE;AAC9B,MAAI,OAAO,MAAM,WAAW,QAAQ,CAAC,GAAG;AACtC,YAAO,oBAAI,KAAK,GAAE,YAAY,EAAE,MAAM,GAAG,EAAE;AAAA,EAC7C;AACA,SAAO,WAAW,YAAY,EAAE,MAAM,GAAG,EAAE;AAC7C;AAEO,SAAS,qBAAqB,SAAiB,IAAY,YAA4B;AAC5F,QAAM,iBAAiB,mBAAmB,U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from "./chunk-PYTSGD5M.js";
4
4
  import {
5
5
  ensureContradictionScanCron,
6
6
  ensureDaySummaryCron,
@@ -12,14 +12,14 @@ import {
12
12
  } from "./chunk-666A3MOW.js";
13
13
  import {
14
14
  rebuildMemoryLifecycleLedger
15
- } from "./chunk-AYGWJ2UK.js";
15
+ } from "./chunk-SZ75IB2T.js";
16
16
  import {
17
17
  planNamespaceMaintenance,
18
18
  runNamespaceMaintenanceBatchPlan
19
- } from "./chunk-SRMBMMTK.js";
19
+ } from "./chunk-HEKWNWNL.js";
20
20
  import {
21
21
  rebuildMemoryProjection
22
- } from "./chunk-W6V7JN2E.js";
22
+ } from "./chunk-KBHDV7P3.js";
23
23
  import {
24
24
  DEFAULT_TIMELINE_CATEGORIES,
25
25
  TIMELINE_RESERVED_IDLE,
@@ -2450,4 +2450,4 @@ export {
2450
2450
  ActivitySyncScheduler,
2451
2451
  MaintenanceScheduler
2452
2452
  };
2453
- //# sourceMappingURL=chunk-LR7KUQ2W.js.map
2453
+ //# sourceMappingURL=chunk-6HCJWCA4.js.map
@@ -0,0 +1,69 @@
1
+ import {
2
+ RECALL_CONTEXT_SEPARATOR,
3
+ boundRecallContextComposition,
4
+ composeMissingMemoryContext,
5
+ composeRecallContext
6
+ } from "./chunk-IHOXK2I6.js";
7
+ import {
8
+ isAbortError
9
+ } from "./chunk-BTTPKDIL.js";
10
+
11
+ // src/recall-composition-decision.ts
12
+ function firstLine(content) {
13
+ const trimmed = content.trim();
14
+ if (trimmed.length === 0) return "";
15
+ const newline = trimmed.indexOf("\n");
16
+ return newline === -1 ? trimmed : trimmed.slice(0, newline).trimEnd();
17
+ }
18
+ function chunkContent(chunk) {
19
+ return typeof chunk === "string" ? chunk : chunk.content;
20
+ }
21
+ function compactRecallContextFromBuckets(buckets) {
22
+ const sections = [];
23
+ for (const [, chunks] of buckets) {
24
+ const lines = [];
25
+ for (const chunk of chunks) {
26
+ const line = firstLine(chunkContent(chunk));
27
+ if (line.length > 0) lines.push(line);
28
+ }
29
+ if (lines.length > 0) sections.push(lines.join("\n"));
30
+ }
31
+ return sections.join(RECALL_CONTEXT_SEPARATOR);
32
+ }
33
+ function decideRecallContextComposition(input) {
34
+ const composition = boundRecallContextComposition({
35
+ context: input.context,
36
+ footer: input.footer,
37
+ maxChars: input.maxChars,
38
+ compactContext: input.compactContext
39
+ });
40
+ return {
41
+ composition,
42
+ context: composeRecallContext(composition),
43
+ truncated: composition.degradation?.reason === "budget-clipped" || composition.degradation?.reason === "budget-compacted"
44
+ };
45
+ }
46
+ function notifyContextComposition(onContextComposition, composition, onError) {
47
+ if (!onContextComposition) return;
48
+ try {
49
+ const result = onContextComposition(composition);
50
+ if (result && typeof result.then === "function") {
51
+ void Promise.resolve(result).catch(onError);
52
+ }
53
+ } catch (err) {
54
+ onError(err);
55
+ }
56
+ }
57
+ function recallFailureComposition(err) {
58
+ if (isAbortError(err)) return null;
59
+ const detail = err instanceof Error && err.message === "recall timeout" ? "timeout" : "recall_failed";
60
+ return composeMissingMemoryContext({ detail });
61
+ }
62
+
63
+ export {
64
+ compactRecallContextFromBuckets,
65
+ decideRecallContextComposition,
66
+ notifyContextComposition,
67
+ recallFailureComposition
68
+ };
69
+ //# sourceMappingURL=chunk-6VITOSPL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/recall-composition-decision.ts"],"sourcesContent":["/**\n * Recall composition decision (#2972 layer 2).\n *\n * Extracted from recall-internal so that file stays under its ratchet\n * ceiling. Classifies injected memory context as complete / degraded /\n * missing, builds the compact (first-line) form from section buckets,\n * and turns outer-recall failures into the missing-note instead of \"\".\n */\n\nimport { isAbortError } from \"./abort-error.js\";\nimport {\n boundRecallContextComposition,\n composeMissingMemoryContext,\n composeRecallContext,\n RECALL_CONTEXT_SEPARATOR,\n type RecallContextComposition,\n} from \"./recall-context-composition.js\";\n\nexport type RecallCompositionChunk = string | { readonly content: string };\n\nexport interface DecideRecallContextCompositionInput {\n context: string;\n compactContext?: string;\n footer?: string;\n maxChars: number;\n}\n\nexport interface DecidedRecallContextComposition {\n composition: RecallContextComposition;\n context: string;\n truncated: boolean;\n}\n\nfunction firstLine(content: string): string {\n const trimmed = content.trim();\n if (trimmed.length === 0) return \"\";\n const newline = trimmed.indexOf(\"\\n\");\n return newline === -1 ? trimmed : trimmed.slice(0, newline).trimEnd();\n}\n\nfunction chunkContent(chunk: RecallCompositionChunk): string {\n return typeof chunk === \"string\" ? chunk : chunk.content;\n}\n\n/**\n * Shallow form of every section chunk: the first line of each entry,\n * so a budget miss prefers breadth-complete-but-shallow over a clipped\n * tail. Empty chunks contribute nothing.\n */\nexport function compactRecallContextFromBuckets(\n buckets: Iterable<readonly [unknown, readonly RecallCompositionChunk[]]>,\n): string {\n const sections: string[] = [];\n for (const [, chunks] of buckets) {\n const lines: string[] = [];\n for (const chunk of chunks) {\n const line = firstLine(chunkContent(chunk));\n if (line.length > 0) lines.push(line);\n }\n if (lines.length > 0) sections.push(lines.join(\"\\n\"));\n }\n return sections.join(RECALL_CONTEXT_SEPARATOR);\n}\n\nexport function decideRecallContextComposition(\n input: DecideRecallContextCompositionInput,\n): DecidedRecallContextComposition {\n const composition = boundRecallContextComposition({\n context: input.context,\n footer: input.footer,\n maxChars: input.maxChars,\n compactContext: input.compactContext,\n });\n return {\n composition,\n context: composeRecallContext(composition),\n truncated:\n composition.degradation?.reason === \"budget-clipped\" ||\n composition.degradation?.reason === \"budget-compacted\",\n };\n}\n\nexport function notifyContextComposition(\n onContextComposition:\n | ((composition: RecallContextComposition) => void | PromiseLike<void>)\n | undefined,\n composition: RecallContextComposition,\n onError: (err: unknown) => void,\n): void {\n if (!onContextComposition) return;\n try {\n const result = onContextComposition(composition);\n if (result && typeof result.then === \"function\") {\n void Promise.resolve(result).catch(onError);\n }\n } catch (err) {\n onError(err);\n }\n}\n\n/**\n * Outer-recall failure: abort stays silent (empty string). Timeout and\n * other errors become the missing-note so a failed query is never\n * indistinguishable from \"no matches\".\n */\nexport function recallFailureComposition(err: unknown): RecallContextComposition | null {\n if (isAbortError(err)) return null;\n const detail =\n err instanceof Error && err.message === \"recall timeout\"\n ? \"timeout\"\n : \"recall_failed\";\n return composeMissingMemoryContext({ detail });\n}\n"],"mappings":";;;;;;;;;;;AAiCA,SAAS,UAAU,SAAyB;AAC1C,QAAM,UAAU,QAAQ,KAAK;AAC7B,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,QAAM,UAAU,QAAQ,QAAQ,IAAI;AACpC,SAAO,YAAY,KAAK,UAAU,QAAQ,MAAM,GAAG,OAAO,EAAE,QAAQ;AACtE;AAEA,SAAS,aAAa,OAAuC;AAC3D,SAAO,OAAO,UAAU,WAAW,QAAQ,MAAM;AACnD;AAOO,SAAS,gCACd,SACQ;AACR,QAAM,WAAqB,CAAC;AAC5B,aAAW,CAAC,EAAE,MAAM,KAAK,SAAS;AAChC,UAAM,QAAkB,CAAC;AACzB,eAAW,SAAS,QAAQ;AAC1B,YAAM,OAAO,UAAU,aAAa,KAAK,CAAC;AAC1C,UAAI,KAAK,SAAS,EAAG,OAAM,KAAK,IAAI;AAAA,IACtC;AACA,QAAI,MAAM,SAAS,EAAG,UAAS,KAAK,MAAM,KAAK,IAAI,CAAC;AAAA,EACtD;AACA,SAAO,SAAS,KAAK,wBAAwB;AAC/C;AAEO,SAAS,+BACd,OACiC;AACjC,QAAM,cAAc,8BAA8B;AAAA,IAChD,SAAS,MAAM;AAAA,IACf,QAAQ,MAAM;AAAA,IACd,UAAU,MAAM;AAAA,IAChB,gBAAgB,MAAM;AAAA,EACxB,CAAC;AACD,SAAO;AAAA,IACL;AAAA,IACA,SAAS,qBAAqB,WAAW;AAAA,IACzC,WACE,YAAY,aAAa,WAAW,oBACpC,YAAY,aAAa,WAAW;AAAA,EACxC;AACF;AAEO,SAAS,yBACd,sBAGA,aACA,SACM;AACN,MAAI,CAAC,qBAAsB;AAC3B,MAAI;AACF,UAAM,SAAS,qBAAqB,WAAW;AAC/C,QAAI,UAAU,OAAO,OAAO,SAAS,YAAY;AAC/C,WAAK,QAAQ,QAAQ,MAAM,EAAE,MAAM,OAAO;AAAA,IAC5C;AAAA,EACF,SAAS,KAAK;AACZ,YAAQ,GAAG;AAAA,EACb;AACF;AAOO,SAAS,yBAAyB,KAA+C;AACtF,MAAI,aAAa,GAAG,EAAG,QAAO;AAC9B,QAAM,SACJ,eAAe,SAAS,IAAI,YAAY,mBACpC,YACA;AACN,SAAO,4BAA4B,EAAE,OAAO,CAAC;AAC/C;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isNamespaceKind
3
- } from "./chunk-JTPAXDSX.js";
3
+ } from "./chunk-6ZMIASYT.js";
4
4
  import {
5
5
  EngramAccessInputError
6
6
  } from "./chunk-2Z24E5W2.js";
@@ -40,4 +40,4 @@ export {
40
40
  positiveIntQueryParam,
41
41
  optionalNamespaceKindQueryParam
42
42
  };
43
- //# sourceMappingURL=chunk-EZV43XBD.js.map
43
+ //# sourceMappingURL=chunk-6Z4OLQUO.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot,
3
3
  resolveNamespaceStorageRoot
4
- } from "./chunk-42BV46XS.js";
4
+ } from "./chunk-T73ZC7C5.js";
5
5
  import {
6
6
  MutationSerializer,
7
7
  withHeldFileLock
@@ -1473,4 +1473,4 @@ export {
1473
1473
  isNamespaceKind,
1474
1474
  NamespaceCatalog
1475
1475
  };
1476
- //# sourceMappingURL=chunk-JTPAXDSX.js.map
1476
+ //# sourceMappingURL=chunk-6ZMIASYT.js.map
@@ -4,6 +4,9 @@ import {
4
4
  import {
5
5
  normalizeProjectionPreview
6
6
  } from "./chunk-SCU65EZI.js";
7
+ import {
8
+ coerceBooleanLike
9
+ } from "./chunk-PQVCH2AE.js";
7
10
  import {
8
11
  writeFileAtomically
9
12
  } from "./chunk-AW4QUFQF.js";
@@ -20,6 +23,10 @@ var DIRECTORY_SIDECAR_MARKER = "<!-- remnic-directory-sidecar -->";
20
23
  var ABSTRACT_MAX_CHARS = 256;
21
24
  var OVERVIEW_MAX_CHARS = 4e3;
22
25
  var DEFAULT_QUERY_LIMIT = 5;
26
+ var CATEGORY_ROOTS = new Set(RECALL_FALLBACK_DIRS);
27
+ function parseDirectorySidecarsEnabled(raw) {
28
+ return coerceBooleanLike(raw, "directorySidecarsEnabled") === true;
29
+ }
23
30
  var RESERVED_CHILD_BASENAMES = Object.freeze({
24
31
  ...OKF_RESERVED_BASENAMES,
25
32
  [DIRECTORY_SIDECAR_BASENAME]: true
@@ -149,40 +156,81 @@ function collectSidecarDirs(scopeRoot) {
149
156
  }
150
157
  return dirs;
151
158
  }
159
+ async function syncSidecarDir(dir, enabled, childAbstracts, written, removed) {
160
+ const target = sidecarPath(dir);
161
+ const raw = readFileOrNull(target);
162
+ const existing = raw !== null && raw.startsWith(DIRECTORY_SIDECAR_MARKER) ? raw : null;
163
+ if (!enabled) {
164
+ if (existing !== null) {
165
+ unlinkSync(target);
166
+ removed.push(target);
167
+ }
168
+ return;
169
+ }
170
+ const next = renderSidecar(dir, directoryFingerprint(dir), childAbstracts);
171
+ if (next === null) {
172
+ if (existing !== null) {
173
+ unlinkSync(target);
174
+ removed.push(target);
175
+ }
176
+ return;
177
+ }
178
+ const parsedNext = parseSidecar(next);
179
+ if (parsedNext) childAbstracts.set(dir, parsedNext.abstract);
180
+ if (raw === next) return;
181
+ if (existing === null && raw !== null) return;
182
+ await writeFileAtomically(target, next);
183
+ written.push(target);
184
+ }
185
+ function childAbstractsFromDisk(dir) {
186
+ const abstracts = /* @__PURE__ */ new Map();
187
+ for (const name of directoryChildren(dir)) {
188
+ const childDir = path.join(dir, name);
189
+ const parsed = parseSidecar(readFileOrNull(sidecarPath(childDir)) ?? "");
190
+ if (parsed) abstracts.set(childDir, parsed.abstract);
191
+ }
192
+ return abstracts;
193
+ }
194
+ function directorySidecarAncestry(memoryDir, changedPath) {
195
+ const root = path.resolve(memoryDir);
196
+ const abs = path.isAbsolute(changedPath) ? path.resolve(changedPath) : path.resolve(root, changedPath);
197
+ const rel = path.relative(root, abs);
198
+ if (rel.startsWith("..") || path.isAbsolute(rel)) return [];
199
+ const parts = rel.split(path.sep).filter(Boolean);
200
+ const dirParts = isRealDirectory(abs) ? parts : parts.slice(0, -1);
201
+ let categoryAt = -1;
202
+ if (dirParts[0] === "namespaces" && dirParts.length >= 3 && CATEGORY_ROOTS.has(dirParts[2] ?? "")) {
203
+ categoryAt = 2;
204
+ } else if (CATEGORY_ROOTS.has(dirParts[0] ?? "")) {
205
+ categoryAt = 0;
206
+ }
207
+ if (categoryAt === -1) return [];
208
+ const dirs = [];
209
+ for (let i = dirParts.length; i > categoryAt; i--) {
210
+ dirs.push(path.join(root, ...dirParts.slice(0, i)));
211
+ }
212
+ return dirs;
213
+ }
152
214
  async function runDirectorySidecarMaintenance(memoryDir, enabled) {
153
215
  const written = [];
154
216
  const removed = [];
155
217
  for (const scope of scopeRoots(memoryDir)) {
156
218
  const childAbstracts = /* @__PURE__ */ new Map();
157
219
  for (const dir of collectSidecarDirs(scope)) {
158
- const target = sidecarPath(dir);
159
- const raw = readFileOrNull(target);
160
- const existing = raw !== null && raw.startsWith(DIRECTORY_SIDECAR_MARKER) ? raw : null;
161
- if (!enabled) {
162
- if (existing !== null) {
163
- unlinkSync(target);
164
- removed.push(target);
165
- }
166
- continue;
167
- }
168
- const next = renderSidecar(dir, directoryFingerprint(dir), childAbstracts);
169
- if (next === null) {
170
- if (existing !== null) {
171
- unlinkSync(target);
172
- removed.push(target);
173
- }
174
- continue;
175
- }
176
- const parsedNext = parseSidecar(next);
177
- if (parsedNext) childAbstracts.set(dir, parsedNext.abstract);
178
- if (raw === next) continue;
179
- if (existing === null && raw !== null) continue;
180
- await writeFileAtomically(target, next);
181
- written.push(target);
220
+ await syncSidecarDir(dir, enabled, childAbstracts, written, removed);
182
221
  }
183
222
  }
184
223
  return { written, removed };
185
224
  }
225
+ async function refreshDirectorySidecarsAfterWrite(memoryDir, changedPath, enabled) {
226
+ if (!enabled) return { written: [], removed: [] };
227
+ const written = [];
228
+ const removed = [];
229
+ for (const dir of directorySidecarAncestry(memoryDir, changedPath)) {
230
+ await syncSidecarDir(dir, true, childAbstractsFromDisk(dir), written, removed);
231
+ }
232
+ return { written, removed };
233
+ }
186
234
  async function loadDirectorySidecar(dir, options = {}) {
187
235
  const refresh = options.refresh !== false;
188
236
  const target = sidecarPath(dir);
@@ -252,9 +300,12 @@ async function findDirectorySidecarsForQuery(memoryDir, query, options = {}) {
252
300
  export {
253
301
  DIRECTORY_SIDECAR_BASENAME,
254
302
  DIRECTORY_SIDECAR_MARKER,
303
+ parseDirectorySidecarsEnabled,
255
304
  directoryFingerprint,
305
+ directorySidecarAncestry,
256
306
  runDirectorySidecarMaintenance,
307
+ refreshDirectorySidecarsAfterWrite,
257
308
  loadDirectorySidecar,
258
309
  findDirectorySidecarsForQuery
259
310
  };
260
- //# sourceMappingURL=chunk-UD6W67JM.js.map
311
+ //# sourceMappingURL=chunk-72AV2H3R.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/directory-sidecars.ts"],"sourcesContent":["/**\n * @remnic/core — per-directory abstract/overview sidecars (issue #2977).\n *\n * One derived `overview.md` per memory directory (category roots and every\n * directory beneath them, including `namespaces/<ns>/` subtrees), rendered\n * bottom-up from existing memory content:\n *\n * - the ABSTRACT is a single line (<=256 chars) composed from child titles;\n * - the OVERVIEW body lists one preview line per child memory and embeds\n * each child DIRECTORY's abstract, so a parent summarizes its subtree\n * without embedding full child overviews.\n *\n * Determinism: no LLM, no embeddings. Content is assembled with the same\n * preview machinery the OKF index files use (`normalizeProjectionPreview`).\n *\n * Invalidation: each sidecar stores a content-free fingerprint of its subtree\n * (child name|size|mtime for files, recursive fingerprints for child dirs).\n * Any add/edit/delete anywhere below a directory changes its fingerprint, so\n * `loadDirectorySidecar` can detect staleness with `readdir`+`stat` alone and\n * refresh without reading child memory files first. Eager regeneration runs\n * through {@link runDirectorySidecarMaintenance}; lazy refresh on read covers\n * direct-write paths that bypass scheduled maintenance (Gotcha #43).\n *\n * Isolation: sidecars are derived artifacts, excluded from generic recall via\n * `isGenericRecallExcludedPath` (basename match, the same tradeoff OKF makes\n * for `index.md`/`log.md`) while staying full-text searchable. Files at the\n * sidecar path WITHOUT the marker are user content: never overwritten, never\n * removed.\n *\n * Layer 2 (this slice): {@link refreshDirectorySidecarsAfterWrite} refreshes\n * only the changed directory and its category ancestors, so a memory write\n * populates sidecars without walking the rest of the store. `enabled: false`\n * is a proven no-op (no reads, no writes). Config parsing lives here;\n * `parseConfig` wiring, retrieval drill-down, xray, and LLM summarization\n * remain later layers on #2977 (`config.ts` is at its file-size ratchet).\n */\n\nimport { createHash } from \"node:crypto\";\nimport { lstatSync, readFileSync, readdirSync, statSync, unlinkSync } from \"node:fs\";\nimport path from \"node:path\";\n\nimport { coerceBooleanLike } from \"./connectors/coerce.js\";\nimport { writeFileAtomically } from \"./maintenance/atomic-file.js\";\nimport { normalizeProjectionPreview } from \"./memory-projection-format.js\";\nimport { OKF_RESERVED_BASENAMES } from \"./okf/type-mapping.js\";\nimport { RECALL_FALLBACK_DIRS } from \"./utils/category-dir.js\";\n\nexport const DIRECTORY_SIDECAR_BASENAME = \"overview.md\";\nexport const DIRECTORY_SIDECAR_MARKER = \"<!-- remnic-directory-sidecar -->\";\n\nconst ABSTRACT_MAX_CHARS = 256;\nconst OVERVIEW_MAX_CHARS = 4000;\nconst DEFAULT_QUERY_LIMIT = 5;\nconst CATEGORY_ROOTS: ReadonlySet<string> = new Set(RECALL_FALLBACK_DIRS);\n\n/** Config fields this slice owns. Mix into `PluginConfig` in a later layer. */\nexport interface DirectorySidecarSettings {\n /** Populate sidecars on memory writes. Default false. */\n directorySidecarsEnabled: boolean;\n}\n\n/** Strict off-default: only an explicit true/\"true\"/1 opts in. */\nexport function parseDirectorySidecarsEnabled(raw: unknown): boolean {\n return coerceBooleanLike(raw, \"directorySidecarsEnabled\") === true;\n}\n\n/** Basenames never treated as child memories (ours plus OKF's reserved ones). */\nconst RESERVED_CHILD_BASENAMES: Readonly<Record<string, true>> = Object.freeze({\n ...OKF_RESERVED_BASENAMES,\n [DIRECTORY_SIDECAR_BASENAME]: true,\n});\n\nexport interface DirectorySidecar {\n /** Absolute directory the sidecar describes. */\n readonly dir: string;\n /** Single-line L0 abstract (<=256 chars). */\n readonly abstract: string;\n /** Abstract plus the per-child preview body (<=4000 chars). */\n readonly overview: string;\n /** Number of memory `.md` children in this directory. */\n readonly childCount: number;\n /** False when the stored fingerprint no longer matches the subtree. */\n readonly fresh: boolean;\n}\n\nexport interface DirectorySidecarMatch extends DirectorySidecar {\n readonly score: number;\n}\n\nexport interface DirectorySidecarReport {\n written: string[];\n removed: string[];\n}\n\ninterface ParsedSidecar {\n abstract: string;\n overview: string;\n childCount: number;\n fingerprint: string;\n}\n\nfunction listEntries(dir: string) {\n try {\n return readdirSync(dir, { withFileTypes: true });\n } catch {\n return [];\n }\n}\n\n/** Root check that refuses symlinks (fs-boundary rule, PRs #1938/#1999). */\nfunction isRealDirectory(entryPath: string): boolean {\n try {\n const stats = lstatSync(entryPath);\n return !stats.isSymbolicLink() && stats.isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction memoryChildren(dir: string): string[] {\n // Dirent.isFile() is false for symlinks, so a linked memory never enters the corpus.\n return listEntries(dir)\n .filter((entry) => entry.isFile() && !RESERVED_CHILD_BASENAMES[entry.name] && entry.name.endsWith(\".md\"))\n .map((entry) => entry.name)\n .sort((a, b) => a.localeCompare(b));\n}\n\nfunction directoryChildren(dir: string): string[] {\n // Dirent.isDirectory() is false for symlinks (fs-boundary rule, PRs #1938/#1999).\n return listEntries(dir)\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name)\n .sort((a, b) => a.localeCompare(b));\n}\n\n/**\n * Content-free subtree fingerprint: sha256 over sorted child descriptors.\n * Files contribute `name|size|mtimeMs`; directories contribute their own\n * recursive fingerprint, so any change below a directory invalidates every\n * ancestor. Reads no file contents.\n */\nexport function directoryFingerprint(dir: string): string {\n const hash = createHash(\"sha256\");\n for (const name of memoryChildren(dir)) {\n try {\n const stats = statSync(path.join(dir, name));\n hash.update(`f|${name}|${stats.size}|${Math.trunc(stats.mtimeMs)}\\n`);\n } catch {\n hash.update(`f|${name}|missing\\n`);\n }\n }\n for (const name of directoryChildren(dir)) {\n hash.update(`d|${name}|${directoryFingerprint(path.join(dir, name))}\\n`);\n }\n return hash.digest(\"hex\");\n}\n\nfunction readFileOrNull(target: string): string | null {\n try {\n return readFileSync(target, \"utf8\");\n } catch {\n return null;\n }\n}\n\nfunction parseSidecar(content: string): ParsedSidecar | null {\n if (!content.startsWith(DIRECTORY_SIDECAR_MARKER)) return null;\n const fingerprint = /^fingerprint: ([0-9a-f]{64})$/m.exec(content)?.[1];\n if (!fingerprint) return null;\n const abstract = /^## Abstract\\n([^\\n]+)$/m.exec(content)?.[1] ?? \"\";\n const overviewStart = content.indexOf(\"## Abstract\");\n const overview =\n overviewStart === -1 ? \"\" : content.slice(overviewStart, overviewStart + OVERVIEW_MAX_CHARS).trim();\n // The `* name — preview` child bullets are the rendered child count.\n const childCount = (content.match(/^\\* .+$/gm) ?? []).length;\n return { abstract, overview, childCount, fingerprint };\n}\n\nfunction sidecarPath(dir: string): string {\n return path.join(dir, DIRECTORY_SIDECAR_BASENAME);\n}\n\nfunction renderSidecar(dir: string, fingerprint: string, childAbstracts: Map<string, string>): string | null {\n const children = memoryChildren(dir);\n const childDirs = directoryChildren(dir).filter((name) => childAbstracts.has(path.join(dir, name)));\n if (children.length === 0 && childDirs.length === 0) return null;\n\n const previews = children.map((name) => {\n try {\n return normalizeProjectionPreview(readFileSync(path.join(dir, name), \"utf8\"), 120);\n } catch {\n return \"\";\n }\n });\n const titles = children.map(\n (name, index) => previews[index].split(\" \").slice(0, 8).join(\" \") || name.replace(/\\.md$/, \"\"),\n );\n const abstract = normalizeProjectionPreview(\n `${path.basename(dir)}/ — ${children.length} memories: ${titles.slice(0, 5).join(\" · \")}`,\n ABSTRACT_MAX_CHARS,\n );\n\n const lines = [\n DIRECTORY_SIDECAR_MARKER,\n `fingerprint: ${fingerprint}`,\n `# ${path.basename(dir)}/ overview`,\n \"\",\n \"## Abstract\",\n abstract,\n \"\",\n \"## Children\",\n ];\n for (const [index, name] of children.entries()) {\n lines.push(`* ${name} — ${previews[index]}`);\n }\n for (const name of childDirs) {\n lines.push(`### ${name}/`);\n lines.push(childAbstracts.get(path.join(dir, name)) ?? \"\");\n }\n lines.push(\"\");\n return lines.join(\"\\n\");\n}\n\n/** Scope roots whose category subtrees carry sidecars: the memory root plus every namespace root. */\nfunction scopeRoots(memoryDir: string): string[] {\n const roots = [memoryDir];\n const namespacesRoot = path.join(memoryDir, \"namespaces\");\n for (const entry of listEntries(namespacesRoot)) {\n if (entry.isDirectory() && isRealDirectory(path.join(namespacesRoot, entry.name))) {\n roots.push(path.join(namespacesRoot, entry.name));\n }\n }\n return roots;\n}\n\n/**\n * Every directory that should carry a sidecar, deepest first (post-order) so\n * parents render after their children and can embed child abstracts.\n */\nfunction collectSidecarDirs(scopeRoot: string): string[] {\n const dirs: string[] = [];\n const walk = (dir: string, isCategoryRoot: boolean): boolean => {\n let carries = memoryChildren(dir).length > 0;\n for (const name of directoryChildren(dir)) {\n carries = walk(path.join(dir, name), false) || carries;\n }\n // A directory that stopped carrying memories must still be visited so its\n // orphaned sidecar can be pruned or rewritten (cache-invalidation completeness).\n const hasSidecar = readFileOrNull(sidecarPath(dir))?.startsWith(DIRECTORY_SIDECAR_MARKER) === true;\n if (isCategoryRoot || carries || hasSidecar) dirs.push(dir);\n return carries;\n };\n for (const category of RECALL_FALLBACK_DIRS) {\n const categoryDir = path.join(scopeRoot, category);\n if (!isRealDirectory(categoryDir)) continue;\n walk(categoryDir, true);\n }\n return dirs;\n}\n\nasync function syncSidecarDir(\n dir: string,\n enabled: boolean,\n childAbstracts: Map<string, string>,\n written: string[],\n removed: string[],\n): Promise<void> {\n const target = sidecarPath(dir);\n const raw = readFileOrNull(target);\n const existing = raw !== null && raw.startsWith(DIRECTORY_SIDECAR_MARKER) ? raw : null;\n if (!enabled) {\n if (existing !== null) {\n unlinkSync(target);\n removed.push(target);\n }\n return;\n }\n const next = renderSidecar(dir, directoryFingerprint(dir), childAbstracts);\n if (next === null) {\n if (existing !== null) {\n unlinkSync(target);\n removed.push(target);\n }\n return;\n }\n const parsedNext = parseSidecar(next);\n if (parsedNext) childAbstracts.set(dir, parsedNext.abstract);\n if (raw === next) return;\n if (existing === null && raw !== null) return; // user-authored file: hands off\n await writeFileAtomically(target, next);\n written.push(target);\n}\n\nfunction childAbstractsFromDisk(dir: string): Map<string, string> {\n const abstracts = new Map<string, string>();\n for (const name of directoryChildren(dir)) {\n const childDir = path.join(dir, name);\n const parsed = parseSidecar(readFileOrNull(sidecarPath(childDir)) ?? \"\");\n if (parsed) abstracts.set(childDir, parsed.abstract);\n }\n return abstracts;\n}\n\n/**\n * Category-root ancestry of a changed memory path, deepest first.\n * Paths outside a recall category return `[]` so writes to `state/` or\n * `namespaces/<ns>/` itself never mint a sidecar.\n */\nexport function directorySidecarAncestry(memoryDir: string, changedPath: string): string[] {\n const root = path.resolve(memoryDir);\n const abs = path.isAbsolute(changedPath) ? path.resolve(changedPath) : path.resolve(root, changedPath);\n const rel = path.relative(root, abs);\n if (rel.startsWith(\"..\") || path.isAbsolute(rel)) return [];\n const parts = rel.split(path.sep).filter(Boolean);\n const dirParts = isRealDirectory(abs) ? parts : parts.slice(0, -1);\n let categoryAt = -1;\n if (dirParts[0] === \"namespaces\" && dirParts.length >= 3 && CATEGORY_ROOTS.has(dirParts[2] ?? \"\")) {\n categoryAt = 2;\n } else if (CATEGORY_ROOTS.has(dirParts[0] ?? \"\")) {\n categoryAt = 0;\n }\n if (categoryAt === -1) return [];\n const dirs: string[] = [];\n for (let i = dirParts.length; i > categoryAt; i--) {\n dirs.push(path.join(root, ...dirParts.slice(0, i)));\n }\n return dirs;\n}\n\n/**\n * Regenerates directory sidecars incrementally. Unchanged sidecars are left\n * untouched; emptied directories lose theirs; user files at the sidecar path\n * (no marker) are never written or removed. With `enabled: false` every\n * generated sidecar is removed — the OKF index-maintenance contract.\n */\nexport async function runDirectorySidecarMaintenance(\n memoryDir: string,\n enabled: boolean,\n): Promise<DirectorySidecarReport> {\n const written: string[] = [];\n const removed: string[] = [];\n for (const scope of scopeRoots(memoryDir)) {\n const childAbstracts = new Map<string, string>();\n for (const dir of collectSidecarDirs(scope)) {\n await syncSidecarDir(dir, enabled, childAbstracts, written, removed);\n }\n }\n return { written, removed };\n}\n\n/**\n * Incremental write-path refresh: only the changed directory and its\n * category ancestors, using the same fingerprint/render path as maintenance.\n * `enabled: false` returns immediately — no readdir, no writes.\n */\nexport async function refreshDirectorySidecarsAfterWrite(\n memoryDir: string,\n changedPath: string,\n enabled: boolean,\n): Promise<DirectorySidecarReport> {\n if (!enabled) return { written: [], removed: [] };\n const written: string[] = [];\n const removed: string[] = [];\n for (const dir of directorySidecarAncestry(memoryDir, changedPath)) {\n await syncSidecarDir(dir, true, childAbstractsFromDisk(dir), written, removed);\n }\n return { written, removed };\n}\n\n/**\n * Read a directory's sidecar for retrieval. By default a stale sidecar is\n * refreshed in place (child directories first), which is what makes direct\n * writes that bypass maintenance still converge. With `{ refresh: false }`\n * the stored sidecar is returned as-is with `fresh: false` so callers can\n * observe staleness without writes.\n */\nexport async function loadDirectorySidecar(\n dir: string,\n options: { refresh?: boolean } = {},\n): Promise<DirectorySidecar | null> {\n const refresh = options.refresh !== false;\n const target = sidecarPath(dir);\n const stored = readFileOrNull(target);\n const generated = stored !== null && stored.startsWith(DIRECTORY_SIDECAR_MARKER);\n const parsed = generated ? parseSidecar(stored) : null;\n const fingerprint = directoryFingerprint(dir);\n if (parsed !== null && (parsed.fingerprint === fingerprint || !refresh)) {\n return {\n dir,\n abstract: parsed.abstract,\n overview: parsed.overview,\n childCount: parsed.childCount,\n fresh: parsed.fingerprint === fingerprint,\n };\n }\n if (!refresh) return null;\n\n // Refresh bottom-up so this directory's body embeds current child abstracts.\n const childAbstracts = new Map<string, string>();\n for (const name of directoryChildren(dir)) {\n const child = await loadDirectorySidecar(path.join(dir, name));\n if (child) childAbstracts.set(path.join(dir, name), child.abstract);\n }\n const next = renderSidecar(dir, directoryFingerprint(dir), childAbstracts);\n if (next === null) {\n if (generated) unlinkSync(target);\n return null;\n }\n if (readFileOrNull(target) !== next) {\n if (stored !== null && !generated) {\n // User-authored file at the sidecar path: serve nothing rather than clobber it.\n return null;\n }\n await writeFileAtomically(target, next);\n }\n const refreshed = parseSidecar(next);\n return refreshed\n ? {\n dir,\n abstract: refreshed.abstract,\n overview: refreshed.overview,\n childCount: refreshed.childCount,\n fresh: true,\n }\n : null;\n}\n\n/**\n * Overview-query primitive for hierarchical retrieval (layer 1 of #2977):\n * score every sidecar's abstract (+3 per query term) and overview (+1 per\n * term) lexically, then return the most specific matches — when both a\n * directory and its descendant match, only the descendant is kept, matching\n * the drill-down semantics the full retrieval mode will build on.\n */\nexport async function findDirectorySidecarsForQuery(\n memoryDir: string,\n query: string,\n options: { namespace?: string; limit?: number } = {},\n): Promise<DirectorySidecarMatch[]> {\n const scope = options.namespace ? path.join(memoryDir, \"namespaces\", options.namespace) : memoryDir;\n if (!isRealDirectory(scope)) return [];\n const terms = query\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .filter((term) => term.length >= 2);\n\n const matches: DirectorySidecarMatch[] = [];\n for (const root of scopeRoots(scope)) {\n for (const dir of collectSidecarDirs(root)) {\n const sidecar = await loadDirectorySidecar(dir);\n if (!sidecar) continue;\n const abstractLower = sidecar.abstract.toLowerCase();\n const overviewLower = sidecar.overview.toLowerCase();\n let score = 0;\n for (const term of terms) {\n if (abstractLower.includes(term)) score += 3;\n else if (overviewLower.includes(term)) score += 1;\n }\n if (score > 0) matches.push({ ...sidecar, score });\n }\n }\n matches.sort((a, b) => b.score - a.score || a.dir.localeCompare(b.dir));\n\n const limit = options.limit ?? DEFAULT_QUERY_LIMIT;\n return matches\n .filter((candidate) => !matches.some((other) => other.dir.startsW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O;AACxB,YAAI,cAAc,SAAS,IAAI,EAAG,UAAS;AAAA,iBAClC,cAAc,SAAS,IAAI,EAAG,UAAS;AAAA,MAClD;AACA,UAAI,QAAQ,EAAG,SAAQ,KAAK,EAAE,GAAG,SAAS,MAAM,CAAC;AAAA,IACnD;AAAA,EACF;AACA,UAAQ,KAAK,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,cAAc,EAAE,GAAG,CAAC;AAEtE,QAAM,QAAQ,QAAQ,SAAS;AAC/B,SAAO,QACJ,OAAO,CAAC,cAAc,CAAC,QAAQ,KAAK,CAAC,UAAU,MAAM,IAAI,WAAW,GAAG,UAAU,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,EACnG,MAAM,GAAG,KAAK;AACnB;","names":[]}
@@ -2,7 +2,7 @@ import {
2
2
  WHO_KNOWS_DEFAULT_LIMIT,
3
3
  WHO_KNOWS_MAX_LIMIT,
4
4
  validateWhoKnowsInput
5
- } from "./chunk-KOEDSRF5.js";
5
+ } from "./chunk-ETNC6TT6.js";
6
6
 
7
7
  // src/who-knows-cli.ts
8
8
  function extractWhoKnowsRawArgs(rest) {
@@ -74,4 +74,4 @@ export {
74
74
  renderWhoKnowsText,
75
75
  renderWhoKnows
76
76
  };
77
- //# sourceMappingURL=chunk-DNO6QWCB.js.map
77
+ //# sourceMappingURL=chunk-7TTOX6NW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-D2XUSZ24.js";
3
+ } from "./chunk-RIP2AOZW.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
6
  } from "./chunk-GDYU6VF4.js";
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-OP5IBPHP.js.map
549
+ //# sourceMappingURL=chunk-A33DLYNY.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-6ET2VII7.js";
8
8
  import {
9
9
  StorageManager
10
- } from "./chunk-D2XUSZ24.js";
10
+ } from "./chunk-RIP2AOZW.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-3MIZ2EKQ.js.map
1286
+ //# sourceMappingURL=chunk-AH3OIMS7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-JOP7W24J.js";
3
+ } from "./chunk-PLJ2MQFT.js";
4
4
  import {
5
5
  namespaceIdentityToken,
6
6
  normalizeNamespaceIdentity
@@ -508,4 +508,4 @@ export {
508
508
  NamespaceSearchRouter,
509
509
  normalizeQmdResultPath
510
510
  };
511
- //# sourceMappingURL=chunk-TZ44E732.js.map
511
+ //# sourceMappingURL=chunk-AIVRD66I.js.map